4f0a6382 by lihua

不需要支持手动输入新建数据产品

1 parent 6b92181e
......@@ -116,7 +116,7 @@ const baseInfoFormItems = ref([
default: '',
required: true,
options: catalogProductList.value,
allowCreate: true,
// allowCreate: true,不需要支持输入
filterable: true,
props: {
value: 'productId',
......@@ -237,7 +237,7 @@ const baseInfoFormItems = ref([
options: route.query.dataSources == '1' ? [{ //如果是授权数据则不能选择其余的
value: 1,
label: '授权数据',
}]: [{
}] : [{
value: 2,
label: '自有数据',
},
......@@ -571,15 +571,14 @@ onBeforeMount(() => {
baseInfoFormItems.value.forEach((item: any) => {
item.default = detailInfo.value[item.field] == null ? '' : detailInfo.value[item.field];
if (item.field == 'damName') {
item.default = item.productCode;
if (detailInfo.value?.productCode) {
let item = catalogProductList.value.find(c => c.productId == detailInfo.value?.productCode);
if (!item) {
item.default = detailInfo.value.damName;
} else {
item.default = item.productCode;
}
} else {
item.default = detailInfo.value.damName;
!item && catalogProductList.value.push({
productId: detailInfo.value?.productCode,
productName: detailInfo.value?.damName,
description: detailInfo.value.propertyDescription
});
}
}
if (item.field == 'subjectDomain') {
......@@ -675,9 +674,11 @@ onBeforeMount(() => {
baseInfoFormItems.value[0].options = catalogProductList.value;
if (detailInfo.value?.productCode) {
let item = catalogProductList.value.find(c => c.productId == detailInfo.value?.productCode);
if (!item) {
baseInfoFormItems.value[0].default = detailInfo.value.damName;
}
!item && catalogProductList.value.push({
productId: detailInfo.value?.productCode,
productName: detailInfo.value?.damName,
description: detailInfo.value?.propertyDescription
});
}
} else {
proxy.$ElMessage.error(res.msg);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!