eb35ff0a by lxs

数据定价更新

1 parent 0714c60b
...@@ -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,
...@@ -694,8 +696,9 @@ const setTableRowData = (dGuid, rIndex) => { ...@@ -694,8 +696,9 @@ const setTableRowData = (dGuid, rIndex) => {
694 t.damFieldTable = JSON.parse(JSON.stringify(damFieldOptions)); 696 t.damFieldTable = JSON.parse(JSON.stringify(damFieldOptions));
695 }) 697 })
696 // 匹配 698 // 匹配
697 (!guid || (guid && dGuid != rowData.dataTableGuid)) && matchTableFields(rowData, damTableField); 699 if (!guid || (guid && (dGuid != rowData.dataTableGuid || currModelGuid.value != flowDetail.value.modelGuid))) {
698 // console.log('rowData', rowData) 700 matchTableFields(rowData, damTableField);
701 }
699 } else { 702 } else {
700 proxy.$ElMessage.error(res.msg); 703 proxy.$ElMessage.error(res.msg);
701 } 704 }
...@@ -736,6 +739,7 @@ const selectChange = async (val, row, info) => { ...@@ -736,6 +739,7 @@ const selectChange = async (val, row, info) => {
736 resourceTableFieldAllNum.value = 0; 739 resourceTableFieldAllNum.value = 0;
737 await setFormItems(info); 740 await setFormItems(info);
738 val && getModelInfo(val); 741 val && getModelInfo(val);
742 currModelGuid.value = val || '';
739 qualityScoreData.value = {}; 743 qualityScoreData.value = {};
740 baseConfigFormItems.value[1].default = ''; 744 baseConfigFormItems.value[1].default = '';
741 changeDatasource(); 745 changeDatasource();
...@@ -1150,7 +1154,7 @@ onMounted(() => { ...@@ -1150,7 +1154,7 @@ onMounted(() => {
1150 </div> 1154 </div>
1151 </div> 1155 </div>
1152 </ContentWrap> 1156 </ContentWrap>
1153 <ContentWrap id="contract-content-wrap" title="输出结" expandSwicth style="margin-top: 15px" :isExpand="expand3" 1157 <ContentWrap id="contract-content-wrap" title="输出结" expandSwicth style="margin-top: 15px" :isExpand="expand3"
1154 @expand="(v) => expand3 = v"> 1158 @expand="(v) => expand3 = v">
1155 <el-form class="result-form"> 1159 <el-form class="result-form">
1156 <el-form-item class="flex-column" label="数据交易价格(元)"> 1160 <el-form-item class="flex-column" label="数据交易价格(元)">
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!