|
@@ -1,64 +1,76 @@
|
|
<template>
|
|
<template>
|
|
- <a-card v-show="visible" title="详情" :bordered="false">
|
|
|
|
- <div slot="extra">
|
|
|
|
|
|
+ <a-card v-show="visible" :bordered="false">
|
|
|
|
+ <div class="btn">
|
|
<a-space class="table-page-search-submitButtons">
|
|
<a-space class="table-page-search-submitButtons">
|
|
<a-button type="default" @click="handleCancel()">返回</a-button>
|
|
<a-button type="default" @click="handleCancel()">返回</a-button>
|
|
</a-space>
|
|
</a-space>
|
|
</div>
|
|
</div>
|
|
- <div class="detail card">
|
|
|
|
- <title-divider title="业务信息" width="140px"></title-divider>
|
|
|
|
- <a-descriptions :column="2" bordered>
|
|
|
|
- <template v-for="item in descriptions">
|
|
|
|
- <a-descriptions-item v-if="item.type==='dataSelect'" :key="item.value" :label="item.label">
|
|
|
|
- {{ detail[item.attrs.connect[1].bind] }}
|
|
|
|
- </a-descriptions-item>
|
|
|
|
- <a-descriptions-item v-if="item.type==='select'" :key="item.value" :label="item.label">
|
|
|
|
- {{ getLabel(item.attrs.options,detail[item.value]) }}
|
|
|
|
- </a-descriptions-item>
|
|
|
|
- <a-descriptions-item v-else-if="item.type==='uploadFile'" :key="item.value" :label="item.label">
|
|
|
|
- <a-space direction="vertical">
|
|
|
|
- <a style="font-size: 12px" v-for="file in detail[item.value]" :key="file.id" target="_blank" :href="file.url"><a-icon type="file" />{{ file.name }}</a>
|
|
|
|
- </a-space>
|
|
|
|
- </a-descriptions-item>
|
|
|
|
- <a-descriptions-item v-else-if="item.type==='uploadImg'" :key="item.value" :label="item.label">
|
|
|
|
- <a-space>
|
|
|
|
- <img v-for="file in detail[item.value]" :key="file.id" :src="file.url" :alt="file.name" width="80px" @click="$refs.imgView.base(file.url)" />
|
|
|
|
- </a-space>
|
|
|
|
- </a-descriptions-item>
|
|
|
|
- <a-descriptions-item v-else-if="item.type!=='divider'" :key="item.value" :label="item.label">
|
|
|
|
- {{ detail[item.value] }}
|
|
|
|
- </a-descriptions-item>
|
|
|
|
- </template>
|
|
|
|
- </a-descriptions>
|
|
|
|
- <title-divider title="审核进度" width="140px"></title-divider>
|
|
|
|
- <a-list item-layout="vertical" :data-source="model.recordList">
|
|
|
|
- <a-list-item slot="renderItem" key="item.title" slot-scope="item">
|
|
|
|
- <a-list-item-meta>
|
|
|
|
- <template #title>
|
|
|
|
- <div style="width:100%;height:35px;display:flex;justify-content: space-between;align-items: center;font-size: 14px;">
|
|
|
|
- <span>{{ item.createdUserName }} - {{ statusMap[item.handleStatus] }}</span> <span>{{ item.createdTime }}</span>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <a-tabs v-model="current" @change="callback">
|
|
|
|
+ <a-tab-pane key="1" tab="业务审批">
|
|
|
|
+ <div class="detail card">
|
|
|
|
+ <title-divider title="业务信息" width="140px"></title-divider>
|
|
|
|
+ <a-descriptions :column="2" bordered>
|
|
|
|
+ <template v-for="item in descriptions">
|
|
|
|
+ <a-descriptions-item v-if="item.type==='dataSelect'" :key="item.value" :label="item.label">
|
|
|
|
+ {{ detail[item.attrs.connect[1].bind] }}
|
|
|
|
+ </a-descriptions-item>
|
|
|
|
+ <a-descriptions-item v-else-if="item.type==='select'" :key="item.value" :label="item.label">
|
|
|
|
+ {{ getLabel(item.attrs.options,detail[item.value]) }}
|
|
|
|
+ </a-descriptions-item>
|
|
|
|
+ <a-descriptions-item v-else-if="item.type==='uploadFile'" :key="item.value" :label="item.label">
|
|
|
|
+ <a-space direction="vertical">
|
|
|
|
+ <a style="font-size: 12px" v-for="file in detail[item.value]" :key="file.id" target="_blank" :href="file.url"><a-icon type="file" />{{ file.name }}</a>
|
|
|
|
+ </a-space>
|
|
|
|
+ </a-descriptions-item>
|
|
|
|
+ <a-descriptions-item v-else-if="item.type==='uploadImg'" :key="item.value" :label="item.label">
|
|
|
|
+ <a-space>
|
|
|
|
+ <img v-for="file in detail[item.value]" :key="file.id" :src="file.url" :alt="file.name" width="80px" @click="$refs.imgView.base(file.url)" />
|
|
|
|
+ </a-space>
|
|
|
|
+ </a-descriptions-item>
|
|
|
|
+ <a-descriptions-item v-else-if="item.type!=='divider'" :key="item.value" :label="item.label">
|
|
|
|
+ {{ detail[item.value] }}
|
|
|
|
+ </a-descriptions-item>
|
|
</template>
|
|
</template>
|
|
|
|
+ </a-descriptions>
|
|
|
|
+ <title-divider title="审核进度" width="140px"></title-divider>
|
|
|
|
+ <a-list item-layout="vertical" :data-source="model.recordList">
|
|
|
|
+ <a-list-item slot="renderItem" key="item.title" slot-scope="item">
|
|
|
|
+ <a-list-item-meta>
|
|
|
|
+ <template #title>
|
|
|
|
+ <div style="width:100%;height:35px;display:flex;justify-content: space-between;align-items: center;font-size: 14px;">
|
|
|
|
+ <span>{{ item.createdUserName }} - {{ statusMap[item.handleStatus] }}</span> <span>{{ item.createdTime }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+ <a-avatar :style="{ backgroundColor: colors[item.handleStatus%4], verticalAlign: 'middle' }" slot="avatar">
|
|
|
|
+ <my-icon v-if="icons[item.handleStatus].includes('icon-')" :type="icons[item.handleStatus]"></my-icon>
|
|
|
|
+ <a-icon v-else :type="icons[item.handleStatus]"></a-icon>
|
|
|
|
+ </a-avatar>
|
|
|
|
+ </a-list-item-meta>
|
|
|
|
+ <div>
|
|
|
|
+ <div style="font-size: 12px">{{ item.handleRemark }}</div>
|
|
|
|
+ <a-space>
|
|
|
|
+ <img v-for="file in item.imageList" :key="file.id" :src="file.url" :alt="file.name" width="80px" @click="$refs.imgView.base(file.url)" />
|
|
|
|
+ </a-space>
|
|
|
|
+ <br>
|
|
|
|
+ <a-space direction="vertical">
|
|
|
|
+ <a style="font-size: 12px" v-for="file in item.fileList" :key="file.id" target="_blank" :href="file.url"><a-icon type="file" />{{ file.name }}</a>
|
|
|
|
+ </a-space>
|
|
|
|
+ </div>
|
|
|
|
|
|
- <a-avatar :style="{ backgroundColor: colors[item.handleStatus%4], verticalAlign: 'middle' }" slot="avatar">
|
|
|
|
- <my-icon v-if="icons[item.handleStatus].includes('icon-')" :type="icons[item.handleStatus]"></my-icon>
|
|
|
|
- <a-icon v-else :type="icons[item.handleStatus]"></a-icon>
|
|
|
|
- </a-avatar>
|
|
|
|
- </a-list-item-meta>
|
|
|
|
- <div>
|
|
|
|
- <div style="font-size: 12px">{{ item.handleRemark }}</div>
|
|
|
|
- <a-space>
|
|
|
|
- <img v-for="file in item.imageList" :key="file.id" :src="file.url" :alt="file.name" width="80px" @click="$refs.imgView.base(file.url)" />
|
|
|
|
- </a-space>
|
|
|
|
- <br>
|
|
|
|
- <a-space direction="vertical">
|
|
|
|
- <a style="font-size: 12px" v-for="file in item.fileList" :key="file.id" target="_blank" :href="file.url"><a-icon type="file" />{{ file.name }}</a>
|
|
|
|
- </a-space>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </a-list-item>
|
|
|
|
+ </a-list>
|
|
|
|
+ </div>
|
|
|
|
+ </a-tab-pane>
|
|
|
|
+ <a-tab-pane key="2" tab="流程查看">
|
|
|
|
+ <JsPlumb ref="JsPlumb" :details="nodes">
|
|
|
|
+ <template #default="record">
|
|
|
|
+ <Node :detail="record.detail" :act="model.frontId" :config="{}"></Node>
|
|
|
|
+ </template>
|
|
|
|
+ </JsPlumb>
|
|
|
|
+ </a-tab-pane>
|
|
|
|
+ </a-tabs>
|
|
|
|
|
|
- </a-list-item>
|
|
|
|
- </a-list>
|
|
|
|
- </div>
|
|
|
|
<ImgView ref="imgView" />
|
|
<ImgView ref="imgView" />
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
@@ -68,11 +80,14 @@ import { verifyWorkflow } from '@/api/workflow/publish'
|
|
import UploadFile from '@/components/Upload/CUploadFile.vue'
|
|
import UploadFile from '@/components/Upload/CUploadFile.vue'
|
|
import UploadImg from '@/components/Upload/CUploadImg.vue'
|
|
import UploadImg from '@/components/Upload/CUploadImg.vue'
|
|
import ImgView from '@/components/viewImg/index.vue'
|
|
import ImgView from '@/components/viewImg/index.vue'
|
|
|
|
+import JsPlumb from '@/components/Jsplumb'
|
|
|
|
+import Node from './Node.vue'
|
|
export default {
|
|
export default {
|
|
name: 'WorkflowTaskBomFieldDetail',
|
|
name: 'WorkflowTaskBomFieldDetail',
|
|
- components: { UploadFile, UploadImg, ImgView },
|
|
|
|
|
|
+ components: { UploadFile, UploadImg, ImgView, JsPlumb, Node },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ current: '1',
|
|
colors: {
|
|
colors: {
|
|
1: '#666',
|
|
1: '#666',
|
|
2: '#1890ff',
|
|
2: '#1890ff',
|
|
@@ -98,6 +113,7 @@ export default {
|
|
model: {},
|
|
model: {},
|
|
detail: {},
|
|
detail: {},
|
|
descriptions: [],
|
|
descriptions: [],
|
|
|
|
+ nodes: [],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -109,10 +125,12 @@ export default {
|
|
return arr.find((item) => item.value === key).label
|
|
return arr.find((item) => item.value === key).label
|
|
},
|
|
},
|
|
base(record) {
|
|
base(record) {
|
|
|
|
+ this.current = '1'
|
|
this.visible = true
|
|
this.visible = true
|
|
this.modalTitle = '详情'
|
|
this.modalTitle = '详情'
|
|
this.model = record
|
|
this.model = record
|
|
this.detail = JSON.parse(record.data.jsonString)
|
|
this.detail = JSON.parse(record.data.jsonString)
|
|
|
|
+ this.nodes = JSON.parse(record.flowJson)
|
|
this.descriptions = JSON.parse(record.data.formJsonString).components
|
|
this.descriptions = JSON.parse(record.data.formJsonString).components
|
|
const {
|
|
const {
|
|
form: { setFieldsValue },
|
|
form: { setFieldsValue },
|
|
@@ -151,6 +169,13 @@ export default {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ callback(val) {
|
|
|
|
+ if (val == 2) {
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.$refs.JsPlumb.init()
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
handleCancel() {
|
|
handleCancel() {
|
|
this.visible = false
|
|
this.visible = false
|
|
this.confirmLoading = false
|
|
this.confirmLoading = false
|
|
@@ -184,4 +209,16 @@ export default {
|
|
background-color: #c1c1c1;
|
|
background-color: #c1c1c1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.btn {
|
|
|
|
+ position: fixed;
|
|
|
|
+ bottom: 100px;
|
|
|
|
+ left: 50%;
|
|
|
|
+ transform: translateX(50%);
|
|
|
|
+ z-index: 999;
|
|
|
|
+}
|
|
|
|
+</style>
|
|
|
|
+<style lang="less">
|
|
|
|
+.ant-descriptions-item-label {
|
|
|
|
+ color: #000;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|