[update] 企标立项、变更流程
This commit is contained in:
@@ -1,106 +1,112 @@
|
||||
<!-- 选择评价人员 -->
|
||||
<template>
|
||||
<div class="list-container">
|
||||
<van-search
|
||||
v-model="filters.realname"
|
||||
show-action
|
||||
:clearable="true"
|
||||
input-align="center"
|
||||
label="姓名"
|
||||
placeholder="请输入姓名"
|
||||
@search="onSearch"
|
||||
>
|
||||
<template #action>
|
||||
<div @click="onSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<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>
|
||||
<div class="item-title">
|
||||
<span class="title">{{ item.realname }}</span>
|
||||
<span class="score">工号({{ item.username || '暂无数据' }})</span>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<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="filters.realname"
|
||||
show-action
|
||||
:clearable="true"
|
||||
input-align="center"
|
||||
label="姓名"
|
||||
placeholder="请输入姓名"
|
||||
@search="onSearch"
|
||||
>
|
||||
<template #action>
|
||||
<div @click="onSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<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>
|
||||
<div class="item-title">
|
||||
<span class="title">{{ item.realname }}</span>
|
||||
<span class="score">工号({{ item.username || '暂无数据' }})</span>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<span>
|
||||
<span class="label">角色: </span>
|
||||
<span class="text">{{ item.roleTxt || '暂无数据' }}</span>
|
||||
</span>
|
||||
<span>
|
||||
<span>
|
||||
<span class="label">岗位: </span>
|
||||
<span class="text">{{ item.post || '暂无数据' }}</span>
|
||||
</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>
|
||||
<div class="item-title">
|
||||
<span class="title">{{ item.realname }}</span>
|
||||
<span class="score">工号({{ item.username || '暂无数据' }})</span>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
</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>
|
||||
<div class="item-title">
|
||||
<span class="title">{{ item.realname }}</span>
|
||||
<span class="score">工号({{ item.username || '暂无数据' }})</span>
|
||||
</div>
|
||||
<div class="item-content">
|
||||
<span>
|
||||
<span class="label">角色: </span>
|
||||
<span class="text">{{ item.roleTxt || '暂无数据' }}</span>
|
||||
</span>
|
||||
<span>
|
||||
<span>
|
||||
<span class="label">岗位: </span>
|
||||
<span class="text">{{ item.post || '暂无数据' }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-swipe-cell>
|
||||
</van-radio-group>
|
||||
</van-list>
|
||||
</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="$emit('cancel')">取消
|
||||
</van-button>
|
||||
<!-- 底部的按钮 -->
|
||||
<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>
|
||||
</div>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ListMixin from '../mixins/ListMixin'
|
||||
import CustomHeader from '@/components/CustomHeader'
|
||||
|
||||
export default {
|
||||
name: 'SelectUser',
|
||||
components: { CustomHeader },
|
||||
mixins: [ListMixin],
|
||||
props: {
|
||||
selectedData: {
|
||||
@@ -141,6 +147,7 @@ export default {
|
||||
// },
|
||||
data () {
|
||||
return {
|
||||
isShow: false,
|
||||
loading: false, // 加载数据的标识,
|
||||
listFinished: false, // 完成加载的标识
|
||||
refreshing: false, // 下拉刷新的标志
|
||||
@@ -164,6 +171,11 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.isShow = true
|
||||
this.initData()
|
||||
this.getListData()
|
||||
},
|
||||
checkboxClick (item) {
|
||||
console.log(item)
|
||||
if (this.type === 'checkbox') {
|
||||
@@ -234,9 +246,16 @@ export default {
|
||||
this.$emit('selected-change', this.checkedArr)
|
||||
}
|
||||
this.$emit('selected-change-name', this.selectedDataArr.map(item => item.realname + '(' + item.username + ')').join(','))
|
||||
this.hide()
|
||||
},
|
||||
onSearch () {
|
||||
this.getListData()
|
||||
},
|
||||
handleLeft () {
|
||||
this.hide()
|
||||
},
|
||||
hide () {
|
||||
this.isShow = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,6 +266,12 @@ export default {
|
||||
@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;
|
||||
|
||||
Reference in New Issue
Block a user