vue2-client 1.8.166 → 1.8.168

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.8.166",
3
+ "version": "1.8.168",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -22,7 +22,7 @@
22
22
  <!-- 用以包裹整个页面 -->
23
23
  <a-card v-if="!showSkeleton">
24
24
  <!-- 切换菜单 -->
25
- <a-radio-group v-model="type" default-value="a" button-style="solid" @change="tabChanged">
25
+ <a-radio-group v-model="type" default-value="a" button-style="solid" @change="tabChanged" v-show="!onlyDisplay">
26
26
  <a-radio-button value="design" v-if="!onlyDisplay">
27
27
  设计
28
28
  </a-radio-button>
@@ -68,27 +68,29 @@
68
68
  </template>
69
69
  </template>
70
70
  <!-- 列表 -->
71
- <template v-else-if="row[0].type === 'list'" v-for="(num, listIndex) in row[0].listLength">
72
- <template v-if="!forDisplay">
73
- <x-report-tr-group
74
- :config="activatedConfig"
75
- :key="rowIndex + listIndex"
76
- :columns="row"
77
- :no-top-border="noTopBorder"
78
- :config-data="activatedConfig.data"
79
- :list-index="listIndex">
80
- </x-report-tr-group>
81
- </template>
82
- <template v-else>
83
- <x-report-tr-group
84
- :config="activatedConfig"
85
- :key="rowIndex + listIndex"
86
- :columns="row"
87
- :no-top-border="noTopBorder"
88
- :config-data="activatedConfig.data"
89
- :list-index="listIndex"
90
- :display="true">
91
- </x-report-tr-group>
71
+ <template v-else-if="row[0].type === 'list'" >
72
+ <template v-for="(num, listIndex) in row[0].listLength + 1">
73
+ <template v-if="!forDisplay">
74
+ <x-report-tr-group
75
+ :config="activatedConfig"
76
+ :key="rowIndex + listIndex"
77
+ :columns="row"
78
+ :no-top-border="noTopBorder"
79
+ :config-data="activatedConfig.data"
80
+ :list-index="listIndex">
81
+ </x-report-tr-group>
82
+ </template>
83
+ <template v-else>
84
+ <x-report-tr-group
85
+ :config="activatedConfig"
86
+ :key="rowIndex + listIndex"
87
+ :columns="row"
88
+ :no-top-border="noTopBorder"
89
+ :config-data="activatedConfig.data"
90
+ :list-index="listIndex"
91
+ :display="true">
92
+ </x-report-tr-group>
93
+ </template>
92
94
  </template>
93
95
  </template>
94
96
  <!-- 动态行 -->
@@ -253,6 +255,13 @@ export default {
253
255
  this.activatedConfig = this.config
254
256
  this.render = true
255
257
  }
258
+ this.activatedConfig.columns.forEach(row => {
259
+ if (row[0].type === 'list' && row[0].listLength === 1) {
260
+ row.forEach(cell => {
261
+ cell.listLength = this.activatedConfig.data[cell.dataIndex].length
262
+ })
263
+ }
264
+ })
256
265
  },
257
266
  watch: {
258
267
  config: {
@@ -46,12 +46,18 @@
46
46
  </template>
47
47
  </template>
48
48
  <template v-else-if="cell.type === 'list'">
49
- <template v-if="cell.listType === 'input'">
49
+ <template v-if="listIndex === 0">
50
+ <span style="font-weight: bold">{{ cell.listHead }}</span>
51
+ </template>
52
+ <template v-else-if="cell.listType === 'input'">
50
53
  {{ getDeepObject(configData, cell.dataIndex)[listIndex] }}
51
54
  </template>
52
55
  <template v-else-if="cell.listType === 'value'">
53
56
  {{ cell.content[listIndex] }}
54
57
  </template>
58
+ <template v-else-if="cell.listType === 'variable'">
59
+ {{ configData[cell.dataIndex][listIndex - 1][cell.listDataIndex] }}
60
+ </template>
55
61
  </template>
56
62
  <template v-else-if="cell.type === 'images'">
57
63
  <template v-for="(img,imgIndex) in getDeepObject(configData.images, cell.dataIndex)">
@@ -320,9 +320,10 @@ export default {
320
320
  * 操作列事件
321
321
  * @param record 本条数据
322
322
  * @param actionType 操作类型
323
+ * @param func 事件默认 action
323
324
  */
324
- action (record, actionType) {
325
- this.$emit('action', record, record[this.getPrimaryKeyName()], actionType)
325
+ action (record, actionType, func = 'action') {
326
+ this.$emit(func, record, record[this.getPrimaryKeyName()], actionType)
326
327
  },
327
328
  /**
328
329
  * 选择列事件