vue2-client 1.5.19 → 1.5.21

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/CHANGELOG.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
- **1.5.14 - 1.5.19 -2022-12-12 @苗艳强**
4
+ **1.5.14 - 1.5.21 -2022-12-13 @苗艳强**
5
5
  - 修复徽标显示问题
6
6
  - 修复fixedQueryForm问题
7
7
  - 修复修改时树形选择框不能回填问题
@@ -13,6 +13,8 @@
13
13
  - 修改查询配置
14
14
  - 修复清空查询缓存回调问题
15
15
  - 新增调用logic获取数据源可自定义追加参数
16
+ - 修改省市区数据获取
17
+ - 修复基础表单配置错误
16
18
 
17
19
  **1.5.11 - 1.5.13 -2022-12-05 @江超**
18
20
  - 优化了查询配置生成界面的样式
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.5.19",
3
+ "version": "1.5.21",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -70,7 +70,7 @@ export default {
70
70
  return {
71
71
  open: false,
72
72
  tagData: {
73
- divisionsForTree: this.$appdata.getDivisionsOhChinaForTree(),
73
+ divisionsForTree: [],
74
74
  // 市
75
75
  cityData: [],
76
76
  // 区
@@ -99,7 +99,9 @@ export default {
99
99
  }
100
100
  },
101
101
  mounted () {
102
-
102
+ this.$appdata.getDivisionsOhChinaForTree().then(res => {
103
+ this.tagData.divisionsForTree = res
104
+ })
103
105
  },
104
106
  model: {
105
107
  prop: 'value',
@@ -73,7 +73,8 @@
73
73
  </a-row>
74
74
  </div>
75
75
  </a-form-model-item>
76
- <a-form-model-item label="接口插槽" prop="apiSlot">
76
+ <!-- 暂时不需要 -->
77
+ <!-- <a-form-model-item label="接口插槽" prop="apiSlot">
77
78
  <a-popover placement="right" title="说明">
78
79
  <template slot="content">
79
80
  <p>通过插槽,你可以轻松扩展查询配置的默认业务,配置的插槽会根据类型在默认业务的前后执行,类似于切面</p>
@@ -100,10 +101,13 @@
100
101
  <a-icon slot="addonAfter" type="close" @click="removeApiSlotItem(index)"/>
101
102
  </a-input>
102
103
  </div>
103
- </a-form-model-item>
104
+ </a-form-model-item> -->
104
105
  </a-form-model>
105
106
  <create-simple-form-query-item ref="queryItem" @getColumn="getColumn" @itemHandle="itemHandle"/>
106
- <a-button type="primary" @click="view">操作</a-button>
107
+ <a-space>
108
+ <a-button type="default" @click="view">预览</a-button>
109
+ <a-button type="primary" @click="submit">保存</a-button>
110
+ </a-space>
107
111
  </a-col>
108
112
  <a-col :lg="12" :md="12" :sm="24" :xl="6" :xs="24">
109
113
  <a-card :bordered="false" size="small" style="overflow: auto" title="预览">
@@ -117,7 +121,7 @@
117
121
  </a-row>
118
122
  <x-add-form
119
123
  ref="xAddForm"
120
- @onSubmit="submit"/>
124
+ />
121
125
  </a-drawer>
122
126
  </template>
123
127
 
@@ -376,7 +380,8 @@ export default {
376
380
  post(commonApi.getColumnsJson, { queryObject: this.result }).then(res => {
377
381
  this.$refs.xAddForm.init({
378
382
  formItems: res.formJson,
379
- serviceName: res.serviceName
383
+ serviceName: res.serviceName,
384
+ viewMode: true
380
385
  })
381
386
  this.$refs.xAddForm.open({
382
387
  businessType: '新增',
@@ -30,13 +30,18 @@ const GetAppDataService = {
30
30
  localStorage.setItem(process.env.VUE_APP_DICTIONARY_KEY, JSON.stringify(params))
31
31
  localStorage.setItem(process.env.VUE_APP_BADGE_KEY, JSON.stringify(badgeItemArray))
32
32
  })
33
- // 获取省市区数据
34
- localStorage.setItem(process.env.VUE_APP_DIVISIONSOHCHINA, JSON.stringify([]))
35
33
  },
36
34
  // 返回树形省市区
37
- getDivisionsOhChinaForTree () {
38
- const str = localStorage.getItem(process.env.VUE_APP_DIVISIONSOHCHINA)
39
- return handleTree(JSON.parse(str), 'code', 'parentcode')
35
+ async getDivisionsOhChinaForTree () {
36
+ let list = this.getDivisionsOhChinaForList()
37
+ // 获取省市区数据
38
+ if (!list) {
39
+ await post(manageApi.getDivisionsOhChina, {}).then((res) => {
40
+ list = res
41
+ localStorage.setItem(process.env.VUE_APP_DIVISIONSOHCHINA, JSON.stringify(res))
42
+ })
43
+ }
44
+ return handleTree(list, 'code', 'parentcode')
40
45
  },
41
46
  // 返回列表省市区
42
47
  getDivisionsOhChinaForList () {