|
@@ -186,7 +186,6 @@ const config = computed(() => {
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "图片",
|
|
|
- prop: "unit",
|
|
|
slot: "pic",
|
|
|
},
|
|
|
},
|
|
@@ -195,6 +194,9 @@ const config = computed(() => {
|
|
|
label: "单位",
|
|
|
prop: "unit",
|
|
|
},
|
|
|
+ render(unit) {
|
|
|
+ return proxy.dictValueLabel(unit, productUnit.value);
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
@@ -508,8 +510,9 @@ const handleClickFile = (file) => {
|
|
|
};
|
|
|
|
|
|
const productType = ref([]);
|
|
|
+const productUnit = ref([]);
|
|
|
const getDict = () => {
|
|
|
- proxy.getDictOne(["product_type"]).then((res) => {
|
|
|
+ proxy.getDictOne(["product_type", "unit"]).then((res) => {
|
|
|
productType.value = res["product_type"];
|
|
|
formConfig.value[1].data = productType.value.map((x) => ({
|
|
|
label: x.dictValue,
|
|
@@ -519,6 +522,10 @@ const getDict = () => {
|
|
|
label: x.dictValue,
|
|
|
value: x.dictKey,
|
|
|
}));
|
|
|
+ productUnit.value = res["unit"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
});
|
|
|
};
|
|
|
getDict();
|