无等级网格版合并

This commit is contained in:
aixianling
2022-06-13 09:57:52 +08:00
parent 3afde14618
commit c75a2b7fd3
130 changed files with 841 additions and 13020 deletions

View File

@@ -84,11 +84,6 @@ export default {
}
})
},
toSelectUser() {
console.log(123)
uni.navigateTo({ url: './SelectUser' })
},
},
}
</script>

View File

@@ -1,15 +1,15 @@
<template>
<div class="AppHandSnapshot">
<component v-if="refresh && isAdmin" :is="component" @change="onChange" :params="params"> </component>
<div class="tabs" v-if="isTab && isAdmin">
<component v-if="refresh && isGridMember" :is="component" @change="onChange" :params="params"/>
<div class="tabs" v-if="isTab && isGridMember">
<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="" />
<img :src="tabIndex == index ? item.activeImg : item.img" alt=""/>
<p :class="tabIndex == index ? 'color-3267F0' : ''">{{ item.text }}</p>
</div>
</div>
<div v-if="!isAdmin" class="empty">
<div v-if="!isGridMember" class="empty">
<img src="./components/img/no-admin.png" alt="">
<p>没有网格员权限<br />无法查看随手拍信息哦~</p>
<p>没有网格员权限<br/>无法查看随手拍信息哦~</p>
</div>
</div>
</template>
@@ -18,11 +18,11 @@
import List from './List.vue'
import Statistics from './Statistics.vue'
import Set from './Set.vue'
import {mapState} from 'vuex'
export default {
name: 'AppHandSnapshot',
appName: '随手拍',
data() {
return {
component: 'List',
@@ -50,10 +50,14 @@ export default {
// }
],
isTab: true,
isAdmin: false
}
},
computed: {
...mapState(['user']),
isGridMember() {
return this.user.girdCheckType > 0
}
},
components: {
List,
Statistics,
@@ -72,20 +76,7 @@ export default {
this.$nextTick(() => {
this.refresh = true
})
},
isGirdUser() {
this.isAdmin = false
this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
if (res.code == 0) {
if (res.data.checkType != '0') {
this.isAdmin = true
}
}
})
},
},
onLoad() {
this.isGirdUser()
}
},
onShow() {
document.title = '随手拍'
@@ -95,10 +86,10 @@ export default {
uni.$on('showTab', () => {
this.isTab = true
})
},
onReachBottom() {
if(!this.tabIndex) {
if (!this.tabIndex) {
uni.$emit('nextList')
}
},
@@ -109,6 +100,7 @@ export default {
.AppHandSnapshot {
height: 100%;
}
.tabs {
width: 100%;
height: 98px;
@@ -118,14 +110,17 @@ export default {
bottom: 0;
left: 0;
display: flex;
.item {
flex: 1;
text-align: center;
img {
width: 56px;
height: 56px;
margin-top: 8px;
}
p {
font-size: 22px;
font-family: PingFangSC-Medium, PingFang SC;
@@ -133,19 +128,23 @@ export default {
color: #c4cad4;
line-height: 8px;
}
.color-3267F0 {
color: #3267f0;
}
}
}
.empty{
.empty {
text-align: center;
img{
img {
width: 282px;
height: 306px;
margin: 136px auto 0;
}
p{
p {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;

View File

@@ -3,17 +3,18 @@
<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-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>
<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 :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>
@@ -68,17 +69,16 @@ export default {
this.forms.groupId = option.groupId
this.forms.groupName = option.groupName
this.typeList()
uni.$on('goback', (res) => {
uni.$on('pagePicker:custom', (res) => {
this.selectUser = res
if(res.name) {
if (res.name) {
this.forms.name = res.name
}else{
} else {
this.forms.name = res.girdName
}
})
},
onShow() {
console.log(this.titleList[this.status])
document.title = this.titleList[this.status]
},
methods: {
@@ -98,20 +98,20 @@ export default {
},
confirm() {
if(this.status == 1 && !this.forms.name) {
if (this.status == 1 && !this.forms.name) {
return this.$u.toast('请选择转交对象')
}
if(this.status != 1 && !this.forms.groupName) {
if (this.status != 1 && !this.forms.groupName) {
return this.$u.toast('请选择分类')
}
if(this.status != 1 && !this.forms.content) {
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) {
var url = '', successText = '', params = ''
if (this.status == 1) {
url = `/app/appclapeventinfo/transfer`
successText = '转交成功'
params = {
@@ -119,18 +119,18 @@ export default {
girdId: this.selectUser.id,
girdName: this.selectUser.girdName,
}
if(this.selectUser.name) { //选择的网格员
if (this.selectUser.name) { //选择的网格员
params.girdId = this.selectUser.girdId
params.girdMemberId = this.selectUser.id
params.girdMemberName = this.selectUser.name
}
}
if(this.status == 2) {
if (this.status == 2) {
url = `/app/appclapeventinfo/refuse`
successText = '拒绝成功'
params = {...this.forms}
}
if(this.status == 3) {
if (this.status == 3) {
url = `/app/appclapeventinfo/finishByGirdMember`
successText = '办结成功'
params = {...this.forms}
@@ -142,12 +142,12 @@ export default {
uni.$emit('updateDeatil')
uni.$emit('getListInit')
setTimeout(() => {
if(this.status == 1) {
if (this.status == 1) {
uni.navigateBack({delta: 2})
}else {
} else {
uni.navigateBack()
}
},600)
}, 600)
}
})
},
@@ -156,7 +156,7 @@ export default {
this.forms.groupId = e[0].value
},
toSelectUser() {
uni.navigateTo({ url: './SelectUser' })
uni.navigateTo({url: '../AppGridManagement/selectGridMember'})
},
},
}
@@ -165,14 +165,18 @@ export default {
<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;
}
@@ -193,6 +197,7 @@ export default {
.contents {
padding-bottom: 20px !important;
.u-form-item__body {
.u-form-item--right__content__slot {
.u-input {
@@ -204,6 +209,7 @@ export default {
.avatars {
padding-bottom: 20px !important;
.u-form-item__body {
.default {
width: 160px;
@@ -226,7 +232,8 @@ export default {
font-weight: 500;
color: #ffffff;
}
.right-span{
.right-span {
display: inline-block;
width: 100%;
text-align: right;

View File

@@ -1,25 +1,22 @@
<template>
<div class="list">
<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>
<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" @click="show = true">
<span class="color-666">{{girdNameText}}</span>
<img src="./components/img/down-icon.png" alt="" />
<div class="tab-item">
<AiPagePicker type="custom" v-model="searchGrid" @change="confirm" valueObj nodeKey="id" formType="2"
:ops="{url:'../AppGridManagement/SelectGird',label: 'girdName'}">
<AiMore v-model="searchGrid.girdName" icon="arrow-down" placeholder="所属网格"/>
</AiPagePicker>
</div>
<u-select v-model="show" :list="myGirdList" value-name="id" label-name="girdName" @confirm="confirm"></u-select>
<div class="tab-item" @click="showType = true">
<span class="color-666">{{eventStatusText}}</span>
<img src="./components/img/down-icon.png" alt="" />
<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 >
<template>
<AiCard v-for="(item, i) in datas" :key="i" @click.native="goDetail(item, 1)">
<template #custom>
<div class="card-top">
@@ -36,7 +33,8 @@
</div>
</div>
<div class="status" :class="item.eventStatus == 0 ? 'status0' : item.eventStatus == 1 ? 'status1' : item.eventStatus == 2 ? 'status2' : 'status3'" v-if="item.eventStatus">
<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) }}
@@ -46,13 +44,12 @@
</AiCard>
<AiEmpty v-if="!datas.length"></AiEmpty>
</template>
<div class="pad-b120" v-if="datas.length"></div>
</div>
</template>
<script>
import { mapState } from 'vuex'
import {mapState} from 'vuex'
export default {
props: {},
@@ -70,34 +67,24 @@ export default {
currentTabs: 0,
current: 1,
pages: 0,
show: false,
myGirdList: [],
girdId: '',
girdNameText: '所属网格',
searchGrid: {},
showType: false,
listType: [],
eventStatus: '',
eventStatusText: '办件状态',
listTypeHistory: [],
listTypeAll: []
eventStatusText: '',
}
},
computed: {
...mapState(['user']),
loadmore() {
return this.pages <= this.current ? 'loading ' : 'nomore'
},
listType() {
return this.$dict.getDict(this.currentTabs == 0 ? 'clapEventStatusAll' : 'clapEventStatusHistory')
}
},
mounted() {
this.current = 1
this.girdList()
this.getList()
uni.$on('nextList', ()=>{
this.current ++
onLoad() {
uni.$on('nextList', () => {
this.current++
this.getList()
})
uni.$on('getListInit', ()=>{
uni.$on('getListInit', () => {
this.current = 1
this.getList()
})
@@ -109,101 +96,64 @@ export default {
created() {
this.$dict.load('clapEventStatus', 'clapEventStatusAll', 'clapEventStatusHistory').then(() => {
this.getList()
this.listTypeAll = this.$dict.getDict('clapEventStatusAll')
this.listTypeHistory = this.$dict.getDict('clapEventStatusHistory')
this.listType = this.listTypeAll
})
},
methods: {
getList() {
this.$http
.post(`/app/appclapeventinfo/listByGirdMember`, null, {
params: {
size: 10,
current: this.current,
searchType: this.currentTabs == 1 ? '1' : '0',
eventStatus: this.eventStatus,
girdId: this.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()
}
})
},
girdList() {
this.$http.post(`/app/appgirdmemberinfo/queryMyGirdListWithOut01`, null, {
let {current, eventStatus, searchGrid: {id: girdId}} = this
this.$http.post(`/app/appclapeventinfo/listByGirdMember`, null, {
params: {
size: 9999,
size: 10,
current, searchType: this.currentTabs == 1 ? '1' : '0',
eventStatus, girdId
},
})
.then((res) => {
if (res.code == 0) {
this.myGirdList = res.data
var all = {
id: '',
girdName: '全部'
}
this.myGirdList.unshift(all)
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
this.pages = res.data.pages
this.$forceUpdate()
}
})
},
confirm(e) {
if (this.show) {
this.girdNameText = e[0].label
this.girdId = e[0].value
}
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}` })
uni.navigateTo({url: `./Detail?id=${item.id}`})
},
change(index) {
this.current = 1
this.datas = []
this.eventStatus = ''
this.girdId = ''
this.girdNameText = '所属网格'
this.eventStatusText = '办件状态'
this.currentTabs = index
if(index == 0) {
this.listType = this.listTypeAll
}else {
this.listType = this.listTypeHistory
}
this.getList()
},
linkTo(url) {
uni.navigateTo({ url })
uni.navigateTo({url})
},
},
}
</script>
<style scoped lang="scss">
uni-page-body {
height: 100%;
}
.list {
height: 100%;
.select-top {
background: #fff;
display: flex;
padding: 24px 0;
.tab-item {
flex: 1;
text-align: center;
@@ -211,6 +161,7 @@ uni-page-body {
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
img {
width: 32px;
height: 32px;
@@ -218,21 +169,27 @@ uni-page-body {
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;
@@ -246,10 +203,12 @@ uni-page-body {
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.types,
.gards {
margin-top: 8px;
font-size: 26px;
.types-right,
.gards-right {
margin-left: 32px;
@@ -261,6 +220,7 @@ uni-page-body {
.status {
padding: 32px;
border-top: 1px solid #dddddd;
.icon {
display: inline-block;
width: 8px;
@@ -272,6 +232,7 @@ uni-page-body {
.status0 {
color: #ff883c;
.icon {
background: #ff883c;
}
@@ -279,6 +240,7 @@ uni-page-body {
.status1 {
color: #1aaaff;
.icon {
background: #1aaaff;
}
@@ -286,6 +248,7 @@ uni-page-body {
.status2 {
color: #42d784;
.icon {
background: #42d784;
}
@@ -293,12 +256,14 @@ uni-page-body {
.status3 {
color: #ff4466;
.icon {
background: #ff4466;
}
}
}
}
// ::v-deep .AiCard:last-child {
// padding-bottom: 24px;
// }

View File

@@ -62,7 +62,7 @@ export default {
}
},
onLoad() {
},
onShow() {},
methods: {

View File

@@ -1,11 +1,5 @@
<template>
<div class="statistics" v-if="pageShow">
<!-- <div class="gird-select">
<img src="./components/img/gird-icon.png" alt="">
<span>{{girdName}}</span>
<img src="./components/img/down-icon.png" alt="">
</div>
<u-select v-model="showSelect" :list="myGirdList" value-name="id" label-name="girdName" @confirm="confirm"></u-select> -->
<div class="info-content">
<div class="title">今日概况</div>
<div class="el-row">
@@ -80,7 +74,6 @@ export default {
todayList: [],
info: {},
pageShow: false,
myGirdList: [],
showSelect: false,
myGirdList: [],
girdName: '全部网格'
@@ -101,7 +94,7 @@ export default {
res.data.businessCountMap['办结率'] = Number(res.data.businessCountMap['办结率'] * 100).toFixed(1)
}
this.info = res.data
Object.keys(res.data.todayCountMap).forEach((key) => {
var info = {
label: key,

View File

@@ -15,11 +15,11 @@ export default {
name: 'UserList',
data() {
return {
}
},
methods: {
},
}
</script>