|
|
@ -260,6 +260,7 @@ |
|
|
uploadUrl: "", |
|
|
uploadUrl: "", |
|
|
currentRow: {}, |
|
|
currentRow: {}, |
|
|
searchData: { |
|
|
searchData: { |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
objectId: '', |
|
|
objectId: '', |
|
|
defectId: '', |
|
|
defectId: '', |
|
|
defectReason: '', |
|
|
defectReason: '', |
|
|
@ -328,7 +329,9 @@ |
|
|
modalDisableFlag: false, |
|
|
modalDisableFlag: false, |
|
|
modalData: { |
|
|
modalData: { |
|
|
flag: '', |
|
|
flag: '', |
|
|
createBy: this.$store.state.user.name, |
|
|
|
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
createBy: '', |
|
|
|
|
|
updateBy: '', |
|
|
num: '', |
|
|
num: '', |
|
|
objectId: '', |
|
|
objectId: '', |
|
|
objectName: '', |
|
|
objectName: '', |
|
|
@ -453,10 +456,21 @@ |
|
|
status: true, |
|
|
status: true, |
|
|
fixed: '', |
|
|
fixed: '', |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
columnProp: 'createBy', |
|
|
|
|
|
align: 'center', |
|
|
|
|
|
columnLabel: '上传人', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
columnSortable: false, |
|
|
|
|
|
sortLv: 0, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: '', |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
columnProp: 'updateDate', |
|
|
columnProp: 'updateDate', |
|
|
align: 'center', |
|
|
align: 'center', |
|
|
columnLabel: '操作时间', |
|
|
|
|
|
|
|
|
columnLabel: '更新时间', |
|
|
columnHidden: false, |
|
|
columnHidden: false, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
@ -465,9 +479,9 @@ |
|
|
fixed: '', |
|
|
fixed: '', |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
columnProp: 'createBy', |
|
|
|
|
|
|
|
|
columnProp: 'updateBy', |
|
|
align: 'center', |
|
|
align: 'center', |
|
|
columnLabel: '操作员', |
|
|
|
|
|
|
|
|
columnLabel: '更新人', |
|
|
columnHidden: false, |
|
|
columnHidden: false, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
@ -602,10 +616,10 @@ |
|
|
this.searchData.page = this.pageIndex |
|
|
this.searchData.page = this.pageIndex |
|
|
getKnowledgeBaseList(this.searchData).then(({data}) => { |
|
|
getKnowledgeBaseList(this.searchData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.dataList = data.page.list; |
|
|
|
|
|
this.pageIndex = data.page.currPage; |
|
|
|
|
|
this.pageSize = data.page.pageSize; |
|
|
|
|
|
this.totalPage = data.page.totalCount; |
|
|
|
|
|
|
|
|
this.dataList = data.page.list |
|
|
|
|
|
this.pageIndex = data.page.currPage |
|
|
|
|
|
this.pageSize = data.page.pageSize |
|
|
|
|
|
this.totalPage = data.page.totalCount |
|
|
//判断是否全部存在数据 |
|
|
//判断是否全部存在数据 |
|
|
if(this.totalPage > 0){ |
|
|
if(this.totalPage > 0){ |
|
|
//设置选中行 |
|
|
//设置选中行 |
|
|
@ -631,6 +645,7 @@ |
|
|
addModal(){ |
|
|
addModal(){ |
|
|
this.modalData = { |
|
|
this.modalData = { |
|
|
flag: '1', |
|
|
flag: '1', |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
createBy: this.$store.state.user.name, |
|
|
createBy: this.$store.state.user.name, |
|
|
num: '', |
|
|
num: '', |
|
|
objectId: '', |
|
|
objectId: '', |
|
|
@ -651,7 +666,8 @@ |
|
|
updateModal(row){ |
|
|
updateModal(row){ |
|
|
this.modalData = { |
|
|
this.modalData = { |
|
|
flag:'2', |
|
|
flag:'2', |
|
|
createBy: this.$store.state.user.name, |
|
|
|
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
updateBy: this.$store.state.user.name, |
|
|
num: row.num, |
|
|
num: row.num, |
|
|
objectId: row.objectId, |
|
|
objectId: row.objectId, |
|
|
objectName: row.objectName, |
|
|
objectName: row.objectName, |
|
|
@ -669,43 +685,43 @@ |
|
|
}, |
|
|
}, |
|
|
// 新增/修改设备知识库 |
|
|
// 新增/修改设备知识库 |
|
|
saveData(){ |
|
|
saveData(){ |
|
|
if (this.modalData.objectId == '' || this.modalData.objectId == null) { |
|
|
|
|
|
|
|
|
if (this.modalData.objectId === '' || this.modalData.objectId == null) { |
|
|
this.$alert('请选择设备编码!', '错误', { |
|
|
this.$alert('请选择设备编码!', '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
}) |
|
|
}) |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
if (this.modalData.objectName == '' || this.modalData.objectName == null) { |
|
|
|
|
|
|
|
|
if (this.modalData.objectName === '' || this.modalData.objectName == null) { |
|
|
this.$alert('请选择设备名称!', '错误', { |
|
|
this.$alert('请选择设备名称!', '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
}) |
|
|
}) |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
if (this.modalData.defectId == '' || this.modalData.defectId == null) { |
|
|
|
|
|
|
|
|
if (this.modalData.defectId === '' || this.modalData.defectId == null) { |
|
|
this.$alert('请选择故障编码!', '错误', { |
|
|
this.$alert('请选择故障编码!', '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
}) |
|
|
}) |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
if (this.modalData.fileType == '' || this.modalData.fileType == null) { |
|
|
|
|
|
|
|
|
if (this.modalData.fileType === '' || this.modalData.fileType == null) { |
|
|
this.$alert('请选择类型!', '错误', { |
|
|
this.$alert('请选择类型!', '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
}) |
|
|
}) |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
if (this.modalData.defectDescribe == '' || this.modalData.defectDescribe == null) { |
|
|
|
|
|
|
|
|
if (this.modalData.defectDescribe === '' || this.modalData.defectDescribe == null) { |
|
|
this.$alert('请填写故障描述!', '错误', { |
|
|
this.$alert('请填写故障描述!', '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
}) |
|
|
}) |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
if (this.modalData.disposalMeasures == '' || this.modalData.disposalMeasures == null) { |
|
|
|
|
|
|
|
|
if (this.modalData.disposalMeasures === '' || this.modalData.disposalMeasures == null) { |
|
|
this.$alert('请填写处置措施!', '错误', { |
|
|
this.$alert('请填写处置措施!', '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
}) |
|
|
}) |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
if(this.modalData.flag=='1'){ |
|
|
|
|
|
|
|
|
if(this.modalData.flag === '1'){ |
|
|
saveKnowledgeBase(this.modalData).then(({data}) => { |
|
|
saveKnowledgeBase(this.modalData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
@ -779,7 +795,7 @@ |
|
|
type: 'warning' |
|
|
type: 'warning' |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
deleteObjectFile(row).then(({data}) => { |
|
|
deleteObjectFile(row).then(({data}) => { |
|
|
if (data && data.code == 0) { |
|
|
|
|
|
|
|
|
if (data && data.code === 0) { |
|
|
this.getFileContentData(); |
|
|
this.getFileContentData(); |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
message: '操作成功', |
|
|
message: '操作成功', |
|
|
@ -799,7 +815,7 @@ |
|
|
}, |
|
|
}, |
|
|
// 批量删除 |
|
|
// 批量删除 |
|
|
deleteSome() { |
|
|
deleteSome() { |
|
|
if(this.dataListSelections.length == 0){ |
|
|
|
|
|
|
|
|
if(this.dataListSelections.length === 0){ |
|
|
this.$alert('请勾选要删除的内容!', '错误', { |
|
|
this.$alert('请勾选要删除的内容!', '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
}) |
|
|
}) |
|
|
@ -837,6 +853,7 @@ |
|
|
// 刷新派设备文档的列表 |
|
|
// 刷新派设备文档的列表 |
|
|
getFileContentData() { |
|
|
getFileContentData() { |
|
|
let currentData = { |
|
|
let currentData = { |
|
|
|
|
|
orderRef1: this.$store.state.user.site, |
|
|
orderRef2: this.currentRow.num |
|
|
orderRef2: this.currentRow.num |
|
|
} |
|
|
} |
|
|
getFileContentList(currentData).then(({data}) => { |
|
|
getFileContentList(currentData).then(({data}) => { |
|
|
@ -865,16 +882,16 @@ |
|
|
objectName: this.currentRow.objectName, |
|
|
objectName: this.currentRow.objectName, |
|
|
defectId: this.currentRow.defectId, |
|
|
defectId: this.currentRow.defectId, |
|
|
defectReason: this.currentRow.defectReason, |
|
|
defectReason: this.currentRow.defectReason, |
|
|
}; |
|
|
|
|
|
|
|
|
} |
|
|
//打开组件 去做新增业务 |
|
|
//打开组件 去做新增业务 |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.$refs.comEamKnowledgeBaseUploadFile.init(currentData); |
|
|
|
|
|
|
|
|
this.$refs.comEamKnowledgeBaseUploadFile.init(currentData) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 设置当前的行 |
|
|
// 设置当前的行 |
|
|
setCurrentRow(row, column, event) { |
|
|
setCurrentRow(row, column, event) { |
|
|
this.currentRow = JSON.parse(JSON.stringify(row)); |
|
|
|
|
|
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row)) |
|
|
}, |
|
|
}, |
|
|
// 当前值发生变化的时候修改 |
|
|
// 当前值发生变化的时候修改 |
|
|
changeCurrentRow(row, oldRow){ |
|
|
changeCurrentRow(row, oldRow){ |
|
|
@ -952,10 +969,8 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
startDownload() { |
|
|
startDownload() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
finishDownload() { |
|
|
finishDownload() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
fields() { |
|
|
fields() { |
|
|
let json = "{" |
|
|
let json = "{" |
|
|
@ -970,8 +985,6 @@ |
|
|
let s = eval("(" + json + ")") |
|
|
let s = eval("(" + json + ")") |
|
|
return s |
|
|
return s |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|