bri-components 1.4.35 → 1.4.36

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": "bri-components",
3
- "version": "1.4.35",
3
+ "version": "1.4.36",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -54,6 +54,7 @@ export default {
54
54
  data () {
55
55
  return {
56
56
  showModal: false,
57
+ showUnitModal: false,
57
58
 
58
59
  tagStyle: {
59
60
  display: "inline-block",
@@ -75,6 +76,12 @@ export default {
75
76
  typeInfoData () {
76
77
  return this.$modFieldMap[this.controlType] || {};
77
78
  },
79
+ unitModalPropsObj () {
80
+ return {
81
+ mode: "fullscreen",
82
+ title: this.controlName
83
+ };
84
+ },
78
85
 
79
86
  /* ----- 基本 ----- */
80
87
  finalCanEdit () {
@@ -352,6 +359,12 @@ export default {
352
359
  // 关闭弹框 ---!!!!pc端的selectUsers、selectDepartments控件,外部调用组件时也在使用,不能轻易删除
353
360
  closeModal () {
354
361
  this.showModal = false;
362
+ },
363
+
364
+ // 单元格展示 -打开列表模态框
365
+ openUnitModal (event) {
366
+ this.showUnitModal = true;
367
+ event.stopPropagation();
355
368
  }
356
369
  }
357
370
  };
@@ -1,17 +1,70 @@
1
1
  <template>
2
2
  <div class="cascaderTable">
3
- <!-- 在表格内的查看 -->
4
- <span
5
- v-if="isUnitShow"
6
- class="cascaderTable-unit"
7
- >
8
- <dsh-icons :list="[{
9
- customIcon: 'bico-Cascadetable'
10
- }]"></dsh-icons>
11
- <span class="cascaderTable-unit-text">
12
- {{ showVal }}
3
+ <!-- 查看 单元格内 -->
4
+ <template v-if="isUnitShow">
5
+ <span
6
+ class="cascaderTable-unit"
7
+ @click.stop="openUnitModal"
8
+ >
9
+ <dsh-icons :list="[{
10
+ customIcon: 'bico-Cascadetable'
11
+ }]"></dsh-icons>
12
+ <span class="cascaderTable-unit-text">
13
+ {{ showVal }}
14
+ </span>
13
15
  </span>
14
- </span>
16
+
17
+ <dsh-modal
18
+ class="cascaderTable-unit-fullscreen"
19
+ v-model="showUnitModal"
20
+ :mode="unitModalPropsObj.mode"
21
+ :propsObj="unitModalPropsObj"
22
+ @click.stop="0"
23
+ >
24
+ <div
25
+ v-if="showUnitModal"
26
+ class="cascaderTable-unit-fullscreen-inner"
27
+ >
28
+ <!-- 老版级联表格 -->
29
+ <dsh-cascader-table
30
+ v-if="subType === 'old'"
31
+ :canEdit="false"
32
+ :tableDataObj="curVal"
33
+ :data="curVal.tree"
34
+ :rowDefault="curVal.rowDefault"
35
+ :columns="subForm"
36
+ :propsObj="{
37
+ ...selfPropsObj,
38
+ _useEnlarge: false
39
+ }"
40
+ :allFormList="allFormList"
41
+ :parentObj="value"
42
+ :treeColumns="treeForm"
43
+ ></dsh-cascader-table>
44
+
45
+ <!-- 横向层级表格 -->
46
+ <div v-else-if="subType === 'cross'">
47
+ 横向层级表格还未开发……
48
+ </div>
49
+
50
+ <!-- 层级表格 -->
51
+ <dsh-tree-table
52
+ v-else
53
+ :canEdit="false"
54
+ :tableDataObj="curVal"
55
+ :data="curVal.tree"
56
+ :rowDefault="curVal.rowDefault"
57
+ :columns="subForm"
58
+ :propsObj="{
59
+ ...selfPropsObj,
60
+ _useEnlarge: false
61
+ }"
62
+ :allFormList="allFormList"
63
+ :parentObj="value"
64
+ ></dsh-tree-table>
65
+ </div>
66
+ </dsh-modal>
67
+ </template>
15
68
 
16
69
  <template v-else>
17
70
  <!-- 配置端 设置默认值用-->
@@ -194,6 +247,11 @@
194
247
  return this.$isAdvSearching(this.finalTableAdvSearch);
195
248
  },
196
249
 
250
+ curVal () {
251
+ return this.value[this.controlKey] || {
252
+ tree: []
253
+ };
254
+ },
197
255
  showVal () {
198
256
  return `${
199
257
  this.curVal
@@ -235,6 +293,27 @@
235
293
  &-text {
236
294
 
237
295
  }
296
+
297
+ &-fullscreen {
298
+ &-inner {
299
+ width: 100%;
300
+ height: 100%;
301
+ padding: 10px 20px;
302
+
303
+ .DshCasTable,
304
+ .DshTreeTable {
305
+ width: 100%;
306
+ height: 100%;
307
+ display: flex;
308
+ flex-direction: column;
309
+
310
+ &-main {
311
+ flex: 1;
312
+ min-height: 0px;
313
+ }
314
+ }
315
+ }
316
+ }
238
317
  }
239
318
  }
240
319
  </style>
@@ -1,17 +1,47 @@
1
1
  <template>
2
2
  <div class="flatTable">
3
3
  <!-- 查看 单元格内 -->
4
- <span
5
- v-if="isUnitShow"
6
- class="flatTable-unit"
7
- >
8
- <dsh-icons :list="[{
9
- customIcon: 'bico-internaltable'
10
- }]"></dsh-icons>
11
- <span class="flatTable-unit-text">
12
- {{ showVal }}
4
+ <template v-if="isUnitShow">
5
+ <span
6
+ class="flatTable-unit"
7
+ @click.stop="openUnitModal"
8
+ >
9
+ <dsh-icons :list="[{
10
+ customIcon: 'bico-internaltable'
11
+ }]"></dsh-icons>
12
+ <span class="flatTable-unit-text">
13
+ {{ showVal }}
14
+ </span>
13
15
  </span>
14
- </span>
16
+
17
+ <dsh-modal
18
+ class="flatTable-unit-fullscreen"
19
+ v-model="showUnitModal"
20
+ :mode="unitModalPropsObj.mode"
21
+ :propsObj="unitModalPropsObj"
22
+ @click.stop="0"
23
+ >
24
+ <div
25
+ v-if="showUnitModal"
26
+ class="flatTable-unit-fullscreen-inner"
27
+ >
28
+ <dsh-flat-table
29
+ :canEdit="false"
30
+ :tableDataObj="curVal"
31
+ :data="curVal.list"
32
+ :rowDefault="curVal.rowDefault"
33
+ :compareData="curVal.oldList"
34
+ :columns="subForm"
35
+ :propsObj="{
36
+ ...propsObj,
37
+ _useEnlarge: false
38
+ }"
39
+ :allFormList="allFormList"
40
+ :parentObj="value"
41
+ ></dsh-flat-table>
42
+ </div>
43
+ </dsh-modal>
44
+ </template>
15
45
 
16
46
  <!-- 编辑、查看(查看页内) -->
17
47
  <template v-else>
@@ -135,6 +165,11 @@
135
165
  return this.$isAdvSearching(this.finalTableAdvSearch);
136
166
  },
137
167
 
168
+ curVal () {
169
+ return this.value[this.controlKey] || {
170
+ list: []
171
+ };
172
+ },
138
173
  showVal () {
139
174
  return `${
140
175
  this.curVal
@@ -171,6 +206,26 @@
171
206
  &-text {
172
207
 
173
208
  }
209
+
210
+ &-fullscreen {
211
+ &-inner {
212
+ width: 100%;
213
+ height: 100%;
214
+ padding: 10px 20px;
215
+
216
+ .DshFlatTable {
217
+ width: 100%;
218
+ height: 100%;
219
+ display: flex;
220
+ flex-direction: column;
221
+
222
+ &-main {
223
+ flex: 1;
224
+ min-height: 0px;
225
+ }
226
+ }
227
+ }
228
+ }
174
229
  }
175
230
  }
176
231
  </style>
@@ -37,6 +37,7 @@
37
37
 
38
38
  <!-- 全屏查看 -->
39
39
  <dsh-modal
40
+ v-if="useEnlarge"
40
41
  class="DshCasTable-fullscreen"
41
42
  v-model="isEnlarge"
42
43
  :mode="modalPropsObj.mode"
@@ -81,6 +81,7 @@
81
81
 
82
82
  <!-- 全屏模式 -->
83
83
  <dsh-modal
84
+ v-if="useEnlarge"
84
85
  class="DshFlatTable-fullscreen"
85
86
  v-model="isEnlarge"
86
87
  :mode="modalPropsObj.mode"
@@ -40,6 +40,7 @@
40
40
 
41
41
  <!-- 全屏模式 -->
42
42
  <dsh-modal
43
+ v-if="useEnlarge"
43
44
  class="DshTreeTable-fullscreen"
44
45
  v-model="isEnlarge"
45
46
  :mode="modalPropsObj.mode"