1 line
3.8 KiB
JSON
1 line
3.8 KiB
JSON
{"remainingRequest":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\system\\user\\dialog\\relevanceUserDialog.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\system\\user\\dialog\\relevanceUserDialog.vue","mtime":1732871026807},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":1732872825017},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":1732872825835}],"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\r\n\r\nimport crudUser from '../user'\r\nimport CRUD, { header, presenter } from '@crud/crud'\r\nimport rrOperation from '@crud/RR.operation'\r\nimport pagination from '@crud/Pagination'\r\n\r\nexport default {\r\n name: 'RelevanceUserDialog',\r\n components: { rrOperation, pagination },\r\n cruds() {\r\n return CRUD({ title: '用户', idField: 'userId', url: 'api/users', crudMethod: { ...crudUser }, query: { isUsed: '1' }})\r\n },\r\n mixins: [presenter(), header()],\r\n dicts: ['product_series'],\r\n props: {\r\n dialogShow: {\r\n type: Boolean,\r\n default: false\r\n },\r\n isSingle: {\r\n type: Boolean,\r\n default: true\r\n },\r\n users: {\r\n type: Array\r\n }\r\n },\r\n data() {\r\n return {\r\n dialogVisible: false,\r\n classes: [],\r\n tableRadio: null,\r\n class_idStr: null,\r\n checkrow: null,\r\n rows: []\r\n }\r\n },\r\n watch: {\r\n dialogShow: {\r\n handler(newValue) {\r\n this.dialogVisible = newValue\r\n }\r\n }\r\n },\r\n methods: {\r\n clickChange(item) {\r\n this.tableRadio = item\r\n },\r\n open() {\r\n this.$nextTick(function() {\r\n console.log(this.crud.data)\r\n for (var k = 0; k < this.users.length; k++) {\r\n for (var i = 0; i < this.crud.data.length; i++) {\r\n if (this.crud.data[i].userId == this.users[k].userId) {\r\n this.$refs.table.toggleRowSelection(this.crud.data[i], true)\r\n break\r\n }\r\n }\r\n }\r\n })\r\n },\r\n handleSelectionChange(val, row) {\r\n if (val.length > 1 && this.isSingle) {\r\n this.$refs.table.clearSelection()\r\n this.$refs.table.toggleRowSelection(val.pop())\r\n } else {\r\n this.checkrow = row\r\n }\r\n },\r\n onSelectAll() {\r\n this.$refs.table.clearSelection()\r\n },\r\n close() {\r\n this.crud.resetQuery(false)\r\n this.$emit('update:dialogShow', false)\r\n },\r\n submit() {\r\n // 处理单选\r\n if (this.isSingle && this.tableRadio) {\r\n this.$emit('update:dialogShow', false)\r\n this.$emit('selectUsers', this.tableRadio)\r\n return\r\n }\r\n this.rows = this.$refs.table.selection\r\n if (this.rows.length <= 0) {\r\n this.$message('请先勾选用户')\r\n return\r\n }\r\n this.crud.resetQuery(false)\r\n this.$emit('update:dialogShow', false)\r\n this.$emit('selectUsers', this.rows)\r\n // console.log(this.rows)\r\n },\r\n [CRUD.HOOK.afterRefresh]() {\r\n this.open()\r\n }\r\n }\r\n}\r\n",null]} |