Browse Source

2024-06-23

功能优化
java8
fengyuan_yang 2 years ago
parent
commit
95bad8cf82
  1. 15
      src/api/qc/qc.js
  2. 20
      src/views/modules/eam/eam_device_list.vue
  3. 111
      src/views/modules/qc/FAIResultEntry.vue
  4. 117
      src/views/modules/qc/FQCResultEntry.vue
  5. 111
      src/views/modules/qc/IPQCResultEntry.vue
  6. 112
      src/views/modules/qc/IQCResultEntry.vue
  7. 335
      src/views/modules/qc/qcItem.vue
  8. 253
      src/views/modules/qc/qcTemplate.vue

15
src/api/qc/qc.js

@ -169,6 +169,15 @@ export const actionFQCInspection = data => createAPI(`/pms/qc/actionFQCInspectio
export const dataAcquisition = data => createAPI(`/pms/qc/dataAcquisition`,'post',data)
export const getEquipmentNoList = data => createAPI(`/pms/qc/getEquipmentNoList`,'post',data)
export const getResponsibleOperatorList = data => createAPI(`/pms/qc/getResponsibleOperatorList`,'post',data)
export const getDataContentList = data => createAPI(`/pms/qc/getDataContentList`,'post',data)
export const getObjectList = data => createAPI(`/pms/qc/getObjectList`,'post',data)
export const getObjectListBy = data => createAPI(`/pms/qc/getObjectListBy`,'post',data)
export const addItemObject = data => createAPI(`/pms/qc/addItemObject`,'post',data)
export const deleteItemObject = data => createAPI(`/pms/qc/deleteItemObject`,'post',data)
export const updateItemObject = data => createAPI(`/pms/qc/updateItemObject`,'post',data)
export const getIQCItemObjectList = data => createAPI(`/pms/qc/getIQCItemObjectList`,'post',data)
export const getFAIItemObjectList = data => createAPI(`/pms/qc/getFAIItemObjectList`,'post',data)
export const getFQCItemObjectList = data => createAPI(`/pms/qc/getFQCItemObjectList`,'post',data)
export const getIPQCItemObjectList = data => createAPI(`/pms/qc/getIPQCItemObjectList`,'post',data)
export const getInspectionStandards = data => createAPI(`/pms/qc/getInspectionStandards`,'post',data)
export const saveInspectionStandard = data => createAPI(`/pms/qc/saveInspectionStandard`,'post',data)

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

@ -4112,8 +4112,8 @@
this.itemModalFlag=true;
},
saveItemAvailable(){
if(this.itemData.availableValue==''||this.itemData.availableValue==null){
saveItemAvailable () {
if (this.itemData.availableValue == '' || this.itemData.availableValue == null) {
this.$alert("请输入可选值!",'错误', {
confirmButtonText: '确定'
})
@ -4140,7 +4140,7 @@
})
},
deleteItemAvailable(row){
deleteItemAvailable (row) {
this.$confirm(`是否删除这个可选值?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -4169,7 +4169,7 @@
})
},
addPlanModal(type){
addPlanModal (type) {
this.planModalData = {
flag: '1',
objectList: [],
@ -4188,10 +4188,10 @@
planEndDate: '',
userId: this.$store.state.user.name,
remark: '',
};
this.planModalDisableFlag = false;
this.getObjectList();
this.planModalFlag = true;
}
this.planModalDisableFlag = false
this.getObjectList()
this.planModalFlag = true
},
getObjectList(){
@ -4200,11 +4200,11 @@
})
},
selectionChangeHandle(val){
selectionChangeHandle (val) {
this.objectSelectionList = val
},
saveData(){
saveData () {
if (this.planModalData.planDesc == '' || this.planModalData.planDesc == null) {
this.$alert('请输入计划描述 !', '错误', {
confirmButtonText: '确定'

111
src/views/modules/qc/FAIResultEntry.vue

@ -832,6 +832,53 @@
</el-footer>
</el-dialog>
<!-- 配置项目设备 -->
<el-dialog title="检验项目" :close-on-click-modal="false" v-drag :visible.sync="ItemObjectModelFlag" width="666px">
<div class="rq">
<el-table
:height="350"
:data="itemObjectList"
border
style="width: 100%">
<el-table-column
v-for="(item,index) in itemObjectColumnList" :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
header-align="center"
align="center"
min-width="100"
label="设备">
<template slot-scope="scope">
<el-select v-model="scope.row.equipmentNo" style="height: 11px" placeholder="请选择设备">
<el-option
v-for = "i in scope.row.objectList"
:key = "i.objectID"
:label = "i.objectDesc"
:value = "i.objectID">
</el-option>
</el-select>
</template>
</el-table-column>
</el-table>
</div>
<el-footer style="height:35px;margin-top: 15px;text-align:center">
<el-button type="primary" @click="actionModal2">保存</el-button>
<el-button type="primary" @click="ItemObjectModelFlag=false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- chooseList模态框 -->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
@ -875,6 +922,7 @@
actionFAIInspection, //
dataAcquisition, //
getResponsibleOperatorList, //
getFAIItemObjectList, //
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -2259,7 +2307,36 @@
fixed: '',
},
],
acquisitionList: []
acquisitionList: [],
ItemObjectModelFlag: false,
itemObjectList: [],
itemObjectColumnList: [
{
columnProp: 'itemNo',
headerAlign: "center",
align: "center",
columnLabel: '项目编码',
columnHidden: false,
columnImage: false,
status: true,
columnWidth: 120,
},
{
columnProp: 'itemDesc',
headerAlign: "center",
align: "left",
columnLabel: '项目名称',
columnHidden: false,
columnImage: false,
status: true,
columnWidth: 200,
},
],
actionData: {
site: '',
buNo: '',
inspectionNo: ''
}
}
},
@ -3131,7 +3208,8 @@
deleteFile (row) {
let tempData = {
site: row.orderRef1,
inspectionNo: row.orderRef2
inspectionNo: row.orderRef2,
buNo: row.orderRef4
}
this.$confirm('确定要删除此文件?', '提示', {
confirmButtonText: '确定',
@ -3297,17 +3375,37 @@
//
actionModal (row) {
this.actionData = {
site: row.site,
buNo: row.buNo,
inspectionNo: row.inspectionNo
}
getFAIItemObjectList(this.actionData).then(({data}) => {
if (data && data.code === 0) {
this.itemObjectList = data.rows
this.ItemObjectModelFlag = true
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
actionModal2 () {
this.$confirm(`确认开始检验?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
site: row.site,
buNo: row.buNo,
inspectionNo: row.inspectionNo,
site: this.actionData.site,
buNo: this.actionData.buNo,
inspectionNo: this.actionData.inspectionNo,
actionBy: this.$store.state.user.name,
state: '待检验'
state: '待检验',
equipmentList: this.itemObjectList
}
actionFAIInspection(tempData).then(({data}) => {
if (data && data.code === 0) {
@ -3318,6 +3416,7 @@
duration: 1500,
onClose: () => {}
})
this.ItemObjectModelFlag = false
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'

117
src/views/modules/qc/FQCResultEntry.vue

@ -808,6 +808,53 @@
</el-footer>
</el-dialog>
<!-- 配置项目设备 -->
<el-dialog title="检验项目" :close-on-click-modal="false" v-drag :visible.sync="ItemObjectModelFlag" width="666px">
<div class="rq">
<el-table
:height="350"
:data="itemObjectList"
border
style="width: 100%">
<el-table-column
v-for="(item,index) in itemObjectColumnList" :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
header-align="center"
align="center"
min-width="100"
label="设备">
<template slot-scope="scope">
<el-select v-model="scope.row.equipmentNo" style="height: 11px" placeholder="请选择设备">
<el-option
v-for = "i in scope.row.objectList"
:key = "i.objectID"
:label = "i.objectDesc"
:value = "i.objectID">
</el-option>
</el-select>
</template>
</el-table-column>
</el-table>
</div>
<el-footer style="height:35px;margin-top: 15px;text-align:center">
<el-button type="primary" @click="actionModal2">保存</el-button>
<el-button type="primary" @click="ItemObjectModelFlag=false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- chooseList模态框 -->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
@ -852,6 +899,7 @@
actionFQCInspection, //
dataAcquisition, //
getResponsibleOperatorList, //
getFQCItemObjectList, //
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -2234,7 +2282,36 @@
fixed: '',
},
],
acquisitionList: []
acquisitionList: [],
ItemObjectModelFlag: false,
itemObjectList: [],
itemObjectColumnList: [
{
columnProp: 'itemNo',
headerAlign: "center",
align: "center",
columnLabel: '项目编码',
columnHidden: false,
columnImage: false,
status: true,
columnWidth: 120,
},
{
columnProp: 'itemDesc',
headerAlign: "center",
align: "left",
columnLabel: '项目名称',
columnHidden: false,
columnImage: false,
status: true,
columnWidth: 200,
},
],
actionData: {
site: '',
buNo: '',
inspectionNo: ''
}
}
},
@ -3105,7 +3182,8 @@
deleteFile (row) {
let tempData = {
site: row.orderRef1,
inspectionNo: row.orderRef2
inspectionNo: row.orderRef2,
buNo: row.orderRef4
}
this.$confirm('确定要删除此文件?', '提示', {
confirmButtonText: '确定',
@ -3271,17 +3349,37 @@
//
actionModal (row) {
this.actionData = {
site: row.site,
buNo: row.buNo,
inspectionNo: row.inspectionNo
}
getFQCItemObjectList(this.actionData).then(({data}) => {
if (data && data.code === 0) {
this.itemObjectList = data.rows
this.ItemObjectModelFlag = true
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
actionModal2 () {
this.$confirm(`确认开始检验?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
site: row.site,
buNo: row.buNo,
inspectionNo: row.inspectionNo,
site: this.actionData.site,
buNo: this.actionData.buNo,
inspectionNo: this.actionData.inspectionNo,
actionBy: this.$store.state.user.name,
state: '待检验'
state: '待检验',
equipmentList: this.itemObjectList
}
actionFQCInspection(tempData).then(({data}) => {
if (data && data.code === 0) {
@ -3292,6 +3390,7 @@
duration: 1500,
onClose: () => {}
})
this.ItemObjectModelFlag = false
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
@ -3347,12 +3446,6 @@
//
subDetailModal (row) {
// this.subDetailData.inspectionNo = row.inspectionNo
// this.subDetailData.itemNo = row.itemNo
// this.subDetailData.itemDesc = row.itemDesc
// this.subDetailData.defaultValue = row.defaultValue
// this.subDetailData.maxValue = row.maxValue
// this.subDetailData.minValue = row.minValue
this.subDetailData = row
selectFQCSubDetailedRecord(this.subDetailData).then(({data}) => {
this.tableData = data.rows

111
src/views/modules/qc/IPQCResultEntry.vue

@ -830,6 +830,53 @@
</el-footer>
</el-dialog>
<!-- 配置项目设备 -->
<el-dialog title="检验项目" :close-on-click-modal="false" v-drag :visible.sync="ItemObjectModelFlag" width="666px">
<div class="rq">
<el-table
:height="350"
:data="itemObjectList"
border
style="width: 100%">
<el-table-column
v-for="(item,index) in itemObjectColumnList" :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
header-align="center"
align="center"
min-width="100"
label="设备">
<template slot-scope="scope">
<el-select v-model="scope.row.equipmentNo" style="height: 11px" placeholder="请选择设备">
<el-option
v-for = "i in scope.row.objectList"
:key = "i.objectID"
:label = "i.objectDesc"
:value = "i.objectID">
</el-option>
</el-select>
</template>
</el-table-column>
</el-table>
</div>
<el-footer style="height:35px;margin-top: 15px;text-align:center">
<el-button type="primary" @click="actionModal2">保存</el-button>
<el-button type="primary" @click="ItemObjectModelFlag=false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 上传文件的modal -->
@ -872,6 +919,7 @@
actionIPQCInspection, //
dataAcquisition, //
getResponsibleOperatorList, //
getIPQCItemObjectList, //
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -2288,7 +2336,36 @@
fixed: '',
},
],
acquisitionList: []
acquisitionList: [],
ItemObjectModelFlag: false,
itemObjectList: [],
itemObjectColumnList: [
{
columnProp: 'itemNo',
headerAlign: "center",
align: "center",
columnLabel: '项目编码',
columnHidden: false,
columnImage: false,
status: true,
columnWidth: 120,
},
{
columnProp: 'itemDesc',
headerAlign: "center",
align: "left",
columnLabel: '项目名称',
columnHidden: false,
columnImage: false,
status: true,
columnWidth: 200,
},
],
actionData: {
site: '',
buNo: '',
inspectionNo: ''
}
}
},
@ -2778,7 +2855,8 @@
deleteFile (row) {
let tempData = {
site: row.orderRef1,
inspectionNo: row.orderRef2
inspectionNo: row.orderRef2,
buNo: row.orderRef4
}
this.$confirm('确定要删除此文件?', '提示', {
confirmButtonText: '确定',
@ -3336,17 +3414,37 @@
//
actionModal (row) {
this.actionData = {
site: row.site,
buNo: row.buNo,
inspectionNo: row.inspectionNo
}
getIPQCItemObjectList(this.actionData).then(({data}) => {
if (data && data.code === 0) {
this.itemObjectList = data.rows
this.ItemObjectModelFlag = true
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
actionModal2 () {
this.$confirm(`确认开始检验?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
site: row.site,
buNo: row.buNo,
inspectionNo: row.inspectionNo,
site: this.actionData.site,
buNo: this.actionData.buNo,
inspectionNo: this.actionData.inspectionNo,
actionBy: this.$store.state.user.name,
state: '待检验'
state: '待检验',
equipmentList: this.itemObjectList
}
actionIPQCInspection(tempData).then(({data}) => {
if (data && data.code === 0) {
@ -3357,6 +3455,7 @@
duration: 1500,
onClose: () => {}
})
this.ItemObjectModelFlag = false
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'

112
src/views/modules/qc/IQCResultEntry.vue

@ -546,6 +546,51 @@
</el-footer>
</el-dialog>
<!-- 配置项目设备 -->
<el-dialog title="检验项目" :close-on-click-modal="false" v-drag :visible.sync="ItemObjectModelFlag" width="666px">
<el-table
:height="350"
:data="itemObjectList"
border
style="width: 100%; ">
<el-table-column
v-for="(item,index) in itemObjectColumnList" :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
header-align="center"
align="center"
min-width="100"
label="设备">
<template slot-scope="scope">
<el-select v-model="scope.row.equipmentNo" style="height: 11px" placeholder="请选择设备">
<el-option
v-for = "i in scope.row.objectList"
:key = "i.objectID"
:label = "i.objectDesc"
:value = "i.objectID">
</el-option>
</el-select>
</template>
</el-table-column>
</el-table>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="actionModal2">保存</el-button>
<el-button type="primary" @click="ItemObjectModelFlag=false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 上传文件的modal -->
@ -579,6 +624,7 @@
actionIQCInspection, //
dataAcquisition, //
getResponsibleOperatorList, //
getIQCItemObjectList, //
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -1584,7 +1630,34 @@
fixed: '',
},
],
acquisitionList: []
acquisitionList: [],
ItemObjectModelFlag: false,
itemObjectList: [],
itemObjectColumnList: [
{
columnProp: 'itemNo',
headerAlign: "center",
align: "center",
columnLabel: '项目编码',
columnHidden: false,
columnImage: false,
status: true,
},
{
columnProp: 'itemDesc',
headerAlign: "center",
align: "left",
columnLabel: '项目名称',
columnHidden: false,
columnImage: false,
status: true,
},
],
actionData: {
site: '',
buNo: '',
inspectionNo: ''
}
}
},
@ -1991,7 +2064,8 @@
deleteFile (row) {
let tempData = {
site: row.orderRef1,
inspectionNo: row.orderRef2
inspectionNo: row.orderRef2,
buNo: row.orderRef4
}
this.$confirm('确定要删除此文件?', '提示', {
confirmButtonText: '确定',
@ -2151,17 +2225,37 @@
//
actionModal (row) {
this.actionData = {
site: row.site,
buNo: row.buNo,
inspectionNo: row.inspectionNo
}
getIQCItemObjectList(this.actionData).then(({data}) => {
if (data && data.code === 0) {
this.itemObjectList = data.rows
this.ItemObjectModelFlag = true
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
actionModal2 () {
this.$confirm(`确认开始检验?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
site: row.site,
buNo: row.buNo,
inspectionNo: row.inspectionNo,
site: this.actionData.site,
buNo: this.actionData.buNo,
inspectionNo: this.actionData.inspectionNo,
actionBy: this.$store.state.user.name,
state: '待检验'
state: '待检验',
equipmentList: this.itemObjectList
}
actionIQCInspection(tempData).then(({data}) => {
if (data && data.code === 0) {
@ -2172,6 +2266,7 @@
duration: 1500,
onClose: () => {}
})
this.ItemObjectModelFlag = false
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
@ -2726,4 +2821,9 @@
.numInput /deep/ .el-input__inner{
text-align: right;
}
.el-table /deep/ .cell{
height: auto;
line-height: 1.5;
}
</style>

335
src/views/modules/qc/qcItem.vue

@ -65,7 +65,6 @@
:height="height"
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :key="index"
@ -91,6 +90,7 @@
<template slot-scope="scope">
<a v-if="!authUpdate" type="text" size="small" @click="updateModal(scope.row)">编辑</a>
<a v-if="!authDelete" type="text" size="small" @click="deleteModal(scope.row)">删除</a>
<a type="text" size="small" @click="itemObjectModal(scope.row)">采集设备配置</a>
</template>
</el-table-column>
</el-table>
@ -109,7 +109,7 @@
<el-dialog title="检验项目" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="500px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="BU" prop="bu" :rules="rules.bu">
<el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" @change="getEquipmentNoList" style="width: 456px">
<el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" @change="buChangeFunction" style="width: 456px">
<el-option
v-for = "i in userBuList"
:key = "i.buNo"
@ -220,13 +220,23 @@
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="采集条件路径">
<el-select multiple v-model="modalData.collectionConditionList" style="width: 456px">
<!-- <el-form-item label="采集条件路径">-->
<!-- <el-select multiple v-model="modalData.collectionConditionList" style="width: 260px">-->
<!-- <el-option-->
<!-- v-for = "i in equipmentNoList"-->
<!-- :key = "i.equipmentNo"-->
<!-- :label = "i.equipmentNo"-->
<!-- :value = "i.equipmentNo">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="采集数据内容">
<el-select v-model="modalData.collectionDataContent" clearable style="width: 456px">
<el-option
v-for = "i in equipmentNoList"
:key = "i.equipmentNo"
:label = "i.equipmentNo"
:value = "i.equipmentNo">
v-for = "i in dataContentList"
:key = "i.contentDesc"
:label = "i.contentDesc"
:value = "i.contentDesc">
</el-option>
</el-select>
</el-form-item>
@ -266,7 +276,6 @@
:data="methodList"
@row-dblclick="getRowData"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in methodDetailList" :key="index"
@ -290,6 +299,112 @@
</el-footer>
</el-dialog>
<!-- 设备-> 快速新增 -->
<el-dialog title="新增" :close-on-click-modal="false" v-drag :visible.sync="objectModelFlag" width="900px">
<div style="font-size: 12px">
<el-form :inline="true" label-position="top" :model="objectData">
<el-form-item :label="'设备编码'">
<el-input v-model="objectData.objectID" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'设备名称'">
<el-input v-model="objectData.objectDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="getObjectList">查询</el-button>
</el-form-item>
</el-form>
</div>
<el-container style="margin-top: 0px;">
<el-main style="width: 350px; padding: 1px">
<span style="font-size: 12px" >可选设备:</span>
<el-table
height="400px"
:data="objectList1"
border
ref="objectTable1"
@row-click="objectClickRow1"
@selection-change="selectionObject1"
highlight-current-row
style="width: 100%">
<el-table-column
type="selection"
header-align="center"
align="center"
width="50">
</el-table-column>
<el-table-column
prop="objectID"
header-align="center"
align="center"
min-width="80"
label="设备编码">
</el-table-column>
<el-table-column
prop="objectDesc"
header-align="center"
align="center"
min-width="120"
label="设备名称">
</el-table-column>
</el-table>
</el-main>
<el-main style="width: 111px;padding: -1px">
<div style="margin-top: 182px;margin-left: 18px">
<el-button type="primary" @click="addObject">添加>></el-button>
</div>
<div style="margin-top: 15px;margin-left: 18px">
<el-button type="primary" @click="deleteObject">删除<<</el-button>
</div>
</el-main>
<el-main style="width: 350px;padding: 1px">
<span style="font-size: 12px" >已有设备:</span>
<el-table
height="400px"
:data="objectList2"
border
ref="objectTable2"
@row-click="objectClickRow2"
@selection-change="selectionObject2"
highlight-current-row
style="width: 100%">
<el-table-column
type="selection"
header-align="center"
align="center"
width="50">
</el-table-column>
<el-table-column
prop="objectID"
header-align="center"
align="center"
min-width="80"
label="设备编码">
</el-table-column>
<el-table-column
prop="objectDesc"
header-align="center"
align="center"
min-width="120"
label="设备名称">
</el-table-column>
<el-table-column
header-align="center"
align="center"
min-width="50"
label="默认">
<template slot-scope="{row}">
<el-checkbox v-model="row.defaultFlag" true-label="Y" @change="(val)=>defaultChange(row)" false-label="N"></el-checkbox>
</template>
</el-table-column>
</el-table>
</el-main>
</el-container>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="updateItemObject">保存</el-button>
<el-button type="primary" @click="objectModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 导入 -->
@ -307,11 +422,17 @@
queryMethodList, //
getSiteAndBuByUserName,
getEquipmentNoList, //
getDataContentList, //
getObjectList, //
getObjectListBy,
addItemObject, //
deleteItemObject, //
updateItemObject, //
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
import qcUpload from "./qc_upload";
import qcUpload from "./qc_upload"
export default {
components: {
Chooselist,
@ -358,7 +479,6 @@
totalPage: 0,
height: 200,
dataList: [],
dataListLoading: false,
modalFlag: false,
modalDisableFlag: false,
modalData: {
@ -390,7 +510,8 @@
collectionMethod: '',
collectionMethodList: [],
collectionCondition: '',
collectionConditionList: []
collectionConditionList: [],
collectionDataContent: ''
},
//
columnList: [
@ -819,6 +940,19 @@
authUpdate: false,
authDelete: false,
menuId: this.$route.meta.menuId,
dataContentList: [],
objectSelections1: [],
objectSelections2: [],
objectList1: [],
objectList2: [],
objectData: {
site: '',
buNo: '',
itemNo: '',
objectID: '',
objectDesc: '',
},
objectModelFlag: false
}
},
@ -846,6 +980,145 @@
},
methods: {
//
defaultChange (row) {
this.objectList2 = this.objectList2.map(val => {
if (val.objectID === row.objectID) {
return val
}
val.defaultFlag = 'N'
return val
})
},
//
itemObjectModal (row) {
this.objectSelections1 = null
this.objectSelections2 = null
getObjectList(row).then(({data}) => {
this.objectList1 = data.row1
this.objectList2 = data.row2
})
this.objectData = {
site: row.site,
buNo: row.buNo,
itemNo: row.itemNo,
objectID: '',
objectDesc: '',
}
this.objectModelFlag = true
},
//
getObjectList () {
//
getObjectListBy(this.objectData).then(({data}) => {
if (data && data.code === 0) {
this.objectList1 = data.rows
} else {
this.objectList1 = []
}
})
},
//
objectClickRow1 (row) {
this.$refs.objectTable1.toggleRowSelection(row)
},
//
objectClickRow2 (row) {
this.$refs.objectTable2.toggleRowSelection(row)
},
selectionObject1 (val) {
this.objectSelections1 = val
},
selectionObject2 (val) {
this.objectSelections2 = val
},
//
addObject () {
if (this.objectSelections1 == null || this.objectSelections1.length === 0) {
this.$message.warning('请选择可选设备!')
return
}
let inData = {
site: this.objectData.site,
buNo: this.objectData.buNo,
itemNo: this.objectData.itemNo,
objectList: this.objectSelections1
}
addItemObject(inData).then(({data}) => {
if (data && data.code === 0) {
getObjectList(this.objectData).then(({data}) => {
this.objectList1 = data.row1
this.objectList2 = data.row2
})
this.objectSelections1 = []
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
deleteObject () {
if(this.objectSelections2 == null || this.objectSelections2.length === 0){
this.$message.warning('请选择已有代理商!')
return
}
let inData = {
site: this.objectData.site,
buNo: this.objectData.buNo,
itemNo: this.objectData.itemNo,
objectList: this.objectSelections2
}
deleteItemObject(inData).then(({data}) => {
if (data && data.code === 0) {
getObjectList(this.objectData).then(({data}) => {
this.objectList1 = data.row1
this.objectList2 = data.row2
})
this.objectSelections2 = []
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
updateItemObject () {
let inData = {
site: this.objectData.site,
buNo: this.objectData.buNo,
itemNo: this.objectData.itemNo,
objectList: this.objectList2
}
updateItemObject(inData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
this.objectModelFlag = false
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
// bu
getSiteAndBuByUserName () {
let tempData = {
@ -858,6 +1131,14 @@
})
},
// bu
buChangeFunction () {
this.modalData.collectionConditionList = ''
this.modalData.collectionDataContent = ''
this.getEquipmentNoList()
this.getDataContentList()
},
//
getEquipmentNoList () {
let tempData = {
@ -870,6 +1151,18 @@
})
},
//
getDataContentList () {
let tempData = {
bu: this.modalData.bu
}
getDataContentList(tempData).then(({data}) => {
if (data.code === 0) {
this.dataContentList = data.rows
}
})
},
// S
getBaseList (val,type) {
this.tagNo = val
@ -986,9 +1279,13 @@
collectionMethod: '',
collectionMethodList: [],
collectionCondition: '',
collectionConditionList: []
collectionConditionList: [],
collectionDataContent: ''
}
//
this.getEquipmentNoList()
//
this.getDataContentList()
this.modalDisableFlag = false
this.modalFlag = true
},
@ -1024,8 +1321,12 @@
collectionMethodList: row.collectionMethod == null || row.collectionMethod === '' ? [] : row.collectionMethod.split(','),
collectionCondition: row.collectionCondition,
collectionConditionList: row.collectionCondition == null || row.collectionCondition === '' ? [] : row.collectionCondition.split(','),
collectionDataContent: row.collectionDataContent
}
//
this.getEquipmentNoList()
//
this.getDataContentList()
this.modalDisableFlag = true
this.modalFlag = true
},
@ -1093,14 +1394,6 @@
this.$message.warning('请选择采集数据方式!')
return
}
if (this.modalData.collectionFlag === 'Y' && (this.modalData.collectionConditionList == null || this.modalData.collectionConditionList.length === 0)) {
this.$message.warning('请选择采集条件路径!')
return
}
// if (this.modalData.collectionFlag === 'Y' && (this.modalData.collectionSourceList.length !== this.modalData.collectionMethodList.length)) {
// this.$message.warning('')
// return
// }
this.modalData.collectionSource = this.modalData.collectionSourceList.join(',')
this.modalData.collectionMethod = this.modalData.collectionMethodList.join(',')
this.modalData.collectionCondition = this.modalData.collectionConditionList.join(',')

253
src/views/modules/qc/qcTemplate.vue

@ -66,7 +66,6 @@
:height="height"
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :key="index"
@ -214,7 +213,6 @@
:height="400"
:data="detailList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnDetailList" :key="index"
@ -263,36 +261,37 @@
<el-input v-if="scope.row.valueTypeDb != 'T'" v-model="scope.row.minValue" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="right"
width="220"
label="检验设备">
<template slot-scope="scope">
<el-autocomplete
clearable
class="inline-input"
popper-class="el-autocomplete-suggestion"
v-model="scope.row.objectID"
value-key="idAndDesc"
:fetch-suggestions="FilterEntityName"
:trigger-on-focus="true"
placeholder="请选择设备"
@clear="blurForBug()"
@select="handleSelect"
:popper-append-to-body="false"
style="width: 210px">
</el-autocomplete>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- prop=""-->
<!-- header-align="center"-->
<!-- align="right"-->
<!-- width="220"-->
<!-- label="检验设备">-->
<!-- <template slot-scope="scope">-->
<!-- <el-autocomplete-->
<!-- clearable-->
<!-- class="inline-input"-->
<!-- popper-class="el-autocomplete-suggestion"-->
<!-- v-model="scope.row.objectID"-->
<!-- value-key="idAndDesc"-->
<!-- :fetch-suggestions="FilterEntityName"-->
<!-- :trigger-on-focus="true"-->
<!-- placeholder="请选择设备"-->
<!-- @clear="blurForBug()"-->
<!-- @select="handleSelect"-->
<!-- :popper-append-to-body="false"-->
<!-- style="width: 210px">-->
<!-- </el-autocomplete>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
fixed="right"
header-align="center"
align="center"
width="80"
width="130"
label="操作">
<template slot-scope="scope">
<a v-if="scope.row.valueTypeDb === 'N'" type="text" size="small" @click="inspectionStandardModal(scope.row)">检验标准</a>
<a type="text" size="small" @click="delItemDetails(scope.row)">删除项目</a>
</template>
</el-table-column>
@ -304,6 +303,67 @@
</el-footer>
</el-dialog>
<!-- 检验标准配置 -->
<el-dialog title="检验标准" :close-on-click-modal="false" v-drag :visible.sync="inspectionStandardModalFlag" width="811px">
<el-button type="success" icon="el-icon-plus" size="mini" @click="handleAddBtn">添加</el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBtn">删除</el-button>
<div class="rq ">
<el-table
:height="300"
:data="tableData"
border
:row-class-name="rowClassName"
@selection-change="handleDetailSelectionChange"
style="width: 100%;">
<el-table-column type="selection" align="center" width="50"></el-table-column>
<el-table-column label="序号" align="center" prop="xh" width="50"></el-table-column>
<el-table-column prop="collectionSource" header-align="center" align="center" :required="true" label="采集数据来源" width="150">
<template slot-scope="{row}">
<el-select v-model="tableData[row.xh-1].collectionSource" clearable style="width: 140px">
<el-option label="采集数据01" value="value0"></el-option>
<el-option label="采集数据02" value="value1"></el-option>
<el-option label="采集数据03" value="value2"></el-option>
<el-option label="采集数据04" value="value3"></el-option>
<el-option label="采集数据05" value="value4"></el-option>
<el-option label="采集数据06" value="value5"></el-option>
<el-option label="采集数据07" value="value6"></el-option>
<el-option label="采集数据08" value="value7"></el-option>
<el-option label="采集数据09" value="value8"></el-option>
<el-option label="采集数据10" value="value9"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="defaultValue" header-align="center" align="center" :required="true" label="标准值" width="150">
<template slot-scope="{row}">
<el-input :ref="`${row.xh-1}` + `a`" v-model="tableData[row.xh-1].defaultValue" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入默认值"></el-input>
</template>
</el-table-column>
<el-table-column prop="maxValue" header-align="center" align="center" :required="true" label="最大值" width="150">
<template slot-scope="{row}">
<el-input :ref="`${row.xh-1}` + `b`" v-model="tableData[row.xh-1].maxValue" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入最大值"></el-input>
</template>
</el-table-column>
<el-table-column prop="minValue" header-align="center" align="center" :required="true" label="最小值" width="150">
<template slot-scope="{row}">
<el-input :ref="`${row.xh-1}` + `c`" v-model="tableData[row.xh-1].minValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入最小值"></el-input>
</template>
</el-table-column>
<el-table-column prop="condition" header-align="center" align="center" :required="true" label="判断条件" width="90">
<template slot-scope="{row}">
<el-select v-model="tableData[row.xh-1].condition" clearable style="width: 80px">
<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: 10px;text-align:center">
<el-button type="primary" @click="saveInspectionStandard">保存</el-button>
<el-button type="primary" @click="inspectionStandardModalFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- 检验项目->快速新增 -->
<el-dialog title="新增" @close="refreshDetailList" :close-on-click-modal="false" v-drag :visible.sync="fastAddFlag" width="1100px">
<div style="font-size: 12px">
@ -340,7 +400,6 @@
@row-click="itemClickRow1"
@selection-change="selectionItem1"
highlight-current-row
v-loading="dataListLoading"
style="width: 100%">
<el-table-column
type="selection"
@ -404,7 +463,6 @@
@row-click="itemClickRow2"
@selection-change="selectionItem2"
highlight-current-row
v-loading="dataListLoading"
style="width: 100%">
<el-table-column
type="selection"
@ -456,7 +514,9 @@
delItemDetails, //
saveItemDetailed, //
getItem, //
getSiteAndBuByUserName
getSiteAndBuByUserName,
getInspectionStandards, //
saveInspectionStandard, //
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -873,7 +933,6 @@
],
detailModelFlag: false,
detailList: [],
dataListLoading: false,
dataList: [],
//
columnDetailList: [
@ -959,6 +1018,16 @@
authDelete: false,
authDetail: false,
menuId: this.$route.meta.menuId,
inspectionStandardModalFlag: false,
standardData: {
site: '',
buNo: '',
templateId: '',
itemNo: '',
standardList: []
},
tableData: [],
checkedDetail: [],
}
},
@ -986,6 +1055,127 @@
},
methods: {
//
inspectionStandardModal (row) {
this.standardData = {
site: row.site,
buNo: row.buNo,
templateId: row.templateId,
itemNo: row.itemNo,
standardList: []
}
getInspectionStandards(this.standardData).then(({data}) => {
if (data.code === 0) {
this.tableData = data.rows
} else {
this.tableData = []
}
})
this.inspectionStandardModalFlag = true
},
//
rowClassName ({ row, rowIndex }) {
row.xh = rowIndex + 1
},
//
handleDetailSelectionChange (selection) {
this.checkedDetail = selection
},
//
handleAddBtn () {
let obj = {
collectionSource: '',
defaultValue: '',
minValue: '',
maxValue: '',
condition: ''
}
this.tableData.push(obj)
},
//
handleDeleteBtn () {
if (this.checkedDetail.length === 0) {
this.$alert("请先选择要删除的数据", "提示", {
confirmButtonText: "确定",
})
} else {
this.$confirm("请是否确认删除该检验标准?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
callback: (action) => {
if (action === "confirm") {
let val = this.checkedDetail
val.forEach((val, index) => {
this.tableData.forEach((v, i) => {
if (val.xh === v.xh) {
this.tableData.splice(i, 1)
}
})
})
this.$message({
message: "删除成功!",
type: "success",
})
return
} else {
this.$message({
message: "已取消删除操作",
type: "warning",
})
return
}
},
})
}
},
//
nextFocus1 (index) {
let a1 = `${index + 1}` + `a`
this.$nextTick(() => {
this.$refs[a1].focus()
})
},
nextFocus2 (index) {
let a2 = `${index + 1}` + `b`
this.$nextTick(() => {
this.$refs[a2].focus()
})
},
nextFocus3 (index) {
let a3 = `${index + 1}` + `c`
this.$nextTick(() => {
this.$refs[a3].focus()
})
},
//
saveInspectionStandard () {
this.standardData.standardList = this.tableData
saveInspectionStandard(this.standardData).then(({data}) => {
if (data && data.code === 0) {
this.inspectionStandardModalFlag = false
this.tableData = []
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
// bu
getSiteAndBuByUserName () {
let tempData = {
@ -1124,7 +1314,6 @@
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
}
this.dataListLoading = false
})
},
@ -1288,7 +1477,7 @@
this.detailData.inspectionTypeName = row.inspectionTypeName
templateDetailsSearch(this.detailData).then(({data}) => {
this.detailList = data.rows
this.objectSearch()
//this.objectSearch()
})
this.detailModelFlag = true
},

Loading…
Cancel
Save