|
@@ -59,9 +59,7 @@
|
|
|
<el-table v-loading="loading" :data="list" :height="list.length ? tableHeight : 'auto'">
|
|
|
<el-table-column label="ID" align="center" prop="id" />
|
|
|
<el-table-column label="任务名称" align="center">
|
|
|
- <template v-slot="scope">{{
|
|
|
- scope.row.taskInfoDO.taskName
|
|
|
- }}</template>
|
|
|
+ <template v-slot="scope"> {{scope.row.taskInfoDO!=null ?scope.row.taskInfoDO.taskName:"" }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="任务类型" align="center">
|
|
|
<template v-slot="scope">
|
|
@@ -128,7 +126,7 @@
|
|
|
<el-table-column label="ID" align="center" prop="id" />
|
|
|
<el-table-column label="任务名称" align="center">
|
|
|
<template v-slot="scope">
|
|
|
- {{ scope.row.taskInfoDO.taskName }}
|
|
|
+ {{ scope.row.taskInfoDO!=null ?scope.row.taskInfoDO.taskName:"" }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="任务类型" align="center">
|
|
@@ -197,7 +195,7 @@
|
|
|
<el-table-column label="ID" align="center" prop="id" />
|
|
|
<el-table-column label="任务名称" align="center">
|
|
|
<template v-slot="scope">
|
|
|
- {{ scope.row.taskInfoDO.taskName }}
|
|
|
+ {{scope.row.taskInfoDO!=null ?scope.row.taskInfoDO.taskName:"" }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="任务类型" align="center">
|
|
@@ -268,7 +266,7 @@
|
|
|
<el-table-column label="ID" align="center" prop="id" />
|
|
|
<el-table-column label="任务名称" align="center">
|
|
|
<template v-slot="scope">
|
|
|
- {{scope.row.taskInfoDO.taskName }}
|
|
|
+ {{scope.row.taskInfoDO!=null ?scope.row.taskInfoDO.taskName:'' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="任务类型" align="center">
|
|
@@ -444,7 +442,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="持续时间" prop="time">
|
|
|
+ <el-form-item label="持续时间" prop="time" v-if="form.time">
|
|
|
<el-date-picker clearable v-model="form.time" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
|
|
|
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']"
|
|
|
placeholder="请选择任务持续时间" />
|
|
@@ -646,6 +644,7 @@ export default {
|
|
|
status: 0,
|
|
|
time: "",
|
|
|
orgTypes: [],
|
|
|
+ startTime:null
|
|
|
},
|
|
|
defaultProps: {},
|
|
|
// 表单校验
|
|
@@ -700,9 +699,9 @@ export default {
|
|
|
},
|
|
|
created() { },
|
|
|
mounted() {
|
|
|
- this.filteredData = this.getDictDatas(DICT_TYPE.TASK_TYPE).filter(
|
|
|
- ({ label }) => label === "周期性检查" || label === "临时性任务"
|
|
|
- );
|
|
|
+ // this.filteredData = this.getDictDatas(DICT_TYPE.TASK_TYPE).filter(
|
|
|
+ // ({ label }) => label === "周期性检查" || label === "临时性任务"
|
|
|
+ // );
|
|
|
this.filteredDataType = this.getDictDatas(DICT_TYPE.TASK_TYPE).filter(
|
|
|
({ label }) =>
|
|
|
label === "周期性检查" ||
|
|
@@ -751,6 +750,7 @@ export default {
|
|
|
console.log(e._props.name, "e._props.name;e._props.name;");
|
|
|
const name = e._props.name;
|
|
|
this.queryParams.iscycle = "";
|
|
|
+ this.list=[]
|
|
|
switch (name) {
|
|
|
case "type1":
|
|
|
this.queryParams.taskStatus = "1";
|
|
@@ -851,7 +851,7 @@ export default {
|
|
|
this.queryParams.taskStatus = this.taskStatus;
|
|
|
this.loading = true;
|
|
|
if (this.selectedTab == "type0") {
|
|
|
- this.queryParams.creator = this.$store.state.user.i;
|
|
|
+ this.queryParams.creator = this.$store.state.user.id;
|
|
|
} else {
|
|
|
this.queryParams.creator = undefined;
|
|
|
}
|
|
@@ -867,9 +867,9 @@ export default {
|
|
|
});
|
|
|
} else {
|
|
|
// 执行查询
|
|
|
- console.log(this.queryParams, 'query1');
|
|
|
getNoPeriodicityPage(this.queryParams).then((response) => {
|
|
|
this.list = response.data.list;
|
|
|
+ console.log(response.data.list, 'query1');
|
|
|
this.total = response.data.total;
|
|
|
this.loading = false;
|
|
|
});
|
|
@@ -906,10 +906,11 @@ export default {
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
this.queryParams.pageNo = 1;
|
|
|
- getTaskInfoPage({ taskType: this.queryParams.taskType, taskStatus: this.queryParams?.taskStatus, taskName: this.queryParams?.taskName, pageNo: 1, pageSize: 10 }).then(res => {
|
|
|
- this.list = res.data.list;
|
|
|
- this.total = res.data.total;
|
|
|
- })
|
|
|
+ this.getList()
|
|
|
+ // getTaskInfoPage({ taskType: this.queryParams.taskType, taskStatus: this.queryParams?this.queryParams.taskStatus:0, taskName: this.queryParams?this.queryParams.taskName, pageNo: 1, pageSize: 10 }).then(res => {
|
|
|
+ // this.list = res.data.list;
|
|
|
+ // this.total = res.data.total;
|
|
|
+ // })
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
@@ -939,23 +940,22 @@ export default {
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
- const id = row.id;
|
|
|
+ const id = row.taskId?row.taskId:row.id;
|
|
|
getTaskInfo(id).then((response) => {
|
|
|
- this.form = response.data;
|
|
|
+ this.form = response.data!=null?response.data:{};
|
|
|
this.open = true;
|
|
|
this.title = "修改任务信息管理";
|
|
|
const arr = [];
|
|
|
- arr.push(this.form.startTime, this.form.endTime);
|
|
|
- this.$set(this.form, "time", arr);
|
|
|
+ if(this.form.startTime!=null){
|
|
|
+ arr.push(this.form.startTime, this.form.endTime);
|
|
|
+ this.$set(this.form, "time", arr);
|
|
|
+ }
|
|
|
+
|
|
|
// this.togetOneInspgList(this.form.id)
|
|
|
// this.getTaskBroadPageList(this.form.id)
|
|
|
});
|
|
|
getcycletask(id).then((response) => {
|
|
|
response.data.orgType.map((i) => this.form.orgTypes.push(i.org_type));
|
|
|
- console.log(
|
|
|
- this.form.orgTypes,
|
|
|
- "啊啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦"
|
|
|
- );
|
|
|
});
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
@@ -988,15 +988,19 @@ export default {
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- const id = row.id;
|
|
|
+ const id = row.taskId?row.taskId:row.id;
|
|
|
+ console.log('row', row)
|
|
|
+ let name=row.taskInfoDO!=null?row.taskInfoDO.taskName:(row.taskName?row.taskName:'')
|
|
|
+ let that=this
|
|
|
this.$modal
|
|
|
- .confirm('是否确认删除名称为"' + row.taskName + '"的数据项?')
|
|
|
+ .confirm('是否确认删除名称为"' + name + '"的数据项?')
|
|
|
.then(function () {
|
|
|
return deleteTaskInfo({ id: id });
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.getList();
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
+ console.log('first', first, this.selectedTab)
|
|
|
+ that.getList();
|
|
|
})
|
|
|
.catch(() => { });
|
|
|
},
|
|
@@ -1141,7 +1145,7 @@ export default {
|
|
|
handleInsp(row) {
|
|
|
this.inspreset();
|
|
|
if (row.id) {
|
|
|
- this.form.id = row.id;
|
|
|
+ this.form.id = row.taskId?row.taskId:row.id;
|
|
|
}
|
|
|
// 打开弹窗
|
|
|
this.openinsp = true;
|
|
@@ -1190,7 +1194,7 @@ export default {
|
|
|
// ===============已分检查项========================
|
|
|
handleSelectedInsp(row) {
|
|
|
if (row.id) {
|
|
|
- this.form.id = row.id;
|
|
|
+ this.form.id = row.taskId?row.taskId:row.id;
|
|
|
}
|
|
|
// 打开弹窗
|
|
|
this.openSelectedInsp = true;
|