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

去除人员管理树参数,替换角色配置树接口

haizhouwang 2 лет назад
Родитель
Сommit
e43c729c6e

+ 5 - 101
src/views/PeopleManage/Staff/StaffExamine.vue

@@ -318,7 +318,10 @@
 import tree from "@/components/ztree.vue"; // 机构树组件
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
 import peopleImage from '@/components/PeopleImage/index.vue' //影像组件
-
+import mixa from '../mixin' 
+const mixin = new mixa({
+  treeTypeNum:null
+})
 
 export default {
   components: {
@@ -326,68 +329,11 @@ export default {
     KtCommonTable,
     peopleImage
   },
+  mixins: [mixin], 
   data() {
     return {
       activeName: '1',
       //56个民族
-      nationalList: [
-        "汉族",
-        "壮族",
-        "满族",
-        "回族",
-        "苗族",
-        "维吾尔族",
-        "土家族",
-        "彝族",
-        "蒙古族",
-        "藏族",
-        "布依族",
-        "侗族",
-        "瑶族",
-        "朝鲜族",
-        "白族",
-        "哈尼族",
-        "哈萨克族",
-        "黎族",
-        "傣族",
-        "畲族",
-        "傈僳族",
-        "仡佬族",
-        "东乡族",
-        "高山族",
-        "拉祜族",
-        "水族",
-        "佤族",
-        "纳西族",
-        "羌族",
-        "土族",
-        "仫佬族",
-        "锡伯族",
-        "柯尔克孜族",
-        "达斡尔族",
-        "景颇族",
-        "毛南族",
-        "撒拉族",
-        "布朗族",
-        "塔吉克族",
-        "阿昌族",
-        "普米族",
-        "鄂温克族",
-        "怒族",
-        "京族",
-        "基诺族",
-        "德昂族",
-        "保安族",
-        "俄罗斯族",
-        "裕固族",
-        "乌兹别克族",
-        "门巴族",
-        "鄂伦春族",
-        "独龙族",
-        "塔塔尔族",
-        "赫哲族",
-        "珞巴族",
-      ],
       //影像资料
       dataForm: {
         SFZ_01: "",
@@ -413,27 +359,6 @@ export default {
       filterObject: {},
       peopleid: "",
       peopledeptid: "",
-      /**Split 开始 */
-      leftSplitWidth: 20,
-      rightSplitWidth: 80,
-      ztreeObj: null,
-      ztreeSetting: {
-        check: {
-          enable: false,
-        },
-        data: {
-          simpleData: {
-            enable: true,
-            pIdKey: "parentId",
-          },
-        },
-        view: {
-          showIcon: false,
-        },
-      },
-      ztreeNodes: [],
-      currentTreeNode: null,
-      //----ztreeLeft end---------
       recommenderList: [],
       teamleadername: "",
       teamleaderid: "",
@@ -478,29 +403,13 @@ export default {
       dialogVisible: false, // 新增编辑界面是否显示
       departmentList: [], // 选中公司的所有部门的集合
       deptInfo: {}, //选中机构的基本信息
-      sexoptions: JSON.parse(localStorage.getItem('sexOptions')),
-      user_statusoptions: JSON.parse(localStorage.getItem('user_statusoptions')),
-      roles: JSON.parse(localStorage.getItem('find_all')),
       option: [], //机构列表
-      postOption:[]
     };
   },
   created() {
-    // this.$api.role.findAll().then((res) => {
-    //   this.roles = res.data
-    // })
-    this.$api.role.postViewAll().then((res) => {
-      res.data.forEach(ele=>{
-        ele.postId=ele.postId+''
-      })
-      this.postOption = res.data
-    })
-    this.findLeftTreeData(); // 获取机构树的数据
 
   },
   mounted() {
-    //用像素初始化左边的split的宽度
-    this.changeTreeWidth(240); // 初始化树的宽度
   },
   methods: {
     // 下一步
@@ -525,11 +434,6 @@ export default {
       );
       this.rightSplitWidth = 100 - this.leftSplitWidth;
     },
-    findLeftTreeData: function () {
-      this.$api.dept.findDeptTree().then((res) => {
-        this.ztreeNodes = res.data;
-      });
-    },
     onZTreeClick: function (evt, treeId, treeNode) {
       // 点击事件
       this.currentTreeNode = evt;

+ 0 - 12
src/views/PeopleManage/Staff/StaffManage.vue

@@ -682,18 +682,6 @@ export default {
       else {
         this.$message.error(res.msg);
       }
-      // this.$api.dept.findDeptTree().then((res) => {
-      //   this.option = res.data;
-      // });
-      // this.$api.user.getUserDatail(params.row.userId).then((result) => {
-      //   if(result.code==200){
-      //       result.data.status+=''
-      //     this.formData=result.data
-      //     this.formData.password=''
-      //   }
-      // })
-      // this.dialogTitle = "编辑后线人员";
-      // this.dialogVisible = true;
     },
     // 删除单个人员
     handleTableDeleteFlag(data) {

+ 1 - 1
src/views/PeopleManage/mixin.js

@@ -193,7 +193,7 @@ export default (params) => { // 导出混入对象
         this.rightSplitWidth = 100 - this.leftSplitWidth;
       },
       findLeftTreeData: function () {
-        this.$api.dept.findDeptTree().then((res) => {
+        this.$api.dept.findTree().then((res) => {
           // console.log(treeTypeNum);
           this.treeDataRecursion(res.data, treeTypeNum);
           this.ztreeNodes = res.data;

+ 1 - 1
src/views/Sys/User.vue

@@ -263,7 +263,7 @@
       //--left tree start-------
       findLeftTreeData: function() {
         // 获取数据
-        this.$api.dept.findLeftDeptTree(this.peopledeptid).then(res => {
+        this.$api.dept.findTree().then(res => {
           this.ztreeNodes = res.data;
         });
       },