Commit bb767ebd authored by Gakki's avatar Gakki

动态添加config获取的字段

parent 1577c08f
...@@ -347,7 +347,8 @@ export default { ...@@ -347,7 +347,8 @@ export default {
tableName: '', // 邻里小汇 tableName: '', // 邻里小汇
formed: '', // 邻里小汇 formed: '', // 邻里小汇
type: '', // 邻里小汇 type: '', // 邻里小汇
isBeforeTwoThousand: false isBeforeTwoThousand: false,
personalizedKey: ''
} }
}, },
beforeCreate() { // 页面进来创建form beforeCreate() { // 页面进来创建form
...@@ -383,12 +384,23 @@ export default { ...@@ -383,12 +384,23 @@ export default {
if(this.$route.name == 'basicInfo'){ if(this.$route.name == 'basicInfo'){
this.$nextTick(function () { this.$nextTick(function () {
// setTimeout(() => { // setTimeout(() => {
this.getConfig(),
this.getSearchParams() this.getSearchParams()
// }, 0) // }, 0)
}) })
} }
}, },
methods: { methods: {
getConfig() {
this.$ajax.get({
url: this.$api.GET_CONFIG,
}).then(res => {
if (res.code === '200') {
let inner = res.data.content
this.personalizedKey = inner.formedKey
}
})
},
closeMoreSearch() { closeMoreSearch() {
this.simpleSearchForm = true this.simpleSearchForm = true
}, },
...@@ -500,13 +512,14 @@ export default { ...@@ -500,13 +512,14 @@ export default {
'unitKind': !this.stLevel?'': this.stLevel, 'unitKind': !this.stLevel?'': this.stLevel,
'cspServiceType': !this.cspServiceType? '': this.cspServiceType, 'cspServiceType': !this.cspServiceType? '': this.cspServiceType,
// 'tableName': !this.tableName?'': this.tableName, // 'tableName': !this.tableName?'': this.tableName,
'formed': !this.formed?'': this.formed,
'type': !this.type? '': this.type, 'type': !this.type? '': this.type,
'sectType_in': '1', 'sectType_in': '1',
'c.createTime_desc': 'desc', 'c.createTime_desc': 'desc',
'finishDate_lt': !!this.isBeforeTwoThousand? '2000-01-01': '', 'finishDate_lt': !!this.isBeforeTwoThousand? '2000-01-01': '',
'finishDate_gt': !this.isBeforeTwoThousand? '2000-01-01': '', 'finishDate_gt': !this.isBeforeTwoThousand? '2000-01-01': '',
}, obj, isHocId)// 融合obj 和isHocId 到入参 }, obj, isHocId)// 融合obj 和isHocId 到入参
searchParams[this.personalizedKey] = !this.formed?'': this.formed
if (this.$route.query.id && this.$route.query.id != '') { if (this.$route.query.id && this.$route.query.id != '') {
// 如果query的id不为空,则回显,并根据id搜索 // 如果query的id不为空,则回显,并根据id搜索
this.form.setFieldsValue({'c.cspId': this.$route.query.name+'#'+this.$route.query.id}) this.form.setFieldsValue({'c.cspId': this.$route.query.name+'#'+this.$route.query.id})
......
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