-
+
{
- this.onSearch()
- },
+ func: this.onSearch
},
// {
// btnType: "tobeModified",
@@ -179,10 +213,18 @@ export default {
],
},
],
+ // pageSize:1,
+ // pageNum:10,
+ // totalCount:20
}
},
watch: {},
- mounted() {},
+ created(){
+ this.initColumn()
+ },
+ mounted() {
+ this.handleSearch()
+ },
methods: {
changeModified() {
this.modifiedFlag = !this.modifiedFlag
@@ -197,13 +239,61 @@ export default {
console.log(this.page)
this.$refs.customTable.loading = false
},
- onSearch() {
- console.log(123456)
+ onSearch(form) {
+ console.log(form)
},
rowOpration(data, i) {
console.log(data, i)
this.$router.push("/followupentry")
},
+ async handleSearch(){
+ let params={
+ pageSize:this.pageSize,
+ pageNum:this.pageIndex
+ }
+ let res = await getFollowSurvey(params)
+ if(res.code==1){
+ //分页内容
+ const d = res.data
+ this.total= d.total
+ this.tableData=d['records']
+ }
+ },
+ initColumn(){
+ this.columns.forEach((item,index) => {
+ if(item.trans){
+ this.initDict(item.trans,index)
+ }
+ })
+ },
+ async initDict(type,index){
+ let params={
+ type:type
+ }
+ const res = await getDictDetail(params)
+ let item = this.formList.find(_ => _.trans == type)
+ res.data.forEach((itemD,inx) => {
+ if(!this.columns[index]['transList']){
+ this.columns[index]['transList']={}
+ }
+ else{
+ this.columns[index]['transList'][itemD.code]=itemD.name
+ }
+ if(item){
+ if(!item['opts']){
+ item['opts']=[]
+ }
+ else {
+ item['opts']=res.data.map((_) => {
+ return {
+ label: _.name,
+ value: _.code,
+ }
+ })
+ }
+ }
+ })
+ }
},
}
diff --git a/src/views/screening/components/ConfigForms.vue b/src/views/screening/components/ConfigForms.vue
index 0027d23b8131a5360c08f91ef16f2222edc7b66f..c0edf6ff3de8d66636deaf0a174b0d41fe32e826 100644
--- a/src/views/screening/components/ConfigForms.vue
+++ b/src/views/screening/components/ConfigForms.vue
@@ -114,6 +114,7 @@ export default {
this.loading = false
} else {
// 返回
+ this.$router.back()
}
},
dialogSubmit() {},