调整切换系统中间出现的问题
This commit is contained in:
@@ -1,255 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="SelectUser">
|
|
||||||
<div class="header-middle">
|
|
||||||
<div class="hint">
|
|
||||||
<u-search v-model="name" placeholder="请输入姓名" :show-action="false" bg-color="#F5F5F5" search-icon-color="#999" color="#999" height="58" @search="getListInit" :clearabled="false"></u-search>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="showUsers">
|
|
||||||
<div v-if="userList.length > 0">
|
|
||||||
<div class="cards" v-for="(e, index) in userList" :key="index">
|
|
||||||
<div class="imges">
|
|
||||||
<img src="./components/img/xzh.png" alt="" class="imgselect" v-if="e.isChecked" @click="userClick(index)" />
|
|
||||||
<img src="./components/img/xz.png" alt="" class="imgselect" v-else @click="userClick(index)" />
|
|
||||||
|
|
||||||
<img src="./components/img/tx@2x.png" alt="" class="avatras" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="rights">
|
|
||||||
<div class="applicationNames">{{ e.name }}</div>
|
|
||||||
<div class="idNumbers">{{ e.phone }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- <div style="padding-bottom: 70px;background:#fff;"></div> -->
|
|
||||||
<div class="subBtn" @click="submit">
|
|
||||||
<div>确定选择</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'SelectUser',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
selectUserList: [],
|
|
||||||
userList: [],
|
|
||||||
name: '',
|
|
||||||
current: 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad() {
|
|
||||||
this.selectUserList = uni.getStorageSync('selectUserList')
|
|
||||||
this.selectUserList.map((item) => {
|
|
||||||
item.id =item.wxUserId
|
|
||||||
item.mobile = item.phone
|
|
||||||
item.avatar = item.photo
|
|
||||||
})
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getListInit() {
|
|
||||||
this.userList = []
|
|
||||||
this.current = 1
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
getList() {
|
|
||||||
this.$http.post(`/app/wxcp/wxuser/list?name=${this.name}¤t=${this.current}&size=20`).then((res) => {
|
|
||||||
if (res?.data) {
|
|
||||||
res.data.records.map((item) => {
|
|
||||||
item.isChecked = false
|
|
||||||
})
|
|
||||||
|
|
||||||
this.userList = this.current > 1 ? [...this.userList, ...res.data.records] : res.data.records
|
|
||||||
|
|
||||||
this.userList.map((item) => {
|
|
||||||
this.selectUserList.map((e) => {
|
|
||||||
if(e.id == item.id) {
|
|
||||||
item.isChecked = true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
userClick(index) {
|
|
||||||
this.userList[index].isChecked = !this.userList[index].isChecked
|
|
||||||
this.$forceUpdate()
|
|
||||||
},
|
|
||||||
|
|
||||||
submit() {
|
|
||||||
var selectUserList = []
|
|
||||||
this.userList.map((item) => {
|
|
||||||
if(item.isChecked) {
|
|
||||||
selectUserList.push(item)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
uni.$emit('selectUser', selectUserList)
|
|
||||||
uni.navigateBack()
|
|
||||||
// if (!selectUserList.length) {
|
|
||||||
// return this.$u.toast('请选择人员')
|
|
||||||
// } else {
|
|
||||||
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
},
|
|
||||||
onReachBottom() {
|
|
||||||
this.current ++
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.SelectUser {
|
|
||||||
height: 100%;
|
|
||||||
padding-bottom: 140px;
|
|
||||||
background: #fff;
|
|
||||||
.header-top {
|
|
||||||
background: #fff;
|
|
||||||
padding: 20px 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-middle {
|
|
||||||
.hint {
|
|
||||||
padding: 28px 20px 28px 32px;
|
|
||||||
line-height: 56px;
|
|
||||||
box-shadow: 0px 1px 0px 0px #e4e5e6;
|
|
||||||
font-size: 30px;
|
|
||||||
font-weight: 500;
|
|
||||||
word-break: break-all;
|
|
||||||
}
|
|
||||||
|
|
||||||
.showTypes {
|
|
||||||
.empty-div {
|
|
||||||
height: 16px;
|
|
||||||
background: #f5f5f5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cards {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
height: 120px;
|
|
||||||
line-height: 120px;
|
|
||||||
// background: pink;
|
|
||||||
padding: 0 0 0 32px;
|
|
||||||
|
|
||||||
.imges {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
// width: 200px;
|
|
||||||
.imgselect {
|
|
||||||
width: 48px;
|
|
||||||
height: 48px;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
.avatras {
|
|
||||||
width: 74px;
|
|
||||||
height: 74px;
|
|
||||||
border-radius: 8px;
|
|
||||||
margin-left: 36px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
img {
|
|
||||||
width: 74px;
|
|
||||||
height: 74px;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
.rightes {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin-left: 32px;
|
|
||||||
border-bottom: 1px solid #e4e5e6;
|
|
||||||
.applicationNames {
|
|
||||||
font-size: 36px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
.imgs {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.showUsers {
|
|
||||||
.cards {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
height: 120px;
|
|
||||||
line-height: 120px;
|
|
||||||
// background: pink;
|
|
||||||
padding: 0 0 0 32px;
|
|
||||||
|
|
||||||
.imges {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
width: 200px;
|
|
||||||
.imgselect {
|
|
||||||
width: 48px;
|
|
||||||
height: 48px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.avatras {
|
|
||||||
width: 74px;
|
|
||||||
height: 74px;
|
|
||||||
border-radius: 8px;
|
|
||||||
margin-left: 36px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.rights {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin-left: 32px;
|
|
||||||
border-bottom: 1px solid #e4e5e6;
|
|
||||||
padding-right: 40px;
|
|
||||||
.applicationNames {
|
|
||||||
font-size: 36px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
.idNumbers {
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.subBtn {
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 118px;
|
|
||||||
background: #f4f8fb;
|
|
||||||
div {
|
|
||||||
width: 192px;
|
|
||||||
height: 80px;
|
|
||||||
line-height: 80px;
|
|
||||||
text-align: center;
|
|
||||||
background: #1365dd;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 32px;
|
|
||||||
color: #fff;
|
|
||||||
margin: 20px 34px 0 0;
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -3,7 +3,6 @@ import Vuex from 'vuex'
|
|||||||
import perState from 'vuex-persistedstate'
|
import perState from 'vuex-persistedstate'
|
||||||
import http from '../common/axios'
|
import http from '../common/axios'
|
||||||
import CryptoJS from '../utils/crypto-js'
|
import CryptoJS from '../utils/crypto-js'
|
||||||
import qs from 'qs'
|
|
||||||
|
|
||||||
Vue.use(Vuex)
|
Vue.use(Vuex)
|
||||||
let agentSignURL = "", apiList = []
|
let agentSignURL = "", apiList = []
|
||||||
@@ -234,8 +233,7 @@ const store = new Vuex.Store({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
agentSign(state, params) {
|
agentSign(state, params) {
|
||||||
let url = window.location.href,
|
let url = window.location.href
|
||||||
{corpId, suiteId} = state.state.config
|
|
||||||
if (agentSignURL == url) {
|
if (agentSignURL == url) {
|
||||||
return Promise.resolve()
|
return Promise.resolve()
|
||||||
} else {
|
} else {
|
||||||
@@ -243,13 +241,6 @@ const store = new Vuex.Store({
|
|||||||
if (sessionStorage.getItem("prj")?.indexOf("saas") > -1) {
|
if (sessionStorage.getItem("prj")?.indexOf("saas") > -1) {
|
||||||
params = {...params, corpId: "ww596787bb70f08288"}
|
params = {...params, corpId: "ww596787bb70f08288"}
|
||||||
}
|
}
|
||||||
if (qs.parse(location.search)?.corpId) {
|
|
||||||
params = {
|
|
||||||
corpId: qs.parse(location.search).corpId
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
params = params || {corpId, suiteId}
|
|
||||||
}
|
|
||||||
return http.post("/app/wxcp/portal/agentSign", null, {
|
return http.post("/app/wxcp/portal/agentSign", null, {
|
||||||
params: {...params, url}
|
params: {...params, url}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|||||||
Reference in New Issue
Block a user