{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\infoManagement\\collocation.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\infoManagement\\collocation.vue","mtime":1684458239152},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport FormDialog from './components/taskForm-dialog.vue'\r\nimport { TableMixin } from '@/mixins/tableMixin'\r\nimport collocation from '@/api/collocation.js'\r\nexport default {\r\n name: 'collocation',\r\n components: {\r\n FormDialog\r\n },\r\n mixins: [TableMixin],\r\n data () {\r\n return {\r\n pageBean: {\r\n pageSize: 20,\r\n page: 1\r\n },\r\n params: {\r\n taskName: '',\r\n taskType: undefined\r\n },\r\n total: 0,\r\n taskClass: '', //任务执行类\r\n taskRate: null, //任务调用频率\r\n taskRateUnit: '', //任务调用频率单位(m:分钟,h:小时,d:天,w:周,M:月,Y:年)\r\n sourceCode: '', //数据源\r\n sourceTable: '', //源表名\r\n taskMemo: '', //任务说明\r\n tableData: [],\r\n taskTypes: [\r\n { value: 1, label: '定时任务' },\r\n { value: 2, label: '非定时任务' }\r\n ],\r\n operation: '操作',\r\n logQuery: '日志查询',\r\n taskStatus: '', //NONE停止任务 NORMAL运行任务 PAUSED暂停任务\r\n loading: false,\r\n multipleSelection: [], // 复选框\r\n showFormDia: false,\r\n title: '',\r\n pId: ''\r\n }\r\n },\r\n created () {\r\n this.getDateList(true)\r\n },\r\n methods: {\r\n // 搜索\r\n onClickSearch () {\r\n this.pageBean.page = 1\r\n this.getDateList()\r\n },\r\n\r\n // 重置\r\n resetQuery () {\r\n this.params.taskName = ''\r\n this.params.taskType = undefined\r\n this.pageBean.page = 1\r\n this.getDateList()\r\n },\r\n\r\n // 新增\r\n openFormDiao () {\r\n this.title = '新增'\r\n this.showFormDia = true\r\n },\r\n handleSizeChange (val) {\r\n this.pageBean.pageSize = val\r\n this.getDateList()\r\n },\r\n handleCurrentChange (val) {\r\n this.pageBean.page = val\r\n this.getDateList()\r\n },\r\n closeFormDiao () {\r\n this.showFormDia = false\r\n },\r\n\r\n // 获取分页数据\r\n getDateList () {\r\n let data = {\r\n pageBean: this.pageBean,\r\n querys: [\r\n {\r\n property: 'taskName',\r\n operation: 'LIKE',\r\n value: this.params.taskName,\r\n group: 'filter',\r\n relation: 'AND'\r\n }\r\n ]\r\n }\r\n let data1 = {\r\n property: 'taskType',\r\n operation: 'EQUAL',\r\n value: this.params.taskType,\r\n group: 'filter',\r\n relation: 'AND'\r\n }\r\n if (this.params.taskType) {\r\n data.querys.push(data1)\r\n }\r\n collocation.listQuery(data, res => {\r\n if (res.state && res.rows) {\r\n res.rows.forEach(ii => {\r\n console.log(ii)\r\n this.taskTypes.forEach(ee => {\r\n if (ee.value === ii.taskType) {\r\n ii['taskType'] = ee.label\r\n }\r\n })\r\n })\r\n }\r\n this.total = res.total\r\n this.tableData = res.rows\r\n this.loading = false\r\n })\r\n },\r\n\r\n // 批量删除\r\n deleteSelect () {\r\n this.$confirm('确定删除选中数据?', '提示', {\r\n confirmButtonText: '确 定',\r\n cancelButtonText: '取 消',\r\n type: 'warning'\r\n })\r\n .then(() => {\r\n collocation\r\n .remove(this.multipleSelection, res => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '删除成功',\r\n duration: 2000\r\n // offset: 80\r\n })\r\n // this.multipleSelection = [];\r\n this.$refs.multipleSelection.clearSelection()\r\n this.pageBean.page = 1\r\n this.getDateList()\r\n }\r\n })\r\n .catch(res => {\r\n this.$notify({\r\n type: 'error',\r\n message: res.message,\r\n duration: 2000,\r\n offset: 80\r\n })\r\n this.getDateList()\r\n })\r\n })\r\n .catch(() => { })\r\n },\r\n // 删除单个数据\r\n handleDelete (row) {\r\n this.$confirm('确定删除选中数据?', '提示', {\r\n confirmButtonText: '确 定',\r\n cancelButtonText: '取 消',\r\n type: 'warning'\r\n })\r\n .then(() => {\r\n collocation\r\n .remove(row.id, res => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '删除成功',\r\n duration: 2000\r\n // offset: 80\r\n })\r\n }\r\n this.pageBean.page = 1\r\n this.getDateList()\r\n })\r\n .catch(res => {\r\n this.$notify({\r\n type: 'error',\r\n message: res.message,\r\n duration: 2000,\r\n offset: 80\r\n })\r\n this.getDateList()\r\n })\r\n })\r\n .catch(() => { })\r\n },\r\n // 任务启动状态\r\n startUpJob (row) {\r\n console.log(row.id)\r\n let taskId = row.id\r\n if (row.taskStatus === 'NONE') {\r\n console.log(row.taskStatus)\r\n collocation.startUpJob(taskId, res => {\r\n if (res.state) {\r\n console.log(res)\r\n row.taskStatus = 'NORMAL'\r\n }\r\n })\r\n }\r\n if (row.taskStatus === 'PAUSED') {\r\n console.log(row.taskStatus)\r\n collocation.startUpJob(taskId, res => {\r\n if (res.state) {\r\n console.log(res)\r\n row.taskStatus = 'NORMAL'\r\n this.$message({\r\n message: '开启成功',\r\n type: 'success',\r\n duration: 2000\r\n })\r\n }\r\n })\r\n }\r\n if (row.taskStatus === 'NORMAL') {\r\n console.log(row.taskStatus)\r\n collocation.stopJob(taskId, res => {\r\n if (res.state) {\r\n console.log(res)\r\n row.taskStatus = 'PAUSED'\r\n this.$message({\r\n message: '暂停成功',\r\n type: 'success',\r\n duration: 2000\r\n })\r\n }\r\n })\r\n }\r\n },\r\n // 修改\r\n handleUpdate (row) {\r\n this.title = '修改'\r\n this.pId = row.id\r\n this.showFormDia = true\r\n\r\n },\r\n handleSelectionChange (val) {\r\n this.multipleSelection = val.map(item => {\r\n return item.id\r\n })\r\n },\r\n // 指定一个key标识这一行的数据\r\n getRowKey (row) {\r\n return row.id\r\n },\r\n\r\n // 跳转日志查询\r\n toLogQuery (row) {\r\n console.log(row);\r\n\r\n this.$router.push({\r\n path: 'LogQuery',\r\n query: { id: row.id, taskName: row.taskName }\r\n })\r\n }\r\n }\r\n}\r\n",null]}