{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\resourceManage\\CollectionTask.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\resourceManage\\CollectionTask.vue","mtime":1686644136998},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 FormDialog from \"./components/taskFormDialog.vue\";\nimport { TableMixin } from '@/mixins/tableMixin';\nimport collection from '@/api/device/collection.js';\nimport req from '@/request.js';\nexport default {\n name: 'CollectionTask',\n components: {\n FormDialog: FormDialog\n },\n mixins: [TableMixin],\n data: function data() {\n return {\n querys: [{\n group: 'filter',\n operation: 'LIKE',\n property: 'taskName',\n relation: 'AND',\n value: ''\n }, {\n group: 'filter',\n operation: 'EQUAL',\n property: 'taskType',\n relation: 'AND',\n value: ''\n }],\n total: 0,\n taskClass: '',\n //任务执行类\n taskRate: null,\n //任务调用频率\n taskRateUnit: '',\n //任务调用频率单位(m:分钟,h:小时,d:天,w:周,M:月,Y:年)\n sourceCode: '',\n //数据源\n sourceTable: '',\n //源表名\n taskMemo: '',\n //任务说明\n tableData: [],\n taskTypes: [{\n value: 1,\n label: '定时任务'\n }, {\n value: 2,\n label: '非定时任务'\n }],\n operation: '操作',\n logQuery: '日志查询',\n taskStatus: '',\n //NONE停止任务 NORMAL运行任务 PAUSED暂停任务\n loading: false,\n multipleSelection: [],\n // 复选框\n title: ''\n };\n },\n created: function created() {},\n methods: {\n // 获取分页数据\n loadData: function loadData(page) {\n var _this = this;\n\n if (page) {\n this.queryParam.pageBean.page = page;\n }\n\n this.loading = true;\n this.tableData = [];\n this.queryParam.querys = [];\n\n if (this.querys[0].value) {\n this.queryParam.querys.push(this.querys[0]);\n }\n\n if (this.querys[1].value) {\n this.queryParam.querys.push(this.querys[1]);\n }\n\n collection.listQuery(this.queryParam, function (res) {\n if (res.rows && res.rows.length) {\n _this.total = res.total;\n _this.tableData = _this.formatData(res.rows);\n }\n\n _this.$set(_this.tableData);\n\n _this.loading = false;\n });\n },\n formatData: function formatData(rows) {\n var _this2 = this;\n\n rows.forEach(function (item) {\n _this2.taskTypes.forEach(function (type) {\n if (type.value === item.taskType) {\n item['taskType'] = type.label;\n }\n });\n });\n return rows;\n },\n clearQuerys: function clearQuerys() {\n this.querys[0].value = '';\n this.querys[1].value = '';\n },\n reload: function reload() {\n this.loadData(1);\n },\n // 任务启动状态\n startUpJob: function startUpJob(row) {\n var _this3 = this;\n\n console.log(row.id);\n var taskId = row.id;\n\n if (row.taskStatus === 'NONE') {\n console.log(row.taskStatus);\n collection.startUpJob(taskId, function (res) {\n if (res.state) {\n console.log(res);\n row.taskStatus = 'NORMAL';\n }\n });\n }\n\n if (row.taskStatus === 'PAUSED') {\n console.log(row.taskStatus);\n collection.startUpJob(taskId, function (res) {\n if (res.state) {\n console.log(res);\n row.taskStatus = 'NORMAL';\n\n _this3.$notify({\n message: '开启成功',\n type: 'success',\n duration: 2000\n });\n }\n });\n }\n\n if (row.taskStatus === 'NORMAL') {\n console.log(row.taskStatus);\n collection.stopJob(taskId, function (res) {\n if (res.state) {\n console.log(res);\n row.taskStatus = 'PAUSED';\n\n _this3.$notify({\n message: '暂停成功',\n type: 'success',\n duration: 2000\n });\n }\n });\n }\n },\n // 跳转日志查询\n toLogQuery: function toLogQuery(row) {\n if (this.$route.path.indexOf('frontPlat') !== -1) {\n this.$router.push({\n name: 'LogQuery',\n query: {\n id: row.id,\n taskName: row.taskName\n }\n });\n } else {\n this.$router.push({\n name: 'LogQueryLink',\n query: {\n id: row.id,\n taskName: row.taskName\n }\n });\n }\n },\n handleDelete: function handleDelete() {\n var _this4 = this;\n\n var task = window.context.task;\n req.remove(task + '/biz/task/schedulerTask/v1/' + '?ids=' + this.multipleSelection).then(function (res) {\n _this4.$notify({\n type: 'success',\n message: '删除成功',\n duration: 2000\n });\n\n _this4.loadData();\n });\n }\n }\n};",null]}