Просмотр исходного кода

任务调度任务池管理编辑全选

baijunde 2 лет назад
Родитель
Сommit
c1512e4a40

+ 7 - 0
src/http/moudules/task.js

@@ -1851,3 +1851,10 @@ export const addTypeImportExcel = (data) => {
 }
 
 
+// 全选
+export const addOrUpdateAll = (data) => {
+  return axios({
+    url: '/sysUserLinkPtlAgreement/addOrUpdateAll/'+data,
+    method: 'post'
+  })
+}

+ 32 - 1
src/views/AgreementManage/CarInsurance/BacklineAllocation.vue

@@ -200,6 +200,9 @@
           >
           </el-option>
         </el-select>
+        <el-button size="small" type="primary" @click="selectAll"
+          >全 选</el-button
+        >
       </div>
       <el-table
         @selection-change="handleSelectionChange"
@@ -338,6 +341,35 @@ export default {
   },
   watch: {},
   methods: {
+    //全选
+    selectAll() {
+      let userId = this.userId
+      this.$confirm("确定选择全部?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$api.task.addOrUpdateAll(this.userId).then((res) => {
+           if(res.code==200){
+            this.productDialogVisible = false
+             this.$message({
+              type: "success",
+              message: "操作成功",
+            });
+           }
+           else{
+            this.$message.error(res.msg);
+           }
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消全选",
+          });
+        });
+    },
     handleDelete(val) {
       this.handleTableDelete(val);
     },
@@ -487,7 +519,6 @@ export default {
         this.pageRequest.pageNum = data.pageRequest.pageNum;
         this.pageRequest.pageSize = data.pageRequest.pageSize;
       }
-      console.log(this.pageRequest);
       let insuranceCompany = Array.isArray(this.pageRequest.insuranceCompany)
         ? this.pageRequest.insuranceCompany[0]
         : "";