{"remainingRequest":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\examine-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\examine-fvue\\src\\views\\mainDataMenu\\components\\professionalDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\examine-fvue\\src\\views\\mainDataMenu\\components\\professionalDialog.vue","mtime":1670579919359},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { TableMixin } from '@/mixins/tableMixin';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport subMenu from '@/api/examination/subMenu.js';\nexport default {\n  mixins: [TableMixin],\n  name: 'SelectOrganize',\n  data: function data() {\n    return {\n      querys: [{\n        group: 'main',\n        operation: 'EQUAL',\n        parentGroup: '',\n        property: 'user_type_id',\n        relation: 'AND',\n        value: ''\n      }, {\n        group: 'main',\n        operation: 'NOT_IN',\n        parentGroup: '',\n        property: 'id_',\n        relation: 'AND',\n        value: ''\n      }, {\n        group: 'main',\n        operation: 'RIGHT_LIKE',\n        parentGroup: '',\n        property: 'name',\n        relation: 'AND',\n        value: ''\n      }],\n      newParam: {\n        pageBean: {\n          pageSize: 20,\n          page: 1\n        },\n        querys: [{\n          group: 'main',\n          operation: 'RIGHT_LIKE',\n          parentGroup: '',\n          property: 'name',\n          relation: 'AND',\n          value: ''\n        }]\n      },\n      search: '',\n      treeData: [],\n      defaultProps: {\n        children: 'children',\n        label: 'name'\n      },\n      visible: false,\n      UserData: [],\n      selectUser: [],\n      selectUserProps: {\n        label: \"majorName\"\n      },\n      nameArr: [],\n      multipleSelection: [],\n      lxList: [],\n      currentKey: null,\n      userlength: null,\n      userInfoVos: []\n    };\n  },\n  created: function created() {\n    this.lxList = dictUtils.getDictItemsFromCache('lx');\n  },\n  mounted: function mounted() {},\n  watch: {\n    currentKey: {\n      handler: function handler(value) {\n        var _this = this;\n\n        if (value) {\n          this.$nextTick(function () {\n            _this.$refs.tree.setCurrentKey(_this.currentKey);\n          });\n        }\n      },\n      immediate: true,\n      valType: false\n    }\n  },\n  methods: {\n    add: function add(val, row) {\n      console.log(val, row);\n      this.currentKey = null;\n      this.querys[1].value = '';\n      this.visible = true;\n      this.selectUser = [];\n      this.userInfoVos = [];\n      this.userlength = null;\n      this.multipleSelection = [];\n\n      if (row.length > 0) {\n        this.userInfoVos = row;\n        this.selectUser = JSON.parse(JSON.stringify(row));\n        this.userlength = row.length;\n        this.$set(this.selectUser);\n      }\n\n      if (val) {\n        this.valType = true; // console.log();\n\n        this.querys[0].value = val;\n      } else {\n        this.valType = false;\n      }\n\n      this.getTree(1); // this.loadData(1)\n    },\n    searchName: function searchName() {\n      this.getTree(1);\n    },\n    // 获取列表\n    loadData: function loadData(page) {\n      var _this2 = this;\n\n      if (page) {\n        this.queryParam.pageBean.page = page;\n      }\n\n      this.UserData = [];\n      this.queryParam.querys = [];\n\n      if (this.querys[0].value) {\n        this.queryParam.querys.push(this.querys[0]);\n      }\n\n      if (this.querys[1].value) {\n        this.queryParam.querys.push(this.querys[1]);\n      }\n\n      if (this.querys[2].value) {\n        this.queryParam.querys.push(this.querys[2]);\n      }\n\n      subMenu.professionalQuery(this.queryParam, function (res) {\n        _this2.total = res.total; // this.UserData = res.rows\n\n        res.rows.forEach(function (item) {\n          _this2.lxList.forEach(function (ee) {\n            if (item.type == ee.value) {\n              item['typeName'] = ee.name;\n            }\n          });\n\n          _this2.UserData.push({\n            majorId: item.id,\n            majorName: item.name,\n            typeName: item.typeName\n          });\n        });\n\n        _this2.selectUser.forEach(function (s) {\n          _this2.UserData.forEach(function (u) {\n            if (s.majorId == u.majorId) {\n              _this2.$refs.multipleTable.toggleRowSelection(u, true);\n            } // else{\n            // \tthis.$refs.multipleTable.clearSelection()\n            // }\n\n          });\n        });\n\n        _this2.$set(_this2.UserData);\n      });\n    },\n    // 获取人员类别树\n    getTree: function getTree(page) {\n      var _this3 = this;\n\n      if (page) {\n        this.newParam.pageBean.page = page;\n      }\n\n      subMenu.getJobPage(this.newParam, function (res) {\n        _this3.treeData = res.rows;\n        _this3.currentKey = res.rows[0].id;\n        _this3.querys[0].value = _this3.currentKey;\n\n        _this3.$set(_this3.querys[0]); // this.$refs.tree.setCurrentKey(res.rows[0].id)\n\n\n        _this3.loadData(1);\n      });\n    },\n    fetchTreeData: function fetchTreeData() {\n      this.$refs.tree.setCurrentKey('0');\n    },\n    // 显示\n    handleShow: function handleShow(val) {\n      this.querys[0].value = val;\n      this.visible = true;\n      this.selectUser = [];\n      this.multipleSelection = [];\n      this.getTree(1);\n      this.loadData(1); // this.newData(val)\n    },\n    newData: function newData(item) {\n      this.querys[0].value = item;\n      this.loadData(1);\n    },\n    // 关闭新增人员窗口\n    handleClose: function handleClose() {\n      this.visible = false;\n      this.treeData = [{\n        code: '',\n        id: '',\n        name: '行政维度',\n        type: 0,\n        children: []\n      }];\n      this.UserData = [];\n      this.selectUser = [];\n    },\n    // 树\n    handleNodeClick: function handleNodeClick(item) {\n      this.valType = false;\n      this.querys[0].value = item.id;\n      this.loadData(1);\n    },\n    // 中间列表\n    searchEnterFun: function searchEnterFun() {\n      this.loadData(1);\n    },\n    // 重置\n    reset: function reset() {\n      this.querys[0].value = \"\";\n      this.querys[1].value = \"\";\n      this.loadData(1);\n    },\n    dialogConfirm: function dialogConfirm() {\n      console.log(this.selectUser);\n      this.$emit('professionalgetUser', this.selectUser);\n      this.handleClose();\n    },\n    binRowKey: function binRowKey(row) {\n      return row.majorId;\n    },\n    selectable: function selectable(row) {\n      var _this4 = this;\n\n      var type = true;\n      this.userInfoVos.forEach(function (u, ui) {\n        if (ui <= _this4.userlength) {\n          console.log(row.majorId, u.majorId, row.majorId == u.majorId);\n\n          if (row.majorId == u.majorId) {\n            type = false;\n          }\n        }\n      });\n      console.log(type);\n      return type; // return true\n    },\n    manualSelection: function manualSelection(selection, row) {\n      var _this5 = this;\n\n      var flag = selection.some(function (item) {\n        if (item.majorId === row.majorId) return true;\n      });\n\n      if (flag) {\n        this.selectUser.push(row);\n      } else {\n        this.selectUser.forEach(function (s, si) {\n          if (s.majorId == row.majorId) {\n            _this5.selectUser.splice(si, 1);\n          }\n        });\n      }\n    },\n    handleSelectionChange: function handleSelectionChange(val) {\n      console.log(val);\n    },\n    renderContent: function renderContent(h, _ref) {\n      var _this6 = this;\n\n      var node = _ref.node,\n          data = _ref.data,\n          store = _ref.store;\n      return h(\"span\", {\n        \"class\": \"custom-tree-node\",\n        \"on\": {\n          \"mouseover\": function mouseover() {\n            _this6.show = true;\n          },\n          \"mouseout\": function mouseout() {\n            _this6.show = false;\n          }\n        }\n      }, [h(\"span\", [data.majorName]), h(\"span\", [h(\"el-button\", {\n        \"style\": \"width:100%;border:0;margin:0;\",\n        \"attrs\": {\n          \"size\": \"mini\",\n          \"type\": \"text\"\n        },\n        \"on\": {\n          \"click\": function click() {\n            return _this6.remove(data);\n          }\n        }\n      }, [\"\\u5220\\u9664\"])])]);\n    },\n    remove: function remove(val) {\n      var _this7 = this;\n\n      console.log(val);\n      this.selectUser.forEach(function (u, ui) {\n        if (u.majorId == val.majorId) {\n          _this7.selectUser.splice(ui, 1);\n        }\n      });\n      this.userInfoVos = JSON.parse(JSON.stringify(this.selectUser));\n      this.userlength = this.selectUser.length;\n      this.loadData(1);\n    }\n  }\n};",null]}