|
|
@ -183,6 +183,10 @@ |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
<!-- 点检项目 --> |
|
|
<!-- 点检项目 --> |
|
|
<el-tab-pane label="点检项目" name="check_item"> |
|
|
<el-tab-pane label="点检项目" name="check_item"> |
|
|
|
|
|
<el-form :inline="true" label-position="top" style="margin-top: 5px"> |
|
|
|
|
|
<el-button type="primary" @click="addItemModal('A')">新增项目</el-button> |
|
|
|
|
|
<el-button type="primary" @click="copyCheckItems('A')">复制到其他设备</el-button> |
|
|
|
|
|
</el-form> |
|
|
<el-table |
|
|
<el-table |
|
|
:height="secondHeight" |
|
|
:height="secondHeight" |
|
|
:data="checkItemList" |
|
|
:data="checkItemList" |
|
|
@ -205,10 +209,26 @@ |
|
|
style="width: 100px; height: 80px"/></span> |
|
|
style="width: 100px; height: 80px"/></span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
fixed="right" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="100" |
|
|
|
|
|
label="操作"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<a type="text" size="small" @click="updateObjectItem(scope.row)">修改</a> |
|
|
|
|
|
<a type="text" size="small" @click="deleteObjectItem(scope.row)">删除</a> |
|
|
|
|
|
<a type="text" size="small" v-if="scope.row.valueChooseFlag=='Y'" @click="chooseModal(scope.row)">可选值</a> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
<!-- 维保项目 --> |
|
|
<!-- 维保项目 --> |
|
|
<el-tab-pane label="维保项目" name="maintenance_item"> |
|
|
<el-tab-pane label="维保项目" name="maintenance_item"> |
|
|
|
|
|
<el-form :inline="true" label-position="top" style="margin-top: 5px"> |
|
|
|
|
|
<el-button type="primary" @click="addItemModal('B')">新增项目</el-button> |
|
|
|
|
|
<el-button type="primary" @click="copyCheckItems('B')">复制到其他设备</el-button> |
|
|
|
|
|
</el-form> |
|
|
<el-table |
|
|
<el-table |
|
|
:height="secondHeight" |
|
|
:height="secondHeight" |
|
|
:data="maintenanceItemList" |
|
|
:data="maintenanceItemList" |
|
|
@ -231,6 +251,18 @@ |
|
|
style="width: 100px; height: 80px"/></span> |
|
|
style="width: 100px; height: 80px"/></span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
fixed="right" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="100" |
|
|
|
|
|
label="操作"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<a type="text" size="small" @click="updateObjectItem(scope.row)">修改</a> |
|
|
|
|
|
<a type="text" size="small" @click="deleteObjectItem(scope.row)">删除</a> |
|
|
|
|
|
<a type="text" size="small" v-if="scope.row.valueChooseFlag=='Y'" @click="chooseModal(scope.row)">可选值</a> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
<!-- 维保计划 --> |
|
|
<!-- 维保计划 --> |
|
|
@ -549,7 +581,54 @@ |
|
|
<el-button type="primary" @click="spareCopyModalFlag = false">关闭</el-button> |
|
|
<el-button type="primary" @click="spareCopyModalFlag = false">关闭</el-button> |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 维护点检项目 --> |
|
|
|
|
|
<el-dialog title="维护项目" :close-on-click-modal="false" v-drag :visible.sync="updateItemModalFlag" width="430px"> |
|
|
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
|
|
<el-form-item > |
|
|
|
|
|
<span slot="label" v-if="updateItemModal.itemType=='A'&&updateItemModal.flag=='0'" style="" @click="getBaseList(1024)"><a herf="#">点检项目编码</a></span> |
|
|
|
|
|
<span slot="label" v-if="updateItemModal.itemType=='B'&&updateItemModal.flag=='0'" style="" @click="getBaseList(1025)"><a herf="#">维保项目编码</a></span> |
|
|
|
|
|
<span slot="label" v-if="updateItemModal.itemType=='A'&&updateItemModal.flag=='1'" style="" >点检项目编码</span> |
|
|
|
|
|
<span slot="label" v-if="updateItemModal.itemType=='B'&&updateItemModal.flag=='1'" style="" >维保项目编码</span> |
|
|
|
|
|
<el-input v-model="updateItemModal.itemNo" disabled style="width: 120px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="updateItemLabel.itemDescLabel"> |
|
|
|
|
|
<el-input v-model="updateItemModal.itemDesc" disabled style="width: 120px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'检测值类型'"> |
|
|
|
|
|
<el-select filterable v-model="updateItemModal.valueTypeDb" style="width: 120px"> |
|
|
|
|
|
<el-option label="文本" value="T"></el-option> |
|
|
|
|
|
<el-option label="数字" value="N"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
|
|
<el-form-item :label="updateItemLabel.itemRemarkLabel"> |
|
|
|
|
|
<el-input v-model="updateItemModal.itemRemark" disabled style="width: 254px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'是否值可选'"> |
|
|
|
|
|
<el-select filterable v-model="updateItemModal.valueChooseFlag" style="width: 120px"> |
|
|
|
|
|
<el-option label="是" value="Y"></el-option> |
|
|
|
|
|
<el-option label="否" value="N"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
|
|
<el-form-item label="参照值:"> |
|
|
|
|
|
<el-input v-model="updateItemModal.defaultValue" style="width: 120px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="最大值:"> |
|
|
|
|
|
<el-input v-model="updateItemModal.maxValue" type="number" style="width: 120px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="最小值:"> |
|
|
|
|
|
<el-input v-model="updateItemModal.minValue" type="number" style="width: 120px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
|
|
<el-button type="primary" @click="saveItemsData()">保存</el-button> |
|
|
|
|
|
<el-button type="primary" @click="updateItemModalFlag = false">关闭</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -575,6 +654,9 @@ |
|
|
getWorkPlanDataWithObjectID, |
|
|
getWorkPlanDataWithObjectID, |
|
|
getObjectItemList, |
|
|
getObjectItemList, |
|
|
getDefectWithObject, |
|
|
getDefectWithObject, |
|
|
|
|
|
saveObjectItemData, |
|
|
|
|
|
eamPropertiesItemSearch, |
|
|
|
|
|
deleteObjectItem, |
|
|
} from '@/api/eam/eam.js'; |
|
|
} from '@/api/eam/eam.js'; |
|
|
import { |
|
|
import { |
|
|
updateOssRef |
|
|
updateOssRef |
|
|
@ -584,10 +666,12 @@ |
|
|
} from '@/api/partspare/resourcespare.js' |
|
|
} from '@/api/partspare/resourcespare.js' |
|
|
/*引入組件*/ |
|
|
/*引入組件*/ |
|
|
import comAddUpdateEamObject from "./com_eam_object_add_update";/*新增或者修改的組件*/ |
|
|
import comAddUpdateEamObject from "./com_eam_object_add_update";/*新增或者修改的組件*/ |
|
|
|
|
|
|
|
|
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
export default { |
|
|
export default { |
|
|
|
|
|
|
|
|
data () { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
|
|
|
tagNo:'', |
|
|
activeTable: 'file_content', |
|
|
activeTable: 'file_content', |
|
|
folder: 'eamObject', |
|
|
folder: 'eamObject', |
|
|
eamObjectId: '', |
|
|
eamObjectId: '', |
|
|
@ -2599,11 +2683,34 @@ |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
//设备维保计划分页新增 0315 rq ---end |
|
|
//设备维保计划分页新增 0315 rq ---end |
|
|
|
|
|
//设备点检项目分页新增 0315 rq ---start |
|
|
|
|
|
updateItemModalFlag:false, |
|
|
|
|
|
updateItemLabel:{ |
|
|
|
|
|
itemDescLabel:'', |
|
|
|
|
|
itemRemarkLabel:'', |
|
|
|
|
|
}, |
|
|
|
|
|
updateItemModal:{ |
|
|
|
|
|
flag:'', |
|
|
|
|
|
site:'', |
|
|
|
|
|
objectID:'', |
|
|
|
|
|
itemNo:'', |
|
|
|
|
|
itemDesc:'', |
|
|
|
|
|
itemType:'', |
|
|
|
|
|
valueTypeDb:'', |
|
|
|
|
|
itemRemark:'', |
|
|
|
|
|
valueChooseFlag:'', |
|
|
|
|
|
defaultValue:'', |
|
|
|
|
|
maxValue:'', |
|
|
|
|
|
minValue:'', |
|
|
|
|
|
userId:'', |
|
|
|
|
|
}, |
|
|
|
|
|
//设备点检项目分页新增 0315 rq ---end |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
components: { |
|
|
components: { |
|
|
comAddUpdateEamObject,/*新增或者修改的组件*/ |
|
|
comAddUpdateEamObject,/*新增或者修改的组件*/ |
|
|
|
|
|
Chooselist, |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
mounted () { |
|
|
mounted () { |
|
|
@ -2960,7 +3067,6 @@ |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
cancelButtonText: '取消', |
|
|
cancelButtonText: '取消', |
|
|
type: 'warning' |
|
|
type: 'warning' |
|
|
|
|
|
|
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
let inList = JSON.parse(JSON.stringify(this.objectCopySelectionList)); |
|
|
let inList = JSON.parse(JSON.stringify(this.objectCopySelectionList)); |
|
|
for (let i = 0; i < inList.length; i++) { |
|
|
for (let i = 0; i < inList.length; i++) { |
|
|
@ -3016,6 +3122,179 @@ |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
//--------------项目--------------------- |
|
|
|
|
|
addItemModal(type){ |
|
|
|
|
|
if(type=='A'){ |
|
|
|
|
|
this.updateItemLabel={ |
|
|
|
|
|
itemDescLabel:'点检项目名称', |
|
|
|
|
|
itemRemarkLabel:'点检方法说明', |
|
|
|
|
|
} |
|
|
|
|
|
}else { |
|
|
|
|
|
this.updateItemLabel={ |
|
|
|
|
|
itemDescLabel:'维保项目名称', |
|
|
|
|
|
itemRemarkLabel:'维保方法说明', |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
this.updateItemModal={ |
|
|
|
|
|
flag:'0', |
|
|
|
|
|
site:this.currentRow.site, |
|
|
|
|
|
objectID:this.currentRow.objectID, |
|
|
|
|
|
itemNo:'', |
|
|
|
|
|
itemDesc:'', |
|
|
|
|
|
itemType:type, |
|
|
|
|
|
valueTypeDb:'T', |
|
|
|
|
|
itemRemark:'', |
|
|
|
|
|
valueChooseFlag:'', |
|
|
|
|
|
defaultValue:'', |
|
|
|
|
|
maxValue:'', |
|
|
|
|
|
minValue:'', |
|
|
|
|
|
userId:this.$store.state.user.name, |
|
|
|
|
|
} |
|
|
|
|
|
this.updateItemModalFlag=true; |
|
|
|
|
|
}, |
|
|
|
|
|
updateObjectItem(row){ |
|
|
|
|
|
if(row.itemType=='A'){ |
|
|
|
|
|
this.updateItemLabel={ |
|
|
|
|
|
itemDescLabel:'点检项目名称', |
|
|
|
|
|
itemRemarkLabel:'点检方法说明', |
|
|
|
|
|
} |
|
|
|
|
|
}else { |
|
|
|
|
|
this.updateItemLabel={ |
|
|
|
|
|
itemDescLabel:'维保项目名称', |
|
|
|
|
|
itemRemarkLabel:'维保方法说明', |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
this.updateItemModal={ |
|
|
|
|
|
flag:'1', |
|
|
|
|
|
site:this.currentRow.site, |
|
|
|
|
|
objectID:this.currentRow.objectID, |
|
|
|
|
|
itemNo:row.itemNo, |
|
|
|
|
|
itemDesc:row.itemDesc, |
|
|
|
|
|
itemType:row.itemType, |
|
|
|
|
|
valueTypeDb:row.valueTypeDb, |
|
|
|
|
|
itemRemark:row.itemRemark, |
|
|
|
|
|
valueChooseFlag:row.valueChooseFlag, |
|
|
|
|
|
defaultValue:row.defaultValue, |
|
|
|
|
|
maxValue:row.maxValue, |
|
|
|
|
|
minValue:row.minValue, |
|
|
|
|
|
userId:this.$store.state.user.name, |
|
|
|
|
|
} |
|
|
|
|
|
this.updateItemModalFlag=true; |
|
|
|
|
|
}, |
|
|
|
|
|
saveItemsData(){ |
|
|
|
|
|
console.log(this.updateItemModal) |
|
|
|
|
|
if (this.updateItemModal.itemNo == '' || this.updateItemModal.itemNo == null) { |
|
|
|
|
|
this.$alert('请选择项目编码!', '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
saveObjectItemData(this.updateItemModal).then(({data}) => { |
|
|
|
|
|
if (data && data.code == '0') { |
|
|
|
|
|
if(this.updateItemModal.itemType=='A'){ |
|
|
|
|
|
this.getCheckItemData(); |
|
|
|
|
|
}else { |
|
|
|
|
|
this.getMaintenanceItemData(); |
|
|
|
|
|
} |
|
|
|
|
|
this.updateItemModalFlag=false |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => { |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
deleteObjectItem(row){ |
|
|
|
|
|
this.$confirm(`是否删除这个项目?`, '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
|
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
deleteObjectItem(row).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
if(row.itemType=='A'){ |
|
|
|
|
|
this.getCheckItemData(); |
|
|
|
|
|
}else { |
|
|
|
|
|
this.getMaintenanceItemData(); |
|
|
|
|
|
} |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => { |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 获取基础数据列表S |
|
|
|
|
|
getBaseList (val,type) { |
|
|
|
|
|
this.tagNo = val |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
let strVal = '' |
|
|
|
|
|
if (val === 1024) { |
|
|
|
|
|
strVal = this.updateItemModal.itemNo |
|
|
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
|
|
} |
|
|
|
|
|
if (val === 1025) { |
|
|
|
|
|
strVal = this.updateItemModal.itemNo |
|
|
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
|
|
} |
|
|
|
|
|
if (val === 201) { |
|
|
|
|
|
strVal = this.modalData.operator |
|
|
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
/* 列表方法的回调 */ |
|
|
|
|
|
getBaseData (val) { |
|
|
|
|
|
if (this.tagNo === 1024) { |
|
|
|
|
|
this.updateItemModal.itemNo = val.ItemNo |
|
|
|
|
|
this.itemNoBlur('A') |
|
|
|
|
|
} |
|
|
|
|
|
if (this.tagNo === 1025) { |
|
|
|
|
|
this.updateItemModal.itemNo = val.ItemNo |
|
|
|
|
|
this.itemNoBlur('B') |
|
|
|
|
|
} |
|
|
|
|
|
if (this.tagNo === 201) { |
|
|
|
|
|
this.modalData.operator = val.AdminID |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
itemNoBlur(type){ |
|
|
|
|
|
let inData={ |
|
|
|
|
|
itemType:type, |
|
|
|
|
|
itemNo:this.updateItemModal.itemNo |
|
|
|
|
|
} |
|
|
|
|
|
eamPropertiesItemSearch(inData).then(({data}) => { |
|
|
|
|
|
if(data.rows.length>0){ |
|
|
|
|
|
this.updateItemModal.itemDesc=data.rows[0].itemDesc |
|
|
|
|
|
this.updateItemModal.valueTypeDb=data.rows[0].valueTypeDb |
|
|
|
|
|
this.updateItemModal.itemRemark=data.rows[0].itemRemark |
|
|
|
|
|
this.updateItemModal.valueChooseFlag=data.rows[0].valueChooseFlag |
|
|
|
|
|
this.updateItemModal.defaultValue=data.rows[0].defaultValue |
|
|
|
|
|
this.updateItemModal.maxValue=data.rows[0].maxValue |
|
|
|
|
|
this.updateItemModal.minValue=data.rows[0].minValue |
|
|
|
|
|
}else { |
|
|
|
|
|
this.detailData.itemDesc='' |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|