8430258c by lxs

数据定价更新

1 parent 13425963
......@@ -57,7 +57,7 @@ const dataUsage = ref({
field: '',
dictValue: ''
});
const currModelGuid = ref('');
// 基础设置
const baseConfigFormRef = ref();
......@@ -146,7 +146,7 @@ const dataTransactionPrice: any = ref('');
const setFormItems = (info = null) => {
let datas: any = info || flowDetail.value || {};
const dictData = datas.dictionaryJson ? JSON.parse(datas.dictionaryJson) : {};
const builtIndicators = datas.builtIndicators || [];
const builtIndicators = datas.builtIndicators || buildInData.value || [];
let buildData = {};
builtIndicators.map(item => {
buildData[`build_${item.guid}`] = item.targetValue;
......@@ -267,6 +267,7 @@ const getDetail = () => {
flowDetail.value = data;
dataTransactionPrice.value = flowDetail.value.dataTransactionPrice;
dataUsage.value.dictValue = data.dataUsage || '';
currModelGuid.value = flowDetail.value.modelGuid;
const mItem = typeMap.value.modelGuid.find(m => m.guid == flowDetail.value.modelGuid);
if (!mItem) {
const mtem = { guid: flowDetail.value.modelGuid, modelName: flowDetail.value.modelName };
......@@ -373,13 +374,14 @@ const setBuildInFormItems = (buildList) => {
buildInData.value.push({
guid: b.guid,
targetName: buildName,
targetValue: b.defaultValue || ''
})
baseConfigFormItems.value.push({
label: buildName,
type: 'input',
placeholder: '',
field: buildField,
default: changeNum(b.defaultValue, 2),
default: guid ? '' : changeNum(b.defaultValue, 2),
inputType: 'moneyNumber',
maxlength: 18,
clearable: true,
......@@ -695,7 +697,9 @@ const setTableRowData = (dGuid, rIndex) => {
t.damFieldTable = JSON.parse(JSON.stringify(damFieldOptions));
})
// 匹配
(!guid || (guid && dGuid != rowData.dataTableGuid)) && matchTableFields(rowData, damTableField);
if (!guid || (guid && (dGuid != rowData.dataTableGuid || currModelGuid.value != flowDetail.value.modelGuid))) {
matchTableFields(rowData, damTableField);
}
} else {
proxy.$ElMessage.error(res.msg);
}
......@@ -736,6 +740,7 @@ const selectChange = async (val, row, info) => {
resourceTableFieldAllNum.value = 0;
await setFormItems(info);
val && getModelInfo(val);
currModelGuid.value = val || '';
qualityScoreData.value = {};
baseConfigFormItems.value[1].default = '';
changeDatasource();
......@@ -1150,7 +1155,7 @@ onMounted(() => {
</div>
</div>
</ContentWrap>
<ContentWrap id="contract-content-wrap" title="输出结" expandSwicth style="margin-top: 15px" :isExpand="expand3"
<ContentWrap id="contract-content-wrap" title="输出结" expandSwicth style="margin-top: 15px" :isExpand="expand3"
@expand="(v) => expand3 = v">
<el-form class="result-form">
<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!