vue2-client 1.7.15 → 1.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
<a-form-model-item
|
|
63
63
|
prop="dataMode"
|
|
64
64
|
style="margin-top: 10px;">
|
|
65
|
-
<a-checkbox-group v-model="dataModeArrayData" :disabled="dataModeDisabled" :options="dataModeTypeV"/>
|
|
65
|
+
<a-checkbox-group v-model="dataModeArrayData" :disabled="dataModeDisabled" @change="dataModeArrayDataChange" :options="dataModeTypeV"/>
|
|
66
66
|
</a-form-model-item>
|
|
67
67
|
</a-card>
|
|
68
68
|
</a-col>
|
|
@@ -309,6 +309,7 @@
|
|
|
309
309
|
</a-col>
|
|
310
310
|
<a-col :span="18" v-if="dataMode.group">
|
|
311
311
|
<a-card :bodyStyle="bodyStyle" title="数据字段">
|
|
312
|
+
<a-button type="primary" slot="extra" @click="addColumnItem()">增加</a-button>
|
|
312
313
|
<a-row :gutter="24">
|
|
313
314
|
<a-col :span="8">
|
|
314
315
|
<span style="font-weight: bold">
|
|
@@ -495,6 +496,17 @@ export default {
|
|
|
495
496
|
})
|
|
496
497
|
},
|
|
497
498
|
dataModeTypeV () {
|
|
499
|
+
if (this.dataModeArrayData.includes('group')) {
|
|
500
|
+
return [{
|
|
501
|
+
label: 'SQL生成查询项',
|
|
502
|
+
value: 'sqlQueryItem',
|
|
503
|
+
noMatch: ['file', 'personSetting']
|
|
504
|
+
}, {
|
|
505
|
+
label: '字段组存储',
|
|
506
|
+
value: 'group',
|
|
507
|
+
noMatch: []
|
|
508
|
+
}]
|
|
509
|
+
}
|
|
498
510
|
if (this.item.formType) {
|
|
499
511
|
return dataModeType.filter(item => {
|
|
500
512
|
return item.noMatch.findIndex(type => type === this.item.formType) === -1
|
|
@@ -750,7 +762,13 @@ export default {
|
|
|
750
762
|
},
|
|
751
763
|
// 重置数据模式
|
|
752
764
|
resetDataMode () {
|
|
753
|
-
this.dataModeArrayData = this.dataModeTypeV.map(item => item.value)
|
|
765
|
+
this.dataModeArrayData = this.dataModeTypeV.map(item => item.value).filter(h => h !== 'group')
|
|
766
|
+
},
|
|
767
|
+
// 数据模式改变
|
|
768
|
+
dataModeArrayDataChange (newVal) {
|
|
769
|
+
if (newVal.includes('group')) {
|
|
770
|
+
this.dataModeArrayData = ['sqlQueryItem', 'group']
|
|
771
|
+
}
|
|
754
772
|
},
|
|
755
773
|
itemHandle () {
|
|
756
774
|
// 查询表单项或者新增/修改表单项
|
|
@@ -881,12 +899,17 @@ export default {
|
|
|
881
899
|
okText: '确定',
|
|
882
900
|
okType: 'danger',
|
|
883
901
|
cancelText: '取消',
|
|
902
|
+
zIndex: 9999,
|
|
884
903
|
onOk () {
|
|
885
904
|
delete _this.itemMap[key]
|
|
886
905
|
_this.item.column.splice(index, 1)
|
|
887
906
|
}
|
|
888
907
|
})
|
|
889
908
|
},
|
|
909
|
+
addColumnItem () {
|
|
910
|
+
this.type = '新增'
|
|
911
|
+
this.$refs.queryItem.addColumnItemExecute()
|
|
912
|
+
},
|
|
890
913
|
getColumnItem (callback) {
|
|
891
914
|
callback(JSON.parse(JSON.stringify(this.item.column)))
|
|
892
915
|
},
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
:service-name="serviceName"
|
|
16
16
|
:get-data-params="getDataParams"
|
|
17
17
|
/>
|
|
18
|
-
<div v-for="(groupItem, groupIndex) in groupJsonData" :key="groupIndex">
|
|
18
|
+
<div v-for="(groupItem, groupIndex) in groupJsonData" :key="'group-' + groupIndex">
|
|
19
19
|
<x-form-item
|
|
20
20
|
v-for="(item, index) in groupItem.groupItems"
|
|
21
21
|
:key="index"
|
|
22
22
|
:attr="item"
|
|
23
|
-
:form="form
|
|
23
|
+
:form="form"
|
|
24
24
|
:service-name="serviceName"
|
|
25
25
|
:get-data-params="getDataParams"
|
|
26
26
|
/>
|
|
@@ -104,7 +104,7 @@ export default {
|
|
|
104
104
|
}).map((item) => {
|
|
105
105
|
item.groupItems = item.groupItems.filter(item => !item.isOnlyAddOrEdit).map((groupItem) => {
|
|
106
106
|
// 只保留第一个下划线后面的内容
|
|
107
|
-
groupItem.model = groupItem.model.substring(groupItem.model.indexOf('_') + 1)
|
|
107
|
+
// groupItem.model = groupItem.model.substring(groupItem.model.indexOf('_') + 1)
|
|
108
108
|
return groupItem
|
|
109
109
|
})
|
|
110
110
|
return item
|
|
@@ -128,10 +128,9 @@ export default {
|
|
|
128
128
|
// 处理分组数据表单
|
|
129
129
|
for (let i = 0; i < this.groupJsonData.length; i++) {
|
|
130
130
|
const groupItem = this.groupJsonData[i]
|
|
131
|
-
formData[groupItem.model] = {}
|
|
132
131
|
for (let j = 0; j < groupItem.groupItems.length; j++) {
|
|
133
132
|
const item = groupItem.groupItems[j]
|
|
134
|
-
this.setFormProps(formData
|
|
133
|
+
this.setFormProps(formData, item)
|
|
135
134
|
}
|
|
136
135
|
}
|
|
137
136
|
this.form = formData
|