refactor: refactor Success page with DetailList and AStepItem components

master
chenghx 7 years ago
parent 20290cec17
commit 5d35737db5
  1. 83
      src/components/result/Success.vue

@ -4,55 +4,30 @@
<template slot="action">
<a-button type="primary">返回列表</a-button>
<a-button style="margin-left: 8px">查看项目</a-button>
<a-button style="margin-left: 8px">打印</a-button>
<a-button style="margin-left: 8px" @click="print">打印</a-button>
</template>
<div>
<div style="font-size: 16px; color: rgba(0, 0, 0, 0.85); font-weight: 500; margin-bottom: 20px;">项目名称</div>
<a-row style="margin-bottom: 16px">
<a-col :xs="24" :sm="12" :md="12" :lg="12" :xl="6">
<span style="color: rgba(0, 0, 0, 0.85)">项目 ID</span>
20180724089
</a-col>
<a-col :xs="24" :sm="12" :md="12" :lg="12" :xl="6">
<span style="color: rgba(0, 0, 0, 0.85)">负责人</span>
曲丽丽是谁
</a-col>
<a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
<span style="color: rgba(0, 0, 0, 0.85)">生效时间</span>
2016-12-12 ~ 2017-12-12
</a-col>
</a-row>
<detail-list size="small" style="max-width: 800px; margin-bottom: 8px">
<detail-list-item term="项目ID">20180724089</detail-list-item>
<detail-list-item term="负责人">曲丽丽</detail-list-item>
<detail-list-item term="生效时间">016-12-12 ~ 2017-12-12</detail-list-item>
</detail-list>
<a-steps :current="1" progressDot>
<a-step >
<span style="font-size: 14px" slot="title">创建项目</span>
<template slot="description">
<div style="fontSize: 12px; color: rgba(0, 0, 0, 0.45); position: relative; left: 42px;" slot="description" >
<div style="margin: 8px 0 4px">
曲丽丽
<a-icon style="margin-left: 8px" type="dingding-o" />
</div>
<div>2016-12-12 12:32</div>
</div>
</template>
<a-step title="创建项目">
<a-step-item-group slot="description">
<a-step-item title="曲丽丽" icon="dingding-o"/>
<a-step-item title="2016-12-12 12:32"/>
</a-step-item-group>
</a-step>
<a-step title="部门初审">
<span style="font-size: 14px" slot="title">部门初审</span>
<template slot="description">
<div style="fontSize: 12px; color: rgba(0, 0, 0, 0.45); position: relative; left: 42px;" slot="description" >
<div style="margin: 8px 0 4px">
周毛毛
<a-icon style="margin-left: 8px; color: #00A0E9" type="dingding-o" />
</div>
<div><a href="">催一下</a></div>
</div>
</template>
</a-step>
<a-step title="财务复核">
<span style="font-size: 14px" slot="title">财务复核</span>
</a-step>
<a-step title="完成" >
<span style="font-size: 14px" slot="title">完成</span>
<a-step-item-group slot="description">
<a-step-item title="周毛毛" icon="dingding-o" :iconStyle="{color: '#00A0E9'}"/>
<a-step-item title="催一下" :titleStyle="{color: '#00A0E9'}"/>
</a-step-item-group>
</a-step>
<a-step title="财务复核"></a-step>
<a-step title="完成" ></a-step>
</a-steps>
</div>
</result>
@ -68,11 +43,28 @@ import ACol from 'ant-design-vue/es/grid/Col'
import ARow from 'ant-design-vue/es/grid/Row'
import ASteps from 'ant-design-vue/es/steps/index'
import AIcon from 'ant-design-vue/es/icon/icon'
import DetailList from '../tool/DetailList'
import AStepItem from '../tool/AStepItem'
const AStep = ASteps.Step
const AStepItemGroup = AStepItem.Group
const DetailListItem = DetailList.Item
export default {
name: 'Success',
components: {AIcon, AStep, ASteps, ARow, ACol, AButton, PageHeader, ACard, Result},
components: {
AStepItemGroup,
AStepItem,
DetailListItem,
DetailList,
AIcon,
AStep,
ASteps,
ARow,
ACol,
AButton,
PageHeader,
ACard,
Result},
data () {
return {
title: '提交成功',
@ -81,6 +73,11 @@ export default {
' 本文字区域可以展示简单的补充说明,如果有类似展示\n' +
' “单据”的需求,下面这个灰色区域可以呈现比较复杂的内容。'
}
},
methods: {
print () {
window.print()
}
}
}
</script>

Loading…
Cancel
Save