Browse Source

fix:用户添加编辑和导出

luoxiao 1 month ago
parent
commit
740ec24a28
1 changed files with 13 additions and 7 deletions
  1. 13 7
      src/views/sets/users.vue

+ 13 - 7
src/views/sets/users.vue

@@ -12,6 +12,7 @@
       @size-change="dataList"
       @current-change="dataList"
       @row-save="createRow"
+      @row-update="updateRow"
     >
       <template #menu="{ row }">
         <el-button text type="primary" @click="editPermission(row)"
@@ -24,6 +25,14 @@
           >删除用户</el-button
         >
       </template>
+      <template #menu-right="{}">
+        <el-button
+          class="ml-3"
+          @click="exportData('/api/v1/syn/user/info/export')"
+        >
+          <template #icon> <i-ep-download /> </template>导出
+        </el-button>
+      </template>
     </avue-crud>
 
     <!-- 分配菜单弹窗  -->
@@ -101,11 +110,12 @@ const getDeptList = async () => {
 
 // 设置表格列或者其他自定义的option
 option.value = Object.assign(option.value, {
-  editBtn: false, //是否显示编辑按钮
+  editBtn: true, //是否显示编辑按钮
   delBtn: false, //是否显示删除按钮
   addBtn: true, //是否显示新增按钮
   viewBtn: false, //是否显示查看按钮
-  menu: false, //是否显示操作列
+  menu: true, //是否显示操作列
+  menuWidth: 300, //操作列宽度
   column: [
     {
       label: "昵称",
@@ -130,6 +140,7 @@ option.value = Object.assign(option.value, {
         },
       ],
       search: true,
+      editDisabled: true,
     },
     {
       label: "账号",
@@ -200,11 +211,6 @@ option.value = Object.assign(option.value, {
       search: true,
       valueformat: "array", // 确保值是数组格式
     },
-    {
-      label: "操作",
-      prop: "menu",
-      span: 24,
-    },
   ],
 });