|
@@ -1,15 +1,15 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
- <el-form-item label="任务名称" prop="taskName">
|
|
|
+ <el-form-item label="计划名称" prop="taskName">
|
|
|
<el-input
|
|
|
v-model="queryParams.taskName"
|
|
|
- placeholder="请输入任务名称"
|
|
|
+ placeholder="请输入计划名称"
|
|
|
clearable
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="任务状态" prop="taskStatus">
|
|
|
+ <el-form-item label="计划状态" prop="taskStatus">
|
|
|
<el-select v-model="queryParams.taskStatus" placeholder="请选择任务状态" clearable>
|
|
|
<el-option
|
|
|
v-for="dict in dict.type.task_status"
|
|
@@ -55,48 +55,13 @@
|
|
|
>新增
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- plain
|
|
|
- icon="el-icon-edit"
|
|
|
- size="mini"
|
|
|
- :disabled="single"
|
|
|
- @click="handleUpdate"
|
|
|
- v-hasPermi="['ems:inspection-task:edit']"
|
|
|
- >修改
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="danger"
|
|
|
- plain
|
|
|
- icon="el-icon-delete"
|
|
|
- size="mini"
|
|
|
- :disabled="multiple"
|
|
|
- @click="handleDelete"
|
|
|
- v-hasPermi="['ems:inspection-task:remove']"
|
|
|
- >删除
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- plain
|
|
|
- icon="el-icon-download"
|
|
|
- size="mini"
|
|
|
- @click="handleExport"
|
|
|
- v-hasPermi="['ems:inspection-task:export']"
|
|
|
- >导出
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
<el-table v-loading="loading" :data="inspectionTaskList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="任务代码" align="left" prop="taskCode" show-overflow-tooltip width="130"/>
|
|
|
- <el-table-column label="任务名称" align="left" prop="taskName" show-overflow-tooltip width="150"/>
|
|
|
+ <el-table-column label="计划代码" align="left" prop="taskCode" show-overflow-tooltip width="130"/>
|
|
|
+ <el-table-column label="计划名称" align="left" prop="taskName" show-overflow-tooltip width="150"/>
|
|
|
<el-table-column label="巡检对象" align="center" prop="objName" show-overflow-tooltip width="200" >
|
|
|
<template slot-scope="scope">
|
|
|
<div >{{ formatDict(scope.row.objType,dict.type.obj_type)+"-" + scope.row.objName}}</div>
|
|
@@ -148,16 +113,6 @@
|
|
|
<el-form-item label="任务名称" prop="taskName">
|
|
|
<el-input v-model="form.taskName" placeholder="请输入任务名称" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="任务状态" prop="taskStatus">
|
|
|
- <el-radio-group v-model="form.taskStatus">
|
|
|
- <el-radio
|
|
|
- v-for="dict in dict.type.task_status"
|
|
|
- :key="dict.value"
|
|
|
- :label="parseInt(dict.value)"
|
|
|
- >{{ dict.label }}
|
|
|
- </el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
<el-form-item label="开始时间" prop="startTime">
|
|
|
<el-date-picker clearable
|
|
|
v-model="form.startTime"
|
|
@@ -168,16 +123,6 @@
|
|
|
placeholder="请选择开始时间">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="结束时间" prop="endTime">
|
|
|
- <el-date-picker clearable
|
|
|
- v-model="form.endTime"
|
|
|
- type="datetime"
|
|
|
- format="yyyy-MM-dd HH:mm"
|
|
|
- value-format="yyyy-MM-dd HH:mm:00"
|
|
|
- :style="{width: '100%'}"
|
|
|
- placeholder="请选择结束时间">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
<el-form-item label="执行人" prop="executor">
|
|
|
<el-input v-model="form.executor" placeholder="请输入执行人" />
|
|
|
</el-form-item>
|
|
@@ -233,9 +178,7 @@
|
|
|
<script>
|
|
|
import { listArea } from '@/api/basecfg/area';
|
|
|
import { listFacs } from '@/api/basecfg/emsfacs';
|
|
|
-import {
|
|
|
- addInspectionTask, delInspectionTask, getInspectionTask, listInspectionTask, updateInspectionTask,
|
|
|
-} from '@/api/task/inspectionTask';
|
|
|
+import { addInspectionPlan, delInspectionPlan, getInspectionPlan, listInspectionPlan, updateInspectionPlan } from '@/api/task/inspectionPlan';
|
|
|
import { OBJ_TYPE } from '@/enums/DeviceFac';
|
|
|
import { TASK_TYPES } from '@/enums/TaskEnums';
|
|
|
import { copyObj } from '@/utils';
|
|
@@ -416,7 +359,7 @@ export default {
|
|
|
/** 查询巡检任务列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listInspectionTask(this.queryParams).then(response => {
|
|
|
+ listInspectionPlan(this.queryParams).then(response => {
|
|
|
this.inspectionTaskList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
@@ -464,16 +407,16 @@ export default {
|
|
|
handleAdd() {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
- this.title = '添加巡检任务';
|
|
|
+ this.title = '添加巡检计划';
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
const id = row.id || this.ids;
|
|
|
- getInspectionTask(id).then(response => {
|
|
|
+ getInspectionPlan(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
- this.title = '修改巡检任务';
|
|
|
+ this.title = '修改巡检计划';
|
|
|
this.$nextTick(() => {
|
|
|
this.objHandle()[this.form.objType]({ objCode: this.form.objCode });
|
|
|
});
|
|
@@ -484,13 +427,13 @@ export default {
|
|
|
this.$refs['form'].validate(valid => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
|
- updateInspectionTask(this.form).then(response => {
|
|
|
+ updateInspectionPlan(this.form).then(response => {
|
|
|
this.$modal.msgSuccess('修改成功');
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
- addInspectionTask(this.form).then(response => {
|
|
|
+ addInspectionPlan(this.form).then(response => {
|
|
|
this.$modal.msgSuccess('新增成功');
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -503,18 +446,13 @@ export default {
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
|
this.$modal.confirm('是否确认删除巡检任务编号为"' + ids + '"的数据项?').then(function () {
|
|
|
- return delInspectionTask(ids);
|
|
|
+ return delInspectionPlan(ids);
|
|
|
}).then(() => {
|
|
|
this.getList();
|
|
|
this.$modal.msgSuccess('删除成功');
|
|
|
}).catch(() => {});
|
|
|
},
|
|
|
- /** 导出按钮操作 */
|
|
|
- handleExport() {
|
|
|
- this.download('ems/inspectionTask/export', {
|
|
|
- ...this.queryParams,
|
|
|
- }, `inspectionTask_${new Date().getTime()}.xlsx`);
|
|
|
- },
|
|
|
+
|
|
|
onReportSubmit() {
|
|
|
this.$modal.msgSuccess('提交成功');
|
|
|
this.openInspection = false;
|
|
@@ -522,7 +460,7 @@ export default {
|
|
|
},
|
|
|
handleInspection(row) {
|
|
|
const id = row.id;
|
|
|
- getInspectionTask(id).then(response => {
|
|
|
+ getInspectionPlan(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.reportForm.show();
|