Files
tekelanew_acs/acs/nladmin-ui/node_modules/.cache/vue-loader/d4321b210c882d5a4b48f521ad8e0722.json
2024-12-05 09:33:18 +08:00

1 line
6.7 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"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\\acs\\instruction\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\acs\\instruction\\index.vue","mtime":1732871026613},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 crudInstruction from '@/api/acs/instruction/instruction'\r\nimport CRUD, { presenter, header, form, crud } from '@crud/crud'\r\nimport crudOperation from '@crud/CRUD.operation'\r\nimport rrOperation from '@crud/RR.operation'\r\nimport { getDicts } from '@/views/system/dict/dict'\r\nimport pagination from '@crud/Pagination'\r\n\r\nconst defaultForm = {\r\n instruction_id: null,\r\n task_id: null,\r\n instruction_code: null,\r\n execute_device_code: null,\r\n execute_status: null,\r\n execute_status_description: null,\r\n follow_device_code: null,\r\n instruction_type: null,\r\n instruction_status: null,\r\n send_status: null,\r\n create_type: null,\r\n finish_type: null,\r\n priority: null,\r\n execute_code: null,\r\n execute_message: null,\r\n start_point_code: null,\r\n start_device_code: null,\r\n next_point_code: null,\r\n next_device_code: null,\r\n from_x: null,\r\n from_y: null,\r\n from_z: null,\r\n to_x: null,\r\n to_y: null,\r\n to_z: null,\r\n last_instruction_id: null,\r\n can_modify: null,\r\n remark: null,\r\n is_active: null,\r\n is_delete: null,\r\n create_by: null,\r\n create_time: null,\r\n update_by: null,\r\n update_time: null\r\n}\r\nexport default {\r\n dicts: ['task_status', 'task_type'],\r\n name: 'Instruction',\r\n components: { crudOperation, pagination, rrOperation },\r\n mixins: [presenter(), header(), form(defaultForm), crud()],\r\n cruds() {\r\n return CRUD({\r\n title: 'Instruction',\r\n url: 'api/instruction',\r\n idField: 'instruction_id',\r\n sort: 'instruction_id,desc',\r\n crudMethod: { ...crudInstruction },\r\n optShow: {\r\n add: false,\r\n edit: true,\r\n del: true\r\n }\r\n })\r\n },\r\n data() {\r\n return {\r\n permission: {\r\n add: ['admin', 'instruction:add'],\r\n edit: ['admin', 'instruction:edit'],\r\n del: ['admin', 'instruction:del']\r\n },\r\n rules: {\r\n instruction_id: [\r\n { required: true, message: this.$t('Inst.rules.NotNull'), trigger: 'blur' }\r\n ],\r\n instruction_code: [\r\n { required: true, message: this.$t('Inst.rules.NotNull'), trigger: 'blur' }\r\n ],\r\n can_modify: [\r\n { required: true, message: this.$t('Inst.rules.NotNull'), trigger: 'blur' }\r\n ],\r\n is_active: [\r\n { required: true, message: this.$t('Inst.rules.NotNull'), trigger: 'blur' }\r\n ],\r\n is_delete: [\r\n { required: true, message: this.$t('Inst.rules.NotNull'), trigger: 'blur' }\r\n ],\r\n create_by: [\r\n { required: true, message: this.$t('Inst.rules.NotNull'), trigger: 'blur' }\r\n ],\r\n create_time: [\r\n { required: true, message: this.$t('Inst.rules.NotNull'), trigger: 'blur' }\r\n ]\r\n }\r\n }\r\n },\r\n created() {\r\n getDicts().then(data => {\r\n this.dicts = data\r\n })\r\n },\r\n methods: {\r\n // 钩子在获取表格数据之前执行false 则代表不获取数据\r\n [CRUD.HOOK.beforeRefresh]() {\r\n return true\r\n },\r\n // https://www.cnblogs.com/jdWu-d/p/11898666.html\r\n finish(index, row) {\r\n crudInstruction.finish(row.instruction_id).then(res => {\r\n this.crud.toQuery()\r\n this.crud.notify('完成成功', CRUD.NOTIFICATION_TYPE.SUCCESS)\r\n }).catch(err => {\r\n console.log(err.response.data.message)\r\n })\r\n },\r\n cancel(index, row) {\r\n crudInstruction.cancel(row.instruction_id).then(res => {\r\n this.crud.toQuery()\r\n this.crud.notify('取消成功', CRUD.NOTIFICATION_TYPE.SUCCESS)\r\n }).catch(err => {\r\n console.log(err.response.data.message)\r\n })\r\n },\r\n forceCancel(index, row) {\r\n crudInstruction.forceCancel(row.instruction_id).then(res => {\r\n this.crud.toQuery()\r\n this.crud.notify('强制取消成功', CRUD.NOTIFICATION_TYPE.SUCCESS)\r\n }).catch(err => {\r\n console.log(err.response.data.message)\r\n })\r\n },\r\n init(index, row) {\r\n crudInstruction.init(row.instruction_id).then(res => {\r\n this.crud.toQuery()\r\n this.crud.notify('初始化成功', CRUD.NOTIFICATION_TYPE.SUCCESS)\r\n }).catch(err => {\r\n console.log(err.response.data.message)\r\n })\r\n },\r\n reload() {\r\n crudInstruction.reload().then(res => {\r\n this.crud.toQuery()\r\n }).catch(err => {\r\n console.log(err.response.data.message)\r\n })\r\n },\r\n\r\n beforeHandleCommand(index, row, command) {\r\n return {\r\n 'index': index,\r\n 'row': row,\r\n 'command': command\r\n }\r\n },\r\n handleCommand(index, row, command) {\r\n switch (command) {\r\n case 'a':// 完成\r\n this.finish(index, row)\r\n break\r\n case 'b':// 取消\r\n this.cancel(index, row)\r\n break\r\n case 'c':// 强制取消\r\n this.forceCancel(index, row)\r\n break\r\n case 'd':// 初始化\r\n this.init(index, row)\r\n break\r\n }\r\n }\r\n\r\n }\r\n}\r\n",null]}