bri-components 1.1.6 → 1.2.1

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.
Files changed (135) hide show
  1. package/lib/0.bri-components.min.js +1 -1
  2. package/lib/1.bri-components.min.js +1 -1
  3. package/lib/2.bri-components.min.js +1 -1
  4. package/lib/3.bri-components.min.js +1 -1
  5. package/lib/4.bri-components.min.js +1 -1
  6. package/lib/5.bri-components.min.js +1 -1
  7. package/lib/6.bri-components.min.js +1 -1
  8. package/lib/7.bri-components.min.js +1 -1
  9. package/lib/8.bri-components.min.js +1 -1
  10. package/lib/9.bri-components.min.js +1 -1
  11. package/lib/bri-components.min.js +6 -6
  12. package/lib/styles/bri-components.css +1 -1
  13. package/package.json +1 -1
  14. package/src/.DS_Store +0 -0
  15. package/src/abolish/DshFileShow.less +61 -0
  16. package/src/{components/small → abolish}/DshFileShow.vue +30 -105
  17. package/src/abolish/DshFlatTable.vue +1 -1
  18. package/src/components/.DS_Store +0 -0
  19. package/src/components/controls/.DS_Store +0 -0
  20. package/src/components/controls/base/BriUpload/{index.vue → BriUpload.vue} +4 -3
  21. package/src/components/controls/base/BriUpload/{upload-list.vue → uploadList.vue} +17 -13
  22. package/src/components/controls/base/BriUpload/uploadMixin.js +1 -5
  23. package/src/components/controls/base/DshCascader/DshCascader.vue +100 -100
  24. package/src/components/controls/base/DshCascader/InfoCascader.vue +3 -4
  25. package/src/components/controls/base/DshCheckbox.vue +11 -11
  26. package/src/components/controls/base/DshCoordinates.vue +2 -2
  27. package/src/components/controls/base/DshDate.vue +21 -10
  28. package/src/components/controls/base/DshEditor.vue +33 -48
  29. package/src/components/controls/base/DshInput.vue +21 -19
  30. package/src/components/controls/base/DshNumber/DshNumber.vue +23 -22
  31. package/src/components/controls/base/DshSelect.vue +3 -3
  32. package/src/components/controls/base/DshSwitch.vue +2 -2
  33. package/src/components/controls/controlMap.js +5 -1
  34. package/src/components/controls/controlMixin.js +16 -17
  35. package/src/components/controls/senior/.DS_Store +0 -0
  36. package/src/components/controls/senior/BriLabels.vue +200 -171
  37. package/src/components/controls/senior/selectDepartments.vue +380 -0
  38. package/src/components/controls/senior/selectUsers/DepartmentMenu.vue +191 -0
  39. package/src/components/controls/senior/selectUsers/selectUsers.vue +482 -0
  40. package/src/components/controls/special/DshUndeveloped.vue +0 -6
  41. package/src/components/form/DshForm.vue +4 -17
  42. package/src/components/list/BriCard.vue +52 -0
  43. package/src/components/list/BriTable.vue +1 -1
  44. package/src/components/list/{ZTree.vue → BriTree.vue} +9 -8
  45. package/src/components/list/BriTreeItem.vue +110 -0
  46. package/src/components/list/DshBox/DshCard.vue +4 -4
  47. package/src/components/list/DshBox/DshCrossTable.vue +4 -4
  48. package/src/components/list/DshBox/DshList.vue +2 -2
  49. package/src/components/list/DshBox/DshPanel.vue +5 -5
  50. package/src/components/list/DshBox/DshTable.vue +21 -80
  51. package/src/components/list/DshCascaderTable.vue +2 -2
  52. package/src/components/other/{ZCode.vue → BriCode.vue} +2 -9
  53. package/src/components/other/{ZCollapseTree.vue → BriCollapseTree.vue} +37 -16
  54. package/src/components/other/{ZIframe.vue → BriIframe.vue} +7 -23
  55. package/src/components/other/{ZLoading.vue → BriLoading.vue} +25 -11
  56. package/src/components/other/BriSvg.vue +2 -2
  57. package/src/components/other/DshAvatar.vue +21 -69
  58. package/src/components/other/DshColorPanel.vue +0 -43
  59. package/src/components/small/{Ctooltip.vue → BriTooltip.vue} +2 -2
  60. package/src/components/small/DshButtons.vue +2 -2
  61. package/src/components/small/DshCrumbs.vue +1 -0
  62. package/src/components/small/DshCrumbsItem.vue +5 -3
  63. package/src/components/small/DshIcons.vue +0 -14
  64. package/src/components/small/DshTags.vue +8 -3
  65. package/src/components/unit/DshFormItem.vue +4 -4
  66. package/src/components/unit/DshUnit.vue +0 -8
  67. package/src/index.js +99 -106
  68. package/src/styles/.DS_Store +0 -0
  69. package/src/styles/common/control.less +76 -68
  70. package/src/styles/components/.DS_Store +0 -0
  71. package/src/styles/components/controls/base/BriUpload/BriUpload.less +167 -0
  72. package/src/styles/components/controls/base/BriUpload/BriUploadImage.less +81 -0
  73. package/src/styles/components/controls/base/BriUpload/index.less +3 -0
  74. package/src/styles/components/controls/base/BriUpload/uploadList.less +164 -0
  75. package/src/styles/components/controls/base/DshCascader/DshCascader.less +71 -0
  76. package/src/styles/components/controls/base/DshCascader/index.less +2 -0
  77. package/src/styles/components/controls/base/DshCheckbox.less +68 -71
  78. package/src/styles/components/controls/base/DshDate.less +12 -0
  79. package/src/styles/components/controls/base/DshEditor.less +27 -48
  80. package/src/styles/components/controls/base/DshInput.less +6 -2
  81. package/src/styles/components/controls/base/DshNumber.less +44 -27
  82. package/src/styles/components/controls/base/DshSelect.less +12 -1
  83. package/src/styles/components/controls/senior/BriLabels.less +34 -103
  84. package/src/styles/components/controls/senior/cascaderTable.less +1 -1
  85. package/src/styles/components/controls/senior/flatTable.less +1 -1
  86. package/src/styles/components/controls/senior/selectDepartments.less +106 -0
  87. package/src/styles/components/controls/senior/selectUsers/DepartmentMenu.less +37 -0
  88. package/src/styles/components/controls/senior/selectUsers/index.less +2 -0
  89. package/src/styles/components/controls/senior/selectUsers/selectUsers.less +167 -0
  90. package/src/styles/components/controls/special/DshBack.less +3 -0
  91. package/src/styles/components/controls/special/DshUndeveloped.less +3 -0
  92. package/src/styles/components/form/DshAdvSearchForm.less +0 -1
  93. package/src/styles/components/form/DshDefaultSearch.less +2 -3
  94. package/src/styles/components/form/DshForm.less +13 -0
  95. package/src/styles/components/index.less +47 -36
  96. package/src/styles/components/list/BriCard.less +50 -0
  97. package/src/styles/components/list/BriTable.less +9 -9
  98. package/src/styles/components/list/{ZTree.less → BriTree.less} +11 -7
  99. package/src/styles/components/list/BriTreeItem.less +50 -0
  100. package/src/styles/components/list/DshBox/DshTable.less +11 -0
  101. package/src/styles/components/other/BriCode.less +5 -0
  102. package/src/styles/components/other/{ZCollapseTree.less → BriCollapseTree.less} +2 -2
  103. package/src/styles/components/other/BriIframe.less +16 -0
  104. package/src/styles/components/other/{ZLoading.less → BriLoading.less} +3 -3
  105. package/src/styles/components/other/DshAvatar.less +64 -0
  106. package/src/styles/components/other/DshBtnModal.less +3 -0
  107. package/src/styles/components/other/DshColorPanel.less +40 -0
  108. package/src/styles/components/other/DshEditPanel.less +2 -2
  109. package/src/styles/components/small/BriButton.less +3 -2
  110. package/src/styles/components/small/{Ctooltip.less → BriTooltip.less} +2 -1
  111. package/src/styles/components/small/DshCrumbs.less +0 -0
  112. package/src/styles/components/small/DshDropdown.less +5 -3
  113. package/src/styles/components/small/DshIcons.less +7 -0
  114. package/src/styles/components/small/DshTags.less +17 -0
  115. package/src/styles/components/unit/DshFormItem.less +4 -5
  116. package/src/styles/components/unit/DshUnit.less +5 -0
  117. package/src/utils/table.js +8 -0
  118. package/src/components/controls/controlShow.vue +0 -44
  119. package/src/components/other/YNoPermission.vue +0 -45
  120. package/src/components/small/BriTree.vue +0 -42
  121. package/src/styles/components/controls/base/BriUpload.less +0 -436
  122. package/src/styles/components/controls/base/DshCascader.less +0 -110
  123. package/src/styles/components/controls/controlShow.less +0 -12
  124. package/src/styles/components/other/ZCode.less +0 -1
  125. /package/src/{styles/components/other → abolish}/BriTransfer.less +0 -0
  126. /package/src/{components/other → abolish}/BriTransfer.vue +0 -0
  127. /package/src/{styles/components/small → abolish}/BriTree.less +0 -0
  128. /package/src/components/{small → list}/DshPage.vue +0 -0
  129. /package/src/components/other/{ZGantt.vue → BriGantt.vue} +0 -0
  130. /package/src/components/other/{menu/DshMenu.vue → DshMenu.vue} +0 -0
  131. /package/src/components/other/{menu/DshMenuNav.vue → DshMenuNav.vue} +0 -0
  132. /package/src/styles/components/controls/base/{InfoCascader.less → DshCascader/InfoCascader.less} +0 -0
  133. /package/src/styles/components/{small → list}/DshPage.less +0 -0
  134. /package/src/styles/components/other/{ZGantt.less → BriGantt.less} +0 -0
  135. /package/src/{components/controls/base/BriUpload/upload-listItem.vue → styles/components/small/DshCrumbItem.less} +0 -0
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="DshCoordinates">
3
- <Ctooltip
3
+ <bri-tooltip
4
4
  :content="curValName"
5
5
  placement="top"
6
6
  maxWidth="200"
@@ -155,7 +155,7 @@
155
155
  {{ curValName || emptyShowVal }}
156
156
  </span>
157
157
  </template>
158
- </Ctooltip>
158
+ </bri-tooltip>
159
159
  </div>
160
160
  </template>
161
161
 
@@ -5,10 +5,11 @@
5
5
  >
6
6
  <!-- 编辑 -->
7
7
  <template v-if="canEdit">
8
+ <!-- 时间子类型 -->
8
9
  <template v-if="['time'].includes(subType)">
9
10
  <TimePicker
10
- style="width: 100%;"
11
- v-model="val"
11
+ class="DshDate-edit"
12
+ v-model="curValDate"
12
13
  :type="subType"
13
14
  :placeholder="selfPropsObj._placeholder"
14
15
  :disabled="!finalCanEdit"
@@ -18,10 +19,11 @@
18
19
  ></TimePicker>
19
20
  </template>
20
21
 
22
+ <!-- 日期、日期时间、年、月 -->
21
23
  <template v-else>
22
24
  <DatePicker
23
- style="width: 100%;"
24
- v-model="val"
25
+ class="DshDate-edit"
26
+ v-model="curValDate"
25
27
  :type="subType"
26
28
  :placeholder="selfPropsObj._placeholder"
27
29
  :disabled="!finalCanEdit"
@@ -35,11 +37,19 @@
35
37
 
36
38
  <!-- 查看 -->
37
39
  <template v-else>
38
- <control-show
39
- :showVal="curVal"
40
- :emptyShowVal="emptyShowVal"
41
- :propsObj="selfPropsObj"
42
- ></control-show>
40
+ <bri-tooltip
41
+ :content="showText"
42
+ maxWidth="200"
43
+ :transfer="true"
44
+ >
45
+ <div :class="{
46
+ ...commonClass,
47
+ 'DshDate-unit': isUnitShow,
48
+ 'DshDate-show': !isUnitShow
49
+ }">
50
+ {{ showText }}
51
+ </div>
52
+ </bri-tooltip>
43
53
  </template>
44
54
  </div>
45
55
  </template>
@@ -62,12 +72,13 @@
62
72
  selfPropsObj () {
63
73
  return {
64
74
  _transfer: true,
75
+
65
76
  ...this.propsObj,
66
77
  ...this.commonDealPropsObj
67
78
  };
68
79
  },
69
80
 
70
- val: {
81
+ curValDate: {
71
82
  get () {
72
83
  const val = this.value[this.controlKey];
73
84
  return this.$transformDateCompatible(val, this.subType);
@@ -1,49 +1,38 @@
1
1
  <template>
2
2
  <div class="DshEditor">
3
3
  <!-- 编辑 -->
4
- <template v-if="canEdit">
5
- <!-- 可编辑 -->
6
- <template v-if="finalCanEdit">
7
- <div
8
- class="DshEditor-show DshEditor-edit"
9
- :class="value[controlKey] ? '': 'DshEditor-edit-placeholder'"
10
- v-show="showType === 'show'"
11
- v-html="editVal"
12
- @click="handleEdit"
13
- ></div>
14
-
15
- <div
16
- v-show="showType === 'edit'"
17
- class="DshEditor-wrap"
18
- >
19
- <div
20
- ref="toolbar"
21
- class="DshEditor-wrap-toolbar"
22
- ></div>
23
-
24
- <div
25
- ref="editor"
26
- class="DshEditor-wrap-text"
27
- ></div>
28
-
29
- <dsh-buttons
30
- class="DshEditor-wrap-btn"
31
- :list="$getOperationList(['canSave'])"
32
- @click="$dispatchEvent($event)"
33
- ></dsh-buttons>
34
- </div>
35
- </template>
36
-
37
- <!-- 不可编辑 -->
4
+ <template v-if="canEdit">
38
5
  <div
39
- v-else
40
6
  :class="{
41
- 'DshEditor-show': true,
42
- 'DshEditor-show-disabled': true
7
+ 'DshEditor-edit': true,
8
+ ...commonClass
43
9
  }"
44
10
  v-show="showType === 'show'"
45
11
  v-html="showText"
12
+ @click="handleEdit"
46
13
  ></div>
14
+
15
+ <div
16
+ v-if="finalCanEdit"
17
+ v-show="showType === 'edit'"
18
+ class="DshEditor-wrap"
19
+ >
20
+ <div
21
+ ref="toolbar"
22
+ class="DshEditor-wrap-toolbar"
23
+ ></div>
24
+
25
+ <div
26
+ ref="editor"
27
+ class="DshEditor-wrap-text"
28
+ ></div>
29
+
30
+ <dsh-buttons
31
+ class="DshEditor-wrap-btn"
32
+ :list="$getOperationList(['canSave'])"
33
+ @click="$dispatchEvent($event)"
34
+ ></dsh-buttons>
35
+ </div>
47
36
  </template>
48
37
 
49
38
  <!-- 查看 -->
@@ -52,11 +41,10 @@
52
41
  <div
53
42
  v-if="isUnitShow"
54
43
  :class="{
55
- 'DshEditor-unit': true,
56
- 'DshEditor-unit-nodata': true,
44
+ 'DshEditor-unit': !$isEmptyData(curVal)
57
45
  }"
58
46
  >
59
- {{ curVal ? "富文本" : emptyShowVal }}
47
+ {{ $isEmptyData(curVal) ? emptyShowVal : "富文本" }}
60
48
  </div>
61
49
 
62
50
  <!-- 查看页里 的查看 -->
@@ -64,9 +52,8 @@
64
52
  v-else
65
53
  :class="{
66
54
  'DshEditor-show': true,
67
- 'DshEditor-show-nodata': !curVal
55
+ 'DshEditor-show-nodata': $isEmptyData(curVal)
68
56
  }"
69
- v-show="showType === 'show'"
70
57
  v-html="showText"
71
58
  ></div>
72
59
  </template>
@@ -106,10 +93,6 @@
106
93
  ...this.propsObj,
107
94
  ...this.commonDealPropsObj
108
95
  };
109
- },
110
-
111
- editVal () {
112
- return this.curVal || this.selfPropsObj._placeholder;
113
96
  }
114
97
  },
115
98
  created () {},
@@ -181,8 +164,10 @@
181
164
  this.editor = editor;
182
165
  },
183
166
  handleEdit () {
184
- this.editor.txt.html(this.value[this.propsObj._key]);
185
- this.showType = "edit";
167
+ if (this.finalCanEdit) {
168
+ this.editor.txt.html(this.value[this.propsObj._key]);
169
+ this.showType = "edit";
170
+ }
186
171
  },
187
172
  clickSave () {
188
173
  this.showType = "show";
@@ -3,6 +3,7 @@
3
3
  <!-- 编辑 -->
4
4
  <template v-if="canEdit">
5
5
  <Input
6
+ class="DshInput-edit"
6
7
  v-model="value[controlKey]"
7
8
  :type="subType"
8
9
  :placeholder="selfPropsObj._placeholder"
@@ -36,29 +37,29 @@
36
37
 
37
38
  <!-- 查看 -->
38
39
  <template v-else>
39
- <!-- 表格 里的查看 -->
40
- <template v-if="isUnitShow">
41
- <control-show
42
- :showVal="curVal"
43
- :emptyShowVal="emptyShowVal"
44
- :propsObj="selfPropsObj"
45
- ></control-show>
46
- </template>
47
-
48
- <!-- 查看页 里的查看 (textarea单独处理) -->
49
- <template v-else>
40
+ <!-- 查看页 的textarea单独处理 -->
41
+ <template v-if="!isUnitShow && subType === 'textarea' && !$isEmptyData(curVal)">
50
42
  <p
51
- v-if="subType === 'textarea' && curVal"
52
43
  class="DshInput-show-textarea"
53
- v-text="curVal"
44
+ v-text="showText"
54
45
  ></p>
46
+ </template>
55
47
 
56
- <control-show
57
- v-else
58
- :showVal="curVal"
59
- :emptyShowVal="emptyShowVal"
60
- :propsObj="selfPropsObj"
61
- ></control-show>
48
+ <!-- 表格和查看页 里的查看 -->
49
+ <template v-else>
50
+ <bri-tooltip
51
+ :content="showText"
52
+ maxWidth="200"
53
+ :transfer="true"
54
+ >
55
+ <div :class="{
56
+ ...commonClass,
57
+ 'DshInput-unit': isUnitShow,
58
+ 'DshInput-show': !isUnitShow
59
+ }">
60
+ {{ showText }}
61
+ </div>
62
+ </bri-tooltip>
62
63
  </template>
63
64
  </template>
64
65
  </div>
@@ -87,6 +88,7 @@
87
88
  _autosize: {
88
89
  minRows: 2
89
90
  },
91
+
90
92
  ...this.propsObj,
91
93
  ...this.commonDealPropsObj
92
94
  };
@@ -3,6 +3,7 @@
3
3
  <!-- 编辑 -->
4
4
  <template v-if="canEdit">
5
5
  <BriInputNumber
6
+ class="DshNumber-edit"
6
7
  v-model="value[controlKey]"
7
8
  :placeholder="selfPropsObj._placeholder"
8
9
  :disabled="!finalCanEdit"
@@ -10,13 +11,13 @@
10
11
  :max="maxNum"
11
12
  :min="minNum"
12
13
  :precision="digit"
13
- :numberAdjust="selfPropsObj._numberAdjust"
14
+ :numberAdjust="selfPropsObj._numberAdjust || !unitStr"
14
15
  @on-change="change"
15
16
  >
16
17
  <div
17
18
  v-if="unitStr"
18
19
  slot="suffix"
19
- class="DshNumber-suffix"
20
+ class="DshNumber-edit-suffix"
20
21
  >
21
22
  {{ unitStr }}
22
23
  </div>
@@ -25,30 +26,29 @@
25
26
 
26
27
  <!-- 查看 -->
27
28
  <template v-else>
28
- <!-- 表格 里的查看 -->
29
- <template v-if="isUnitShow">
30
- <!-- 进度条模式 -->
29
+ <!-- 单元格的查看 进度条模式 -->
30
+ <template v-if="isUnitShow && selfPropsObj._showProgress">
31
31
  <Progress
32
32
  v-if="selfPropsObj._showProgress"
33
33
  :percent="curVal > 100 ? 100 : toDecimal(curVal)"
34
34
  />
35
-
36
- <!-- 文字模式 -->
37
- <control-show
38
- v-else
39
- :showVal="showVal"
40
- :emptyShowVal="emptyShowVal"
41
- :propsObj="selfPropsObj"
42
- ></control-show>
43
35
  </template>
44
36
 
45
- <!-- 查看页 里的查看 -->
37
+ <!-- 单元格和查看页的查看 -->
46
38
  <template v-else>
47
- <control-show
48
- :showVal="showVal"
49
- :emptyShowVal="emptyShowVal"
50
- :propsObj="selfPropsObj"
51
- ></control-show>
39
+ <bri-tooltip
40
+ :content="showText"
41
+ maxWidth="200"
42
+ :transfer="true"
43
+ >
44
+ <div :class="{
45
+ ...commonClass,
46
+ 'DshInput-unit': isUnitShow,
47
+ 'DshInput-show': !isUnitShow
48
+ }">
49
+ {{ showText }}
50
+ </div>
51
+ </bri-tooltip>
52
52
  </template>
53
53
  </template>
54
54
  </div>
@@ -73,7 +73,6 @@
73
73
  computed: {
74
74
  selfPropsObj () {
75
75
  return {
76
- _numberAdjust: true,
77
76
  ...this.propsObj,
78
77
  ...this.commonDealPropsObj
79
78
  };
@@ -122,8 +121,10 @@
122
121
  return this.selfPropsObj._separator;
123
122
  },
124
123
 
125
- showVal () {
126
- return this.$numToStrAndUnit(this.value[this.controlKey], this.selfPropsObj);
124
+ showText () {
125
+ return this.$isEmptyData(this.curVal)
126
+ ? this.emptyShowVal
127
+ : this.$numToStrAndUnit(this.value[this.controlKey], this.selfPropsObj);
127
128
  }
128
129
  },
129
130
  created () {},
@@ -74,7 +74,7 @@
74
74
  </Select>
75
75
  </template>
76
76
 
77
- <Ctooltip
77
+ <bri-tooltip
78
78
  v-else
79
79
  :content="valStr"
80
80
  maxWidth="200"
@@ -98,11 +98,11 @@
98
98
  </div>
99
99
  <div
100
100
  v-else
101
- class="control-notext dsh-ellipsis"
101
+ class="bri-control-nodata dsh-ellipsis"
102
102
  >
103
103
  {{ emptyShowVal }}
104
104
  </div>
105
- </Ctooltip>
105
+ </bri-tooltip>
106
106
 
107
107
  <!-- tip项弹框提示 -->
108
108
  <dsh-render :render="tipModalRender"></dsh-render>
@@ -20,7 +20,7 @@
20
20
 
21
21
  <!-- 查看 -->
22
22
  <template v-else>
23
- <Ctooltip
23
+ <bri-tooltip
24
24
  :content="showText"
25
25
  placement="top"
26
26
  :transfer="true"
@@ -37,7 +37,7 @@
37
37
  {{ showText }}
38
38
  </span>
39
39
  </div>
40
- </Ctooltip>
40
+ </bri-tooltip>
41
41
  </template>
42
42
  </div>
43
43
  </template>
@@ -34,6 +34,8 @@ const componentNameMap = {
34
34
  editor: "DshEditor",
35
35
  tag: "DshDivider",
36
36
 
37
+ users: "selectUsers",
38
+ departments: "selectDepartments",
37
39
  labels: "BriLabels",
38
40
  package: "DshPackage",
39
41
  flatTable: "flatTable",
@@ -58,11 +60,13 @@ const pathMap = {
58
60
  // DshSelect: "./base/DshSelect.vue", // 全局已注册
59
61
  // DshCheckbox: "./base/DshCheckbox.vue", // 全局已注册
60
62
  // DshCascader: "./base/DshCascader/DshCascader.vue", // 全局已注册
61
- BriUpload: "./base/BriUpload/index.vue",
63
+ BriUpload: "./base/BriUpload/BriUpload.vue",
62
64
  DshCoordinates: "./base/DshCoordinates.vue",
63
65
  DshEditor: "./base/DshEditor.vue",
64
66
  DshDivider: "./base/DshDivider.vue",
65
67
 
68
+ selectUsers: "./senior/selectUsers/selectUsers.vue",
69
+ selectDepartments: "./senior/selectDepartments.vue",
66
70
  BriLabels: "./senior/BriLabels.vue",
67
71
  DshPackage: "./senior/DshPackage.vue",
68
72
  flatTable: "./senior/flatTable.vue",
@@ -1,9 +1,4 @@
1
- import controlShow from "./controlShow.vue";
2
-
3
1
  export default {
4
- components: {
5
- controlShow
6
- },
7
2
  props: {
8
3
  canEdit: {
9
4
  type: Boolean,
@@ -42,9 +37,6 @@ export default {
42
37
  return {};
43
38
  },
44
39
  computed: {
45
- controlKey () {
46
- return this.propsObj._key;
47
- },
48
40
  // 值为不是[]类型用的
49
41
  curVal: {
50
42
  get () {
@@ -57,7 +49,7 @@ export default {
57
49
  // 值为[]类型用的
58
50
  curValList: {
59
51
  get () {
60
- return this.value[this.controlKey] || [];
52
+ return (this.value[this.controlKey] || []).filter(item => !!item);
61
53
  },
62
54
  set (val) {
63
55
  this.value[this.controlKey] = val;
@@ -72,15 +64,21 @@ export default {
72
64
  : "暂无内容";
73
65
  },
74
66
  showText () {
75
- return this.$isEmptyData(this.curVal) ? this.curVal : this.emptyShowVal;
67
+ return this.$isEmptyData(this.curVal) ? this.emptyShowVal : this.curVal;
76
68
  },
77
69
 
78
- isUnitShow () {
79
- return !this.canEdit && this.inTable;
70
+ controlKey () {
71
+ return this.propsObj._key;
72
+ },
73
+ controlType () {
74
+ return this.propsObj._type;
80
75
  },
81
76
  finalCanEdit () {
82
77
  return this.canEdit && (this.propsObj.canEdit == undefined ? true : this.propsObj.canEdit);
83
78
  },
79
+ isUnitShow () {
80
+ return !this.canEdit && this.inTable;
81
+ },
84
82
  commonDealPropsObj () {
85
83
  const selectControlTypes = ["date", "switch", "select", "checkbox", "file", "region", "regions", "cascader", "cascaders", "coordinates", "users", "departments"];
86
84
  return {
@@ -93,12 +91,13 @@ export default {
93
91
  },
94
92
  commonClass () {
95
93
  return {
94
+ "bri-control-edit": this.canEdit && this.finalCanEdit,
95
+ "bri-control-disabled": this.canEdit && !this.finalCanEdit,
96
+ "bri-control-unit": !this.canEdit && this.isUnitShow,
97
+ "bri-control-show": !this.canEdit && !this.isUnitShow,
98
+
96
99
  "dsh-ellipsis": true,
97
- "control-edit": this.canEdit && this.finalCanEdit,
98
- "control-disabled": this.canEdit && !this.finalCanEdit,
99
- "control-unit": !this.canEdit && this.isUnitShow,
100
- "control-show": !this.canEdit && !this.isUnitShow,
101
- "control-notext": this.$isEmptyData(this.curVal)
100
+ "bri-control-nodata": !this.isUnitShow && this.$isEmptyData(this.curVal)
102
101
  };
103
102
  },
104
103