Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
aixianling
2022-09-02 15:43:37 +08:00
8 changed files with 842 additions and 70 deletions

View File

@@ -1,18 +1,17 @@
<template>
<section class="AppPageHome">
<div class="header" :style="`backgroundImage: url(${headerBg});`">
<p>{{label}}</p>
<div class="header" :style="`backgroundImage: url(${appInfo.banner});`">
<p>{{appInfo.title}}</p>
</div>
<div class="content">
<div class="title">{{label}}</div>
<div class="content" v-if="appInfo.wxApplicationList && appInfo.wxApplicationList.length">
<div class="title">{{appInfo.title}}</div>
<div class="app-list">
<div class="item" v-for="(item, index) in appList" :key="index" @click="linkTo(item.url)" :style="item.isBottom ? 'border-bottom: 1px solid #eee;' : ''">
<div class="icon" :style="`backgroundImage: url(${item.icon});`"></div>
<p>{{item.name}}</p>
<div class="item" v-for="(item, index) in appInfo.wxApplicationList" :key="index" @click="linkTo(item.accessPath)">
<img :src="item.icon" alt="" class="icon">
<p>{{item.title}}</p>
</div>
</div>
</div>
</section>
</template>
@@ -23,27 +22,24 @@ export default {
appName: '企微应用配置',
data() {
return {
label: '',
appList: [],
headerBg: '',
cropId: ''
id: '',
appInfo: {},
}
},
onLoad(options) {
this.cropId = options.id
this.id = options.id
// this.id = '7a4701d5641543cca4419488db368d3e'
this.getAppInfo()
},
methods: {
getAppInfo() {
// this.$http.post(`/app/apppartyquestion/checkAnswer`, this.list).then((res) => {
// if (res.code == 0) {
// this.resultInfo = res.data
// this.showAnwser = true
// }
// });
this.$http.post(`/app/appwxapplication/queryDetailById?id=${this.id}`).then((res) => {
if (res.code == 0) {
this.appInfo = res.data
}
});
},
linkTo(url) {
console.log(url)
uni.navigateTo({url})
}
}
@@ -95,8 +91,6 @@ export default {
width: 58px;
height: 58px;
margin: 40px 0 18px 0;
background-size: 100% 100%;
text-align: center;
}
p{
font-size: 28px;
@@ -109,6 +103,9 @@ export default {
.item:nth-of-type(3n) {
border-right: 0;
}
.item:nth-of-type(n+4) {
border-top: 1px solid #eee;
}
}
}
}

View File

@@ -29,9 +29,9 @@
</div>
<AiEmpty description="暂无数据" v-if="!list.length"/>
<AiFixedBtn>
<div class="addBtn iconfont iconfont-iconfangda" @tap="toAdd"></div>
</AiFixedBtn>
<div class="btn">
<div class="addBtn" @click="toAdd">新增群发{{tabIndex==0? '居民群': tabIndex==1? '居民':'朋友圈'}}</div>
</div>
<u-popup v-model="filterShow" mode="bottom" border-radius="14">
<div class="popup">
@@ -196,6 +196,10 @@ export default {
<style lang="scss" scoped>
.AppCooperationPropaganda {
padding-bottom: 130px;
box-sizing: border-box;
::v-deep .AiTopFixed .content {
padding: 0;
}
@@ -309,19 +313,29 @@ export default {
}
}
.addBtn {
width: 96px;
height: 96px;
flex-shrink: 0;
background: $uni-color-primary;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
font-size: 48px;
color: #fff;
border-radius: 50%;
justify-content: center;
align-items: center;
.btn {
position: fixed;
bottom: 0;
left: 0;
background: #FFF;
display: flex;
width: 100%;
height: 128px;
padding: 24px 32px;
box-sizing: border-box;
.addBtn {
flex: 1;
height: 80px;
line-height: 80px;
text-align: center;
border-radius: 8px;
border: 2px solid #CCCCCC;
background: #1365DD;
color: #FFF;
}
}
.popup {
box-sizing: border-box;
// height: 800px;

View File

@@ -2,29 +2,33 @@
<div class="addPropaganda">
<div class="task_name">
<div><span class="color_red">*</span><span class="title">任务名称</span></div>
<u-input v-model="value" type="text" placeholder="请输入" maxlength="15" class="inpt"/>
<u-input v-model="form.taskTitle" type="text" placeholder="请输入" maxlength="15" class="inpt"/>
</div>
<div class="send_scope">
<div><span class="color_red">*</span><span class="title">发送范围</span></div>
<div @click="toSleectScoped">
<span>请选择</span><span><u-icon name="arrow-right" color="#CCD0D3"></u-icon></span>
<span>
<span v-if="!form.sendScope">请选择</span>
<span v-if="form.sendScope">已选择</span>
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
</span>
</div>
</div>
<div class="send_content">
<div class="content_title">
<div><span class="color_red">*</span><span class="title">发送内容</span></div>
<div style="color: #3399FF;">预览</div>
<div style="color: #3399FF;" @click="preview">预览</div>
</div>
<div class="content_text">
<u-input v-model="value" type="textarea" height="372" :auto-height="true" placeholder="请输入政策、活动、节日问候等内容" />
<u-input v-model="content" type="textarea" height="372" :auto-height="true" placeholder="请输入政策、活动、节日问候等内容" maxlength="1300"/>
</div>
<div class="content_fodder">
<!-- <div style="color: #8E8F91;">添加素材</div> -->
<div class="fodder_alls">
<!-- <div class="fodder_add"><u-icon name="plus" color="#CCD0D3" size="32"></u-icon></div> -->
<AiUploader v-model="form.files" placeholder="添加素材" type="file" :limit="9" multiple action="/admin/file/add2"></AiUploader>
<AiUploader :def.sync="files" placeholder="添加素材" type="file" :limit="9" multiple action="/admin/file/add2"></AiUploader>
</div>
</div>
</div>
@@ -32,21 +36,68 @@
<div class="isExamine">
<div class="examineChange">
<div>宣发需要审批</div>
<u-switch v-model="checked" size="40" @change="checked = !!checked"></u-switch>
<u-switch v-model="enableExamine" size="40" @change="enableExamine = !!enableExamine"></u-switch>
</div>
<div class="examine_person" v-if="checked == true" @click="getDeptUser">
<div class="examine_person" v-if="enableExamine == true">
<div><span class="color_red">*</span><span class="title">审批人</span></div>
<div>
<span v-if="userList.length">请选择人员</span><span><u-icon name="arrow-right" color="#CCD0D3"></u-icon></span>
<div v-if="!userList.length">
<div @click="getDeptUser">
<span v-if="!userList.length">请选择人员<u-icon name="arrow-right" color="#CCD0D3"></u-icon></span>
<div v-if="userList.length">
<AiOpenData type="departmentName" :openid="departmentId"/>
</div>
</div>
</div>
<div class="examineChange">
<div>定时发送</div>
<u-switch v-model="isTimedTask" size="40" @change="isTimedTask = !!isTimedTask"></u-switch>
</div>
<div class="examine_person" v-if="isTimedTask == true">
<div><span class="color_red">*</span><span class="title">发送时间</span></div>
<div @click="showTaskTime = true">
<span style="color: '#CCD0D3'" v-if="!form.choiceTime.length">请选择</span>
<span v-if="form.choiceTime.length">{{ form.choiceTime }}</span>
<u-icon name="arrow-right" color="#CCD0D3"/>
</div>
</div>
</div>
<u-picker v-model="showTaskTime" :params="params" mode="time" @confirm="choiceTime"></u-picker>
<div class="mask" v-show="showPopup" @tap="showPopup = false">
<div class="noticeModal" @tap.stop>
<div class="body">
<div class="text_content" v-if="content.length">
<img class="text_left" src="https://cdn.cunwuyun.cn/dvcp/announce/avatar.png" />
<div class="text_right">{{ content }}</div>
</div>
<div class="file_content" v-for="item in files" :key="item.id">
<img class="text_left" src="https://cdn.cunwuyun.cn/dvcp/announce/avatar.png" />
<img class="only_pic" :src="item.url" alt="" v-if="getExtension(item.name) == '.jpg' || getExtension(item.name) == '.jpeg'">
<video controls class="only_video" :src="item.url" v-if="getExtension(item.name) == '.mp4'"></video>
<div class="text_right file_right"
v-if="getExtension(item.name) != '.jpg' && getExtension(item.name) != '.jpeg' && getExtension(item.name) != '.mp4'">
<div class="cont_left">
<h4>{{ item.name }}</h4>
<p>{{ item.fileSizeStr }}</p>
</div>
<div class="cont_right">
<img :src="fileIcon(item.name)" alt="">
</div>
</div>
</div>
</div>
<div class="footer">
<div class="exit" @click="showPopup = false">退出预览</div>
</div>
</div>
</div>
<div class="btn">
<div class="submitBtn">发送</div>
<div class="submitBtn" @click="confirm">发送</div>
</div>
</div>
@@ -59,12 +110,34 @@ export default {
data() {
return {
type: '',
value: '',
checked: false,
form: {
files: []
form: {
taskTitle: '',
wxGroups: [], // 发送范围
contents: [], // 发送内容
enableExamine: '0', // 是否需要审批 0否 1是
examines: [], // 审批人
choiceTime: '', // 定时发送时间
sendScope: '', // 0全部居民群、1按部门选择、2按网格选择
sendType: '0', // 0立即发送、1定时发送
wxGroups: [],
},
enableExamine: false,
isTimedTask: false,
content: '',
files: [],
showTaskTime: false,
userList: [],
showPopup: false,
params: {
year: true,
month: true,
day: true,
hour: true,
minute: true,
second: true,
timestamp: false,
},
flag: false,
}
},
methods: {
@@ -72,6 +145,90 @@ export default {
toSleectScoped() {
uni.navigateTo({url: `./sendScoped?type=${this.type}`})
},
// 预览
preview() {
this.showPopup = true;
},
fileIcon(name) {
if (['.zip', '.rar','.mp4'].indexOf(this.getExtension(name)) !== -1) {
return 'https://cdn.cunwuyun.cn/dvcp/announce/zip.png'
}
if (['.doc', '.docx'].indexOf(this.getExtension(name)) !== -1) {
return 'https://cdn.cunwuyun.cn/dvcp/announce/world.png'
}
if (['.xls', '.xlsx'].indexOf(this.getExtension(name)) !== -1) {
return 'https://cdn.cunwuyun.cn/dvcp/announce/xls.png'
}
if (['.txt'].indexOf(this.getExtension(name)) !== -1) {
return 'https://cdn.cunwuyun.cn/dvcp/announce/txt.png'
}
if (['.pdf'].indexOf(this.getExtension(name)) !== -1) {
return 'https://cdn.cunwuyun.cn/dvcp/announce/pdf.png'
}
if (['.ppt', '.pptx'].indexOf(this.getExtension(name)) !== -1) {
return 'https://cdn.cunwuyun.cn/dvcp/announce/ppt.png'
}
},
getExtension(name) {
return name.substring(name.lastIndexOf('.'))
},
choiceTime(e) {
this.form.choiceTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second
},
confirm() {
if(this.flag) return
const firstContent = [
{
content: this.content,
msgType: '0'
},
]
this.form.contents.push(...firstContent)
const fileLists = this.files.map(item=> {
// if(this.getExtension(item.name)==)
})
if(!this.form.contents.length) {
return this.$u.toast("请输入发送内容")
}
// if(!this.enableExamine) {
// if(!this.form.examines.length) {
// return this.$u.toast("请选择审批人")
// } else {
// this.form.enableExamine = '1'
// }
// }
if(!this.isTimedTask) {
if(!this.form.choiceTime.length) {
return this.$u.toast("请选择发送时间")
}
}
this.$http.post(`/app/appmasssendingtask/addOrUpdate`, { ...this.form }).then(res=>{
this.flag = false
if(res?.code ==0) {
// uni.navigateBack()
this.$u.toast("新增成功")
}
})
},
getDeptUser() {
this.selectEnterpriseContact({
fromDepartmentId: 0,
@@ -90,10 +247,14 @@ export default {
}
},
onShow() {
},
onLoad(o) {
this.type = o.index;
document.title = this.type==0? "群发居民群": this.type==1? "群发居民": "群发朋友圈"
uni.$on('checkedScope', res => {
this.form.sendScope = res.sendScope
})
}
}
</script>
@@ -149,7 +310,7 @@ export default {
.isExamine {
background: #FFF;
padding: 0 32px;
padding: 0px 32px;
box-sizing: border-box;
box-shadow: inset 0px -1px 0px 0px #DDDDDD;
@@ -157,12 +318,14 @@ export default {
.examine_person {
display: flex;
justify-content: space-between;
padding: 26px 0;
padding: 26px 0px;
box-sizing: border-box;
border-top: 2px solid #DDD;
}
.examine_person {
border-top: 2px solid #DDD;
// padding: 26px 0 0 0;
}
}
.color_red {
@@ -171,6 +334,118 @@ export default {
.inpt {
margin-left: 14px;
}
.mask {
position: fixed;
top: 0;
bottom: 0;
margin: 0;
left: 0;
right: 0;
background: rgba(#000, 0.6);
z-index: 202103021409;
width: 100%;
height: 100%;
}
::v-deep .noticeModal {
position: fixed;
left: 50%;
top: 45%;
transform: translate(-50%, -50%);
width: 90%;
height: 85%;
.body {
background: #EBECF0;
border-radius: 16px 16px 0 0;
padding: 32px;
box-sizing: border-box;
height: 100%;
overflow-y: auto;
font-size: 28px;
font-weight: 400;
color: #333;
line-height: 48px;
.text_content,
.file_content {
display: flex;
margin-bottom: 32px;
.text_left {
margin-right: 32px;
width: 84px;
height: 84px;
}
.only_pic {
max-width: 206px;
max-height: 200px;
}
.only_video {
max-width: 284px;
max-height: 160px;
}
.text_right {
width: calc(100% - 116px);
background: #FFF;
border-radius: 10px;
padding: 24px;
box-sizing: border-box;
position: relative;
&::before {
position: absolute;
content: "";
width: 0;
height: 0;
top: 18px;
left: 0;
border-top: 12px solid transparent;
border-bottom: 12px solid transparent;
border-left: 12px solid transparent;
border-right: 12px solid #fff;
transform: translate(-100%, 0%);
}
}
.file_right {
display: flex;
.cont_left {
width: calc(100% - 90px);
h4 {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: normal;
}
p {
color: #888888;
}
}
.cont_right {
width: 84px;
height: 84px;
img {
width: 100%;
height: 100%;
}
}
}
}
}
.footer {
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
background: #FFF;
border-radius: 0 0 16px 16px;
border-top: 2px solid #EEEEEE;
}
}
.btn {
position: fixed;
bottom: 0;

View File

@@ -9,14 +9,14 @@
</div>
<div class="item">
<div>包含标签</div>
<div>
<div @click="toTagsList(0)">
<span>请选择</span>
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
</div>
</div>
<div class="item">
<div>剔除标签</div>
<div>
<div @click="toTagsList(1)">
<span>请选择</span>
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
</div>
@@ -29,6 +29,15 @@
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
</div>
</div>
<div class="items">
<div>性别</div>
<div class="sex">
<span :class="sex == 0? 'active':''" @click="sex = 0">全部</span>
<span :class="sex == 1? 'active':''" @click="sex = 1"></span>
<span :class="sex == 2? 'active':''" @click="sex = 2"></span>
</div>
</div>
<u-calendar v-model="showCalendar" mode="range" @change="selectDate"></u-calendar>
@@ -40,6 +49,7 @@
</template>
<script>
import { mapActions } from "vuex";
export default {
name: "scopedSelect",
data() {
@@ -47,18 +57,50 @@ export default {
type: "",
showCalendar: false,
startTime: '',
endTime: ''
endTime: '',
sex: "0",
userList: [],
userListIds: [],
}
},
methods: {
...mapActions(['selectEnterpriseContact']),
// 选人
selectUser() {},
selectUser() {
if(this.type == "1") { // 部门
this.getDeptUser()
} else if(this.type == "2") { // 网格
uni.navigateTo({url: `./selectGridMember`})
}
},
getDeptUser() {
this.selectEnterpriseContact({
fromDepartmentId: 0,
mode: "multi",
type: ["user"],
// selectedDepartmentIds: this.departList?.map(e => e.id)
selectedUserIds: this.userList?.map(e => e.id)
}).then((res)=>{
console.log(res);
if(res?.userList) {
this.userListIds = res.userList.map(e => e.id)
}
}
).catch((err) => {
console.log(err);
})
},
toTagsList(e) {
uni.navigateTo({url: `./tagsList?type=${e}`})
},
// 选包含标签
selectTags() {},
// selectTags() {},
// 选剔除标签
deleteTags() {},
// deleteTags() {},
// 选时间范围
selectDate(e) {
@@ -70,7 +112,7 @@ export default {
},
onLoad(o) {
this.type = o.type;
document.title = this.type == 0? '按部门选择':'按网格选择'
document.title = this.type == 1? '按部门选择':'按网格选择'
}
}
@@ -88,6 +130,28 @@ export default {
margin-bottom: 8px;
}
.items {
padding: 32px;
box-sizing: border-box;
background: #FFF;
.sex {
margin-top: 32px;
span {
display: inline-block;
width: 30%;
border: 2px solid #CCCCCC;
text-align: center;
padding: 20px 0;
box-sizing: border-box;
margin-right: 16px;
border-radius: 8px;
}
.active {
background: #1365DD;
color: #FFF;
}
}
}
.btn {
position: fixed;

View File

@@ -0,0 +1,306 @@
<template>
<section class="selectGridMember">
<div class="header-middle">
<div class="hint">
<span v-for="(item, index) in selectGridPath" :key="index"><span v-if="index" style="margin:0 4px;">/</span><span
style="color:#3F8DF5" @click="girdNameClick(item, index)">{{ item.girdName }}</span></span>
</div>
<div class="cards" v-for="(item, index) in treeList" :key="item.id" @click="itemClick(item)">
<div class="imges">
<!-- <img src="./images/xzh.png" alt="" class="imgselect" v-if="item.isChecked"
@click.stop="girdClick(item, index)"/>
<img src="./images/xz.png" alt="" class="imgselect" v-else
@click.stop="girdClick(item, index)"/> -->
<img src="./images/gird--select-icon.png" alt="" class="avatras"/>
</div>
<div class="rightes">
<div class="applicationNames">{{ item.girdName }}</div>
<img src="./images/right-icon.png" alt="" class="imgs"/>
</div>
</div>
<div class="userCards" v-for="(e, index) in userList" :key="e.id">
<div class="imges">
<img src="./images/xzh.png" alt="" class="imgselect" v-if="e.isChecked" @click="userClick(e, index)"/>
<img src="./images/xz.png" alt="" class="imgselect" v-else @click="userClick(e, index)"/>
<img src="./images/tx@2x.png" alt="" class="avatras"/>
</div>
<div class="rights fill">
<div class="applicationNames">
<AiOpenData v-if="e.name" type="userName" :openid="e.name" style="display: block;"/>
</div>
<div class="idNumbers">{{ e.phone }}</div>
</div>
</div>
<AiEmpty description="暂无数据" v-if="!hasData"/>
</div>
<div class="subBtn" @click="submit">
<div>确定选择</div>
</div>
</section>
</template>
<script>
export default {
name: "selectGridMember",
appName: "选择人员(网格成员)",
data() {
return {
selected: {},
allData: null,
treeList: [],
selectGridPath: [],
userList: [],
}
},
computed: {
hasData() {
return this.treeList?.length > 0 || this.userList?.length > 0
}
},
onLoad() {
this.selected.id = this.$route.query.id
this.getAllGrids()
},
onShow() {
document.title = '选择人员'
},
methods: {
getAllGrids() {
this.$http.post('/app/appgirdinfo/listByInfo').then((res) => {
if (res?.data) {
let parents = res.data.map(e => e.parentGirdId)
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)}))
this.gridInit()
}
})
},
gridInit() {
this.treeList = this.allData.filter(e => !e.parentGirdId)
this.selectGridPath = [{girdName: "可选范围", id: ''}]
},
itemClick({id, girdName}) {
this.selectGridPath.push({girdName, id})
this.getGridsAndUsersByParent(id)
},
getGridsAndUsersByParent(id) {
this.treeList = this.allData.filter(e => e.parentGirdId == id)
this.userList = []
this.$http.post(`/app/appgirdmemberinfo/listByGirdIdByThree?girdId=${id}`).then((res) => {
if (res?.data) {
this.userList = res.data.map(e => ({...e, isChecked: e.id == this.selected.id}))
}
})
},
girdNameClick(row, index) {
this.userList = []
if (!index) { //第一级别
this.gridInit()
} else {
let length = this.selectGridPath.length - index
this.selectGridPath.splice(index, length)
this.getGridsAndUsersByParent(row.id)
}
},
// girdClick(row, index) {
// if (this.treeList[index].isChecked) {
// //取消
// this.treeList[index].isChecked = false
// this.selected = {}
// } else {
// this.treeList.map((item, i) => {
// item.isChecked = index == i
// })
// this.selected = {...row, kind: "grid"}
// }
// this.$forceUpdate()
// },
userClick(row, index) {
if (this.userList[index].isChecked) {//取消
this.userList[index].isChecked = false
this.selected = {}
} else {
this.userList.map((item, i) => {
item.isChecked = index == i
})
this.selected = {...row, kind: "user"}
}
this.$forceUpdate()
},
submit() {
if (this.selected.id != null) {
uni.navigateBack({
success: () => {
uni.$emit("pagePicker:custom", this.selected)
}
})
} else {
return this.$u.toast('请选择网格或网格员')
}
},
}
}
</script>
<style lang="scss" scoped>
.selectGridMember {
height: 100%;
background: #fff;
.header-top {
background: #fff;
padding: 20px 32px;
}
.header-middle {
padding-bottom: 140px;
.hint {
padding: 28px 20px 28px 32px;
line-height: 56px;
box-shadow: 0 1px 0 0 #e4e5e6;
font-size: 30px;
font-weight: 500;
// word-break: break-all;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.empty-div {
height: 16px;
background: #f5f5f5;
}
.cards {
display: flex;
align-items: center;
height: 120px;
line-height: 120px;
padding: 0 0 0 32px;
.imges {
display: flex;
align-items: center;
.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: calc(100% - 160px);
display: flex;
align-items: center;
margin-left: 32px;
border-bottom: 1px solid #e4e5e6;
.applicationNames {
flex: 1;
min-width: 0;
font-size: 36px;
font-weight: 500;
color: #333333;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.imgs {
width: 40px;
height: 40px;
margin-right: 20px;
}
}
}
.userCards {
display: flex;
align-items: center;
height: 120px;
line-height: 120px;
padding: 0 0 0 32px;
.imges {
display: flex;
align-items: center;
.imgselect {
width: 48px;
height: 48px;
}
.avatras {
width: 74px;
height: 74px;
border-radius: 8px;
margin-left: 36px;
}
}
.rights {
display: flex;
justify-content: space-between;
align-items: center;
margin-left: 32px;
border-bottom: 1px solid #e4e5e6;
padding-right: 40px;
height: inherit;
.applicationNames {
font-size: 36px;
font-weight: 500;
color: #333333;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.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>

View File

@@ -12,7 +12,7 @@
</div>
</div>
</div>
<AiEmpty description="暂无数据" v-if="!userList"/>
<AiEmpty description="暂无数据" v-if="!userList.length"/>
</div>
<div class="subBtn" @click="submit">
<div>确定选择</div>

View File

@@ -28,28 +28,32 @@ export default {
return {
value: '',
checkList: [
{ name: '全部居民群', checked: true },
{ name: '按部门选择', checked: false },
{ name: '按网格选择', checked: false }
{ name: '全部居民群', checked: true, value: '0'},
{ name: '按部门选择', checked: false, value: '1'},
{ name: '按网格选择', checked: false, value: '2' }
],
showContent: false,
type: '',
deptSelect: [],
girdSelect: [],
sendScope: '0',
}
},
methods: {
checkBtn(e) {
this.checkList.forEach(v=> v.checked = false)
e.checked = true
if(e.name == '按部门选择' || e.name == '按网格选择') {
uni.navigateTo({url: `./scopedSelect?type=0`})
} else {
uni.navigateTo({url: `./scopedSelect?type=1`})
if(e.value == '1' || e.value == '2') {
uni.navigateTo({url: `./scopedSelect?type=${e.value}`})
}
this.sendScope = e.value
},
submit() {
uni.navigateBack()
uni.navigateBack({
success: () => {
uni.$emit("checkedScope",{ sendScope: this.sendScope });
}
})
}
},
onLoad(o) {

View File

@@ -0,0 +1,112 @@
<template>
<div class="tagsList">
<div class="tags-group">
<div class="tags-list" v-for="items in subTags" :key="items.id">
<div class="tag_title">{{ items.name }}</div>
<div class="item"
v-for="(item, index) in items.tagList"
:class="[checked.includes(item.id) ? 'active' : '']"
:key="index"
@click="onClick(item.id)">
{{ item.name }}
</div>
</div>
</div>
<div class="btn" @click="submit">
<div>确定</div>
</div>
</div>
</template>
<script>
export default {
name: "tagsList",
data() {
return {
subTags: []
}
},
methods: {
getTags() {
this.$http.post(`/app/wxcp/wxcorptag/listAll`).then(res => {
if (res?.data) {
console.log(res);
// this.subTags = res.data.map(item => {
// return {
// dictName: item.name,
// dictValue: item.id
// }
// })
}
})
},
},
onShow() {
this.getTags()
},
onLoad(o) {
document.title = o.type ==0? '包含标签': '剔除标签'
}
}
</script>
<style lang="scss" scoped>
.tagsList {
.tags-group {
margin-bottom: 16px;
padding: 0 32px 16px;
background: #fff;
& > h2 {
height: 108px;
line-height: 108px;
color: #333333;
font-size: 32px;
}
.tags-list {
display: flex;
flex-wrap: wrap;
line-height: 1;
.item {
height: 64px;
line-height: 64px;
margin: 0 16px 16px 0;
padding: 0 32px;
color: #333333;
font-size: 28px;
background: #F3F4F7;
border-radius: 4px;
max-width: 100%;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
&.active {
color: #fff;
background: #1365DD;
}
}
}
.btn {
position: fixed;
bottom: 0;
left: 0;
z-index: 999;
width: 100%;
height: 112px;
line-height: 112px;
background: #3975C6;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
div {
text-align: center;
}
}
}
}
</style>