bri-components 1.1.6 → 1.2.0
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/lib/0.bri-components.min.js +1 -1
- package/lib/1.bri-components.min.js +1 -1
- package/lib/2.bri-components.min.js +1 -1
- package/lib/3.bri-components.min.js +1 -1
- package/lib/4.bri-components.min.js +1 -1
- package/lib/5.bri-components.min.js +1 -1
- package/lib/6.bri-components.min.js +1 -1
- package/lib/bri-components.min.js +6 -6
- package/lib/styles/bri-components.css +1 -1
- package/package.json +1 -1
- package/src/abolish/DshFileShow.less +61 -0
- package/src/{components/small → abolish}/DshFileShow.vue +30 -105
- package/src/components/controls/base/BriUpload/{index.vue → BriUpload.vue} +3 -3
- package/src/components/controls/base/BriUpload/{upload-list.vue → uploadList.vue} +17 -13
- package/src/components/controls/base/BriUpload/uploadMixin.js +1 -5
- package/src/components/controls/base/DshCascader/DshCascader.vue +91 -93
- package/src/components/controls/base/DshCheckbox.vue +3 -3
- package/src/components/controls/base/DshCoordinates.vue +2 -2
- package/src/components/controls/base/DshDate.vue +21 -10
- package/src/components/controls/base/DshEditor.vue +33 -48
- package/src/components/controls/base/DshInput.vue +21 -19
- package/src/components/controls/base/DshNumber/DshNumber.vue +23 -22
- package/src/components/controls/base/DshSelect.vue +2 -2
- package/src/components/controls/base/DshSwitch.vue +2 -2
- package/src/components/controls/controlMap.js +1 -1
- package/src/components/controls/controlMixin.js +5 -8
- package/src/components/controls/senior/BriLabels.vue +72 -54
- package/src/components/controls/special/DshUndeveloped.vue +0 -6
- package/src/components/form/DshForm.vue +4 -17
- package/src/components/list/BriTable.vue +1 -1
- package/src/components/list/{ZTree.vue → BriTree.vue} +9 -8
- package/src/components/list/DshBox/DshCard.vue +4 -4
- package/src/components/list/DshBox/DshCrossTable.vue +4 -4
- package/src/components/list/DshBox/DshList.vue +2 -2
- package/src/components/list/DshBox/DshPanel.vue +5 -5
- package/src/components/list/DshBox/DshTable.vue +21 -80
- package/src/components/list/DshCascaderTable.vue +2 -2
- package/src/components/other/{ZCode.vue → BriCode.vue} +2 -9
- package/src/components/other/{ZCollapseTree.vue → BriCollapseTree.vue} +37 -16
- package/src/components/other/{ZIframe.vue → BriIframe.vue} +7 -23
- package/src/components/other/{ZLoading.vue → BriLoading.vue} +25 -11
- package/src/components/other/BriSvg.vue +2 -2
- package/src/components/other/DshAvatar.vue +21 -69
- package/src/components/other/DshColorPanel.vue +0 -43
- package/src/components/small/{Ctooltip.vue → BriTooltip.vue} +2 -2
- package/src/components/small/DshButtons.vue +2 -2
- package/src/components/small/DshCrumbs.vue +1 -0
- package/src/components/small/DshCrumbsItem.vue +5 -3
- package/src/components/small/DshIcons.vue +0 -14
- package/src/components/small/DshTags.vue +7 -2
- package/src/components/unit/DshFormItem.vue +4 -4
- package/src/components/unit/DshUnit.vue +0 -8
- package/src/index.js +93 -104
- package/src/styles/common/control.less +56 -51
- package/src/styles/components/controls/base/BriUpload/BriUpload.less +159 -0
- package/src/styles/components/controls/base/BriUpload/BriUploadImage.less +81 -0
- package/src/styles/components/controls/base/BriUpload/index.less +3 -0
- package/src/styles/components/controls/base/BriUpload/uploadList.less +164 -0
- package/src/styles/components/controls/base/DshCascader/DshCascader.less +124 -0
- package/src/styles/components/controls/base/DshCascader/index.less +2 -0
- package/src/styles/components/controls/base/DshCheckbox.less +3 -2
- package/src/styles/components/controls/base/DshDate.less +12 -0
- package/src/styles/components/controls/base/DshEditor.less +25 -47
- package/src/styles/components/controls/base/DshInput.less +9 -1
- package/src/styles/components/controls/base/DshNumber.less +43 -26
- package/src/styles/components/controls/base/DshSelect.less +11 -0
- package/src/styles/components/controls/senior/BriLabels.less +29 -12
- package/src/styles/components/controls/special/DshBack.less +3 -0
- package/src/styles/components/controls/special/DshUndeveloped.less +3 -0
- package/src/styles/components/form/DshAdvSearchForm.less +0 -1
- package/src/styles/components/form/DshDefaultSearch.less +1 -1
- package/src/styles/components/form/DshForm.less +13 -0
- package/src/styles/components/index.less +43 -36
- package/src/styles/components/list/BriTable.less +9 -9
- package/src/styles/components/list/{ZTree.less → BriTree.less} +11 -7
- package/src/styles/components/list/DshBox/DshTable.less +11 -0
- package/src/styles/components/other/BriCode.less +5 -0
- package/src/styles/components/other/{ZCollapseTree.less → BriCollapseTree.less} +2 -2
- package/src/styles/components/other/BriIframe.less +16 -0
- package/src/styles/components/other/{ZLoading.less → BriLoading.less} +3 -3
- package/src/styles/components/other/DshAvatar.less +64 -0
- package/src/styles/components/other/DshBtnModal.less +3 -0
- package/src/styles/components/other/DshColorPanel.less +40 -0
- package/src/styles/components/other/DshEditPanel.less +2 -2
- package/src/styles/components/small/BriButton.less +3 -2
- package/src/styles/components/small/{Ctooltip.less → BriTooltip.less} +2 -1
- package/src/styles/components/small/DshCrumbs.less +0 -0
- package/src/styles/components/small/DshDropdown.less +5 -3
- package/src/styles/components/small/DshIcons.less +7 -0
- package/src/styles/components/small/DshTags.less +17 -0
- package/src/styles/components/unit/DshFormItem.less +4 -4
- package/src/styles/components/unit/DshUnit.less +5 -0
- package/src/utils/table.js +8 -0
- package/src/components/controls/controlShow.vue +0 -44
- package/src/components/other/YNoPermission.vue +0 -45
- package/src/components/small/BriTree.vue +0 -42
- package/src/styles/components/controls/base/BriUpload.less +0 -436
- package/src/styles/components/controls/base/DshCascader.less +0 -110
- package/src/styles/components/controls/controlShow.less +0 -12
- package/src/styles/components/other/ZCode.less +0 -1
- /package/src/{styles/components/other → abolish}/BriTransfer.less +0 -0
- /package/src/{components/other → abolish}/BriTransfer.vue +0 -0
- /package/src/{styles/components/small → abolish}/BriTree.less +0 -0
- /package/src/components/{small → list}/DshPage.vue +0 -0
- /package/src/components/other/{ZGantt.vue → BriGantt.vue} +0 -0
- /package/src/components/other/{menu/DshMenu.vue → DshMenu.vue} +0 -0
- /package/src/components/other/{menu/DshMenuNav.vue → DshMenuNav.vue} +0 -0
- /package/src/styles/components/controls/base/{InfoCascader.less → DshCascader/InfoCascader.less} +0 -0
- /package/src/styles/components/{small → list}/DshPage.less +0 -0
- /package/src/styles/components/other/{ZGantt.less → BriGantt.less} +0 -0
- /package/src/{components/controls/base/BriUpload/upload-listItem.vue → styles/components/small/DshCrumbItem.less} +0 -0
|
@@ -1,49 +1,38 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="DshEditor">
|
|
3
3
|
<!-- 编辑 -->
|
|
4
|
-
|
|
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-
|
|
42
|
-
|
|
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':
|
|
56
|
-
'DshEditor-unit-nodata': true,
|
|
44
|
+
'DshEditor-unit': !$isEmptyData(curVal)
|
|
57
45
|
}"
|
|
58
46
|
>
|
|
59
|
-
{{ curVal ? "富文本"
|
|
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':
|
|
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
|
-
|
|
185
|
-
|
|
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="
|
|
44
|
+
v-text="showText"
|
|
54
45
|
></p>
|
|
46
|
+
</template>
|
|
55
47
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
:
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
<
|
|
48
|
-
:
|
|
49
|
-
|
|
50
|
-
:
|
|
51
|
-
|
|
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
|
-
|
|
126
|
-
return this.$
|
|
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
|
-
<
|
|
77
|
+
<bri-tooltip
|
|
78
78
|
v-else
|
|
79
79
|
:content="valStr"
|
|
80
80
|
maxWidth="200"
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
>
|
|
103
103
|
{{ emptyShowVal }}
|
|
104
104
|
</div>
|
|
105
|
-
</
|
|
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
|
-
<
|
|
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
|
-
</
|
|
40
|
+
</bri-tooltip>
|
|
41
41
|
</template>
|
|
42
42
|
</div>
|
|
43
43
|
</template>
|
|
@@ -58,7 +58,7 @@ const pathMap = {
|
|
|
58
58
|
// DshSelect: "./base/DshSelect.vue", // 全局已注册
|
|
59
59
|
// DshCheckbox: "./base/DshCheckbox.vue", // 全局已注册
|
|
60
60
|
// DshCascader: "./base/DshCascader/DshCascader.vue", // 全局已注册
|
|
61
|
-
BriUpload: "./base/BriUpload/
|
|
61
|
+
BriUpload: "./base/BriUpload/BriUpload.vue",
|
|
62
62
|
DshCoordinates: "./base/DshCoordinates.vue",
|
|
63
63
|
DshEditor: "./base/DshEditor.vue",
|
|
64
64
|
DshDivider: "./base/DshDivider.vue",
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import controlShow from "./controlShow.vue";
|
|
2
|
-
|
|
3
1
|
export default {
|
|
4
|
-
components: {
|
|
5
|
-
controlShow
|
|
6
|
-
},
|
|
2
|
+
components: {},
|
|
7
3
|
props: {
|
|
8
4
|
canEdit: {
|
|
9
5
|
type: Boolean,
|
|
@@ -72,7 +68,7 @@ export default {
|
|
|
72
68
|
: "暂无内容";
|
|
73
69
|
},
|
|
74
70
|
showText () {
|
|
75
|
-
return this.$isEmptyData(this.curVal) ? this.
|
|
71
|
+
return this.$isEmptyData(this.curVal) ? this.emptyShowVal : this.curVal;
|
|
76
72
|
},
|
|
77
73
|
|
|
78
74
|
isUnitShow () {
|
|
@@ -93,12 +89,13 @@ export default {
|
|
|
93
89
|
},
|
|
94
90
|
commonClass () {
|
|
95
91
|
return {
|
|
96
|
-
"dsh-ellipsis": true,
|
|
97
92
|
"control-edit": this.canEdit && this.finalCanEdit,
|
|
98
93
|
"control-disabled": this.canEdit && !this.finalCanEdit,
|
|
99
94
|
"control-unit": !this.canEdit && this.isUnitShow,
|
|
100
95
|
"control-show": !this.canEdit && !this.isUnitShow,
|
|
101
|
-
|
|
96
|
+
|
|
97
|
+
"dsh-ellipsis": true,
|
|
98
|
+
"control-notext": !this.isUnitShow && this.$isEmptyData(this.curVal)
|
|
102
99
|
};
|
|
103
100
|
},
|
|
104
101
|
|
|
@@ -1,38 +1,45 @@
|
|
|
1
1
|
<!-- 动态标签 -->
|
|
2
2
|
<template>
|
|
3
3
|
<div class="BriLabels">
|
|
4
|
-
<!--
|
|
4
|
+
<!-- 编辑页 -->
|
|
5
5
|
<Dropdown
|
|
6
|
-
v-if="
|
|
6
|
+
v-if="canEdit"
|
|
7
7
|
class="BriLabels-dropdown"
|
|
8
8
|
trigger="custom"
|
|
9
9
|
placement="bottom-start"
|
|
10
10
|
:visible="listVisible"
|
|
11
|
+
transfer
|
|
11
12
|
@on-clickoutside="clickInput"
|
|
12
13
|
>
|
|
14
|
+
<!-- 可编辑 -->
|
|
13
15
|
<div
|
|
14
16
|
:class="{
|
|
15
|
-
'
|
|
16
|
-
|
|
17
|
-
'BriLabels-dropdown-show-active':listVisible
|
|
17
|
+
'BriLabels-box': true,
|
|
18
|
+
...commonClass
|
|
18
19
|
}"
|
|
19
20
|
@click="clickInput"
|
|
20
21
|
>
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
v-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
<template v-if="val.length">
|
|
23
|
+
<dsh-tags
|
|
24
|
+
v-if="val"
|
|
25
|
+
class="BriLabels-text"
|
|
26
|
+
:list="val"
|
|
27
|
+
:propsObj="{
|
|
28
|
+
closable: finalCanEdit,
|
|
29
|
+
disabled: !finalCanEdit
|
|
30
|
+
}"
|
|
31
|
+
@delete="handleCancel"
|
|
27
32
|
>
|
|
28
|
-
{{
|
|
29
|
-
</
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
<span slot-scope="{ tagItem }"> {{ tagItem.name }}</span>
|
|
34
|
+
</dsh-tags>
|
|
35
|
+
|
|
36
|
+
<Icon
|
|
37
|
+
class="BriLabels-icon"
|
|
38
|
+
:type="inputIcon"
|
|
39
|
+
/>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<template v-else>{{ commonDealPropsObj._placeholder }}</template>
|
|
36
43
|
</div>
|
|
37
44
|
|
|
38
45
|
<template #list>
|
|
@@ -93,7 +100,7 @@
|
|
|
93
100
|
btnType: 'default',
|
|
94
101
|
icon:'md-add'
|
|
95
102
|
}"
|
|
96
|
-
@click="addLabel"
|
|
103
|
+
@click.native.stop="addLabel"
|
|
97
104
|
>
|
|
98
105
|
添加选项
|
|
99
106
|
</bri-button>
|
|
@@ -102,38 +109,30 @@
|
|
|
102
109
|
</template>
|
|
103
110
|
</Dropdown>
|
|
104
111
|
|
|
105
|
-
<!--
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
<Ctooltip
|
|
112
|
-
placement="top"
|
|
113
|
-
:transfer="true"
|
|
114
|
-
maxWidth="200"
|
|
115
|
-
:content="showValStr"
|
|
116
|
-
>
|
|
117
|
-
<div class="dsh-ellipsis">
|
|
118
|
-
<div
|
|
119
|
-
v-for="item in val"
|
|
120
|
-
:key="item._key"
|
|
121
|
-
size="medium"
|
|
122
|
-
class="BriLabels-view-item"
|
|
123
|
-
>
|
|
124
|
-
{{ item.name }}
|
|
125
|
-
</div>
|
|
126
|
-
</div>
|
|
127
|
-
</Ctooltip>
|
|
128
|
-
</template>
|
|
129
|
-
|
|
130
|
-
<div
|
|
131
|
-
v-else
|
|
132
|
-
class="BriLabels-view-nodata"
|
|
112
|
+
<!-- 查看模式 -->
|
|
113
|
+
<template v-else>
|
|
114
|
+
<bri-tooltip
|
|
115
|
+
:content="showValStr"
|
|
116
|
+
maxWidth="200"
|
|
117
|
+
:transfer="true"
|
|
133
118
|
>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
119
|
+
<div :class="commonClass">
|
|
120
|
+
<dsh-tags
|
|
121
|
+
v-if="!$isEmptyData(val)"
|
|
122
|
+
class="BriLabels-text"
|
|
123
|
+
:list="val"
|
|
124
|
+
:propsObj="{
|
|
125
|
+
closable: false
|
|
126
|
+
}"
|
|
127
|
+
>
|
|
128
|
+
<span slot-scope="{ tagItem }"> {{ tagItem.name }}</span>
|
|
129
|
+
</dsh-tags>
|
|
130
|
+
<template v-else>
|
|
131
|
+
{{ emptyShowVal }}
|
|
132
|
+
</template>
|
|
133
|
+
</div>
|
|
134
|
+
</bri-tooltip>
|
|
135
|
+
</template>
|
|
137
136
|
</div>
|
|
138
137
|
</template>
|
|
139
138
|
|
|
@@ -158,6 +157,9 @@
|
|
|
158
157
|
...this.commonDealPropsObj
|
|
159
158
|
};
|
|
160
159
|
},
|
|
160
|
+
modKey () {
|
|
161
|
+
return this.selfPropsObj.modKey;
|
|
162
|
+
},
|
|
161
163
|
val: {
|
|
162
164
|
get () {
|
|
163
165
|
return this.value[this.propsObj._key] || [];
|
|
@@ -169,13 +171,25 @@
|
|
|
169
171
|
showValStr () {
|
|
170
172
|
let valArr = this.val && this.val.map(item => item.name);
|
|
171
173
|
return valArr && valArr.join("、");
|
|
174
|
+
},
|
|
175
|
+
isCore () {
|
|
176
|
+
return this.propsObj.isCore;
|
|
172
177
|
}
|
|
173
178
|
},
|
|
174
179
|
created () {
|
|
175
180
|
},
|
|
176
181
|
methods: {
|
|
177
182
|
init () {
|
|
178
|
-
this.
|
|
183
|
+
if (this.isCore) {
|
|
184
|
+
this.listData = this.propsObj._originLabels.map(item => {
|
|
185
|
+
return {
|
|
186
|
+
...item,
|
|
187
|
+
isEdit: false
|
|
188
|
+
};
|
|
189
|
+
});
|
|
190
|
+
} else {
|
|
191
|
+
this.getListData();
|
|
192
|
+
}
|
|
179
193
|
},
|
|
180
194
|
getListData () {
|
|
181
195
|
this.$https({
|
|
@@ -187,7 +201,8 @@
|
|
|
187
201
|
search: {
|
|
188
202
|
entityKey: this.entityKey, // 当前工作表关联的数据表Key
|
|
189
203
|
fieldKey: this.selfPropsObj._key === "_default" ? this.value._key : (this.selfPropsObj.__realKey__ || this.selfPropsObj._key), // 当前字段Key
|
|
190
|
-
labelType: this.selfPropsObj._labelType
|
|
204
|
+
labelType: this.selfPropsObj._labelType,
|
|
205
|
+
modKey: this.modKey
|
|
191
206
|
},
|
|
192
207
|
pagination: {
|
|
193
208
|
page: 1,
|
|
@@ -223,6 +238,7 @@
|
|
|
223
238
|
} else {
|
|
224
239
|
this.val.push(item);
|
|
225
240
|
}
|
|
241
|
+
this.change();
|
|
226
242
|
},
|
|
227
243
|
clickEdit (item) {
|
|
228
244
|
item.isEdit = true;
|
|
@@ -235,9 +251,10 @@
|
|
|
235
251
|
if (item.name == "") return;
|
|
236
252
|
item.isEdit = false;
|
|
237
253
|
this.$forceUpdate();
|
|
254
|
+
this.change();
|
|
238
255
|
},
|
|
239
256
|
handleCancel (item) {
|
|
240
|
-
this.
|
|
257
|
+
this.change();
|
|
241
258
|
},
|
|
242
259
|
addLabel () {
|
|
243
260
|
this.listData.push({
|
|
@@ -246,6 +263,7 @@
|
|
|
246
263
|
name: "",
|
|
247
264
|
labelType: this.selfPropsObj._labelType
|
|
248
265
|
});
|
|
266
|
+
this.change();
|
|
249
267
|
}
|
|
250
268
|
},
|
|
251
269
|
watch: {
|
|
@@ -148,7 +148,10 @@
|
|
|
148
148
|
data () {
|
|
149
149
|
return {
|
|
150
150
|
rules: {},
|
|
151
|
-
forceValidateTypes: [
|
|
151
|
+
forceValidateTypes: [
|
|
152
|
+
"select", "cascader", "regions", "cascaders", "file", "coordinates", "editor",
|
|
153
|
+
"users", "departments", "labels", "flatTable", "reference", "referenceBy"
|
|
154
|
+
],
|
|
152
155
|
ignoreProperties: [
|
|
153
156
|
"_name", "_key", "_default", "_required", "_span", "_br", "_line", "_noLabel", "_clearable",
|
|
154
157
|
"_disabledBtns", "_disabledOldDataRow"
|
|
@@ -319,19 +322,3 @@
|
|
|
319
322
|
}
|
|
320
323
|
};
|
|
321
324
|
</script>
|
|
322
|
-
|
|
323
|
-
<style lang="less">
|
|
324
|
-
.DshForm {
|
|
325
|
-
&-item-FormItem {
|
|
326
|
-
margin-bottom: 0px!important;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
.ivu-form-item-content {
|
|
330
|
-
line-height: normal;
|
|
331
|
-
}
|
|
332
|
-
.ivu-form-item-error-tip {
|
|
333
|
-
top: 90%;
|
|
334
|
-
left: 15px;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
</style>
|