|
@@ -394,6 +394,9 @@ const config = computed(() => {
|
|
|
label: "单位",
|
|
|
prop: "unit",
|
|
|
},
|
|
|
+ render(unit) {
|
|
|
+ return proxy.dictDataEcho(unit, productUnit.value);
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
@@ -564,16 +567,10 @@ const formConfig = computed(() => {
|
|
|
prop: "unit",
|
|
|
label: "单位",
|
|
|
required: true,
|
|
|
- data: [
|
|
|
- {
|
|
|
- label: "个",
|
|
|
- id: "个",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "双",
|
|
|
- id: "双",
|
|
|
- },
|
|
|
- ],
|
|
|
+ data: productUnit.value.map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ })),
|
|
|
},
|
|
|
{
|
|
|
type: "slot",
|
|
@@ -840,7 +837,7 @@ const getDtl = (row) => {
|
|
|
};
|
|
|
getTreeList();
|
|
|
getDept();
|
|
|
-
|
|
|
+// getDict()
|
|
|
getList();
|
|
|
const handleBeforeUpload = async (file) => {
|
|
|
const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
|
|
@@ -956,6 +953,14 @@ const submitMove = () => {
|
|
|
moveDept.value = false;
|
|
|
});
|
|
|
};
|
|
|
+
|
|
|
+const productUnit = ref([]);
|
|
|
+const getDict = () => {
|
|
|
+ proxy.getDict(["unit"]).then((res) => {
|
|
|
+ productUnit.value = res["unit"];
|
|
|
+ });
|
|
|
+};
|
|
|
+getDict();
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|