Selaa lähdekoodia

界面bug修复

luojun 2 vuotta sitten
vanhempi
commit
afb22460e7

+ 24 - 2
src/views/check/dialog.edit.vue

@@ -256,8 +256,14 @@
           </el-form-item>
         </el-form>
         <el-button @click="openSelect">新增检查内容</el-button>
-
-        <el-table :data="tableData" style="width: 100%" height="400px">
+        <el-button @click="deleteSelected">批量删除</el-button>
+        <el-table
+          :data="tableData"
+          style="width: 100%"
+          height="400px"
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column type="selection"></el-table-column>
           <el-table-column label="是否扫描">
             <template v-slot="{ row }">
               <el-switch
@@ -364,6 +370,7 @@ export default {
       planExec: null,
       count: 0,
       description: null,
+      selectedRows: [],
       propItem: "",
       row: "",
       tableData: [],
@@ -398,6 +405,21 @@ export default {
     ...mapGetters(["orgId", "orgName"]),
   },
   methods: {
+    // 监听行选中事件,将选中的行数据存入 selectedRows 数组中
+    handleSelectionChange(selection) {
+      // console.log(selection, "selection");
+      this.selectedRows = selection;
+    },
+    deleteSelected() {
+      // 在这里执行批量删除操作,使用 this.selectedRows 数组中的数据
+      // console.log("删除选中的数据:", this.selectedRows);
+      // 从数据数组中移除选中的行数据
+      this.tableData = this.tableData.filter(
+        (row) => !this.selectedRows.includes(row)
+      );
+      // 清空选中的行数据
+      this.selectedRows = [];
+    },
     //省联社内容不能删除
     getshenglianshe(row) {
       if (row.ofOrgId == this.orgId) {

+ 26 - 2
src/views/resumption/plan/dialog.edit.vue

@@ -198,8 +198,15 @@
           </el-form-item>
         </el-form>
         <el-button @click="openSelect">新增履职内容</el-button>
+        <el-button @click="deleteSelected">批量删除</el-button>
+        <el-table
+          :data="tableData"
+          style="width: 100%"
+          height="400px"
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column type="selection"></el-table-column>
 
-        <el-table :data="tableData" style="width: 100%" height="400px">
           <el-table-column label="是否扫描">
             <template v-slot="{ row }">
               <el-switch
@@ -337,6 +344,7 @@ export default {
       row: "",
       tableData: [],
       id: null,
+      selectedRows: [],
       isShow: false,
       formData: {},
       formDataRules: {
@@ -367,6 +375,21 @@ export default {
     ...mapGetters(["orgId", "orgName"]),
   },
   methods: {
+    // 监听行选中事件,将选中的行数据存入 selectedRows 数组中
+    handleSelectionChange(selection) {
+      // console.log(selection, "selection");
+      this.selectedRows = selection;
+    },
+    deleteSelected() {
+      // 在这里执行批量删除操作,使用 this.selectedRows 数组中的数据
+      console.log("删除选中的数据:", this.selectedRows);
+      // 从数据数组中移除选中的行数据
+      this.tableData = this.tableData.filter(
+        (row) => !this.selectedRows.includes(row)
+      );
+      // 清空选中的行数据
+      this.selectedRows = [];
+    },
     changeBuildTime() {
       // console.log(this.formData.planCycle, "this.formData.planCycle");
       const dateObj = new Date(); // 获取当前时间对象
@@ -400,7 +423,7 @@ export default {
         case "5":
           const year2 = dateObj.getFullYear(); // 获取年份
           const month2 = String(dateObj.getMonth() + 1).padStart(2, "0"); // 获取月份,并补齐两位数
-          const day2 = String(dateObj.getDate()).padStart(2, "0"); // 获取日期,并补齐两位数
+          const day2 = "01"; // 获取日期,并补齐两位数
           var month3 = month2;
           month3++;
           for (var i = 0; i < 12; i++) {
@@ -668,6 +691,7 @@ export default {
           this.tableData = res.data.itemList;
         });
       }
+      this.changeBuildTime();
       this.isShow = true;
     },
     removeRow(row) {

+ 4 - 4
src/views/system/dept/index.vue

@@ -217,8 +217,8 @@
             <el-table-column
               label="操作"
               align="center"
-              fixed="right"
-              width="160"
+            width="300"
+            fixed="right"
               class-name="small-padding fixed-width"
             >
               <template slot-scope="scope">
@@ -240,7 +240,7 @@
                     >补充信息</el-button
                   >
                 <!-- </router-link> -->
-
+                <el-divider direction="vertical"></el-divider>
                 <el-button
                   size="mini"
                   type="text"
@@ -248,7 +248,7 @@
                   @click="handleUpdate(scope.row)"
                   v-hasPermi="['system:dept:edit']"
                   >编辑</el-button
-                >
+                ><el-divider direction="vertical"></el-divider>
                 <el-button
                   v-if="!scope.row.source"
                   size="mini"

+ 1 - 0
src/views/system/user/index.vue

@@ -797,6 +797,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.roleId=null;
       this.resetForm("queryForm");
       this.queryParams.onlyManager = false;
       this.handleQuery();