{"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\\randomDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\examine-fvue\\src\\views\\examMenu\\components\\randomDialog.vue","mtime":1675655021211},{"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\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\t\tgroup: 'main',\n\t\t\t\t\toperation: 'EQUAL',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'sp.major_id_',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'RIGHT_LIKE',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'name',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'RIGHT_LIKE',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'name',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\n\t\t\t\t},\n\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\tquerys: [{\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'RIGHT_LIKE',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'name',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\n\t\t\t\t}, ],\n\n\t\t\t},\n\n\t\t\tsearch: '',\n\t\t\ttreeData: [],\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: \"questionName\"\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\tsubjectId: null,\n\t\t\ttopicList: [],\n\t\t\tuserlength: null,\n\t\t\tuserInfoVos: [],\n\t\t\tcurrentKey: null,\n\t\t\tfilterText: '',\n\t\t\texpandAll:false\n\t\t}\n\t},\n\tcreated() {\n\t\tthis.topicList = dictUtils.getDictItemsFromCache('sttx')\n\t},\n\twatch: {\n\t\tfilterText(val) {\n\t\t\tthis.$refs.tree.filter(val);\n\t\t},\n\t\tcurrentKey: { \n\t\t\thandler(value) {\n\t\t\t\tif (value) {\n\t\t\t\t\tthis.$nextTick(\n\t\t\t\t() => {\n\t\t\t\t\t\tthis.$refs.tree.setCurrentKey(this.currentKey);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\timmediate: true,\n\t\t\tvalType:false\n\t\t},\n\t},\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, row) {\n\t\t\tthis.currentKey=null\n\t\t\tconsole.log(val, row);\n\t\t\tif (row.length > 0) {\n\t\t\t\tthis.userInfoVos = row\n\t\t\t\tthis.selectUser = JSON.parse(JSON.stringify(row))\n\t\t\t\tthis.userlength = row.length\n\t\t\t}\n\t\t\tthis.visible = true\n\t\t\tif(val){\n\t\t\t\tthis.treeData = val\n\t\t\t\tthis.subjectId=this.treeData[0].id\n\t\t\t\tthis.currentKey=this.treeData[0].id\n\t\t\t}\n\t\t\tthis.loadData()\n\t\t},\n\t\t// 获取列表\n\t\tloadData() {\n\t\t\tif (this.subjectId) {\n\t\t\t\tpaperMenu.findBySubjectId(this.subjectId, res => {\n\t\t\t\t\tthis.UserData = []\n\t\t\t\t\tres.forEach(u => {\n\t\t\t\t\t\tthis.topicList.forEach(t => {\n\t\t\t\t\t\t\tif (u.type == t.value) {\n\t\t\t\t\t\t\t\tu.questionName = t.name\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\tthis.UserData.push({\n\t\t\t\t\t\t\t// id: u.id,\n\t\t\t\t\t\t\tsubjectId: this.subjectId,\n\t\t\t\t\t\t\tquestionType: u.type,\n\t\t\t\t\t\t\tquestionName: u.questionName,\n\t\t\t\t\t\t\tnumuber: null,\n\t\t\t\t\t\t\ttotalNumuber: u.count,\n\t\t\t\t\t\t\tscore: u.count,\n\t\t\t\t\t\t\tsubjectName: u.subjectName\n\t\t\t\t\t\t})\n\n\t\t\t\t\t})\n\t\t\t\t\tthis.$nextTick(()=>{\n\t\t\t\t\t\tthis.selectUser.forEach(s=>{\n\t\t\t\t\t\t\tthis.UserData.forEach(u=>{\n\t\t\t\t\t\t\t\tif(s.subjectName+s.questionName==u.subjectName+u.questionName){\n\t\t\t\t\t\t\t\t\tthis.$refs.multipleTable.toggleRowSelection(u, true)\n\t\t\t\t\t\t\t\t}\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.$set(this.UserData)\n\n\n\t\t\t\t})\n\t\t\t}\n\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.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(item) {\n\t\t\tthis.subjectId = item.id\n\t\t\tthis.loadData(1)\n\t\t},\n\t\tdialogConfirm() {\n\t\t\tthis.$emit('getRandom', this.selectUser)\n\t\t\tthis.handleClose()\n\t\t},\n\t\tbinRowKey(row) {\n\t\t\treturn row.subjectName + row.questionName\n\t\t},\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.subjectName + row.questionName == u.subjectName + u.questionName) {\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\tconsole.log(type);\n\t\t\treturn type\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\tconsole.log(row.subjectName + row.questionName);\n\t\t\t\tconsole.log(item.subjectName + item.questionName);\n\t\t\t\tif (row.subjectName + row.questionName == item.subjectName + item.questionName) return true;\n\t\t\t})\n\t\t\tconsole.log(flag);\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.subjectName + s.questionName == row.subjectName + row.questionName) {\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\thandleSelectionChange(row) {\n\t\t\tthis.selectUser = row\n\t\t\tthis.multipleSelection = row;\n\t\t\n\t\t},\n\t\tremove(val){\n\t\t\tconsole.log(val);\n\t\t\tthis.selectUser.forEach((u,ui)=>{\n\t\t\t\tif(val.subjectName+val.questionName==u.subjectName+u.questionName){\n\t\t\t\t\tthis.selectUser.splice(ui,1)\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.userInfoVos = JSON.parse(JSON.stringify(this.selectUser))\n\t\t\tthis.userlength = this.selectUser.length\n\t\t\tthis.loadData(1)\n\t\t}\n\t}\n}\n",null]}