|
@@ -7,11 +7,7 @@
|
|
|
<a-row>
|
|
|
<a-col :span="10">
|
|
|
<a-form-model-item label="申请用车时间" prop="applicationTime">
|
|
|
- <a-input
|
|
|
- v-model="form.applicationTime"
|
|
|
- placeholder="暂无信息"
|
|
|
- :disabled="true"
|
|
|
- /> </a-form-model-item
|
|
|
+ <a-input v-model="form.applicationTime" placeholder="暂无信息" :disabled="true" /> </a-form-model-item
|
|
|
></a-col>
|
|
|
<a-col :span="10"
|
|
|
><a-form-model-item label="预计归还时间" prop="returnTime">
|
|
@@ -61,11 +57,7 @@
|
|
|
<a-row>
|
|
|
<a-col :span="10"
|
|
|
><a-form-model-item label="实际归还时间" prop="realReturnTime">
|
|
|
- <a-input
|
|
|
- v-model="form.realReturnTime"
|
|
|
- placeholder="暂无信息"
|
|
|
- :disabled="true"
|
|
|
- /> </a-form-model-item
|
|
|
+ <a-input v-model="form.realReturnTime" placeholder="暂无信息" :disabled="true" /> </a-form-model-item
|
|
|
></a-col>
|
|
|
<a-col :span="10">
|
|
|
<a-form-item label="审核状态">
|
|
@@ -98,6 +90,48 @@
|
|
|
<a-form-model-item label="备注" prop="remark">
|
|
|
<a-input v-model="form.remark" placeholder="暂无信息" :disabled="true" />
|
|
|
</a-form-model-item>
|
|
|
+ <div>
|
|
|
+ <template>
|
|
|
+ <div>
|
|
|
+ <!-- <Timeline pending="Recording..." :reverse="reverse">
|
|
|
+ <TimelineItem v-for="(item, index) in list" :key="index">
|
|
|
+ <div>{{ item.nodeRole }}</div>
|
|
|
+ <div slot="dot">
|
|
|
+ <img :src="item.list" alt="">
|
|
|
+ </div>
|
|
|
+ </TimelineItem>
|
|
|
+ <TimelineItem>Solve initial network problems 2015-09-01</TimelineItem>
|
|
|
+ <TimelineItem>Technical testing 2015-09-01</TimelineItem>
|
|
|
+ </Timeline> -->
|
|
|
+ <div class="timeLines" style=" margin-bottom: 14px; ">
|
|
|
+ <div style="margin-left: 10px; margin-bottom: 18px; font-size: 16px;font-weight:600">用车申请审批</div>
|
|
|
+ <div class="ul_box">
|
|
|
+ <ul class="timeline-wrapper">
|
|
|
+ <li class="timeline-item" v-for="(t, index) in list" :key="index">
|
|
|
+ <div class="timeline-box">
|
|
|
+ <div class="out-circle">
|
|
|
+ <div class="in-circle" :class="addinCircle(t.list)"></div>
|
|
|
+ </div>
|
|
|
+ <div class="long-line"></div>
|
|
|
+ </div>
|
|
|
+ <div style="margin-left: 25px; margin-bottom: 4px; font-size: 16px">{{ t.nodeRole }}</div>
|
|
|
+ <div class="timeline-content" v-if="t.list">
|
|
|
+ <div class="timeline-date" v-for="(item, index1) in t.list" :key="index1">
|
|
|
+ <span style="display: inline-block; margin-bottom: 15px"> 审核人:{{ item.userName }}</span>
|
|
|
+ <div class="timeline-title">审核时间:{{ item.approvalTime }}</div>
|
|
|
+ <div class="timeline-desc">
|
|
|
+ 审核状态:
|
|
|
+ <span>{{ item.status }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
<div class="bottom-control">
|
|
|
<a-space>
|
|
|
<!-- <a-button type="primary" :loading="submitLoading" @click="submitForm"> 保存 </a-button> -->
|
|
@@ -109,8 +143,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getApplyCarLog, addApplyCarLog, updateApplyCarLog } from '@/api/clw/applyCarLog'
|
|
|
+import { getApplyCarLog, addApplyCarLog, updateApplyCarLog, getWorkflow } from '@/api/clw/applyCarLog'
|
|
|
|
|
|
+import { Timeline } from 'ant-design-vue'
|
|
|
+
|
|
|
+// Timeline.
|
|
|
+const TimelineItem = Timeline.Item
|
|
|
export default {
|
|
|
name: 'CreateForm',
|
|
|
props: {
|
|
@@ -119,7 +157,7 @@ export default {
|
|
|
required: true,
|
|
|
},
|
|
|
},
|
|
|
- components: {},
|
|
|
+ components: { Timeline, TimelineItem },
|
|
|
dicts: ['apply_status'],
|
|
|
data() {
|
|
|
return {
|
|
@@ -165,17 +203,38 @@ export default {
|
|
|
formType: 1,
|
|
|
open: false,
|
|
|
rules: {},
|
|
|
+ reverse: false,
|
|
|
+ list: [],
|
|
|
}
|
|
|
},
|
|
|
filters: {},
|
|
|
created() {},
|
|
|
- computed: {},
|
|
|
+ computed: {
|
|
|
+ // 监听agree颜色变化
|
|
|
+ fontstyle() {
|
|
|
+ return (icontent) => {
|
|
|
+ // 使用JavaScript闭包,进行传值操作
|
|
|
+ console.log(icontent)
|
|
|
+
|
|
|
+ if (icontent == '1') {
|
|
|
+ return { color: 'green' }
|
|
|
+ } else {
|
|
|
+ return { color: 'red' }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
watch: {},
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
onClose() {
|
|
|
this.open = false
|
|
|
},
|
|
|
+ colors(index) {
|
|
|
+ if (index != null) {
|
|
|
+ return '#2a9c4a'
|
|
|
+ }
|
|
|
+ },
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false
|
|
@@ -233,20 +292,24 @@ export default {
|
|
|
this.formType = 2
|
|
|
const id = row ? row.id : ids
|
|
|
getApplyCarLog(id).then((response) => {
|
|
|
- let obj=response.data
|
|
|
- if(obj.isTimeout=='1'){
|
|
|
- obj.isTimeout='已超期'
|
|
|
- }else if(obj.isTimeout=='0'){
|
|
|
- obj.isTimeout='未超期'
|
|
|
+ let obj = response.data
|
|
|
+ if (obj.isTimeout == '1') {
|
|
|
+ obj.isTimeout = '已超期'
|
|
|
+ } else if (obj.isTimeout == '0') {
|
|
|
+ obj.isTimeout = '未超期'
|
|
|
}
|
|
|
- if(obj.isTips=='1'){
|
|
|
- obj.isTips='超期已提醒'
|
|
|
- }else if(obj.isTips=='0'){
|
|
|
- obj.isTips='超期未提醒'
|
|
|
+ if (obj.isTips == '1') {
|
|
|
+ obj.isTips = '超期已提醒'
|
|
|
+ } else if (obj.isTips == '0') {
|
|
|
+ obj.isTips = '超期未提醒'
|
|
|
}
|
|
|
this.form = obj
|
|
|
this.open = true
|
|
|
this.formTitle = '用车申请详情'
|
|
|
+ getWorkflow(obj.taskId).then((res) => {
|
|
|
+ console.log('---------流程', res)
|
|
|
+ this.list = res.data.nodes
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
@@ -280,17 +343,126 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ addinCircle(item) {
|
|
|
+ if (item) {
|
|
|
+ for (let index = 0; index < item.length; index++) {
|
|
|
+ if (item[index].status === 1) {
|
|
|
+ return 'in-circle in-circle1'
|
|
|
+ }
|
|
|
+ if (item[index].status === 2) {
|
|
|
+ return 'in-circle in-circle2'
|
|
|
+ }
|
|
|
+ if (item[index].status === 3 ||item[index].status === 4) {
|
|
|
+ return 'in-circle in-circle3'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
-/deep/.ant-col{
|
|
|
+/deep/.ant-col {
|
|
|
margin-right: 40px;
|
|
|
}
|
|
|
-/deep/.ant-select{
|
|
|
+/deep/.ant-select {
|
|
|
color: #000;
|
|
|
}
|
|
|
-/deep/.ant-input{
|
|
|
+/deep/.ant-input {
|
|
|
color: #000;
|
|
|
}
|
|
|
+ul.timeline-wrapper {
|
|
|
+ list-style: none;
|
|
|
+ margin: 0;
|
|
|
+ padding: 0;
|
|
|
+}
|
|
|
+
|
|
|
+/* 时间线 */
|
|
|
+.timeline-item {
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ .timeline-box {
|
|
|
+ text-align: center;
|
|
|
+ position: absolute;
|
|
|
+
|
|
|
+ .out-circle {
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ background: rgba(14, 116, 218, 0.1);
|
|
|
+ box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1);
|
|
|
+ /*opacity: 0.1;*/
|
|
|
+ border-radius: 50%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .in-circle {
|
|
|
+ width: 8px;
|
|
|
+ height: 8px;
|
|
|
+ margin: 0 auto;
|
|
|
+ background: rgba(14, 116, 218, 1);
|
|
|
+ border-radius: 50%;
|
|
|
+ box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1);
|
|
|
+ }
|
|
|
+ .in-circle1 {
|
|
|
+ background: #0ceb2e !important;
|
|
|
+ }
|
|
|
+ .in-circle2 {
|
|
|
+ background: rgba(14, 116, 218, 1) !important;
|
|
|
+ }
|
|
|
+ .in-circle3 {
|
|
|
+ background-color: rgb(218, 106, 14) !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .long-line {
|
|
|
+ width: 2px;
|
|
|
+ height: 98px;
|
|
|
+ background: rgba(14, 116, 218, 1);
|
|
|
+ box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1);
|
|
|
+ opacity: 0.1;
|
|
|
+ margin-left: 8px;
|
|
|
+ }
|
|
|
+ // .long-line:nth-last-child(1) {
|
|
|
+ // height: 0;
|
|
|
+ // }
|
|
|
+ }
|
|
|
+
|
|
|
+ .timeline-content {
|
|
|
+ box-sizing: border-box;
|
|
|
+ margin-left: 20px;
|
|
|
+ height: 106px;
|
|
|
+ padding: 0 0 0 20px;
|
|
|
+ text-align: left;
|
|
|
+ // margin-bottom: 30px;
|
|
|
+
|
|
|
+ .timeline-title {
|
|
|
+ font-size: 14px;
|
|
|
+ word-break: break-all;
|
|
|
+ margin-bottom: 16px;
|
|
|
+ color: #333;
|
|
|
+ font-weight: 500;
|
|
|
+ /*display: inline;*/
|
|
|
+ }
|
|
|
+
|
|
|
+ .timeline-date {
|
|
|
+ font-size: 16px;
|
|
|
+ color: #333;
|
|
|
+ font-weight: 500;
|
|
|
+ margin-bottom: 16px;
|
|
|
+ }
|
|
|
+ .timeline-desc {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #999999;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.timeline-item:last-child{
|
|
|
+ .long-line {
|
|
|
+ height: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.timeline-item:last-of-type .timeline-content {
|
|
|
+ margin-bottom: 0;
|
|
|
+}
|
|
|
</style>
|