Browse Source

2024-07-10

功能优化
java8
fengyuan_yang 2 years ago
parent
commit
793584d845
  1. 56
      src/views/modules/qc/FAIResultEntry.vue
  2. 57
      src/views/modules/qc/FQCResultEntry.vue
  3. 70
      src/views/modules/qc/IPQCResultEntry.vue
  4. 57
      src/views/modules/qc/IQCResultEntry.vue

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

@ -585,29 +585,29 @@
<div class="rq ">
<el-table
:height="400"
:data="tableData"
:data="templateTableData"
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 label="序号" align="center" prop="rowI" width="50"></el-table-column>
<el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="150">
<template slot-scope="{row}">
<el-input v-if="tableData[row.xh-1].isSubmit==='Y'" v-model="tableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `a`" v-model="tableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
<el-input v-if="templateTableData[row.xh-1].isSubmit==='Y'" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
</template>
</el-table-column>
<el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="150">
<template slot-scope="{row}">
<el-input v-if="tableData[row.xh-1].isSubmit==='Y'" v-model="tableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `b`" v-model="tableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
<el-input v-if="templateTableData[row.xh-1].isSubmit==='Y'" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
</template>
</el-table-column>
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值" width="200">
<template slot-scope="{row}">
<el-input v-if="tableData[row.xh-1].isSubmit==='Y'" v-model="tableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `c`" v-model="tableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值"></el-input>
<el-input v-if="templateTableData[row.xh-1].isSubmit==='Y'" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值"></el-input>
</template>
</el-table-column>
</el-table>
@ -618,7 +618,7 @@
:current-page="pageIndex2"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize2"
:total="totalPage2"
:total="tableData.length"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div>
@ -962,6 +962,16 @@
comQcItemImageUploadFile,
subDetailUpload
},
computed: {
templateTableData () {
let start = (this.pageIndex2 - 1) * this.pageSize2
let end = start + this.pageSize2
if (end > this.tableData.length){
end = this.tableData.length
}
return this.tableData.slice(start,end)
}
},
watch: {
detailList: {
deep: true,
@ -3327,14 +3337,11 @@
//
sizeChangeHandle2 (val) {
this.pageSize2 = val
this.pageIndex2 = 1
this.subDetailModal2()
},
//
currentChangeHandle2 (val) {
this.pageIndex2 = val
this.subDetailModal2()
},
//
@ -3543,14 +3550,10 @@
//
subDetailModal (row) {
this.subDetailData = row
this.subDetailData.limit = this.pageSize2
this.subDetailData.page = this.pageIndex2
this.pageIndex2 = 1
selectFAISubDetailedRecord(this.subDetailData).then(({data}) => {
if (data.code === 0) {
this.tableData = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
this.tableData = data.rows
}
})
this.batchAddData = {
@ -3563,14 +3566,9 @@
//
subDetailModal2 () {
this.subDetailData.limit = this.pageSize2
this.subDetailData.page = this.pageIndex2
selectFAISubDetailedRecord(this.subDetailData).then(({data}) => {
if (data.code === 0) {
this.tableData = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
this.tableData = data.rows
}
})
},
@ -3637,6 +3635,7 @@
//
rowClassName ({ row, rowIndex }) {
row.xh = rowIndex + 1
row.rowI = this.tableData.indexOf(row) + 1
},
//
@ -3733,11 +3732,10 @@
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.tableData.splice(this.tableData.indexOf(val), 1)
if (this.templateTableData.length === 0) {
this.pageIndex2--
}
})
this.$message({
message: "删除成功!",

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

@ -514,29 +514,29 @@
<div class="rq ">
<el-table
:height="400"
:data="tableData"
:data="templateTableData"
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 label="序号" align="center" prop="rowI" width="50"></el-table-column>
<el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="150">
<template slot-scope="{row}">
<el-input v-if="tableData[row.xh-1].isSubmit === 'Y'" v-model="tableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `a`" v-model="tableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
</template>
</el-table-column>
<el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="150">
<template slot-scope="{row}">
<el-input v-if="tableData[row.xh-1].isSubmit === 'Y'" v-model="tableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `b`" v-model="tableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
</template>
</el-table-column>
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值" width="200">
<template slot-scope="{row}">
<el-input v-if="tableData[row.xh-1].isSubmit==='Y'" v-model="tableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `c`" v-model="tableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值"></el-input>
<el-input v-if="templateTableData[row.xh-1].isSubmit==='Y'" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值"></el-input>
</template>
</el-table-column>
</el-table>
@ -547,7 +547,7 @@
:current-page="pageIndex2"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize2"
:total="totalPage2"
:total="tableData.length"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div>
@ -939,6 +939,16 @@
comQcItemImageUploadFile,
subDetailUpload
},
computed: {
templateTableData () {
let start = (this.pageIndex2 - 1) * this.pageSize2
let end = start + this.pageSize2
if (end > this.tableData.length){
end = this.tableData.length
}
return this.tableData.slice(start,end)
}
},
watch: {
detailList: {
deep: true,
@ -3301,14 +3311,11 @@
//
sizeChangeHandle2 (val) {
this.pageSize2 = val
this.pageIndex2 = 1
this.subDetailModal2()
},
//
currentChangeHandle2 (val) {
this.pageIndex2 = val
this.subDetailModal2()
},
//
@ -3517,14 +3524,10 @@
//
subDetailModal (row) {
this.subDetailData = row
this.subDetailData.limit = this.pageSize2
this.subDetailData.page = this.pageIndex2
this.pageIndex2 = 1
selectFQCSubDetailedRecord(this.subDetailData).then(({data}) => {
if (data.code === 0) {
this.tableData = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
this.tableData = data.rows
}
})
this.batchAddData = {
@ -3537,14 +3540,9 @@
//
subDetailModal2 () {
this.subDetailData.limit = this.pageSize2
this.subDetailData.page = this.pageIndex2
selectFQCSubDetailedRecord(this.subDetailData).then(({data}) => {
if (data.code === 0) {
this.tableData = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
this.tableData = data.rows
}
})
},
@ -3612,6 +3610,7 @@
//
rowClassName ({ row, rowIndex }) {
row.xh = rowIndex + 1
row.rowI = this.tableData.indexOf(row) + 1
},
//
@ -3708,17 +3707,15 @@
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.tableData.splice(this.tableData.indexOf(val), 1)
if (this.templateTableData.length === 0) {
this.pageIndex2--
}
})
this.$message({
message: "删除成功!",
type: "success",
})
//this.$refs.tb.clearSelection();
return
} else {
this.$message({

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

@ -527,35 +527,35 @@
<div class="rq ">
<el-table
:height="400"
:data="tableData"
:data="templateTableData"
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 label="序号" align="center" prop="rowI" width="50"></el-table-column>
<el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="150">
<template slot-scope="{row}">
<el-input v-if="tableData[row.xh-1].isSubmit === 'Y'" v-model="tableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `a`" v-model="tableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
</template>
</el-table-column>
<el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="150">
<template slot-scope="{row}">
<el-input v-if="tableData[row.xh-1].isSubmit === 'Y'" v-model="tableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `b`" v-model="tableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
</template>
</el-table-column>
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="150">
<template slot-scope="{row}">
<el-input v-if="tableData[row.xh-1].isSubmit === 'Y'" v-model="tableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `c`" v-model="tableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值A"></el-input>
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值A"></el-input>
</template>
</el-table-column>
<el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150">
<template slot-scope="{row}">
<el-input v-if="tableData[row.xh-1].isSubmit === 'Y'" v-model="tableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `d`" v-model="tableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input>
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `d`" v-model="templateTableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input>
</template>
</el-table-column>
</el-table>
@ -566,7 +566,7 @@
:current-page="pageIndex2"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize2"
:total="totalPage2"
:total="tableData.length"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div>
@ -965,6 +965,16 @@
comQcItemImageUploadFile,
subDetailUpload
},
computed: {
templateTableData () {
let start = (this.pageIndex2 - 1) * this.pageSize2
let end = start + this.pageSize2
if (end > this.tableData.length){
end = this.tableData.length
}
return this.tableData.slice(start,end)
}
},
watch: {
detailList: {
deep: true,
@ -3366,14 +3376,13 @@
//
sizeChangeHandle2 (val) {
this.pageSize2 = val
this.pageIndex2 = 1
this.subDetailModal2()
//this.subDetailModal2()
},
//
currentChangeHandle2 (val) {
this.pageIndex2 = val
this.subDetailModal2()
//this.subDetailModal2()
},
//
@ -3589,14 +3598,10 @@
//
subDetailModal (row) {
this.subDetailData = row
this.subDetailData.limit = this.pageSize2
this.subDetailData.page = this.pageIndex2
this.pageIndex2 = 1
selectIPQCSubDetailedRecord(this.subDetailData).then(({data}) => {
if (data.code === 0) {
this.tableData = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
this.tableData = data.rows
}
})
this.batchAddData = {
@ -3609,14 +3614,9 @@
//
subDetailModal2 () {
this.subDetailData.limit = this.pageSize2
this.subDetailData.page = this.pageIndex2
selectIPQCSubDetailedRecord(this.subDetailData).then(({data}) => {
if (data.code === 0) {
this.tableData = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
this.tableData = data.rows
}
})
},
@ -3682,7 +3682,8 @@
//
//
rowClassName ({ row, rowIndex }) {
row.xh = rowIndex + 1;
row.xh = rowIndex + 1
row.rowI = this.tableData.indexOf(row) + 1
},
//
@ -3790,11 +3791,16 @@
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.tableData.forEach((v, i) => {
// if (val.xh === v.xh) {
// this.tableData.splice(i, 1);
// }
// })
// console.log(this.tableData.indexOf(val))
this.tableData.splice(this.tableData.indexOf(val), 1)
if (this.templateTableData.length === 0) {
this.pageIndex2--
}
})
this.$message({
message: "删除成功!",

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

@ -447,29 +447,29 @@
<div class="rq ">
<el-table
:height="400"
:data="tableData"
:data="templateTableData"
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 label="序号" align="center" prop="rowI" width="50"></el-table-column>
<el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="150">
<template slot-scope="{row}">
<el-input v-if="tableData[row.xh-1].isSubmit === 'Y'" v-model="tableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `a`" v-model="tableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
</template>
</el-table-column>
<el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="150">
<template slot-scope="{row}">
<el-input v-if="tableData[row.xh-1].isSubmit === 'Y'" v-model="tableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `b`" v-model="tableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
</template>
</el-table-column>
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值" width="200">
<template slot-scope="{row}">
<el-input v-if="tableData[row.xh-1].isSubmit === 'Y'" v-model="tableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `c`" v-model="tableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值"></el-input>
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值"></el-input>
</template>
</el-table-column>
</el-table>
@ -480,7 +480,7 @@
:current-page="pageIndex2"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize2"
:total="totalPage2"
:total="tableData.length"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div>
@ -670,6 +670,16 @@
comQcItemImageUploadFile,
subDetailUpload
},
computed: {
templateTableData () {
let start = (this.pageIndex2 - 1) * this.pageSize2
let end = start + this.pageSize2
if (end > this.tableData.length){
end = this.tableData.length
}
return this.tableData.slice(start,end)
}
},
watch: {
detailList: {
deep: true,
@ -2246,14 +2256,11 @@
//
sizeChangeHandle2 (val) {
this.pageSize2 = val
this.pageIndex2 = 1
this.subDetailModal2()
},
//
currentChangeHandle2 (val) {
this.pageIndex2 = val
this.subDetailModal2()
},
//
@ -2437,16 +2444,11 @@
//
subDetailModal (row) {
this.subDetailData = row
this.subDetailData.limit = this.pageSize2
this.subDetailData.page = this.pageIndex2
this.pageIndex2 = 1
selectIQCSubDetailedRecord(this.subDetailData).then(({data}) => {
if (data.code === 0) {
this.tableData = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
this.tableData = data.rows
}
// this.tableData = data.rows
})
this.batchAddData = {
samplingLocation: '',
@ -2458,14 +2460,9 @@
//
subDetailModal2 () {
this.subDetailData.limit = this.pageSize2
this.subDetailData.page = this.pageIndex2
selectIQCSubDetailedRecord(this.subDetailData).then(({data}) => {
if (data.code === 0) {
this.tableData = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
this.tableData = data.rows
}
})
},
@ -2611,6 +2608,7 @@
//
rowClassName ({ row, rowIndex }) {
row.xh = rowIndex + 1
row.rowI = this.tableData.indexOf(row) + 1
},
//
@ -2710,11 +2708,10 @@
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.tableData.splice(this.tableData.indexOf(val), 1)
if (this.templateTableData.length === 0) {
this.pageIndex2--
}
})
this.$message({
message: "删除成功!",

Loading…
Cancel
Save