修改table页的过滤及展示
This commit is contained in:
@@ -86,7 +86,7 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
v-for="(item, index) in projectTabName"
|
v-for="(item, index) in projectTabName"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -380,7 +380,6 @@ export default {
|
|||||||
this.listForm.prcName = this.prcName
|
this.listForm.prcName = this.prcName
|
||||||
this.listForm['id'] = item.id
|
this.listForm['id'] = item.id
|
||||||
this.dataList = item.resDats
|
this.dataList = item.resDats
|
||||||
this.oldDataList = item.resDats
|
|
||||||
item.resDats.forEach(item => {
|
item.resDats.forEach(item => {
|
||||||
if(!this.projectTabName.includes(item.projectName)){
|
if(!this.projectTabName.includes(item.projectName)){
|
||||||
this.projectTabName.push(item.projectName)
|
this.projectTabName.push(item.projectName)
|
||||||
@@ -671,8 +670,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/deep/.el-tabs__header{
|
/deep/.el-tabs--border-card>.el-tabs__content{
|
||||||
margin: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.demo-drawer-content {
|
.demo-drawer-content {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
|||||||
@@ -135,7 +135,7 @@
|
|||||||
<process-title>
|
<process-title>
|
||||||
<template slot="title">填写信息</template>
|
<template slot="title">填写信息</template>
|
||||||
</process-title>
|
</process-title>
|
||||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
v-for="(item, index) in projectTabName"
|
v-for="(item, index) in projectTabName"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -146,7 +146,7 @@
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
<el-table
|
<el-table
|
||||||
ref="multipleTable"
|
ref="multipleTable"
|
||||||
:data="dataList"
|
:data="dataList.filter(item =>{return item.projectName === projectName})"
|
||||||
tooltip-effect="dark"
|
tooltip-effect="dark"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
border
|
border
|
||||||
@@ -396,7 +396,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//折叠的标志,true为折叠,false为不折叠
|
//折叠的标志,true为折叠,false为不折叠
|
||||||
activeName: 'first',
|
activeName: '',
|
||||||
foldFormFlag: false,
|
foldFormFlag: false,
|
||||||
projectTabName: [],
|
projectTabName: [],
|
||||||
comFlag: 0,
|
comFlag: 0,
|
||||||
@@ -460,25 +460,19 @@ export default {
|
|||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
choiceForm: {}, //选择标准清单列表
|
choiceForm: {}, //选择标准清单列表
|
||||||
newDataList: [],
|
|
||||||
countryOptions: [], //适用区域下拉框数据
|
countryOptions: [], //适用区域下拉框数据
|
||||||
user1: "",
|
user1: "",
|
||||||
user2: "",
|
user2: "",
|
||||||
user3: "",
|
user3: "",
|
||||||
user4: "",
|
user4: "",
|
||||||
user5: "",
|
user5: "",
|
||||||
|
projectName: "",
|
||||||
standMap: new Map()
|
standMap: new Map()
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClick(tab) {
|
handleClick(tab) {
|
||||||
let projectData = this.dataList
|
this.projectName = tab.name
|
||||||
this.dataList = []
|
|
||||||
projectData.forEach(item => {
|
|
||||||
if(item.projectName === tab.name){
|
|
||||||
this.dataList.push(item)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
//折叠/展开基础信息方法
|
//折叠/展开基础信息方法
|
||||||
foldForm() {
|
foldForm() {
|
||||||
@@ -604,13 +598,13 @@ export default {
|
|||||||
this.listForm.prcNum = this.prcNum
|
this.listForm.prcNum = this.prcNum
|
||||||
this.listForm.prcName = this.prcName
|
this.listForm.prcName = this.prcName
|
||||||
this.listForm['id'] = item.id
|
this.listForm['id'] = item.id
|
||||||
this.newDataList = item.dataList
|
|
||||||
this.dataList = item.dataList
|
this.dataList = item.dataList
|
||||||
item.dataList.forEach(item => {
|
item.dataList.forEach(item => {
|
||||||
if(!this.projectTabName.includes(item.projectName)){
|
if(!this.projectTabName.includes(item.projectName)){
|
||||||
this.projectTabName.push(item.projectName)
|
this.projectTabName.push(item.projectName)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.projectName = this.activeName = this.projectTabName[Object.keys(this.projectTabName)[0]]
|
||||||
} else {
|
} else {
|
||||||
this.listForm = item.form;
|
this.listForm = item.form;
|
||||||
this.dataList = item.form.dataList;
|
this.dataList = item.form.dataList;
|
||||||
@@ -621,7 +615,7 @@ export default {
|
|||||||
|
|
||||||
//提交事件
|
//提交事件
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
this.listForm.dataList = this.newDataList
|
this.listForm.dataList = this.dataList
|
||||||
this.listForm.commentText = this.commentText;
|
this.listForm.commentText = this.commentText;
|
||||||
const json = JSON.stringify(this.listForm);
|
const json = JSON.stringify(this.listForm);
|
||||||
this.isSubmit = true
|
this.isSubmit = true
|
||||||
@@ -754,6 +748,9 @@ export default {
|
|||||||
.demo-drawer-content {
|
.demo-drawer-content {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
/deep/.el-tabs--border-card>.el-tabs__content{
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
/deep/.el-table th > .cell{
|
/deep/.el-table th > .cell{
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,7 +135,7 @@
|
|||||||
<process-title>
|
<process-title>
|
||||||
<template slot="title">填写信息</template>
|
<template slot="title">填写信息</template>
|
||||||
</process-title>
|
</process-title>
|
||||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
v-for="(item, index) in projectTabName"
|
v-for="(item, index) in projectTabName"
|
||||||
:key="index"
|
:key="index"
|
||||||
@@ -146,7 +146,7 @@
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
<el-table
|
<el-table
|
||||||
ref="multipleTable"
|
ref="multipleTable"
|
||||||
:data="dataList"
|
:data="dataList.filter(item =>{return item.projectName === projectName})"
|
||||||
tooltip-effect="dark"
|
tooltip-effect="dark"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
border
|
border
|
||||||
@@ -396,7 +396,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//折叠的标志,true为折叠,false为不折叠
|
//折叠的标志,true为折叠,false为不折叠
|
||||||
activeName: 'first',
|
activeName: '',
|
||||||
foldFormFlag: false,
|
foldFormFlag: false,
|
||||||
projectTabName: [],
|
projectTabName: [],
|
||||||
comFlag: 0,
|
comFlag: 0,
|
||||||
@@ -460,9 +460,9 @@ export default {
|
|||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
choiceForm: {}, //选择标准清单列表
|
choiceForm: {}, //选择标准清单列表
|
||||||
newDataList: [],
|
|
||||||
countryOptions: [], //适用区域下拉框数据
|
countryOptions: [], //适用区域下拉框数据
|
||||||
user1: "",
|
user1: "",
|
||||||
|
projectName: "",
|
||||||
user2: "",
|
user2: "",
|
||||||
user3: "",
|
user3: "",
|
||||||
user4: "",
|
user4: "",
|
||||||
@@ -472,13 +472,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClick(tab) {
|
handleClick(tab) {
|
||||||
let projectData = this.dataList
|
this.projectName = tab.name
|
||||||
this.dataList = []
|
|
||||||
projectData.forEach(item => {
|
|
||||||
if(item.projectName === tab.name){
|
|
||||||
this.dataList.push(item)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
//折叠/展开基础信息方法
|
//折叠/展开基础信息方法
|
||||||
foldForm() {
|
foldForm() {
|
||||||
@@ -604,13 +598,13 @@ export default {
|
|||||||
this.listForm.prcNum = this.prcNum
|
this.listForm.prcNum = this.prcNum
|
||||||
this.listForm.prcName = this.prcName
|
this.listForm.prcName = this.prcName
|
||||||
this.listForm['id'] = item.id
|
this.listForm['id'] = item.id
|
||||||
this.newDataList = item.dataList
|
|
||||||
this.dataList = item.dataList
|
this.dataList = item.dataList
|
||||||
item.dataList.forEach(item => {
|
item.dataList.forEach(item => {
|
||||||
if(!this.projectTabName.includes(item.projectName)){
|
if(!this.projectTabName.includes(item.projectName)){
|
||||||
this.projectTabName.push(item.projectName)
|
this.projectTabName.push(item.projectName)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.projectName = this.activeName = this.projectTabName[Object.keys(this.projectTabName)[0]]
|
||||||
} else {
|
} else {
|
||||||
this.listForm = item.form;
|
this.listForm = item.form;
|
||||||
this.dataList = item.form.dataList;
|
this.dataList = item.form.dataList;
|
||||||
@@ -621,7 +615,7 @@ export default {
|
|||||||
|
|
||||||
//提交事件
|
//提交事件
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
this.listForm.dataList = this.newDataList
|
this.listForm.dataList = this.dataList
|
||||||
this.listForm.commentText = this.commentText;
|
this.listForm.commentText = this.commentText;
|
||||||
const json = JSON.stringify(this.listForm);
|
const json = JSON.stringify(this.listForm);
|
||||||
this.isSubmit = true
|
this.isSubmit = true
|
||||||
@@ -754,6 +748,9 @@ export default {
|
|||||||
.demo-drawer-content {
|
.demo-drawer-content {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
/deep/.el-tabs--border-card>.el-tabs__content{
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
/deep/.el-table th > .cell{
|
/deep/.el-table th > .cell{
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user