|
|
@ -35,7 +35,8 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-divider style="margin: 15px"></el-divider>
|
|
|
|
<el-divider style="margin: 15px"></el-divider>
|
|
|
|
<el-table :data="list" @row-click="rowClick" v-loading="loading" click-row-light
|
|
|
|
<el-table :data="list" @row-click="rowClick" v-loading="loading" click-row-light
|
|
|
|
highlight-current-row>
|
|
|
|
highlight-current-row
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-table-column label="序号" width="50" type="index"/>
|
|
|
|
<el-table-column label="序号" width="50" type="index"/>
|
|
|
|
<el-table-column label="计划单号" width="150" prop="planBillNo"/>
|
|
|
|
<el-table-column label="计划单号" width="150" prop="planBillNo"/>
|
|
|
|
<el-table-column label="计划名称" width="150" prop="name"/>
|
|
|
|
<el-table-column label="计划名称" width="150" prop="name"/>
|
|
|
@ -95,7 +96,8 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-table :data="detailList"
|
|
|
|
<el-table :data="detailList"
|
|
|
|
v-loading="detailLoading" click-row-light
|
|
|
|
v-loading="detailLoading" click-row-light
|
|
|
|
highlight-current-row>
|
|
|
|
highlight-current-row
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-table-column label="序号" width="50" type="index"/>
|
|
|
|
<el-table-column label="序号" width="50" type="index"/>
|
|
|
|
<el-table-column label="科室名称" prop="deptName"/>
|
|
|
|
<el-table-column label="科室名称" prop="deptName"/>
|
|
|
|
<el-table-column label="设备编号" prop="deviceCode"/>
|
|
|
|
<el-table-column label="设备编号" prop="deviceCode"/>
|
|
|
@ -135,7 +137,8 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<devicePlanEdit :originData="planData"
|
|
|
|
<devicePlanEdit :originData="planData"
|
|
|
|
:closePlanEdit="closePlanEdit"
|
|
|
|
:closePlanEdit="closePlanEdit"
|
|
|
|
:createFlag="createFlag"/>
|
|
|
|
:createFlag="createFlag"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -150,7 +153,8 @@
|
|
|
|
:planId="detailQuery.planId"
|
|
|
|
:planId="detailQuery.planId"
|
|
|
|
:projectItem="projectItem"
|
|
|
|
:projectItem="projectItem"
|
|
|
|
:pullData="planData"
|
|
|
|
:pullData="planData"
|
|
|
|
:closeAddDevice="closeAddDevice"/>
|
|
|
|
:closeAddDevice="closeAddDevice"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -160,50 +164,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import {devicePlanDel, devicePlanInfo, devicePlanPage, devicePlanSave} from "@/api/dev/devicePlanApi";
|
|
|
|
import { devicePlanDel, devicePlanInfo, devicePlanPage, devicePlanSave } from '@/api/dev/devicePlanApi'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
devicePlanDetailDel,
|
|
|
|
devicePlanDetailDel,
|
|
|
|
devicePlanDetailPage, devicePlanDetailDelByDeviceCode
|
|
|
|
devicePlanDetailPage, devicePlanDetailDelByDeviceCode
|
|
|
|
} from "@/api/dev/devicePlanDetailApi";
|
|
|
|
} from '@/api/dev/devicePlanDetailApi'
|
|
|
|
import {getLoading} from "@/utils";
|
|
|
|
import { getLoading } from '@/utils'
|
|
|
|
import product from "@/views/basic/product/product.vue";
|
|
|
|
import product from '@/views/basic/product/product.vue'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
devicePlanDetailItemAdd, devicePlanDetailItemByDeviceCodeDel,
|
|
|
|
devicePlanDetailItemAdd, devicePlanDetailItemByDeviceCodeDel,
|
|
|
|
devicePlanDetailItemDel,
|
|
|
|
devicePlanDetailItemDel,
|
|
|
|
devicePlanDetailItemPage
|
|
|
|
devicePlanDetailItemPage
|
|
|
|
} from "@/api/dev/devicePlanDetailItemApi";
|
|
|
|
} from '@/api/dev/devicePlanDetailItemApi'
|
|
|
|
import DeviceCheckItemDict from "@/views/dev/deviceCheckItemDict";
|
|
|
|
import DeviceCheckItemDict from '@/views/dev/deviceCheckItemDict'
|
|
|
|
import {deviceCheckGenByPlanId} from "@/api/dev/deviceCheckApi";
|
|
|
|
import { deviceCheckGenByPlanId } from '@/api/dev/deviceCheckApi'
|
|
|
|
|
|
|
|
|
|
|
|
import DevicePlanProject from "@/views/dev/devicePlanProject";
|
|
|
|
|
|
|
|
import devicePlanEdit from "@/views/dev/devicePlanEdit";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import DevicePlanProject from '@/views/dev/devicePlanProject'
|
|
|
|
|
|
|
|
import devicePlanEdit from '@/views/dev/devicePlanEdit'
|
|
|
|
|
|
|
|
|
|
|
|
let query = {
|
|
|
|
let query = {
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
limit: 10,
|
|
|
|
limit: 10,
|
|
|
|
name: null,
|
|
|
|
name: null,
|
|
|
|
chargeDeptCode: null,
|
|
|
|
chargeDeptCode: null,
|
|
|
|
type:1,
|
|
|
|
type: 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let detailQuery = {
|
|
|
|
let detailQuery = {
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
limit: 10,
|
|
|
|
limit: 10,
|
|
|
|
planId: null,
|
|
|
|
planId: null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let rowDeltailQuery = {
|
|
|
|
let rowDeltailQuery = {
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
limit: 10,
|
|
|
|
limit: 10,
|
|
|
|
planId: null,
|
|
|
|
planId: null,
|
|
|
|
productId: null,
|
|
|
|
productId: null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let itemQuery = {
|
|
|
|
let itemQuery = {
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
limit: 10,
|
|
|
|
limit: 10,
|
|
|
|
planId: null,
|
|
|
|
planId: null,
|
|
|
|
productId: null,
|
|
|
|
productId: null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let planData = {
|
|
|
|
let planData = {
|
|
|
@ -215,12 +218,12 @@ let planData = {
|
|
|
|
frequency: 1,
|
|
|
|
frequency: 1,
|
|
|
|
dateInterval: null,
|
|
|
|
dateInterval: null,
|
|
|
|
remark: null,
|
|
|
|
remark: null,
|
|
|
|
type:1,
|
|
|
|
type: 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "devicePlan",
|
|
|
|
name: 'devicePlan',
|
|
|
|
components: {DeviceCheckItemDict, product, devicePlanEdit, DevicePlanProject},
|
|
|
|
components: { DeviceCheckItemDict, product, devicePlanEdit, DevicePlanProject },
|
|
|
|
computed: {},
|
|
|
|
computed: {},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
@ -229,14 +232,14 @@ export default {
|
|
|
|
loading: false,
|
|
|
|
loading: false,
|
|
|
|
total: .0,
|
|
|
|
total: .0,
|
|
|
|
list: [],
|
|
|
|
list: [],
|
|
|
|
query: {...query},
|
|
|
|
query: { ...query },
|
|
|
|
//计划设备明细=============================================
|
|
|
|
//计划设备明细=============================================
|
|
|
|
detailLoading: false,
|
|
|
|
detailLoading: false,
|
|
|
|
detailQuery: {...detailQuery},
|
|
|
|
detailQuery: { ...detailQuery },
|
|
|
|
detailList: [],
|
|
|
|
detailList: [],
|
|
|
|
detailTotal: 0,
|
|
|
|
detailTotal: 0,
|
|
|
|
//巡检项目=============================================
|
|
|
|
//巡检项目=============================================
|
|
|
|
itemQuery: {...itemQuery},
|
|
|
|
itemQuery: { ...itemQuery },
|
|
|
|
itemList: [],
|
|
|
|
itemList: [],
|
|
|
|
itemTotal: 0,
|
|
|
|
itemTotal: 0,
|
|
|
|
itemLoading: false,
|
|
|
|
itemLoading: false,
|
|
|
@ -244,86 +247,86 @@ export default {
|
|
|
|
chooseDeviceList: [],
|
|
|
|
chooseDeviceList: [],
|
|
|
|
chooseItemList: [],
|
|
|
|
chooseItemList: [],
|
|
|
|
//新增/编辑计划===================================================
|
|
|
|
//新增/编辑计划===================================================
|
|
|
|
planEditTitle: "新增计划",
|
|
|
|
planEditTitle: '新增计划',
|
|
|
|
createActive: 0,
|
|
|
|
createActive: 0,
|
|
|
|
createFlag: false,
|
|
|
|
createFlag: false,
|
|
|
|
chooseDeviceFlag: false,
|
|
|
|
chooseDeviceFlag: false,
|
|
|
|
expandRowKeys: [],
|
|
|
|
expandRowKeys: [],
|
|
|
|
dialogExpandRowKeys: [],
|
|
|
|
dialogExpandRowKeys: [],
|
|
|
|
planData: {...planData},
|
|
|
|
planData: { ...planData },
|
|
|
|
formRule: {
|
|
|
|
formRule: {
|
|
|
|
name: [{required: true, message: "计划名称不能为空", trigger: ["change", "blur"]}],
|
|
|
|
name: [{ required: true, message: '计划名称不能为空', trigger: ['change', 'blur'] }],
|
|
|
|
chargeDeptCode: [{required: true, message: "负责部门不能为空", trigger: ["change", "blur"]}],
|
|
|
|
chargeDeptCode: [{ required: true, message: '负责部门不能为空', trigger: ['change', 'blur'] }],
|
|
|
|
dateInterval: [{required: true, message: "计划执行区间不能为空", trigger: ["change", "blur"]}],
|
|
|
|
dateInterval: [{ required: true, message: '计划执行区间不能为空', trigger: ['change', 'blur'] }],
|
|
|
|
frequency: [{
|
|
|
|
frequency: [{
|
|
|
|
required: true,
|
|
|
|
required: true,
|
|
|
|
message: "计划执行频率不能为空",
|
|
|
|
message: '计划执行频率不能为空',
|
|
|
|
trigger: ["change", "blur"]
|
|
|
|
trigger: ['change', 'blur']
|
|
|
|
}],
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
dateInterval: null,
|
|
|
|
dateInterval: null,
|
|
|
|
pickerOptions: {
|
|
|
|
pickerOptions: {
|
|
|
|
disabledDate: time => {
|
|
|
|
disabledDate: time => {
|
|
|
|
let nowDate = new Date().getTime();
|
|
|
|
let nowDate = new Date().getTime()
|
|
|
|
let pickDate = new Date(time).getTime();
|
|
|
|
let pickDate = new Date(time).getTime()
|
|
|
|
return (nowDate >= pickDate);
|
|
|
|
return (nowDate >= pickDate)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
shortcuts: [{
|
|
|
|
shortcuts: [{
|
|
|
|
text: '一个月(30天)',
|
|
|
|
text: '一个月(30天)',
|
|
|
|
onClick(picker) {
|
|
|
|
onClick(picker) {
|
|
|
|
const end = new Date();
|
|
|
|
const end = new Date()
|
|
|
|
const start = new Date();
|
|
|
|
const start = new Date()
|
|
|
|
start.setTime(start.getTime() + 3600 * 1000 * 24);
|
|
|
|
start.setTime(start.getTime() + 3600 * 1000 * 24)
|
|
|
|
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30);
|
|
|
|
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30)
|
|
|
|
picker.$emit('pick', [start, end]);
|
|
|
|
picker.$emit('pick', [start, end])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
}, {
|
|
|
|
text: '三个月(90天)',
|
|
|
|
text: '三个月(90天)',
|
|
|
|
onClick(picker) {
|
|
|
|
onClick(picker) {
|
|
|
|
const end = new Date();
|
|
|
|
const end = new Date()
|
|
|
|
const start = new Date();
|
|
|
|
const start = new Date()
|
|
|
|
start.setTime(start.getTime() + 3600 * 1000 * 24);
|
|
|
|
start.setTime(start.getTime() + 3600 * 1000 * 24)
|
|
|
|
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 3);
|
|
|
|
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 3)
|
|
|
|
picker.$emit('pick', [start, end]);
|
|
|
|
picker.$emit('pick', [start, end])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
}, {
|
|
|
|
text: '半年(180天)',
|
|
|
|
text: '半年(180天)',
|
|
|
|
onClick(picker) {
|
|
|
|
onClick(picker) {
|
|
|
|
const end = new Date();
|
|
|
|
const end = new Date()
|
|
|
|
const start = new Date();
|
|
|
|
const start = new Date()
|
|
|
|
start.setTime(start.getTime() + 3600 * 1000 * 24);
|
|
|
|
start.setTime(start.getTime() + 3600 * 1000 * 24)
|
|
|
|
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 6);
|
|
|
|
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 6)
|
|
|
|
picker.$emit('pick', [start, end]);
|
|
|
|
picker.$emit('pick', [start, end])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
}, {
|
|
|
|
text: '一年(365天)',
|
|
|
|
text: '一年(365天)',
|
|
|
|
onClick(picker) {
|
|
|
|
onClick(picker) {
|
|
|
|
const end = new Date();
|
|
|
|
const end = new Date()
|
|
|
|
const start = new Date();
|
|
|
|
const start = new Date()
|
|
|
|
start.setTime(start.getTime() + 3600 * 1000 * 24);
|
|
|
|
start.setTime(start.getTime() + 3600 * 1000 * 24)
|
|
|
|
end.setTime(start.getTime() + 3600 * 1000 * 24 * 365);
|
|
|
|
end.setTime(start.getTime() + 3600 * 1000 * 24 * 365)
|
|
|
|
picker.$emit('pick', [start, end]);
|
|
|
|
picker.$emit('pick', [start, end])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
projectVisible: false,
|
|
|
|
projectVisible: false,
|
|
|
|
projectItem: null,
|
|
|
|
projectItem: null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
planData(v) {
|
|
|
|
planData(v) {
|
|
|
|
if (v.planId != null) {
|
|
|
|
if (v.planId != null) {
|
|
|
|
this.$set(v, "dateInterval", [v.startDate, v.endDate])
|
|
|
|
this.$set(v, 'dateInterval', [v.startDate, v.endDate])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"planData.dateInterval"(v) {
|
|
|
|
'planData.dateInterval'(v) {
|
|
|
|
if (v != null && v.length > 0) {
|
|
|
|
if (v != null && v.length > 0) {
|
|
|
|
this.planData.startDate = v[0]
|
|
|
|
this.planData.startDate = v[0]
|
|
|
|
this.planData.endDate = v[1]
|
|
|
|
this.planData.endDate = v[1]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"$refs.dialogTable"(v) {
|
|
|
|
'$refs.dialogTable'(v) {
|
|
|
|
|
|
|
|
|
|
|
|
this.$refs.dialogTable?.doLayout()
|
|
|
|
this.$refs.dialogTable?.doLayout()
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -336,12 +339,12 @@ export default {
|
|
|
|
if (expandedRows.length == 0) {
|
|
|
|
if (expandedRows.length == 0) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.$set(row, "detailData", {
|
|
|
|
this.$set(row, 'detailData', {
|
|
|
|
loading: false,
|
|
|
|
loading: false,
|
|
|
|
showSearch: true,
|
|
|
|
showSearch: true,
|
|
|
|
list: [],
|
|
|
|
list: [],
|
|
|
|
total: 0,
|
|
|
|
total: 0,
|
|
|
|
query: {...rowDeltailQuery, planId: row.planId, productId: row.productId}
|
|
|
|
query: { ...rowDeltailQuery, planId: row.planId, productId: row.productId }
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.getRowDetailList(row.detailData)
|
|
|
|
this.getRowDetailList(row.detailData)
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -363,9 +366,9 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
deviceCheckGenFunc(row) {
|
|
|
|
deviceCheckGenFunc(row) {
|
|
|
|
this.$confirm("此操作将会创建一个任务单,是否继续", "提示", {
|
|
|
|
this.$confirm('此操作将会创建一个任务单,是否继续', '提示', {
|
|
|
|
confirmButtonText: "继续",
|
|
|
|
confirmButtonText: '继续',
|
|
|
|
cancelButtonText: "取消"
|
|
|
|
cancelButtonText: '取消'
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
let load = getLoading(this)
|
|
|
|
let load = getLoading(this)
|
|
|
|
deviceCheckGenByPlanId(row.planId).then(res => {
|
|
|
|
deviceCheckGenByPlanId(row.planId).then(res => {
|
|
|
@ -383,9 +386,9 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
delplan(row) {
|
|
|
|
delplan(row) {
|
|
|
|
this.$confirm("此操作将会永久删除该计划,现有任务不受影响,是否继续", "提示", {
|
|
|
|
this.$confirm('此操作将会永久删除该计划,现有任务不受影响,是否继续', '提示', {
|
|
|
|
confirmButtonText: "继续",
|
|
|
|
confirmButtonText: '继续',
|
|
|
|
cancelButtonText: "取消"
|
|
|
|
cancelButtonText: '取消'
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
let load = getLoading(this)
|
|
|
|
let load = getLoading(this)
|
|
|
|
devicePlanDel(row.planId).then(res => {
|
|
|
|
devicePlanDel(row.planId).then(res => {
|
|
|
@ -434,9 +437,9 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
delDetailItem(row) {
|
|
|
|
delDetailItem(row) {
|
|
|
|
this.$confirm("此操作将会永久删除该条明细,且将在下一次任务生效,现有任务不受影响,是否继续", "提示", {
|
|
|
|
this.$confirm('此操作将会永久删除该条明细,且将在下一次任务生效,现有任务不受影响,是否继续', '提示', {
|
|
|
|
confirmButtonText: "继续",
|
|
|
|
confirmButtonText: '继续',
|
|
|
|
cancelButtonText: "取消"
|
|
|
|
cancelButtonText: '取消'
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
let load = getLoading(this)
|
|
|
|
let load = getLoading(this)
|
|
|
|
if (!row.deviceCode) {
|
|
|
|
if (!row.deviceCode) {
|
|
|
@ -469,9 +472,9 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
delDetail(row) {
|
|
|
|
delDetail(row) {
|
|
|
|
this.$confirm("此操作将会永久删除该条明细,且将在下一次任务生效,现有任务不受影响,是否继续", "提示", {
|
|
|
|
this.$confirm('此操作将会永久删除该条明细,且将在下一次任务生效,现有任务不受影响,是否继续', '提示', {
|
|
|
|
confirmButtonText: "继续",
|
|
|
|
confirmButtonText: '继续',
|
|
|
|
cancelButtonText: "取消"
|
|
|
|
cancelButtonText: '取消'
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
let load = getLoading(this)
|
|
|
|
let load = getLoading(this)
|
|
|
|
if (row.deviceCode) {
|
|
|
|
if (row.deviceCode) {
|
|
|
@ -506,7 +509,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rowClick(row) {
|
|
|
|
rowClick(row) {
|
|
|
|
this.clickRow = row
|
|
|
|
this.clickRow = row
|
|
|
|
this.detailQuery = {...detailQuery, planId: row.planId}
|
|
|
|
this.detailQuery = { ...detailQuery, planId: row.planId }
|
|
|
|
this.getDetailList()
|
|
|
|
this.getDetailList()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getDetailList() {
|
|
|
|
getDetailList() {
|
|
|
@ -543,7 +546,7 @@ export default {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.planData.planId = res.data
|
|
|
|
this.planData.planId = res.data
|
|
|
|
this.detailQuery = {...detailQuery, planId: this.planData.planId}
|
|
|
|
this.detailQuery = { ...detailQuery, planId: this.planData.planId }
|
|
|
|
this.getDetailList()
|
|
|
|
this.getDetailList()
|
|
|
|
this.createActive += 1
|
|
|
|
this.createActive += 1
|
|
|
|
}).catch(e => {
|
|
|
|
}).catch(e => {
|
|
|
@ -558,8 +561,8 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (this.createActive == 2) {
|
|
|
|
if (this.createActive == 2) {
|
|
|
|
this.planData = {...this.planData}
|
|
|
|
this.planData = { ...this.planData }
|
|
|
|
this.detailQuery = {...detailQuery, planId: this.itemQuery.planId}
|
|
|
|
this.detailQuery = { ...detailQuery, planId: this.itemQuery.planId }
|
|
|
|
this.getDetailList()
|
|
|
|
this.getDetailList()
|
|
|
|
load.close()
|
|
|
|
load.close()
|
|
|
|
this.createActive -= 1
|
|
|
|
this.createActive -= 1
|
|
|
@ -570,7 +573,7 @@ export default {
|
|
|
|
this.$message.error(res.message)
|
|
|
|
this.$message.error(res.message)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.planData = {...res.data}
|
|
|
|
this.planData = { ...res.data }
|
|
|
|
this.createActive -= 1
|
|
|
|
this.createActive -= 1
|
|
|
|
}).catch(e => {
|
|
|
|
}).catch(e => {
|
|
|
|
load.close()
|
|
|
|
load.close()
|
|
|
@ -608,11 +611,10 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
closePlanEdit() {
|
|
|
|
closePlanEdit() {
|
|
|
|
this.createFlag = false;
|
|
|
|
this.createFlag = false
|
|
|
|
this.getList()
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deviceSelectChangFunc(list) {
|
|
|
|
deviceSelectChangFunc(list) {
|
|
|
|
this.chooseDeviceList = list.map(i => i.deviceCode)
|
|
|
|
this.chooseDeviceList = list.map(i => i.deviceCode)
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -620,16 +622,15 @@ export default {
|
|
|
|
//新增编辑计划
|
|
|
|
//新增编辑计划
|
|
|
|
openCreate(planId, row) {
|
|
|
|
openCreate(planId, row) {
|
|
|
|
if (planId != null) {
|
|
|
|
if (planId != null) {
|
|
|
|
this.planEditTitle = `编辑巡检计划信息${row.planId ? '--(' + row.name + ')' : ''}`;
|
|
|
|
this.planEditTitle = `编辑巡检计划信息${row.planId ? '--(' + row.name + ')' : ''}`
|
|
|
|
this.planData = row;
|
|
|
|
this.planData = row
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.planEditTitle = "新增计划";
|
|
|
|
this.planEditTitle = '新增计划'
|
|
|
|
this.planData = {
|
|
|
|
this.planData = {
|
|
|
|
type:1
|
|
|
|
type: 1
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.createFlag = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
this.createFlag = true
|
|
|
|
|
|
|
|
|
|
|
|
// this.createActive = 0
|
|
|
|
// this.createActive = 0
|
|
|
|
// if (createActive != null) {
|
|
|
|
// if (createActive != null) {
|
|
|
@ -667,7 +668,7 @@ export default {
|
|
|
|
this.getList()
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onReset() {
|
|
|
|
onReset() {
|
|
|
|
this.query = {...query}
|
|
|
|
this.query = { ...query }
|
|
|
|
this.getList()
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getList() {
|
|
|
|
getList() {
|
|
|
@ -688,11 +689,11 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setProject(row) {
|
|
|
|
setProject(row) {
|
|
|
|
this.planData = {
|
|
|
|
this.planData = {
|
|
|
|
type:1
|
|
|
|
type: 1
|
|
|
|
};
|
|
|
|
}
|
|
|
|
this.projectVisible = true
|
|
|
|
this.projectVisible = true
|
|
|
|
this.projectItem = row
|
|
|
|
this.projectItem = row
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|