This commit is contained in:
liuye
2023-08-25 08:57:49 +08:00
parent 4eb75edac9
commit 4f296e159e
85 changed files with 0 additions and 0 deletions

View File

@@ -1,309 +0,0 @@
<template>
<section class="AppConversation">
<AiTopFixed>
<u-search v-model="keyword" :clearabled="true" placeholder="搜索" :show-action="false" bg-color="#F5F5F5"
search-icon-color="#999" color="#999" height="58" @search="getUserListInit" @clear="getDeptListInit">
</u-search>
<div class="hint">
<span v-for="(item, index) in selectDeptPath" :key="index">
<span v-if="index>0" class="mar-h4">/</span>
<span class="color-3F8DF5" @click="deptNameClick(item, index)">{{ item.name }}</span>
</span>
</div>
</AiTopFixed>
<div class="header-middle">
<div class="cards" v-for="item in treeList" :key="item.id" @click="itemClick(item)">
<div class="imges">
<img src="./img/dept-img.png" alt="" class="avatras"/>
</div>
<div class="rightes">
<div class="applicationNames">{{ item.name }}</div>
</div>
</div>
<div v-if="userList.length">
<div class="userCards" v-for="e in userList" :key="e.id" @click="toList(e)">
<div class="imges">
<img :src="e.avatar" alt="" class="avatras" v-if="e.avatar">
<img src="./img/user-img.png" alt="" class="avatras" v-else/>
</div>
<div class="rights fill">
<div class="applicationNames" v-html="brightenKeyword(e.name, keyword)"></div>
<div class="idNumbers">{{ e.mobile }}</div>
</div>
</div>
</div>
<AiEmpty description="暂无数据" v-if="!hasData"/>
</div>
</section>
</template>
<script>
export default {
name: "AppConversation",
appName: "会话存档",
data() {
return {
selected: [],
allData: null,
treeList: [],
selectDeptPath: [],
userList: [],
keyword: ''
}
},
computed: {
hasData() {
return this.treeList?.length > 0 || this.userList?.length > 0
}
},
onLoad() {
this.getAllDepts()
},
methods: {
isSelected(id, corpId) {
return !!this.selected.find(e => e.id == id && e.corpId == corpId)
},
getAllDepts() {
this.$http.post('/app/wxcp/wxdepartment/listAllByCorp').then((res) => {
if (res?.data) {
let parents = res.data.map(e => e.parentid)
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id), isChecked: this.isSelected(e.id, e.corpId)}))
this.deptInit()
}
})
},
deptInit() {
this.treeList = this.allData.filter(e => !e.parentid)
this.selectDeptPath = [{name: "可选范围", id: ''}]
},
itemClick({id, name, corpId}) {
let index = this.selectDeptPath.findIndex(e => e.id == id && e.corpId == corpId)
if (index == -1) {
this.selectDeptPath.push({name, id, corpId})
this.getDeptsAndUsersByParent(id, corpId)
}
},
getDeptsAndUsersByParent(departmentId, corpId) {
this.treeList = this.allData.filter(e => e.parentid == departmentId && e.corpId == corpId)
this.userList = []
this.$http.post(`/app/wxcp/wxuser/listByDeptId`, null, {
params: {departmentId, status: 1, cid: corpId, name: this.keyword}
}).then(res => {
if (res?.data) {
if(this.keyword) {
res.data.map((item) => {
var nameList = item.name.split(this.keyword)
console.log(nameList)
})
}
this.userList = res.data
}
})
},
getRedWords(contentText, keyword) {
let keywordArray = keyword.split('');
let wordsArray = [];
for(let key of keywordArray){
if(contentText.includes(key)){
wordsArray.push(key)
}
}
return wordsArray;
},
brightenKeyword(contentText, keyword) {
let wordsArray = this.getRedWords(contentText, keyword);
let res = contentText;//res的初始值是不带任何红色格式的
//遍历相同字数组,
for(let word of wordsArray){
const Reg = new RegExp(word, 'i');
//替换每一个相同字
res = res.replace(Reg, `<span style="color: #1365DD;">${word}</span>`);
}
return res;
},
getUserListInit() {
var e = this.selectDeptPath[this.selectDeptPath.length - 1]
if(!e.id) { //第一级 根节点
return this.$u.toast('请选择部门后再搜索人员')
}
this.getDeptsAndUsersByParent(e.id, e.corpId)
},
getDeptListInit() {
var e = this.selectDeptPath[this.selectDeptPath.length - 1]
if(!e.id) { //第一级
this.treeList = this.allData.filter(e => !e.parentid)
this.userList = []
}else {
this.getDeptsAndUsersByParent(e.id || '', e.corpId || '')
}
},
deptNameClick(row, index) {
this.userList = []
if (!index) { //第一级别
this.deptInit()
} else {
let length = this.selectDeptPath.length - index
this.selectDeptPath.splice(index + 1, length)
this.getDeptsAndUsersByParent(row.id, row.corpId)
}
},
itemCheck(row, kind) {
row.isChecked = !row.isChecked
if (row.isChecked) {
this.selected.push({...row, kind})
} else {
let index = this.selected.findIndex(e => e.id == row.id)
this.selected.splice(index, 1)
}
this.$forceUpdate()
},
toList(row) {
uni.navigateTo({url: `./list?id=${row.id}`})
}
}
}
</script>
<style lang="scss" scoped>
.AppConversation {
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;
}
.empty-div {
height: 16px;
background: #f5f5f5;
}
.imges {
display: flex;
align-items: center;
.avatras {
width: 74px;
height: 74px;
border-radius: 8px;
}
}
.cards {
display: flex;
align-items: center;
height: 120px;
line-height: 120px;
padding: 0 0 0 32px;
img {
width: 74px;
height: 74px;
border-radius: 8px;
}
.rightes {
width: calc(100% - 106px);
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 {
flex-shrink: 0;
width: 40px;
height: 40px;
margin-right: 20px;
}
}
}
.userCards {
display: flex;
align-items: center;
height: 120px;
line-height: 120px;
padding: 0 0 0 32px;
.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;
}
}
.color-3F8DF5 {
color: #3F8DF5;
}
.mar-h4 {
margin: 0 4px;
}
}
</style>

View File

@@ -1,632 +0,0 @@
<template>
<div class="conversationDetail">
<AiTopFixed>
<!-- <u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#ffffff"
inactive-color="#666666" :bar-style="barStyle" :active-item-style="activeStyle" active-color="#3975C6 " @change="change">
</u-tabs> -->
<div class="top-search">
<div class="left" @click="isShowDate=true">
<div class="color-999" v-if="!dateList.length">开始时间-结束时间</div>
<div v-else>{{dateList[0]}}{{dateList[1]}}</div>
<img src="./img/del-icon.png" alt="" v-if="dateList.length" @click.stop="clearDate()">
</div>
<div class="right">
<u-search v-model="keyword" :clearabled="true" placeholder="请输入关键词" :show-action="false" bg-color="#F5F5F5"
search-icon-color="#999" color="#999" height="58" @search="getListInit" @clear="getListInit">
</u-search>
</div>
</div>
</AiTopFixed>
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scroll="scroll" v-if="list.length" :style="{height: scrollHeight+'px'}">
<div class="conversation-list">
<div v-for="(item, index) in list" :key="index">
<div class="item" :class="item.userId == id ? 'item-right' : 'item-left'">
<!-- <img src="./img/fail-icon.png" alt="" class="fail-img" v-if="item.userId == user.wxUserId"> -->
<img :src="item.userAvatar" alt="" class="user-img" v-if="item.userId != id && item.userAvatar">
<img src="./img/user-img.png" alt="" class="user-img" v-if="item.userId != id && !item.userAvatar">
<p class="user-name">{{item.userName}}<span>{{item.msgSendTime}}</span></p>
<div class="content">
<span class="cir" v-if="item.msgType == 'text'"></span>
<p class="content-text" v-if="item.msgType == 'text'">{{item.content}}</p>
<div class="img-list" v-if="item.msgType == 'image'">
<img :src="item.sdkFileUrl" alt="" @click="previewImage(item.sdkFileUrl)">
</div>
<audio :src="item.sdkFileUrl" controls style="display: block;" v-if="item.msgType == 'voice'"></audio>
<video :src="item.sdkFileUrl" v-if="item.msgType == 'video'" />
<div class="file" @click="prevFile(item)" v-if="item.msgType == 'file'">
<u-row justify="between">
<label class="left">
<img :src="$cdn + 'common/appendix.png'" alt="">
<span>{{ item.sdkFileName }}</span>
</label>
<span>{{ item.fileSizeStr }}</span>
</u-row>
</div>
<div class="revoke-text" v-if="item.msgType == 'revoke'">{{item.userName}}撤回了一条消息</div>
<div class="revoke-text" v-if="item.msgType == 'disagree'">对方不同意会话存档内容你将无法继续提供服务</div>
<div class="revoke-text" v-if="item.msgType == 'agree'">对方同意会话存档内容你可以继续提供服务</div>
<div class="card-info" v-if="item.msgType == 'card'" @click="openUser(item.type, item.cardUserId)">
<div class="top">
<div class="card-left">
<h3>{{item.cardCorpName}}</h3>
<p>{{item.cardUserName}}</p>
<!-- <div>{{item.cardUserId}}</div> -->
</div>
<div class="card-right">
<img :src="item.cardUserAvatar" alt="" v-if="item.cardUserAvatar">
<img src="./img/user-img.png" alt="" v-else>
</div>
</div>
<div class="bottom">个人名片</div>
</div>
<img :src="item.sdkFileUrl" alt="" v-if="item.msgType == 'emotion'" :style="[{width: item.width/2+'px'}, {height: item.height/2+'px'}]">
<div class="map-info" v-if="item.msgType == 'location'" @click="openMap(item)">
<map style="width: 100%; height: 100%;" :latitude="item.lat" :longitude="item.lng" :scale="item.zoom" :enable-zoom="false" :enable-scroll="false">
<cover-view style='width:100%;height:100%'></cover-view>
</map>
<div class="address-text">
<p>{{item.title}}</p>
<p>{{item.address}}</p>
</div>
</div>
<div class="card-info" v-if="item.msgType == 'weapp'" @click="openApp(item)">
<div class="top">
<div class="card-left">
<h3 class="display-name">{{item.displayName}}</h3>
<p>{{item.title}}</p>
</div>
<div class="card-right">
<img src="./img/app-icon.png" alt="" >
</div>
</div>
<div class="bottom"><img src="./img/app-mini-icon.png" alt="" >小程序</div>
</div>
<div class="card-info" v-if="item.msgType == 'link'" @click="openLink(item)">
<div class="top">
<div class="card-left">
<p>{{item.title}}</p>
<div>{{item.username}}</div>
</div>
<div class="card-right" v-if="item.imageUrl">
<img :src="item.imageUrl" alt="" >
</div>
</div>
<div class="bottom">分享链接</div>
</div>
</div>
<img :src="item.userAvatar" alt="" class="user-img" v-if="item.userId == id">
<!-- <img src="./img/fail-icon.png" alt="" class="fail-img" v-if="item.userId != user.wxUserId"> -->
</div>
</div>
</div>
</scroll-view>
<AiEmpty v-else/>
<u-calendar v-model="isShowDate" @change="onDateChange" mode="range"></u-calendar>
<!-- <div class="footer" @click="toGroup">{{type == 1 ? '群详情' : '个人信息'}}</div> -->
</div>
</template>
<script>
import {mapState, mapActions} from "vuex";
export default {
name: "conversationDetail",
data() {
return {
tabList: [
{name: '全部', value: ''},
{name: '图片/视频', value: 'imagevideo'},
{name: '语音', value: 'voice'},
{name: '文件', value: 'file'},
],
currentTabs: 0,
barStyle: {
'width': '24px',
'height': '2px',
'border-radius': '0',
'bottom': '5px'
},
activeStyle: {
'font-weight' : '400',
'color': '#000000'
},
keyword: '',
toUserId: '',
roomId: '',
current: 1,
pages: 2,
list: [],
type: '',
isShowDate: false,
dateList: [],
scrollTop: 0,
scrollHeight: '',
preveHeight: '',
id: ''
};
},
computed: {
...mapState(['user']),
},
onLoad(option) {
if(option.toUserId) {
this.toUserId = option.toUserId
}else {
this.roomId = option.roomId
}
this.type = option.type
this.id = option.id
this.getList()
console.log()
this.scrollHeight = uni.getSystemInfoSync().windowHeight - 150
this.injectJWeixin('openLocation')
},
onShow() {
document.title = '会话详情'
},
// onPullDownRefresh() {
// if(this.current > this.pages) {
// uni.stopPullDownRefresh()
// return this.$u.toast('已加载完成,没有更多数据')
// }else {
// this.current ++
// this.getList()
// setTimeout(() => {
// uni.stopPullDownRefresh()
// }, 1000)
// }
// },
methods: {
scroll(e) {
if(e.detail.scrollTop == 0) {
if(this.current > this.pages) {
return this.$u.toast('已加载完成,没有更多数据')
}else {
this.current ++
this.getList()
}
}
},
toGroup() {
if(this.type == 1) {
uni.navigateTo({url: `./groupDetail`})
}else {
uni.navigateTo({url: `./userInfo`})
}
},
change(index) {
this.keyword = ''
this.currentTabs = index
this.getListInit()
},
onDateChange (e) {
this.dateList = [e.startDate, e.endDate]
this.getListInit()
},
clearDate() {
this.dateList = []
this.getListInit()
},
getListInit() {
this.current = 1
this.pages = 2
this.list = []
this.getList()
},
getList() {
if(this.current > 1) {
uni.createSelectorQuery().select(".conversation-list").boundingClientRect((res) => {
this.preveHeight = res.height
}).exec();
}
this.$http.post(`/app/appsessionarchiveinfo/listForXbot`, null, {
params: {
current: this.current,
size: 10,
msgType: this.tabList[this.currentTabs].value,
// msgType: 'link',
userId: this.id,
toUserId: this.toUserId,
roomId: this.roomId,
type: this.type,
content: this.keyword,
startTime: this.dateList.length ? this.dateList[0] : '',
endTime: this.dateList.length ? this.dateList[1] : ''
}
}).then(res=> {
if(res?.data) {
res.data.records.map((item) => {
if(item.msgType == 'location') {
item.covers = [{
latitude: item.lat,
longitude: item.lng,
label: {
content: item.address
},
callout: {
content: item.title
}
}]
}
})
this.list = this.current > 1 ? [ ...res.data.records, ...this.list]: res.data.records
this.pages = res.data.pages
this.$nextTick(() => {
uni.createSelectorQuery().select(".conversation-list").boundingClientRect((res) => {
if(this.current == 1) {
this.scrollTop = res.height - this.scrollHeight
}else {
this.scrollTop = res.height - this.preveHeight
}
}).exec();
})
}
})
},
previewImage(img) {
uni.previewImage({
urls: [img],
current: img
})
},
...mapActions(['previewFile', 'injectJWeixin']),
prevFile(file) {
var fileInfo = {url: file.sdkFileUrl, name: file.sdkFileName, size: file.fileSizeStr}
this.$loading()
this.previewFile({ ...fileInfo }).then(()=>{
this.$hideLoading()
})
},
openLink(row) {
window.open(row.linkUrl);
},
openApp(row) {
uni.navigateToMiniProgram({
// appId: row.goodsJdAppid,
// path: row.goodsJdUrl
})
},
openUser(type, userid) { //缺少名片人员区分内部还是外部
console.log(row)
// userid && this.injectJWeixin('openUserProfile').then(() => {
// this.wxInvoke(['openUserProfile', {type, userid}, () => 0])
// })
},
openMap(row) {
wx.openLocation({
latitude: row.lat, // 纬度浮点数范围为90 ~ -90
longitude: row.lng, // 经度浮点数范围为180 ~ -180。
name: row.title, // 位置名
address: row.address, // 地址详情说明
scale: row.zoom, // 地图缩放级别,整形值,范围从1~28。默认为16
fail: () => {
location.reload()
}
});
}
},
onReachBottom() {
// this.current ++
// this.getList()
}
};
</script>
<style lang="scss" scoped>
.conversationDetail {
height: 100%;
::v-deep .AiTopFixed {
.placeholder {
.content {
padding: 0 !important;
}
}
.fixed {
margin: 0 !important;
.content {
padding: 0 !important;
}
}
}
.top-search {
padding: 20px 32px;
display: flex;
.left {
width: 400px;
div {
display: inline-block;
line-height: 64px;
}
img {
display: inline-block;
width: 32px;
height: 32px;
margin-left: 8px;
vertical-align: middle;
}
}
.right {
width: calc(100% - 400px);
}
}
.conversation-list {
padding: 48px 32px 160px;
// background-color: #EBECF0;
.item {
margin-bottom: 48px;
display: flex;
position: relative;
.user-name {
position: absolute;
top: 0;
left: 24px;
font-family: PingFangSC-Regular;
font-size: 22px;
color: #666;
padding:0 0 0 64px;
span {
display: inline-block;
margin: 0 12px;
font-family: PingFangSC-Regular;
font-size: 20px;
color: #999;
}
}
.user-img {
width: 72px;
height: 72px;
margin-right: 20px;
border-radius: 50%;
}
.content {
max-width: calc(100% - 144px);
position: relative;
margin-top: 44px;
.cir {
width: 0px;
height: 0px;
border: 10px solid transparent;
position: absolute;
top: 20px;
}
.content-text {
display: inline-block;
padding: 14px 54px 14px 32px;
width: 100%;
background-color: #fff;
font-family: PingFangSC-Regular;
font-size: 32px;
color: #333;
word-break: break-all;
box-sizing: border-box;
}
}
.fail-img {
width: 32px;
height: 32px;
margin: auto 0 auto 24px;
}
.img-list {
img {
max-width: 400px;
margin: 0 16px 16px 0;
}
}
::v-deep .uni-audio-default {
height: 72px;
width: 280px!important;
min-width: 0!important;
}
::v-deep .uni-audio-left {
height: 72px;
width: 72px;
.uni-audio-button {
margin: 14px;
}
}
::v-deep .uni-audio-right {
height: 72px;
margin-left: 72px;
padding: 10px 32px 10px 0;
}
.revoke-text {
line-height: 54px;
padding: 0 24px;
border-radius: 8px;
background-color: #EEE;
color: #999;
margin-top: 16px;
}
.file {
height: 128px;
background: #FFFFFF;
border-radius: 8px;
border: 1px solid #CCCCCC;
box-sizing: border-box;
padding: 0 16px;
margin-bottom: 32px;
& > .u-row {
height: 100%;
.left {
width: 522px;
display: flex;
align-items: center;
& > img {
width: 96px;
height: 96px;
}
& > span {
font-size: 32px;
color: #333333;
display: inline-block;
line-height: 44px;
text-overflow: ellipsis;
overflow-x: hidden;
white-space: nowrap;
}
}
& > span {
font-size: 28px;
color: #999;
margin: -8px 0 0 16px;
}
}
}
.card-info {
width: 450px;
background: #FFF;
.top {
padding: 16px 32px;
display: flex;
.card-left {
width: calc(100% - 120px);
h3 {
font-family: PingFangSC-Regular;
font-size: 32px;
color: #333;
line-height: 44px;
margin-bottom: 30px;
}
p {
font-family: PingFangSC-SNaNpxibold;
font-size: 32px;
color: #333;
line-height: 44px;
}
div {
font-family: PingFangSC-Regular;
font-size: 24px;
color: #999;
line-height: 34px;
}
.display-name {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 24px;
color: #999;
line-height: 34px;
margin-bottom: 10px;
}
}
.card-right {
img {
width: 84px;
height: 84px;
}
}
}
.bottom {
padding-left: 32px;
line-height: 48px;
font-family: PingFangSC-Regular;
font-size: 22px;
color: #999;
border-top: 1px solid #eee;
img {
width: 20px;
height: 20px;
margin-right: 8px;
}
}
}
.map-info {
width: 560px;
height: 400px;
.address-text {
position: absolute;
bottom: 0;
left: 0;
width: 560px;
background-color: rgba(0, 0, 0, .7);
p {
color: #fff;
line-height: 44px;
font-size: 24px;
padding-left: 32px;
word-break: break-all;
}
}
}
}
.item-left {
.content {
.cir {
left: -18px;
border-right-color: #fff;
}
}
}
.item-right {
width: 100%;
justify-content: right;
.user-name {
left: 0;
right: 82px;
text-align: right;
}
.user-img {
margin: 0 0 0 20px;
}
.content {
.cir {
border-left-color: #C7E7FE;
right: -18px;
}
.content-text {
background-color: #C7E7FE;
padding: 14px 32px 14px 54px;
}
.img-list {
img {
max-width: 400px;
margin: 0 0 16px 16px;
}
}
}
.fail-img {
margin: auto 24px auto 0;
}
}
}
.footer{
width: 100%;
height: 112px;
line-height: 112px;
background: #1365DD;
box-shadow: inset 0px 1px 0px 0px #EEEEEE;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
text-align: center;
position: fixed;
bottom: 0;
left: 0;
z-index: 99;
}
}
</style>

View File

@@ -1,127 +0,0 @@
<template>
<div class="groupDetail">
<div class="bg-fff">
<div class="group-info">
<img src="./img/down-icon.png" alt="">
<div>
<h3>县政法委</h3>
<p>群成员45</p>
</div>
</div>
<img src="./img/down-icon.png" alt="" class="group-img">
<p class="text">使用微信或企业微信扫码加入</p>
<div class="btn">申请加入群聊</div>
<div class="btn">进入群聊</div>
</div>
<div class="flex">
<div class="item">
<img src="./img/retransmission-icon.png" alt="">
<p>转发到聊天</p>
</div>
<div class="item">
<img src="./img/wechat-icon.png" alt="">
<p>分享到微信</p>
</div>
<div class="item">
<img src="./img/down-icon.png" alt="">
<p>保存到相册</p>
</div>
</div>
</div>
</template>
<script>
export default {
name: "groupDetail",
appName: "群详情",
data() {
return {
};
},
onShow() {
},
methods: {
},
};
</script>
<style lang="scss" scoped>
.groupDetail {
height: 100vh;
background-color: #f5f5f5;
.bg-fff {
background-color: #fff;
margin: 48px 32px 52px;
padding: 64px 32px 72px;
.group-info {
display: flex;
margin-bottom: 72px;
img {
width: 96px;
height: 96px;
margin: 0 20px 0 40px;
}
h3 {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 36px;
color: #333;
line-height: 52px;
margin-bottom: 4px;
}
p {
font-family: PingFangSC-Regular;
font-size: 28px;
color: #999;
}
}
.group-img {
width: 386px;
height: 386px;
margin: 0 0 40px 118px;
}
.text {
text-align: center;
font-family: PingFangSC-Regular;
font-size: 28px;
color: #666;
margin-bottom: 80px;
}
.btn {
width: 100%;
height: 100px;
text-align: center;
line-height: 100px;
background: #3975C6;
border-radius: 8px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 32px;
color: #FFF;
margin-bottom: 32px;
}
}
.flex {
padding: 0 100px;
display: flex;
justify-content: space-between;
.item {
text-align: center;
img {
width: 62px;
height: 62px;
margin-bottom: 4px;
}
p {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 26px;
color: #999;
}
}
}
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -1,285 +0,0 @@
<template>
<div class="conversation-list">
<AiTopFixed>
<!-- <u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6"
inactive-color="#A1C1E8" :bar-style="barStyle" :active-item-style="activeStyle" active-color="#ffffff " @change="change">
</u-tabs> -->
<div class="top-search">
<div class="left">
<AiPagePicker type="dept" :selected.sync="deptUserList" nodeKey="id" single @select="deptSelect">
<span class="label" v-if="deptUserList.length">{{deptUserList[0].name}}</span>
<span v-else style="color:#999;">部门名称</span>
<div class="clear-btn" v-if="deptUserList.length" @click.stop="clearDept">
<img src="./img/del-icon.png" alt="" class="del-icon">
</div>
<u-icon name="arrow-down" color="#999" size="24" style="margin-left:8px;" v-else/>
</AiPagePicker>
</div>
<div class="right">
<u-search v-model="keyword" :clearabled="true" :placeholder="currentTabs != 1 ? '请输入群名称' : '请输入昵称'" :show-action="false" bg-color="#F5F5F5"
search-icon-color="#999" color="#999" height="58" @search="getListInit" @clear="getListInit">
</u-search>
</div>
</div>
<!-- <div class="top-search">
<div class="left">
<u-search v-model="keyword" :clearabled="true" :placeholder="currentTabs != 1 ? '请输入群名称' : '请输入昵称'" :show-action="false" bg-color="#F5F5F5"
search-icon-color="#999" color="#999" height="58" @search="getListInit" @clear="getListInit">
</u-search>
</div>
</div>
<div class="top-select">
<div class="item">
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="areaSelect" :name.sync="areaName" style="color: #666" selectRoot>
<span style="margin-left: 4px" v-if="areaName">{{ areaName }}</span>
<span v-else style="color:#999;">行政区划</span>
<u-icon name="arrow-down" color="#999" size="28" style="margin-left: 4px" />
</AiAreaPicker>
</div>
<div class="item">
<AiPagePicker type="dept" :selected.sync="deptUserList" nodeKey="id" single @select="deptSelect">
<span class="label" v-if="deptUserList.length">{{deptUserList[0].name}}</span>
<span v-else style="color:#999;">部门名称</span>
<u-icon name="arrow-down" color="#999" size="24" style="margin-left:8px;"/>
</AiPagePicker>
</div>
</div> -->
</AiTopFixed>
<div class="user-list" v-if="list.length">
<div class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item)">
<img :src="item.toUserAvatar" alt="" v-if="currentTabs == 1">
<img src="./img/group-img.png" alt="" v-else>
<div class="item-border">
<div class="flex-left">
<p>{{currentTabs == 1 ? item.toUserName : item.roomName}}</p>
</div>
<div class="flex-right" :class="`type`+item.userType" v-if="item.userType > 0">{{item.userType == 1 ? '内部' : '外部'}}</div>
</div>
</div>
</div>
<AiEmpty v-else/>
</div>
</template>
<script>
import {mapState} from "vuex";
export default {
name: "conversationList",
data() {
return {
tabList: [
{name: '群聊会话'},
{name: '私聊会话'},
],
currentTabs: 0,
barStyle: {
'width': '24px',
'height': '2px',
'border-radius': '0',
'bottom': '5px'
},
activeStyle: {
'font-weight' : '400',
},
keyword: '',
areaId: '',
areaName: '',
current: 1,
pages: 2,
list: [],
deptUserList: [],
id: ''
};
},
computed: {
...mapState(['user']),
},
onLoad(options) {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
// this.deptUserList = [{id: this.user.departId, name: this.user.departName}]
this.id = options.id
this.getList()
},
onShow() {
document.title = '群聊会话'
},
methods: {
clearDept() {
this.deptUserList = []
this.getListInit()
},
change(index) {
this.keyword = ''
this.currentTabs = index
this.getListInit()
},
getListInit() {
this.current = 1
this.pages = 2
this.list = []
this.getList()
},
areaSelect(e) {
this.areaId = e
this.getListInit()
},
deptSelect(e) {
this.deptUserList = e
this.getListInit()
},
getList() {
if(this.current > this.pages) return
this.$http.post(`/app/appsessionarchiveindex/listForXbot`, null, {
params: {
current: this.current,
size: 15,
type: this.currentTabs == 1 ? 0 : 1,
// areaId: this.areaId,
userId: this.id,
toUserName: this.currentTabs == 1 ? this.keyword : '',
roomName: this.currentTabs == 1 ? '' : this.keyword,
departmentId: this.deptUserList.length ? this.deptUserList[0].id : ''
}
}).then(res=> {
if(res?.data) {
res.data.records.map((item) => {
if(item.type == 1) {
item.userType = item.roomType
}else {
item.userType = item.toUserType
}
})
this.list = this.current > 1 ? [...this.list, ...res.data.records]: res.data.records
this.pages = res.data.pages
}
})
},
toDetail(row) {
var query = row.type == 1 ? `?roomId=${row.roomId}` : `?toUserId=${row.toUserId}`
uni.navigateTo({ url: `./conversationDetail${query}&type=${row.type}&id=${this.id}`})
}
},
onReachBottom() {
this.current ++
this.getList()
}
};
</script>
<style lang="scss" scoped>
.conversation-list {
height: 100%;
::v-deep .AiTopFixed {
.placeholder {
.content {
padding: 0 !important;
}
}
.fixed {
margin: 0 !important;
.content {
padding: 0 !important;
}
}
}
.top-search {
padding: 20px 32px;
display: flex;
.left {
width: 350px;
line-height: 64px;
.clear-btn {
display: inline-block;
padding: 0 16px;
}
.del-icon {
width: 32px;
height: 32px;
vertical-align: middle;
}
}
.right {
width: calc(100% - 350px);
}
}
.top-select {
display: flex;
padding: 28px 0;
.item {
flex: 1;
padding: 0 8px;
text-align: center;
span {
display: inline-block;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28px;
color: #666;
line-height: 40px;
}
}
}
.user-list {
border-top: 1px solid #eee;
background-color: #fff;
.item {
padding: 24px 0 0 32px;
display: flex;
.item-border {
width: calc(100% - 112px);
padding-right: 32px;
display: flex;
justify-content: space-between;
border-bottom: 1px solid #eee;
}
.flex-left {
padding-right: 8px;
box-sizing: border-box;
}
.flex-right {
font-size: 24px;
margin-top: 26px;
width: 78px;
height: 34px;
line-height: 34px;
text-align: center;
border-radius: 4px;
}
.type1 {
background-color: #EAF4FF;
color: #267EF0;
}
.type2 {
background-color: #FDEEE1;
color: #FB7D29;
}
img {
width: 80px;
height: 80px;
border-radius: 50%;
margin-right: 32px;
}
p {
padding-bottom: 32px;
width: calc(100% - 112px);
line-height: 80px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 32px;
color: #333;
letter-spacing: 0.3px;
display: inline-block;
vertical-align: top;
width: 100%;
}
}
.item:nth-last-child(1) {
p {
border-bottom: 0;
}
}
}
}
</style>

View File

@@ -1,110 +0,0 @@
<template>
<div class="triggerAlarm">
<div class="trigger-list">
<div class="item">
<div class="top">
<div class="title-flex">
<p>敏感词告警</p>
<span>2023-02-22 12:23:23</span>
</div>
<p class="item-content">群主为李白的群会话网格群14xxxx居民触发敏感词<span>法轮功</span>请及时处置</p>
</div>
<div class="bottom">
<p>查看详情</p>
<u-icon name="arrow-right" color="#999" size="28"></u-icon>
</div>
</div>
<div class="item">
<div class="top">
<div class="title-flex">
<p>敏感词告警</p>
<span>2023-02-22 12:23:23</span>
</div>
<p class="item-content">群主为李白的群会话网格群14xxxx居民触发敏感词<span>法轮功</span>请及时处置</p>
</div>
<div class="bottom">
<p>查看详情</p>
<u-icon name="arrow-right" color="#999" size="28"></u-icon>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "triggerAlarm",
data() {
return {
};
},
onShow() {
document.title = '触发告警'
},
methods: {
},
};
</script>
<style lang="scss" scoped>
.triggerAlarm {
height: 100vh;
background-color: #F5F5F5;
.trigger-list {
padding: 32px 0 0 32px;
.item {
width: calc(100% - 32px);
background: #FFF;
border-radius: 16px;
margin-bottom: 32px;
.top {
padding: 32px;
.title-flex {
display: flex;
justify-content: space-between;
margin-bottom: 16px;
p {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28px;
color: #000;
line-height: 28px;
}
span {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 26px;
color: #999;
line-height: 24px;
}
}
.item-content {
color: #666;
font-size: 26px;
font-family: PingFangSC;
font-weight: 400;
line-height: 40px;
span {
color: #E6736E;
}
}
}
.bottom {
display: flex;
justify-content: space-between;
padding: 24px 32px;
border-top: 1px solid #eee;
p {
font-family: PingFangSC-Regular;
font-size: 24px;
color: #666;
line-height: 24px;
}
}
}
}
}
</style>

View File

@@ -1,87 +0,0 @@
<template>
<div class="userInfo">
<div class="user-info">
<img src="./img/user-img.png" alt="" class="user-img">
<div class="user-name">
<h3>卓作旺<img src="./img/ic-man@2x.png" alt=""></h3>
<p>出差ing</p>
</div>
</div>
<div class="btn">添加联系人为好友</div>
<div class="btn bg-fff">发消息</div>
</div>
</template>
<script>
export default {
name: "userInfo",
data() {
return {
};
},
onShow() {
document.title = '个人信息'
},
methods: {
},
};
</script>
<style lang="scss" scoped>
.userInfo {
height: 100vh;
background-color: #F5F5F5;
.user-info {
display: flex;
padding: 40px 32px;
background-color: #fff;
margin-bottom: 40px;
.user-img {
width: 120px;
height: 120px;
margin-right: 24px;
}
.user-name {
margin-top: 6px;
h3 {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 36px;
color: #333;
line-height: 50px;
margin-bottom: 18px;
img {
width: 24px;
height: 24px;
margin-left: 8px;
}
}
p {
font-family: PingFangSC-Regular;
font-size: 28px;
color: #999;
line-height: 40px;
}
}
}
.btn {
width: calc(100% - 64px);
margin: 0 0 32px 32px;
height: 112px;
line-height: 112px;
text-align: center;
background: #3975C6;
border-radius: 8px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 32px;
color: #FFF;
}
.bg-fff {
background-color: #fff;
color: #000;
}
}
</style>

View File

@@ -1,154 +0,0 @@
<template>
<div class="AppDataOverview">
<div class="head">
<div class="head_title">
<span>数据总览</span>
<span>数据截至 昨日24:00</span>
</div>
<div class="head_data">
<div class="head_data_item" v-for="(e,ind) in monthData" :key="ind">
<span class="dot"></span>
<span>{{ e }} {{ data[e] }}</span>
</div>
</div>
</div>
<div class="information">
<div class="u-sub">
<u-subsection :list="list" :current="current" @change="sectionChange"></u-subsection>
</div>
<div class="card_list">
<div class="card" v-for="(item,index) in dataArray" :key="index">
<div class="card_name">{{ item }}</div>
<div class="card_num">{{ Number(data[item]).toLocaleString('en-US') }}</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "AppDataOverview",
data() {
return {
list: [
{ name: '本周' },
{ name: '本月' }
],
current: 0,
data: {},
dataArray: ['新增居民档案','居民档案更新','新增网格员','新增走访记录','新增矛盾调解','新增宣发记录'],
monthData: ['本月访问次数','本月访问人数'],
beginDate: ''
}
},
onShow() {
this.getData()
},
methods: {
sectionChange(e) {
this.current = e
this.getData()
},
getData() {
this.$http.post(`/app/appwxcpopenstatistics/statistics`,null, {
params: {
beginDate: this.beginDate,
type: this.current==0? '1':'2'
}
}).then(res=> {
if(res?.data) {
this.data = res.data
}
})
}
},
onLoad(o) {
document.title = '慧政务'
this.beginDate = o.beginDate
}
}
</script>
<style lang="scss" scoped>
.AppDataOverview {
.head {
height: 212px;
background: #3975C6;
.head_title {
color: #FFFFFF;
padding: 32px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
span:first-child {
font-size: 44px;
}
span:last-child {
font-size: 24px;
}
}
.head_data {
display: flex;
padding: 0 32px;
box-sizing: border-box;
.head_data_item {
flex: 1;
color: #FFFFFF;
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 4px;
background: #FFFFFF;
margin-right: 8px;
}
}
}
}
.information {
width: 100%;
border-radius: 16px;
padding: 32px;
box-sizing: border-box;
.u-sub {
padding: 32px;
box-sizing: border-box;
background: #FFFFFF;
border-radius: 16px 16px 0 0;
}
.card_list {
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
background: #FFFFFF;
padding: 0 32px;
box-sizing: border-box;
border-radius: 0 0 16px 16px;
.card {
width: 50%;
height: 160px;
text-align: center;
.card_name {
margin-top: 32px;
color: #666666;
}
.card_num {
font-size: 36px;
color: #000000;
font-weight: 600;
margin-top: 12px;
}
}
}
}
}
</style>

View File

@@ -1,160 +0,0 @@
<template>
<div class="AppDataStatistics">
<AiTopFixed v-if="tabIndex != 1">
<div class="area-content">
<!-- <AiAreaPicker v-model="areaId" :name.sync="areaName" :area-id="user.areaId" @select="areaSelect">
<div flex>
<img src="./img/location.png" alt="" class="icon-img">
<AiMore v-model="areaName" icon="arrow-down"/>
</div>
</AiAreaPicker> -->
<AiPagePicker type="dept" :selected.sync="deptList" nodeKey="id" single @select="deptSelect">
<span class="label" v-if="deptList.length">{{deptList[0].name}}</span>
<span v-else style="color:#fff;">部门名称</span>
<u-icon name="arrow-down" color="#fff" size="24" style="margin-left:8px;"/>
</AiPagePicker>
</div>
</AiTopFixed>
<div class="tab-list">
<div :class="index == tabIndex ? 'tab-item active' : 'tab-item'" v-for="(item, index) in tabList" :key="index" @click="tabClick(index)">{{ item.text }}<span></span></div>
</div>
<component ref='list' :is="tabList[tabIndex].component" :departmentId="departmentId" class="component" />
</div>
</template>
<script>
import sensitive from './components/sensitive'
import wechat from './components/wechat'
import message from './components/message'
import { mapState } from 'vuex'
export default {
name: "AppDataStatistics",
appName: "数据统计",
data() {
return {
tabList: [
{
text: '微信统计',
component: wechat
},
{
text: '会话统计',
component: message
},
{
text: '敏感词统计',
component: sensitive
},
],
tabIndex: 0,
// areaId: '',
// areaName: '',
departmentId: '',
deptList: [],
}
},
computed: {
...mapState(['user'])
},
components: {sensitive, wechat, message},
methods: {
tabClick(index) {
this.tabIndex = index
},
toOverData() {
uni.navigateTo({url:'./AppDataOverview'})
},
areaSelect(e) {
this.areaId = e
this.refreshList()
},
deptSelect(e) {
this.deptList = e
this.departmentId = e[0].id
this.refreshList()
},
refreshList() {
this.$nextTick(() => this.$refs.list.getData())
},
refreshTally() {
this.$http.post('/app/appwxcpopenstatistics/tally').then(res=> {
if(res.code == 0) {
console.log('手动触发成功');
}
})
}
},
onLoad() {
this.deptList = [{name: this.user.departName, id: this.user.departId}]
this.departmentId = this.user.departId
// this.refreshTally()
},
onShow() {
document.title = "数据统计"
// this.areaId = this.user.areaId
// this.areaName = this.user.areaName
},
}
</script>
<style lang="scss" scoped>
.AppDataStatistics {
width: 100%;
height: 100%;
background-color: #F5F6F7;
padding-bottom: 112px;
::v-deep .AiTopFixed {
.content {
background-color: #3975C6;
color: #fff;
}
.icon-img{
width: 48px;
height: 48px;
}
}
::v-deep .AiMore{
span{
color: #fff;
}
}
.tab-list {
width: 100%;
line-height: 88px;
display: flex;
background-color: #fff;
position: fixed;
z-index: 9;
.tab-item {
flex: 1;
text-align: center;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
position: relative;
}
.active {
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #000;
span {
position: absolute;
bottom: 0;
left: 50%;
margin-left: -25px;
width: 50px;
height: 6px;
background: #3399FF;
border-radius: 4px;
}
}
}
.component{
padding-top: 88px;
}
}
</style>

View File

@@ -1,486 +0,0 @@
<template>
<div class="message">
<div class="head">
<span>消息回复率</span>
</div>
<div class="echarts_list">
<div id="echarts1"></div>
<div id="echarts2"></div>
<div id="echarts3"></div>
</div>
<div class="head">
<span>单聊统计</span>
</div>
<div class="card">
<div class="item" :class="privateCurrent == 0? 'active':''" @click="privateCurrent = 0,getPrivateData()">
<div class="item_name">单聊会话</div>
<div class="item_num" v-if="privateCard">{{ Number(privateCard.chatCnt).toLocaleString('en-US') }}</div>
<div class="item_num" v-else>0</div>
</div>
<div class="item" :class="privateCurrent == 1? 'active':''" @click="privateCurrent = 1,getPrivateData()">
<div class="item_name">单聊消息</div>
<div class="item_num" v-if="privateCard">{{ Number(privateCard.messageCnt).toLocaleString('en-US') }}</div>
<div class="item_num" v-else>0</div>
</div>
</div>
<div class="privateChat_box">
<div id="privateChat" v-if="privateData.length > 0"></div>
<AiEmpty style="padding-top: 10px;" description="暂无数据" v-else></AiEmpty>
</div>
<div class="head">
<span>群聊统计</span>
</div>
<div class="card">
<div class="item" :class="groupCurrent == 0? 'active':''" @click="groupCurrent = 0,getGroupData()">
<div class="item_name">活跃群聊</div>
<div class="item_num" v-if="groupCard">{{ Number(groupCard.chatHasMsg).toLocaleString('en-US') }}</div>
<div class="item_num" v-else>0</div>
</div>
<div class="item" :class="groupCurrent == 1? 'active':''" @click="groupCurrent = 1,getGroupData()">
<div class="item_name">活跃群成员</div>
<div class="item_num" v-if="groupCard">{{ Number(groupCard.memberHasMsg).toLocaleString('en-US') }}</div>
<div class="item_num" v-else>0</div>
</div>
<div class="item" :class="groupCurrent == 2? 'active':''" @click="groupCurrent = 2,getGroupData()">
<div class="item_name">群聊消息</div>
<div class="item_num" v-if="groupCard">{{ Number(groupCard.msgTotal).toLocaleString('en-US') }}</div>
<div class="item_num" v-else>0</div>
</div>
</div>
<div class="groupChat_box">
<div id="groupChat" v-if="groupData.length > 0"></div>
<AiEmpty style="padding-top: 10px;" description="暂无数据" v-else></AiEmpty>
</div>
</div>
</template>
<script>
import echarts from "echarts"
export default {
name: 'message',
props: {
departmentId: String
},
data() {
return {
privateCard: {},
privateData: [],
privateDate: [],
privateMsg: [],
privateCurrent: 0,
groupCard: {},
groupData: [],
groupDate: [],
groupMsg: [],
groupCurrent: 0,
replyData: {},
}
},
created() {
this.getData()
},
methods: {
getData() {
// 回复率
this.$http.post(`/app/wxgroupstatistic/replyPercentage?departmentId=${this.departmentId}`).then(res=> {
if(res?.data) {
this.replyData = res.data
this.getEcharts1(this.replyData)
this.getEcharts2(this.replyData)
this.getEcharts3(this.replyData)
}
})
this.getPrivateData()
this.getGroupData()
},
getPrivateData() {
// 单聊统计
this.$http.post(`/app/wxgroupstatistic/getUserChatNumber?departmentId=${this.departmentId}`).then(res=> {
if(res?.data) {
this.privateCard = res.data.单聊总和
this.privateData = res.data.条形统计
this.privateDate = this.privateData?.map(v=> v.dateDay)
if(this.privateCurrent == 0) {
this.privateMsg = this.privateData?.map(v=> v.chatCnt)
} else if(this.privateCurrent == 1) {
this.privateMsg = this.privateData?.map(v=> v.messageCnt)
}
this.$nextTick(()=> {
this.getPrivateChat(this.privateDate,this.privateMsg)
})
}
})
},
getGroupData() {
// 群聊统计
this.$http.post(`/app/wxgroupstatistic/getgroupChatNumber?departmentId=${this.departmentId}`).then(res=> {
if(res?.data) {
this.groupCard = res.data.群聊总和
this.groupData = res.data.条形统计
this.groupDate = this.groupData?.map(v=> v.dateDay)
if(this.groupCurrent == 0) {
this.groupMsg = this.groupData?.map(v=>v.chatHasMsg)
} else if(this.groupCurrent ==1) {
this.groupMsg = this.groupData?.map(v=>v.memberHasMsg)
} else if(this.groupCurrent == 2) {
this.groupMsg = this.groupData?.map(v=>v.msgTotal)
}
this.$nextTick(()=> {
this.getGroupChat(this.groupDate,this.groupMsg)
})
}
})
},
getEcharts1({replyPercentage}) {
let echarts1 = document.getElementById('echarts1');
let myChart1 = echarts.init(echarts1);
let option = {
// tooltip: {
// trigger: 'item',
// },
title: {
zlevel: 0,
text: [`{name|昨日}\n{value|${ replyPercentage } %}`],
top: 'center',
left: '46%',
textAlign: 'center',
textStyle: {
rich: {
name: {
color: '#999999',
fontSize: 13,
lineHeight: 15
},
value: {
color: '#333333',
fontSize: 13,
lineHeight: 16
}
},
},
},
color: ['#3975C6','#C7C7C7'],
series: [
{
name: '昨天',
type: 'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
hoverAnimation: false,
labelLine: {
show: false,
},
data: [
{ value: replyPercentage, name: '' },
{ value: 100 - replyPercentage, name: '' },
]
}
]
};
option && myChart1.setOption(option);
},
getEcharts2({weekSum}) {
let echarts2 = document.getElementById('echarts2');
let myChart2 = echarts.init(echarts2);
let option = {
// tooltip: {
// trigger: "item",
// },
title: {
zlevel: 0,
text: [`{name|近7天}\n{value|${ weekSum } %}`],
top: 'center',
left: '46%',
textAlign: 'center',
textStyle: {
rich: {
name: {
color: '#999999',
fontSize: 13,
lineHeight: 15
},
value: {
color: '#333333',
fontSize: 13,
lineHeight: 16
}
},
},
},
color: ['#3975C6','#C7C7C7'],
series: [
{
name: '近7天',
type: 'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
hoverAnimation: false,
labelLine: {
show: false,
},
data: [
{ value: weekSum, name: '' },
{ value: 100 - weekSum, name: '' },
]
}
]
};
option && myChart2.setOption(option);
},
getEcharts3({monthSum}) {
let echarts3 = document.getElementById('echarts3');
let myChart3 = echarts.init(echarts3);
let option = {
// tooltip: {
// trigger: "item",
// },
title: {
zlevel: 0,
text: [`{name|近30天}\n{value|${ monthSum } %}`],
top: 'center',
left: '46%',
textAlign: 'center',
textStyle: {
rich: {
name: {
color: '#999999',
fontSize: 13,
lineHeight: 15
},
value: {
color: '#333333',
fontSize: 13,
lineHeight: 16
}
},
},
},
color: ['#3975C6','#C7C7C7'],
series: [
{
name: '近30天',
type: 'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
hoverAnimation: false,
labelLine: {
show: false,
},
data: [
{ value: monthSum, name: '' },
{ value: 100 - monthSum, name: '' },
]
}
]
};
option && myChart3.setOption(option);
},
getPrivateChat(privateDate,privateMsg) {
let privateDom = document.getElementById('privateChat');
let myChartPrivate = echarts.init(privateDom);
let option = {
tooltip: {
trigger: "axis",
},
xAxis: {
type: 'category',
data: privateDate,
axisTick: {
show: false,
}
},
yAxis: {
type: 'value',
axisLine: {
show: false,
},
axisTick: {
show: false,
}
},
series: [
{
data: privateMsg,
type: 'line',
lineStyle: {
color: '#3975C6', // 折线线条颜色
},
itemStyle: {
color: '#3975C6', // 折角颜色
},
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [ // 渐变颜色
{
offset: 0,
color: '#2891ff33',
},
{
offset: 1,
color: '#2891ff00',
},
],
global: false,
},
},
}
]
};
option && myChartPrivate.setOption(option);
},
getGroupChat(groupDate,groupMsg) {
let groupDom = document.getElementById('groupChat');
let myChartGroup = echarts.init(groupDom);
let option = {
tooltip: {
trigger: "axis",
},
xAxis: {
type: 'category',
data: groupDate,
axisTick: {
show: false,
}
},
yAxis: {
type: 'value',
axisLine: {
show: false,
},
axisTick: {
show: false,
}
},
series: [
{
data: groupMsg,
type: 'line',
lineStyle: {
color: '#3975C6', // 折线线条颜色
},
itemStyle: {
color: '#3975C6', // 折角颜色
},
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [ // 渐变颜色
{
offset: 0,
color: '#2891ff33',
},
{
offset: 1,
color: '#2891ff00',
},
],
global: false,
},
},
}
]
};
option && myChartGroup.setOption(option);
}
},
}
</script>
<style lang="scss" scoped>
.message {
padding: 0 32px;
box-sizing: border-box;
.head {
margin-top: 32px;
span {
font-size: 32px;
color: #333333;
font-weight: 600;
}
}
.card {
padding: 8px;
box-sizing: border-box;
display: flex;
text-align: center;
align-items: center;
background: #FFF;
border-radius: 16px 16px 0 0;
margin-top: 24px;
.item {
flex: 1;
padding: 16px 0;
box-sizing: border-box;
.item_name {
color: #666666;
}
.item_num {
color: #000000;
font-size: 36px;
font-weight: 600;
}
.imgs {
width: 30px;
height: 30px;
}
}
.active {
background: #EBF1F9;
border-radius: 16px;
}
}
.privateChat_box,
.groupChat_box {
width: 100%;
height: 514px;
background: #FFF;
border-radius: 0 0 16px 16px;
#privateChat,
#groupChat {
width: 100%;
height: 100%;
}
}
.echarts_list {
width: 100%;
height: 256px;
background: #FFF;
border-radius: 8px;
margin-top: 24px;
display: flex;
#echarts1,
#echarts2,
#echarts3 {
flex: 1;
width: 100%;
height: 100%;
}
}
}
</style>

View File

@@ -1,298 +0,0 @@
<template>
<div class="sensitive">
<div class="card">
<div class="item">
<div class="item_name">敏感词累计</div>
<div class="item_num">{{ Number(info.recordSum) }}</div>
</div>
<div class="item">
<div class="item_name">本月群聊敏感词</div>
<div class="item_num">{{ Number(info.recordNowMonthSum) }}</div>
</div>
</div>
<div class="head">
<span>群聊敏感词统计</span>
</div>
<div class="friends_box">
<div id="group" v-if="groupData.length > 0"></div>
<AiEmpty
style="padding-top: 10px"
description="暂无数据"
v-else
></AiEmpty>
</div>
<div class="head">
<span>敏感词分类统计</span>
</div>
<div class="groups_box">
<div id="user" v-if="userData.length > 0"></div>
<AiEmpty
style="padding-top: 10px"
description="暂无数据"
v-else
></AiEmpty>
</div>
<div class="groups_box" v-if="wordData">
<div id="main"></div>
</div>
</div>
</template>
<script>
import echarts from "echarts";
import "echarts-wordcloud";
export default {
name: "sensitive",
props: {
departmentId: String,
},
data() {
return {
info: {},
groupData: [],
userData: [],
wordData: [],
};
},
created() {
this.getData();
},
methods: {
getData() {
this.$http
.post(
`/app/appsessionarchivekeywordrecord/getKeywordRecordStatisticForXbot?departmentId=${this.departmentId}`
)
.then((res) => {
if (res?.data) {
this.info = { ...res.data };
var groupMonth = res.data.groupRecordListMap.map((e) => e.dateDay);
this.groupData = res.data.groupRecordListMap.map((e) => e.cnt);
// var userMonth = res.data.personRecordListMap.map((e) => e.dateDay);
this.userData = res.data.typeListMap.map((e) => e.c);
var wordNameList = res.data.typeListMap.map((e) => e.word_name);
res.data.wordNames.map((item) => {
var i = { name: item.wordName, value: item.wordCount };
this.wordData.push(i);
});
this.$nextTick(() => {
this.getGroupEcharts(groupMonth, this.groupData);
this.getUserEcharts(wordNameList, this.userData);
if (this.wordData) {
this.getKeyWordEcharts(this.wordData);
}
});
}
});
},
getGroupEcharts(groupMonth, groupData) {
let groupDom = document.getElementById("group");
let groupChart = echarts.init(groupDom);
let option = {
tooltip: {
trigger: "axis",
},
xAxis: {
type: "category",
data: groupMonth,
axisTick: {
show: false,
},
},
yAxis: {
type: "value",
axisLine: {
show: false,
},
axisTick: {
show: false,
},
},
grid: {
x: 50,
y: 50,
},
series: [
{
data: groupData,
type: "line",
lineStyle: {
color: "#3975C6", // 折线线条颜色
},
itemStyle: {
color: "#3975C6", // 折角颜色
},
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
// 渐变颜色
{
offset: 0,
color: "#2891ff33",
},
{
offset: 1,
color: "#2891ff00",
},
],
global: false,
},
},
},
],
};
option && groupChart.setOption(option);
},
getUserEcharts(userMonth, userData) {
console.log(userMonth, userData)
let userDom = document.getElementById("user");
let userChart = echarts.init(userDom);
let option = {
xAxis: {
type: 'category',
data: userMonth
},
yAxis: {
type: 'value'
},
series: [
{
itemStyle: {
normal: {
color: ['#0072FF'],
label: {
show: true, //开启显示数值
position: 'top', //数值在上方显示
textStyle: { //数值样式
color: '#919191', //字体颜色
fontSize: 14 //字体大小
}
}
}
},
data: userData,
type: 'bar',
barWidth : 20,
}
]
};
option && userChart.setOption(option);
},
getKeyWordEcharts(data) {
var chart = echarts.init(document.getElementById("main"));
chart.setOption({
series: [
{
type: "wordCloud",
sizeRange: [15, 80],
rotationRange: [0, 0],
rotationStep: 45,
gridSize: 8,
shape: "pentagon",
width: "100%",
height: "100%",
textStyle: {
normal: {
color: function () {
return (
"rgb(" +
[
Math.round(Math.random() * 160),
Math.round(Math.random() * 160),
Math.round(Math.random() * 160),
].join(",") +
")"
);
},
fontFamily: "sans-serif",
fontWeight: "normal",
},
emphasis: {
shadowBlur: 10,
shadowColor: "#333",
},
},
data,
},
],
});
},
},
};
</script>
<style lang="scss" scoped>
.sensitive {
padding: 0 32px;
box-sizing: border-box;
.head {
margin-top: 32px;
span:first-child {
font-size: 32px;
color: #333333;
font-weight: 600;
}
span:last-child {
font-size: 26px;
color: #999999;
}
}
.card {
padding: 24px 0;
box-sizing: border-box;
display: flex;
text-align: center;
align-items: center;
background: #fff;
border-radius: 16px;
margin-top: 24px;
.item {
flex: 1;
.item_name {
color: #666666;
}
.item_num {
color: #000000;
font-size: 36px;
font-weight: 600;
}
.imgs {
width: 30px;
height: 30px;
}
}
}
.friends_box,
.groups_box {
margin-top: 24px;
width: 100%;
height: 514px;
background: #fff;
#user,
#group,
#main {
width: 100%;
height: 100%;
}
}
}
</style>

View File

@@ -1,300 +0,0 @@
<template>
<div class="wechat">
<div class="head">
<span>居民好友统计</span><span>(统计数据为去重后的数据)</span>
</div>
<div class="card">
<div class="item">
<div class="item_name">居民好友</div>
<div class="item_num">{{ Number(friendsCard.customerTotal).toLocaleString('en-US') }}</div>
</div>
<div class="item">
<div class="item_name">昨日新增</div>
<div class="item_num">{{ Number(friendsCard.addCustomerCount).toLocaleString('en-US') }}
<img src="../img/up.png" alt="" class="imgs" v-show="friendsCard.addCustomerCount != 0">
</div>
</div>
<div class="item">
<div class="item_name">昨日流失</div>
<div class="item_num">{{ Number(friendsCard.removeCustomerCount).toLocaleString('en-US') }}
<img src="../img/down.png" alt="" class="imgs" v-show="friendsCard.removeCustomerCount !=0"></div>
</div>
</div>
<div class="friends_box">
<div id="friends" v-if="friendsData.length > 0"></div>
<AiEmpty style="padding-top: 10px;" description="暂无数据" v-else></AiEmpty>
</div>
<div class="head">
<span>居民群统计</span><span>(统计数据为去重后的数据)</span>
</div>
<div class="card">
<div class="item">
<div class="item_name">居民群</div>
<div class="item_num">{{ Number(groupsCard.groupSum).toLocaleString('en-US') }}</div>
</div>
<div class="item">
<div class="item_name">群成员</div>
<div class="item_num">{{ Number(groupsCard.totalSum).toLocaleString('en-US') }}</div>
</div>
<div class="item">
<div class="item_name">昨日新增</div>
<div class="item_num">{{ Number(groupsCard.increaseSum).toLocaleString('en-US') }}
<img src="../img/up.png" alt="" class="imgs" v-show="groupsCard.increaseSum"></div>
</div>
<div class="item">
<div class="item_name">昨日流失</div>
<div class="item_num">{{ Number(groupsCard.decreaseSum).toLocaleString('en-US') }}
<img src="../img/down.png" alt="" class="imgs" v-show="groupsCard.decreaseSum"></div>
</div>
</div>
<div class="groups_box">
<div id="groups" v-if="groupsData.length > 0"></div>
<AiEmpty style="padding-top: 10px;" description="暂无数据" v-else></AiEmpty>
</div>
</div>
</template>
<script>
import echarts from 'echarts';
export default {
name: "wechat",
props: {
departmentId: String
},
data() {
return {
friendsCard: {},
friendsData: [],
friendsMonth: [],
friendsNumber: [],
groupsCard: {},
groupsData: [],
groupsMonth: [],
groupsNumber: []
}
},
created() {
this.getData()
},
methods: {
getData() {
// 居民好友
this.$http.post(`/app/wxgroupstatistic/getCustommerNumber?departmentId=${this.departmentId}`).then(res=> {
if(res?.data) {
this.friendsCard = res.data.居民统计
this.friendsData = res.data.居民好友数
this.friendsMonth = this.friendsData.map(e=> e.month)
this.friendsNumber = this.friendsData.map(e=> e.totalNumber)
this.$nextTick(()=> {
this.getFriendsEcharts(this.friendsMonth,this.friendsNumber)
})
}
})
// 居民群
this.$http.post(`/app/wxgroupstatistic/getGroupNumber?departmentId=${this.departmentId}`).then(res=> {
if(res?.data) {
this.groupsCard = res.data.居民群统计
this.groupsData = res.data.群成员数
this.groupsMonth = this.groupsData.map(e=> e.month)
this.groupsNumber = this.groupsData.map(e=> e.totalNumber)
this.$nextTick(()=> {
this.getGroupsEcharts(this.groupsMonth,this.groupsNumber)
})
}
})
},
getFriendsEcharts(friendsMonth,friendsNumber) {
let friendsDom = document.getElementById('friends');
let myFriendsChart = echarts.init(friendsDom);
let option = {
tooltip: {
trigger: "axis",
},
xAxis: {
type: 'category',
data: friendsMonth,
axisTick: {
show: false,
}
},
yAxis: {
type: 'value',
axisLine: {
show: false,
},
axisTick: {
show: false,
}
},
grid:{
x:50,
y:50,
},
series: [
{
data: friendsNumber,
type: 'line',
lineStyle: {
color: '#3975C6', // 折线线条颜色
},
itemStyle: {
color: '#3975C6', // 折角颜色
},
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [ // 渐变颜色
{
offset: 0,
color: '#2891ff33',
},
{
offset: 1,
color: '#2891ff00',
},
],
global: false,
},
},
}
]
};
option && myFriendsChart.setOption(option);
},
getGroupsEcharts(groupsMonth,groupsNumber) {
let groupsDom = document.getElementById('groups');
let myGroupsChart = echarts.init(groupsDom);
let option = {
tooltip: {
trigger: "axis",
},
xAxis: {
type: 'category',
data: groupsMonth,
axisTick: {
show: false,
}
},
yAxis: {
type: 'value',
axisLine: {
show: false,
},
axisTick: {
show: false,
}
},
grid:{
x:50,
y:50,
},
series: [
{
data: groupsNumber,
type: 'line',
lineStyle: {
color: '#3975C6', // 折线线条颜色
},
itemStyle: {
color: '#3975C6', // 折角颜色
},
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [ // 渐变颜色
{
offset: 0,
color: '#2891ff33',
},
{
offset: 1,
color: '#2891ff00',
},
],
global: false,
},
},
}
]
};
option && myGroupsChart.setOption(option);
}
},
}
</script>
<style lang="scss" scoped>
.wechat {
padding: 0 32px;
box-sizing: border-box;
.head {
margin-top: 32px;
span:first-child {
font-size: 32px;
color: #333333;
font-weight: 600;
}
span:last-child {
font-size: 26px;
color: #999999;
}
}
.card {
padding: 24px 0;
box-sizing: border-box;
display: flex;
text-align: center;
align-items: center;
background: #FFF;
border-radius: 16px;
margin-top: 24px;
.item {
flex: 1;
.item_name {
color: #666666;
}
.item_num {
color: #000000;
font-size: 36px;
font-weight: 600;
}
.imgs {
width: 30px;
height: 30px;
}
}
}
.friends_box,
.groups_box {
margin-top: 24px;
width: 100%;
height: 514px;
background: #FFF;
#friends,
#groups {
width: 100%;
height: 100%;
}
}
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 990 B

View File

@@ -1,261 +0,0 @@
<template>
<div class="AppSensitive">
<AiTopFixed>
<div class="top-search">
<div class="left">
<AiPagePicker type="dept" :selected.sync="deptUserList" nodeKey="id" single @select="deptSelect">
<span class="label" v-if="deptUserList.length">{{deptUserList[0].name}}</span>
<span v-else style="color:#999;">部门名称</span>
<div class="clear-btn" v-if="deptUserList.length" @click.stop="clearDept">
<img src="./img/del-icon.png" alt="" class="del-icon">
</div>
<u-icon name="arrow-down" color="#999" size="24" style="margin-left:8px;" v-else />
</AiPagePicker>
</div>
<div class="right">
<u-search v-model="keyword" :clearabled="true" placeholder="触发敏感词" :show-action="false" bg-color="#F5F5F5"
search-icon-color="#999" color="#999" height="58" @search="getListInit" @clear="getListInit">
</u-search>
</div>
</div>
</AiTopFixed>
<div class="user-list">
<div class="item" v-for="(item, index) in list" :key="index" @click="toConversationRecord(item)">
<img src="./img/group-img.png" alt="" v-if="item.type == 1">
<img :src="item.userAvatar" alt="" v-if="item.type != 1 && item.userAvatar">
<img src="./img/user-img.png" alt="" v-if="item.type != 1 && !item.userAvatar">
<div class="item-right">
<div class="name-flex">
<p v-if="item.type == 1">{{item.toName}}</p>
<p v-else>{{item.userName}}</p>
<div class="time">{{item.createTime.substring(0, 16)}}</div>
</div>
<div v-html="item.text" class="item-content"></div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "AppSensitive",
appName: "敏感词触发记录",
data() {
return {
keyword: '',
current: 1,
pages: 2,
list: [],
deptUserList: []
};
},
onLoad() {
this.getListInit()
},
onShow() {
document.title = '触发记录'
},
methods: {
clearDept() {
this.deptUserList = []
this.getListInit()
},
getListInit() {
this.current = 1
this.pages = 2
this.list = []
this.getList()
},
getList() {
if(this.current > this.pages) return
this.$http.post(`/app/appsessionarchivekeywordrecord/list`, null, {
params: {
current: this.current,
size: 15,
content: this.keyword,
departmentId: this.deptUserList.length ? this.deptUserList[0].id : ''
}
}).then(res=> {
if(res?.data) {
res.data.records.map((item) => {
if(item.type == 1) {
item.text = item.userName + ':' + this.changeKeyRed(item.content, item.wordName)
}else {
item.text = this.changeKeyRed(item.content, item.wordName)
}
})
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
this.pages = res.data.pages
}
})
},
toConversationRecord(row) {
uni.navigateTo({url: `./conversationRecord?userId=${row.userId}&roomId=${row.roomId}&toName=${row.toName}&type=${row.type}&seq=${row.seq}&msgId=${row.msgId}`})
},
deptSelect(e) {
this.deptUserList = e
this.getListInit()
},
changeKeyRed (str, keyWord) {
if (str != null && keyWord != null) {
var substr = "/" + keyWord + "/g";
var replaceStr = str.replace(eval(substr), "<span style='color:#e6736e'>" + keyWord + "</span>")
return replaceStr;
} else {
return str;
}
},
},
onReachBottom() {
this.current ++
this.getList()
}
};
</script>
<style lang="scss" scoped>
.AppSensitive {
height: 100%;
::v-deep .AiTopFixed {
.placeholder {
.content {
padding: 0 !important;
}
}
.fixed {
margin: 0 !important;
.content {
padding: 0 !important;
}
}
}
.top-search {
padding: 20px 32px;
display: flex;
.left {
width: 350px;
line-height: 64px;
.clear-btn {
display: inline-block;
padding: 0 16px;
}
.del-icon {
width: 32px;
height: 32px;
vertical-align: middle;
}
}
.right {
width: calc(100% - 350px);
}
}
.top-select {
display: flex;
padding: 28px 0;
border-bottom: 1px solid #eee;
.item {
flex: 1;
padding: 0 8px;
text-align: center;
span {
display: inline-block;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28px;
color: #666;
line-height: 40px;
}
}
}
.user-list {
background-color: #fff;
.item {
padding: 24px 0 0 32px;
display: flex;
box-sizing: border-box;
img {
width: 80px;
height: 80px;
margin-right: 32px;
border-radius: 50%;
}
.item-right {
width: calc(100% - 112px);
border-bottom: 1px solid #eee;
padding: 0 32px 20px 0;
box-sizing: border-box;
// display: flex;
// justify-content: space-between;
// border-bottom: 1px solid #eee;
// padding-right: 32px;
// box-sizing: border-box;
// .user {
// width: calc(100% - 240px);
// p {
// line-height: 44px;
// font-family: PingFangSC-Medium;
// font-weight: 500;
// font-size: 32px;
// color: #333;
// letter-spacing: 0.3px;
// margin-bottom: 8px;
// }
// div {
// color: #666;
// font-size: 28px;
// font-family: PingFangSC;
// line-height: 40px;
// padding-bottom: 20px;
// span {
// color: #e6736e;
// }
// }
// }
// .time {
// font-family: PingFangSC-Regular;
// font-size: 26px;
// color: #999;
// }
.name-flex {
display: flex;
justify-content: space-between;
width: 100%;
p {
width: calc(100% - 240px);
line-height: 44px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 32px;
color: #333;
margin-bottom: 8px;
}
.time {
font-family: PingFangSC-Regular;
font-size: 26px;
color: #999;
}
}
.content {
color: #666;
font-size: 28px;
font-family: PingFangSC;
line-height: 40px;
padding-bottom: 20px;
word-break: break-all;
span {
color: #e6736e;
}
}
}
}
.item:nth-last-child(1) {
p {
border-bottom: 0;
}
}
}
}
</style>

View File

@@ -1,686 +0,0 @@
<template>
<div class="conversationRecord">
<AiTopFixed>
<div class="top-search">
<div class="left" @click="isShowDate=true">
<div class="color-999" v-if="!dateList.length">开始时间-结束时间</div>
<div v-else>{{dateList[0]}}{{dateList[1]}}</div>
<!-- <img src="./img/del-icon.png" alt="" v-if="dateList.length" @click.stop="clearDate()"> -->
<div class="clear-btn" v-if="dateList.length" @click.stop="clearDate">
<img src="./img/del-icon.png" alt="" class="del-icon">
</div>
</div>
<div class="right">
<u-search v-model="keyword" :clearabled="true" placeholder="请输入关键词" :show-action="false" bg-color="#F5F5F5"
search-icon-color="#999" color="#999" height="58" @search="getListInit" @clear="getListInit">
</u-search>
</div>
</div>
</AiTopFixed>
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scroll="scroll" v-if="list.length" :style="{height: scrollHeight+'px'}">
<div class="conversation-list">
<div v-for="(item, index) in list" :key="index">
<div class="item" :class="item.userId == user.wxUserId ? 'item-right' : 'item-left'">
<img src="./img/fail-icon.png" alt="" class="fail-img" v-if="item.userId == user.wxUserId && item.isKeyword == 1">
<img :src="item.userAvatar" alt="" class="user-img" v-if="item.userId != user.wxUserId && item.userAvatar">
<img src="./img/user-img.png" alt="" class="user-img" v-if="item.userId != user.wxUserId && !item.userAvatar">
<p class="user-name">{{item.userName}}<span>{{item.msgSendTime}}</span></p>
<div class="content">
<span class="cir" v-if="item.msgType == 'text'"></span>
<p class="content-text" v-if="item.msgType == 'text'">{{item.content}}</p>
<div class="img-list" v-if="item.msgType == 'image'">
<img :src="item.sdkFileUrl" alt="" @click="previewImage(item.sdkFileUrl)">
</div>
<audio :src="item.sdkFileUrl" controls style="display: block;" v-if="item.msgType == 'voice'"></audio>
<video :src="item.sdkFileUrl" v-if="item.msgType == 'video'" />
<div class="file" @click="prevFile(item)" v-if="item.msgType == 'file'">
<u-row justify="between">
<label class="left">
<img :src="$cdn + 'common/appendix.png'" alt="">
<span>{{ item.sdkFileName }}</span>
</label>
<span>{{ item.fileSizeStr }}</span>
</u-row>
</div>
<div class="revoke-text" v-if="item.msgType == 'revoke'">{{item.userName}}撤回了一条消息</div>
<div class="revoke-text" v-if="item.msgType == 'disagree'">对方不同意会话存档内容你将无法继续提供服务</div>
<div class="revoke-text" v-if="item.msgType == 'agree'">对方同意会话存档内容你可以继续提供服务</div>
<div class="card-info" v-if="item.msgType == 'card'" @click="openUser(item.type, item.cardUserId)">
<div class="top">
<div class="card-left">
<h3>{{item.cardCorpName}}</h3>
<p>{{item.cardUserName}}</p>
<!-- <div>{{item.cardUserId}}</div> -->
</div>
<div class="card-right">
<img :src="item.cardUserAvatar" alt="" v-if="item.cardUserAvatar">
<img src="./img/user-img.png" alt="" v-else>
</div>
</div>
<div class="bottom">个人名片</div>
</div>
<img :src="item.sdkFileUrl" alt="" v-if="item.msgType == 'emotion'" :style="[{width: item.width/2+'px'}, {height: item.height/2+'px'}]">
<div class="map-info" v-if="item.msgType == 'location'" @click="openMap(item)">
<map style="width: 100%; height: 100%;" :latitude="item.lat" :longitude="item.lng" :scale="item.zoom" :enable-zoom="false" :enable-scroll="false">
<cover-view style='width:100%;height:100%'></cover-view>
</map>
<div class="address-text">
<p>{{item.title}}</p>
<p>{{item.address}}</p>
</div>
</div>
<div class="card-info" v-if="item.msgType == 'weapp'" @click="openApp(item)">
<div class="top">
<div class="card-left">
<h3 class="display-name">{{item.displayName}}</h3>
<p>{{item.title}}</p>
</div>
<div class="card-right">
<img src="./img/app-icon.png" alt="" >
</div>
</div>
<div class="bottom"><img src="./img/app-mini-icon.png" alt="" >小程序</div>
</div>
<div class="card-info" v-if="item.msgType == 'link'" @click="openLink(item)">
<div class="top">
<div class="card-left">
<p>{{item.title}}</p>
<div>{{item.username}}</div>
</div>
<div class="card-right" v-if="item.imageUrl">
<img :src="item.imageUrl" alt="" >
</div>
</div>
<div class="bottom">分享链接</div>
</div>
</div>
<img :src="item.userAvatar" alt="" class="user-img" v-if="item.userId == user.wxUserId">
<img src="./img/fail-icon.png" alt="" class="fail-img" v-if="item.userId != user.wxUserId && item.isKeyword == 1">
</div>
</div>
</div>
</scroll-view>
<AiEmpty v-else/>
<u-calendar v-model="isShowDate" @change="onDateChange" mode="range"></u-calendar>
</div>
</template>
<script>
import {mapState, mapActions} from "vuex";
export default {
name: "conversationRecord",
data() {
return {
keyword: '',
list: [],
params: {},
id: '',
isShowDate: false,
dateList: [],
current: null,
preCurrent: null,
pages: 2,
scrollTop: 0,
scrollHeight: '',
preveHeight: ''
};
},
computed: {
...mapState(['user']),
},
onLoad(option) {
console.log(option)
this.params = {...option}
// this.params = {
// userId: 'ChenChen',
// toUserId: 'LiuYe',
// toName: '刘烨',
// type: '0',
// seq: '12481'
// }
this.id = this.params.userId
this.scrollHeight = uni.getSystemInfoSync().windowHeight - 56
this.injectJWeixin('openLocation')
this.getKeywordList()
},
onShow() {
document.title = '会话详情'
},
methods: {
scroll(e) {
if(e.detail.scrollTop == 0) {
if(this.current > this.pages) {
return this.$u.toast('已加载完成,没有更多数据')
}else {
this.current ++
this.getList()
}
}
},
onDateChange (e) {
this.dateList = [e.startDate, e.endDate]
this.getListInit()
},
clearDate() {
this.dateList = []
this.getListInit()
},
getKeywordList() {
this.$http.post(`/app/appsessionarchiveinfo/listForXbot`, null, {
params: {
userId: this.id,
size: 10,
// msgType: this.msgTypeList[this.msgType].value,
roomId: this.params.roomId,
type: this.params.type,
content: this.keyword,
startTime: this.time ? this.time[0] : '',
endTime: this.time ? this.time[1] : '',
seq: this.params.seq,
msgId: this.params.msgId
}
}).then(res => {
if (res.code === 0) {
this.current = res.data.current
this.preCurrent = res.data.current
res.data.records.map((item) => {
// if(item.msgType == 'text') {
// item.text = this.changeKeyRed(item.content, item.wordName)
// }
if(item.msgType == 'location') {
item.covers = [{
latitude: item.lat,
longitude: item.lng,
label: {
content: item.address
},
callout: {
content: item.title
}
}]
}
})
this.list = res.data.records
this.pages = res.data.pages
this.$nextTick(() => {
uni.createSelectorQuery().select(".conversation-list").boundingClientRect((res) => {
this.scrollTop = res.height - this.scrollHeight
}).exec();
})
}
this.isLoading = false
}).catch(() => {
this.isLoading = false
})
},
getListInit() {
this.current = 1
this.pages = 2
this.list = []
this.getList()
},
getList() {
if(this.current > 1) {
uni.createSelectorQuery().select(".conversation-list").boundingClientRect((res) => {
this.preveHeight = res.height
}).exec();
}
this.$http.post(`/app/appsessionarchiveinfo/list`, null, {
params: {
userId: this.id,
current: this.current,
size: 10,
// msgType: this.tabList[this.currentTabs].value,
// msgType: 'file',
toUserId: this.params.toUserId,
roomId: this.params.roomId,
type: this.params.type,
content: this.keyword,
startTime: this.dateList.length ? this.dateList[0] : '',
endTime: this.dateList.length ? this.dateList[1] : ''
}
}).then(res=> {
if(res?.data) {
res.data.records.map((item) => {
if(item.msgType == 'location') {
item.covers = [{
latitude: item.lat,
longitude: item.lng,
label: {
content: item.address
},
callout: {
content: item.title
}
}]
}
})
this.list = this.current > 1 ? [ ...res.data.records, ...this.list]: res.data.records
this.$nextTick(() => {
uni.createSelectorQuery().select(".conversation-list").boundingClientRect((res) => {
if(this.current == 1) {
this.scrollTop = res.height - this.scrollHeight
}else {
this.scrollTop = res.height - this.preveHeight
}
}).exec();
})
}
})
},
getListPre() {
if(this.current > 1) {
uni.createSelectorQuery().select(".conversation-list").boundingClientRect((res) => {
this.preveHeight = res.height
}).exec();
}
this.$http.post(`/app/appsessionarchiveinfo/list`, null, {
params: {
userId: this.id,
current: this.preCurrent,
size: 10,
// msgType: this.tabList[this.currentTabs].value,
toUserId: this.params.toUserId,
roomId: this.params.roomId,
type: this.params.type,
content: this.keyword,
startTime: this.dateList.length ? this.dateList[0] : '',
endTime: this.dateList.length ? this.dateList[1] : ''
}
}).then(res=> {
if(res?.data) {
res.data.records.map((item) => {
if(item.msgType == 'location') {
item.covers = [{
latitude: item.lat,
longitude: item.lng,
label: {
content: item.address
},
callout: {
content: item.title
}
}]
}
})
this.list = [...this.list, ...res.data.records]
this.$nextTick(() => {
uni.createSelectorQuery().select(".conversation-list").boundingClientRect((res) => {
if(this.current == 1) {
this.scrollTop = res.height - this.scrollHeight
}else {
this.scrollTop = res.height - this.preveHeight
}
}).exec();
})
}
})
},
changeKeyRed (str, keyWord) {
if (str != null && keyWord != null) {
var substr = "/" + keyWord + "/g";
var replaceStr = str.replace(eval(substr), "<span style='color:#e6736e'>" + keyWord + "</span>")
return replaceStr;
} else {
return str;
}
},
previewImage(img) {
uni.previewImage({
urls: [img],
current: img
})
},
...mapActions(['previewFile', 'injectJWeixin']),
prevFile(file) {
var fileInfo = {url: file.sdkFileUrl, name: file.sdkFileName, size: file.fileSizeStr}
this.$loading()
this.previewFile({ ...fileInfo }).then(()=>{
this.$hideLoading()
})
},
openLink(row) {
window.open(row.linkUrl);
},
openApp(row) {
uni.navigateToMiniProgram({
// appId: row.goodsJdAppid,
// path: row.goodsJdUrl
})
},
openUser(type, userid) { //缺少名片人员区分内部还是外部
console.log(row)
// userid && this.injectJWeixin('openUserProfile').then(() => {
// this.wxInvoke(['openUserProfile', {type, userid}, () => 0])
// })
},
openMap(row) {
wx.openLocation({
latitude: row.lat, // 纬度浮点数范围为90 ~ -90
longitude: row.lng, // 经度浮点数范围为180 ~ -180。
name: row.title, // 位置名
address: row.address, // 地址详情说明
scale: row.zoom, // 地图缩放级别,整形值,范围从1~28。默认为16
fail: () => {
location.reload()
}
});
}
},
onReachBottom() {
if(this.preCurrent > 1) {
this.preCurrent --
this.getListPre()
}
}
};
</script>
<style lang="scss" scoped>
.conversationRecord {
height: 100%;
::v-deep .AiTopFixed {
.placeholder {
.content {
padding: 0 !important;
}
}
.fixed {
margin: 0 !important;
.content {
padding: 0 !important;
}
}
}
.top-search {
padding: 20px 32px;
display: flex;
.left {
width: 400px;
.clear-btn {
display: inline-block;
padding: 0 16px;
}
.del-icon {
width: 32px;
height: 32px;
vertical-align: middle;
}
div {
display: inline-block;
line-height: 64px;
}
}
.right {
width: calc(100% - 400px);
}
}
.conversation-list {
padding: 48px 32px;
// background-color: #EBECF0;
.item {
margin-bottom: 48px;
display: flex;
position: relative;
.user-name {
position: absolute;
top: 0;
left: 24px;
font-family: PingFangSC-Regular;
font-size: 22px;
color: #666;
padding:0 0 0 64px;
span {
display: inline-block;
margin: 0 12px;
font-family: PingFangSC-Regular;
font-size: 20px;
color: #999;
}
}
.user-img {
width: 72px;
height: 72px;
margin-right: 20px;
border-radius: 50%;
}
.content {
max-width: calc(100% - 144px);
position: relative;
margin-top: 44px;
.cir {
width: 0px;
height: 0px;
border: 10px solid transparent;
position: absolute;
top: 20px;
}
.content-text {
display: inline-block;
padding: 14px 54px 14px 32px;
width: 100%;
background-color: #fff;
font-family: PingFangSC-Regular;
font-size: 32px;
color: #333;
word-break: break-all;
box-sizing: border-box;
}
}
.fail-img {
width: 32px;
height: 32px;
padding-top: 44px;
margin: auto 0 auto 24px;
}
.img-list {
img {
max-width: 400px;
margin: 0 16px 16px 0;
}
}
::v-deep .uni-audio-default {
height: 72px;
width: 280px!important;
min-width: 0!important;
}
::v-deep .uni-audio-left {
height: 72px;
width: 72px;
.uni-audio-button {
margin: 14px;
}
}
::v-deep .uni-audio-right {
height: 72px;
margin-left: 72px;
padding: 10px 32px 10px 0;
}
.revoke-text {
line-height: 54px;
padding: 0 24px;
border-radius: 8px;
background-color: #EEE;
color: #999;
margin-top: 16px;
}
.file {
height: 128px;
background: #FFFFFF;
border-radius: 8px;
border: 1px solid #CCCCCC;
box-sizing: border-box;
padding: 0 16px;
margin-bottom: 32px;
& > .u-row {
height: 100%;
.left {
width: 522px;
display: flex;
align-items: center;
& > img {
width: 96px;
height: 96px;
}
& > span {
font-size: 32px;
color: #333333;
display: inline-block;
line-height: 44px;
text-overflow: ellipsis;
overflow-x: hidden;
white-space: nowrap;
}
}
& > span {
font-size: 28px;
color: #999;
margin: -8px 0 0 16px;
}
}
}
.card-info {
width: 450px;
background: #FFF;
.top {
padding: 16px 32px;
display: flex;
.card-left {
width: calc(100% - 120px);
h3 {
font-family: PingFangSC-Regular;
font-size: 32px;
color: #333;
line-height: 44px;
margin-bottom: 30px;
}
p {
font-family: PingFangSC-SNaNpxibold;
font-size: 32px;
color: #333;
line-height: 44px;
}
div {
font-family: PingFangSC-Regular;
font-size: 24px;
color: #999;
line-height: 34px;
}
.display-name {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 24px;
color: #999;
line-height: 34px;
margin-bottom: 10px;
}
}
.card-right {
img {
width: 84px;
height: 84px;
}
}
}
.bottom {
padding-left: 32px;
line-height: 48px;
font-family: PingFangSC-Regular;
font-size: 22px;
color: #999;
border-top: 1px solid #eee;
img {
width: 20px;
height: 20px;
margin-right: 8px;
}
}
}
.map-info {
width: 560px;
height: 400px;
.address-text {
position: absolute;
bottom: 0;
left: 0;
width: 560px;
background-color: rgba(0, 0, 0, .7);
p {
color: #fff;
line-height: 44px;
font-size: 24px;
padding-left: 32px;
word-break: break-all;
}
}
}
}
.item-left {
.content {
.cir {
left: -18px;
border-right-color: #fff;
}
}
}
.item-right {
width: 100%;
justify-content: right;
.user-name {
left: 0;
right: 82px;
text-align: right;
}
.user-img {
margin: 0 0 0 20px;
}
.content {
.cir {
border-left-color: #C7E7FE;
right: -18px;
}
.content-text {
background-color: #C7E7FE;
padding: 14px 32px 14px 54px;
}
.img-list {
img {
max-width: 400px;
margin: 0 0 16px 16px;
}
}
}
.fail-img {
margin: auto 24px auto 0;
}
}
}
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -1,282 +0,0 @@
<template>
<div class="AppWorkOrder">
<AiTopFixed>
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff"
@change="change"></u-tabs>
<div class="select-top">
<!-- <div class="tab-item">
<AiPagePicker type="gird" v-model="searchGrid" @change="confirm" valueObj nodeKey="id" formType="2">
<AiMore v-model="searchGrid.girdName" icon="arrow-down" placeholder="所属网格"/>
</AiPagePicker>
</div> -->
<div class="tab-item" @click="showType = true">
<AiMore v-model="eventStatusText" icon="arrow-down" placeholder="办件状态"/>
</div>
<u-select v-model="showType" :list="listType" value-name="dictValue" label-name="dictName" @confirm="confirm"></u-select>
</div>
</AiTopFixed>
<template>
<AiCard v-for="(item, i) in datas" :key="i" @click.native="goDetail(item, 1)">
<template #custom>
<div class="card-top">
<div class="titles">{{ item.content }}</div>
<div class="types">
<span>事件类型</span>
<span class="types-right">{{ $dict.getLabel('xbotReportEventType', item.type)}}</span>
</div>
<div class="types">
<span>所属群聊</span>
<span class="types-right">{{ item.groupName }}</span>
</div>
<div class="gards">
<span>上报时间</span>
<span class="gards-right">{{ item.createTime }}</span>
</div>
</div>
<div class="status" :class="item.eventStatus == 0 ? 'status0' : item.eventStatus == 1 ? 'status1' : item.eventStatus == 2 ? 'status2' : 'status3'"
v-if="item.eventStatus">
<span class="icon"></span>
<span>
{{ $dict.getLabel('clapEventStatus', item.eventStatus) }}
</span>
</div>
</template>
</AiCard>
<AiEmpty v-if="!datas.length"></AiEmpty>
</template>
<div class="pad-b120" v-if="datas.length"></div>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
props: {},
name: "AppWorkOrder",
appName: "工单管理",
data() {
return {
datas: [],
tabList: [
{
name: '全部待办',
},
{
name: '办件历史',
},
],
currentTabs: 0,
current: 1,
pages: 0,
searchGrid: {},
showType: false,
eventStatus: '',
eventStatusText: '',
}
},
computed: {
...mapState(['user']),
listType() {
return this.$dict.getDict(this.currentTabs == 0 ? 'clapEventStatusAll' : 'clapEventStatusHistory')
}
},
onLoad() {
uni.$on('nextList', () => {
this.current++
this.getList()
})
uni.$on('getListInit', () => {
this.current = 1
this.getList()
})
},
onShow() {
document.title = '工单管理'
},
created() {
this.$dict.load('clapEventStatus', 'clapEventStatusAll', 'clapEventStatusHistory', 'xbotReportEventType').then(() => {
this.getList()
})
},
methods: {
getList() {
let {current, eventStatus, searchGrid: {id: girdId}} = this
this.$http.post(`/app/appsessionarchivereportinfo/list`, null, {
params: {
size: 10,
current, searchType: this.currentTabs == 1 ? '1' : '0',
eventStatus, girdId
},
})
.then((res) => {
if (res.code == 0) {
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
this.pages = res.data.pages
this.$forceUpdate()
}
})
},
confirm(e) {
if (this.showType) {
this.eventStatus = e[0].value
this.eventStatusText = e[0].label
}
this.current = 1
this.getList()
},
goDetail(item) {
uni.navigateTo({url: `./Detail?id=${item.id}`})
},
change(index) {
this.current = 1
this.datas = []
this.eventStatus = ''
this.currentTabs = index
this.getList()
},
linkTo(url) {
uni.navigateTo({url})
},
},
}
</script>
<style scoped lang="scss">
.AppWorkOrder {
height: 100%;
padding: 0;
width: 100vw;
.select-top {
background: #fff;
display: flex;
padding: 24px 0;
.tab-item {
flex: 1;
text-align: center;
line-height: 48px;
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
img {
width: 32px;
height: 32px;
margin-left: 8px;
vertical-align: middle;
}
}
.tab-item:nth-of-type(1) {
border-right: 1px solid #eee;
}
}
::v-deep .AiTopFixed .content {
padding: 0;
}
::v-deep .AiCard {
background: #f3f6f9;
padding: 24px 40px 0 32px;
.start {
background: #fff;
border-radius: 16px;
.card-top {
padding: 32px;
.titles {
margin-bottom: 34px;
font-size: 32px;
font-weight: 500;
color: #333333;
line-height: 1.4;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.types,
.gards {
margin-top: 8px;
font-size: 26px;
.types-right,
.gards-right {
margin-left: 32px;
color: #333333;
}
}
}
.status {
padding: 32px;
border-top: 1px solid #dddddd;
.icon {
display: inline-block;
width: 8px;
height: 8px;
vertical-align: middle;
margin-right: 8px;
}
}
.status0 {
color: #ff883c;
.icon {
background: #ff883c;
}
}
.status1 {
color: #1aaaff;
.icon {
background: #1aaaff;
}
}
.status2 {
color: #42d784;
.icon {
background: #42d784;
}
}
.status3 {
color: #ff4466;
.icon {
background: #ff4466;
}
}
}
}
// ::v-deep .AiCard:last-child {
// padding-bottom: 24px;
// }
.pad-b120 {
background-color: #f3f6f9;
padding-bottom: 120px;
}
}
</style>

View File

@@ -1,265 +0,0 @@
<template>
<div class="Transfer">
<div class="contents">
<u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
<u-form-item label="转交给" prop="status" required :border-bottom="false" right-icon="arrow-right" class="first-form" v-if="status == 1">
<!-- <u-input v-model="forms.name" placeholder="请选择转交对象" @click="toSelectUser" disabled/> -->
<AiPagePicker type="sysUser" single :isShowPhone="true" :selected.sync="forms.user" nodeKey="id" @select="handleSelectUser" class="select-user">
<span style="margin-left: 4px" v-if="forms.user && forms.user.length">{{ forms.user[0].name }}</span>
<span v-else class="color-999">请选择</span>
</AiPagePicker>
</u-form-item>
<u-form-item label="事件分类" prop="typeName" required :border-bottom="false" right-icon="arrow-right" v-if="status != 1">
<!-- <u-input v-model="forms.groupName" placeholder="请选择事件分类" /> -->
<span @click="show = true" class="right-span" :style="forms.typeName ? '' : 'color:#999;'">{{ forms.typeName || '请选择事件分类' }}</span>
<u-select v-model="show" :list="$dict.getDict('xbotReportEventType')" value-name="dictValue" label-name="dictName" @confirm="selectStatus"></u-select>
</u-form-item>
<u-form-item :label="status == 3 ? '办结意见' : status == 2 ? '拒绝受理意见' : '办理意见'" prop="content" required :border-bottom="false" label-position="top"
class="contents">
<u-input v-model="forms.content" :placeholder="status == 2 ? '请写下拒绝受理意见…' : '请写下你的办结意见...'" type="textarea" auto-height height="100" maxlength="500"/>
</u-form-item>
<div class="line"></div>
<u-form-item label="图片上传(最多9张)" prop="files" :border-bottom="false" class="avatars" label-position="top">
<AiUploader :def.sync="forms.files" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
</u-form-item>
</u-form>
</div>
<div class="btn" v-if="this.status == 1" @click="confirm">
<span>转交事件</span>
</div>
<div class="btn" v-if="this.status == 2" @click="confirm">
<span>拒绝受理</span>
</div>
<div class="btn" v-if="this.status == 3" @click="confirm">
<span>我已办结</span>
</div>
</div>
</template>
<script>
export default {
name: 'Content',
components: {},
props: {},
data() {
return {
forms: {
groupName: '',
groupId: '',
content: '',
files: [],
name: '',
handleUserId: '',
handleUserName: '',
type: '',
typeName: ''
},
flag: false,
show: false,
status: '', //1转交 2拒绝受理 3我已办结
myList: [],
id: '',
selectUser: {},
titleList: ['', '转交事件', '拒绝受理', '我已办结']
}
},
onLoad(option) {
this.$dict.load('xbotReportEventType')
this.status = option.status
this.id = option.id
this.forms.groupId = option.groupId
this.forms.groupName = option.groupName
this.typeList()
uni.$on('pagePicker:custom', (res) => {
this.selectUser = res
if (res.name) {
this.forms.name = res.name
} else {
this.forms.name = res.girdName
}
})
},
onShow() {
document.title = this.titleList[this.status]
},
methods: {
typeList() {
this.$http.post(`/app/appclapeventgroup/list`, null, {
params: {
size: 9999,
},
})
.then((res) => {
if (res.code == 0) {
this.myList = res.data.records
this.$forceUpdate()
}
})
},
handleSelectUser(e) {
this.forms.user = e
this.forms.handleUserId = e[0].id
this.forms.handleUserName = e[0].name
},
confirm() {
if (this.status == 1 && !this.forms.handleUserName) {
return this.$u.toast('请选择转交对象')
}
if (this.status != 1 && !this.forms.typeName) {
return this.$u.toast('请选择分类')
}
if (this.status != 1 && !this.forms.content) {
return this.$u.toast('请输入意见')
}
this.submit()
},
submit() { //status 1转交 2拒绝受理 3我已办结
var url = '', successText = '', params = ''
if (this.status == 1) {
url = `/app/appsessionarchivereportinfo/transfer`
successText = '转交成功'
params = {
...this.forms,
girdId: this.selectUser.id,
girdName: this.selectUser.girdName,
}
if (this.selectUser.name) { //选择的网格员
params.girdId = this.selectUser.girdId
params.girdMemberId = this.selectUser.id
params.girdMemberName = this.selectUser.name
}
}
if (this.status == 2) {
url = `/app/appsessionarchivereportinfo/finish`
successText = '拒绝成功'
params = {...this.forms, eventStatus: 0}
}
if (this.status == 3) {
url = `/app/appsessionarchivereportinfo/finish`
successText = '办结成功'
params = {...this.forms, eventStatus: 1}
}
params.id = this.id
this.$http.post(url, params).then((res) => {
if (res.code == 0) {
this.$u.toast(successText)
uni.$emit('updateDeatil')
uni.$emit('getListInit')
setTimeout(() => {
if (this.status == 1) {
uni.navigateBack({delta: 2})
} else {
uni.navigateBack()
}
}, 600)
}
})
},
selectStatus(e) {
this.forms.typeName = e[0].label
this.forms.type = e[0].value
},
toSelectUser() {
uni.navigateTo({url: './SelectDeptUser'})
},
},
}
</script>
<style scoped lang="scss">
.Transfer {
height: 100%;
.contents {
padding-bottom: 140px;
::v-deep .u-form {
.u-form-item {
padding: 0 45px !important;
.u-form-item__body {
.u-form-item--right__content__slot {
padding-bottom: 0;
.u-input {
text-align: right !important;
}
}
}
}
.u-form-item:first-child {
.u-form-item__body {
border-bottom: 1px solid #ddd;
}
}
.line {
height: 24px;
background: #f3f6f9;
}
.contents {
padding-bottom: 20px !important;
.u-form-item__body {
.u-form-item--right__content__slot {
.u-input {
text-align: left !important;
}
}
}
}
.avatars {
padding-bottom: 20px !important;
.u-form-item__body {
// .default {
// width: 160px;
// height: 160px;
// }
}
}
}
}
.btn {
position: fixed;
bottom: 0;
width: 100%;
box-sizing: border-box;
background: #3975c6;
padding: 34px 0;
text-align: center;
font-size: 32px;
font-weight: 500;
color: #ffffff;
}
.right-span {
display: inline-block;
width: 100%;
text-align: right;
}
.select-user {
width: 100%;
span {
display: inline-block;
width: 100%;
text-align: right;
}
}
}
</style>

View File

@@ -1,513 +0,0 @@
<template>
<div class="Detail">
<div class="header-top">
<div class="avatars" v-if="data.name">{{ data.name.substring(data.name.length, data.name.length - 2) }}</div>
<div class="right">
<div class="names">{{ data.name }}的上报</div>
<div class="times">{{ data.createTime }}</div>
</div>
<span class="edit-btn" @click="toEdit()" v-if="data.eventStatus != 2 || data.eventStatus != 3">编辑</span>
</div>
<div class="header-middle">
<div class="titles">{{ data.content }}</div>
<span class="status status0" :class="detailStatus.cls" v-if="data.eventStatus"> {{ detailStatus.label }}</span>
<div class="card">
<span class="card-left">事件类型</span>
<span class="card-right">{{ $dict.getLabel('xbotReportEventType', data.type)}}</span>
</div>
<!-- <div class="card">
<span class="card-left">所属网格</span>
<span class="card-right">{{ data.girdName }}</span>
</div> -->
<div class="card">
<span class="card-left">联系方式</span>
<span class="card-right">
<span> {{ data.phone }}</span>
<u-icon name="phone-fill" color="#3D94FB" @click="callPhone(data.phone)"></u-icon>
</span>
</div>
<div class="card">
<span class="card-left">上报地址</span>
<span class="card-right">
<span>{{ data.address }}</span>
</span>
</div>
<!-- 暂时先去掉 -->
<!-- <div class="card">
<span class="card-left">上报来源</span>
<span class="card-right">三角湖居民社群 李毅 小程序填报三角湖居民社群 李毅 小程序填报三角湖居民社群 李毅 小程序填报</span>
</div> -->
<div class="cards">
<span class="card-left" style="color:#999">照片</span>
</div>
<img :src="item.url" alt="" v-for="(item, i) in data.files" :key="i" @click="previewImage(data.files, item.url)"/>
</div>
<div class="header-bottom">
<div class="line"></div>
<div class="plan">
<div class="nav">
<span>办理进度</span>
<span> ({{ detailStatus.label }})</span>
</div>
<div class="cards" v-for="(item, index) in process" :key="index">
<div class="cardss">
<div class="cardss-left">
<span v-text="item.avatar"/>
</div>
<div class="cardss-right">
<div class="cardsss-right-left">
<div class="cardssss-right-left-top">
<span v-text="item.systemExplain"/>
<div style="color: #2ea222; font-size: 16px; margin-top: 5px" v-text="item.statusLabel"/>
</div>
</div>
<div class="cardees-right-right">{{ item.doTime }}</div>
</div>
<div class="lines"/>
</div>
<div class="cardes-msg-top" v-if="item.doExplain">{{ item.doExplain }}</div>
<div class="imgs">
<img :src="e.url" alt="" v-for="(e, index) in item.files" :key="index" @click="previewImage(item.files, e.url)"/>
</div>
</div>
</div>
</div>
<div class="fixedBtn">
<div class="status00" v-if="data.eventStatus == 0">
<div class="columns border-r" @click="toContent(1)">
<img src="./components/img/zhuanjiao.png" alt="" />
<span class="hint">转交事件</span>
</div>
<div class="columns" @click="toContent(2)">
<img src="./components/img/jujue.png" alt="" />
<span class="hint">拒绝受理</span>
</div>
<div class="doIt" @click="doItShow = true">我来受理</div>
</div>
<div class="endDoIt" v-if="data.eventStatus == 1" @click="toContent(3)">前往办理</div>
</div>
<AiEvaluation v-show="false" v-model="evaluation" :bid="data.id"/>
<u-modal v-model="doItShow" :mask-close-able="true" z-index="99" content="确定受理该事件?" :show-cancel-button="true" @confirm="doThings"></u-modal>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
name: 'Detail',
props: {},
data() {
return {
data: {},
id: '',
doItShow: false,
evaluation: {}
}
},
computed: {
...mapState(['user']),
detailStatus: v => {
const status = !v.evaluation.id ? v.data.eventStatus : 'evaluation'
return {
cls: 'status' + status,
label: !v.evaluation.id ? v.$dict.getLabel('clapEventStatus', v.data.eventStatus) : "已评价"
}
},
process() {
const getAvatar = str => str?.substring(str?.length, str?.length - 2)
const list = this.data.processList.map(e => ({
...e,
avatar: getAvatar(e.userName),
statusLabel: this.$dict.getLabel('clapDoStatus', e.doStatus)
}))
if (this.evaluation.id) {
const {id, createUserName, score, createTime: doTime, content: doExplain} = this.evaluation
list.splice(0, 0, {
id, doTime, doExplain,
statusLabel: `${score}星评价`,
avatar: getAvatar(createUserName),
systemExplain: `${createUserName}完成评价`
})
}
return list
}
},
watch: {},
onLoad(o) {
this.id = o.id
this.$dict.load('realityStatus', 'clapDoStatus', 'xbotReportEventType', 'clapEventStatus').then(() => {
this.getDetail()
})
uni.$on('updateDeatil', () => {
this.getDetail()
})
},
onShow() {
document.title = '工单详情'
},
methods: {
getDetail() {
this.$http.post(`/app/appsessionarchivereportinfo/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) {
this.data = res.data
}
})
},
callPhone(phone) {
uni.makePhoneCall({phoneNumber: phone})
},
doThings() {
this.$http.post(`/app/appsessionarchivereportinfo/acceptance?id=${this.id}`).then((res) => {
if (res.code == 0) {
this.getDetail()
}
})
},
toContent(status) {
uni.navigateTo({url: `./Content?status=${status}&groupId=${this.data.groupId}&groupName=${this.data.groupName}&id=${this.id}`})
},
previewImage(images, img) {
uni.previewImage({
urls: images.map(v => v.url),
current: img
})
},
toEdit() {
uni.navigateTo({url: `./Edit?id=${this.id}`})
}
},
}
</script>
<style scoped lang="scss">
uni-page-body {
height: 100%;
}
.Detail {
height: 100%;
background: #fff;
.header-top {
display: flex;
margin: 26px 0 14px 0;
padding: 0 32px;
position: relative;
.avatars {
width: 80px;
height: 80px;
line-height: 80px;
background: #3975c6;
border-radius: 50%;
color: #fff;
text-align: center;
font-size: 28px;
font-weight: 500;
margin-right: 16px;
}
.right {
.names {
font-size: 32px;
font-weight: 500;
}
.times {
margin-top: 10px;
font-size: 28px;
color: #999999;
}
}
.edit-btn {
position: absolute;
color: #197df0;
top: 16px;
right: 32px;
width: 150px;
height: 44px;
line-height: 44px;
text-align: right;
}
}
.header-middle {
padding: 0 32px 10px 32px;
.titles {
margin: 32px 0;
line-height: 1.4;
word-break: break-all;
font-size: 40px;
font-weight: 600;
}
.status {
display: inline-block;
margin-bottom: 14px;
padding: 4px 8px;
font-size: 26px;
color: #ffffff;
border-radius: 8px;
}
.status0 {
background: #ff883c;
}
.status1, .statusevaluation {
background: #1aaaff;
}
.status2 {
background: #42d784;
}
.status3 {
background: #ff4466;
}
.card {
display: flex;
justify-content: space-between;
padding: 34px 0;
border-bottom: 1px solid #ddd;
.card-left {
width: 46%;
font-size: 32px;
color: #999999;
}
.card-right {
font-size: 32px;
.u-icon {
margin-left: 8px;
}
}
}
// .card:last-child {
// border-bottom: none;
// }
.cards {
padding: 34px 0;
}
img {
width: 225px;
height: 226px;
margin-right: 8px;
}
img:nth-child(3n) {
margin-right: 0;
}
}
.header-bottom {
padding-bottom: 80px;
.line {
height: 16px;
background: #f3f6f9;
}
.plan {
padding: 0 32px;
background-color: #fff;
.nav {
padding: 26px 0;
}
.cards {
position: relative;
padding-bottom: 80px;
background-color: #fff;
.cardss {
display: flex;
justify-content: space-between;
.cardss-left {
position: relative;
width: 80px;
height: 80px;
text-align: center;
line-height: 80px;
color: #fff;
background: #197df0;
border: 1px solid #dddddd;
border-radius: 50%;
font-size: 28px;
z-index: 9;
// img {
// width: 100%;
// height: 100%;
// border-radius: 50%;
// }
.avatarIcon {
position: absolute;
bottom: 0;
right: 0;
width: 38px;
height: 38px;
}
}
.cardss-right {
width: calc(100% - 110px);
display: flex;
justify-content: space-between;
.cardsss-right-left {
.cardssss-right-left-top {
width: 300px;
overflow: hidden;
text-overflow: ellipsis;
font-size: 32px;
}
.cardssss-right-left-bottom {
margin-top: 10px;
font-size: 28px;
color: #666666;
}
}
.cardees-right-right {
font-size: 28px;
color: #999999;
}
}
.lines {
position: absolute;
top: 0;
left: 40px;
width: 4px;
height: 100%;
background: #eeeeee;
}
}
.cardes-msg-top {
font-size: 28px;
color: #343d65;
margin-top: 10px;
margin-left: 110px;
}
.imgs {
margin-top: 10px;
margin-left: 110px;
img {
width: 136px;
height: 136px;
border-radius: 4px;
margin-right: 12px;
}
img:nth-child(4n) {
margin-right: 0;
}
}
}
.cards:last-child {
.lines {
width: 0;
height: 0;
}
}
}
}
.fixedBtn {
background: #fff;
position: fixed;
bottom: 0;
width: 100%;
box-sizing: border-box;
z-index: 999;
.status00 {
display: flex;
.columns {
display: flex;
flex-direction: column;
align-items: center;
width: 22%;
padding: 16px 0;
border-top: 1px solid #ddd;
img {
width: 44px;
height: 42px;
}
.hint {
margin-top: 4px;
font-size: 28px;
color: #666666;
}
}
.border-r {
border-right: 1px solid #ddd;
}
.doIt {
width: 56%;
background: #3975c6;
text-align: center;
line-height: 112px;
font-size: 36px;
font-weight: 500;
color: #fff;
}
}
.endDoIt {
background: #3975c6;
text-align: center;
padding: 34px 0;
font-size: 32px;
font-weight: 500;
color: #ffffff;
}
}
}
</style>

View File

@@ -1,253 +0,0 @@
<template>
<div class="Edit">
<div class="contents">
<u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
<u-form-item label="事件描述" prop="content" required :border-bottom="false" label-position="top" class="contents">
<u-input v-model="forms.content" placeholder="请输入事件描述..." type="textarea" auto-height height="100" maxlength="500"/>
</u-form-item>
<u-form-item label="事件类型" prop="type" required :border-bottom="false" right-icon="arrow-right">
<span @click="show = true" class="right-span" :style="forms.typeName ? '' : 'color:#999;'">{{ forms.typeName || '请选择事件类型' }}</span>
<u-select v-model="show" :list="$dict.getDict('xbotReportEventType')" value-name="dictValue" label-name="dictName" @confirm="selectFl"></u-select>
</u-form-item>
<div class="line"></div>
<u-form-item label="所属网格" prop="girdName" :border-bottom="false">
<!-- <AiPagePicker type="gird" v-model="forms.girdId" @change="confirmGird" nodeKey="id" formType="2" class="right-span">
<AiMore v-model="forms.girdName" placeholder="请选择所属网格"/>
</AiPagePicker> -->
<AiPagePicker type="gird" v-model="selectGird" valueObj nodeKey="id" formType="2" class="right-span">
<AiMore v-model="selectGird.girdName"/>
</AiPagePicker>
</u-form-item>
<u-form-item label="联系方式" prop="phone" :border-bottom="false" >
<u-input v-model="forms.phone" placeholder="请输入联系方式" />
</u-form-item>
<u-form-item label="上报位置" prop="mapInfo" :border-bottom="false" right-icon="arrow-right" class="border">
<span @click="toMap" class="right-span" :style="forms.mapInfo.address ? '' : 'color:#999;'">{{ forms.mapInfo.address || '请选择上报位置' }}</span>
</u-form-item>
<div class="line"></div>
<u-form-item label="图片上传(最多9张)" prop="files" :border-bottom="false" class="avatars" label-position="top">
<AiUploader :def.sync="forms.files" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
</u-form-item>
<div class="line"></div>
</u-form>
</div>
<div class="btn" @click="confirm">
<span>提交</span>
</div>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
name: 'Edit',
data() {
return {
forms: {
groupName: '',
groupId: '',
content: '',
mapInfo: {address: ''},
girdId: '',
girdName: '',
files: [],
name: '',
phone: '',
type: ''
},
flag: false,
show: false,
flList: [],
id: '',
selectGird: {}
}
},
computed: {
...mapState(['user']),
},
onLoad(option) {
this.id = option.id
this.$dict.load('xbotReportEventType').then(() => {
this.getDetail()
})
},
onShow() {
document.title = '事件编辑'
uni.$on('chooseLat', res => {
this.forms.mapInfo = {...res}
})
},
methods: {
getDetail() {
this.$http.post(`/app/appsessionarchivereportinfo/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) {
this.forms = res.data
this.forms.mapInfo = {
lat: res.data.lat,
lng: res.data.lng,
address: res.data.address,
}
this.forms.typeName = res.data.type
var list = this.$dict.getDict('xbotReportEventType')
list.map((item) => {
if(item.dictValue == res.data.type) {
this.forms.typeName = item.dictName
}
})
this.selectGird = { girdId: res.data.girdId|| '', girdName: res.data.girdName || ''}
}
})
},
selectFl(e) {
this.forms.type = e[0].value
this.forms.typeName = e[0].label
},
confirmGird(v) {
console.log(v)
this.forms.girdId = v.id
this.forms.girdName = v.girdName
},
toMap() {
uni.navigateTo({url: `./Map`})
},
confirm() {
if(this.flag) return
if (!this.forms.content) {
return this.$u.toast('请输入事件描述')
}
if (!this.forms.type) {
return this.$u.toast('请选择事件类型')
}
// if (!this.forms.mapInfo.address) {
// return this.$u.toast('请选择上报位置')
// }
// if (!this.forms.girdName) {
// return this.$u.toast('请选择所属网格')
// }
// if (!this.forms.name) {
// return this.$u.toast('请输入姓名')
// }
// if (!this.forms.phone) {
// return this.$u.toast('请输入手机号')
// }
this.flag = true
this.forms.girdId = this.selectGird.girdId
this.forms.girdName = this.selectGird.girdName
this.$http.post(`/app/appsessionarchivereportinfo/update`, {...this.forms, ...this.forms.mapInfo}).then((res) => {
if (res.code == 0) {
this.$u.toast('事件编辑成功')
uni.$emit('getListInit')
uni.$emit('updateDeatil')
setTimeout(() => {
uni.navigateBack()
}, 600)
}
})
},
},
}
</script>
<style scoped lang="scss">
.Edit {
height: 100%;
.contents {
padding-bottom: 140px;
::v-deep .u-form {
.u-form-item {
// padding: 0 45px !important;
.u-form-item__body {
.u-form-item--right__content__slot {
padding-bottom: 0;
.u-input {
text-align: right !important;
}
}
}
}
.u-form-item:first-child {
.u-form-item__body {
border-bottom: 1px solid #ddd;
}
}
.line {
height: 24px;
background: #f3f6f9;
}
.contents {
padding-bottom: 20px !important;
.u-form-item__body {
.u-form-item--right__content__slot {
.u-input {
text-align: left !important;
}
}
}
}
.avatars {
padding-bottom: 20px !important;
.u-form-item__body {
// .default {
// width: 160px;
// height: 160px;
// }
}
}
}
}
.border {
::v-deep .u-form-item__body {
border-bottom: 1px solid #ddd;
}
}
.btn {
position: fixed;
bottom: 0;
width: 100%;
box-sizing: border-box;
background: #3975c6;
padding: 34px 0;
text-align: center;
font-size: 32px;
font-weight: 500;
color: #ffffff;
}
.right-span {
display: inline-block;
width: 100%;
text-align: right;
::v-deep .u-icon__label {
font-size: 28px!important;
}
::v-deep .uicon-arrow-right{
color: #c0c4cc!important;
}
}
::v-deep .uni-input-placeholder {
color: #999!important;
font-size: 28px!important;
}
}
</style>

View File

@@ -1,322 +0,0 @@
<template>
<div class="map">
<!-- <div class="build-btn locate" @click="getLocale">
<img src="https://cdn.cunwuyun.cn/dvcp/h5/Location2.png" alt=""/>
当前<br>位置
</div> -->
<div class="address-search">
<div class="address-search__wrapper">
<image src="./components/img/search.png" />
<input placeholder-style="color: #98A6B6" placeholder="搜索地点" v-model="address" @input="onChange">
</div>
</div>
<scroll-view scroll-y scroll-into-view="address-item1" v-if="addressList.length">
<div class="address-item" :id="'address-item' + index" v-for="(item, index) in addressList" :key="index" @click="chooseAddress(index)">
<div class="left">
<h2>{{ item.title }}</h2>
<p>{{ item.address }}</p>
</div>
<!-- <div class="right" :class="[currIndex === index ? 'active' : '']"></div> -->
</div>
</scroll-view>
<div class="map-content">
<AiTMap :map.sync="map" :lib.sync="lib" :ops="ops" :libraries="['service', 'tools']"/>
</div>
<div class="footer">
<div class="btn" @click="confirm">确认定位</div>
</div>
</div>
</template>
<script>
import {mapState, mapActions} from 'vuex'
export default {
data() {
return {
ops: {},
lib: null,
map: null,
markerLayer: '',
isFlag: false,
latLng: {lat: '', lng: ''},
address: '',
addressList: []
}
},
computed: {...mapState(['user'])},
mounted() {
this.initMap()
},
onShow() {
document.title = "选择上报位置"
},
methods: {
...mapActions(['injectJWeixin']),
initMap(retryTimes = 0) { //初始化地图
this.$nextTick(() => {
let {map} = this
if (map) {
map.setZoom(15)
map.on("click", (evt) => {
this.handleMapClick(evt)
});
} else {
if (retryTimes < 10)
setTimeout(() => {
this.initMap(++retryTimes)
}, 500)
else console.error("地图渲染失败")
}
})
},
onChange () {
if (this.timeout) {
clearTimeout(this.timeout)
}
this.timeout = setTimeout(() => {
this.currIndex = -1
new this.lib.service.Suggestion({
pageSize: 20
}).getSuggestions({
keyword: this.address
}).then(res => {
this.addressList = []
if (res.data.length) {
this.addressList = res.data
}
})
}, 500)
},
getAddress () {
new this.lib.service.Search({
pageSize: 20
}).explore({
center: this.latLng,
radius: 2000,
orderBy: '_distance'
}).then(res => {
this.addressList = []
if (res.data.length) {
this.addressList = res.data
}
})
},
chooseAddress (index) {
this.address = this.addressList[index].address
this.latLng = {lat: this.addressList[index].location.lat, lng: this.addressList[index].location.lng}
this.addMarker(this.addressList[index].location)
},
addMarker (position) {
if (this.marker) {
this.marker.setMap(null)
this.marker = null
}
this.marker = new this.lib.MultiMarker({
id: 'marker-layer',
map: this.map,
styles: {
marker: new this.lib.MarkerStyle({
width: 30,
height: 45,
anchor: { x: 10, y: 30 }
}),
},
geometries: [{
id: 'marker',
styleId: 'marker',
position: position,
properties: {
title: 'marker'
}
}]
})
this.easeTo(position)
},
easeTo (position) {
this.map.easeTo({
center: position,
zoom: 17
},
{ duration: 500 })
},
handleMapClick(evt) {
console.log(evt)
let {lib: TMap, map} = this
if (this.markerLayer) {
this.markerLayer.setMap(null);
}
this.markerLayer = new TMap.MultiMarker({id: 'marker-layer', map});
this.markerLayer.add({
position: evt.latLng
});
this.latLng = evt.latLng
var geocoder = new TMap.service.Geocoder();
geocoder.getAddress({ location: this.latLng }).then((result) => {
this.address = result.result.address;
});
},
confirm() {
if (!this.latLng.lat) {
return this.$u.toast(`未获取到定位信息,无法定位`)
}
uni.$emit('chooseLat', {
lat: this.latLng.lat,
lng: this.latLng.lng,
address: this.address
})
uni.navigateBack({
delta: 1
})
},
}
}
</script>
<style lang="scss" scoped>
uni-page-body {
height: 100%;
}
.map {
height: 100vh;
.build-btn {
width: 80px;
height: 160px;
background: #FFF;
box-shadow: 0 4px 8px 0 rgba(138, 138, 138, 0.5);
border-radius: 8px;
position: fixed;
bottom: 136px;
right: 24px;
z-index: 99999;
padding: 16px 16px 0;
box-sizing: border-box;
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #666;
line-height: 30px;
&.locate {
transform: translateY(calc(-100% - 20px));
}
img {
width: 48px;
height: 48px;
margin-bottom: 8px;
}
}
.map-content {
width: 100%;
height: 100%;
}
.footer {
width: 100%;
position: fixed;
bottom: 0;
left: 0;
z-index: 99999;
display: flex;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
height: 112px;
line-height: 112px;
text-align: center;
.click {
flex: 1;
color: #333;
background-color: #fff;
}
.btn {
flex: 2;
background: #1365DD;
color: #FFF;
}
}
.address-search {
display: flex;
align-items: center;
height: 100px;
padding: 0 32px;
.address-search__wrapper {
display: flex;
align-items: center;
width: 100%;
height: 72px;
padding: 0 32px;
background: #F6F7F9;
border-radius: 36px;
image {
width: 48px;
height: 48px;
}
input {
flex: 1;
font-size: 26px;
color: #333;
}
}
}
scroll-view {
height: 400px;
padding: 0 32px;
.address-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 32px 0;
border-bottom: 1px solid #EEEEEE;
&:last-child {
border: none;
}
.left {
flex: 1;
margin-right: 20px;
}
.right {
flex-shrink: 1;
width: 32px;
height: 32px;
border-radius: 50%;
border: 4px solid #CCCCCC;
transition: all ease 0.3s;
&.active {
border: 10px solid #1365DD;
}
}
h2 {
margin-bottom: 20px;
color: #222222;
font-weight: 600;
font-size: 34px;
}
p {
line-height: 1.2;
color: #999999;
font-size: 28px;
}
}
}
}
</style>

View File

@@ -1,323 +0,0 @@
<template>
<section class="selectDeptUser">
<div class="header-middle">
<div class="hint">
<span v-for="(item, index) in selectDeptPath" :key="index">
<span v-if="index>0" class="mar-h4">/</span>
<span class="color-3F8DF5" @click="deptNameClick(item, index)">{{ item.name }}</span>
</span>
</div>
<div class="cards" v-for="item in treeList" :key="item.id" @click="itemClick(item)">
<div class="imges">
<div class="imgselect" v-if="type == 1" :class="{checked:item.isChecked}" @click.stop="itemCheck(item, 'dept')"/>
<img src="./images/gird--select-icon.png" alt="" class="avatras"/>
</div>
<div class="rightes">
<div class="applicationNames">{{ item.name }}</div>
<img src="./images/right-icon.png" alt="" class="imgs"/>
</div>
</div>
<div v-if="type == 0">
<div class="userCards" v-for="e in userList" :key="e.id">
<div class="imges">
<div class="imgselect" :class="{checked:e.isChecked}" @click.stop="itemCheck(e, 'user')"/>
<img src="./images/tx@2x.png" alt="" class="avatras"/>
</div>
<div class="rights fill">
<div class="applicationNames" v-text="e.name"></div>
<div class="idNumbers">{{ e.phone }}</div>
</div>
</div>
</div>
<AiEmpty description="暂无数据" v-if="!hasData"/>
</div>
<div class="subBtn" @click="submit">
<div>确定选择</div>
</div>
</section>
</template>
<script>
import { mapState } from "vuex";
export default {
name: "selectDeptUser",
appName: "选择人员",
data() {
return {
selected: [],
allData: null,
treeList: [],
selectDeptPath: [],
userList: [],
type: null,
}
},
computed: {
hasData() {
return this.treeList?.length > 0 || this.userList?.length > 0
},
...mapState(['user'])
},
onLoad(o) {
// this.type = o.selectTtype.split('?')[0]
this.type = 0
if(this.type == 1) { //选择发送范围部门
this.getAllDepts()
this.selected = uni.getStorageSync('deptList') || []
}else { //选择审批人
this.getListAll()
this.selected = uni.getStorageSync('selectDeptUser') || []
}
},
methods: {
isSelected(id, corpId) {
return !!this.selected.find(e => e.id == id && e.corpId == corpId)
},
getListAll() {
this.$http.post('/app/wxcp/wxdepartment/listAllByCorp').then((res) => {
if (res?.data) {
let parents = res.data.map(e => e.parentid)
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id), isChecked: this.isSelected(e.id, e.corpId)}))
this.deptInit()
}
})
},
getAllDepts() {
// this.$http.post('/app/wxcp/wxdepartment/listAllByCorp').then((res) => {
// if (res?.data) {
// let parents = res.data.map(e => e.parentid)
// this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id), isChecked: this.isSelected(e.id, e.corpId)}))
// this.deptInit()
// }
// })
this.$http.post(`/app/wxcp/wxdepartment/listAll?wxMainDepartmentId=${this.user.wxMainDepartmentId}`).then((res) => {
if (res?.data) {
let parents = res.data.map(e => e.parentid)
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id), isChecked: this.isSelected(e.id, e.corpId)}))
this.deptInit()
}
})
},
deptInit() {
if(this.type == 1) { //选择发送范围部门
this.treeList = this.allData.filter(e => e.id == this.user.wxMainDepartmentId)
}else { //选择审批人
this.treeList = this.allData.filter(e => !e.parentid)
}
this.selectDeptPath = [{name: "可选范围", id: ''}]
},
itemClick({id, name, corpId}) {
let index = this.selectDeptPath.findIndex(e => e.id == id && e.corpId == corpId)
if (index == -1) {
this.selectDeptPath.push({name, id, corpId})
this.getDeptsAndUsersByParent(id, corpId)
}
},
getDeptsAndUsersByParent(departmentId, corpId) {
this.treeList = this.allData.filter(e => e.parentid == departmentId && e.corpId == corpId)
this.userList = []
this.$http.post(`/app/wxcp/wxuser/listByDeptId`, null, {
params: {departmentId, status: 1, cid: corpId}
}).then(res => {
if (res?.data) {
this.userList = res.data.map(e => ({...e, isChecked: this.isSelected(e.id, e.corpId)}))
}
})
},
deptNameClick(row, index) {
this.userList = []
if (!index) { //第一级别
this.deptInit()
} else {
let length = this.selectDeptPath.length - index
this.selectDeptPath.splice(index + 1, length)
this.getDeptsAndUsersByParent(row.id, row.corpId)
}
},
itemCheck(row, kind) {
row.isChecked = !row.isChecked
if (row.isChecked) {
this.selected.push({...row, kind})
} else {
let index = this.selected.findIndex(e => e.id == row.id)
this.selected.splice(index, 1)
}
this.$forceUpdate()
},
submit() {
console.log([this.selected].flat())
if(this.type == 1) { //选择部门
if(![this.selected].flat().length) {
return this.$u.toast('请选择部门')
}
uni.setStorageSync('deptList', [this.selected].flat())
}else { //选择人
if(![this.selected].flat().length) {
return this.$u.toast('请选择审核人员')
}
uni.$emit("pagePicker:custom", [this.selected].flat())
// uni.setStorageSync('selectDeptUser', [this.selected].flat())
}
uni.navigateBack()
},
}
}
</script>
<style lang="scss" scoped>
.selectDeptUser {
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;
}
.empty-div {
height: 16px;
background: #f5f5f5;
}
.imges {
display: flex;
align-items: center;
.imgselect {
width: 48px;
height: 48px;
vertical-align: middle;
background-image: url("./images/xz.png");
background-position: center;
background-size: 100% 100%;
&.checked {
background-image: url("./images/xzh.png");
}
}
.avatras {
width: 74px;
height: 74px;
border-radius: 8px;
margin-left: 36px;
}
}
.cards {
display: flex;
align-items: center;
height: 120px;
line-height: 120px;
padding: 0 0 0 32px;
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 {
flex-shrink: 0;
width: 40px;
height: 40px;
margin-right: 20px;
}
}
}
.userCards {
display: flex;
align-items: center;
height: 120px;
line-height: 120px;
padding: 0 0 0 32px;
.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;
}
}
.color-3F8DF5 {
color: #3F8DF5;
}
.mar-h4 {
margin: 0 4px;
}
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 810 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 955 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB