{"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\\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\\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/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\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 paperMenu from '@/api/examination/paperMenu.js';\nexport default {\n mixins: [TableMixin],\n name: 'SelectOrganize',\n props: [\"userTypeId\"],\n data: function data() {\n return {\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'sp.major_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: \"questionName\"\n },\n nameArr: [],\n multipleSelection: null,\n params: {\n majorIds: [],\n subjectIds: []\n },\n subjectId: null,\n topicList: [],\n userlength: null,\n userInfoVos: [],\n currentKey: null,\n filterText: '',\n expandAll: false\n };\n },\n created: function created() {\n this.topicList = dictUtils.getDictItemsFromCache('sttx');\n },\n watch: {\n filterText: function filterText(val) {\n this.$refs.tree.filter(val);\n },\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 mounted: function mounted() {},\n methods: {\n expandHandle: function 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: function expandNodes(node) {\n node.expanded = this.expandAll;\n\n for (var i = 0; i < node.childNodes.length; i++) {\n node.childNodes[i].expanded = this.expandAll;\n\n if (node.childNodes[i].childNodes.length > 0) {\n this.expandNodes(node.childNodes[i]);\n }\n }\n },\n filterNode: function filterNode(value, data) {\n if (!value) return true;\n return data.name.indexOf(value) !== -1;\n },\n add: function add(val, row) {\n this.currentKey = null;\n console.log(val, row);\n\n if (row.length > 0) {\n this.userInfoVos = row;\n this.selectUser = JSON.parse(JSON.stringify(row));\n this.userlength = row.length;\n }\n\n this.visible = true;\n\n if (val) {\n this.treeData = val;\n this.subjectId = this.treeData[0].id;\n this.currentKey = this.treeData[0].id;\n }\n\n this.loadData();\n },\n // 获取列表\n loadData: function loadData() {\n var _this2 = this;\n\n if (this.subjectId) {\n paperMenu.findBySubjectId(this.subjectId, function (res) {\n _this2.UserData = [];\n res.forEach(function (u) {\n _this2.topicList.forEach(function (t) {\n if (u.type == t.value) {\n u.questionName = t.name;\n }\n });\n\n _this2.UserData.push({\n // id: u.id,\n subjectId: _this2.subjectId,\n questionType: u.type,\n questionName: u.questionName,\n numuber: null,\n totalNumuber: u.count,\n score: u.count,\n subjectName: u.subjectName\n });\n });\n\n _this2.$nextTick(function () {\n _this2.selectUser.forEach(function (s) {\n _this2.UserData.forEach(function (u) {\n if (s.subjectName + s.questionName == u.subjectName + u.questionName) {\n _this2.$refs.multipleTable.toggleRowSelection(u, true);\n }\n });\n });\n });\n\n _this2.$set(_this2.UserData);\n });\n }\n },\n // 显示\n handleShow: function handleShow(val) {\n this.visible = true;\n this.selectUser = [];\n this.multipleSelection = null;\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.subjectId = item.id;\n this.loadData(1);\n },\n dialogConfirm: function dialogConfirm() {\n this.$emit('getRandom', this.selectUser);\n this.handleClose();\n },\n binRowKey: function binRowKey(row) {\n return row.subjectName + row.questionName;\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.subjectName + row.questionName == u.subjectName + u.questionName) {\n type = false;\n }\n }\n });\n console.log(type);\n return type;\n },\n manualSelection: function manualSelection(selection, row) {\n var _this4 = this;\n\n //先判断当前操作flag\n //true勾选还是false取消\n var flag = selection.some(function (item) {\n console.log(row.subjectName + row.questionName);\n console.log(item.subjectName + item.questionName);\n if (row.subjectName + row.questionName == item.subjectName + item.questionName) return true;\n });\n console.log(flag);\n\n if (flag) {\n this.selectUser.push(row);\n } else {\n this.selectUser.forEach(function (s, si) {\n if (s.subjectName + s.questionName == row.subjectName + row.questionName) {\n _this4.selectUser.splice(si, 1);\n }\n });\n }\n },\n handleSelectionChange: function handleSelectionChange(row) {\n this.selectUser = row;\n this.multipleSelection = row;\n },\n remove: function remove(val) {\n var _this5 = this;\n\n console.log(val);\n this.selectUser.forEach(function (u, ui) {\n if (val.subjectName + val.questionName == u.subjectName + u.questionName) {\n _this5.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]}