[update] 修改企标制修订流程
This commit is contained in:
@@ -32,7 +32,17 @@
|
||||
<van-icon class="iconfont" class-prefix="icon" name="circle" />
|
||||
</template>
|
||||
<h3>{{ item.nodeName }}</h3>
|
||||
<p>{{ item.linkUserIds_dictText }}</p>
|
||||
<p v-if="!item.canChoose">{{ item.linkUserIds_dictText }}</p>
|
||||
<div v-else>
|
||||
<select-user-field v-if="item.chooseSource === 'user'"
|
||||
class="no-label"
|
||||
v-model="item.linkUserIds"
|
||||
:type="item.chooseType"
|
||||
:checkedNames="item.linkUserIds_dictText"
|
||||
:fieldName="item.variableName"
|
||||
@selectNameChange="nameChange"
|
||||
input-type="textarea" />
|
||||
</div>
|
||||
</van-step>
|
||||
</van-steps>
|
||||
</div>
|
||||
@@ -48,9 +58,11 @@
|
||||
|
||||
<script>
|
||||
import { getPersonInfoList } from '@/api/api'
|
||||
import SelectUserField from '@/components/SelectUserField'
|
||||
|
||||
export default {
|
||||
name: 'ProcessCommonLayout',
|
||||
components: { SelectUserField },
|
||||
props: {
|
||||
// 加载效果
|
||||
loading: {
|
||||
@@ -63,6 +75,14 @@ export default {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
// 人员信息可以修改的字段
|
||||
canChooseFields: {
|
||||
type: Array,
|
||||
required: false,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@@ -96,7 +116,24 @@ export default {
|
||||
if (res.success) {
|
||||
console.log(res.result)
|
||||
// 处理人员信息数据,判断每个节点是否能选人
|
||||
this.personnelInfoData = res.result
|
||||
this.personnelInfoData = res.result.map(item => {
|
||||
return {
|
||||
...item,
|
||||
canChoose: this.canChooseFields.includes(item.variableName),
|
||||
chooseType: item.variableType === 'string' ? 'radio' : 'checkbox'
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 从草稿进来填过的人员需要回显
|
||||
draftInitPersonInfo (personInfoObj) {
|
||||
this.personnelInfoData = this.personnelInfoData.map(item => {
|
||||
return {
|
||||
...item,
|
||||
linkUserIds: personInfoObj[item.variableName] || item.linkUserIds,
|
||||
linkUserIds_dictText: personInfoObj[item.variableName + '_dictText'],
|
||||
userList: personInfoObj[item.variableName + '_dictText']
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -105,10 +142,12 @@ export default {
|
||||
const personnelObj = {}
|
||||
for (const item of this.personnelInfoData) {
|
||||
// 该属性还没有人就给他赋值
|
||||
if ((item.canChoose || item.sort === 1) && !personnelObj[item.variableName]) {
|
||||
if (!personnelObj[item.variableName]) {
|
||||
personnelObj[item.variableName] = item.linkUserIds
|
||||
personnelObj[item.variableName + '_dictText'] = item.linkUserIds_dictText || item.userList
|
||||
}
|
||||
}
|
||||
console.log(personnelObj)
|
||||
return personnelObj
|
||||
},
|
||||
// 有校验的获取人员对象
|
||||
@@ -116,7 +155,7 @@ export default {
|
||||
let personnelObj = {}
|
||||
for (const item of this.personnelInfoData) {
|
||||
// 该属性还没有人就给他赋值
|
||||
if ((item.canChoose || item.sort === 1) && !personnelObj[item.variableName]) {
|
||||
if (item.canChoose && !personnelObj[item.variableName]) {
|
||||
personnelObj[item.variableName] = item.linkUserIds
|
||||
}
|
||||
}
|
||||
@@ -125,6 +164,11 @@ export default {
|
||||
personnelObj = false
|
||||
}
|
||||
return personnelObj
|
||||
},
|
||||
nameChange (value, fieldName) {
|
||||
console.log(value, fieldName)
|
||||
this.personnelInfoData.find(item => item.variableName === fieldName).linkUserIds_dictText = value
|
||||
this.personnelInfoData.find(item => item.variableName === fieldName).userList = value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -230,4 +274,10 @@ export default {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.no-label {
|
||||
/deep/ .van-cell__title {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,455 @@
|
||||
<template>
|
||||
<van-popup class="history-list-popup" v-model="isShow" position="right" :style="{ width: '100%', height: '100%' }">
|
||||
<!-- 增加一个标题-->
|
||||
<custom-header :title="$t('selectUser')" :leftArrow="true" :handle-left="handleLeft"></custom-header>
|
||||
<div class="list-container">
|
||||
<van-search
|
||||
v-model="realnameOrUsername"
|
||||
show-action
|
||||
input-align="center"
|
||||
placeholder="请输入姓名/工号"
|
||||
@search="onSearch">
|
||||
<template #action>
|
||||
<div @click="onSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
|
||||
<van-dropdown-menu :close-on-click-overlay="false" :close-on-click-outside="false">
|
||||
<!-- 内部工作组 -->
|
||||
<van-dropdown-item :title="selectedWorkGroup" ref="workGroupDropdownItem">
|
||||
<van-cascader
|
||||
v-model="workingGroupId"
|
||||
title="请选择内部工作组"
|
||||
:options="workGroupList"
|
||||
:closeable="false"
|
||||
:show-header="false"
|
||||
:field-names="{text: 'name', value: 'id', children: 'subset'}"
|
||||
@change="handleWorkGroupChange" />
|
||||
<div class="dropdown-operate-box">
|
||||
<van-button @click="handleClearDepart" class="dropdown-confirm-btn" type="primary" round plain size="small">清空</van-button>
|
||||
<van-button @click="handleConfirmDepart" class="dropdown-confirm-btn" type="primary" round size="small">确定</van-button>
|
||||
</div>
|
||||
</van-dropdown-item>
|
||||
<!--角色-->
|
||||
<van-dropdown-item :title="selectedRole" ref="roleDropdownItem">
|
||||
<van-picker
|
||||
ref="rolePicker"
|
||||
show-toolbar
|
||||
toolbar-position="bottom"
|
||||
:columns="rolesList"
|
||||
@confirm="handleConfirmRole"
|
||||
@cancel="handleCancelRole">
|
||||
<template v-slot:default>
|
||||
<div class="dropdown-operate-box">
|
||||
<van-button @click="handleClearRole" class="dropdown-confirm-btn" type="primary" round plain size="small">清空
|
||||
</van-button>
|
||||
<van-button @click="confirmRole" class="dropdown-confirm-btn" type="primary" round size="small">确定</van-button>
|
||||
</div>
|
||||
</template>
|
||||
</van-picker>
|
||||
</van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="listFinished"
|
||||
:finished-text="listData.length > 0 ? '没有更多了' : '暂无数据'"
|
||||
@load="onLoadMore"
|
||||
:immediate-check="false">
|
||||
<van-checkbox-group v-if="type === 'checkbox'" v-model="checkedArr" ref="checkboxGroup">
|
||||
<van-swipe-cell
|
||||
v-for="(item, index) in listData"
|
||||
:key="index"
|
||||
:name="index"
|
||||
stop-propagation
|
||||
:before-close="handleBeforeClose">
|
||||
<div class="item-box">
|
||||
<van-checkbox :name="item.id" @click="checkboxClick(item)" shape="square" :disabled="readonly"></van-checkbox>
|
||||
<div class="item-container">
|
||||
<div class="item-title">
|
||||
{{ item.realname }}({{ item.username }})
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<div class="item-content-item">
|
||||
<span class="label">角色:</span>
|
||||
<span class="text">{{ item.userRoleName }}</span>
|
||||
</div>
|
||||
<div class="item-content-item">
|
||||
<span class="label">岗位:</span>
|
||||
<span class="text">{{ item.userPostName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-swipe-cell>
|
||||
</van-checkbox-group>
|
||||
<van-radio-group v-else v-model="checkedArr" ref="checkboxGroup">
|
||||
<van-swipe-cell
|
||||
v-for="(item, index) in listData"
|
||||
:key="index"
|
||||
:name="index"
|
||||
stop-propagation
|
||||
:before-close="handleBeforeClose">
|
||||
<div class="item-box">
|
||||
<van-radio :name="item.id" @click="checkboxClick(item)" :disabled="readonly"></van-radio>
|
||||
<div class="item-container">
|
||||
<div class="item-title">
|
||||
{{ item.realname }}({{ item.username }})
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<div class="item-content-item">
|
||||
<span class="label">角色:</span>
|
||||
<span class="text">{{ item.userRoleName }}</span>
|
||||
</div>
|
||||
<div class="item-content-item">
|
||||
<span class="label">岗位:</span>
|
||||
<span class="text">{{ item.userPostName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-swipe-cell>
|
||||
</van-radio-group>
|
||||
</van-list>
|
||||
|
||||
<!-- 底部的按钮 -->
|
||||
<div class="bottom-button-container">
|
||||
<div class="bottom-btn bottom-justify-div">
|
||||
<van-button size="small" color="#C6C7CA" native-type="button" plain :disabled="disabled" @click="resetFunc">重置
|
||||
</van-button>
|
||||
<van-button v-if="type === 'checkbox'" size="small" color="#E63636" native-type="button" :disabled="disabled" @click="checkAll">
|
||||
全选
|
||||
</van-button>
|
||||
<van-button size="small" color="#E63636" native-type="button" :disabled="disabled" @click="confirmFunc()">确定
|
||||
</van-button>
|
||||
<van-button size="small" color="#C6C7CA" native-type="button" plain :disabled="disabled" @click="hide()">取消
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CustomHeader from '@/components/CustomHeader'
|
||||
import ListMixin from '@/mixins/ListMixin'
|
||||
import { getWorkGroupTreeList, queryAllRole } from '@/api/api'
|
||||
|
||||
export default {
|
||||
name: 'SelectUserByWorkGroup',
|
||||
components: { CustomHeader },
|
||||
mixins: [ListMixin],
|
||||
props: {
|
||||
selectedData: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
// 一些其他的查询参数
|
||||
filterData: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'radio'
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
realname: '', // 搜索框数据
|
||||
realnameOrUsername: null, // 搜索框数据(姓名和工号一起搜索改的)
|
||||
isShow: false,
|
||||
loading: false, // 加载数据的标识,
|
||||
listFinished: false, // 完成加载的标识
|
||||
refreshing: false, // 下拉刷新的标志
|
||||
listData: [], // 列表页的数据
|
||||
listCount: 0, // 所有数据的数量
|
||||
/* 分页的配置 */
|
||||
ipagination: {
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
url: {
|
||||
list: '/act/user/workGroupPage'
|
||||
},
|
||||
checkedArr: [],
|
||||
selectedDataArr: [],
|
||||
selectedWorkGroup: '内部工作组', // 回显在页面上的选中部门的名字
|
||||
selectedRole: '角色', // 回显在页面上的选中角色的名字
|
||||
workGroupList: [], // 内部工作组数据
|
||||
workingGroupId: null, // 查询时候传给后端的参数
|
||||
tempSelectedWorkGroup: {}, // change的时候记录一下选中的内部工作组
|
||||
rolesList: [], // 角色下拉框
|
||||
roleName: null // 查询时候传给后端的参数
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
disabled () {
|
||||
return this.listData.length === 0 || this.readonly
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.isShow = true
|
||||
this.initData()
|
||||
this.getListData()
|
||||
this.getWorkGroup()
|
||||
this.initRoleList()
|
||||
},
|
||||
checkboxClick (item) {
|
||||
console.log(item)
|
||||
if (this.type === 'checkbox') {
|
||||
if (this.checkedArr.includes(item.id)) {
|
||||
console.log('------------增加了数据------------')
|
||||
// 说明是增加了数据,为了顺序和列表顺序保持一致,用循环设置
|
||||
const arr = []
|
||||
for (const i of this.listData) {
|
||||
if (this.checkedArr.includes(i.id)) {
|
||||
arr.push(i)
|
||||
}
|
||||
}
|
||||
this.selectedDataArr = arr
|
||||
} else {
|
||||
console.log('------------删除了数据------------')
|
||||
// 说明是删除了数据
|
||||
this.selectedDataArr = this.selectedDataArr.filter(i => i.id !== item.id)
|
||||
}
|
||||
} else {
|
||||
this.selectedDataArr = [item]
|
||||
}
|
||||
console.log(this.selectedDataArr)
|
||||
},
|
||||
handleCheckedArr () {
|
||||
// 清空选中的数据
|
||||
if (this.type === 'checkbox') {
|
||||
if (this.selectedData) {
|
||||
this.checkedArr = this.selectedData.split(',')
|
||||
} else {
|
||||
this.checkedArr = []
|
||||
}
|
||||
} else {
|
||||
if (this.selectedData) {
|
||||
this.checkedArr = this.selectedData
|
||||
} else {
|
||||
this.checkedArr = ''
|
||||
}
|
||||
}
|
||||
},
|
||||
// 初始化数据
|
||||
initData () {
|
||||
this.ipagination.pageNo = 1
|
||||
this.listData = []
|
||||
this.listFinished = false
|
||||
this.refreshing = false
|
||||
this.loading = true
|
||||
this.handleCheckedArr()
|
||||
},
|
||||
// 重置按钮点击的方法
|
||||
resetFunc () {
|
||||
this.checkedArr = []
|
||||
},
|
||||
checkAll () {
|
||||
this.$refs.checkboxGroup.toggleAll(true)
|
||||
this.selectedDataArr = [...this.listData]
|
||||
},
|
||||
// 确定 按钮触发的方法
|
||||
confirmFunc () {
|
||||
console.log(this.checkedArr)
|
||||
// 先判断是否选择数据,没有提示
|
||||
if ((this.type === 'checkbox' && this.checkedArr.length === 0) || (this.type === 'radio' && (!this.checkedArr || this.checkedArr.length === 0))) {
|
||||
this.$message('请至少选择一条数据')
|
||||
return
|
||||
}
|
||||
if (this.type === 'checkbox') {
|
||||
this.$emit('selected-change', this.checkedArr.join(','))
|
||||
} else {
|
||||
this.$emit('selected-change', this.checkedArr)
|
||||
}
|
||||
this.$emit('selected-change-name', this.selectedDataArr.map(item => item.realname + '(' + item.username + ')').join(','))
|
||||
this.hide()
|
||||
},
|
||||
onSearch () {
|
||||
if (this.realname) {
|
||||
this.filters.realname = this.realname
|
||||
} else {
|
||||
this.filters.realname = null
|
||||
}
|
||||
this.filters.realnameOrUsername = this.realnameOrUsername || null
|
||||
this.filters.workingGroupId = this.workingGroupId
|
||||
this.filters.userRoleName = this.roleName
|
||||
this.ipagination.pageNo = 1
|
||||
this.getListData()
|
||||
},
|
||||
handleLeft () {
|
||||
this.hide()
|
||||
},
|
||||
hide () {
|
||||
this.isShow = false
|
||||
},
|
||||
// 获取内部工作组
|
||||
getWorkGroup () {
|
||||
getWorkGroupTreeList().then((res) => {
|
||||
if (res.success) {
|
||||
this.workGroupList = res.result
|
||||
} else {
|
||||
this.workGroupList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
handleWorkGroupChange ({ value, selectedOptions }) {
|
||||
this.tempSelectedWorkGroup = selectedOptions.find(tt => tt.id === value) || {}
|
||||
console.log(this.tempSelectedWorkGroup)
|
||||
},
|
||||
handleConfirmDepart () {
|
||||
this.$refs.workGroupDropdownItem.toggle()
|
||||
this.selectedWorkGroup = this.tempSelectedWorkGroup.name
|
||||
},
|
||||
handleClearDepart () {
|
||||
this.$refs.workGroupDropdownItem.toggle()
|
||||
this.selectedWorkGroup = '组织机构'
|
||||
this.tempSelectedWorkGroup = {}
|
||||
this.workingGroupId = null
|
||||
},
|
||||
// 初始化角色字典
|
||||
initRoleList () {
|
||||
queryAllRole().then((res) => {
|
||||
if (res.success) {
|
||||
this.rolesList = res.result.map((item) => {
|
||||
return { text: item.roleName, value: item.id }
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
confirmRole () {
|
||||
this.$refs.rolePicker.confirm()
|
||||
},
|
||||
handleClearRole () {
|
||||
this.$refs.roleDropdownItem.toggle()
|
||||
this.selectedRole = '角色'
|
||||
this.roleName = null
|
||||
},
|
||||
handleConfirmRole (value) {
|
||||
this.$refs.roleDropdownItem.toggle()
|
||||
this.roleName = value.text
|
||||
this.selectedRole = value.text
|
||||
},
|
||||
handleCancelRole () {
|
||||
this.$refs.roleDropdownItem.toggle()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/list.less';
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.history-list-popup {
|
||||
background: @global-bg;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.list-container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.van-list {
|
||||
padding: @pad-base;
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
// 中间内容
|
||||
.item-box {
|
||||
background: #FFFFFF;
|
||||
padding: 0.24rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #C9CDD4;
|
||||
border-radius: 0;
|
||||
|
||||
.van-checkbox {
|
||||
display: block;
|
||||
margin: 0 20px 0 0;
|
||||
}
|
||||
|
||||
.van-radio {
|
||||
display: block;
|
||||
margin: 0 20px 0 0;
|
||||
}
|
||||
|
||||
/deep/ .van-checkbox__icon--checked {
|
||||
.van-icon {
|
||||
background: @primary-color;
|
||||
border-color: @primary-color;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .van-radio__icon--checked {
|
||||
.van-icon {
|
||||
background: @primary-color;
|
||||
border-color: @primary-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-container {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
// 底部按钮
|
||||
.bottom-button-container {
|
||||
height: 1.28rem;
|
||||
line-height: 1.28rem;
|
||||
padding: 0 0.2rem;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.bottom-justify-div {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
gap: 0.2rem;
|
||||
|
||||
.van-button {
|
||||
height: 0.8rem;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/deep/ .van-button--plain {
|
||||
color: #898989 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-operate-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
padding: 0.24rem;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.dropdown-confirm-btn {
|
||||
width: calc(50% - 0.12rem);
|
||||
}
|
||||
|
||||
/deep/ .van-picker__toolbar {
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<div>
|
||||
<van-field
|
||||
v-model="selectedDataNames"
|
||||
:label="label"
|
||||
:placeholder="$t('pleaseSelect') + label"
|
||||
readonly
|
||||
rows="1"
|
||||
autosize
|
||||
:rules="rules"
|
||||
type="textarea"
|
||||
@click="handleSelect"
|
||||
>
|
||||
</van-field>
|
||||
<select-user-by-work-group
|
||||
ref="evaluatePersonSelectedList"
|
||||
:selected-data="value"
|
||||
:filter-data="filterData"
|
||||
@selected-change="selectedChange"
|
||||
@selected-change-name="selectedChangeName"
|
||||
v-bind="$attrs"
|
||||
:readonly="readonly"
|
||||
></select-user-by-work-group>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SelectUserByWorkGroup from '@/components/SelectUserByWorkGroup'
|
||||
export default {
|
||||
name: 'SelectUserByWorkGroupField',
|
||||
components: { SelectUserByWorkGroup },
|
||||
props: {
|
||||
// 选中的多个id 以逗号“,”拼接
|
||||
value: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
// 一些其他的查询参数
|
||||
filterData: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
checkedNames: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: () => {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '人员'
|
||||
},
|
||||
fieldName: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
// 校验信息
|
||||
rules: {
|
||||
type: [Array, null],
|
||||
required: false,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
checkedNames: {
|
||||
immediate: true,
|
||||
// deep: true,
|
||||
handler (val) {
|
||||
this.selectedDataNames = val
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
immediate: true,
|
||||
handler (val) {
|
||||
console.log(val)
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
selectedDataNames: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSelect () {
|
||||
if (this.readonly) {
|
||||
return
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.evaluatePersonSelectedList.open()
|
||||
})
|
||||
},
|
||||
// 选择人员组件 选择后返回的方法
|
||||
selectedChange (value) {
|
||||
this.$emit('select', value)
|
||||
},
|
||||
selectedChangeName (value) {
|
||||
this.selectedDataNames = value
|
||||
this.$emit('selectNameChange', value, this.fieldName)
|
||||
}
|
||||
},
|
||||
model: {
|
||||
prop: 'value',
|
||||
event: 'select'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -3,7 +3,7 @@
|
||||
<van-field
|
||||
v-model="selectedDataNames"
|
||||
:label="label"
|
||||
:placeholder="$t('pleaseSelect') + label"
|
||||
:placeholder="$t('pleaseSelect') + (label ? label : '')"
|
||||
readonly
|
||||
rows="1"
|
||||
autosize
|
||||
@@ -59,7 +59,7 @@ export default {
|
||||
}
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
type: [String, Boolean],
|
||||
required: false,
|
||||
default: '人员'
|
||||
},
|
||||
@@ -80,7 +80,7 @@ export default {
|
||||
immediate: true,
|
||||
// deep: true,
|
||||
handler (val) {
|
||||
this.selectedDataNames = val
|
||||
this.selectedDataNames = val || ''
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
|
||||
Reference in New Issue
Block a user