|
@@ -185,12 +185,11 @@ onMounted(() => {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
- <el-select-v2 v-model="selectedValue" :multiple="multiple" :size="size"
|
|
|
|
- :loading="selectLoading" :placeholder="placeholder" :disabled="disabled" :clearable="clearable" filterable collapse-tags :options="personnelArray"
|
|
|
|
|
|
+ <!-- <el-select-v2 v-model="selectedValue" :multiple="multiple" :size="size"
|
|
|
|
+ :loading="selectLoading" :placeholder="placeholder" :disabled="disabled" :clearable="clearable" filterable collapse-tags :options="(personnelArray || [])"
|
|
:style="`width: ${width}`" :class="`custom-select-v2-reset ${!controlTranslation.visibleFlag ? 'setUpInputReset' : ''}`"
|
|
:style="`width: ${width}`" :class="`custom-select-v2-reset ${!controlTranslation.visibleFlag ? 'setUpInputReset' : ''}`"
|
|
@change="updateValue"
|
|
@change="updateValue"
|
|
@visible-change="visibleChange" :filter-method="filterMethod">
|
|
@visible-change="visibleChange" :filter-method="filterMethod">
|
|
- <!-- 单选 -->
|
|
|
|
<template #prefix v-if="!multiple">
|
|
<template #prefix v-if="!multiple">
|
|
<div class="selectV2SingleChoiceReset">
|
|
<div class="selectV2SingleChoiceReset">
|
|
<div v-if="!controlTranslation.visibleFlag" class="selectSingleChoice" :style="`line-height: ${textSize[size].height};font-size:${textSize[size].fontSize}`">
|
|
<div v-if="!controlTranslation.visibleFlag" class="selectSingleChoice" :style="`line-height: ${textSize[size].height};font-size:${textSize[size].fontSize}`">
|
|
@@ -199,18 +198,12 @@ onMounted(() => {
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
<span style="color: #606266;">
|
|
<span style="color: #606266;">
|
|
- <template v-if="userInfo.userNameNeedTranslate == 1">
|
|
|
|
- <ww-open-data type="userName" :openid="getSelectedLabel"></ww-open-data>
|
|
|
|
- </template>
|
|
|
|
- <template v-else>
|
|
|
|
- {{ getSelectedLabel }}
|
|
|
|
- </template>
|
|
|
|
|
|
+ {{ getSelectedLabel }}
|
|
</span>
|
|
</span>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
- <!-- 多选 -->
|
|
|
|
<template #prefix v-if="multiple">
|
|
<template #prefix v-if="multiple">
|
|
<div class="selectV2SingleChoiceTwoReset">
|
|
<div class="selectV2SingleChoiceTwoReset">
|
|
<div class="selectSingleChoice" :style="`line-height: ${textSize[size].height};font-size:${textSize[size].fontSize}`">
|
|
<div class="selectSingleChoice" :style="`line-height: ${textSize[size].height};font-size:${textSize[size].fontSize}`">
|
|
@@ -219,30 +212,63 @@ onMounted(() => {
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
<el-tag type="info" :size="size" closable @close="tagClose" style="margin-right: 5px;">
|
|
<el-tag type="info" :size="size" closable @close="tagClose" style="margin-right: 5px;">
|
|
- <template v-if="userInfo.userNameNeedTranslate == 1">
|
|
|
|
- <ww-open-data type="userName" :openid="getSelectedLabel"></ww-open-data>
|
|
|
|
- </template>
|
|
|
|
- <template v-else>
|
|
|
|
- {{ getSelectedLabel }}
|
|
|
|
- </template>
|
|
|
|
|
|
+ {{ getSelectedLabel }}
|
|
</el-tag>
|
|
</el-tag>
|
|
<el-tag type="info" :size="size" v-if="selectedValue.length > 1">+{{ selectedValue.length }}</el-tag>
|
|
<el-tag type="info" :size="size" v-if="selectedValue.length > 1">+{{ selectedValue.length }}</el-tag>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
- <!-- 基础 -->
|
|
|
|
<template #default="{ item }">
|
|
<template #default="{ item }">
|
|
<div class="flex items-center">
|
|
<div class="flex items-center">
|
|
- <template v-if="userInfo.userNameNeedTranslate == 1">
|
|
|
|
- <ww-open-data type="userName" :openid="item.label"></ww-open-data>
|
|
|
|
- </template>
|
|
|
|
- <template v-else>
|
|
|
|
- {{ item.label }}
|
|
|
|
- </template>
|
|
|
|
|
|
+ {{ item.label }}
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
- </el-select-v2>
|
|
|
|
|
|
+ </el-select-v2> -->
|
|
|
|
+
|
|
|
|
+ <el-select v-model="selectedValue" :multiple="multiple" :size="size"
|
|
|
|
+ :loading="selectLoading" :placeholder="placeholder" :disabled="disabled" :clearable="clearable" filterable collapse-tags
|
|
|
|
+ :style="`width: ${width}`" :class="`custom-select-v2-reset ${!controlTranslation.visibleFlag ? 'setUpInputReset' : ''}`"
|
|
|
|
+ @change="updateValue"
|
|
|
|
+ @visible-change="visibleChange" :filter-method="filterMethod">
|
|
|
|
+ <template #prefix v-if="!multiple">
|
|
|
|
+ <div class="selectV2SingleChoiceReset">
|
|
|
|
+ <div v-if="!controlTranslation.visibleFlag" class="selectSingleChoice" :style="`line-height: ${textSize[size].height};font-size:${textSize[size].fontSize}`">
|
|
|
|
+ <template v-if="getSelectedLabel == placeholder">
|
|
|
|
+ <span style="color: #A8ABB2">{{ placeholder }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <span style="color: #606266;">
|
|
|
|
+ {{ getSelectedLabel }} a
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template #prefix v-if="multiple">
|
|
|
|
+ <div class="selectV2SingleChoiceTwoReset">
|
|
|
|
+ <div class="selectSingleChoice" :style="`line-height: ${textSize[size].height};font-size:${textSize[size].fontSize}`">
|
|
|
|
+ <template v-if="getSelectedLabel == placeholder">
|
|
|
|
+ <span style="color: #A8ABB2">{{ placeholder }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <el-tag type="info" :size="size" closable @close="tagClose" style="margin-right: 5px;">
|
|
|
|
+ {{ getSelectedLabel }} a
|
|
|
|
+ </el-tag>
|
|
|
|
+ <el-tag type="info" :size="size" v-if="selectedValue.length > 1">+{{ selectedValue.length }}</el-tag>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in (personnelArray || [])"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ >
|
|
|
|
+ <span style="float: left">{{ item.label }}</span>
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
</template>
|
|
</template>
|
|
reset
|
|
reset
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
@@ -250,10 +276,8 @@ reset
|
|
position: relative;
|
|
position: relative;
|
|
.selectV2SingleChoiceReset, .selectV2SingleChoiceTwoReset {
|
|
.selectV2SingleChoiceReset, .selectV2SingleChoiceTwoReset {
|
|
position: absolute;
|
|
position: absolute;
|
|
- margin-left: 12px;
|
|
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
- top: 50%;
|
|
|
|
transform: translate(0,-50%);
|
|
transform: translate(0,-50%);
|
|
.selectSingleChoice {
|
|
.selectSingleChoice {
|
|
background: #fff;
|
|
background: #fff;
|
|
@@ -268,10 +292,28 @@ reset
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ .selectV2SingleChoiceReset {
|
|
|
|
+ top: 50%;
|
|
|
|
+ left: 14px;
|
|
|
|
+ }
|
|
|
|
+
|
|
.selectV2SingleChoiceTwoReset {
|
|
.selectV2SingleChoiceTwoReset {
|
|
position: relative;
|
|
position: relative;
|
|
transform: translate(0);
|
|
transform: translate(0);
|
|
- margin-left: 6px;
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .el-input__inner::placeholder {
|
|
|
|
+ color: transparent !important;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .el-select__tags {
|
|
|
|
+ .el-tag {
|
|
|
|
+ display: none !important;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .el-select-tags-wrapper {
|
|
|
|
+ width: 110px !important;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|