Browse Source

bug修改

asd26269546 1 year ago
parent
commit
93cfe5ac55

+ 1 - 0
src/components/byForm/index.vue

@@ -51,6 +51,7 @@
           :min="i.min"
           :maxlength="i.maxlength"
           :readonly="i.readonly ? i.readonly : false"
+          :clearable="i.clearable ? i.clearable : false"
         >
           <template #prepend>
             <el-select

+ 4 - 2
src/components/product/treeList.vue

@@ -30,8 +30,8 @@
       >
         <template #default="{ node, data }">
           <div class="custom-tree-node">
-            <div style="flex: 1">{{ node.label }}</div>
-            <div style="float: right; width: 71px; margin-left: 10px">
+            <div style="flex: 1">{{ node.label}}</div>
+            <div style="float: right; width: 71px; margin-left: 10px" v-if="activeNode == data.id">
               <el-icon :size="17" @click.stop="() => edit(node, data)">
                 <Edit />
               </el-icon>
@@ -106,7 +106,9 @@ onMounted(() => {});
 const search = ref("");
 const emit = defineEmits(["update:modelValue"]);
 const { proxy } = getCurrentInstance();
+let activeNode = ref('');
 const treeChange = (e, data) => {
+  activeNode.value = e.id
   if (proxy.type == "radio") {
     emit("update:modelValue", e.id);
     emit("change", e);

+ 1 - 0
src/components/treeList/index.vue

@@ -50,6 +50,7 @@ const search = ref('')
 const emit = defineEmits(['update:modelValue'])
 const { proxy } = getCurrentInstance()
 const treeChange = (e, data) => {
+	console.log(e,12312332323232123)
 	if (proxy.type == 'radio') {
 		emit('update:modelValue', e.id)
 		emit('change', e)

+ 1 - 1
src/views/product/product/index.vue

@@ -528,7 +528,7 @@ const getList = async (req) => {
 };
 
 const treeChange = (e) => {
-  console.log(e);
+  console.log(e,123123);
   sourceList.value.pagination.productClassifyId = e.id;
   getList({ productClassifyId: e.id });
 };

+ 3 - 4
src/views/system/dept2/index.vue

@@ -230,12 +230,14 @@ const formConfig = computed(() => {
       label: proxy.t('dept.deptManager'),
       prop: "leaderId",
       itemWidth: 50,
+      clearable: true,
       data: [],
     },
     {
       type: "select",
       label: proxy.t('dept.deptDirector'),
       prop: "directorId",
+      clearable: true,
       itemWidth: 50,
       data: [],
     },
@@ -409,10 +411,7 @@ const getUserList = () => {
         item.label = item.nickName;
         item.id = item.userId;
       });
-      message.rows.unshift({
-        label:'无',
-        id:'',
-      })
+      
       formConfig.value[3].data = message.rows;
       formConfig.value[4].data = message.rows;