bri-components 1.2.3 → 1.2.5
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/8.bri-components.min.js +1 -1
- package/lib/9.bri-components.min.js +1 -1
- package/lib/bri-components.min.js +6 -6
- package/package.json +1 -1
- package/src/components/controls/base/BriUpload/uploadMixin.js +16 -4
- package/src/components/controls/base/DshCascader/DshCascader.vue +2 -1
- package/src/components/controls/base/DshCheckbox.vue +49 -44
- package/src/components/controls/base/DshCoordinates.vue +38 -25
- package/src/components/controls/base/DshDate.vue +2 -2
- package/src/components/controls/base/DshEditor.vue +4 -4
- package/src/components/controls/base/DshInput.vue +3 -3
- package/src/components/controls/base/DshNumber/BriInputNumber/BriInputNumber.vue +27 -29
- package/src/components/controls/base/DshNumber/DshNumber.vue +15 -19
- package/src/components/controls/base/DshSelect.vue +121 -123
- package/src/components/controls/base/DshSwitch.vue +6 -5
- package/src/components/controls/controlMixin.js +4 -1
- package/src/components/controls/senior/BriLabels.vue +2 -1
- package/src/components/controls/senior/selectDepartments.vue +2 -1
- package/src/components/controls/senior/selectUsers/selectUsers.vue +77 -95
- package/src/components/list/BriTreeItem.vue +2 -2
- package/src/components/list/DshBox/DshPanel.vue +6 -6
- package/src/components/small/BriDrawer.vue +1 -1
- package/src/components/small/DshModal.vue +1 -1
- package/src/components/small/DshTags.vue +2 -4
- package/src/index.js +6 -0
- package/src/styles/common/control.less +5 -3
- package/src/styles/components/controls/base/DshCascader/DshCascader.less +1 -1
- package/src/styles/components/controls/base/DshNumber.less +0 -8
- package/src/styles/components/controls/base/DshSelect.less +0 -19
- package/src/styles/components/controls/senior/BriLabels.less +1 -1
- package/src/styles/components/controls/senior/selectDepartments.less +1 -1
- package/src/styles/components/controls/senior/selectUsers/selectUsers.less +1 -1
- package/src/styles/components/list/DshBox/DshPanel.less +2 -2
- package/src/styles/components/small/DshDropdown.less +1 -1
|
@@ -1,118 +1,104 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="DshSelect">
|
|
3
|
-
<!-- optionKind值 'flat'、'dropdown' -->
|
|
4
3
|
<template v-if="canEdit">
|
|
5
4
|
<!-- 平铺 -->
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</Radio>
|
|
5
|
+
<template v-if="['flat', 'button'].includes(showType)">
|
|
6
|
+
<RadioGroup
|
|
7
|
+
:class="{
|
|
8
|
+
'DshSelect-radioGroup': true,
|
|
9
|
+
'DshSelect-radioGroup-useColor': selfPropsObj._useColor,
|
|
10
|
+
'DshSelect-radioGroup-scroll': selfPropsObj._span < 24 && !selfPropsObj._br
|
|
11
|
+
}"
|
|
12
|
+
v-model="value[controlKey]"
|
|
13
|
+
:type="radioGroupType"
|
|
14
|
+
@on-change="change"
|
|
15
|
+
>
|
|
16
|
+
<template v-if="listData.length">
|
|
17
|
+
<Radio
|
|
18
|
+
v-for="(item, index) in listData"
|
|
19
|
+
:key="index"
|
|
20
|
+
:class="getItemColorClass(item)"
|
|
21
|
+
:style="getItemStyle(item)"
|
|
22
|
+
:label="item._key"
|
|
23
|
+
:disabled="getItemDisabled(item)"
|
|
24
|
+
:border="useColor"
|
|
25
|
+
@click.native="cancelSelect(item)"
|
|
26
|
+
>
|
|
27
|
+
<span @click.stop="clickOpenTip(item)">
|
|
28
|
+
{{ item.name || item._name }}
|
|
29
|
+
</span>
|
|
30
|
+
</Radio>
|
|
31
|
+
|
|
32
|
+
</template>
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
<div
|
|
35
|
+
v-else
|
|
36
|
+
class="dsh-subtip"
|
|
37
|
+
style="backgroundColor: #f3f3f3;"
|
|
38
|
+
>-- 无选择项 --</div>
|
|
39
|
+
</RadioGroup>
|
|
37
40
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
style="backgroundColor: #f3f3f3;"
|
|
42
|
-
>-- 无选择项 --</div>
|
|
43
|
-
</RadioGroup>
|
|
41
|
+
<!-- tip项弹框提示 -->
|
|
42
|
+
<dsh-render :render="tipModalRender"></dsh-render>
|
|
43
|
+
</template>
|
|
44
44
|
|
|
45
45
|
<!-- 下拉 -->
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
>
|
|
59
|
-
<!-- </Option>必须和输出内容在一行,否则出现空格导致_filterable出bug -->
|
|
60
|
-
<Option
|
|
61
|
-
v-for="(item, index) in listData"
|
|
62
|
-
:key="index"
|
|
63
|
-
:value="item._key"
|
|
64
|
-
:disabled="item._disabled || !finalCanEdit"
|
|
46
|
+
<template v-else>
|
|
47
|
+
<Select
|
|
48
|
+
v-model="curVal"
|
|
49
|
+
:placeholder="selfPropsObj._placeholder"
|
|
50
|
+
:multiple="selfPropsObj._multiple"
|
|
51
|
+
:disabled="!finalCanEdit"
|
|
52
|
+
:clearable="selfPropsObj._clearable"
|
|
53
|
+
:filterable="selfPropsObj._filterable"
|
|
54
|
+
:size="selfPropsObj._size"
|
|
55
|
+
:transfer="selfPropsObj._transfer"
|
|
56
|
+
:transfer-class-name="selfPropsObj._transferClassName"
|
|
57
|
+
@on-change="change"
|
|
65
58
|
>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
:
|
|
70
|
-
:
|
|
71
|
-
:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
59
|
+
<!-- </Option>必须和输出内容在一行,否则出现空格导致_filterable出bug -->
|
|
60
|
+
<Option
|
|
61
|
+
v-for="(item, index) in listData"
|
|
62
|
+
:key="index"
|
|
63
|
+
:value="item._key"
|
|
64
|
+
:label="item.name || item._name"
|
|
65
|
+
:disabled="getItemDisabled(item)"
|
|
66
|
+
>
|
|
67
|
+
<Icon
|
|
68
|
+
v-if="item.icon || item.customIcon"
|
|
69
|
+
:type="item.icon"
|
|
70
|
+
:custom="item.customIcon ? `bico-font ${item.customIcon}` : undefined"
|
|
71
|
+
:color="item.color"
|
|
72
|
+
:size="item.size || 20"
|
|
73
|
+
/>{{ item.name || item._name }}
|
|
74
|
+
</Option>
|
|
75
|
+
</Select>
|
|
76
|
+
</template>
|
|
75
77
|
</template>
|
|
76
78
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<div
|
|
85
|
-
v-if="curSelectItem"
|
|
86
|
-
class="DshSelect-value-wrapper"
|
|
87
|
-
:style="{
|
|
88
|
-
justifyContent: showAlign
|
|
89
|
-
}"
|
|
79
|
+
<!-- 查看 -->
|
|
80
|
+
<template v-else>
|
|
81
|
+
<bri-tooltip
|
|
82
|
+
:content="showVal"
|
|
83
|
+
maxWidth="200"
|
|
84
|
+
placement="top"
|
|
85
|
+
:transfer="true"
|
|
90
86
|
>
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<div
|
|
100
|
-
v-else
|
|
101
|
-
class="bri-control-nodata dsh-ellipsis"
|
|
102
|
-
>
|
|
103
|
-
{{ emptyShowVal }}
|
|
104
|
-
</div>
|
|
105
|
-
</bri-tooltip>
|
|
106
|
-
|
|
107
|
-
<!-- tip项弹框提示 -->
|
|
108
|
-
<dsh-render :render="tipModalRender"></dsh-render>
|
|
87
|
+
<div :class="{
|
|
88
|
+
...commonClass,
|
|
89
|
+
'DshSelect-show': true
|
|
90
|
+
}">
|
|
91
|
+
{{ showVal }}
|
|
92
|
+
</div>
|
|
93
|
+
</bri-tooltip>
|
|
94
|
+
</template>
|
|
109
95
|
</div>
|
|
110
96
|
</template>
|
|
111
97
|
|
|
112
98
|
<script>
|
|
113
|
-
import { resourceData } from "bri-datas";
|
|
114
99
|
import controlMixin from "../controlMixin.js";
|
|
115
100
|
import selectMixin from "./selectMixin.js";
|
|
101
|
+
import { resourceData } from "bri-datas";
|
|
116
102
|
|
|
117
103
|
export default {
|
|
118
104
|
name: "DshSelect",
|
|
@@ -123,23 +109,15 @@
|
|
|
123
109
|
props: {},
|
|
124
110
|
data () {
|
|
125
111
|
return {
|
|
126
|
-
flag: false
|
|
127
|
-
initListData: [],
|
|
128
|
-
getBgColor: color => {
|
|
129
|
-
let curColor = this.colorMap[color] || this.colorMap["color-1"];
|
|
130
|
-
return this.$getColor(curColor, 0.1);
|
|
131
|
-
},
|
|
132
|
-
getColor: color => {
|
|
133
|
-
return this.colorMap[color] || this.colorMap["color-1"];
|
|
134
|
-
},
|
|
135
|
-
getColorClass: color => {
|
|
136
|
-
return this.colorMap[color] ? color : "color-1";
|
|
137
|
-
}
|
|
112
|
+
flag: false
|
|
138
113
|
};
|
|
139
114
|
},
|
|
140
115
|
computed: {
|
|
141
116
|
selfPropsObj () {
|
|
142
117
|
return {
|
|
118
|
+
_optionKind: "dropdown", // 'flat'、'dropdown'
|
|
119
|
+
_useColor: false,
|
|
120
|
+
colorMap: resourceData.colorMap,
|
|
143
121
|
_filterable: true,
|
|
144
122
|
_transfer: true,
|
|
145
123
|
_data: [],
|
|
@@ -154,25 +132,30 @@
|
|
|
154
132
|
radioGroupType () {
|
|
155
133
|
return this.showType === "button" ? "button" : undefined;
|
|
156
134
|
},
|
|
135
|
+
useColor () {
|
|
136
|
+
return this.selfPropsObj._useColor;
|
|
137
|
+
},
|
|
157
138
|
colorMap () {
|
|
158
|
-
return this.selfPropsObj.colorMap
|
|
139
|
+
return this.selfPropsObj.colorMap;
|
|
159
140
|
},
|
|
160
141
|
|
|
161
142
|
listData () {
|
|
162
|
-
const listData =
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
143
|
+
const listData = this.selfPropsObj._data.concat(this.initListData);
|
|
144
|
+
|
|
145
|
+
return this.$dataType(this.selfPropsObj._filterFunc, "function")
|
|
146
|
+
? this.selfPropsObj._filterFunc(listData, this.selfPropsObj, this.value)
|
|
147
|
+
: listData;
|
|
168
148
|
},
|
|
169
|
-
|
|
170
|
-
return this.listData.find(item => item._key === this.
|
|
149
|
+
curValObj () {
|
|
150
|
+
return this.listData.find(item => item._key === this.curVal) || {
|
|
151
|
+
_key: this.curVal,
|
|
152
|
+
name: `温馨提示:选项${this.curVal}已找不到`
|
|
153
|
+
};
|
|
171
154
|
},
|
|
172
155
|
showVal () {
|
|
173
|
-
return this.
|
|
174
|
-
? this.
|
|
175
|
-
:
|
|
156
|
+
return this.$isEmptyData(this.curValList)
|
|
157
|
+
? this.emptyShowVal
|
|
158
|
+
: this.curValObj.name || this.curValObj._name;
|
|
176
159
|
}
|
|
177
160
|
},
|
|
178
161
|
created () {
|
|
@@ -207,7 +190,7 @@
|
|
|
207
190
|
// 取消flat模式的选择项
|
|
208
191
|
cancelSelect (item) {
|
|
209
192
|
if (item._disabled !== true && this.selfPropsObj._clearable !== false) {
|
|
210
|
-
if (item._key === this.
|
|
193
|
+
if (item._key === this.curVal) {
|
|
211
194
|
this.value[this.controlKey] = "";
|
|
212
195
|
|
|
213
196
|
this.change();
|
|
@@ -222,7 +205,22 @@
|
|
|
222
205
|
this.value[this.controlKey] = "";
|
|
223
206
|
}
|
|
224
207
|
|
|
225
|
-
this.$emit("change", this.
|
|
208
|
+
this.$emit("change", this.curVal);
|
|
209
|
+
},
|
|
210
|
+
|
|
211
|
+
getItemColorClass (item) {
|
|
212
|
+
return this.colorMap[item.color] ? item.color : "color-1";
|
|
213
|
+
},
|
|
214
|
+
getItemStyle (item) {
|
|
215
|
+
const color = this.colorMap[item.color] || this.colorMap["color-1"];
|
|
216
|
+
return {
|
|
217
|
+
background: this.useColor ? this.$getColor(color, 0.1) : undefined,
|
|
218
|
+
color: this.useColor ? color : undefined
|
|
219
|
+
};
|
|
220
|
+
},
|
|
221
|
+
// 获取某项的置灰状态
|
|
222
|
+
getItemDisabled (item) {
|
|
223
|
+
return !!(!this.finalCanEdit || item._disabled);
|
|
226
224
|
}
|
|
227
225
|
}
|
|
228
226
|
};
|
|
@@ -20,17 +20,18 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
22
|
<!-- 查看 -->
|
|
23
|
-
<span
|
|
23
|
+
<span
|
|
24
|
+
v-else
|
|
24
25
|
:class="{
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
...commonClass,
|
|
27
|
+
'DshSwitch-show': true
|
|
27
28
|
}"
|
|
28
29
|
:style="{
|
|
29
30
|
background: curVal ? '#d3f3dcff' : '#FDEDED',
|
|
30
31
|
color: curVal ? '#37C45E' : '#E83636'
|
|
31
32
|
}"
|
|
32
33
|
>
|
|
33
|
-
{{
|
|
34
|
+
{{ showVal }}
|
|
34
35
|
</span>
|
|
35
36
|
</div>
|
|
36
37
|
</template>
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
return {};
|
|
48
49
|
},
|
|
49
50
|
computed: {
|
|
50
|
-
|
|
51
|
+
showVal () {
|
|
51
52
|
return this.value[this.controlKey]
|
|
52
53
|
? this.propsObj._openText
|
|
53
54
|
: this.propsObj._closeText;
|
|
@@ -63,7 +63,7 @@ export default {
|
|
|
63
63
|
? "--"
|
|
64
64
|
: "暂无内容";
|
|
65
65
|
},
|
|
66
|
-
|
|
66
|
+
showVal () {
|
|
67
67
|
return this.$isEmptyData(this.curVal) ? this.emptyShowVal : this.curVal;
|
|
68
68
|
},
|
|
69
69
|
|
|
@@ -85,6 +85,9 @@ export default {
|
|
|
85
85
|
isUnitShow () {
|
|
86
86
|
return !this.canEdit && this.inTable;
|
|
87
87
|
},
|
|
88
|
+
multipleMode () {
|
|
89
|
+
return !!this.propsObj._multiple;
|
|
90
|
+
},
|
|
88
91
|
commonDealPropsObj () {
|
|
89
92
|
const selectControlTypes = ["date", "switch", "select", "checkbox", "file", "region", "regions", "cascader", "cascaders", "coordinates", "users", "departments"];
|
|
90
93
|
return {
|
|
@@ -6,66 +6,70 @@
|
|
|
6
6
|
:transfer="true"
|
|
7
7
|
maxWidth="200"
|
|
8
8
|
>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@mouseleave="isHover = false"
|
|
18
|
-
@click="clickInput"
|
|
19
|
-
>
|
|
20
|
-
<!-- 有值 -->
|
|
21
|
-
<template v-if="!$isEmptyData(curValList)">
|
|
22
|
-
<dsh-tags
|
|
23
|
-
class="text"
|
|
24
|
-
:list="curValList"
|
|
25
|
-
:propsObj="{
|
|
26
|
-
disabled: !finalCanEdit
|
|
9
|
+
<div @click.stop="clickInput">
|
|
10
|
+
<slot>
|
|
11
|
+
<!-- 编辑 -->
|
|
12
|
+
<div
|
|
13
|
+
v-if="canEdit"
|
|
14
|
+
:class="{
|
|
15
|
+
...commonClass,
|
|
16
|
+
'selectUsers-edit': true
|
|
27
17
|
}"
|
|
28
|
-
@
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
@mouseenter="isHover = true"
|
|
19
|
+
@mouseleave="isHover = false"
|
|
20
|
+
>
|
|
21
|
+
<!-- 有值 -->
|
|
22
|
+
<template v-if="!$isEmptyData(curValList)">
|
|
23
|
+
<dsh-tags
|
|
24
|
+
class="text"
|
|
25
|
+
:list="curValList"
|
|
26
|
+
:propsObj="{
|
|
27
|
+
disabled: !finalCanEdit,
|
|
28
|
+
closable: true
|
|
29
|
+
}"
|
|
30
|
+
@delete="clickDeleteItem"
|
|
31
|
+
></dsh-tags>
|
|
32
|
+
</template>
|
|
33
|
+
<!-- 无值 -->
|
|
34
|
+
<template v-else>
|
|
35
|
+
{{ emptyShowVal }}
|
|
36
|
+
</template>
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
38
|
+
<!-- 图标 -->
|
|
39
|
+
<template>
|
|
40
|
+
<Icon
|
|
41
|
+
v-if="!$isEmptyData(curValList) && selfPropsObj._clearable && isHover"
|
|
42
|
+
class="icon-close"
|
|
43
|
+
type="ios-close-circle"
|
|
44
|
+
@click.stop="clickClear"
|
|
45
|
+
/>
|
|
46
|
+
<Icon
|
|
47
|
+
v-else
|
|
48
|
+
class="icon-default"
|
|
49
|
+
:type="inputIcon"
|
|
50
|
+
/>
|
|
51
|
+
</template>
|
|
52
|
+
</div>
|
|
51
53
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
54
|
+
<!-- 查看 -->
|
|
55
|
+
<div
|
|
56
|
+
v-else
|
|
57
|
+
:class="{
|
|
58
|
+
...commonClass,
|
|
59
|
+
'selectUsers-show': true
|
|
60
|
+
}"
|
|
61
|
+
>
|
|
62
|
+
<dsh-tags
|
|
63
|
+
v-if="!$isEmptyData(curValList)"
|
|
64
|
+
class="text"
|
|
65
|
+
:list="curValList"
|
|
66
|
+
></dsh-tags>
|
|
65
67
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
<template v-else>
|
|
69
|
+
{{ emptyShowVal }}
|
|
70
|
+
</template>
|
|
71
|
+
</div>
|
|
72
|
+
</slot>
|
|
69
73
|
</div>
|
|
70
74
|
</bri-tooltip>
|
|
71
75
|
|
|
@@ -192,7 +196,7 @@
|
|
|
192
196
|
<!-- footer -->
|
|
193
197
|
<div class="selectUsers-modal-wrap-footer">
|
|
194
198
|
<dsh-buttons
|
|
195
|
-
:list="$getOperationList(['
|
|
199
|
+
:list="$getOperationList(['canCancel', 'canConfirm'])"
|
|
196
200
|
@click="$dispatchEvent($event)"
|
|
197
201
|
></dsh-buttons>
|
|
198
202
|
</div>
|
|
@@ -212,9 +216,7 @@
|
|
|
212
216
|
components: {
|
|
213
217
|
departmentMenu
|
|
214
218
|
},
|
|
215
|
-
props: {
|
|
216
|
-
showSelectUserModalOnly: Boolean
|
|
217
|
-
},
|
|
219
|
+
props: {},
|
|
218
220
|
data () {
|
|
219
221
|
return {
|
|
220
222
|
isHover: false,
|
|
@@ -260,16 +262,16 @@
|
|
|
260
262
|
},
|
|
261
263
|
|
|
262
264
|
operationMap: {
|
|
263
|
-
|
|
265
|
+
canCancel: {
|
|
264
266
|
name: "取消",
|
|
265
|
-
type: "
|
|
267
|
+
type: "canCancel",
|
|
266
268
|
btnType: "cancel",
|
|
267
269
|
event: "clickCancel"
|
|
268
270
|
},
|
|
269
|
-
|
|
271
|
+
canConfirm: {
|
|
270
272
|
name: "完成",
|
|
273
|
+
type: "canConfirm",
|
|
271
274
|
btnType: "primary",
|
|
272
|
-
type: "clickConfirm",
|
|
273
275
|
event: "clickConfirm"
|
|
274
276
|
}
|
|
275
277
|
}
|
|
@@ -296,19 +298,10 @@
|
|
|
296
298
|
return this.multiple ? "ios-people" : "ios-person";
|
|
297
299
|
},
|
|
298
300
|
|
|
299
|
-
// 审签单定制需求使用字段
|
|
300
|
-
transmit_type () {
|
|
301
|
-
return this.selfPropsObj.transmit_type;
|
|
302
|
-
},
|
|
303
|
-
current_step_sp_user_key () {
|
|
304
|
-
return this.selfPropsObj.current_step_sp_user_key;
|
|
305
|
-
},
|
|
306
|
-
stepKey () {
|
|
307
|
-
return this.selfPropsObj.stepKey;
|
|
308
|
-
},
|
|
309
|
-
|
|
310
301
|
curCheckAll () {
|
|
311
|
-
return this.userList.
|
|
302
|
+
return this.userList.length && this.userList.every(userItem =>
|
|
303
|
+
this.newValList.some(newItem => newItem._key === userItem._key)
|
|
304
|
+
);
|
|
312
305
|
},
|
|
313
306
|
showVal () {
|
|
314
307
|
return this.$isEmptyData(this.curValList)
|
|
@@ -331,13 +324,13 @@
|
|
|
331
324
|
};
|
|
332
325
|
this.curDepartment = {};
|
|
333
326
|
this.pagePropsObj.page = 1;
|
|
334
|
-
this.
|
|
335
|
-
this.
|
|
327
|
+
this.getUserListData();
|
|
328
|
+
this.getDepartmentListData();
|
|
336
329
|
},
|
|
337
330
|
|
|
338
331
|
search () {
|
|
339
332
|
this.pagePropsObj.page = 1;
|
|
340
|
-
this.
|
|
333
|
+
this.getUserListData();
|
|
341
334
|
},
|
|
342
335
|
// 选择部门
|
|
343
336
|
changeDepartment (departmentItem) {
|
|
@@ -348,7 +341,7 @@
|
|
|
348
341
|
this.userList = this.hightUsers;
|
|
349
342
|
this.total = 1;
|
|
350
343
|
} else {
|
|
351
|
-
this.
|
|
344
|
+
this.getUserListData();
|
|
352
345
|
}
|
|
353
346
|
},
|
|
354
347
|
clickInput () {
|
|
@@ -374,7 +367,7 @@
|
|
|
374
367
|
} else {
|
|
375
368
|
this.newValList = [
|
|
376
369
|
...this.newValList,
|
|
377
|
-
this.userList.filter(userItem =>
|
|
370
|
+
...this.userList.filter(userItem =>
|
|
378
371
|
!this.newValList.some(newItem => newItem._key === userItem._key)
|
|
379
372
|
)
|
|
380
373
|
];
|
|
@@ -400,10 +393,11 @@
|
|
|
400
393
|
clickConfirm () {
|
|
401
394
|
this.closeModal();
|
|
402
395
|
this.curValList = this.newValList;
|
|
396
|
+
this.curDepartment = {};
|
|
403
397
|
},
|
|
404
398
|
|
|
405
399
|
/* ----------- 接口方法 ------------- */
|
|
406
|
-
|
|
400
|
+
getUserListData () {
|
|
407
401
|
this.loading = true;
|
|
408
402
|
this.userList = [];
|
|
409
403
|
let searchName = this.searchData.name;
|
|
@@ -423,9 +417,6 @@
|
|
|
423
417
|
params: {
|
|
424
418
|
search: search,
|
|
425
419
|
department: this.curDepartment._key,
|
|
426
|
-
transmit_type: this.transmit_type,
|
|
427
|
-
current_step_sp_user_key: this.current_step_sp_user_key,
|
|
428
|
-
stepKey: this.stepKey,
|
|
429
420
|
pagination: {
|
|
430
421
|
page: this.pagePropsObj.page,
|
|
431
422
|
pagesize: this.pagePropsObj.pagesize
|
|
@@ -438,16 +429,13 @@
|
|
|
438
429
|
}
|
|
439
430
|
});
|
|
440
431
|
},
|
|
441
|
-
|
|
432
|
+
getDepartmentListData () {
|
|
442
433
|
this.$https({
|
|
443
434
|
url: {
|
|
444
435
|
module: "company",
|
|
445
436
|
name: "compDepartCascaderAll"
|
|
446
437
|
},
|
|
447
438
|
params: {
|
|
448
|
-
transmit_type: this.transmit_type,
|
|
449
|
-
current_step_sp_user_key: this.current_step_sp_user_key,
|
|
450
|
-
stepKey: this.stepKey,
|
|
451
439
|
searchString: this.propsObj.searchString
|
|
452
440
|
},
|
|
453
441
|
callback: data => {
|
|
@@ -470,12 +458,6 @@
|
|
|
470
458
|
});
|
|
471
459
|
}
|
|
472
460
|
},
|
|
473
|
-
watch: {
|
|
474
|
-
showSelectUserModalOnly (nV, oV) {
|
|
475
|
-
nV && this.init();
|
|
476
|
-
nV && this.openModal();
|
|
477
|
-
}
|
|
478
|
-
},
|
|
479
461
|
filters: {
|
|
480
462
|
isActive (item, list) {
|
|
481
463
|
return list.some(o => o._key === item._key) ? "selectUsers-list-item-active" : "";
|