|
@@ -195,6 +195,9 @@ const config = computed(() => {
|
|
label: "单位",
|
|
label: "单位",
|
|
prop: "unit",
|
|
prop: "unit",
|
|
},
|
|
},
|
|
|
|
+ render(unit) {
|
|
|
|
+ return proxy.dictValueLabel(unit, productUnit.value);
|
|
|
|
+ },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
attrs: {
|
|
attrs: {
|
|
@@ -532,8 +535,9 @@ const handleClickFile = (file) => {
|
|
window.open(file.fileUrl, "_blank");
|
|
window.open(file.fileUrl, "_blank");
|
|
};
|
|
};
|
|
const productType = ref([]);
|
|
const productType = ref([]);
|
|
|
|
+const productUnit = ref([]);
|
|
const getDict = () => {
|
|
const getDict = () => {
|
|
- proxy.getDictOne(["product_type"]).then((res) => {
|
|
|
|
|
|
+ proxy.getDictOne(["product_type", "unit"]).then((res) => {
|
|
productType.value = res["product_type"];
|
|
productType.value = res["product_type"];
|
|
formConfig.value[1].data = productType.value.map((x) => ({
|
|
formConfig.value[1].data = productType.value.map((x) => ({
|
|
label: x.dictValue,
|
|
label: x.dictValue,
|
|
@@ -543,6 +547,10 @@ const getDict = () => {
|
|
label: x.dictValue,
|
|
label: x.dictValue,
|
|
value: x.dictKey,
|
|
value: x.dictKey,
|
|
}));
|
|
}));
|
|
|
|
+ productUnit.value = res["unit"].map((x) => ({
|
|
|
|
+ label: x.dictValue,
|
|
|
|
+ value: x.dictKey,
|
|
|
|
+ }));
|
|
});
|
|
});
|
|
};
|
|
};
|
|
getDict();
|
|
getDict();
|