|
|
@ -17,8 +17,15 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="securityLevel" label="安全等级" align="center" /> |
|
|
|
<el-table-column prop="sourceSystem" label="来源系统" align="center" /> |
|
|
|
<el-table-column prop="cdNo" label="代码编号" align="center" /> |
|
|
|
<el-table-column label="来源系统" align="center" prop="srcSys"> |
|
|
|
<template #default="scope"> |
|
|
|
<span > |
|
|
|
{{ |
|
|
|
getSrcSysName(scope.row.srcSys) |
|
|
|
}} |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</el-table-column> <el-table-column prop="cdNo" label="代码编号" align="center" /> |
|
|
|
<el-table-column label="变更类型" align="center"> |
|
|
|
<template #default="{ row }"> |
|
|
|
{{ changeTypeMap[row.changeType] || row.changeType }} |
|
|
@ -31,7 +38,7 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" width="100" align="center"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-button @click="handleView(scope.row.id)" size="small" type="primary">查看详情</el-button> |
|
|
|
<el-button @click="handleView(scope.row.onum)" size="small" type="primary">查看详情</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -106,11 +113,11 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item prop="sourceSystem"> |
|
|
|
<el-form-item prop="srcSys"> |
|
|
|
<template #label> |
|
|
|
<span :class="{ 'changed-label': isChanged(formData.sourceSystem) }">来源系统:</span> |
|
|
|
<span :class="{ 'changed-label': isChanged(formData.srcSys) }">来源系统:</span> |
|
|
|
</template> |
|
|
|
<span :class="{ 'changed-value': isChanged(formData.sourceSystem) }">{{ formatValue(formData.sourceSystem) }}</span> |
|
|
|
<span :class="{ 'changed-value': isChanged(formData.srcSys) }">{{ formatSrcValue(formData.srcSys) }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
@ -180,7 +187,10 @@ |
|
|
|
<script setup> |
|
|
|
import { ref, watch } from 'vue'; |
|
|
|
import { listStdMainAppr, getStdMainAppr } from '@/api/datastd/std'; |
|
|
|
import useUserStore from '@/store/modules/user'; // 注意路径是否正确 |
|
|
|
|
|
|
|
const userStore = useUserStore(); // 正确调用 |
|
|
|
const dsSysList = userStore.dsSysList; // 访问属性 |
|
|
|
const props = defineProps({ |
|
|
|
flowId: { |
|
|
|
type: String, |
|
|
@ -192,6 +202,10 @@ const props = defineProps({ |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
const getSrcSysName = (id) => { |
|
|
|
const match = dsSysList.find(item => item.id == id); |
|
|
|
return match ? match.name : id; |
|
|
|
}; |
|
|
|
const isChanged = (val) => typeof val === 'string' && val.includes('==>') |
|
|
|
const formatValue = (val) => { |
|
|
|
if (!val) return '' |
|
|
@ -201,6 +215,18 @@ const formatValue = (val) => { |
|
|
|
} |
|
|
|
return val |
|
|
|
} |
|
|
|
const formatSrcValue = (val) => { |
|
|
|
if (!val) return '' |
|
|
|
if (val) { |
|
|
|
const strVal = val.toString(); |
|
|
|
if(!strVal.includes('==>')){ |
|
|
|
return `${getSrcSysName(strVal).trim()} ` |
|
|
|
} |
|
|
|
const [oldVal, newVal] = strVal.split('==>'); |
|
|
|
return `${getSrcSysName(oldVal).trim()} ==> ${getSrcSysName(newVal)}` |
|
|
|
} |
|
|
|
return val |
|
|
|
} |
|
|
|
const loading = ref(false); |
|
|
|
const tableData = ref([]); |
|
|
|
function tableRowClassName({ row }) { |
|
|
|