数据定价更新
Showing
1 changed file
with
10 additions
and
5 deletions
| ... | @@ -57,7 +57,7 @@ const dataUsage = ref({ | ... | @@ -57,7 +57,7 @@ const dataUsage = ref({ |
| 57 | field: '', | 57 | field: '', |
| 58 | dictValue: '' | 58 | dictValue: '' |
| 59 | }); | 59 | }); |
| 60 | 60 | const currModelGuid = ref(''); | |
| 61 | 61 | ||
| 62 | // 基础设置 | 62 | // 基础设置 |
| 63 | const baseConfigFormRef = ref(); | 63 | const baseConfigFormRef = ref(); |
| ... | @@ -146,7 +146,7 @@ const dataTransactionPrice: any = ref(''); | ... | @@ -146,7 +146,7 @@ const dataTransactionPrice: any = ref(''); |
| 146 | const setFormItems = (info = null) => { | 146 | const setFormItems = (info = null) => { |
| 147 | let datas: any = info || flowDetail.value || {}; | 147 | let datas: any = info || flowDetail.value || {}; |
| 148 | const dictData = datas.dictionaryJson ? JSON.parse(datas.dictionaryJson) : {}; | 148 | const dictData = datas.dictionaryJson ? JSON.parse(datas.dictionaryJson) : {}; |
| 149 | const builtIndicators = datas.builtIndicators || []; | 149 | const builtIndicators = datas.builtIndicators || buildInData.value || []; |
| 150 | let buildData = {}; | 150 | let buildData = {}; |
| 151 | builtIndicators.map(item => { | 151 | builtIndicators.map(item => { |
| 152 | buildData[`build_${item.guid}`] = item.targetValue; | 152 | buildData[`build_${item.guid}`] = item.targetValue; |
| ... | @@ -267,6 +267,7 @@ const getDetail = () => { | ... | @@ -267,6 +267,7 @@ const getDetail = () => { |
| 267 | flowDetail.value = data; | 267 | flowDetail.value = data; |
| 268 | dataTransactionPrice.value = flowDetail.value.dataTransactionPrice; | 268 | dataTransactionPrice.value = flowDetail.value.dataTransactionPrice; |
| 269 | dataUsage.value.dictValue = data.dataUsage || ''; | 269 | dataUsage.value.dictValue = data.dataUsage || ''; |
| 270 | currModelGuid.value = flowDetail.value.modelGuid; | ||
| 270 | const mItem = typeMap.value.modelGuid.find(m => m.guid == flowDetail.value.modelGuid); | 271 | const mItem = typeMap.value.modelGuid.find(m => m.guid == flowDetail.value.modelGuid); |
| 271 | if (!mItem) { | 272 | if (!mItem) { |
| 272 | const mtem = { guid: flowDetail.value.modelGuid, modelName: flowDetail.value.modelName }; | 273 | const mtem = { guid: flowDetail.value.modelGuid, modelName: flowDetail.value.modelName }; |
| ... | @@ -373,13 +374,14 @@ const setBuildInFormItems = (buildList) => { | ... | @@ -373,13 +374,14 @@ const setBuildInFormItems = (buildList) => { |
| 373 | buildInData.value.push({ | 374 | buildInData.value.push({ |
| 374 | guid: b.guid, | 375 | guid: b.guid, |
| 375 | targetName: buildName, | 376 | targetName: buildName, |
| 377 | targetValue: b.defaultValue || '' | ||
| 376 | }) | 378 | }) |
| 377 | baseConfigFormItems.value.push({ | 379 | baseConfigFormItems.value.push({ |
| 378 | label: buildName, | 380 | label: buildName, |
| 379 | type: 'input', | 381 | type: 'input', |
| 380 | placeholder: '', | 382 | placeholder: '', |
| 381 | field: buildField, | 383 | field: buildField, |
| 382 | default: changeNum(b.defaultValue, 2), | 384 | default: guid ? '' : changeNum(b.defaultValue, 2), |
| 383 | inputType: 'moneyNumber', | 385 | inputType: 'moneyNumber', |
| 384 | maxlength: 18, | 386 | maxlength: 18, |
| 385 | clearable: true, | 387 | clearable: true, |
| ... | @@ -695,7 +697,9 @@ const setTableRowData = (dGuid, rIndex) => { | ... | @@ -695,7 +697,9 @@ const setTableRowData = (dGuid, rIndex) => { |
| 695 | t.damFieldTable = JSON.parse(JSON.stringify(damFieldOptions)); | 697 | t.damFieldTable = JSON.parse(JSON.stringify(damFieldOptions)); |
| 696 | }) | 698 | }) |
| 697 | // 匹配 | 699 | // 匹配 |
| 698 | (!guid || (guid && dGuid != rowData.dataTableGuid)) && matchTableFields(rowData, damTableField); | 700 | if (!guid || (guid && (dGuid != rowData.dataTableGuid || currModelGuid.value != flowDetail.value.modelGuid))) { |
| 701 | matchTableFields(rowData, damTableField); | ||
| 702 | } | ||
| 699 | } else { | 703 | } else { |
| 700 | proxy.$ElMessage.error(res.msg); | 704 | proxy.$ElMessage.error(res.msg); |
| 701 | } | 705 | } |
| ... | @@ -736,6 +740,7 @@ const selectChange = async (val, row, info) => { | ... | @@ -736,6 +740,7 @@ const selectChange = async (val, row, info) => { |
| 736 | resourceTableFieldAllNum.value = 0; | 740 | resourceTableFieldAllNum.value = 0; |
| 737 | await setFormItems(info); | 741 | await setFormItems(info); |
| 738 | val && getModelInfo(val); | 742 | val && getModelInfo(val); |
| 743 | currModelGuid.value = val || ''; | ||
| 739 | qualityScoreData.value = {}; | 744 | qualityScoreData.value = {}; |
| 740 | baseConfigFormItems.value[1].default = ''; | 745 | baseConfigFormItems.value[1].default = ''; |
| 741 | changeDatasource(); | 746 | changeDatasource(); |
| ... | @@ -1150,7 +1155,7 @@ onMounted(() => { | ... | @@ -1150,7 +1155,7 @@ onMounted(() => { |
| 1150 | </div> | 1155 | </div> |
| 1151 | </div> | 1156 | </div> |
| 1152 | </ContentWrap> | 1157 | </ContentWrap> |
| 1153 | <ContentWrap id="contract-content-wrap" title="输出结构" expandSwicth style="margin-top: 15px" :isExpand="expand3" | 1158 | <ContentWrap id="contract-content-wrap" title="输出结果" expandSwicth style="margin-top: 15px" :isExpand="expand3" |
| 1154 | @expand="(v) => expand3 = v"> | 1159 | @expand="(v) => expand3 = v"> |
| 1155 | <el-form class="result-form"> | 1160 | <el-form class="result-form"> |
| 1156 | <el-form-item class="flex-column" label="数据交易价格(元)"> | 1161 | <el-form-item class="flex-column" label="数据交易价格(元)"> | ... | ... |
-
Please register or sign in to post a comment