{"remainingRequest":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\examine-fvue\\src\\views\\examMenu\\components\\addCandidatesDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\examine-fvue\\src\\views\\examMenu\\components\\addCandidatesDialog.vue","mtime":1675655021195},{"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":["//\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 {\n\tTableMixin\n} from '@/mixins/tableMixin'\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\nimport paperMenu from '@/api/examination/paperMenu.js'\nexport default {\n\tmixins: [TableMixin],\n\tname: 'SelectOrganize',\n\tprops: [\"userTypeId\"],\n\tdata() {\n\t\treturn {\n\t\t\tquerys: [{\n\t\t\t\tgroup: 'main',\n\t\t\t\toperation: 'LIKE',\n\t\t\t\tparentGroup: '',\n\t\t\t\tproperty: 'u.fullname_',\n\t\t\t\trelation: 'AND',\n\t\t\t\tvalue: ''\n\t\t\t}, ],\n\t\t\tnewParam: {\n\t\t\t\tpageBean: {\n\t\t\t\t\tpageSize: 20,\n\t\t\t\t\tpage: 1\n\t\t\t\t},\n\t\t\t},\n\n\t\t\tsearch: '',\n\t\t\ttreeData: [{\n\t\t\t\tcode: '',\n\t\t\t\tid: '',\n\t\t\t\tname: '专业装备',\n\t\t\t\ttype: 0,\n\t\t\t\tchildren: []\n\t\t\t}],\n\t\t\tdefaultProps: {\n\t\t\t\tchildren: 'children',\n\t\t\t\tlabel: 'name',\n\t\t\t},\n\t\t\tvisible: false,\n\t\t\tUserData: [],\n\t\t\tselectUser: [],\n\t\t\tselectUserProps: {\n\t\t\t\tlabel: \"userName\"\n\t\t\t},\n\t\t\tnameArr: [],\n\t\t\tmultipleSelection: null,\n\t\t\tparams: {\n\t\t\t\tmajorIds: [],\n\t\t\t\tsubjectIds: []\n\t\t\t},\n\t\t\tjobsList: [],\n\t\t\tEquipmentList: [],\n\t\t\tuserInfoVos: [],\n\t\t\tuserlength: null,\n\t\t\tpaperId: null, //试卷id\n\t\t\tfilterText: '',\n\t\t\texpandAll:false\n\t\t}\n\t},\n\twatch: {\n\t\tfilterText(val) {\n\t\t\tthis.$refs.tree.filter(val);\n\t\t},\n\t\t},\n\tcreated() {},\n\tmounted() {},\n\tmethods: {\n\t\texpandHandle() {\n\t\t console.log(this.$refs.tree.store);\n\t\t this.expandAll = !this.expandAll;\n\t\t this.expandNodes(this.$refs.tree.store.root);\n\t\t },\n\t\t // 遍历树形数据,设置每一项的expanded属性,实现展开收起\n\t\t expandNodes(node) {\n\t\t node.expanded = this.expandAll;\n\t\t for (let i = 0; i < node.childNodes.length; i++) {\n\t\t node.childNodes[i].expanded = this.expandAll;\n\t\t if (node.childNodes[i].childNodes.length > 0) {\n\t\t this.expandNodes(node.childNodes[i]);\n\t\t }\n\t\t }\n\t\t },\n\t\tfilterNode(value, data) {\n\t\t\tif (!value) return true;\n\t\t\treturn data.name.indexOf(value) !== -1;\n\t\t},\n\t\tadd(val) {\n\t\t\tthis.EquipmentList = []\n\t\t\tthis.userInfoVos = []\n\t\t\tthis.visible = true\n\t\t\tthis.paperId = val.id\n\t\t\tpaperMenu.detailIdPaper(this.paperId, res => {\n\t\t\t\tif (res) {\n\t\t\t\t\tres.userInfoVos.forEach(e => {\n\t\t\t\t\t\te.state = true\n\t\t\t\t\t})\n\n\t\t\t\t\tthis.userInfoVos = res.userInfoVos\n\t\t\t\t\tthis.selectUser = JSON.parse(JSON.stringify(res.userInfoVos));\n\t\t\t\t\tthis.userlength = this.userInfoVos.length\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.getTree()\n\t\t},\n\t\tsearchName() {\n\t\t\tthis.getTree(1)\n\t\t},\n\t\t// 获取列表\n\t\tloadData(page) {\n\n\t\t},\n\n\t\tselectable(row) {\n\t\t\tlet type = true\n\t\t\tthis.userInfoVos.forEach((u, ui) => {\n\t\t\t\tif (ui <= this.userlength) {\n\t\t\t\t\tif (row.account == u.account) {\n\t\t\t\t\t\ttype = false\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn type\n\t\t\t// return true\n\t\t},\n\n\t\tgetTree(page) {\n\t\t\tif (page) {\n\t\t\t\tthis.newParam.pageBean.page = page\n\t\t\t}\n\t\t\tpaperMenu.getOrgPostPage(this.newParam, res => {\n\t\t\t\tif (res) {\n\t\t\t\t\tthis.jobsList = res\n\t\t\t\t\tthis.total = res.total\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\t// 显示\n\t\thandleShow(val) {\n\t\t\tthis.visible = true\n\t\t\tthis.selectUser = []\n\t\t\tthis.multipleSelection = null\n\t\t\tthis.getTree(1)\n\t\t\tthis.loadData(1)\n\t\t},\n\n\t\t// 关闭新增人员窗口\n\t\thandleClose() {\n\t\t\tthis.visible = false\n\t\t\tthis.treeData = [{\n\t\t\t\tcode: '',\n\t\t\t\tid: '',\n\t\t\t\tname: '专业装备',\n\t\t\t\ttype: 0,\n\t\t\t\tchildren: []\n\t\t\t}]\n\t\t\tthis.UserData = []\n\t\t\tthis.selectUser = []\n\t\t},\n\t\t// 树\n\t\thandleNodeClick(val) {\n\t\t\tif (val) {\n\t\t\t\tthis.queryParam.querys = [{\n\t\t\t\t\tgroup: \"defaultQueryGroup\",\n\t\t\t\t\toperation: \"EQUAL\",\n\t\t\t\t\tproperty: \"POS_ID_\",\n\t\t\t\t\trelation: \"AND\",\n\t\t\t\t\tvalue: val.id\n\t\t\t\t}, ]\n\t\t\t}\n\n\t\t\tpaperMenu.getOrgUserPage(this.queryParam, res => {\n\t\t\t\tif (res.rows) {\n\t\t\t\t\tthis.EquipmentList = []\n\t\t\t\t\tres.rows.forEach(r => {\n\t\t\t\t\t\tthis.EquipmentList.push({\n\t\t\t\t\t\t\tpositionId: r.relId,\n\t\t\t\t\t\t\taccount: r.account,\n\t\t\t\t\t\t\tuserId: r.userId,\n\t\t\t\t\t\t\tuserName: r.fullName\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t\t//判断人员列表是否存在已选人员 存在赋予勾选状态\n\t\t\t\t\tthis.selectUser.forEach(s => {\n\t\t\t\t\t\tthis.EquipmentList.forEach(e => {\n\t\t\t\t\t\t\tif (s.account == e.account) {\n\t\t\t\t\t\t\t\tthis.$refs.multipleSelection.toggleRowSelection(e, true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t\tthis.total = res.total\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tgetOrgUserPage(val) {\n\t\t\tif (val) {\n\t\t\t\tthis.queryParam.pageBean.page = val\n\t\t\t}\n\t\t\tif (this.querys[0].value) {\n\t\t\t\tthis.queryParam.querys.push(this.querys[0])\n\t\t\t}\n\t\t\tpaperMenu.getOrgUserPage(this.queryParam, res => {\n\t\t\t\tif (res.rows) {\n\t\t\t\t\tthis.EquipmentList = []\n\t\t\t\t\tres.rows.forEach(r => {\n\t\t\t\t\t\tthis.EquipmentList.push({\n\t\t\t\t\t\t\tpositionId: r.relId,\n\t\t\t\t\t\t\taccount: r.account,\n\t\t\t\t\t\t\tuserId: r.userId,\n\t\t\t\t\t\t\tuserName: r.fullName\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t\t//判断人员列表是否存在已选人员 存在赋予勾选状态\n\t\t\t\t\tthis.selectUser.forEach(s => {\n\t\t\t\t\t\tthis.EquipmentList.forEach(e => {\n\t\t\t\t\t\t\tif (s.account == e.account) {\n\t\t\t\t\t\t\t\tthis.$refs.multipleSelection.toggleRowSelection(e, true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t\tthis.total = res.total\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\t// 中间列表\n\t\tsearchEnterFun() {\n\t\t\t// this.loadData(1)\n\t\t\tthis.getOrgUserPage(1)\n\t\t},\n\t\t// 重置\n\t\treset() {\n\t\t\tthis.querys[0].value = \"\"\n\t\t\tthis.getOrgUserPage(1)\n\t\t},\n\t\tdialogConfirm() {\n\t\t\t//去除之前选择的考生\n\t\t\tlet arr = JSON.parse(JSON.stringify(this.selectUser));\n\t\t\tarr.splice(0, this.userlength);\n\t\t\tif (arr.length > 0) {\n\t\t\t\tlet params = {\n\t\t\t\t\tid: this.paperId,\n\t\t\t\t\tuserInfoVos: arr\n\t\t\t\t}\n\t\t\t\tpaperMenu.addUser(params, res => {\n\t\t\t\t\tif (res.state) {\n\t\t\t\t\t\tthis.$message({\n\t\t\t\t\t\t\tmessage: '添加成功',\n\t\t\t\t\t\t\ttype: 'success'\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tthis.handleClose()\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tthis.$message({\n\t\t\t\t\tmessage: '请选择添加考生',\n\t\t\t\t\ttype: 'warning'\n\t\t\t\t});\n\t\t\t}\n\n\n\n\t\t},\n\t\thandleSelectionChange(val) {\n\t\t},\n\t\tmanualSelection(selection, row) {\n\t\t\t//先判断当前操作flag\n\t\t\t//true勾选还是false取消\n\t\t\tlet flag = selection.some((item) => {\n\t\t\t\tif (item.account === row.account) return true;\n\t\t\t})\n\t\t\tif (flag) {\n\t\t\t\tthis.selectUser.push(row)\n\t\t\t} else {\n\t\t\t\tthis.selectUser.forEach((s, si) => {\n\t\t\t\t\tif (s.account == row.account) {\n\t\t\t\t\t\tthis.selectUser.splice(si, 1)\n\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\t\thandleSizeChange(val) {\n\t\t\tthis.queryParam.pageBean.pageSize = val\n\t\t\tthis.handleNodeClick()\n\t\t},\n\t\thandleCurrentChange(val) {\n\t\t\tthis.queryParam.pageBean.page = val\n\t\t\tthis.handleNodeClick()\n\t\t},\n\t\tbinRowKey(row) {\n\t\t\treturn row.userId\n\t\t}\n\t}\n}\n",null]}