{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\reportManagement\\BigScreen\\ClassificationManagement.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\reportManagement\\BigScreen\\ClassificationManagement.vue","mtime":1675071993053},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\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//\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//\n//\n//\n//\n\r\nimport report from '@/api/report.js'\r\nimport { isDate } from 'moment'\r\n\r\nexport default {\r\n name: 'table-code',\r\n data() {\r\n const validatorFactror = (rule, value, callback) => {\r\n // if (!Number(value)) {\r\n // return callback(new Error('只能输入数字'))\r\n // }\r\n const reg = /^[+-]?(0|([1-9]\\d*))(\\.\\d+)?$/g\r\n if (!reg.test(value)) {\r\n callback(new Error('只能输入数字'))\r\n }\r\n callback()\r\n }\r\n return {\r\n data: [],\r\n pageResult: {\r\n page: 1,\r\n pageSize: 50,\r\n total: 0\r\n },\r\n dialogVisible: false,\r\n dialogVisibleEdit: false,\r\n form: {\r\n categoryKey: '',\r\n categoryValue: '',\r\n id: '',\r\n isDele: '',\r\n pkVal: '',\r\n tenantId: ''\r\n },\r\n rules: {\r\n categoryKey: [\r\n {required: true, message: '请输入模块名', trigger: 'blur'}\r\n ],\r\n categoryValue: [\r\n {required: true, message: '请输入模块值', trigger: 'blur'},\r\n {validator: validatorFactror}\r\n ]\r\n }\r\n }\r\n },\r\n mounted() {},\r\n methods: {\r\n loadData(param, cb) {\r\n report\r\n .getClassific(param)\r\n .then(response => {\r\n this.pageResult = {\r\n page: response.page,\r\n pageSize: response.pageSize,\r\n total: response.total\r\n }\r\n this.data = response.rows\r\n })\r\n .finally(() => {\r\n if (cb) {\r\n cb()\r\n }\r\n })\r\n },\r\n //编辑\r\n handelEdit(data) {\r\n this.dialogVisibleEdit = true\r\n this.form = data\r\n this.form.categoryKey = data.categoryKey\r\n this.form.categoryValue = data.categoryValue\r\n this.form.id = data.id\r\n this.form.isDele = data.isDele\r\n },\r\n handelCancel() {\r\n this.form = {\r\n categoryKey: '',\r\n categoryValue: '',\r\n id: '',\r\n isDate: ''\r\n }\r\n this.dialogVisible = false\r\n this.dialogVisibleEdit = false\r\n },\r\n handleClose(done) {\r\n this.form = {\r\n categoryKey: '',\r\n categoryValue: '',\r\n id: '',\r\n isDate: ''\r\n }\r\n done()\r\n },\r\n //修改保存\r\n handelSaveEdit() {\r\n this.$refs.form.validate(bool => {\r\n if (bool) {\r\n this.dialogVisibleEdit = false\r\n report\r\n .editSave({\r\n categoryKey: this.form.categoryKey,\r\n categoryValue: this.form.categoryValue,\r\n id: this.form.id,\r\n isDele:this.form.isDele\r\n })\r\n .then(res => {\r\n this.loadData()\r\n })\r\n }else {\r\n this.$message.error('请重新检查输入值')\r\n }\r\n })\r\n },\r\n //添加\r\n addSave() {\r\n this.dialogVisible = true\r\n },\r\n //添加保存\r\n handelSave() {\r\n this.$refs.form.validate(bool => {\r\n if (bool) {\r\n this.dialogVisible = false\r\n report\r\n .editSave({\r\n categoryKey: this.form.categoryKey,\r\n categoryValue: this.form.categoryValue\r\n })\r\n .then(res => {\r\n this.loadData()\r\n })\r\n } else {\r\n this.$message.error('模块值必须为数字')\r\n }\r\n })\r\n },\r\n //删除\r\n handelDelete(id) {\r\n report.delClassific(id).then(res => {\r\n this.loadData()\r\n })\r\n }\r\n }\r\n}\r\n",null]}