查询重置功能实现
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabs">
|
||||
<tabs />
|
||||
<tabs :tableData="tableData"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -32,7 +32,8 @@ import tabs from '../userCenter/processCenter/tabs.vue'
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {}
|
||||
form: {},
|
||||
tableData:[]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -45,10 +46,12 @@ import tabs from '../userCenter/processCenter/tabs.vue'
|
||||
//查询
|
||||
search() {
|
||||
// this.$api.processCenter.search({})
|
||||
this.tableData=[{createTime:'1999-10-1'}]
|
||||
},
|
||||
//重置
|
||||
reset(){
|
||||
this.form={}
|
||||
this.tableData=[{createTime:'3000-10-1'}]
|
||||
// this.$api.processCenter.reset({})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -57,6 +57,17 @@ export default {
|
||||
}]
|
||||
}
|
||||
},
|
||||
props:{
|
||||
secondData:{
|
||||
type:Array,
|
||||
default:[],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
secondData(newValue, oldValue) {
|
||||
this.tableData=newValue
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
view() {
|
||||
alert(111)
|
||||
|
||||
@@ -57,6 +57,17 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
props:{
|
||||
firstData:{
|
||||
type:Array,
|
||||
default:[],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
firstData(newValue, oldValue) {
|
||||
this.tableData=newValue
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handle() {
|
||||
alert(111);
|
||||
|
||||
@@ -56,6 +56,17 @@ export default {
|
||||
}]
|
||||
}
|
||||
},
|
||||
props:{
|
||||
fourthData:{
|
||||
type:Array,
|
||||
default:[],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
fourthData(newValue, oldValue) {
|
||||
this.tableData=newValue
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
view() {
|
||||
alert(111)
|
||||
|
||||
@@ -70,6 +70,17 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
props:{
|
||||
thirdData:{
|
||||
type:Array,
|
||||
default:[],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
thirdData(newValue, oldValue) {
|
||||
this.tableData=newValue
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
view() {
|
||||
alert(111);
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
<div>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="待办流程" name="first">
|
||||
<gencyProcess></gencyProcess>
|
||||
<gencyProcess :firstData="firstData"></gencyProcess>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="已办流程" name="second">
|
||||
<finishProcess></finishProcess>
|
||||
<finishProcess :secondData="secondData"></finishProcess>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="已发流程" name="third">
|
||||
<sentProcess></sentProcess>
|
||||
<sentProcess :thirdData="thirdData"></sentProcess>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="监控流程" name="fourth">
|
||||
<monitorProcesses></monitorProcesses>
|
||||
<monitorProcesses :fourthData="fourthData"></monitorProcesses>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
@@ -30,11 +30,34 @@ export default {
|
||||
monitorProcesses,
|
||||
sentProcess
|
||||
},
|
||||
props:{
|
||||
tableData:{
|
||||
type:Array,
|
||||
default:[],
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'first'
|
||||
activeName: 'first',
|
||||
firstData:[],
|
||||
secondData:[],
|
||||
thirdData:[],
|
||||
fourthData:[],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
tableData(newValue, oldValue) {
|
||||
if(this.activeName == 'first'){
|
||||
this.firstData=newValue
|
||||
}else if(this.activeName == 'second'){
|
||||
this.secondData=newValue
|
||||
}else if(this.activeName == 'third'){
|
||||
this.thirdData=newValue
|
||||
}else{
|
||||
this.fourthData=newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user