cb6cb6e0 by lxs

数据定价模型配置更新

1 parent 49eaced9
...@@ -551,16 +551,16 @@ const setTableField = (data) => { ...@@ -551,16 +551,16 @@ const setTableField = (data) => {
551 tableData.value = []; 551 tableData.value = [];
552 const dictionaryName = typeMap.value['dictionaryType'].find(item => item.value == dictionaryType.value)?.label || ''; 552 const dictionaryName = typeMap.value['dictionaryType'].find(item => item.value == dictionaryType.value)?.label || '';
553 const dictionaryJson = dictionaryName && dictionaryName == currTableData.value.dictionaryName ? (currTableData.value.dictionaryJson || []) : []; 553 const dictionaryJson = dictionaryName && dictionaryName == currTableData.value.dictionaryName ? (currTableData.value.dictionaryJson || []) : [];
554 if (dictionaryType.value == '1') { 554 // if (dictionaryType.value == '1') {
555 const tData = JSON.parse(JSON.stringify(mergeTableData)); 555 // const tData = JSON.parse(JSON.stringify(mergeTableData));
556 if (dictionaryJson.length) { 556 // if (dictionaryJson.length) {
557 tData.map((item, i) => { 557 // tData.map((item, i) => {
558 item.factor = dictionaryJson[i]?.value || ''; 558 // item.factor = dictionaryJson[i]?.value || '';
559 }) 559 // })
560 } 560 // }
561 tableData.value = tData; 561 // tableData.value = tData;
562 getMergeRow(); 562 // getMergeRow();
563 } else { 563 // } else {
564 if (dictionaryJson.length) { 564 if (dictionaryJson.length) {
565 dictionaryJson.map(item => { 565 dictionaryJson.map(item => {
566 tableData.value.push({ 566 tableData.value.push({
...@@ -576,7 +576,7 @@ const setTableField = (data) => { ...@@ -576,7 +576,7 @@ const setTableField = (data) => {
576 }) 576 })
577 }) 577 })
578 } 578 }
579 } 579 // }
580 } 580 }
581 581
582 const getDictionaryRuleData = () => { 582 const getDictionaryRuleData = () => {
...@@ -1112,11 +1112,12 @@ const drawerBtnClick = async (btn, info) => { ...@@ -1112,11 +1112,12 @@ const drawerBtnClick = async (btn, info) => {
1112 if (dictionaryType.value && !d.factor) { 1112 if (dictionaryType.value && !d.factor) {
1113 factorFull = false; 1113 factorFull = false;
1114 } 1114 }
1115 if (dictionaryType.value == '1') { 1115 // if (dictionaryType.value == '1') {
1116 return { name: `${d.level}${d.grade}`, value: d.factor || '' } 1116 // return { name: `${d.level}${d.grade}`, value: d.factor || '' }
1117 } else { 1117 // } else {
1118 return { name: `${d.label}`, value: d.factor || '' } 1118 // return { name: `${d.label}`, value: d.factor || '' }
1119 } 1119 // }
1120 return { name: `${d.label}`, value: d.factor || '' }
1120 }) 1121 })
1121 if (dictionaryType.value && !factorFull) { 1122 if (dictionaryType.value && !factorFull) {
1122 ElMessage({ 1123 ElMessage({
...@@ -1144,11 +1145,12 @@ const drawerBtnClick = async (btn, info) => { ...@@ -1144,11 +1145,12 @@ const drawerBtnClick = async (btn, info) => {
1144 if (dictionaryType.value && !d.factor) { 1145 if (dictionaryType.value && !d.factor) {
1145 factorFull = false; 1146 factorFull = false;
1146 } 1147 }
1147 if (dictionaryType.value == '1') { 1148 // if (dictionaryType.value == '1') {
1148 return { name: `${d.level}${d.grade}`, value: d.factor || '' } 1149 // return { name: `${d.level}${d.grade}`, value: d.factor || '' }
1149 } else { 1150 // } else {
1150 return { name: `${d.label}`, value: d.factor || '' } 1151 // return { name: `${d.label}`, value: d.factor || '' }
1151 } 1152 // }
1153 return { name: `${d.label}`, value: d.factor || '' }
1152 }) 1154 })
1153 if (dictionaryType.value && !factorFull) { 1155 if (dictionaryType.value && !factorFull) {
1154 ElMessage({ 1156 ElMessage({
...@@ -1262,7 +1264,7 @@ onMounted(() => { ...@@ -1262,7 +1264,7 @@ onMounted(() => {
1262 <template v-if="showFactorTable"> 1264 <template v-if="showFactorTable">
1263 <span class="required_mark" style="line-height: 21px;">字典值对应因子</span> 1265 <span class="required_mark" style="line-height: 21px;">字典值对应因子</span>
1264 <div class="table_panel"> 1266 <div class="table_panel">
1265 <el-table border :data="tableData" :span-method="tableSpanMethod" tooltip-effect="light" style="height: 100%;" 1267 <!-- <el-table border :data="tableData" :span-method="tableSpanMethod" tooltip-effect="light" style="height: 100%;"
1266 v-if="dictionaryType == '1'"> 1268 v-if="dictionaryType == '1'">
1267 <el-table-column label="医院等级"> 1269 <el-table-column label="医院等级">
1268 <el-table-column prop="level" label="级别" width="100" /> 1270 <el-table-column prop="level" label="级别" width="100" />
...@@ -1285,6 +1287,16 @@ onMounted(() => { ...@@ -1285,6 +1287,16 @@ onMounted(() => {
1285 @input="(val) => inputEventChange(val, scope, 'factor')" /> 1287 @input="(val) => inputEventChange(val, scope, 'factor')" />
1286 </template> 1288 </template>
1287 </el-table-column> 1289 </el-table-column>
1290 </el-table> -->
1291 <el-table border :data="tableData" tooltip-effect="light" style="height: 100%;">
1292 <el-table-column label="字典名称" prop="label" width="140" />
1293 <el-table-column prop="factor" label="因子" class-name="edit-col">
1294 <template #default="scope">
1295 <el-input v-model="scope.row.factor" placeholder="请输入"
1296 @change="(val) => inputChange(val, scope, 'factor')"
1297 @input="(val) => inputEventChange(val, scope, 'factor')" />
1298 </template>
1299 </el-table-column>
1288 </el-table> 1300 </el-table>
1289 </div> 1301 </div>
1290 </template> 1302 </template>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!