bri-components 1.1.5 → 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/7.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 -90
- 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 +10 -8
- package/src/components/controls/base/DshSwitch.vue +45 -87
- 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/DshDefaultSearch.vue +1 -1
- package/src/components/form/DshForm.vue +4 -13
- 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/BriButton.vue +2 -2
- package/src/components/small/{Ctooltip.vue → BriTooltip.vue} +2 -2
- package/src/components/small/DshButtons.vue +28 -2
- package/src/components/small/DshCrumbs.vue +1 -0
- package/src/components/small/DshCrumbsItem.vue +5 -3
- package/src/components/small/DshIcons.vue +1 -15
- package/src/components/small/DshTags.vue +7 -2
- package/src/components/unit/DshFormItem.vue +6 -6
- package/src/components/unit/DshUnit.vue +0 -8
- package/src/index.js +93 -104
- package/src/styles/common/control.less +62 -53
- 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/{DshCheckbox.less → base/DshCheckbox.less} +3 -2
- package/src/styles/components/controls/base/DshDate.less +15 -0
- package/src/styles/components/controls/{DshEditor.less → base/DshEditor.less} +25 -47
- package/src/styles/components/controls/{DshInput.less → base/DshInput.less} +9 -1
- package/src/styles/components/controls/base/DshNumber.less +68 -0
- package/src/styles/components/controls/{DshSelect.less → base/DshSelect.less} +11 -0
- package/src/styles/components/controls/base/DshSwitch.less +37 -0
- package/src/styles/components/controls/{BriLabels.less → senior/BriLabels.less} +29 -12
- package/src/styles/components/controls/{DshDate.less → special/DshBack.less} +1 -1
- 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 +41 -9
- package/src/styles/components/form/DshForm.less +13 -0
- package/src/styles/components/index.less +51 -43
- 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 +35 -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 +5 -6
- 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/BriUpload.less +0 -436
- package/src/styles/components/controls/DshCascader.less +0 -95
- package/src/styles/components/controls/DshNumber.less +0 -51
- 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/{BriInputs.less → base/BriInputs.less} +0 -0
- /package/src/styles/components/controls/{InfoCascader.less → base/DshCascader/InfoCascader.less} +0 -0
- /package/src/styles/components/controls/{DshCoordinates.less → base/DshCoordinates.less} +0 -0
- /package/src/styles/components/controls/{DshDaterange.less → base/DshDaterange.less} +0 -0
- /package/src/styles/components/controls/{DshDivider.less → base/DshDivider.less} +0 -0
- /package/src/styles/components/controls/{DshNumberange.less → base/DshNumberange.less} +0 -0
- /package/src/styles/components/controls/{DshPackage.less → senior/DshPackage.less} +0 -0
- /package/src/styles/components/controls/{cascaderTable.less → senior/cascaderTable.less} +0 -0
- /package/src/styles/components/controls/{flatTable.less → senior/flatTable.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,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,15 +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
|
-
.ivu-form-item-error-tip {
|
|
329
|
-
top: 90%;
|
|
330
|
-
left: 15px;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
</style>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
<div class="
|
|
2
|
+
<div class="BriTree">
|
|
3
|
+
<div class="BriTree-action">
|
|
4
4
|
<dsh-buttons
|
|
5
|
-
class="
|
|
5
|
+
class="BriTree-action-create"
|
|
6
6
|
:list="$getOperationList(['createNode'])"
|
|
7
7
|
@click="$dispatchEvent($event)"
|
|
8
8
|
></dsh-buttons>
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
|
-
<div class="
|
|
11
|
+
<div class="BriTree-tree">
|
|
12
12
|
<Tree
|
|
13
13
|
:data="treeData"
|
|
14
14
|
:render="renderContent"
|
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
|
|
18
18
|
<!-- 添加节点弹窗 -->
|
|
19
19
|
<dsh-modal
|
|
20
|
+
class="BriTree-modal"
|
|
20
21
|
v-model="treeFormShow"
|
|
21
22
|
:propsObj="treeFormPropsObj"
|
|
22
23
|
mode="custom"
|
|
23
24
|
>
|
|
24
|
-
<div class="
|
|
25
|
+
<div class="BriTree-modal-content">
|
|
25
26
|
<dsh-form
|
|
26
27
|
v-if="treeFormShow"
|
|
27
28
|
ref="treeForm"
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
></dsh-form>
|
|
32
33
|
|
|
33
34
|
<dsh-buttons
|
|
34
|
-
class="
|
|
35
|
+
class="BriTree-modal-content-btns"
|
|
35
36
|
:list="$getOperationList(['clickNodeCancel', 'clickNodeConfirm'])"
|
|
36
37
|
@click="$dispatchEvent($event, { data: treeFormData })"
|
|
37
38
|
></dsh-buttons>
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
});
|
|
54
55
|
};
|
|
55
56
|
export default {
|
|
56
|
-
name: "
|
|
57
|
+
name: "BriTree",
|
|
57
58
|
props: {
|
|
58
59
|
data: Array,
|
|
59
60
|
// 树形级联类别:cascader dropdown
|
|
@@ -358,7 +359,7 @@
|
|
|
358
359
|
icon: "md-arrow-dropdown-circle",
|
|
359
360
|
color: this.colorMap[data.color] || this.colorMap["color-1"]
|
|
360
361
|
},
|
|
361
|
-
menuClass: "
|
|
362
|
+
menuClass: "BriTree-dropdown-menu",
|
|
362
363
|
list: this.colorArr
|
|
363
364
|
},
|
|
364
365
|
style: {
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
<div class="DshCard-item-info">
|
|
36
36
|
<!-- 标题 -->
|
|
37
37
|
<div class="DshCard-item-info-title dsh-ellipsis">
|
|
38
|
-
<
|
|
38
|
+
<bri-tooltip
|
|
39
39
|
placement="top"
|
|
40
40
|
:transfer="true"
|
|
41
41
|
:content="dataItem[propsObj.titleField]"
|
|
42
42
|
>
|
|
43
43
|
<div class="dsh-ellipsis">{{ dataItem[propsObj.titleField] }}</div>
|
|
44
|
-
</
|
|
44
|
+
</bri-tooltip>
|
|
45
45
|
</div>
|
|
46
46
|
|
|
47
47
|
<!-- 显示字段 -->
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
:key="colItem._key"
|
|
52
52
|
>
|
|
53
53
|
<!-- 左 label -->
|
|
54
|
-
<
|
|
54
|
+
<bri-tooltip
|
|
55
55
|
class="unit-label"
|
|
56
56
|
placement="top"
|
|
57
57
|
:transfer="true"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
:content="colItem._name"
|
|
60
60
|
>
|
|
61
61
|
<span class="dsh-ellipsis">{{ colItem._name }}</span>
|
|
62
|
-
</
|
|
62
|
+
</bri-tooltip>
|
|
63
63
|
<span class="unit-colon">:</span>
|
|
64
64
|
|
|
65
65
|
<!-- 右 val -->
|
|
@@ -71,14 +71,14 @@
|
|
|
71
71
|
fontWeight: 500
|
|
72
72
|
}"
|
|
73
73
|
>
|
|
74
|
-
<
|
|
74
|
+
<bri-tooltip
|
|
75
75
|
transfer
|
|
76
76
|
:content="colItem.title"
|
|
77
77
|
>
|
|
78
78
|
<div class="td-content dsh-ellipsis">
|
|
79
79
|
{{ colItem.title }}
|
|
80
80
|
</div>
|
|
81
|
-
</
|
|
81
|
+
</bri-tooltip>
|
|
82
82
|
</td>
|
|
83
83
|
</tr>
|
|
84
84
|
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
background: '#F7F9FD'
|
|
94
94
|
}"
|
|
95
95
|
>
|
|
96
|
-
<
|
|
96
|
+
<bri-tooltip
|
|
97
97
|
transfer
|
|
98
98
|
:content="colItem.title"
|
|
99
99
|
>
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
</template>
|
|
116
116
|
</slot>
|
|
117
117
|
</div>
|
|
118
|
-
</
|
|
118
|
+
</bri-tooltip>
|
|
119
119
|
</td>
|
|
120
120
|
</tr>
|
|
121
121
|
</table>
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
justifyContent: getFlexLayout(col._align)
|
|
44
44
|
}"
|
|
45
45
|
>
|
|
46
|
-
<
|
|
46
|
+
<bri-tooltip
|
|
47
47
|
transfer
|
|
48
48
|
:content="col._name"
|
|
49
49
|
>
|
|
50
50
|
<span class="dsh-ellipsis">
|
|
51
51
|
{{ col._name }}
|
|
52
52
|
</span>
|
|
53
|
-
</
|
|
53
|
+
</bri-tooltip>
|
|
54
54
|
</div>
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
}"
|
|
15
15
|
>
|
|
16
16
|
<span class="DshPanel-group-title-name">
|
|
17
|
-
<
|
|
17
|
+
<bri-tooltip
|
|
18
18
|
class="unit-label"
|
|
19
19
|
placement="top"
|
|
20
20
|
:transfer="true"
|
|
21
21
|
:content="groupItem.name"
|
|
22
22
|
>
|
|
23
23
|
<span class="dsh-ellipsis">{{ groupItem.name }} </span>
|
|
24
|
-
</
|
|
24
|
+
</bri-tooltip>
|
|
25
25
|
</span>
|
|
26
26
|
<span>
|
|
27
27
|
<span class="DshPanel-group-title-number">
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<div
|
|
44
44
|
v-if="!groupItem.list.length"
|
|
45
45
|
class="dsh-tip"
|
|
46
|
-
style="
|
|
46
|
+
:style="{color: getBgColor(groupItem)}"
|
|
47
47
|
>
|
|
48
48
|
{{ noDataText }}
|
|
49
49
|
</div>
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
:key="colItem._key"
|
|
90
90
|
>
|
|
91
91
|
<!-- 左 label -->
|
|
92
|
-
<
|
|
92
|
+
<bri-tooltip
|
|
93
93
|
class="unit-label"
|
|
94
94
|
placement="top"
|
|
95
95
|
:transfer="true"
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
:content="colItem._name"
|
|
98
98
|
>
|
|
99
99
|
<span class="dsh-ellipsis">{{ colItem._name }}</span>
|
|
100
|
-
</
|
|
100
|
+
</bri-tooltip>
|
|
101
101
|
<span class="unit-colon">:</span>
|
|
102
102
|
|
|
103
103
|
<!-- 右 val -->
|
|
@@ -66,8 +66,9 @@
|
|
|
66
66
|
...(operationItem._name_ || operationItem.name)
|
|
67
67
|
.split("/")
|
|
68
68
|
.map(item => item.length * (operationItem.size === "small" ? 12 : 14))
|
|
69
|
-
) +
|
|
70
|
-
|
|
69
|
+
) + (
|
|
70
|
+
operationItem.icon || operationItem.customIcon ? 20 : 0) + (
|
|
71
|
+
operationItem.size === "small" ? 8 : 16); // 按钮的padding,故意多了2px保留余地
|
|
71
72
|
};
|
|
72
73
|
|
|
73
74
|
return this.operationList.map(operationItem => {
|
|
@@ -127,8 +128,8 @@
|
|
|
127
128
|
this.selfOperationList
|
|
128
129
|
.slice(0, this.selfOperationList.length > maxBtnNum ? maxBtnNum - 1 : this.selfOperationList.length)
|
|
129
130
|
.reduce((total, operationItem) => total + operationItem.width, 0) +
|
|
130
|
-
(this.selfOperationList.length > maxBtnNum ?
|
|
131
|
-
(this.selfOperationList.length > 0 ?
|
|
131
|
+
(this.selfOperationList.length > maxBtnNum ? 70 : 0) + // 出现更多按钮的宽度
|
|
132
|
+
(this.selfOperationList.length > 0 ? 40 : 0) + // 操作列的padding
|
|
132
133
|
4 // 留出4px空间,避免麻烦问题
|
|
133
134
|
, 80
|
|
134
135
|
),
|
|
@@ -143,85 +144,25 @@
|
|
|
143
144
|
)
|
|
144
145
|
};
|
|
145
146
|
});
|
|
146
|
-
const outFilterOperationList = totalOperationList.slice(0, maxBtnNum - 1);
|
|
147
|
-
const moreFilterOperationList = totalOperationList.slice(maxBtnNum - 1).filter(operationItem => !operationItem.disabled);
|
|
148
147
|
|
|
149
148
|
// TODO: 注意此处totalOperationList用的一定是表格行显示最多的操作按钮数组,有改动注意看此备注!!!
|
|
150
|
-
return
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
nativeOn: {
|
|
162
|
-
click: (e) => {
|
|
163
|
-
e.stopPropagation();
|
|
164
|
-
}
|
|
149
|
+
return h("dsh-buttons", {
|
|
150
|
+
props: {
|
|
151
|
+
list: totalOperationList,
|
|
152
|
+
maxFlatNum: maxBtnNum - 1,
|
|
153
|
+
itemClass: "table-operation-btn"
|
|
154
|
+
},
|
|
155
|
+
on: {
|
|
156
|
+
click: (operationItem) => {
|
|
157
|
+
this.$dshEmit(operationItem, params.row, params.row);
|
|
165
158
|
}
|
|
166
|
-
}
|
|
167
|
-
:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
list: outFilterOperationList,
|
|
174
|
-
itemClass: "table-operation-btn"
|
|
175
|
-
},
|
|
176
|
-
on: {
|
|
177
|
-
click: (operationItem) => {
|
|
178
|
-
this.$dshEmit(operationItem, params.row, params.row);
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
nativeOn: {
|
|
182
|
-
click: (e) => {
|
|
183
|
-
e.stopPropagation();
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}),
|
|
187
|
-
h("dsh-dropdown", {
|
|
188
|
-
props: {
|
|
189
|
-
dropdownObj: {
|
|
190
|
-
icon: "ios-more",
|
|
191
|
-
size: 22,
|
|
192
|
-
color: "#E9ECF4",
|
|
193
|
-
showDropdownItemIcon: false
|
|
194
|
-
},
|
|
195
|
-
list: moreFilterOperationList
|
|
196
|
-
},
|
|
197
|
-
on: {
|
|
198
|
-
click: (operationItem) => {
|
|
199
|
-
this.$dshEmit(operationItem, params.row, params.row);
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
nativeOn: {
|
|
203
|
-
click: (e) => {
|
|
204
|
-
e.stopPropagation();
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}, [
|
|
208
|
-
h("dsh-buttons", {
|
|
209
|
-
class: "dsh-margin-left5",
|
|
210
|
-
props: {
|
|
211
|
-
list: [
|
|
212
|
-
{
|
|
213
|
-
name: "更多>>",
|
|
214
|
-
type: "more",
|
|
215
|
-
btnType: "text",
|
|
216
|
-
size: "default",
|
|
217
|
-
class: "table-operation-btn",
|
|
218
|
-
disabled: !moreFilterOperationList.length
|
|
219
|
-
}
|
|
220
|
-
]
|
|
221
|
-
}
|
|
222
|
-
})
|
|
223
|
-
])
|
|
224
|
-
]);
|
|
159
|
+
},
|
|
160
|
+
nativeOn: {
|
|
161
|
+
click: (e) => {
|
|
162
|
+
e.stopPropagation();
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
});
|
|
225
166
|
}
|
|
226
167
|
}
|
|
227
168
|
]
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
|
|
106
106
|
<!-- 查看状态 -->
|
|
107
107
|
<template v-else>
|
|
108
|
-
<
|
|
108
|
+
<bri-tooltip
|
|
109
109
|
:transfer="true"
|
|
110
110
|
:content="enterText(row[col._key].name)"
|
|
111
111
|
>
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
class="dsh-ellipsis"
|
|
115
115
|
style="word-break:break-word"
|
|
116
116
|
></span>
|
|
117
|
-
</
|
|
117
|
+
</bri-tooltip>
|
|
118
118
|
|
|
119
119
|
<!-- 操作下拉 -->
|
|
120
120
|
<dsh-dropdown
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
2
|
+
<div class="BriCode">
|
|
3
3
|
<codemirror
|
|
4
4
|
style="height:100%"
|
|
5
5
|
v-model="computedVal"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
import "codemirror/addon/display/autorefresh"; // 及时自动更新,配置里面也需要设置autoRefresh为true
|
|
39
39
|
|
|
40
40
|
export default {
|
|
41
|
-
name: "
|
|
41
|
+
name: "BriCode",
|
|
42
42
|
components: {
|
|
43
43
|
codemirror
|
|
44
44
|
},
|
|
@@ -116,10 +116,3 @@
|
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
118
|
</script>
|
|
119
|
-
|
|
120
|
-
<style lang="less" scoped>
|
|
121
|
-
.ZCode {
|
|
122
|
-
width: 100%;
|
|
123
|
-
height: 100%;
|
|
124
|
-
}
|
|
125
|
-
</style>
|