会话存档

This commit is contained in:
liuye
2023-08-22 10:23:36 +08:00
parent cdc304deed
commit 285b8b1cf5
66 changed files with 2510 additions and 283 deletions

View File

@@ -0,0 +1,309 @@
<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

@@ -0,0 +1,632 @@
<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/list`, 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

@@ -0,0 +1,127 @@
<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.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,285 @@
<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/list`, 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

@@ -0,0 +1,110 @@
<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

@@ -0,0 +1,87 @@
<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

@@ -0,0 +1,261 @@
<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}&toUserId=${row.toUserId}&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

@@ -0,0 +1,687 @@
<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/listByKeywordRecord`, null, {
params: {
userId: this.id,
size: 10,
// msgType: this.msgTypeList[this.msgType].value,
toUserId: this.params.type == 1 ? '' : this.params.toUserId,
roomId: this.params.type == 1 ? 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.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,278 @@
<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">{{ item.groupName }}</span>
</div>
<div class="gards">
<span>所属网格</span>
<span class="gards-right">{{ item.girdName }}</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').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

@@ -0,0 +1,242 @@
<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/>
</u-form-item>
<u-form-item label="事件分类" prop="groupName" 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.groupName ? '' : 'color:#999;'">{{ forms.groupName || '请选择事件分类' }}</span>
<u-select v-model="show" :list="myList" value-name="id" label-name="groupName" @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: ''
},
flag: false,
show: false,
status: '', //1转交 2拒绝受理 3我已办结
myList: [],
id: '',
selectUser: {},
titleList: ['', '转交事件', '拒绝受理', '我已办结']
}
},
onLoad(option) {
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()
}
})
},
confirm() {
if (this.status == 1 && !this.forms.name) {
return this.$u.toast('请选择转交对象')
}
if (this.status != 1 && !this.forms.groupName) {
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: 3}
}
if (this.status == 3) {
url = `/app/appsessionarchivereportinfo/finish`
successText = '办结成功'
params = {...this.forms, eventStatus: 2}
}
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.groupName = e[0].label
this.forms.groupId = e[0].value
},
toSelectUser() {
uni.navigateTo({url: '../AppGridManagement/selectGridMember'})
},
},
}
</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;
}
}
</style>

View File

@@ -0,0 +1,495 @@
<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>
</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">{{ data.groupName }}</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 && data.rightType == 0" @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.girdMemberName),
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').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/finish?id=${this.id}&eventStatus=1`).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
})
},
},
}
</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;
.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;
}
}
}
.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;
.nav {
padding: 26px 0;
}
.cards {
position: relative;
padding-bottom: 80px;
.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

@@ -0,0 +1,339 @@
<template>
<div class="SelectUser">
<div class="header-middle">
<div class="hint">
<span v-for="(item, index) in slectList" :key="index"><span v-if="index" style="margin:0 4px;">/</span><span style="color:#3F8DF5" @click="girdNameClick(item, index)">{{item.girdName}}</span></span>
</div>
<div class="showTypes" v-if="!userList.length">
<div v-if="treeList.length > 0">
<div class="cards" v-for="(item, index) in treeList" :key="index" @click="itemClick(item)">
<div class="imges">
<span v-if="item.girdLevel == 2">
<img src="./components/img/xzh.png" alt="" class="imgselect" v-if="item.isChecked" @click.stop="girdClick(item, index)" />
<img src="./components/img/xz.png" alt="" class="imgselect" v-else @click.stop="girdClick(item, index)" />
</span>
<img src="./components/img/gird--select-icon.png" alt="" class="avatras" />
</div>
<div class="rightes">
<div class="applicationNames">{{ item.girdName }}</div>
<img src="./components/img/right-icon.png" alt="" class="imgs" />
</div>
</div>
</div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
<div class="showUsers" v-else>
<div v-if="userList.length > 0">
<div class="cards" v-for="(e, index) in userList" :key="index">
<div class="imges">
<img src="./components/img/xzh.png" alt="" class="imgselect" v-if="e.isChecked" @click="userClick(e, index)" />
<img src="./components/img/xz.png" alt="" class="imgselect" v-else @click="userClick(e, index)" />
<img src="./components/img/tx@2x.png" alt="" class="avatras" />
</div>
<div class="rights">
<div class="applicationNames">{{ e.name }}</div>
<div class="idNumbers">{{ e.phone }}</div>
</div>
</div>
</div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
</div>
<div class="subBtn" @click="submit">
<div>确定选择</div>
</div>
</div>
</template>
<script>
export default {
name: 'SelectUser',
data() {
return {
selectUser: {},
allData: null,
treeList: [],
slectList: [],
userList: [],
}
},
onLoad() {
this.getTree()
},
onShow() {
document.title = '选择人员'
},
methods: {
getTree() {
this.slectList = []
this.$http.post('/app/appgirdinfo/listAllByTop').then((res) => {
if (res?.data) {
this.allData = res.data
this.treeInit()
}
})
},
treeInit() {
if(this.allData[0].girdLevel == 2) {
if(this.allData[0].girdMemberList && this.allData[0].girdMemberList.length) {
this.userList = this.allData[0].girdMemberList
this.userList.map((item) => {
item.isChecked = false
})
}
}else {
this.treeList = this.allData[0].girdList
}
var obj = {
girdName: this.allData[0].girdName,
id: this.allData[0].id,
girdLevel: this.allData[0].girdLevel
}
this.slectList.push(obj)
},
itemClick(row) {
console.log(row)
var obj = {
girdName: row.girdName,
id: row.id,
girdLevel: row.girdLevel
}
this.slectList.push(obj)
this.searckGird(row)
},
searckGird(row) {
this.treeList = []
if(row.girdLevel != 2) { //查网格
this.$http.post(`/app/appgirdinfo/list?parentGirdId=${row.id}&size=999`).then((res) => {
if (res?.data) {
this.treeList = res.data.records
}
})
}else { //查网格员
this.userList = []
this.$http.post(`/app/appgirdmemberinfo/listByGirdIdByThree?girdId=${row.id}`).then((res) => {
if (res?.data) {
this.userList = res.data
this.userList.map((item) => {
item.isChecked = false
})
}
})
}
},
girdNameClick(row, index) {
this.userList = []
if(!index) { //第一级别
this.slectList = []
this.treeInit()
}else {
var list = []
this.slectList.map((item, i) => {
if(i <= index) {
list.push(item)
}
})
this.slectList = list
this.searckGird(row)
}
},
girdClick(row, index) {
if (this.treeList[index].isChecked) {//取消
this.treeList[index].isChecked = false
this.selectUser = {}
} else {
this.treeList.map((item) => {
item.isChecked = false
})
this.treeList[index].isChecked = true
this.selectUser = row
}
this.$forceUpdate()
},
userClick(row, index) {
if (this.userList[index].isChecked) {//取消
this.userList[index].isChecked = false
this.selectUser = {}
} else {
this.userList.map((item) => {
item.isChecked = false
})
this.userList[index].isChecked = true
this.selectUser = row
}
this.$forceUpdate()
},
submit() {
if (this.selectUser.id != null) {
uni.$emit('goback', this.selectUser)
uni.navigateBack()
} else {
return this.$u.toast('请选择网格或网格员')
}
},
}
}
</script>
<style scoped lang="scss">
.SelectUser {
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: 0px 1px 0px 0px #e4e5e6;
font-size: 30px;
font-weight: 500;
word-break: break-all;
}
.showTypes {
.empty-div {
height: 16px;
background: #f5f5f5;
}
.cards {
display: flex;
align-items: center;
height: 120px;
line-height: 120px;
// background: pink;
padding: 0 0 0 32px;
.imges {
display: flex;
align-items: center;
// width: 200px;
.imgselect {
width: 48px;
height: 48px;
vertical-align: middle;
}
.avatras {
width: 74px;
height: 74px;
border-radius: 8px;
margin-left: 36px;
}
}
img {
width: 74px;
height: 74px;
border-radius: 8px;
}
.rightes {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-left: 32px;
border-bottom: 1px solid #e4e5e6;
.applicationNames {
font-size: 36px;
font-weight: 500;
color: #333333;
}
.imgs {
width: 40px;
height: 40px;
margin-right: 20px;
}
}
}
}
.showUsers {
.cards {
display: flex;
align-items: center;
height: 120px;
line-height: 120px;
// background: pink;
padding: 0 0 0 32px;
.imges {
display: flex;
align-items: center;
width: 200px;
.imgselect {
width: 48px;
height: 48px;
}
.avatras {
width: 74px;
height: 74px;
border-radius: 8px;
margin-left: 36px;
}
}
.rights {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-left: 32px;
border-bottom: 1px solid #e4e5e6;
padding-right: 40px;
.applicationNames {
font-size: 36px;
font-weight: 500;
color: #333333;
}
.idNumbers {
color: #666;
}
}
}
}
}
.subBtn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 118px;
background: #f4f8fb;
div {
width: 192px;
height: 80px;
line-height: 80px;
text-align: center;
background: #1365dd;
border-radius: 4px;
font-size: 32px;
color: #fff;
margin: 20px 34px 0 0;
float: right;
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 810 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB