9891cb99 by lxs

数据定价模型配置更新

1 parent 7d01ada7
......@@ -551,16 +551,16 @@ const setTableField = (data) => {
tableData.value = [];
const dictionaryName = typeMap.value['dictionaryType'].find(item => item.value == dictionaryType.value)?.label || '';
const dictionaryJson = dictionaryName && dictionaryName == currTableData.value.dictionaryName ? (currTableData.value.dictionaryJson || []) : [];
if (dictionaryType.value == '1') {
const tData = JSON.parse(JSON.stringify(mergeTableData));
if (dictionaryJson.length) {
tData.map((item, i) => {
item.factor = dictionaryJson[i]?.value || '';
})
}
tableData.value = tData;
getMergeRow();
} else {
// if (dictionaryType.value == '1') {
// const tData = JSON.parse(JSON.stringify(mergeTableData));
// if (dictionaryJson.length) {
// tData.map((item, i) => {
// item.factor = dictionaryJson[i]?.value || '';
// })
// }
// tableData.value = tData;
// getMergeRow();
// } else {
if (dictionaryJson.length) {
dictionaryJson.map(item => {
tableData.value.push({
......@@ -576,7 +576,7 @@ const setTableField = (data) => {
})
})
}
}
// }
}
const getDictionaryRuleData = () => {
......@@ -1112,11 +1112,12 @@ const drawerBtnClick = async (btn, info) => {
if (dictionaryType.value && !d.factor) {
factorFull = false;
}
if (dictionaryType.value == '1') {
return { name: `${d.level}${d.grade}`, value: d.factor || '' }
} else {
// if (dictionaryType.value == '1') {
// return { name: `${d.level}${d.grade}`, value: d.factor || '' }
// } else {
// return { name: `${d.label}`, value: d.factor || '' }
// }
return { name: `${d.label}`, value: d.factor || '' }
}
})
if (dictionaryType.value && !factorFull) {
ElMessage({
......@@ -1144,11 +1145,12 @@ const drawerBtnClick = async (btn, info) => {
if (dictionaryType.value && !d.factor) {
factorFull = false;
}
if (dictionaryType.value == '1') {
return { name: `${d.level}${d.grade}`, value: d.factor || '' }
} else {
// if (dictionaryType.value == '1') {
// return { name: `${d.level}${d.grade}`, value: d.factor || '' }
// } else {
// return { name: `${d.label}`, value: d.factor || '' }
// }
return { name: `${d.label}`, value: d.factor || '' }
}
})
if (dictionaryType.value && !factorFull) {
ElMessage({
......@@ -1262,7 +1264,7 @@ onMounted(() => {
<template v-if="showFactorTable">
<span class="required_mark" style="line-height: 21px;">字典值对应因子</span>
<div class="table_panel">
<el-table border :data="tableData" :span-method="tableSpanMethod" tooltip-effect="light" style="height: 100%;"
<!-- <el-table border :data="tableData" :span-method="tableSpanMethod" tooltip-effect="light" style="height: 100%;"
v-if="dictionaryType == '1'">
<el-table-column label="医院等级">
<el-table-column prop="level" label="级别" width="100" />
......@@ -1285,6 +1287,16 @@ onMounted(() => {
@input="(val) => inputEventChange(val, scope, 'factor')" />
</template>
</el-table-column>
</el-table> -->
<el-table border :data="tableData" tooltip-effect="light" style="height: 100%;">
<el-table-column label="字典名称" prop="label" width="140" />
<el-table-column prop="factor" label="因子" class-name="edit-col">
<template #default="scope">
<el-input v-model="scope.row.factor" placeholder="请输入"
@change="(val) => inputChange(val, scope, 'factor')"
@input="(val) => inputEventChange(val, scope, 'factor')" />
</template>
</el-table-column>
</el-table>
</div>
</template>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!