Commit 63bfb045 by lichengming

修改了开土制备制备页面删除功能

parent 8dfdc1ae
......@@ -139,6 +139,15 @@ module.exports = {
/*
** You can extend webpack config here
*/
optimization: {
splitChunks: {
minSize: 10000,
maxSize: 250000
}
},
productionSourceMap: false,
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
extend(config, ctx) {
// Run ESLint on save
if (ctx.isDev && ctx.isClient) {
......
......@@ -12,7 +12,7 @@
</Select>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
<Button @click="_search" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
......@@ -154,6 +154,7 @@ export default {
formObj: {},
tableHeight: document.documentElement.clientHeight - 215,
footerList: [],
sampleList: [],
typeData: [
{
name: '检样',
......@@ -359,6 +360,20 @@ export default {
this._getkeepContainerList()
this._getUserList()
},
_search() {
this.getPage.records = JSON.parse(JSON.stringify(this.sampleList))
console.log(this.getPage.records, 'this.getPage.records')
if (this.formObj.type !== undefined && this.formObj.type !== '') {
console.log('调了')
const arr = []
for (let i = 0; i < this.getPage.records.length; i++) {
if (this.getPage.records[i].type === Number(this.formObj.type)) {
arr.push(this.getPage.records[i])
}
}
this.getPage.records = arr
}
},
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.formObj.ids = this.sampleIds
......@@ -371,19 +386,11 @@ export default {
for (let j = 0; j < result.length; j++) {
this.getPage.records[j].prepareDate = new Date(result[j].prepareDate)
this.getPage.records[j].printNum = 1
this.getPage.records[j].signboard = j
}
this.sampleList = JSON.parse(JSON.stringify(this.getPage.records))
this.$refs.pageTable._hideLoading()
console.log('this.formObj.type', this.formObj.type)
if (this.formObj.type !== undefined && this.formObj.type !== '') {
console.log('调了')
const arr = []
for (let i = 0; i < this.getPage.records.length; i++) {
if (this.getPage.records[i].type === Number(this.formObj.type)) {
arr.push(this.getPage.records[i])
}
}
this.getPage.records = arr
}
console.log('this.getPage.records', this.getPage.records)
}
},
_getPrepareWay: async function() {
......@@ -704,6 +711,11 @@ export default {
onOk: () => {
for (let i = 0; i < rows.length; i++) {
const index = this.getPage.records.indexOf(rows[i])
const sampleData = this.sampleList.filter(item => {
return item.signboard === rows[i].signboard
})
const arrayIndex = this.sampleList.indexOf(sampleData[0])
this.sampleList.splice(arrayIndex, 1)
this.getPage.records.splice(index, 1)
}
this.$Message.success('操作成功')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment