迁移saas版首页应用进入产品库

This commit is contained in:
aixianling
2022-08-08 15:39:14 +08:00
parent 3da33a88d3
commit 9101bf8ba1
62 changed files with 2020 additions and 0 deletions

View File

@@ -0,0 +1,132 @@
<template>
<div class="AppHomeOld">
<component v-if="refresh" :is="component" @change="onChange" :params="params"></component>
<div class="tabs">
<div class="item" @click="tabClick(index, item.component)" v-for="(item, index) in tabs" :key="index">
<img :src="tabIndex == index ? item.activeImg : item.img" alt=""/>
<p :class="tabIndex == index ? 'color-3267F0' : ''">{{ item.text }}</p>
</div>
</div>
</div>
</template>
<script>
import home from './home.vue'
import application from './application.vue'
import statistics from './statistics.vue'
import my from './my.vue'
export default {
name: 'AppHomeOld',
appName: '首页',
provide() {
return {top: this}
},
data() {
return {
component: 'home',
params: {},
refresh: true,
tabIndex: 0,
tabs: [
{
img: require('./components/img/home-icon.png'),
activeImg: require('./components/img/home-icon-active.png'),
text: '首页',
component: 'home',
},
{
img: require('./components/img/app-icon.png'),
activeImg: require('./components/img/app-icon-active.png'),
text: '应用',
component: 'application',
},
{
img: require('./components/img/statistics-icon.png'),
activeImg: require('./components/img/statistics-icon-active.png'),
text: '统计',
component: 'statistics',
},
{
img: require('./components/img/my-icon.png'),
activeImg: require('./components/img/my-icon-active.png'),
text: '我的',
component: 'my'
},
],
isTab: true,
}
},
onShow() {
this.refreshHome()
},
components: {
home,
application,
statistics,
my,
},
methods: {
onChange(e) {
this.params = e.params
this.component = e.type
},
tabClick(index, component) {
this.tabIndex = index
this.component = component
this.refreshHome()
},
refreshHome() {
this.refresh = false
this.$nextTick(() => {
this.refresh = true
})
},
linkTo(url) {
uni.navigateTo({url})
},
},
}
</script>
<style lang="scss" scoped>
.AppHomeOld {
height: 100%;
.tabs {
width: 100%;
height: 98px;
background: #fff;
border-top: 1px solid #ddd;
position: fixed;
bottom: 0;
left: 0;
display: flex;
z-index: 999;
.item {
flex: 1;
text-align: center;
img {
width: 56px;
height: 56px;
margin-top: 8px;
}
p {
font-size: 22px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #c4cad4;
line-height: 8px;
}
.color-3267F0 {
color: #3267f0;
}
}
}
}
</style>

View File

@@ -0,0 +1,172 @@
<template>
<div class="application">
<div class="card" v-for="(item, index) in tabs" :key="index">
<div class="card-title">{{ item.title }}</div>
<div class="app-list">
<div class="app-item" v-for="(e, i) in item.list" :key="i" @click="linkTo(e.linkUrl)">
<div>
<img :src="e.iconUrl" alt="" class="app-img">
</div>
<div class="app-name">{{ e.label }}</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'application',
data() {
return {
tabs: [
{
title: '网格管理',
list: [
{
label: '网格管理',
iconUrl: require('./components/img/icon1wg@2x.png'),
linkUrl: '/apps/AppGridManagement/AppGridManagement'
},
{
label: '特殊人群',
iconUrl: require('./components/img/icon2ts@2x.png'),
linkUrl: '/apps/AppSpecialPeople/AppSpecialPeople'
},
{
label: '以房找人',
iconUrl: require('./components/img/icon3yf@2x.png'),
linkUrl: '/apps/AppBuilding/AppBuilding'
},
{
label: '居民管理',
iconUrl: require('./components/img/icon4jm@2x.png'),
linkUrl: '/apps/AppResidentDocument/AppResidentDocument'
}
]
},
{
title: '事务处理',
list: [
{
label: '矛盾调解',
iconUrl: require('./components/img/icon5md@2x.png'),
linkUrl: '/apps/AppConflictMediation/AppConflictMediation'
},
{
label: '走访慰问',
iconUrl: require('./components/img/icon6zf@2x.png'),
linkUrl: '/apps/AppWalkask/AppWalkask'
},
{
label: '事务记录',
iconUrl: require('./components/img/icon7sw@2x.png'),
linkUrl: '/apps/AppInterview/AppInterview'
},
{
label: '问卷表单',
iconUrl: require('./components/img/icon8wj@2x.png'),
linkUrl: '/apps/AppAskForm/AppAskForm'
},
{
label: '会议通知',
iconUrl: require('./components/img/icon9hy@2x.png'),
linkUrl: '/apps/AppMeetingNotice/AppMeetingNotice'
},
{
label: '电话簿',
iconUrl: require('./components/img/icon10txl@2x.png'),
linkUrl: '/apps/AppMailList/AppMailList'
},
{
label: '通知公告',
iconUrl: require('./components/img/icon11tzgg@2x.png'),
linkUrl: '/apps/AppNotification/AppNotification'
},
{
label: '协同宣发',
iconUrl: require('./components/img/iconxtxf.png'),
linkUrl: '/apps/AppCooperationPropaganda/AppCooperationPropaganda'
},
{
label: '宣发统计',
iconUrl: require('./components/img/iconxftj.png'),
linkUrl: '/apps/AppPropagandaStatistics/AppPropagandaStatistics'
},
]
},
{
title: '疫情防控',
list: [
{
label: '健康上报',
iconUrl: require('./components/img/icon12jksb@2x.png'),
linkUrl: '/apps/AppHealthUp/AppHealthUp'
},
{
label: '返乡登记',
iconUrl: require('./components/img/icon13fxdj@2x.png'),
linkUrl: '/apps/AppBackUserList/AppBackUserList'
}
]
},
]
}
},
created() {
document.title = '应用'
},
methods: {
linkTo(url) {
uni.navigateTo({url})
}
}
}
</script>
<style lang="scss" scoped>
.application {
padding: 40px 28px 100px 28px;
box-sizing: border-box;
.card {
padding: 20px 30px;
margin-bottom: 32px;
box-sizing: border-box;
width: 100%;
background-color: #FFFFFF;
border-radius: 12px;
box-shadow: 0 2px 4px 2px rgba(173, 173, 173, 0.05);
.card-title {
height: 40px;
line-height: 40px;
font-weight: 800;
}
.app-list {
display: flex;
flex-wrap: wrap;
.app-item {
width: 25%;
height: 150px;
text-align: center;
padding-top: 20px;
box-sizing: border-box;
.app-img {
width: 72px;
height: 72px;
}
.app-name {
font-size: 26px;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>椭圆形@2x</title>
<defs>
<linearGradient x1="-6.40247416%" y1="78.6024762%" x2="92.5750723%" y2="28.2732432%" id="linearGradient-1">
<stop stop-color="#E4F4FC" stop-opacity="0.620410839" offset="0%"></stop>
<stop stop-color="#D6EDF8" offset="27.6533459%"></stop>
<stop stop-color="#3AB3F0" offset="100%"></stop>
</linearGradient>
</defs>
<g id="企微上架传蓝湖" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="1.3-首页无通知公告不显示" transform="translate(-83.000000, -608.000000)" fill="url(#linearGradient-1)">
<circle id="椭圆形" cx="90" cy="615" r="7"></circle>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 919 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@@ -0,0 +1,149 @@
<template>
<div class="feedback">
<div class="suggest">
<div flex class="title"><em v-text="'*'"/>请输入您的宝贵意见</div>
<AiTextarea v-model="content" placeholder="请输入200字以内" :maxlength="200"/>
</div>
<div class="name">
<div flex><em v-text="'*'"/>联系人</div>
<input type="text" placeholder="请输入您的姓名" style="text-align: right;" v-model="name" class="inp">
</div>
<div class="phone">
<div flex><em v-text="'*'"/>联系方式</div>
<input type="number" placeholder="请输入您的联系方式" style="text-align: right;" v-model="phone" class="inp">
</div>
<div class="photo">
<div class="photo-title">图片 <span>最多9张</span></div>
<div class="pad-120">
<AiUploader :limit="9" multiple :def.sync="picture" placeholder="上传图片" action="/admin/file/add2"/>
</div>
</div>
<div style="height: 56px;"></div>
<div class="btn" @click="submit">保存</div>
</div>
</template>
<script>
export default {
name: 'feedback',
data() {
return {
content: '',
picture: [],
name: '',
phone: ''
}
},
methods: {
submit() {
let {phone, content, picture, name} = this
if (!content) {
return this.$u.toast("请输入您的宝贵意见")
}
if (!name) {
return this.$u.toast("请输入您的姓名")
}
if (!phone) {
return this.$u.toast("请输入联系方式")
}
if (!/^\d{11}$/g.test(phone)) {
return this.$u.toast("联系方式格式有误!")
}
this.$http.post("/oms/api/appfeedback/addOrUpdate", {
phone,
opinion: content,
pictureUrl: picture?.map(e=>e.url).toString(),
contacts: name,
sourceHost: location.host
}, {
withoutToken: true
}).then(res => {
if (res?.code == 0) {
this.$u.toast("保存成功!")
setTimeout(() => {
uni.navigateBack({})
}, 1500)
}
})
}
},
onShow() {
document.title = '意见反馈'
},
}
</script>
<style lang="scss" scoped>
.feedback {
padding-bottom: 100px;
em {
display: block;
color: red;
font-style: normal;
height: initial;
}
.suggest {
padding: 15px 30px;
box-sizing: border-box;
background-color: #FFFFFF;
margin-bottom: 8px;
.title {
width: 100%;
height: 100px;
line-height: 100px;
font-size: 32px;
color: #333333;
}
}
.name,
.phone {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #FFFFFF;
margin-bottom: 8px;
padding: 0 30px;
width: 100%;
height: 112px;
line-height: 112px;
font-size: 32px;
box-sizing: border-box;
}
.photo {
background-color: #FFFFFF;
padding: 20px 30px;
.photo-title {
width: 100%;
height: 100px;
line-height: 80px;
color: #333333;
& > span {
color: #999999;
}
}
}
.btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
background-color: #1365DD;
color: #FFFFFF;
}
}
</style>

View File

@@ -0,0 +1,641 @@
<template>
<div class="home">
<div class="header-img">
<img v-if="!!topBanner" :src="topBanner.imgUrl" @click="handleLink(topBanner)"/>
<AiEmpty v-else noPermit description="请在web端的'首图设置'中设置banner"/>
</div>
<div class="tab-flex">
<div class="item" v-for="(item, index) in tabs" :key="index" @click="goto(item)">
<img :src="item.icon" alt="">
<p>{{ item.text }}</p>
</div>
</div>
<div class="app-list">
<div class="item" v-for="(item, index) in appList" :key="index" @click="goto(item)">
<img :src="item.icon" alt="">
<p>{{ item.text }}</p>
</div>
</div>
<div class="banner-img" v-if="!!middleBanner">
<img :src="middleBanner.imgUrl" alt="" @click="handleLink(middleBanner)">
</div>
<div class="notice" v-if="noticesList.length>0">
<div class="left">
<img src="./components/img/notice.png" alt="">
</div>
<div class="right" @click="gotoPage(`/apps/AppNotification/AppNotification?last=1`)">
<p v-for="item in noticesList" :key="item.id">
<span>最新</span>{{ item.title }}
</p>
<!-- <AiNoticeBar :list="noticesList" nodeKey="title" :rows="2" :autoplay="false">-->
<!-- <template slot-scope="{label}">-->
<!-- <p><span>最新</span>{{ label }}</p>-->
<!-- </template>-->
<!-- </AiNoticeBar>-->
</div>
</div>
<div class="matter">
<div class="left fill">
<div flex class="spb">
<div class="tab" :class="{active:tabIndex==0}" @click="tabIndex=0,getMatters()"
v-text="`待办事件(${total.matter})`"/>
<div class="tab" :class="{active:tabIndex==1}" @click="tabIndex=1,getMeetings()"
v-text="`待参加会议(${total.meeting})`"/>
</div>
<p class="text">即刻提醒,及时跟进工作进度</p>
</div>
<img class="tabBg" src="./components/img/matter-banner.png" alt="">
</div>
<div class="matter-list" v-if="tabIndex==0">
<template v-if="matterList.length">
<div class="item" v-for="(item, index) in matterList" :key="index"
@click="gotoPage(`/apps/AppConflictMediation/detail?id=${item.id}`)">
<p>
<span>待处理</span>
{{ item.content }}
</p>
<div flex class="flex">
<u-icon name="clock" color="#44B6F0" size="40" :label="item.createTime"/>
<div class="type" v-text="item.groupName"/>
</div>
</div>
<div v-if="total.matter>5" class="loadmore"
@click="gotoPage(`/apps/AppConflictMediation/AppConflictMediation`)">查看更多
</div>
</template>
<AiEmpty img="https://cdn.cunwuyun.cn/dvcp/h5/homeEmpty.png" v-else description="暂无待办事项"/>
</div>
<div class="meet-list" v-if="tabIndex==1">
<template v-if="meetingList.length>0">
<div class="item" v-for="(item, index) in meetingList" :key="index">
<div class="item-content" @click="gotoPage(`/apps/AppMeetingNotice/detail?id=${item.id}`)">
<p class="title" v-text="item.title"/>
<div class="time-flex">
<div class="time">
<h2>{{ $dateFormat(item.startTime, "HH:mm") }}</h2>
<p>{{ $dateFormat(item.startTime, "YYYY年MM月DD日 ddd") }}</p>
</div>
<img src="./components/img/home-right-big.png" alt="">
<div class="time">
<h2>{{ $dateFormat(item.endTime, "HH:mm") }}</h2>
<p>{{ $dateFormat(item.endTime, "YYYY年MM月DD日 ddd") }}</p>
</div>
</div>
<div class="info">
<span class="label">发起人员</span>
<span class="value">
<AiOpenData type="userName" :openid="item.wxUserId"/>
</span>
</div>
<div class="info">
<span class="label">会议地点</span>
<span class="value">{{ item.address }}</span>
</div>
<img :src="$cdn + tag(item.joinStatus)" alt="" class="status-img">
</div>
</div>
</template>
<AiEmpty img="https://cdn.cunwuyun.cn/dvcp/h5/homeEmpty.png" v-else description="暂无待参加会议"/>
</div>
</div>
</template>
<script>
import {mapActions, mapState} from "vuex";
export default {
name: 'home',
inject: ['top'],
data() {
return {
tabs: [
{
icon: require('./components/img/mdtj.png'),
text: '矛盾调解',
app: "AppConflictMediation"
},
{
icon: require('./components/img/wggl.png'),
text: '网格管理',
app: "AppGridManagement"
},
{
icon: require('./components/img/tsrq.png'),
text: '特殊人群',
app: "AppSpecialPeople"
},
{
icon: require('./components/img/zfww.png'),
text: '走访慰问',
app: "AppWalkask"
}
],
appList: [
{
icon: require('./components/img/hytz.png'),
text: '会议通知',
app: "AppMeetingNotice"
},
{
icon: require('./components/img/txl.png'),
text: '电话簿',
app: "AppMailList"
},
{
icon: require('./components/img/wjbd.png'),
text: '问卷表单',
app: "AppAskForm"
},
{
icon: require('./components/img/swjl.png'),
text: '事务记录',
app: "AppInterview"
},
{
icon: require('./components/img/yfzr.png'),
text: '以房找人',
app: "AppBuilding"
},
{
icon: require('./components/img/jmgl.png'),
text: '居民管理',
app: "AppResidentDocument"
},
{
icon: require('./components/img/xtxf.png'),
text: '协同宣发',
app: "AppCooperationPropaganda"
},
{
icon: require('./components/img/gd.png'),
text: '更多',
app: "more"
},
],
tabIndex: 0,
meetingList: [],
matterList: [],
noticesList: [],
loaded: false,
banners: [],
total: {
matter: 0, meeting: 0
}
}
},
computed: {
...mapState(["openUser", "user"]),
hasMeeting() {
return this.meetingList?.length > 0
},
topBanner() {
return this.banners.find(e => e.position == 0)
},
middleBanner() {
return this.banners.find(e => e.position == 1)
}
},
methods: {
...mapActions(["injectJWeixin"]),
getMatters() {
this.$loading()
this.$http.post("/app/appclapeventinfo/listByGirdMember", null, {
params: {
openId: this.user.openId,
eventStatus: 0,
size: 5
}
}).then(res => {
this.$hideLoading()
if (res?.data) {
this.matterList = res.data.records
this.total.matter = res.data.total
}
})
},
getMeetings() {
this.$loading()
this.$http.post("/app/appmeetinginfo/list", null, {
params: {
listType: "1",
meetingStatus: "1|2",
size: 999
}
}).then(res => {
this.$hideLoading()
if (res?.data) {
this.meetingList = res.data.records
this.total.meeting = res.data.total
}
})
},
tag(status) {
return {
"0": "common/1wqr.png",
"1": "common/1yqr.png",
"2": "common/1yqj.png",
"3": "common/toDo.png",
}[status]
},
getNotices() {
this.$http.post("/app/appannouncement/list-latest", null, {
params: {size: 2, current: 1}
}).then(res => {
if (res && res.data) {
this.noticesList = res.data.records
}
})
},
goto(item) {
if (item.app == "more") {
this.top.tabClick(1, "application")
} else if (item.app != "") {
uni.navigateTo({url: `/apps/${item.app}/${item.app}`})
} else {
this.$u.toast("应用开发中~")
}
},
getBanners() {
this.$http.post("/app/appbanner/listForWx").then(res => {
if (res?.data) {
this.banners = res.data
}
})
},
handleLink(banner) {
if (!!banner.linkUrl) {
if (banner.type == 0) {
location.href = banner.linkUrl
} else if (banner.type == 1) {
//小程序跳转暂不处理
}
}
},
gotoPage(url) {
uni.navigateTo({url})
}
},
created() {
document.title = "首页"
this.getMatters()
this.getMeetings()
this.getNotices()
this.getBanners()
}
}
</script>
<style lang="scss" scoped>
.home {
position: relative;
overflow-y: auto;
background-color: #F4F7FD;
height: 100vh;
padding-bottom: 100px;
box-sizing: border-box;
.header-img {
width: 100%;
img {
width: 100%;
height: 324px;
}
.emptyWrap {
padding-bottom: 48px;
}
}
.tab-flex {
width: calc(100vw - 64px);
background: #FFF;
box-shadow: 0 2px 4px 0 rgba(146, 211, 255, 0.3);
border-radius: 16px;
display: flex;
position: absolute;
z-index: 2;
left: 50%;
transform: translate(-50%, -48px);
.item {
flex: 1;
text-align: center;
padding-bottom: 30px;
img {
width: 88px;
height: 88px;
margin-top: 32px;
}
p {
margin-top: 4px;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 40px;
}
}
}
.app-list {
width: 100%;
background: #FFF;
border-radius: 16px 16px 0 0;
padding: 194px 32px 16px;
box-sizing: border-box;
overflow: hidden;
.item {
width: 25%;
float: left;
text-align: center;
padding-bottom: 32px;
img {
width: 48px;
height: 48px;
}
p {
margin-top: 8px;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 40px;
}
}
}
.banner-img {
width: 100%;
padding: 0 24px 48px;
background-color: #fff;
box-sizing: border-box;
img {
width: 100%;
height: 168px;
border-radius: 16px;
}
}
.notice {
padding: 24px 58px 22px 32px;
box-sizing: border-box;
background-color: #fff;
display: flex;
.left {
width: 94px;
img {
width: 68px;
height: 82px;
margin-top: 10px;
}
}
.right {
width: calc(100% - 94px);
p {
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 18px;
span {
display: inline-block;
padding: 0 6px;
line-height: 36px;
border-radius: 4px;
border: 1px solid #23C3E4;
box-sizing: border-box;
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #23C3E4;
margin-right: 16px;
}
}
}
}
.matter {
margin-top: 12px;
background-color: #fff;
padding: 20px 24px 28px 32px;
box-sizing: border-box;
display: flex;
.left {
padding-top: 58px;
div {
height: 52px;
.tab {
z-index: 2;
font-size: 30px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 52px;
&.active {
font-size: 38px;
font-weight: bold;
color: #333;
background-image: url("./components/circle.svg");
background-repeat: no-repeat;
background-position: right top;
padding: 2px 10px 0 0;
box-sizing: border-box;
}
}
}
.text {
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 36px;
margin-top: 8px;
}
}
.tabBg {
width: 216px;
height: 128px;
}
}
.matter-list {
background-color: #fff;
.item {
padding: 32px 32px 48px 24px;
box-sizing: border-box;
background-color: #fff;
border-bottom: 1px solid #ddd;
p {
width: 100%;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
font-size: 30px;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #333;
line-height: 40px;
span {
display: inline-block;
padding: 0 10px;
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFF;
line-height: 40px;
border-radius: 8px;
margin-right: 16px;
background-color: #F1826D;
}
}
.flex {
margin-top: 32px;
display: flex;
justify-content: space-between;
img {
width: 28px;
height: 28px;
margin-right: 4px;
vertical-align: text-bottom;
}
.time {
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #666;
line-height: 34px;
}
.type {
display: inline-block;
padding: 0 14px;
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
color: #44B6F0;
line-height: 34px;
border-radius: 18px;
border: 1px solid #44B6F0;
}
}
}
}
.meet-list {
background-color: #fff;
.item {
padding: 0 32px 32px 32px;
.item-content {
padding: 32px 32px 22px 32px;
background-color: #F7F9FF;
position: relative;
.title {
width: 640px;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 44px;
padding-right: 80px;
box-sizing: border-box;
}
.time-flex {
display: flex;
justify-content: space-between;
padding: 48px 0;
img {
width: 88px;
height: 88px;
}
.time {
width: 220px;
text-align: center;
h2 {
font-size: 60px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 84px;
}
p {
font-size: 22px;
white-space: nowrap;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 32px;
}
}
}
.info {
font-size: 30px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 42px;
margin-bottom: 20px;
.label {
display: inline-block;
width: 150px;
color: #999;
vertical-align: top;
}
.value {
display: inline-block;
width: calc(100% - 150px);
color: #343D65;
}
}
.status-img {
width: 112px;
height: 112px;
position: absolute;
top: 0;
right: 0;
}
}
}
}
.loadmore {
text-align: center;
margin: 44px auto;
font-size: 30px;
color: #3F8DF5
}
}
</style>

View File

@@ -0,0 +1,289 @@
<template>
<div class="my">
<!--隐藏的vconsole开关-->
<div class="vconsoleBtn" @click="$u.debounce(handleVConosle,500)" :style="vcBtn"/>
<!-- 个人信息 -->
<div class="card">
<div class="userInfoCard">
<div class="user">
<div>
<img v-if="!!user.avatar" :src="user.avatar" class="avtar">
<img v-else src="./components/img/tx@2x.png" alt="" class="avtar">
</div>
<div class="user-info">
<div class="user-name">
<AiOpenData type="userName" :openid="user.id"/>
</div>
<div class="user-job" v-text="user.corpName"/>
</div>
</div>
<div class="myGrid" v-if="gridInfo.length">
<div class="my-grid">我的网格<span class="num" v-text="gridInfo.length||0"/></div>
<div class="all-grid" flex>
<div class="gridBox fill">
<div class="grid-name" v-for="gird in gridInfo" :key="gird.id"><span v-text="gird.girdName"/></div>
</div>
<div class="arrow-right" @click="gotoMyGrids">
<u-icon name="arrow-right"/>
</div>
</div>
</div>
</div>
</div>
<!-- 选项 -->
<div class="option">
<div class="option-item">
<img src="./components/img/txsc@2x.png" alt="" class="option-img">
<div class="option-info" @click="fromAlbum">
<div class="option-text">头像上传</div>
<div class="option-icon">
<u-icon name="arrow-right" size="28"></u-icon>
</div>
</div>
</div>
<div class="option-item">
<img src="./components/img/yjfk@2x.png" alt="" class="option-img">
<div class="option-info" @click="feedback">
<div class="option-text">意见反馈</div>
<div class="option-icon">
<u-icon name="arrow-right" size="28"></u-icon>
</div>
</div>
</div>
<div class="option-item">
<img src="./components/img/lxwm@2x.png" alt="" class="option-img">
<div class="option-info" @click="contactUs">
<div class="option-text">联系我们</div>
<div class="option-icon">
<u-icon name="arrow-right" size="28"/>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import {mapActions, mapState} from "vuex";
import VConsole from 'vconsole'
export default {
name: 'my',
data() {
return {
vcBtn: {},
gridInfo: []
}
},
computed: {
...mapState(['user'])
},
methods: {
...mapActions(['wxInvoke', 'injectJWeixin']),
feedback() {
uni.navigateTo({url: './feedback'})
},
contactUs() {
this.wxInvoke(["openThirdAppServiceChat", {}, res => {
if (res.err_msg == "openThirdAppServiceChat:fail") {
window.open("https://work.weixin.qq.com/kfid/kfcc23927b18d1ad4f4")
}
}])
},
fromAlbum() {
uni.navigateTo({url: './uploadPhoto'})
},
getGirdInfo() {
this.$http.post("/app/appgirdmemberinfo/queryMyGirdList").then(res => {
if (res?.data) {
this.gridInfo = res.data
}
})
},
gotoMyGrids() {
uni.navigateTo({url: './myGrids'})
},
handleVConosle() {
if (this.vcBtn.count == 5) {
new VConsole()
} else {
this.vcBtn.count++
}
}
},
created() {
document.title = '个人中心'
this.vcBtn.count = 0
this.getGirdInfo()
this.injectJWeixin('openThirdAppServiceChat')
},
}
</script>
<style lang="scss" scoped>
.my {
background-color: #fff;
padding-bottom: 100px;
box-sizing: border-box;
.vconsoleBtn {
position: fixed;
top: 0;
width: 60px;
height: 60px;
z-index: 202203181519;
}
.card {
position: relative;
height: 458px;
background: url(./components/img/bg.png) no-repeat;
background-size: 100%;
.userInfoCard {
position: absolute;
top: 180px;
left: 32px;
width: calc(100% - 64px);
height: 320px;
background-color: #FFFFFF;
border-radius: 12px;
padding-left: 32px;
box-sizing: border-box;
box-shadow: 0 2px 4px 2px rgba(0, 0, 0, 0.12);
.user {
display: flex;
justify-content: flex-start;
padding-top: 44px;
margin-bottom: 15px;
.avtar {
width: 90px;
height: 90px;
margin-right: 24px;
border-radius: 50%;
}
.user-name {
font-size: 44px;
color: #333333;
font-weight: 800;
}
.user-job {
font-size: 28px;
color: #999999;
}
}
.myGrid {
padding: 5px 15px;
.my-grid {
font-size: 28px;
font-weight: 800;
color: #333333;
.num {
font-weight: normal;
margin-left: 15px;
font-size: 26px;
color: #3476B9;
}
}
.all-grid {
display: flex;
justify-content: space-between;
margin-top: 16px;
.gridBox {
display: flex;
justify-content: flex-start;
overflow: hidden;
.grid-name {
margin-right: 10px;
height: 46px;
line-height: 46px;
background-color: #F4F9FF;
color: #3476B9;
font-size: 24px;
padding: 6px 16px;
white-space: nowrap;
max-width: 300px;
overflow: hidden;
text-overflow: ellipsis;
}
}
.arrow-right {
width: 40px;
padding-top: 10px;
}
}
}
}
}
.option {
margin-top: 64px;
background-color: #fff;
.option-item {
display: flex;
justify-content: flex-start;
align-items: center;
width: 100%;
height: 104px;
box-sizing: border-box;
padding: 0 30px;
.option-img {
width: 50px;
height: 50px;
margin-right: 16px;
}
.option-info {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
.option-text {
font-size: 30px;
}
.option-icon {
padding-left: 100px;
}
}
}
}
.btn-pat,
.btn-album,
.btn-cancel {
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
}
.btn-pat {
border-bottom: 1px solid #DDDDDD;
}
.space {
width: 100%;
height: 16px;
background-color: #F5F5F5;
}
}
</style>

View File

@@ -0,0 +1,53 @@
<template>
<section class="myGrids">
<div flex class="item" v-for="op in list" :key="op.id">
<img src="./components/gird--select-icon.png"/>
<b v-text="op.girdName"/>
</div>
</section>
</template>
<script>
export default {
name: "myGrids",
data() {
return {
list: []
}
},
methods: {
getList() {
this.$http.post("/app/appgirdmemberinfo/queryMyGirdList").then(res => {
if (res?.data) {
this.list = res.data
}
})
},
},
onShow() {
this.getList()
}
}
</script>
<style lang="scss" scoped>
.myGrids {
padding: 16px 100px 0 10px;
.item {
min-height: 120px;
font-size: 36px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
border-bottom: 1px solid #E4E5E6;
& > img {
height: 74px;
width: 76px;
margin-left: 22px;
margin-right: 34px;
}
}
}
</style>

View File

@@ -0,0 +1,152 @@
<template>
<section class="staList">
<div class="list-content">
<div class="title">
<div class="text" v-text="config.label"/>
</div>
<div class="content">
<div class="item" v-for="(op,i) in list" :key="i">
<div class="name">
<span v-text="i+1"/>
<p v-text="op[config.key]"/>
</div>
<div class="num" v-text="op[config.value]||0"/>
</div>
</div>
</div>
</section>
</template>
<script>
export default {
name: "staList",
data() {
return {
list: [],
page: {current: 1, total: 0, size: 20}
}
},
computed: {
currentType() {
return this.$route.query.type || ""
},
config() {
let configs = {
girdGroupNumberCount: {label: "网格入群居民数排行(人)", key: "girdName", value: "personCount"},
eventNumberCount: {label: "网格事件处理排行(件)", key: "girdName", value: "eventCount"},
}
return configs?.[this.currentType]
}
},
onShow() {
this.page.current = 1
this.getStaData()
},
methods: {
getStaData() {
this.$http.post("/app/statistics/people/queryTeamInfoCount", null, {
params: {...this.page}
}).then(res => {
if (res?.data) {
let meta = res.data?.[this.currentType]?.records || []
this.list = [...this.list, ...meta]
this.page.total = res.data?.[this.currentType]?.total
}
})
},
},
onReachBottom() {
if (this.list.length < this.page.total) {
this.page.current++
this.getStaData()
}
}
}
</script>
<style lang="scss" scoped>
.staList {
min-height: 100vh;
background-color: #F6F8F8;
padding: 40px 30px 32px;
box-sizing: border-box;
.list-content {
width: 100%;
border-radius: 16px;
.title {
display: flex;
justify-content: space-between;
background-color: #fff;
padding: 28px 6px 0 50px;
.text {
font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
color: #000;
line-height: 48px;
}
.more {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
line-height: 40px;
img {
width: 40px;
height: 40px;
vertical-align: middle;
}
}
}
.content {
padding: 0 50px 32px 50px;
background-color: #fff;
}
.item {
display: flex;
justify-content: space-between;
padding: 28px 0;
border-bottom: 1px solid #E1E1E1;
.name {
width: calc(100% - 100px);
span {
display: inline-block;
width: 30px;
height: 30px;
background: #3399FF;
font-size: 20px;
font-family: PingFangSC-Regular, PingFang SC;
color: #FFF;
line-height: 30px;
text-align: center;
border-radius: 50%;
margin-right: 34px;
vertical-align: top;
margin-top: 6px;
}
p {
display: inline-block;
width: calc(100% - 70px);
word-break: break-all;
}
}
.num {
display: inline-block;
width: 100px;
text-align: right;
}
}
}
}
</style>

View File

@@ -0,0 +1,343 @@
<template>
<div class="statistics">
<AiTopFixed>
<AiTabPanes v-model="currentTab" :tabs="tabs" @click="getStaData"/>
</AiTopFixed>
<u-alert-tips type="error" title="该数据统计于每日24:00更新"/>
<template v-if="currentTab==0">
<div class="num-content">
<div class="item" v-for="(op,k) in overviewSta" :key="k">
<p v-text="k"/>
<h2 v-text="op"/>
<img :src="`${$cdn}sass/statics/${icons[k]}.png`" alt="">
<span class="right-line"/>
</div>
</div>
<div class="list-content">
<div class="title">
<div class="text">网格入群居民数排行()</div>
<div class="more" @click="getMore('girdGroupNumberCount')">
<u-icon name="arrow-right" color="#ddd" size="20" label-pos="left" label="更多"/>
</div>
</div>
<div class="content">
<template v-if="getList('girdGroupNumberCount').length>0">
<div class="item" v-for="(op,i) in getList('girdGroupNumberCount')" :key="i">
<div class="name" flex>
<span v-text="i+1"/>
<p v-text="op.girdName"/>
</div>
<div class="num" v-text="op.personCount||0"/>
</div>
</template>
<AiEmpty img="https://cdn.cunwuyun.cn/dvcp/h5/homeEmpty.png" v-else description="暂无数据"/>
</div>
</div>
<div class="list-content">
<div class="title">
<div class="text">网格事件处理排行()</div>
<div class="more" @click="getMore('eventNumberCount')">
<u-icon name="arrow-right" color="#ddd" size="20" label-pos="left" label="更多"/>
</div>
</div>
<div class="content">
<template v-if="getList('eventNumberCount').length>0">
<div class="item" v-for="(op,i) in getList('eventNumberCount')" :key="i">
<div class="name" flex>
<span v-text="i+1"/>
<p v-text="op.girdName"/>
</div>
<div class="num" v-text="op.eventCount||0"/>
</div>
</template>
<AiEmpty img="https://cdn.cunwuyun.cn/dvcp/h5/homeEmpty.png" v-else description="暂无数据"/>
</div>
</div>
</template>
<template v-else-if="currentTab==1">
<div class="num-content">
<div class="item" v-for="(op,k) in overviewSta" :key="k">
<p v-text="k"/>
<h2 v-text="op"/>
<img :src="`${$cdn}sass/statics/${icons[k]}.png`" alt="">
<span class="right-line"/>
</div>
</div>
<div class="list-content" v-if="hasChartData">
<div class="title">
<div class="text" v-text="chartTitle"/>
</div>
<div class="content column" flex>
<div id="StaChart"/>
</div>
</div>
</template>
</div>
</template>
<script>
import echarts from 'echarts'
export default {
name: 'statistics',
data() {
return {
checkType: 0,
sta: {},
tabs: ["团队统计", "个人统计"],
currentTab: 0,
chart: null,
chartTitle: "上报事件类型",
icons: {
居民群: "icon1",
入群居民: "icon2",
上报事件: "icon3",
办结事件: "icon4",
待办事件: "icon5",
居民信息录入: "icon6",
走访慰问: "icon7",
会议通知: "icon8",
事务记录: "icon9",
网格员: "icon10",
}
}
},
computed: {
overviewSta() {
let {eventGirdMemberCount, wxGroupCount, eventCount, eventInfoCount, otherWorkCount} = this.sta
return {...eventGirdMemberCount, ...wxGroupCount, ...eventCount, ...eventInfoCount, ...otherWorkCount}
},
hasChartData() {
return this.sta.eventGroupCount?.length > 0
}
},
methods: {
getStaData() {
if (this.currentTab == 1) {
this.$http.post("/app/statistics/people/queryGirdMemberCount").then(res => {
if (res?.data) {
this.sta = res.data
this.renderChart(0, () => {
let {eventGroupCount: list} = this.sta
this.chart.setOption({
series: {
data: list.map(e => ({name: e.groupName || "", value: e.eventNumber || 0}))
}
})
})
}
})
} else {
this.$http.post("/app/statistics/people/queryTeamInfoCount", null, {
params: {size: 5}
}).then(res => {
if (res?.data) {
this.sta = res.data
}
})
}
},
renderChart(count = 0, cb) {
let dom = document.getElementById("StaChart")
if (dom) {
this.chart = echarts.init(dom)
this.chart.setOption({
color: ["#3AA0FF", "#50CB74", "#FBD444", "#435289", "#9D73D9"],
series: {
name: this.chartTitle,
type: "funnel",
minSize: "25%",
label: {
formatter: '{b} {c}'
}
}
})
cb && cb()
} else {
if (count < 10) {
setTimeout(() => {
this.renderChart(++count, cb)
}, 200)
}
}
},
getMore(type) {
uni.navigateTo({url: `./staList?type=${type}`})
},
getList(key) {
return this.sta?.[key]?.records || []
}
},
created() {
document.title = '统计'
this.getStaData()
},
}
</script>
<style lang="scss" scoped>
.statistics {
min-height: 100vh;
background-color: #F6F8F8;
padding-bottom: 100px;
box-sizing: border-box;
::v-deep.AiTopFixed {
.content {
padding: 0;
}
}
.num-content {
width: calc(100% - 32px);
margin: 0 16px 32px 16px;
padding: 0 20px 0 4px;
box-sizing: border-box;
background-color: #fff;
overflow: hidden;
.item {
display: inline-block;
width: 50%;
float: left;
position: relative;
margin-top: 36px;
padding: 0 44px 36px 48px;
box-sizing: border-box;
border-bottom: 1px solid #F5F6F9;
p {
font-size: 26px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
color: #71777E;
line-height: 36px;
margin-top: -18px;
}
h2 {
font-size: 40px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
color: #333;
line-height: 56px;
}
img {
width: 72px;
height: 72px;
position: absolute;
right: 44px;
top: 0;
}
.right-line {
position: absolute;
top: 0;
right: 0;
height: 72px;
border-right: 1px solid #F6F6F6;
}
}
.item:nth-of-type(2n) {
.right-line {
display: none;
}
}
.border-b {
border-bottom: 1px solid #F6F6F6;
}
}
.list-content {
width: calc(100% - 60px);
margin: 40px 30px 32px;
border-radius: 16px;
.title {
display: flex;
justify-content: space-between;
background-color: #fff;
padding: 28px 6px 0 50px;
.text {
font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
color: #000;
line-height: 48px;
}
.more {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
line-height: 40px;
img {
width: 40px;
height: 40px;
vertical-align: middle;
}
}
}
.content {
padding: 0 50px 32px 50px;
background-color: #fff;
}
.item {
display: flex;
justify-content: space-between;
padding: 28px 0;
border-bottom: 1px solid #E1E1E1;
.name {
width: calc(100% - 100px);
span {
display: inline-block;
min-width: 30px;
height: 30px;
background: #3399FF;
font-size: 20px;
font-family: PingFangSC-Regular, PingFang SC;
color: #FFF;
line-height: 30px;
text-align: center;
border-radius: 50%;
margin-right: 34px;
vertical-align: top;
margin-top: 6px;
}
p {
display: inline-block;
width: calc(100% - 70px);
word-break: break-all;
}
}
.num {
display: inline-block;
width: 100px;
text-align: right;
}
}
}
.back-img {
width: 132px;
height: 132px;
}
#StaChart {
width: 700px;
height: 500px;
}
}
</style>

View File

@@ -0,0 +1,73 @@
<template>
<div class="uploadPhoto">
<div class="photo">
<div class="photo-title">图片 <span>最多1张</span></div>
<div class="pad-120">
<AiUploader :limit="1" multiple placeholder="上传图片" :def.sync="picture" action="/admin/file/add-portrait"/>
</div>
</div>
<div style="height: 56px;"></div>
<div class="btn" @click="back">返回</div>
</div>
</template>
<script>
import {mapActions} from "vuex";
export default {
name: 'uploadPhoto',
data() {
return {
picture: []
}
},
methods: {
...mapActions(['getAccount']),
back() {
uni.navigateBack({
success: () => {
this.getAccount()
}
})
}
},
onShow() {
document.title = '头像上传'
},
}
</script>
<style lang="scss" scoped>
.uploadPhoto {
.photo {
background-color: #FFFFFF;
padding: 20px 30px;
.photo-title {
width: 100%;
height: 100px;
line-height: 80px;
color: #333333;
& > span {
color: #999999;
}
}
}
.btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
background-color: #1365DD;
color: #FFFFFF;
}
}
</style>