Browse Source

2023-08-08 设备和质量修改

java8
杨奉源 2 years ago
parent
commit
8fc25b60e6
  1. 2
      src/api/eam/eam.js
  2. 1
      src/views/modules/eam/eamAdmin.vue
  3. 146
      src/views/modules/eam/eamWorkOrderForCheck.vue
  4. 148
      src/views/modules/eam/eamWorkOrderForMaintenance.vue
  5. 78
      src/views/modules/eam/eamWorkPlanForCheck.vue
  6. 76
      src/views/modules/eam/eamWorkPlanForMaintenance.vue

2
src/api/eam/eam.js

@ -112,7 +112,7 @@ export const modalCodeBlur = data => createAPI(`/pms/eam/modalCodeBlur`,'post',d
export const planOrder = data => createAPI(`/pms/eam/planOrder`,'post',data)
export const cancelPlan = data => createAPI(`/pms/eam/cancelPlan`,'post',data)
export const getOperatorList = data => createAPI(`/pms/eam/getOperatorList`,'post',data) // 获取机修人员列表
export const getCheckerList = data => createAPI(`/pms/eam/getOperatorList`,'post',data) // 获取审核人员列表
export const getCheckerList = data => createAPI(`/pms/eam/getCheckerList`,'post',data) // 获取审核人员列表
//---------------点检工单-------------------
export const eamWorkOrderSearch = data => createAPI(`/pms/eam/eamWorkOrderSearch`,'post',data)
export const cancelOrder= data => createAPI(`/pms/eam/cancelOrder`,'post',data)

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

@ -810,7 +810,6 @@
getMesList(inData).then(({data}) => {
this.mesList = data.rows
})
console.log(this.modalData)
this.modalDisableFlag = true;
this.modalFlag = true;
},

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

@ -186,6 +186,16 @@
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
prop=""
header-align="center"
align="center"
min-width="40"
label="操作">
<template slot-scope="scope">
<el-button class="el-icon-picture-outline" type="primary" @click="checkItemImageModal(scope.row)"></el-button>
</template>
</el-table-column>
<el-table-column
v-for="(item,index) in columnDetailList" :key="index"
:sortable="item.columnSortable"
@ -208,8 +218,8 @@
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>
<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
@ -282,6 +292,15 @@
</el-footer>
</el-dialog>
<el-dialog title="图片查看" :close-on-click-modal="false" v-drag :visible.sync="imageModalFlag" width="390px" style="height: 550px;">
<div v-viewer>
<img v-for="(item, index) in descImages" :src="item" :key="index" style="width: 100px;height: 100px"/>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="imageModalFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
@ -294,7 +313,8 @@
cancelOrder,
changeOrderOperator,
checkWorkOrder, //
selectNameByMes //
selectNameByMes, //
searchFileUrl
} from "@/api/eam/eam.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
@ -742,7 +762,9 @@
cancelAll: '',
planID: '',
status: ''
}
},
descImages: [],
imageModalFlag: false
}
},
mounted () {
@ -755,13 +777,33 @@
this.getDataList()
},
methods: {
/**
* 查看项目图片
*/
checkItemImageModal (row){
this.descImages = [];
let tempData = {
site: this.$store.state.user.site,
orderNo: row.orderNo,
folder: row.itemNo,
};
searchFileUrl(tempData).then(({data}) => {
if (data.code === 0) {
for (let i = 0; i < data.rows.length; i++) {
this.descImages.push(data.rows[i].url)
}
}else {
this.$message.warning(data.msg);
}
})
this.imageModalFlag = true
},
//
favoriteIsOk() {
let userFavorite = {
userId: this.$store.state.user.id,
languageCode: this.$i18n.locale
}
console.log(this.$route.meta.menuId)
userFavoriteList(userFavorite).then(({data}) => {
for (let i = 0; i < data.list.length; i++) {
if(this.$route.meta.menuId==data.list[i].menuId){
@ -879,6 +921,7 @@
this.submitData.checker = this.saveData.checker
this.submitData.checkerName = this.saveData.checkerName
this.submitData.status = this.saveData.status
console.log(this.submitData)
let tempData = {
site: this.$store.state.user.site,
mesUser: this.$store.state.user.name
@ -909,39 +952,70 @@
}).catch(() => {
})
}else if (this.submitData.status === '待审核'){
selectNameByMes(tempData).then(({data}) => {
if (data.rows[0].adminName != this.submitData.checkerName){
this.$alert('审核人员与计划不符!', '错误', {
confirmButtonText: '确定',
type: 'warning'
})
return false
}
this.$confirm(`是否确认审核?`, '提示', {
if (!this.submitData.checker.split(';').includes(tempData.mesUser)){
this.$alert('审核人员与计划不符!', '错误', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
checkWorkOrder(this.submitData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList();
this.saveData.status = '已完工'
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
return false
}
this.$confirm(`是否确认审核?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
checkWorkOrder(this.submitData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList();
this.saveData.status = '已完工'
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
// selectNameByMes(tempData).then(({data}) => {
// if (data.rows[0].adminName != this.submitData.checkerName){
// this.$alert('', '', {
// confirmButtonText: '',
// type: 'warning'
// })
// return false
// }
// this.$confirm(`?`, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// checkWorkOrder(this.submitData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList();
// this.saveData.status = ''
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {
// }
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// }).catch(() => {
// })
// })
}
},
//
@ -972,14 +1046,14 @@
},
//
reportModal(row){
let indata = {
let inData = {
site: row.site,
itemNo: row.itemNo,
planID: row.planID,
orderNo: row.orderNo,
itemType: row.functionType,
}
eamWorkOrderReportSearch(indata).then(({data}) => {
eamWorkOrderReportSearch(inData).then(({data}) => {
this.detailList = data.rows
})
this.saveData = {

148
src/views/modules/eam/eamWorkOrderForMaintenance.vue

@ -170,6 +170,16 @@
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
prop=""
header-align="center"
align="center"
min-width="40"
label="操作">
<template slot-scope="scope">
<el-button class="el-icon-picture-outline" type="primary" @click="checkItemImageModal(scope.row)"></el-button>
</template>
</el-table-column>
<el-table-column
v-for="(item,index) in columnDetailList" :key="index"
:sortable="item.columnSortable"
@ -246,6 +256,15 @@
</el-footer>
</el-dialog>
<el-dialog title="图片查看" :close-on-click-modal="false" v-drag :visible.sync="imageModalFlag" width="390px" style="height: 550px;">
<div v-viewer>
<img v-for="(item, index) in descImages" :src="item" :key="index" style="width: 100px;height: 100px"/>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="imageModalFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
@ -258,7 +277,8 @@
changeOrderOperator,
eamWorkOrderReportSearch,
selectNameByMes,
checkWorkOrder
checkWorkOrder,
searchFileUrl
} from "@/api/eam/eam.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
@ -774,7 +794,9 @@
cancelAll: '',
planID: '',
status: ''
}
},
descImages: [],
imageModalFlag: false
}
},
mounted () {
@ -787,6 +809,27 @@
this.favoriteIsOk()
},
methods: {
/**
* 查看项目图片
*/
checkItemImageModal (row){
this.descImages = [];
let tempData = {
site: this.$store.state.user.site,
orderNo: row.orderNo,
folder: row.itemNo,
};
searchFileUrl(tempData).then(({data}) => {
if (data.code === 0) {
for (let i = 0; i < data.rows.length; i++) {
this.descImages.push(data.rows[i].url)
}
}else {
this.$message.warning(data.msg);
}
})
this.imageModalFlag = true
},
//
favoriteIsOk() {
let userFavorite = {
@ -795,7 +838,7 @@
}
userFavoriteList(userFavorite).then(({data}) => {
for (let i = 0; i < data.list.length; i++) {
if(this.$route.meta.menuId==data.list[i].menuId){
if(this.$route.meta.menuId == data.list[i].menuId){
this.favorite = true
}
}
@ -1000,14 +1043,14 @@
},
//
reportModal(row){
let indata = {
let inData = {
site: row.site,
itemNo: row.itemNo,
planID: row.planID,
orderNo: row.orderNo,
itemType: row.functionType,
}
eamWorkOrderReportSearch(indata).then(({data}) => {
eamWorkOrderReportSearch(inData).then(({data}) => {
this.detailList = data.rows
})
this.saveData = {
@ -1049,7 +1092,7 @@
checkWorkOrder(this.submitData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList();
this.detailModelFlag = false;
this.saveData.status = '待审核'
this.$message({
message: '操作成功',
type: 'success',
@ -1066,40 +1109,71 @@
}).catch(() => {
})
}else if (this.submitData.status === '待审核'){
selectNameByMes(tempData).then(({data}) => {
if (data.rows[0].adminName != this.submitData.checkerName){
this.$alert('审核人员与计划不符!', '错误', {
confirmButtonText: '确定',
type: 'warning'
})
return false
}else {
this.$confirm(`是否确认审核?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
checkWorkOrder(this.submitData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList();
this.detailModelFlag = false;
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
if (!this.submitData.checker.split(';').includes(tempData.mesUser)){
this.$alert('审核人员与计划不符!', '错误', {
confirmButtonText: '确定',
type: 'warning'
})
return false
}
this.$confirm(`是否确认审核?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
checkWorkOrder(this.submitData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList();
this.saveData.status = '已完工'
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
}).catch(() => {
})
}
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
// selectNameByMes(tempData).then(({data}) => {
// if (data.rows[0].adminName != this.submitData.checkerName){
// this.$alert('', '', {
// confirmButtonText: '',
// type: 'warning'
// })
// return false
// }else {
// this.$confirm(`?`, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// checkWorkOrder(this.submitData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList();
// this.detailModelFlag = false;
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {
// }
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// }).catch(() => {
// })
// }
// })
}
},

78
src/views/modules/eam/eamWorkPlanForCheck.vue

@ -1365,7 +1365,7 @@
columnProp: 'adminID',
headerAlign: "center",
align: "center",
columnLabel: '编码',
columnLabel: '人员编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1377,31 +1377,7 @@
columnProp: 'adminName',
headerAlign: "center",
align: "center",
columnLabel: '名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'phone',
headerAlign: "center",
align: "center",
columnLabel: '手机号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'department',
headerAlign: "center",
align: "center",
columnLabel: '部门',
columnLabel: '人员名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1422,41 +1398,17 @@
fixed: '',
},
{
columnProp: 'tel',
headerAlign: "center",
align: "center",
columnLabel: '座机号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'adminLevelDesc',
headerAlign: "center",
align: "center",
columnLabel: '等级',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'mesUser',
columnProp: 'phone',
headerAlign: "center",
align: "center",
columnLabel: 'MES账号',
columnLabel: '手机号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
}
],
dataListSelections2: [],
dataListSelections3: [],
@ -1660,7 +1612,7 @@
},
//
addObject(){
if(this.objectSelections1.length == 0){
if(this.objectSelections1.length === 0){
this.$alert('请勾选要添加的设备!', '错误', {
confirmButtonText: '确定'
})
@ -1777,11 +1729,9 @@
},
//
confirmOperator(){
if(this.dataListSelections2.length == 0){
this.$alert('请勾选人员!', '错误', {
confirmButtonText: '确定'
})
return false
if(this.dataListSelections2.length === 0){
this.$message.warning("请勾选人员!")
return
}
for (let i = 0; i < this.dataListSelections2.length; i++) {
this.modalData.operatorName = this.modalData.operatorName + ";" + this.dataListSelections2[i].adminName
@ -1793,11 +1743,9 @@
},
//
confirmOperator2(){
if(this.dataListSelections3.length == 0){
this.$alert('请勾选人员!', '错误', {
confirmButtonText: '确定'
})
return false
if(this.dataListSelections3.length === 0){
this.$message.warning("请勾选人员!")
return
}
for (let i = 0; i < this.dataListSelections3.length; i++) {
this.modalData.checkerName = this.modalData.checkerName + ";" + this.dataListSelections3[i].adminName
@ -2138,6 +2086,8 @@
//--------------------------start
//
itemModal(row){
this.options = []
this.detailData.objectID = ''
this.detailData.site = row.site
this.detailData.planID = row.planID
this.detailData.codeNo = row.propertiesCode

76
src/views/modules/eam/eamWorkPlanForMaintenance.vue

@ -1296,7 +1296,7 @@
columnProp: 'adminID',
headerAlign: "center",
align: "center",
columnLabel: '编码',
columnLabel: '人员编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1308,31 +1308,7 @@
columnProp: 'adminName',
headerAlign: "center",
align: "center",
columnLabel: '名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'phone',
headerAlign: "center",
align: "center",
columnLabel: '手机号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'department',
headerAlign: "center",
align: "center",
columnLabel: '部门',
columnLabel: '人员名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1353,41 +1329,17 @@
fixed: '',
},
{
columnProp: 'tel',
headerAlign: "center",
align: "center",
columnLabel: '座机号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'adminLevelDesc',
headerAlign: "center",
align: "center",
columnLabel: '等级',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'mesUser',
columnProp: 'phone',
headerAlign: "center",
align: "center",
columnLabel: 'MES账号',
columnLabel: '手机号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
}
],
operatorDetailList: [
{
@ -1634,11 +1586,9 @@
},
//
confirmOperator(){
if(this.dataListSelections2.length == 0){
this.$alert('请勾选人员!', '错误', {
confirmButtonText: '确定'
})
return false
if(this.dataListSelections2.length === 0){
this.$message.warning("请勾选人员!")
return
}
for (let i = 0; i < this.dataListSelections2.length; i++) {
this.modalData.operatorName = this.modalData.operatorName + ";" + this.dataListSelections2[i].adminName
@ -1650,11 +1600,9 @@
},
//
confirmOperator2(){
if(this.dataListSelections3.length == 0){
this.$alert('请勾选人员!', '错误', {
confirmButtonText: '确定'
})
return false
if(this.dataListSelections3.length === 0){
this.$message.warning("请勾选人员!")
return
}
for (let i = 0; i < this.dataListSelections3.length; i++) {
this.modalData.checkerName = this.modalData.checkerName + ";" + this.dataListSelections3[i].adminName
@ -2086,6 +2034,8 @@
//--------------------------start
//
itemModal (row) {
this.options = []
this.detailData.objectID = ''
this.detailData.site = row.site
this.detailData.planID = row.planID
this.detailData.codeNo = row.propertiesCode

Loading…
Cancel
Save