|
|
|
@ -34,13 +34,13 @@ export default { |
|
|
|
currentPage: 1, |
|
|
|
currentPage: 1, |
|
|
|
total: 0, |
|
|
|
total: 0, |
|
|
|
}, |
|
|
|
}, |
|
|
|
loading:false, |
|
|
|
loading: false, |
|
|
|
data: [], |
|
|
|
data: [], |
|
|
|
query: { |
|
|
|
query: { |
|
|
|
taskStatus: "2" // 初始查询条件 |
|
|
|
taskStatus: '2', // 初始查询条件 |
|
|
|
}, |
|
|
|
}, |
|
|
|
option: { |
|
|
|
option: { |
|
|
|
height: "auto", |
|
|
|
height: 'auto', |
|
|
|
calcHeight: 32, |
|
|
|
calcHeight: 32, |
|
|
|
tip: false, |
|
|
|
tip: false, |
|
|
|
simplePage: true, |
|
|
|
simplePage: true, |
|
|
|
@ -55,12 +55,12 @@ export default { |
|
|
|
viewBtn: false, |
|
|
|
viewBtn: false, |
|
|
|
delBtn: false, |
|
|
|
delBtn: false, |
|
|
|
addBtn: false, |
|
|
|
addBtn: false, |
|
|
|
editBtnText: "修改", |
|
|
|
editBtnText: '修改', |
|
|
|
addBtnIcon: " ", |
|
|
|
addBtnIcon: ' ', |
|
|
|
viewBtnIcon: " ", |
|
|
|
viewBtnIcon: ' ', |
|
|
|
delBtnIcon: " ", |
|
|
|
delBtnIcon: ' ', |
|
|
|
editBtnIcon: " ", |
|
|
|
editBtnIcon: ' ', |
|
|
|
viewBtnText: "详情", |
|
|
|
viewBtnText: '详情', |
|
|
|
labelWidth: 120, |
|
|
|
labelWidth: 120, |
|
|
|
menuWidth: 120, |
|
|
|
menuWidth: 120, |
|
|
|
dialogWidth: 1040, |
|
|
|
dialogWidth: 1040, |
|
|
|
@ -75,41 +75,41 @@ export default { |
|
|
|
index: false, |
|
|
|
index: false, |
|
|
|
showOverflowTooltip: true, |
|
|
|
showOverflowTooltip: true, |
|
|
|
menu: false, |
|
|
|
menu: false, |
|
|
|
searchLabelPosition: "left", |
|
|
|
searchLabelPosition: 'left', |
|
|
|
searchGutter: 24, |
|
|
|
searchGutter: 24, |
|
|
|
searchSpan: 6, |
|
|
|
searchSpan: 6, |
|
|
|
menuAlign: "left", |
|
|
|
menuAlign: 'left', |
|
|
|
gridBtn: false, |
|
|
|
gridBtn: false, |
|
|
|
searchMenuPosition: "right", |
|
|
|
searchMenuPosition: 'right', |
|
|
|
align: "center", |
|
|
|
align: 'center', |
|
|
|
column: [ |
|
|
|
column: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "巡检点编号", |
|
|
|
label: '巡检点编号', |
|
|
|
prop: "insNum", |
|
|
|
prop: 'insNum', |
|
|
|
sortable: true, |
|
|
|
sortable: true, |
|
|
|
filter: true, |
|
|
|
filter: true, |
|
|
|
search: true, |
|
|
|
search: true, |
|
|
|
searchLabelWidth: 90, |
|
|
|
searchLabelWidth: 90, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "巡检点位置", |
|
|
|
label: '巡检点位置', |
|
|
|
prop: "insSite", |
|
|
|
prop: 'insSite', |
|
|
|
sortable: true, |
|
|
|
sortable: true, |
|
|
|
filter: true, |
|
|
|
filter: true, |
|
|
|
search: true, |
|
|
|
search: true, |
|
|
|
searchLabelWidth: 90, |
|
|
|
searchLabelWidth: 90, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "等待周期", |
|
|
|
label: '等待周期', |
|
|
|
prop: "waitCycle", |
|
|
|
prop: 'waitCycle', |
|
|
|
sortable: true, |
|
|
|
sortable: true, |
|
|
|
filter: true, |
|
|
|
filter: true, |
|
|
|
search: false, |
|
|
|
search: false, |
|
|
|
display: false, |
|
|
|
display: false, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "巡检点备注", |
|
|
|
label: '巡检点备注', |
|
|
|
prop: "insMemo", |
|
|
|
prop: 'insMemo', |
|
|
|
sortable: true, |
|
|
|
sortable: true, |
|
|
|
filter: true, |
|
|
|
filter: true, |
|
|
|
search: false, |
|
|
|
search: false, |
|
|
|
@ -117,19 +117,19 @@ export default { |
|
|
|
searchLabelWidth: 110, |
|
|
|
searchLabelWidth: 110, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "发起时间", |
|
|
|
label: '发起时间', |
|
|
|
prop: "queryLaunchTime", |
|
|
|
prop: 'queryLaunchTime', |
|
|
|
search: true, |
|
|
|
search: true, |
|
|
|
display: false, |
|
|
|
display: false, |
|
|
|
hide:true, |
|
|
|
hide: true, |
|
|
|
type: 'date', |
|
|
|
type: 'date', |
|
|
|
format: 'YYYY-MM-DD', |
|
|
|
format: 'YYYY-MM-DD', |
|
|
|
valueFormat: 'YYYY-MM-DD', |
|
|
|
valueFormat: 'YYYY-MM-DD', |
|
|
|
searchRange: true, |
|
|
|
searchRange: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "发起时间", |
|
|
|
label: '发起时间', |
|
|
|
prop: "launchTime", |
|
|
|
prop: 'launchTime', |
|
|
|
sortable: true, |
|
|
|
sortable: true, |
|
|
|
filter: true, |
|
|
|
filter: true, |
|
|
|
type: 'datetime', |
|
|
|
type: 'datetime', |
|
|
|
@ -138,62 +138,65 @@ export default { |
|
|
|
searchRange: true, |
|
|
|
searchRange: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "巡检人", |
|
|
|
label: '巡检人', |
|
|
|
prop: "insMan", |
|
|
|
prop: 'insMan', |
|
|
|
sortable: true, |
|
|
|
sortable: true, |
|
|
|
filter: true, |
|
|
|
filter: true, |
|
|
|
search: true, |
|
|
|
search: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "检验时间", |
|
|
|
label: '检验时间', |
|
|
|
prop: "queryTestTime", |
|
|
|
prop: 'queryTestTime', |
|
|
|
sortable: true, |
|
|
|
sortable: true, |
|
|
|
filter: true, |
|
|
|
filter: true, |
|
|
|
search: true, |
|
|
|
search: true, |
|
|
|
hide:true, |
|
|
|
hide: true, |
|
|
|
type: "date", |
|
|
|
type: 'date', |
|
|
|
format: 'YYYY-MM-DD', |
|
|
|
format: 'YYYY-MM-DD', |
|
|
|
valueFormat: 'YYYY-MM-DD', |
|
|
|
valueFormat: 'YYYY-MM-DD', |
|
|
|
searchRange: true, |
|
|
|
searchRange: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "检验时间", |
|
|
|
label: '检验时间', |
|
|
|
prop: "testTime", |
|
|
|
prop: 'testTime', |
|
|
|
sortable: true, |
|
|
|
sortable: true, |
|
|
|
filter: true, |
|
|
|
filter: true, |
|
|
|
type: "datetime", |
|
|
|
type: 'datetime', |
|
|
|
format: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
format: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
// searchRange: true, |
|
|
|
// searchRange: true, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "任务状态", |
|
|
|
label: '任务状态', |
|
|
|
prop: "taskStatus", |
|
|
|
prop: 'taskStatus', |
|
|
|
sortable: true, |
|
|
|
sortable: true, |
|
|
|
filter: true, |
|
|
|
filter: true, |
|
|
|
search: true, |
|
|
|
search: true, |
|
|
|
type: "select", |
|
|
|
type: 'select', |
|
|
|
// value: "2", |
|
|
|
// value: "2", |
|
|
|
searchLabelWidth: 80, |
|
|
|
searchLabelWidth: 80, |
|
|
|
dicData: [ |
|
|
|
dicData: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "已检", |
|
|
|
label: '已检', |
|
|
|
value: "1", |
|
|
|
value: '1', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "待检", |
|
|
|
label: '待检', |
|
|
|
value: "2", |
|
|
|
value: '2', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "未准时完成", |
|
|
|
label: '未准时完成', |
|
|
|
value: "3", |
|
|
|
value: '3', |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: '缺卡', |
|
|
|
|
|
|
|
value: '4', |
|
|
|
|
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: "备注", |
|
|
|
label: '备注', |
|
|
|
prop: "memo", |
|
|
|
prop: 'parMemo', |
|
|
|
sortable: true, |
|
|
|
sortable: true, |
|
|
|
filter: true, |
|
|
|
filter: true, |
|
|
|
search: false, |
|
|
|
search: false, |
|
|
|
@ -208,26 +211,44 @@ export default { |
|
|
|
this.loading = true; |
|
|
|
this.loading = true; |
|
|
|
const requestParams = Object.assign({}, params, this.query); |
|
|
|
const requestParams = Object.assign({}, params, this.query); |
|
|
|
// 后端要字符串类型 |
|
|
|
// 后端要字符串类型 |
|
|
|
console.log('查询参数:', requestParams) |
|
|
|
console.log('查询参数:', requestParams); |
|
|
|
|
|
|
|
|
|
|
|
if (requestParams.queryLaunchTime && Array.isArray(requestParams.queryLaunchTime) && requestParams.queryLaunchTime.length > 0) { |
|
|
|
if ( |
|
|
|
requestParams.queryLaunchTime[0] = requestParams.queryLaunchTime[0].length == 10 ? requestParams.queryLaunchTime[0] + ' 00:00:00' : requestParams.queryLaunchTime[0] |
|
|
|
requestParams.queryLaunchTime && |
|
|
|
requestParams.queryLaunchTime[1] = requestParams.queryLaunchTime[1].length == 10 ? requestParams.queryLaunchTime[1] + ' 23:59:59' : requestParams.queryLaunchTime[1] |
|
|
|
Array.isArray(requestParams.queryLaunchTime) && |
|
|
|
|
|
|
|
requestParams.queryLaunchTime.length > 0 |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
requestParams.queryLaunchTime[0] = |
|
|
|
|
|
|
|
requestParams.queryLaunchTime[0].length == 10 |
|
|
|
|
|
|
|
? requestParams.queryLaunchTime[0] + ' 00:00:00' |
|
|
|
|
|
|
|
: requestParams.queryLaunchTime[0]; |
|
|
|
|
|
|
|
requestParams.queryLaunchTime[1] = |
|
|
|
|
|
|
|
requestParams.queryLaunchTime[1].length == 10 |
|
|
|
|
|
|
|
? requestParams.queryLaunchTime[1] + ' 23:59:59' |
|
|
|
|
|
|
|
: requestParams.queryLaunchTime[1]; |
|
|
|
requestParams.queryLaunchTime = requestParams.queryLaunchTime.join(','); |
|
|
|
requestParams.queryLaunchTime = requestParams.queryLaunchTime.join(','); |
|
|
|
} |
|
|
|
} |
|
|
|
if (requestParams.queryTestTime && Array.isArray(requestParams.queryTestTime) && requestParams.queryTestTime.length > 0) { |
|
|
|
if ( |
|
|
|
requestParams.queryTestTime[0] = requestParams.queryTestTime[0].length == 10 ? requestParams.queryTestTime[0] + ' 00:00:00' : requestParams.queryTestTime[0] |
|
|
|
requestParams.queryTestTime && |
|
|
|
requestParams.queryTestTime[1] = requestParams.queryTestTime[1].length == 10 ? requestParams.queryTestTime[1] + ' 23:59:59' : requestParams.queryTestTime[1] |
|
|
|
Array.isArray(requestParams.queryTestTime) && |
|
|
|
|
|
|
|
requestParams.queryTestTime.length > 0 |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
requestParams.queryTestTime[0] = |
|
|
|
|
|
|
|
requestParams.queryTestTime[0].length == 10 |
|
|
|
|
|
|
|
? requestParams.queryTestTime[0] + ' 00:00:00' |
|
|
|
|
|
|
|
: requestParams.queryTestTime[0]; |
|
|
|
|
|
|
|
requestParams.queryTestTime[1] = |
|
|
|
|
|
|
|
requestParams.queryTestTime[1].length == 10 |
|
|
|
|
|
|
|
? requestParams.queryTestTime[1] + ' 23:59:59' |
|
|
|
|
|
|
|
: requestParams.queryTestTime[1]; |
|
|
|
requestParams.queryTestTime = requestParams.queryTestTime.join(','); |
|
|
|
requestParams.queryTestTime = requestParams.queryTestTime.join(','); |
|
|
|
} |
|
|
|
} |
|
|
|
getList(page.currentPage, page.pageSize, requestParams).then( |
|
|
|
getList(page.currentPage, page.pageSize, requestParams).then(res => { |
|
|
|
(res) => { |
|
|
|
this.data = res.data.data.records; |
|
|
|
this.data = res.data.data.records; |
|
|
|
this.loading = false; |
|
|
|
this.loading = false; |
|
|
|
this.page.total = res.data.data.total; |
|
|
|
this.page.total = res.data.data.total; |
|
|
|
// this.selectionClear(); |
|
|
|
// this.selectionClear(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
//选择行 |
|
|
|
//选择行 |
|
|
|
selectionChange(list) { |
|
|
|
selectionChange(list) { |
|
|
|
@ -239,8 +260,8 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 搜索重置 |
|
|
|
// 搜索重置 |
|
|
|
searchReset() { |
|
|
|
searchReset() { |
|
|
|
this.query = {taskStatus:'2'} |
|
|
|
this.query = { taskStatus: '2' }; |
|
|
|
this.onLoad(this.page) |
|
|
|
this.onLoad(this.page); |
|
|
|
}, |
|
|
|
}, |
|
|
|
//刷新 |
|
|
|
//刷新 |
|
|
|
refreshChange() { |
|
|
|
refreshChange() { |
|
|
|
@ -250,10 +271,9 @@ export default { |
|
|
|
searchChange(params, done) { |
|
|
|
searchChange(params, done) { |
|
|
|
this.query = params; |
|
|
|
this.query = params; |
|
|
|
this.page.currentPage = 1; |
|
|
|
this.page.currentPage = 1; |
|
|
|
this.onLoad(this.page, params) |
|
|
|
this.onLoad(this.page, params); |
|
|
|
done() |
|
|
|
done(); |
|
|
|
|
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|