2022-03-09 18:03:11 +08:00
|
|
|
|
<template>
|
2022-03-11 16:48:38 +08:00
|
|
|
|
<div class="PersonnelSetting">
|
|
|
|
|
|
<div class="title">
|
|
|
|
|
|
<h2>拍摄人</h2>
|
|
|
|
|
|
<span>*选择拍摄人后,相册只能上传该拍摄人照片</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="cell-group">
|
2022-05-24 16:31:10 +08:00
|
|
|
|
<div class="cell-item" hover-class="bg-hover" @click="userList = [], currIndex = 0">
|
2022-03-11 16:48:38 +08:00
|
|
|
|
<div class="cell-item__left">
|
|
|
|
|
|
<h2>不限</h2>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="cell-item__check" :class="[currIndex === 0 ? 'active' : '']"></div>
|
|
|
|
|
|
</div>
|
2022-05-24 16:31:10 +08:00
|
|
|
|
<div class="cell-item" hover-class="bg-hover" @click="toChoose">
|
2022-03-11 16:48:38 +08:00
|
|
|
|
<div class="cell-item__left">
|
|
|
|
|
|
<h2>根据条件选择</h2>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="cell-item__check" :class="[currIndex === 1 ? 'active' : '']"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2022-05-24 17:52:33 +08:00
|
|
|
|
<div class="user-wrapper" v-if="userList.length">
|
|
|
|
|
|
<div class="user" v-for="(item, index) in userList" :key="index">
|
2022-05-24 18:40:56 +08:00
|
|
|
|
<h2 class="user-left">
|
2022-05-24 17:52:33 +08:00
|
|
|
|
<AiOpenData v-if="item" type="userName" :openid="item"></AiOpenData>
|
2022-05-24 18:40:56 +08:00
|
|
|
|
</h2>
|
2022-05-24 17:52:33 +08:00
|
|
|
|
<image src="./images/remove.png" @click="remove(index)" />
|
|
|
|
|
|
</div>
|
2022-05-24 16:31:10 +08:00
|
|
|
|
</div>
|
2022-05-30 17:23:27 +08:00
|
|
|
|
<div class="tips">注:如选中人员未展示,可能是未授权该成员应用权限,需要先对这些成员进行应用授权。 </div>
|
2022-05-24 16:31:10 +08:00
|
|
|
|
<div class="form-btn" hover-class="text-hover" @click="save">保存</div>
|
2022-03-11 16:48:38 +08:00
|
|
|
|
</div>
|
2022-03-09 18:03:11 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-05-24 16:31:10 +08:00
|
|
|
|
import { mapActions } from 'vuex'
|
2022-03-09 18:03:11 +08:00
|
|
|
|
export default {
|
2022-03-11 16:48:38 +08:00
|
|
|
|
name: 'PersonnelSetting',
|
2022-03-09 18:03:11 +08:00
|
|
|
|
|
2022-03-11 16:48:38 +08:00
|
|
|
|
appName: '拍摄人选择',
|
2022-03-09 18:03:11 +08:00
|
|
|
|
|
|
|
|
|
|
data () {
|
|
|
|
|
|
return {
|
2022-05-24 16:31:10 +08:00
|
|
|
|
currIndex: 0,
|
|
|
|
|
|
userList: [],
|
|
|
|
|
|
ticket: '',
|
|
|
|
|
|
count: 0
|
2022-03-09 18:03:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2022-05-24 16:31:10 +08:00
|
|
|
|
onLoad (query) {
|
|
|
|
|
|
this.getInfo(query.id)
|
2022-03-09 18:03:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
2022-05-24 16:31:10 +08:00
|
|
|
|
...mapActions(['selectPrivilegedContact']),
|
|
|
|
|
|
|
2022-03-11 16:48:38 +08:00
|
|
|
|
linkTo (url) {
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url
|
|
|
|
|
|
})
|
2022-05-24 16:31:10 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2022-05-24 17:52:33 +08:00
|
|
|
|
remove (index) {
|
|
|
|
|
|
this.userList.splice(index, 1)
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2022-05-24 16:31:10 +08:00
|
|
|
|
save () {
|
|
|
|
|
|
if (this.currIndex === 1 && !this.userList.length) {
|
|
|
|
|
|
return this.$u.toast('请选择人员')
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-05-25 17:50:44 +08:00
|
|
|
|
uni.$emit('watermarkChange', {
|
2022-05-24 16:31:10 +08:00
|
|
|
|
type: 'personnel',
|
|
|
|
|
|
value: this.userList.length ? this.userList : []
|
|
|
|
|
|
})
|
|
|
|
|
|
uni.navigateBack({
|
|
|
|
|
|
delta: 1
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
getInfo (id) {
|
|
|
|
|
|
this.$http.post(`/api/appalbum/queryDetailById?id=${id}`).then(res => {
|
|
|
|
|
|
if (res.code === 0) {
|
|
|
|
|
|
this.userList = res.data.albumUserList || []
|
|
|
|
|
|
this.currIndex = (res.data.albumUserList && res.data.albumUserList.length) ? 1 : 0
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
toChoose () {
|
|
|
|
|
|
this.$loading()
|
|
|
|
|
|
this.currIndex = 1
|
|
|
|
|
|
this.selectPrivilegedContact({
|
|
|
|
|
|
fromDepartmentId: 0,
|
|
|
|
|
|
selectedTickets: this.ticket ? [this.ticket] : [],
|
|
|
|
|
|
selectedOpenUserIds: this.userList
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
|
this.userList = res.userList.map(e => e.openUserId) || []
|
|
|
|
|
|
this.ticket = res.selectedTicket || ''
|
|
|
|
|
|
|
|
|
|
|
|
console.log(res)
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
|
})
|
2022-03-11 16:48:38 +08:00
|
|
|
|
}
|
2022-03-09 18:03:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2022-03-11 16:48:38 +08:00
|
|
|
|
.PersonnelSetting {
|
|
|
|
|
|
padding-bottom: 130px;
|
|
|
|
|
|
|
|
|
|
|
|
* {
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-05-24 17:52:33 +08:00
|
|
|
|
.user-wrapper {
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
|
|
|
|
|
|
.user {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2022-05-24 18:40:56 +08:00
|
|
|
|
justify-content: space-between;
|
2022-05-24 17:52:33 +08:00
|
|
|
|
height: 88px;
|
|
|
|
|
|
padding: 0 32px;
|
|
|
|
|
|
border-bottom: 1px solid #DDDDDD;
|
|
|
|
|
|
|
|
|
|
|
|
.user-left {
|
|
|
|
|
|
color: #333333;
|
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
image {
|
|
|
|
|
|
width: 32px;
|
|
|
|
|
|
height: 32px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-03-11 16:48:38 +08:00
|
|
|
|
.form-btn {
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 112px;
|
|
|
|
|
|
line-height: 112px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
font-size: 32px;
|
|
|
|
|
|
background: #1365DD;
|
|
|
|
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
|
|
opacity: 0.8;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tips {
|
|
|
|
|
|
line-height: 44px;
|
|
|
|
|
|
margin: 32px;
|
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
|
color: #999999;
|
|
|
|
|
|
white-space: pre-line;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
|
display: flex;
|
2022-05-27 15:22:18 +08:00
|
|
|
|
padding: 20px 32px;
|
|
|
|
|
|
line-height: 1.3;
|
2022-03-11 16:48:38 +08:00
|
|
|
|
|
|
|
|
|
|
h2 {
|
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
color: #666666;
|
|
|
|
|
|
font-size: 32px;
|
|
|
|
|
|
}
|
2022-03-09 18:03:11 +08:00
|
|
|
|
|
2022-03-11 16:48:38 +08:00
|
|
|
|
span {
|
2022-05-27 15:22:18 +08:00
|
|
|
|
flex: 1;
|
2022-03-11 16:48:38 +08:00
|
|
|
|
margin-left: 16px;
|
|
|
|
|
|
color: #999999;
|
|
|
|
|
|
font-size: 30px;
|
2022-05-27 15:22:18 +08:00
|
|
|
|
text-align: justify;
|
2022-03-11 16:48:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cell-group {
|
|
|
|
|
|
.cell-item {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
height: 108px;
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
padding: 0 32px;
|
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
|
|
background: #eee;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
image {
|
|
|
|
|
|
width: 32px;
|
|
|
|
|
|
height: 32px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
h2 {
|
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
|
color: #333333;
|
|
|
|
|
|
font-size: 32px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
p {
|
|
|
|
|
|
color: #999999;
|
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cell-item__check {
|
|
|
|
|
|
flex-shrink: 1;
|
|
|
|
|
|
width: 32px;
|
|
|
|
|
|
height: 32px;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
border: 4px solid #CCCCCC;
|
|
|
|
|
|
transition: all ease 0.3s;
|
|
|
|
|
|
|
|
|
|
|
|
&.active {
|
|
|
|
|
|
border: 10px solid #1365DD;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-05-24 16:31:10 +08:00
|
|
|
|
</style>
|