|
@@ -6,7 +6,7 @@
|
|
|
<div class="flex-1 overflow-auto pt-3">
|
|
|
<el-table :data="relatedTaskstable" :show-overflow-tooltip="tableShowOverflowTooltip" border
|
|
|
style="width: 100%;height: 100%;">
|
|
|
- <el-table-column v-for="(item, index) in tableColumn" :prop="item.prop" :label="item.label" :key="index"
|
|
|
+ <el-table-column v-for="(item, index) in newTableColumn" :prop="item.prop" :label="item.label" :key="index"
|
|
|
:width="item.width">
|
|
|
<template #default="scope">
|
|
|
<div class="table-text-textnowrap" v-if="item.eventName"
|
|
@@ -23,9 +23,11 @@ import { ref, reactive, onMounted, onUnmounted, defineExpose, inject, watchEffec
|
|
|
import { tableColumn, MOD } from '@/pages/business/api'
|
|
|
import { tableShowOverflowTooltip } from '@/utils/globalVariables'
|
|
|
import router from '@/router';
|
|
|
+import { formatDate } from '@/utils/times';
|
|
|
|
|
|
const relatedTaskstable = ref([])
|
|
|
const information: any = ref({})
|
|
|
+const newTableColumn: any = ref([])
|
|
|
|
|
|
const props = defineProps<{
|
|
|
data: any,
|
|
@@ -34,7 +36,12 @@ const props = defineProps<{
|
|
|
|
|
|
// 接收参数赋值
|
|
|
function receiveAssignment(item: any) {
|
|
|
- relatedTaskstable.value = item.data
|
|
|
+ relatedTaskstable.value = item.data.map((item: any) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ expectedTransactionDate: item.expectedTransactionDate ? formatDate(new Date(item.expectedTransactionDate)) : ''
|
|
|
+ }
|
|
|
+ })
|
|
|
information.value = item.information
|
|
|
}
|
|
|
|
|
@@ -58,6 +65,12 @@ watchEffect(() => {
|
|
|
// 生命周期钩子
|
|
|
onMounted(() => {
|
|
|
receiveAssignment(props)
|
|
|
+ newTableColumn.value = tableColumn.filter((item: any) => {
|
|
|
+ return !['联系人', '负责人'].includes(item.label)
|
|
|
+ })
|
|
|
+ newTableColumn.value.splice(2, 0, {
|
|
|
+ prop: "inchargerName", label: "负责人", width: "180"
|
|
|
+ })
|
|
|
});
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|