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

1 line
5.0 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\\history\\deviceErrorInfo\\index.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\acs\\history\\deviceErrorInfo\\index.vue","mtime":1732871026609},{"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\r\nimport CRUD, { crud, form, header, presenter } from '@crud/crud'\r\nimport rrOperation from '@crud/RR.operation'\r\nimport crudOperation from '@crud/CRUD.operation'\r\nimport udOperation from '@crud/UD.operation'\r\nimport pagination from '@crud/Pagination'\r\nimport crudAcsDeviceErrorLog from '@/api/acs/history/acsDeviceErrorLog'\r\nimport { download } from '@/api/data'\r\nimport { downloadFile } from '@/utils'\r\n\r\nconst defaultForm = { error_log_uuid: null, device_code: null, error_code: null, error_info: null, error_time: null }\r\nexport default {\r\n name: 'DeviceErrorLog',\r\n components: { pagination, crudOperation, rrOperation, udOperation },\r\n mixins: [presenter(), header(), form(defaultForm), crud()],\r\n cruds() {\r\n return CRUD({\r\n title: '设备报警记录',\r\n url: 'api/deviceErrorLog',\r\n idField: 'error_log_uuid',\r\n sort: 'error_log_uuid,desc',\r\n crudMethod: {\r\n ...crudAcsDeviceErrorLog },\r\n optShow: {\r\n add: false,\r\n edit: false,\r\n del: false,\r\n download: false\r\n }\r\n })\r\n },\r\n data() {\r\n return {\r\n permission: {\r\n add: ['admin', 'deviceErrorLog:add'],\r\n edit: ['admin', 'deviceErrorLog:edit'],\r\n del: ['admin', 'adeviceErrorLog:del']\r\n },\r\n rules: {},\r\n queryTypeOptions: [\r\n { key: 'device_code', display_name: '设备编码' },\r\n { key: 'error_code', display_name: '报警编码' },\r\n { key: 'error_info', display_name: '报警信息' }\r\n ],\r\n value: [],\r\n pickerOptions: {\r\n shortcuts: [{\r\n text: this.$t('monitor.lucence.the_past_week'),\r\n onClick(picker) {\r\n const end = new Date()\r\n const start = new Date()\r\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)\r\n picker.$emit('pick', [start, end])\r\n }\r\n }, {\r\n text: this.$t('monitor.lucence.the_past_month'),\r\n onClick(picker) {\r\n const end = new Date()\r\n const start = new Date()\r\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)\r\n picker.$emit('pick', [start, end])\r\n }\r\n }, {\r\n text: this.$t('monitor.lucence.the_past_three_months'),\r\n onClick(picker) {\r\n const end = new Date()\r\n const start = new Date()\r\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)\r\n picker.$emit('pick', [start, end])\r\n }\r\n }]\r\n }\r\n }\r\n },\r\n methods: {\r\n\r\n // 钩子在获取表格数据之前执行false 则代表不获取数据\r\n [CRUD.HOOK.beforeRefresh]() {\r\n console.log(this.query.value)\r\n return true\r\n },\r\n pickerChange() {\r\n if (this.value && this.value.length === 2) {\r\n this.query.start_time = this.value[0]\r\n this.query.end_time = this.value[1]\r\n } else {\r\n this.query.start_time = ''\r\n this.query.end_time = ''\r\n }\r\n },\r\n doExportDeviceErrorLogging() {\r\n this.downLoadTaskLogging = true\r\n const params = {\r\n device_code: this.query.device_code,\r\n error_code: this.query.error_code,\r\n error_info: this.query.error_info,\r\n start_time: this.query.start_time,\r\n end_time: this.query.end_time\r\n }\r\n const url = '/api/deviceErrorLog/download'\r\n download(url, params).then(result => {\r\n downloadFile(result, this.crud.title + '数据', 'csv')\r\n this.downLoadTaskTreeLogging = false\r\n }).catch(() => {\r\n this.downLoadTaskTreeLogging = false\r\n })\r\n }\r\n }\r\n}\r\n",null]}