|
@@ -70,10 +70,10 @@
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
>
|
|
>
|
|
- <a-checkbox-group v-model="formValue.queryFields" @change="onChange">
|
|
|
|
|
|
+ <a-checkbox-group v-model="queryFields" @change="handleQueryFieldsChange">
|
|
<a-row>
|
|
<a-row>
|
|
- <a-col :span="8" v-for="item in queryFields" :key="item.fieldName">
|
|
|
|
- <a-checkbox :value="item">
|
|
|
|
|
|
+ <a-col :span="8" v-for="item in queryFieldList" :key="item.fieldName">
|
|
|
|
+ <a-checkbox :value="item.fieldName">
|
|
{{ item.comments }}
|
|
{{ item.comments }}
|
|
</a-checkbox>
|
|
</a-checkbox>
|
|
</a-col>
|
|
</a-col>
|
|
@@ -103,12 +103,18 @@ export default {
|
|
// 下拉框map
|
|
// 下拉框map
|
|
categoryMap: {},
|
|
categoryMap: {},
|
|
typeMap: {},
|
|
typeMap: {},
|
|
- formValue: {},
|
|
|
|
- formComponentConfig: {}
|
|
|
|
|
|
+ formValue: {
|
|
|
|
+ queryFields: []
|
|
|
|
+ },
|
|
|
|
+ queryFields: [],
|
|
|
|
+ formComponentConfig: {
|
|
|
|
+ components: []
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
computed: {
|
|
computed: {
|
|
- queryFields () {
|
|
|
|
|
|
+ queryFieldList () {
|
|
return this.formComponentConfig.components.map(item => {
|
|
return this.formComponentConfig.components.map(item => {
|
|
return {
|
|
return {
|
|
comments: item.label,
|
|
comments: item.label,
|
|
@@ -137,6 +143,7 @@ export default {
|
|
const { form: { setFieldsValue } } = this
|
|
const { form: { setFieldsValue } } = this
|
|
// 日期处理
|
|
// 日期处理
|
|
this.formValue = record
|
|
this.formValue = record
|
|
|
|
+ this.queryFields = this.formValue.queryFields.map(item => item.fieldName)
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
setFieldsValue(Object.assign(pick(record, [
|
|
setFieldsValue(Object.assign(pick(record, [
|
|
'id',
|
|
'id',
|
|
@@ -180,6 +187,9 @@ export default {
|
|
this.current--
|
|
this.current--
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ handleQueryFieldsChange () {
|
|
|
|
+ this.formValue.queryFields = this.queryFieldList.filter(item => this.queryFields.includes(item.fieldName))
|
|
|
|
+ },
|
|
save () {
|
|
save () {
|
|
this.confirmLoading = true
|
|
this.confirmLoading = true
|
|
// 日期处理
|
|
// 日期处理
|