three-trees-ui 1.0.5 → 1.0.6
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/three-trees-ui.common.js +515 -1033
- package/lib/three-trees-ui.css +1 -1
- package/lib/three-trees-ui.umd.js +515 -1033
- package/lib/three-trees-ui.umd.min.js +1 -1
- package/package.json +1 -1
- package/packages/CustomDialog/src/customDialog.vue +153 -392
- package/packages/CustomDialog/src/customMobileDialog.vue +155 -448
- package/packages/CustomDialog/src/main.vue +5 -120
- package/packages/DimensionSelector/src/main.vue +1 -3
- package/packages/JobSelector/src/JobSelectorDialog.vue +1 -0
- package/packages/OrgSelector/src/OrgSelectorDialog.vue +1 -0
- package/packages/PostSelector/src/PostSelectorDialog.vue +1 -0
- package/packages/RoleSelector/src/RoleSelectorDialog.vue +1 -0
- package/packages/UserSelector/src/UserSelectorDialog.vue +1 -0
|
@@ -22,14 +22,9 @@
|
|
|
22
22
|
v-for="(item, index) in inputVal"
|
|
23
23
|
:key="item.value"
|
|
24
24
|
class="el-tag el-tag--info el-tag--small"
|
|
25
|
-
@click
|
|
25
|
+
@click="showEditInput"
|
|
26
26
|
>
|
|
27
|
-
<span
|
|
28
|
-
class="el-select__tags-text"
|
|
29
|
-
:class="{ 'src-color': isSrcColor }"
|
|
30
|
-
>
|
|
31
|
-
{{ item.value }}
|
|
32
|
-
</span>
|
|
27
|
+
<span class="el-select__tags-text">{{ item.value }}</span>
|
|
33
28
|
<i
|
|
34
29
|
class="el-tag__close el-icon-close"
|
|
35
30
|
@click.stop="removeSelectOrg(index)"
|
|
@@ -99,11 +94,9 @@
|
|
|
99
94
|
:key="item.value"
|
|
100
95
|
class="el-tag el-tag--info el-tag--small"
|
|
101
96
|
style="margin-right: 8px"
|
|
102
|
-
@click.stop
|
|
97
|
+
@click.stop
|
|
103
98
|
>
|
|
104
|
-
<span class="el-select__tags-text"
|
|
105
|
-
{{ item.value }}
|
|
106
|
-
</span>
|
|
99
|
+
<span class="el-select__tags-text">{{ item.value }}</span>
|
|
107
100
|
</span>
|
|
108
101
|
</span>
|
|
109
102
|
<custom-mobile-dialog
|
|
@@ -115,8 +108,6 @@
|
|
|
115
108
|
:sun-index="sunIndex"
|
|
116
109
|
:sub-path="subPath"
|
|
117
110
|
:current-sub-data="currentSubData"
|
|
118
|
-
:dialog-config="dialogConfig"
|
|
119
|
-
:dialog-type="dialogType"
|
|
120
111
|
@calacInputSuffixHeight="calacInputSuffixHeight"
|
|
121
112
|
@updateInput="updateInput"
|
|
122
113
|
></custom-mobile-dialog>
|
|
@@ -131,8 +122,6 @@
|
|
|
131
122
|
:sub-path="subPath"
|
|
132
123
|
:current-sub-data="currentSubData"
|
|
133
124
|
:is-read-only="!inputWriteable"
|
|
134
|
-
:dialog-config="dialogConfig"
|
|
135
|
-
:dialog-type="dialogType"
|
|
136
125
|
@calacInputSuffixHeight="calacInputSuffixHeight"
|
|
137
126
|
@updateInput="updateInput"
|
|
138
127
|
></custom-dialog>
|
|
@@ -170,15 +159,9 @@
|
|
|
170
159
|
sunIndex: Number,
|
|
171
160
|
subPath: String,
|
|
172
161
|
currentSubData: Array,
|
|
173
|
-
dialogType: {
|
|
174
|
-
// search表示在查询条件使用 form表示在表单中使用
|
|
175
|
-
type: String,
|
|
176
|
-
default: 'form',
|
|
177
|
-
},
|
|
178
162
|
},
|
|
179
163
|
data() {
|
|
180
164
|
return {
|
|
181
|
-
dialogConfig: null, // 对话框配置信息
|
|
182
165
|
isEditInputShow: false,
|
|
183
166
|
customValue: '',
|
|
184
167
|
defualtTooltipplacement: 'bottom',
|
|
@@ -218,19 +201,7 @@
|
|
|
218
201
|
}
|
|
219
202
|
let result = []
|
|
220
203
|
nameAry.forEach((m) => {
|
|
221
|
-
|
|
222
|
-
let n = {}
|
|
223
|
-
if (m.includes('¯') && m.split('¯')[1]) {
|
|
224
|
-
n.value = m.split('¯')[0]
|
|
225
|
-
let jumpParamStr = m.split('¯')[1]
|
|
226
|
-
if (jumpParamStr) {
|
|
227
|
-
let jumpParam = jumpParamStr.split(':')
|
|
228
|
-
n.jumpParamKey = jumpParam[0]
|
|
229
|
-
n.jumpParamValue = jumpParam[1]
|
|
230
|
-
}
|
|
231
|
-
} else {
|
|
232
|
-
n = { value: m }
|
|
233
|
-
}
|
|
204
|
+
let n = { value: m }
|
|
234
205
|
result.push(n)
|
|
235
206
|
})
|
|
236
207
|
return result
|
|
@@ -239,19 +210,6 @@
|
|
|
239
210
|
isAllowCustom() {
|
|
240
211
|
return this.custdialog && this.custdialog.allowInput
|
|
241
212
|
},
|
|
242
|
-
// 是否展示可跳转颜色
|
|
243
|
-
isSrcColor() {
|
|
244
|
-
return (
|
|
245
|
-
this.dialogConfig &&
|
|
246
|
-
this.dialogType !== 'search' &&
|
|
247
|
-
((this.isMobile && this.dialogConfig.mobileUrl) ||
|
|
248
|
-
(!this.isMobile && this.dialogConfig.pcUrl))
|
|
249
|
-
)
|
|
250
|
-
},
|
|
251
|
-
},
|
|
252
|
-
created() {
|
|
253
|
-
// 获取对话框配置,看是否有配置url跳转
|
|
254
|
-
this.getDialogConfig()
|
|
255
213
|
},
|
|
256
214
|
mounted() {
|
|
257
215
|
const { subScopeEl } = utils.getSubScopeElAndIndex(this.$el)
|
|
@@ -276,75 +234,6 @@
|
|
|
276
234
|
this.calacInputSuffixWidth()
|
|
277
235
|
},
|
|
278
236
|
methods: {
|
|
279
|
-
// 跳转url页面
|
|
280
|
-
jumpUrl(item) {
|
|
281
|
-
if (!this.isSrcColor) {
|
|
282
|
-
if (this.inputWriteable) {
|
|
283
|
-
this.showEditInput()
|
|
284
|
-
}
|
|
285
|
-
return
|
|
286
|
-
}
|
|
287
|
-
let url = this.isMobile
|
|
288
|
-
? this.dialogConfig.mobileUrl
|
|
289
|
-
: this.dialogConfig.pcUrl
|
|
290
|
-
// 获取通用token 和 url翻译
|
|
291
|
-
Promise.all([
|
|
292
|
-
this.$requestConfig.getThreeTreeToken(),
|
|
293
|
-
this.transformUrl(url),
|
|
294
|
-
]).then((res) => {
|
|
295
|
-
if (res[0] && res[0].code == 200) {
|
|
296
|
-
let token = res[0].value
|
|
297
|
-
let endUrl = res[1]
|
|
298
|
-
// 拼接参数 token和参数
|
|
299
|
-
if (endUrl.indexOf('?') == -1) {
|
|
300
|
-
endUrl += `?bnsToken=${token}&${item.jumpParamKey}=${item.jumpParamValue}`
|
|
301
|
-
} else {
|
|
302
|
-
endUrl += `&bnsToken=${token}&${item.jumpParamKey}=${item.jumpParamValue}`
|
|
303
|
-
}
|
|
304
|
-
window.open(endUrl)
|
|
305
|
-
} else {
|
|
306
|
-
this.$message.info(res.message || '获取token失败!')
|
|
307
|
-
}
|
|
308
|
-
})
|
|
309
|
-
},
|
|
310
|
-
// 替换url中域名通配符 需要发送接口
|
|
311
|
-
transformUrl(url) {
|
|
312
|
-
return new Promise((resolve) => {
|
|
313
|
-
var reg = /(\$\{(\w+)\})/
|
|
314
|
-
var match = reg.exec(url)
|
|
315
|
-
if (match) {
|
|
316
|
-
let alias = match[2]
|
|
317
|
-
if (alias) {
|
|
318
|
-
this.$requestConfig.getHostByAlias(alias).then((res) => {
|
|
319
|
-
if (res && res.value && res.value.rootAddress) {
|
|
320
|
-
resolve(url.replace(match[1], res.value.rootAddress))
|
|
321
|
-
} else {
|
|
322
|
-
resolve(url)
|
|
323
|
-
}
|
|
324
|
-
})
|
|
325
|
-
} else {
|
|
326
|
-
resolve(url)
|
|
327
|
-
}
|
|
328
|
-
} else {
|
|
329
|
-
resolve(url)
|
|
330
|
-
}
|
|
331
|
-
})
|
|
332
|
-
},
|
|
333
|
-
// 获取对话框配置
|
|
334
|
-
getDialogConfig() {
|
|
335
|
-
if (
|
|
336
|
-
this.custdialog &&
|
|
337
|
-
this.custdialog.custDialog &&
|
|
338
|
-
this.custdialog.custDialog.alias
|
|
339
|
-
)
|
|
340
|
-
this.$requestConfig
|
|
341
|
-
.getCustomDialogByAlias(this.custdialog.custDialog.alias)
|
|
342
|
-
.then((response) => {
|
|
343
|
-
if (response) {
|
|
344
|
-
this.dialogConfig = response
|
|
345
|
-
}
|
|
346
|
-
})
|
|
347
|
-
},
|
|
348
237
|
editInputBlur() {
|
|
349
238
|
this.$emit('input', this.customValue)
|
|
350
239
|
this.isEditInputShow = false
|
|
@@ -594,8 +483,4 @@
|
|
|
594
483
|
display: block;
|
|
595
484
|
margin: 8px 0;
|
|
596
485
|
}
|
|
597
|
-
.src-color {
|
|
598
|
-
cursor: pointer;
|
|
599
|
-
color: #409eff !important;
|
|
600
|
-
}
|
|
601
486
|
</style>
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
:visible.sync="dialogVisible"
|
|
69
69
|
class="dialog-selector__wrapper"
|
|
70
70
|
:class="{ 'mobile-dialog': isMobile }"
|
|
71
|
-
top="
|
|
71
|
+
top="3vh"
|
|
72
72
|
:before-close="handleClose"
|
|
73
73
|
:close-on-click-modal="false"
|
|
74
74
|
:append-to-body="appendToBody"
|
|
@@ -269,8 +269,6 @@
|
|
|
269
269
|
demNameAry.join(',')
|
|
270
270
|
)
|
|
271
271
|
}
|
|
272
|
-
} else {
|
|
273
|
-
this.$emit('change', newVal)
|
|
274
272
|
}
|
|
275
273
|
// 通过valueChange事件发布值变更消息
|
|
276
274
|
this.$emit('valueChange', ary.join(','), newVal)
|