数据定价更新
Showing
1 changed file
with
8 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, |
| ... | @@ -698,8 +700,9 @@ const setTableRowData = (dGuid, rIndex, setRow = true) => { | ... | @@ -698,8 +700,9 @@ const setTableRowData = (dGuid, rIndex, setRow = true) => { |
| 698 | t.damFieldTable = JSON.parse(JSON.stringify(damFieldOptions)); | 700 | t.damFieldTable = JSON.parse(JSON.stringify(damFieldOptions)); |
| 699 | }) | 701 | }) |
| 700 | // 匹配 | 702 | // 匹配 |
| 701 | (!guid || (guid && dGuid != rowData.dataTableGuid)) && matchTableFields(rowData, damTableField); | 703 | if (!guid || (guid && (dGuid != rowData.dataTableGuid || currModelGuid.value != flowDetail.value.modelGuid))) { |
| 702 | // console.log('rowData', rowData) | 704 | matchTableFields(rowData, damTableField); |
| 705 | } | ||
| 703 | } else { | 706 | } else { |
| 704 | proxy.$ElMessage.error(res.msg); | 707 | proxy.$ElMessage.error(res.msg); |
| 705 | } | 708 | } | ... | ... |
-
Please register or sign in to post a comment