bri-components 1.2.12 → 1.2.13
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/bri-components.min.js +10 -10
- package/package.json +3 -3
- package/src/components/controls/BriControlInput.vue +9 -2
- package/src/components/controls/base/BriUpload/BriUpload.vue +19 -29
- package/src/components/controls/base/BriUpload/uploadList.vue +50 -45
- package/src/components/controls/base/DshCascader/DshCascader.vue +6 -7
- package/src/components/controls/base/DshCheckbox.vue +1 -2
- package/src/components/controls/base/DshCoordinates.vue +7 -15
- package/src/components/controls/controlMixin.js +5 -2
- package/src/components/controls/senior/BriLabels.vue +0 -1
- package/src/components/controls/senior/selectUsers/selectUsers.vue +18 -17
- package/src/components/list/BriFlatTable.vue +11 -3
- package/src/components/list/DshCascaderTable.vue +1 -0
- package/src/components/list/DshPage.vue +12 -14
- package/src/components/other/BriLoading.vue +2 -2
- package/src/components/small/DshTags.vue +21 -2
- package/src/styles/common/control.less +12 -24
- package/src/styles/components/controls/BriControlInput.less +4 -0
- package/src/styles/components/controls/base/BriUpload/BriUpload.less +2 -2
- package/src/styles/components/controls/base/DshInput.less +1 -1
- package/src/styles/components/controls/base/DshNumber.less +9 -14
- package/src/styles/components/controls/base/DshSelect.less +35 -24
- package/src/styles/components/list/BriFlatTable.less +71 -0
- package/src/styles/components/list/DshCascaderTable.less +22 -25
- package/src/styles/components/small/DshTags.less +1 -0
- package/src/styles/components/unit/DshUnit.less +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bri-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.13",
|
|
4
4
|
"author": "dengshanghui",
|
|
5
5
|
"description": "a component lib for vue project",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"axios": "^0.23.0",
|
|
34
34
|
"ali-oss": "^6.13.1",
|
|
35
|
-
"bri-datas": "
|
|
35
|
+
"bri-datas": "1.0.14",
|
|
36
36
|
"jshint": "^2.12.0",
|
|
37
37
|
"minio": "^7.0.26",
|
|
38
38
|
"stream": "^0.0.2",
|
|
39
|
-
"view-design": "
|
|
39
|
+
"view-design": "4.6.0",
|
|
40
40
|
"viewerjs": "^1.10.2",
|
|
41
41
|
"vue-codemirror": "^4.0.6",
|
|
42
42
|
"vue-cropperjs": "^4.1.0",
|
|
@@ -18,6 +18,14 @@
|
|
|
18
18
|
@delete="clickDeleteItem"
|
|
19
19
|
></dsh-tags>
|
|
20
20
|
|
|
21
|
+
<!-- 对象的 地理坐标 -->
|
|
22
|
+
<div
|
|
23
|
+
v-else-if="$dataType(value, 'object')"
|
|
24
|
+
class="text"
|
|
25
|
+
>
|
|
26
|
+
{{ value._name || value.name || value.lnglat }}
|
|
27
|
+
</div>
|
|
28
|
+
|
|
21
29
|
<!-- 文字的 -->
|
|
22
30
|
<div
|
|
23
31
|
v-else
|
|
@@ -53,13 +61,12 @@
|
|
|
53
61
|
<script>
|
|
54
62
|
export default {
|
|
55
63
|
name: "BriControlInput",
|
|
56
|
-
mixins: [],
|
|
57
64
|
props: {
|
|
58
65
|
canEdit: {
|
|
59
66
|
type: Boolean,
|
|
60
67
|
default: true
|
|
61
68
|
},
|
|
62
|
-
value: [Array, String],
|
|
69
|
+
value: [Array, Object, String],
|
|
63
70
|
inputIcon: String,
|
|
64
71
|
propsObj: {
|
|
65
72
|
type: Object,
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
v-else
|
|
11
11
|
:class="[
|
|
12
12
|
prefixCls,
|
|
13
|
-
'BriUpload',
|
|
14
13
|
`BriUpload-${showType}`,
|
|
15
14
|
{
|
|
15
|
+
'BriUpload': true,
|
|
16
16
|
'BriUpload-disabled': canEdit && !finalCanEdit,
|
|
17
17
|
'BriUpload-readonly': !canEdit,
|
|
18
18
|
'BriUpload-unit': !canEdit && isUnitShow
|
|
@@ -74,14 +74,12 @@
|
|
|
74
74
|
<!-- 列表 -->
|
|
75
75
|
<slot name="list">
|
|
76
76
|
<upload-list
|
|
77
|
-
v-if="showUploadList"
|
|
78
77
|
:canEdit="finalCanEdit"
|
|
79
78
|
:files="curValList"
|
|
80
79
|
:emptyShowVal="emptyShowVal"
|
|
81
80
|
:showType="showType"
|
|
82
81
|
:propsObj="propsObj"
|
|
83
|
-
@
|
|
84
|
-
@on-file-preview="clickPreviewItem"
|
|
82
|
+
@deleteItem="clickDeteItem"
|
|
85
83
|
></upload-list>
|
|
86
84
|
</slot>
|
|
87
85
|
</div>
|
|
@@ -105,10 +103,6 @@
|
|
|
105
103
|
uploadList
|
|
106
104
|
},
|
|
107
105
|
props: {
|
|
108
|
-
showUploadList: {
|
|
109
|
-
type: Boolean,
|
|
110
|
-
default: true
|
|
111
|
-
},
|
|
112
106
|
type: {
|
|
113
107
|
type: String,
|
|
114
108
|
default: "drag"
|
|
@@ -154,23 +148,24 @@
|
|
|
154
148
|
},
|
|
155
149
|
|
|
156
150
|
accept () {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
151
|
+
const documentType = ["txt", "doc", "xls", "ppt", "docx", "xlsx", "pptx", "pdf"];
|
|
152
|
+
const imageType = ["jpg", "png", "gif", "jpeg", "tiff", "swf"];
|
|
153
|
+
const videoType = ["flv", "rmvb", "mp4", "mvb"];
|
|
154
|
+
const audioType = ["wma", "mp3", "m4a"];
|
|
155
|
+
const packageType = ["rar", "zip"];
|
|
162
156
|
|
|
163
157
|
// 限制文件格式
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
158
|
+
return (
|
|
159
|
+
this.fileType === "image"
|
|
160
|
+
? imageType
|
|
161
|
+
: [
|
|
162
|
+
...documentType,
|
|
163
|
+
...imageType,
|
|
164
|
+
...videoType,
|
|
165
|
+
...audioType,
|
|
166
|
+
...packageType
|
|
167
|
+
]
|
|
168
|
+
).map(item => `.${item}`).join();
|
|
174
169
|
},
|
|
175
170
|
classes () {
|
|
176
171
|
return [
|
|
@@ -192,16 +187,11 @@
|
|
|
192
187
|
this.curValList.splice(this.curValList.indexOf(fileItem), 1);
|
|
193
188
|
this.curValList = [...this.curValList];
|
|
194
189
|
},
|
|
195
|
-
clickPreviewItem (fileItem) {
|
|
196
|
-
if (fileItem.status === "finished") {
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
190
|
successCb (res, data) {
|
|
201
191
|
if (data.res === 0) {
|
|
202
192
|
this.curValList = [
|
|
203
193
|
...this.curValList,
|
|
204
|
-
|
|
194
|
+
data.data
|
|
205
195
|
];
|
|
206
196
|
} else {
|
|
207
197
|
this.$Message.error({
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
>
|
|
6
6
|
<!-- 普通文本模式 -->
|
|
7
7
|
<template v-if="showType ==='old'">
|
|
8
|
+
<!-- 有值 -->
|
|
8
9
|
<div
|
|
9
|
-
v-if="files
|
|
10
|
-
class="uploadList-list"
|
|
10
|
+
v-if="files.length"
|
|
11
11
|
ref="viewerImage"
|
|
12
|
+
class="uploadList-list"
|
|
12
13
|
>
|
|
13
14
|
<div
|
|
14
15
|
v-for="fileItem in files"
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
</div>
|
|
53
54
|
</div>
|
|
54
55
|
|
|
56
|
+
<!-- 无值 -->
|
|
55
57
|
<div
|
|
56
58
|
v-else
|
|
57
59
|
class="uploadList-nodata"
|
|
@@ -63,8 +65,9 @@
|
|
|
63
65
|
|
|
64
66
|
<!-- 自定义新的展示方式 -->
|
|
65
67
|
<template v-else>
|
|
68
|
+
<!-- 有值 -->
|
|
66
69
|
<div
|
|
67
|
-
v-if="files
|
|
70
|
+
v-if="files.length"
|
|
68
71
|
ref="viewerImage"
|
|
69
72
|
class="uploadList-inline-list"
|
|
70
73
|
>
|
|
@@ -94,10 +97,13 @@
|
|
|
94
97
|
</div>
|
|
95
98
|
</div>
|
|
96
99
|
|
|
100
|
+
<!-- 无值 -->
|
|
97
101
|
<span
|
|
98
102
|
v-else
|
|
99
103
|
class="uploadList-inline-nodata"
|
|
100
|
-
>
|
|
104
|
+
>
|
|
105
|
+
{{ noText }}
|
|
106
|
+
</span>
|
|
101
107
|
</template>
|
|
102
108
|
</div>
|
|
103
109
|
</template>
|
|
@@ -138,7 +144,7 @@
|
|
|
138
144
|
name: "删除",
|
|
139
145
|
icon: "ios-trash-outline",
|
|
140
146
|
size: "16",
|
|
141
|
-
event: "
|
|
147
|
+
event: "clickDeleteItem",
|
|
142
148
|
canShow: this.canEdit
|
|
143
149
|
},
|
|
144
150
|
download: {
|
|
@@ -153,7 +159,7 @@
|
|
|
153
159
|
icon: "ios-eye-outline",
|
|
154
160
|
size: "22",
|
|
155
161
|
type: "updateColor",
|
|
156
|
-
event: "
|
|
162
|
+
event: "clickPreview",
|
|
157
163
|
canShow: undefined
|
|
158
164
|
}
|
|
159
165
|
};
|
|
@@ -182,16 +188,19 @@
|
|
|
182
188
|
return Object.keys(this.operationMap).filter(attr => this.operationMap[attr].canShow);
|
|
183
189
|
},
|
|
184
190
|
|
|
191
|
+
// 点击删除某项
|
|
192
|
+
clickDeleteItem (operationItem, fileItem) {
|
|
193
|
+
this.$emit("deleteItem", fileItem);
|
|
194
|
+
},
|
|
185
195
|
// 点击文件预览 -file服务器的数据列表
|
|
186
|
-
|
|
196
|
+
clickPreview (operationItem, fileItem) {
|
|
187
197
|
if (this.propsObj._fileType === "image") {
|
|
188
|
-
this.previewImage(
|
|
189
|
-
} else if (
|
|
190
|
-
this.previewImage(
|
|
198
|
+
this.previewImage(fileItem.url);
|
|
199
|
+
} else if (fileItem.mimetype.indexOf("image") > -1) {
|
|
200
|
+
this.previewImage(fileItem.url);
|
|
191
201
|
} else {
|
|
192
|
-
window.open(
|
|
202
|
+
window.open(fileItem.url);
|
|
193
203
|
}
|
|
194
|
-
this.$emit("on-file-preview", file);
|
|
195
204
|
},
|
|
196
205
|
// 图片预览
|
|
197
206
|
previewImage (src) {
|
|
@@ -212,58 +221,54 @@
|
|
|
212
221
|
viewer.show();
|
|
213
222
|
},
|
|
214
223
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
},
|
|
218
|
-
downloadFile (url, file) {
|
|
224
|
+
// 下载
|
|
225
|
+
handleDownload (operationItem, fileItem) {
|
|
219
226
|
axios
|
|
220
|
-
.get(url, {
|
|
227
|
+
.get(fileItem.url, {
|
|
221
228
|
responseType: "blob"
|
|
222
229
|
})
|
|
223
230
|
.then((res) => {
|
|
224
231
|
if (window.navigator.msSaveOrOpenBlob) {
|
|
225
232
|
// 兼容IE10
|
|
226
|
-
navigator.msSaveBlob(res,
|
|
233
|
+
navigator.msSaveBlob(res, fileItem.name);
|
|
227
234
|
} else {
|
|
228
235
|
const href = URL.createObjectURL(res.data); // 创建新的URL表示指定的blob对象
|
|
229
236
|
const a = document.createElement("a");
|
|
230
237
|
a.style.display = "none";
|
|
231
238
|
a.href = href; // 指定下载链接
|
|
232
|
-
a.download =
|
|
239
|
+
a.download = fileItem.name; // 指定下载文件名
|
|
233
240
|
a.click();
|
|
234
241
|
URL.revokeObjectURL(a.href); // 释放URL对象
|
|
235
242
|
a.remove();
|
|
236
243
|
}
|
|
237
244
|
});
|
|
238
245
|
},
|
|
239
|
-
handleRemove (operation, file) {
|
|
240
|
-
this.$emit("on-file-remove", file);
|
|
241
|
-
},
|
|
242
|
-
format (file) {
|
|
243
|
-
const format = file.name.split(".").pop().toLocaleLowerCase() || "";
|
|
244
|
-
let type = "ios-document-outline";
|
|
245
246
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
if (["mp4", "m3u8", "rmvb", "avi", "swf", "3gp", "mkv", "flv"].indexOf(format) > -1) {
|
|
250
|
-
type = "ios-film";
|
|
251
|
-
}
|
|
252
|
-
if (["mp3", "wav", "wma", "ogg", "aac", "flac"].indexOf(format) > -1) {
|
|
253
|
-
type = "ios-musical-notes";
|
|
254
|
-
}
|
|
255
|
-
if (["doc", "txt", "docx", "pages", "epub", "pdf"].indexOf(format) > -1) {
|
|
256
|
-
type = "md-document";
|
|
257
|
-
}
|
|
258
|
-
if (["numbers", "csv", "xls", "xlsx"].indexOf(format) > -1) {
|
|
259
|
-
type = "ios-stats";
|
|
260
|
-
}
|
|
261
|
-
if (["keynote", "ppt", "pptx"].indexOf(format) > -1) {
|
|
262
|
-
type = "ios-videocam";
|
|
263
|
-
}
|
|
247
|
+
// format (fileItem) {
|
|
248
|
+
// const format = fileItem.name.split(".").pop().toLocaleLowerCase() || "";
|
|
249
|
+
// let type = "ios-document-outline";
|
|
264
250
|
|
|
265
|
-
|
|
266
|
-
|
|
251
|
+
// if (["gif", "jpg", "jpeg", "png", "bmp", "webp"].indexOf(format) > -1) {
|
|
252
|
+
// type = "ios-image";
|
|
253
|
+
// }
|
|
254
|
+
// if (["mp4", "m3u8", "rmvb", "avi", "swf", "3gp", "mkv", "flv"].indexOf(format) > -1) {
|
|
255
|
+
// type = "ios-film";
|
|
256
|
+
// }
|
|
257
|
+
// if (["mp3", "wav", "wma", "ogg", "aac", "flac"].indexOf(format) > -1) {
|
|
258
|
+
// type = "ios-musical-notes";
|
|
259
|
+
// }
|
|
260
|
+
// if (["doc", "txt", "docx", "pages", "epub", "pdf"].indexOf(format) > -1) {
|
|
261
|
+
// type = "md-document";
|
|
262
|
+
// }
|
|
263
|
+
// if (["numbers", "csv", "xls", "xlsx"].indexOf(format) > -1) {
|
|
264
|
+
// type = "ios-stats";
|
|
265
|
+
// }
|
|
266
|
+
// if (["keynote", "ppt", "pptx"].indexOf(format) > -1) {
|
|
267
|
+
// type = "ios-videocam";
|
|
268
|
+
// }
|
|
269
|
+
|
|
270
|
+
// return type;
|
|
271
|
+
// },
|
|
267
272
|
// 获取不同类型文件的图片
|
|
268
273
|
getFileImage (item) {
|
|
269
274
|
if (!item.mimetype) {
|
|
@@ -77,15 +77,14 @@
|
|
|
77
77
|
:clearable="selfPropsObj._clearable"
|
|
78
78
|
:size="selfPropsObj._size"
|
|
79
79
|
:filterable="selfPropsObj._filterable"
|
|
80
|
+
:render-format="selfPropsObj._renderFormat"
|
|
80
81
|
:transfer="selfPropsObj._transfer"
|
|
81
82
|
:transfer-class-name="selfPropsObj._transferClassName"
|
|
82
83
|
:load-data="loadData"
|
|
83
84
|
@on-visible-change="visibleChange"
|
|
84
85
|
@on-change="changeVal"
|
|
85
86
|
@click.stop="clickCascader"
|
|
86
|
-
>
|
|
87
|
-
<slot></slot>
|
|
88
|
-
</Cascader>
|
|
87
|
+
></Cascader>
|
|
89
88
|
</template>
|
|
90
89
|
</template>
|
|
91
90
|
</template>
|
|
@@ -193,8 +192,10 @@
|
|
|
193
192
|
computed: {
|
|
194
193
|
selfPropsObj () {
|
|
195
194
|
return {
|
|
196
|
-
_filterable: true,
|
|
197
195
|
_showMode: false,
|
|
196
|
+
_changeOnSelect: false, // 每级菜单都可取值
|
|
197
|
+
_filterable: true,
|
|
198
|
+
_renderFormat: (label) => label.join(this.propsObj._joinSymbol || "/"),
|
|
198
199
|
_transfer: true,
|
|
199
200
|
...this.propsObj,
|
|
200
201
|
...this.commonDealPropsObj
|
|
@@ -347,9 +348,7 @@
|
|
|
347
348
|
// 默认方式的 -值改变
|
|
348
349
|
changeVal (val, ...params) {
|
|
349
350
|
if (this.isVisible || !val.length) {
|
|
350
|
-
this.
|
|
351
|
-
// 注:...params 参数不可去单独使用地区组件时调用
|
|
352
|
-
this.$emit("change", this.value[this.controlKey], ...params);
|
|
351
|
+
this.curValList = val;
|
|
353
352
|
}
|
|
354
353
|
}
|
|
355
354
|
},
|
|
@@ -175,9 +175,8 @@
|
|
|
175
175
|
},
|
|
176
176
|
created () {},
|
|
177
177
|
methods: {
|
|
178
|
-
//
|
|
178
|
+
// 下拉框的change (下拉方式时用v-model触发change有问题,组件进来如果值不为空的,就会v-model返值一次)
|
|
179
179
|
changeSelect (item) {
|
|
180
|
-
// 下拉方式时用v-model触发change有问题,组件进来如果值不为空的,就会v-model返值一次
|
|
181
180
|
if (this.curValList.includes(item.value)) {
|
|
182
181
|
let itemIndex = this.curValList.findIndex(valItem => valItem === item.value);
|
|
183
182
|
this.curValList.splice(itemIndex, 1);
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
'DshCoordinates-edit': true
|
|
15
15
|
}"
|
|
16
16
|
:canEdit="finalCanEdit"
|
|
17
|
-
:value="curVal
|
|
17
|
+
:value="curVal"
|
|
18
18
|
:inputIcon="inputIcon"
|
|
19
19
|
:propsObj="selfPropsObj"
|
|
20
20
|
@clear="clickClear"
|
|
@@ -219,14 +219,6 @@
|
|
|
219
219
|
this.change();
|
|
220
220
|
}
|
|
221
221
|
},
|
|
222
|
-
curLnglat: {
|
|
223
|
-
get () {
|
|
224
|
-
return this.curVal.lnglat || [];
|
|
225
|
-
},
|
|
226
|
-
set (val) {
|
|
227
|
-
this.curVal.lnglat = val;
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
222
|
showVal () {
|
|
231
223
|
return this.$isEmptyData(this.curVal)
|
|
232
224
|
? this.emptyShowVal
|
|
@@ -335,7 +327,7 @@
|
|
|
335
327
|
this.mouseTool.on("draw", this.handleMouseToolCallback);
|
|
336
328
|
// 设置默认坐标
|
|
337
329
|
if (!this.$isEmptyData(this.newVal)) {
|
|
338
|
-
this.handleAddMarker(this.
|
|
330
|
+
this.handleAddMarker(this.newVal.lnglat, true);
|
|
339
331
|
|
|
340
332
|
if (this.showType === "multipleMarker") { // 多选打开绘图功能
|
|
341
333
|
this.finalCanEdit && this.handleOpenDraw();
|
|
@@ -358,13 +350,13 @@
|
|
|
358
350
|
}
|
|
359
351
|
// 设置坐标
|
|
360
352
|
let lnglat = e.obj.getPosition();
|
|
361
|
-
this.
|
|
353
|
+
this.newVal.lnglat.push([lnglat.lng, lnglat.lat]);
|
|
362
354
|
this.getRegeoCode();
|
|
363
355
|
|
|
364
356
|
} else {
|
|
365
357
|
this.plot = e.obj;
|
|
366
358
|
// 设置坐标
|
|
367
|
-
this.
|
|
359
|
+
this.newVal.lnglat.push(...e.obj.getPath().map(lnglat => [lnglat.lng, lnglat.lat]));
|
|
368
360
|
this.getRegeoCode();
|
|
369
361
|
this.handleCloseDraw();
|
|
370
362
|
}
|
|
@@ -434,10 +426,10 @@
|
|
|
434
426
|
if (this.showType === "marker") {
|
|
435
427
|
this.handleRmoveMarker();
|
|
436
428
|
this.handleCloseDraw();
|
|
437
|
-
this.
|
|
429
|
+
this.newVal.lnglat = [location];
|
|
438
430
|
this.getRegeoCode();
|
|
439
431
|
} else if (this.showType === "multipleMarker") {
|
|
440
|
-
this.
|
|
432
|
+
this.newVal.lnglat.push(location);
|
|
441
433
|
this.getRegeoCode();
|
|
442
434
|
}
|
|
443
435
|
centerView && this.map.setFitView(this.marker);
|
|
@@ -471,7 +463,7 @@
|
|
|
471
463
|
getRegeoCode (value, scuessFun) {
|
|
472
464
|
let params = {
|
|
473
465
|
key: window.config.amapKey,
|
|
474
|
-
location: this.
|
|
466
|
+
location: this.newVal.lnglat[0],
|
|
475
467
|
radius: 1000,
|
|
476
468
|
extensions: "base",
|
|
477
469
|
batch: false,
|
|
@@ -50,10 +50,10 @@ export default {
|
|
|
50
50
|
// 值为[]类型用的
|
|
51
51
|
curValList: {
|
|
52
52
|
get () {
|
|
53
|
-
return
|
|
53
|
+
return this.value[this.controlKey] || [];
|
|
54
54
|
},
|
|
55
55
|
set (val) {
|
|
56
|
-
this.value
|
|
56
|
+
this.$set(this.value, this.controlKey, val);
|
|
57
57
|
this.change();
|
|
58
58
|
}
|
|
59
59
|
},
|
|
@@ -142,6 +142,9 @@ export default {
|
|
|
142
142
|
},
|
|
143
143
|
entityKey () {
|
|
144
144
|
return this.propsObj.entityKey;
|
|
145
|
+
},
|
|
146
|
+
modKey () {
|
|
147
|
+
return this.propsObj.modKey;
|
|
145
148
|
}
|
|
146
149
|
},
|
|
147
150
|
methods: {
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
<div class="content">
|
|
74
74
|
<!-- 左 部门 -->
|
|
75
75
|
<department-menu
|
|
76
|
+
v-if="showModal"
|
|
76
77
|
class="content-menu"
|
|
77
78
|
:canEdit="false"
|
|
78
79
|
:list="departmentList"
|
|
@@ -288,7 +289,23 @@
|
|
|
288
289
|
closeModal () {
|
|
289
290
|
this.showModal = false;
|
|
290
291
|
},
|
|
291
|
-
|
|
292
|
+
|
|
293
|
+
clickInput () {
|
|
294
|
+
if (this.finalCanEdit) {
|
|
295
|
+
this.openModal();
|
|
296
|
+
this.newValList = this.$deepCopy(this.curValList);
|
|
297
|
+
this.initModal();
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
clickDeleteItem (deleteItem) {
|
|
301
|
+
this.curValList = this.curValList.filter(item => item._key !== deleteItem._key);
|
|
302
|
+
},
|
|
303
|
+
clickClear () {
|
|
304
|
+
this.curValList = [];
|
|
305
|
+
},
|
|
306
|
+
|
|
307
|
+
/* ---------- 弹框里 --------- */
|
|
308
|
+
initModal () {
|
|
292
309
|
this.searchData = {
|
|
293
310
|
name: ""
|
|
294
311
|
};
|
|
@@ -297,7 +314,6 @@
|
|
|
297
314
|
this.getUserListData();
|
|
298
315
|
this.getDepartmentListData();
|
|
299
316
|
},
|
|
300
|
-
|
|
301
317
|
search () {
|
|
302
318
|
this.pagePropsObj.page = 1;
|
|
303
319
|
this.getUserListData();
|
|
@@ -314,21 +330,6 @@
|
|
|
314
330
|
this.getUserListData();
|
|
315
331
|
}
|
|
316
332
|
},
|
|
317
|
-
clickInput () {
|
|
318
|
-
if (this.finalCanEdit) {
|
|
319
|
-
this.openModal();
|
|
320
|
-
this.newValList = this.$deepCopy(this.curValList);
|
|
321
|
-
this.init();
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
clickDeleteItem (deleteItem) {
|
|
325
|
-
this.curValList = this.curValList.filter(item => item._key !== deleteItem._key);
|
|
326
|
-
},
|
|
327
|
-
clickClear () {
|
|
328
|
-
this.curValList = [];
|
|
329
|
-
},
|
|
330
|
-
|
|
331
|
-
/* ---------- 弹框里 --------- */
|
|
332
333
|
clickCheckAll () {
|
|
333
334
|
if (this.curCheckAll) {
|
|
334
335
|
this.newValList = this.newValList.filter(newItem =>
|
|
@@ -237,18 +237,26 @@
|
|
|
237
237
|
},
|
|
238
238
|
renderHeaderCell: ({ column }, h) => {
|
|
239
239
|
return h("span", [
|
|
240
|
-
column._required && h("i", {
|
|
240
|
+
column._required && h("i", {
|
|
241
|
+
style: {
|
|
242
|
+
color: "#ed4014"
|
|
243
|
+
}
|
|
244
|
+
}, "*"),
|
|
241
245
|
h("span", column.title),
|
|
242
246
|
column._description &&
|
|
243
247
|
h("Tooltip", {
|
|
244
|
-
style: {
|
|
248
|
+
style: {
|
|
249
|
+
display: "inline-block"
|
|
250
|
+
},
|
|
245
251
|
props: {
|
|
246
252
|
content: column._description,
|
|
247
253
|
transfer: true,
|
|
248
254
|
maxWidth: 200
|
|
249
255
|
},
|
|
250
256
|
scopedSlots: {
|
|
251
|
-
default: props => h("i", {
|
|
257
|
+
default: props => h("i", {
|
|
258
|
+
class: "table-head-description ivu-icon bico-font bico-explain"
|
|
259
|
+
})
|
|
252
260
|
}
|
|
253
261
|
})
|
|
254
262
|
]);
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
mode: {
|
|
30
30
|
type: String,
|
|
31
31
|
default: "small",
|
|
32
|
-
validator
|
|
32
|
+
validator (value) {
|
|
33
33
|
return ["simple", "default", "small"].indexOf(value) !== -1;
|
|
34
34
|
}
|
|
35
35
|
},
|
|
@@ -49,34 +49,32 @@
|
|
|
49
49
|
},
|
|
50
50
|
computed: {
|
|
51
51
|
obj () {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
obj = {
|
|
52
|
+
const modeMap = {
|
|
53
|
+
default: {
|
|
55
54
|
showTotal: true,
|
|
56
55
|
showElevator: false,
|
|
57
56
|
showSizer: true
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
obj = {
|
|
57
|
+
},
|
|
58
|
+
small: {
|
|
61
59
|
showTotal: true,
|
|
62
60
|
showElevator: false,
|
|
63
61
|
showSizer: true
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
obj = {
|
|
62
|
+
},
|
|
63
|
+
simple: {
|
|
67
64
|
// // 简洁分页不能使用总数、电梯和切换数量
|
|
68
65
|
// showTotal: true,
|
|
69
66
|
// showElevator: false,
|
|
70
67
|
// showSizer: false
|
|
71
|
-
}
|
|
72
|
-
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
73
71
|
return {
|
|
74
72
|
page: 1,
|
|
75
73
|
pagesize: 10,
|
|
76
|
-
pagesizeOpts: [10,
|
|
74
|
+
pagesizeOpts: [10, 15, 20, 30, 40, 50],
|
|
77
75
|
transfer: false,
|
|
78
76
|
placement: "bottom",
|
|
79
|
-
...
|
|
77
|
+
...(modeMap[this.mode] || {}),
|
|
80
78
|
...this.propsObj
|
|
81
79
|
};
|
|
82
80
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
v-if="value"
|
|
4
|
-
class="BriLoading"
|
|
5
4
|
:class="{
|
|
5
|
+
BriLoading: true,
|
|
6
6
|
'BriLoading-fix': fix,
|
|
7
7
|
'BriLoading-center': center
|
|
8
8
|
}"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
|
-
<template v-else-if="value
|
|
26
|
+
<template v-else-if="value === 2">
|
|
27
27
|
<bri-svg :src="imgSrc" />
|
|
28
28
|
<div
|
|
29
29
|
v-if="noText"
|