Browse Source

2023-06-21 设备和质量修改2

java8
杨奉源 3 years ago
parent
commit
f5445c981f
  1. 6
      src/views/modules/eam/eamAdmin.vue
  2. 30
      src/views/modules/eam/eamWorkOrderForCheck.vue
  3. 8
      src/views/modules/eam/eam_device_list.vue
  4. 487
      src/views/modules/reportWorkOrder/reportCheckOrder.vue
  5. 445
      src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue

6
src/views/modules/eam/eamAdmin.vue

@ -98,7 +98,7 @@
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item >
<span slot="label" style="" @click="getDepartmentList()"><a>部门</a></span>
<el-input v-model="modalData.department" style="width: 120px"></el-input>
<el-input v-model="modalData.departmentName" style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="手机号码:">
<el-input v-model="modalData.phone" style="width: 120px"></el-input>
@ -258,6 +258,7 @@
adminName:'',
active:'',
department:'',
departmentName:'',
phone:'',
tel:'',
email:'',
@ -561,8 +562,10 @@
}
for (let i = 0; i < this.departmentListSelections.length; i++) {
this.modalData.department = this.modalData.department + ";" + this.departmentListSelections[i].deptId
this.modalData.departmentName = this.modalData.departmentName + ";" + this.departmentListSelections[i].deptName
}
this.modalData.department = this.modalData.department.substring(1)
this.modalData.departmentName = this.modalData.departmentName.substring(1)
this.departmentModelFlag = false
},
@ -817,6 +820,7 @@
if (data && data.code === 0) {
this.departmentList = data.rows
this.modalData.department = ''
this.modalData.departmentName = ''
this.departmentModelFlag = true;
}else {
this.$alert(data.msg, '错误', {

30
src/views/modules/eam/eamWorkOrderForCheck.vue

@ -945,25 +945,25 @@
//
reportModal(row){
let indata={
site:row.site,
itemNo:row.itemNo,
planID:row.planID,
orderNo:row.orderNo,
itemType:row.functionType,
let indata = {
site: row.site,
itemNo: row.itemNo,
planID: row.planID,
orderNo: row.orderNo,
itemType: row.functionType,
}
eamWorkOrderReportSearch(indata).then(({data}) => {
this.detailList=data.rows
this.detailList = data.rows
})
this.saveData={
site:row.site,
orderNo:row.orderNo,
planID:row.planID,
planOperatorName:row.planOperatorName,
workTime:row.workTime,
remark:row.remark,
this.saveData = {
site: row.site,
orderNo: row.orderNo,
planID: row.planID,
planOperatorName: row.planOperatorName,
workTime: row.workTime,
remark: row.remark,
},
this.detailModelFlag=true;
this.detailModelFlag = true;
},
cancelOrder(row){
row.userId=this.$store.state.user.name;

8
src/views/modules/eam/eam_device_list.vue

@ -93,10 +93,9 @@
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; height: 100%;"
type="border-card" @tab-click="tabClick" class="customer-tab">
<el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; height: 100%;" type="border-card" @tab-click="tabClick" class="customer-tab">
<!-- 文档 -->
<el-tab-pane label="文档" name="file_content">
<el-tab-pane label="文档" name="file_content">
<!--文件上传-->
<el-form label-position="top" style="margin-top: 5px; margin-left: 0px;">
<!-- <el-row>-->
@ -140,8 +139,7 @@
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column

487
src/views/modules/reportWorkOrder/reportCheckOrder.vue

@ -133,79 +133,172 @@
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
<el-button type="primary" @click="">点检单</el-button>
<el-button type="primary" @click="queryHistoryRecord()">点检记录</el-button>
</el-form>
<div class="rq ">
<el-table
:height="400"
:data="detailList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnDetailList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="80"
label="实测值">
<template slot-scope="scope">
<el-input v-if="scope.row.valueTypeDb=='T'&&scope.row.valueChooseFlag=='N'" v-model="scope.row.textValue" style="height: 11px;padding: 0px " filterable allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb=='N'&&scope.row.valueChooseFlag=='N'" v-model="scope.row.numberValue" type="number" style="height: 11px;padding: 0px " filterable allow-create>;width:98%"></el-input>
<el-select v-if="scope.row.valueTypeDb=='T'&&scope.row.valueChooseFlag=='Y'" v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px " filterable allow-create>
<el-option
v-for="item in scope.row.availableList"
:key="index"
:label="item.availableValue"
:value="item.availableValue">
</el-option>
</el-select>
<el-select v-if="scope.row.valueTypeDb=='N'&&scope.row.valueChooseFlag=='Y'" v-model="scope.row.numberValue" placeholder="请选择" style="height: 11px;padding: 0px " filterable allow-create>
<el-option
v-for="item in scope.row.availableList"
:key="index"
:label="item.availableValue"
:value="item.availableValue">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="80"
label="检验结论">
<template slot-scope="scope">
<el-select v-model="scope.row.itemResult" style="height: 11px;padding: 0px" placeholder="合格">
<el-option label="合格" value="合格" style="color: green"></el-option>
<el-option label="不合格" value="不合格" style="color: red"></el-option>
</el-select>
</template>
</el-table-column>
</el-table>
</div>
<el-tabs v-model="activeTable" style="margin-top: 10px; width: 100%; height: 100%;" type="border-card" @tab-click="tabClick" class="customer-tab">
<el-tab-pane label="点检单" name="inspection_form">
<div class="rq ">
<el-table
:height="400"
:data="detailList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnDetailList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="80"
label="实测值">
<template slot-scope="scope">
<el-input v-if="scope.row.valueTypeDb=='T'&&scope.row.valueChooseFlag=='N'" v-model="scope.row.textValue" style="height: 11px;padding: 0px " filterable allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb=='N'&&scope.row.valueChooseFlag=='N'" v-model="scope.row.numberValue" type="number" style="height: 11px;padding: 0px " filterable allow-create>;width:98%"></el-input>
<el-select v-if="scope.row.valueTypeDb=='T'&&scope.row.valueChooseFlag=='Y'" v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px " filterable allow-create>
<el-option
v-for="item in scope.row.availableList"
:key="index"
:label="item.availableValue"
:value="item.availableValue">
</el-option>
</el-select>
<el-select v-if="scope.row.valueTypeDb=='N'&&scope.row.valueChooseFlag=='Y'" v-model="scope.row.numberValue" placeholder="请选择" style="height: 11px;padding: 0px " filterable allow-create>
<el-option
v-for="item in scope.row.availableList"
:key="index"
:label="item.availableValue"
:value="item.availableValue">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="80"
label="检验结论">
<template slot-scope="scope">
<el-select v-model="scope.row.itemResult" style="height: 11px;padding: 0px" placeholder="合格">
<el-option label="合格" value="合格" style="color: green"></el-option>
<el-option label="不合格" value="不合格" style="color: red"></el-option>
</el-select>
</template>
</el-table-column>
</el-table>
</div>
</el-tab-pane>
<el-tab-pane label="点检记录" name="history_record">
<el-table
:height="400"
:data="HistoryRecordList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnHistoryList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</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="detailModal(scope.row)">详情</a>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<!-- <el-button type="primary" @click="">点检单</el-button>-->
<!-- <el-button type="primary" @click="queryHistoryRecord()">点检记录</el-button>-->
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="saveCheckReport()">保存</el-button>
<el-button type="primary" @click="detailModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<el-dialog title="详情" :close-on-click-modal="false" v-drag :visible.sync="historyDetailModelFlag" width="830px">
<div class="rq ">
<el-table
:height="300"
:data="historyDetailList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnHistoryDetailList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="80"
label="实测值">
<template slot-scope="scope">
<el-input v-if="scope.row.valueTypeDb=='T'" v-model="scope.row.textValue" readonly style="height: 11px;padding: 0px " filterable
allow-create>;width:98%"></el-input>
<el-input v-if="scope.row.valueTypeDb=='N'" v-model="scope.row.numberValue" readonly style="height: 11px;padding: 0px " filterable
allow-create>;width:98%"></el-input>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="80"
label="检验结论">
<template slot-scope="scope">
<el-select v-model="scope.row.itemResult" disabled style="height: 11px;padding: 0px">
<el-option label="合格" value="合格"></el-option>
<el-option label="不合格" value="不合格"></el-option>
</el-select>
</template>
</el-table-column>
</el-table>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="historyDetailModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
@ -216,6 +309,7 @@
eamWorkOrderItemSearch,
saveCheckOrderReport,
queryHistoryRecord, //
eamWorkOrderReportSearch, 历史记录详情
} from "@/api/eam/eam.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -675,7 +769,201 @@
},
],
HistoryRecordList: [],
HistoryModelFlag: false
HistoryModelFlag: false,
activeTable: 'inspection_form',
columnHistoryList: [
{
columnProp: 'orderNo',
headerAlign: "center",
align: "center",
columnLabel: '工单编号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'planDesc',
headerAlign: "center",
align: "center",
columnLabel: '计划描述',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'actualDate',
headerAlign: "center",
align: "center",
columnLabel: '点检日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'checkResult',
headerAlign: "center",
align: "center",
columnLabel: '点检结论',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'actualOperatorName',
headerAlign: "center",
align: "center",
columnLabel: '点检人员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'objectID',
headerAlign: "center",
align: "center",
columnLabel: '设备编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'objectDesc',
headerAlign: "center",
align: "center",
columnLabel: '设备名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'remark',
headerAlign: "center",
align: "center",
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
],
historyDetailList: [],
historyDetailModelFlag: false,
columnHistoryDetailList: [
{
columnProp: 'itemNo',
headerAlign: "center",
align: "center",
columnLabel: '点检项目编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 90,
},
{
columnProp: 'itemDesc',
headerAlign: "center",
align: "center",
columnLabel: '点检项目名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 90,
},
{
columnProp: 'itemRemark',
headerAlign: "center",
align: "center",
columnLabel: '点检方法说明',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},
{
columnProp: 'valueType',
headerAlign: "center",
align: "center",
columnLabel: '检测值类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
{
columnProp: 'defaultValue',
headerAlign: "center",
align: "center",
columnLabel: '参照值',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
{
columnProp: 'maxValue',
headerAlign: "center",
align: "center",
columnLabel: '最大值',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
{
columnProp: 'minValue',
headerAlign: "center",
align: "center",
columnLabel: '最小值',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70,
},
],
}
},
mounted () {
@ -838,7 +1126,9 @@
mesUser: this.$store.state.user.name,
itemList: [],
checkResult: ''
},
}
this.getInspectionFormData();
this.queryHistoryRecord();
this.detailModelFlag = true;
},
@ -918,10 +1208,11 @@
}
}
this.saveData.itemList = JSON.parse(JSON.stringify(this.detailList))
console.log(this.saveData)
await saveCheckOrderReport(this.saveData).then(({data}) => {
if (data && data.code == '0') {
this.getDataList()
this.detailModelFlag=false
this.detailModelFlag = false
this.$message({
message: '操作成功',
type: 'success',
@ -937,7 +1228,40 @@
})
},
//
//
tabClick (tab, event) {
//
this.refreshCurrentTabTable()
},
// table
refreshCurrentTabTable () {
//
if (this.activeTable == 'inspection_form') {
this.getInspectionFormData();
} else if (this.activeTable == 'history_record') {
this.queryHistoryRecord();
}
},
//
getInspectionFormData(){
let tempData = {
site: this.saveData.site,
planID: this.saveData.planID,
orderNo: this.saveData.orderNo,
itemType: 'A',
objectID: this.saveData.objectID
}
eamWorkOrderItemSearch(tempData).then(({data}) => {
if (data && data.code === 0) {
this.detailList = data.rows
}else {
this.detailList = [];
}
})
},
//
queryHistoryRecord(){
let tempData = {
site: this.saveData.site,
@ -945,10 +1269,25 @@
functionType: 'A'
}
queryHistoryRecord(tempData).then(({data}) => {
this.HistoryRecordList = data.rows
if (data && data.code === 0) {
this.HistoryRecordList = data.rows
}else {
this.HistoryRecordList = [];
}
})
this.HistoryModelFlag = true
},
//
detailModal(row){
let tempData = {
site: this.saveData.site,
orderNo: row.orderNo,
}
eamWorkOrderReportSearch(tempData).then(({data}) => {
this.historyDetailList = data.rows
})
this.historyDetailModelFlag = true;
},
}
}
</script>

445
src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue

@ -120,13 +120,11 @@
value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' placeholder="结束日期">
</el-date-picker>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
<el-form-item :label="'工作时长(m)'">
<el-input v-model="saveData.workTime" type="number" readonly :min="0" style="width: 120px"></el-input>
<el-input v-model="saveData.workTime" type="number" readonly :min="0" style="width: 60px"></el-input>
</el-form-item>
<el-form-item :label="'执行结果备注'">
<el-input v-model="saveData.remark" style="width: 465px"></el-input>
<el-input v-model="saveData.remark" style="width: 200px"></el-input>
</el-form-item>
<el-form-item :label="'维保结论'">
<el-select v-model="saveData.checkResult" style="width: 100px" placeholder="请选择">
@ -135,57 +133,150 @@
</el-select>
</el-form-item>
</el-form>
<div class="rq ">
<el-table
:height="400"
:data="detailList"
border
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnDetailList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="80"
label="检验结论">
<template slot-scope="scope">
<el-select v-model="scope.row.itemResult" style="height: 11px;padding: 0px" placeholder="合格">
<el-option label="合格" value="合格" style="color: green"></el-option>
<el-option label="不合格" value="不合格" style="color: red"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
type="selection"
header-align="center"
prop="checked"
align="center"
width="50">
</el-table-column>
</el-table>
</div>
<el-tabs v-model="activeTable" style="margin-top: 10px; width: 100%; height: 100%;" type="border-card" @tab-click="tabClick" class="customer-tab">
<el-tab-pane label="维保单" name="inspection_form">
<div class="rq ">
<el-table
:height="400"
:data="detailList"
border
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnDetailList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="80"
label="检验结论">
<template slot-scope="scope">
<el-select v-model="scope.row.itemResult" style="height: 11px;padding: 0px" placeholder="合格">
<el-option label="合格" value="合格" style="color: green"></el-option>
<el-option label="不合格" value="不合格" style="color: red"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
type="selection"
header-align="center"
prop="checked"
align="center"
width="50">
</el-table-column>
</el-table>
</div>
</el-tab-pane>
<el-tab-pane label="维保记录" name="history_record">
<el-table
:height="400"
:data="HistoryRecordList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnHistoryList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</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="detailModal(scope.row)">详情</a>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="saveCheckReport()">保存</el-button>
<el-button type="primary" @click="detailModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<el-dialog title="详情" :close-on-click-modal="false" v-drag :visible.sync="historyDetailModelFlag" width="830px">
<div class="rq ">
<el-table
:height="300"
:data="historyDetailList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnHistoryDetailList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="center"
min-width="80"
label="是否完成">
<template slot-scope="scope">
{{scope.row.finishFlag=='Y'?"是":"否"}}
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
min-width="80"
label="检验结论">
<template slot-scope="scope">
<el-select v-model="scope.row.itemResult" disabled style="height: 11px;padding: 0px">
<el-option label="合格" value="合格"></el-option>
<el-option label="不合格" value="不合格"></el-option>
</el-select>
</template>
</el-table-column>
</el-table>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="historyDetailModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
@ -195,6 +286,8 @@
eamWorkOrderSearch,
eamWorkOrderItemSearch,
saveCheckOrderReport,
queryHistoryRecord, //
eamWorkOrderReportSearch, 历史记录详情
} from "@/api/eam/eam.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
@ -633,6 +726,195 @@
columnWidth: 70,
},
],
activeTable: 'inspection_form',
HistoryRecordList: [],
HistoryModelFlag: false,
columnHistoryList: [
{
columnProp: 'orderNo',
headerAlign: "center",
align: "center",
columnLabel: '工单编号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'planDesc',
headerAlign: "center",
align: "center",
columnLabel: '计划描述',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'actualDate',
headerAlign: "center",
align: "center",
columnLabel: '维保日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'checkResult',
headerAlign: "center",
align: "center",
columnLabel: '维保结论',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'actualOperatorName',
headerAlign: "center",
align: "center",
columnLabel: '维保人员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'objectID',
headerAlign: "center",
align: "center",
columnLabel: '设备编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'objectDesc',
headerAlign: "center",
align: "center",
columnLabel: '设备名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'remark',
headerAlign: "center",
align: "center",
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
],
historyDetailList: [],
historyDetailModelFlag: false,
columnHistoryDetailList: [
{
columnProp: 'itemNo',
headerAlign: "center",
align: "center",
columnLabel: '维保项目编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'itemDesc',
headerAlign: "center",
align: "center",
columnLabel: '维保项目名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'itemRemark',
headerAlign: "center",
align: "center",
columnLabel: '维保方法说明',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'valueType',
headerAlign: "center",
align: "center",
columnLabel: '检测值类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'defaultValue',
headerAlign: "center",
align: "center",
columnLabel: '参照值',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'maxValue',
headerAlign: "center",
align: "center",
columnLabel: '最大值',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'minValue',
headerAlign: "center",
align: "center",
columnLabel: '最小值',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
],
}
},
mounted () {
@ -645,6 +927,65 @@
this.getDataList()
},
methods: {
//
tabClick (tab, event) {
//
this.refreshCurrentTabTable()
},
// table
refreshCurrentTabTable () {
//
if (this.activeTable == 'inspection_form') {
this.getInspectionFormData();
} else if (this.activeTable == 'history_record') {
this.queryHistoryRecord();
}
},
//
getInspectionFormData(){
let tempData = {
site: this.saveData.site,
planID: this.saveData.planID,
orderNo: this.saveData.orderNo,
itemType: 'B',
objectID: this.saveData.objectID
}
eamWorkOrderItemSearch(tempData).then(({data}) => {
if (data && data.code === 0) {
this.detailList = data.rows
}else {
this.detailList = [];
}
})
},
//
queryHistoryRecord(){
let tempData = {
site: this.saveData.site,
objectID: this.saveData.objectID,
functionType: 'B'
}
queryHistoryRecord(tempData).then(({data}) => {
if (data && data.code === 0) {
this.HistoryRecordList = data.rows
}else {
this.HistoryRecordList = [];
}
})
},
//
detailModal(row){
let tempData = {
site: this.saveData.site,
orderNo: row.orderNo,
}
eamWorkOrderReportSearch(tempData).then(({data}) => {
this.historyDetailList = data.rows
})
this.historyDetailModelFlag = true;
},
//
favoriteIsOk() {
let userFavorite = {
@ -791,8 +1132,10 @@
mesUser:this.$store.state.user.name,
itemList:[],
checkResult: ''
},
this.detailModelFlag = true;
}
this.getInspectionFormData()
this.queryHistoryRecord()
this.detailModelFlag = true
},
saveCheckReport(){
if(this.saveData.checkResult == ''||this.saveData.checkResult == null){

Loading…
Cancel
Save