1b733332 by lxs Committed by lihua

数据定价更新

1 parent 0acd4578
...@@ -274,10 +274,8 @@ const getDetail = () => { ...@@ -274,10 +274,8 @@ const getDetail = () => {
274 typeMap.value.modelGuid.unshift(mtem); 274 typeMap.value.modelGuid.unshift(mtem);
275 baseConfigFormItems.value[0].options.unshift(mtem); 275 baseConfigFormItems.value[0].options.unshift(mtem);
276 }; 276 };
277 setTimeout(() => {
278 getModelInfo(flowDetail.value.modelGuid); 277 getModelInfo(flowDetail.value.modelGuid);
279 getDataTypeList() 278 getDataTypeList()
280 }, 200)
281 } 279 }
282 }).catch(() => { 280 }).catch(() => {
283 loading.value = false; 281 loading.value = false;
...@@ -374,7 +372,8 @@ const setBuildInFormItems = (buildList) => { ...@@ -374,7 +372,8 @@ const setBuildInFormItems = (buildList) => {
374 buildInData.value.push({ 372 buildInData.value.push({
375 guid: b.guid, 373 guid: b.guid,
376 targetName: buildName, 374 targetName: buildName,
377 targetValue: b.defaultValue || '' 375 targetValue: b.defaultValue || '',
376 isInputParameter: b.isInputParameter,
378 }) 377 })
379 baseConfigFormItems.value.push({ 378 baseConfigFormItems.value.push({
380 label: buildName, 379 label: buildName,
...@@ -385,7 +384,8 @@ const setBuildInFormItems = (buildList) => { ...@@ -385,7 +384,8 @@ const setBuildInFormItems = (buildList) => {
385 inputType: 'moneyNumber', 384 inputType: 'moneyNumber',
386 maxlength: 18, 385 maxlength: 18,
387 clearable: true, 386 clearable: true,
388 disabled: b.isInputParameter != 'Y' 387 disabled: b.isInputParameter != 'Y',
388 required: true
389 }); 389 });
390 baseConfigFormRules.value[buildField] = [ 390 baseConfigFormRules.value[buildField] = [
391 { required: true, message: `请填写${buildName}`, trigger: 'blur' }, 391 { required: true, message: `请填写${buildName}`, trigger: 'blur' },
...@@ -863,9 +863,15 @@ const getCalculateParams = (baseConfigFormObj, baseConfigFormInfo) => { ...@@ -863,9 +863,15 @@ const getCalculateParams = (baseConfigFormObj, baseConfigFormInfo) => {
863 } 863 }
864 } 864 }
865 buildInData.value.map(item => { 865 buildInData.value.map(item => {
866 let targetValue = baseConfigFormInfo[`build_${item.guid}`];
867 if(typeof targetValue === 'string'){
868 if(/^[+-]?\d{1,3}(,\d{3})*(\.\d{2})?$/.test(targetValue)){
869 targetValue = parseFloat(targetValue.replace(/,/g, ''))
870 }
871 }
866 builtInTarget.push({ 872 builtInTarget.push({
867 ...item, 873 ...item,
868 targetValue: baseConfigFormInfo[`build_${item.guid}`], 874 targetValue
869 }) 875 })
870 }) 876 })
871 params.dictionaryJson = Object.keys(dictionaryJson).length ? JSON.stringify(dictionaryJson) : ''; 877 params.dictionaryJson = Object.keys(dictionaryJson).length ? JSON.stringify(dictionaryJson) : '';
...@@ -1061,7 +1067,6 @@ onBeforeMount(() => { ...@@ -1061,7 +1067,6 @@ onBeforeMount(() => {
1061 } 1067 }
1062 }) 1068 })
1063 onMounted(() => { 1069 onMounted(() => {
1064 getModel()
1065 }) 1070 })
1066 </script> 1071 </script>
1067 <template> 1072 <template>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!