BUG修改

This commit is contained in:
a0049873 2022-10-26 14:35:32 +08:00
parent 330f8de5e4
commit 42b7ec1129
3 changed files with 79 additions and 75 deletions

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-11 16:30:04 * @Date: 2022-04-11 16:30:04
* @LastEditors: hisense.liangjunhua * @LastEditors: Light
* @LastEditTime: 2022-07-16 15:07:44 * @LastEditTime: 2022-10-26 11:05:07
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
@ -31,7 +31,7 @@
<!-- 审核意见 --> <!-- 审核意见 -->
<el-table-column prop="comment" :label="$t('process.comment')" header-align="center" align="center"></el-table-column> <el-table-column prop="comment" :label="$t('process.comment')" header-align="center" align="center"></el-table-column>
<!-- 任务时长 --> <!-- 任务时长 -->
<el-table-column prop="durationInSeconds" :label="$t('task.durationInSeconds')" header-align="center" align="center" width="180"></el-table-column> <el-table-column prop="duration" :label="$t('task.durationInSeconds')" header-align="center" align="center" width="180"></el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
v-if="dataForm.pid === '0'" v-if="dataForm.pid === '0'"

View File

@ -1,5 +1,6 @@
<template> <template>
<el-dialog <el-dialog
width="70%"
:destroy-on-close="true" :destroy-on-close="true"
:close-on-click-modal="false" :close-on-click-modal="false"
@close="closeModal" @close="closeModal"
@ -96,7 +97,7 @@
</template> </template>
</template> </template>
</a-table> --> </a-table> -->
<el-table <el-table
:data="dataSource.data[0][1]" :data="dataSource.data[0][1]"
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
@ -104,6 +105,11 @@
label="任务名称" label="任务名称"
width="180"> width="180">
</el-table-column> </el-table-column>
<el-table-column
prop="assigneeDeptName"
label="处理人部门"
width="200">
</el-table-column>
<el-table-column <el-table-column
prop="assigneeName" prop="assigneeName"
label="处理人" label="处理人"
@ -136,132 +142,131 @@
</div> --> </div> -->
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
detailType: { detailType: {
type: String, type: String,
default: "", default: ''
}, },
detailsVisible: { detailsVisible: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
detailParamss: { detailParamss: {
type: Object, type: Object,
default: {}, default: {}
}, }
}, },
watch: { watch: {
detailsVisible: { detailsVisible: {
handler(newVal) { handler (newVal) {
this.detailsVisibleCopy = newVal; this.detailsVisibleCopy = newVal
}, },
immediate: true, immediate: true
}, },
detailParamss: { detailParamss: {
handler(newVal) { handler (newVal) {
this.detailParams = newVal; this.detailParams = newVal
this.getDetail(newVal); this.getDetail(newVal)
}, },
immediate: true, immediate: true
}, }
}, },
data() { data () {
return { return {
detailsVisibleCopy: false, detailsVisibleCopy: false,
columns: [ columns: [
{ {
title: "任务名称", title: '任务名称',
dataIndex: "activityName", dataIndex: 'activityName',
key: "activityName", key: 'activityName'
}, },
{ {
title: "处理人", title: '处理人',
dataIndex: "assigneeName", dataIndex: 'assigneeName',
key: "assigneeName", key: 'assigneeName'
}, },
{ {
title: "任务开始时间", title: '任务开始时间',
dataIndex: "startTime", dataIndex: 'startTime',
key: "startTime", key: 'startTime'
}, },
{ {
title: "任务结束时间", title: '任务结束时间',
dataIndex: "endTime", dataIndex: 'endTime',
key: "endTime", key: 'endTime'
}, },
{ {
title: "审核意见", title: '审核意见',
dataIndex: "comment", dataIndex: 'comment',
key: "comment", key: 'comment'
}, },
{ {
title: "任务时长/秒", title: '任务时长/秒',
dataIndex: "durationInSeconds", dataIndex: 'durationInSeconds',
key: "durationInSeconds", key: 'durationInSeconds'
}, }
], ],
dataSource: [{ data: [] }], dataSource: [{ data: [] }],
showArr: [], showArr: []
}; }
}, },
computed: {}, computed: {},
components: {}, components: {},
methods: { methods: {
getDetail(newVal) { getDetail (newVal) {
if (newVal.resourceApplication) { if (newVal.resourceApplication) {
this.dataSource.data = []; this.dataSource.data = []
if (this.detailType == "能力上架") { if (this.detailType == '能力上架') {
let arr = []; const arr = []
newVal.resourceApplication.forEach((item) => { newVal.resourceApplication.forEach((item) => {
arr.push(item); arr.push(item)
}); })
this.dataSource.data.push([ this.dataSource.data.push([
newVal.resourceApplication.processInstanceId, newVal.resourceApplication.processInstanceId,
arr, arr
]); ])
} else { } else {
for (const key in newVal.resourceApplication) { for (const key in newVal.resourceApplication) {
if (newVal.resourceApplication[key].length > 0) { if (newVal.resourceApplication[key].length > 0) {
newVal.resourceApplication[key].map((item) => { newVal.resourceApplication[key].map((item) => {
this.dataSource.data.push([ this.dataSource.data.push([
item.instanceId, item.instanceId,
item.taskHandleDetailInfo, item.taskHandleDetailInfo
]); ])
}); })
} }
} }
} }
this.showArr.value = []; this.showArr.value = []
for (const key in newVal.resourceApplication) { for (const key in newVal.resourceApplication) {
if (newVal.resourceApplication[key].length > 0) { if (newVal.resourceApplication[key].length > 0) {
let obj = { name: "", instanceId: "", list: [], list2: [] }; const obj = { name: '', instanceId: '', list: [], list2: [] }
obj.name = key; obj.name = key
newVal.resourceApplication[key].map((item) => { newVal.resourceApplication[key].map((item) => {
obj.instanceId = item.instanceId; obj.instanceId = item.instanceId
obj.backToFirst = item.backToFirst; obj.backToFirst = item.backToFirst
obj.ended = item.ended; obj.ended = item.ended
obj.approveStatus = item.approveStatus; obj.approveStatus = item.approveStatus
if (item.resources.length > 0) { if (item.resources.length > 0) {
item.resources.map((val) => { item.resources.map((val) => {
obj.list.push(val); obj.list.push(val)
}); })
} else { } else {
item.camera.map((val) => { item.camera.map((val) => {
obj.list2.push(val); obj.list2.push(val)
}); })
} }
}); })
this.showArr.push(obj); this.showArr.push(obj)
} }
} }
} }
console.log("this.dataSource.data[0]========",this.dataSource.data[0][1]) console.log('this.dataSource.data[0]========', this.dataSource.data[0][1])
}, },
// init () { // init () {
// this.visible = true // this.visible = true
@ -269,11 +274,11 @@ export default {
// this.$refs['dataForm'].resetFields() // this.$refs['dataForm'].resetFields()
// }) // })
// }, // },
closeModal() { closeModal () {
this.$emit("closeModal"); this.$emit('closeModal')
}, }
}, }
}; }
</script> </script>
<style scoped> <style scoped>
.title { .title {
@ -457,4 +462,3 @@ export default {
} }
} }
</style> </style>

View File

@ -4,19 +4,19 @@
<div v-if="!noData" v-loading="loading"> <div v-if="!noData" v-loading="loading">
<div class="no-box"> <div class="no-box">
<div class="no no2"> <div class="no no2">
<el-tooltip effect="dark" :content="no2Obj.name" placement="top"> <el-tooltip effect="dark" :content="no2Obj.name" placement="top" v-if="no2Obj.name">
<div class="name ellipsis" :style="{ color: colorObj[2] }">{{ no2Obj.name || '--' }}</div> <div class="name ellipsis" :style="{ color: colorObj[2] }">{{ no2Obj.name || '--' }}</div>
</el-tooltip> </el-tooltip>
<div class="count">{{ formatCount(no2Obj.count) }}</div> <div class="count">{{ formatCount(no2Obj.count) }}</div>
</div> </div>
<div class="no no1"> <div class="no no1">
<el-tooltip effect="dark" :content="no1Obj.name" placement="top"> <el-tooltip effect="dark" :content="no1Obj.name" placement="top" v-if="no1Obj.name">
<div class="name ellipsis" :style="{ color: colorObj[1] }">{{ no1Obj.name || '--' }}</div> <div class="name ellipsis" :style="{ color: colorObj[1] }">{{ no1Obj.name || '--' }}</div>
</el-tooltip> </el-tooltip>
<div class="count">{{ formatCount(no1Obj.count) }}</div> <div class="count">{{ formatCount(no1Obj.count) }}</div>
</div> </div>
<div class="no no3"> <div class="no no3">
<el-tooltip effect="dark" :content="no3Obj.name" placement="top"> <el-tooltip effect="dark" :content="no3Obj.name" placement="top" v-if="no3Obj.name">
<div class="name ellipsis" :style="{ color: colorObj[3] }">{{ no3Obj.name || '--' }}</div> <div class="name ellipsis" :style="{ color: colorObj[3] }">{{ no3Obj.name || '--' }}</div>
</el-tooltip> </el-tooltip>
@ -26,7 +26,7 @@
<div class="flex-row-between row-name" v-for="(data, i) in listInfo" :key="i"> <div class="flex-row-between row-name" v-for="(data, i) in listInfo" :key="i">
<div class="left"> <div class="left">
<div class="row-index">{{ i + 4 }}</div> <div class="row-index">{{ i + 4 }}</div>
<el-tooltip effect="dark" :content="data.name" placement="top"> <el-tooltip effect="dark" :content="data.name" placement="top" v-if="data.name">
<div class="name-text ellipsis">{{ data.name || '--' }}</div> <div class="name-text ellipsis">{{ data.name || '--' }}</div>
</el-tooltip> </el-tooltip>
</div> </div>