فهرست منبع

fix:表格查询组件默认显示10条

test 2 سال پیش
والد
کامیت
a75e45bf67
3فایلهای تغییر یافته به همراه66 افزوده شده و 43 حذف شده
  1. 1 1
      src/components/TemplateTable/index.vue
  2. 13 13
      src/views/PeopleManage/Player/PlayerManageteam.vue
  3. 52 29
      src/views/Sys/Deptall.vue

+ 1 - 1
src/components/TemplateTable/index.vue

@@ -558,7 +558,7 @@ export default {
     handleSearchList() {
       // 更新父组件searchData
       this.pagination.pageNum = 1;
-      this.pagination.pageSize = 20; //查询添加默认每页20条
+      this.pagination.pageSize = 10; //查询添加默认每页20条
       this.$emit("handleSearchList", this.searchDataClone);
     },
     // 重置

+ 13 - 13
src/views/PeopleManage/Player/PlayerManageteam.vue

@@ -814,9 +814,9 @@ export default {
       this.activeName = "1";
       let res = await this.$api.user.getUserDatail(params.userId);
       if (res.code == 200) {
-        this.$api.user.findBackUserList1({ agentFlag: 0 }).then((res) => {
-          this.leaderOptions = res.data;
-        });
+        // this.$api.user.findBackUserList1({ agentFlag: 0 }).then((res) => {
+        //   this.leaderOptions = res.data;
+        // });
         res.data.sysUser.status += "";
         this.formData = res.data.sysUser;
         this.dialogTitle = "编辑渠道信息";
@@ -829,16 +829,16 @@ export default {
     //添加人员
     handleAddButton() {
       //级联渲染部门列表  formData
-      this.$api.user
-        .findBackListByDeptId({ deptId: this.deptId })
-        .then((res) => {
-          this.leaderOptions = res.data.map((val) => {
-            return {
-              userId: val.id,
-              name: val.name,
-            };
-          });
-        });
+      // this.$api.user
+      //   .findBackListByDeptId({ deptId: this.deptId })
+      //   .then((res) => {
+      //     this.leaderOptions = res.data.map((val) => {
+      //       return {
+      //         userId: val.id,
+      //         name: val.name,
+      //       };
+      //     });
+      //   });
       if (this.currentTreeNode == null) {
         this.$message.info("请选择所属公司或部门");
         return;

+ 52 - 29
src/views/Sys/Deptall.vue

@@ -39,14 +39,23 @@
           >
             <el-form-item label="机构编码:">
               <el-input
-              clearable
+                clearable
                 v-model="peopledeptid"
                 placeholder="请输入机构编码"
               ></el-input>
             </el-form-item>
             <el-form-item label="来源:">
-              <el-select v-model="managementSource" placeholder="选择来源" clearable>
-                <el-option v-for="val in organizationSourceoptions" :key="val.dictValue" :label="val.dictTag" :value="val.dictValue"></el-option>
+              <el-select
+                v-model="managementSource"
+                placeholder="选择来源"
+                clearable
+              >
+                <el-option
+                  v-for="val in organizationSourceoptions"
+                  :key="val.dictValue"
+                  :label="val.dictTag"
+                  :value="val.dictValue"
+                ></el-option>
               </el-select>
             </el-form-item>
             <el-form-item>
@@ -82,7 +91,12 @@
         >
           <el-table-column prop="name" label="部门管理" width="300">
           </el-table-column>
-          <el-table-column prop="deptCount" label="部门数量" width="80" align="center">
+          <el-table-column
+            prop="deptCount"
+            label="部门数量"
+            width="80"
+            align="center"
+          >
           </el-table-column>
           <el-table-column prop="id" label="ID" width="150" align="center">
           </el-table-column>
@@ -130,13 +144,22 @@
             width="150"
           >
             <template slot-scope="scope">
-              <KtButton :perms="'sys:institution:edit'" :size="'medium'" :type="'text'" :label="'编辑'"
-              @click.native.stop="handleEdit(scope.row)"
+              <KtButton
+                :perms="'sys:institution:edit'"
+                :size="'medium'"
+                :type="'text'"
+                :label="'编辑'"
+                @click.native.stop="handleEdit(scope.row)"
                 @findPage="findSubDeptPage"
-               ></KtButton>
-               <KtButton :perms="'sys:institution:delete'" v-show="scope.row.parentId != '0'" :size="'medium'" :type="'text'" :label="'删除'"
-              @click.native.stop="deleteMechanism(scope.row)"
-               ></KtButton>
+              ></KtButton>
+              <KtButton
+                :perms="'sys:institution:delete'"
+                v-show="scope.row.parentId != '0'"
+                :size="'medium'"
+                :type="'text'"
+                :label="'删除'"
+                @click.native.stop="deleteMechanism(scope.row)"
+              ></KtButton>
             </template>
           </el-table-column>
         </el-table>
@@ -617,7 +640,7 @@ export default {
       comleveloptions: [],
       comattributeoptions: [],
       comtypeoptions: [],
-      organizationSourceoptions:[],
+      organizationSourceoptions: [],
       //------------下拉框数据   end-----------------
 
       //---dialog begin ----
@@ -813,12 +836,11 @@ export default {
         });
     },
     getDicType(type) {
-      this.$api.insCompany.dicType(type).then(res => {
+      this.$api.insCompany.dicType(type).then((res) => {
         if (res.code == 200) {
-            this[type + 'options'] = res.data.ddList;
+          this[type + "options"] = res.data.ddList;
         }
-      })
-
+      });
     },
     //获取省市区树数据
     getQueryTree() {
@@ -1076,22 +1098,24 @@ export default {
     },
     //删除机构或部门
     deleteMechanism(data) {
-      if (data.parentId == '0') {
+      if (data.parentId == "0") {
         this.$message({
           message: "总部不可删除",
           type: "warning",
           duration: 1000,
         });
-        return
+        return;
       }
-      this.$prompt('请输入密码', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          inputPattern:  /.+/,
-          inputType:'password',
-          inputErrorMessage: '请输入密码'
-        }).then(({ value  }) => {
-          this.$api.dept.deptDelete({password:value ,deptId:data.id}).then((res) => {
+      this.$prompt("请输入密码", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        inputPattern: /.+/,
+        inputType: "password",
+        inputErrorMessage: "请输入密码",
+      }).then(({ value }) => {
+        this.$api.dept
+          .deptDelete({ password: value, deptId: data.id })
+          .then((res) => {
             if (res.code == 200) {
               this.findSubDeptPage();
               this.findTreeData();
@@ -1100,15 +1124,14 @@ export default {
                 type: "success",
                 message: "删除成功!",
               });
-            }
-            else {
+            } else {
               this.$message({
                 type: "error",
                 message: res.msg,
               });
             }
-        })
-      })
+          });
+      });
       // let that = this;
       // that
       //   .$confirm("此操作将删除该数据, 是否继续?", "提示", {