{"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\\subjectDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\examine-fvue\\src\\views\\mainDataMenu\\components\\subjectDialog.vue","mtime":1675655021227},{"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//\nimport { TableMixin } from '@/mixins/tableMixin';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport questionListMenu from '@/api/examination/questionListMenu.js'; // import questionListMenu from '@/api/examination/questionListMenu.js'\n\nexport default {\n  mixins: [TableMixin],\n  name: 'SelectOrganize',\n  props: [\"userTypeId\"],\n  data: function data() {\n    return {\n      querys: [{\n        group: 'main',\n        operation: 'LIKE',\n        parentGroup: '',\n        property: 'po.full_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        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: \"name\"\n      },\n      nameArr: [],\n      multipleSelection: null,\n      params: {\n        majorIds: [],\n        subjectIds: []\n      },\n      userlength: null,\n      userInfoVos: [],\n      id: '',\n      currentKey: null,\n      filterText: '',\n      expandAll: true,\n      expandedKeys: []\n    };\n  },\n  created: function created() {\n    this.trainTypeList = dictUtils.getDictItemsFromCache('xllb');\n  },\n  mounted: function mounted() {},\n  watch: {// filterText(val) {\n    // \tthis.$refs.tree.filter(val);\n    // },\n    // currentKey: { \n    // \thandler(value) {\n    // \t\tif (value) {\n    // \t\t\tthis.$nextTick(\n    // \t\t() => {\n    // \t\t\tconsole.log(1,this.currentKey);\n    // \t\t\tconsole.log(this.treeData);\n    // \t\t\t\tthis.$refs.tree.setCurrentKey(this.currentKey);\n    // \t\t\t});\n    // \t\t}\n    // \t},\n    // \timmediate: true,\n    // \tvalType:false\n    // },\n  },\n  methods: {\n    // expandHandle() {\n    //       console.log(this.$refs.tree.store);\n    //       this.expandAll = !this.expandAll;\n    //       this.expandNodes(this.$refs.tree.store.root);\n    //     },\n    //     // 遍历树形数据，设置每一项的expanded属性，实现展开收起\n    //     expandNodes(node) {\n    //       node.expanded = this.expandAll;\n    //       for (let i = 0; i < node.childNodes.length; i++) {\n    //         node.childNodes[i].expanded = this.expandAll;\n    //         if (node.childNodes[i].childNodes.length > 0) {\n    //           this.expandNodes(node.childNodes[i]);\n    //         }\n    //       }\n    //     },\n    // filterNode(value, data) {\n    // \tif (!value) return true;\n    // \treturn data.name.indexOf(value) !== -1;\n    // },\n    add: function add(val, id, parentId) {\n      this.currentKey = '';\n      this.getTree(1, id, parentId);\n      this.selectUser = [];\n      this.visible = true;\n\n      if (val) {\n        this.userInfoVos = val;\n        this.selectUser = JSON.parse(JSON.stringify(val));\n        this.userlength = val.length;\n      }\n\n      this.multipleSelection = null;\n    },\n    // 获取列表\n    loadData: function loadData(page) {\n      var _this = 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      questionListMenu.findByMajorIds(this.queryParam, function (res) {\n        _this.total = res.total;\n        _this.UserData = res.rows;\n\n        _this.UserData.forEach(function (u) {\n          _this.trainTypeList.forEach(function (e) {\n            if (u.trainType == e.value) {\n              u.trainTypeName = e.name;\n            }\n          });\n        });\n      });\n      this.$set(this.UserData);\n    },\n    // 获取人员类别树\n    getTree: function getTree(page, id, parentId) {\n      var _this2 = this;\n\n      if (page) {\n        this.newParam.pageBean.page = page;\n      }\n\n      questionListMenu.majorQuery(this.newParam, function (res) {\n        _this2.treeData = res.value;\n\n        _this2.treeData.forEach(function (a) {\n          a.newId = a.parentId + a.id;\n\n          if (a.children) {\n            a.children.forEach(function (b) {\n              b.newId = b.parentId + b.id;\n\n              if (b.children) {\n                b.children.forEach(function (c) {\n                  c.newId = c.parentId + c.id;\n                });\n              }\n            });\n          }\n        });\n\n        _this2.$set(_this2.treeData);\n\n        if (id) {\n          _this2.currentKey = parentId + id;\n\n          _this2.expandedKeys.push(_this2.currentKey);\n\n          _this2.querys[0].value = id;\n        }\n\n        _this2.loadData(1); // console.log(this.treeData);\n\n      });\n    },\n    // 显示\n    handleShow: function handleShow(val) {\n      this.visible = true;\n      this.selectUser = [];\n      this.multipleSelection = null;\n      this.getTree(1);\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.currentKey = item.id\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      this.$emit('getUser', this.selectUser);\n      this.handleClose();\n    },\n    binRowKey: function binRowKey(row) {\n      return row.id;\n    },\n    selectable: function selectable(row) {\n      var _this3 = this;\n\n      var type = true;\n      this.userInfoVos.forEach(function (u, ui) {\n        if (ui <= _this3.userlength) {\n          if (row.id == u.id) {\n            type = false;\n          }\n        }\n      });\n      return type; // return true\n    },\n    manualSelection: function manualSelection(selection, row) {\n      console.log(selection, row);\n      this.selectUser = [];\n      this.selectUser.push(row);\n      this.multipleSelection = row; // 清除 所有勾选项\n\n      this.$refs.multipleSelection.clearSelection(); // 当表格数据都没有被勾选的时候 就返回\n      // 主要用于将当前勾选的表格状态清除\n\n      if (selection.length == 0) return;\n      this.$refs.multipleSelection.toggleRowSelection(row, true); // \tconsole.log(row);\n      // \t//先判断当前操作flag\n      // \t//true勾选还是false取消\n      // \tlet flag = selection.some((item) => {\n      // \t\tif (row.id == item.id) return true;\n      // \t})\n      // \tif (flag) {\n      // \t\tthis.selectUser.push(row)\n      // \t} else {\n      // \t\tthis.selectUser.forEach((s, si) => {\n      // \t\t\tif (s.id == row.id) {\n      // \t\t\t\tthis.selectUser.splice(si, 1)\n      // \t\t\t}\n      // \t\t})\n      // \t}\n    } // handleSelectionChange(val) {\n    // \tthis.selectUser = val\n    // \tthis.multipleSelection = row;\n    // \t// 清除 所有勾选项\n    // \tthis.$refs.multipleSelection.clearSelection()\n    // \t// 当表格数据都没有被勾选的时候 就返回\n    // \t// 主要用于将当前勾选的表格状态清除\n    // \tif (selection.length == 0) return\n    // \tthis.$refs.multipleSelection.toggleRowSelection(row, true);\n    // },\n\n  }\n};",null]}