BUG 30125

This commit is contained in:
aixianling
2022-06-09 14:24:42 +08:00
parent e060b32200
commit 9b65561e61
4 changed files with 96 additions and 116 deletions

View File

@@ -28,9 +28,7 @@ const saveApps = app => {
if (app.list.length > 0) { if (app.list.length > 0) {
axios.post("http://192.168.1.87:12525/node/wechatapps/addOrUpdate", app, {timeout: 1000}).then(res => { axios.post("http://192.168.1.87:12525/node/wechatapps/addOrUpdate", app, {timeout: 1000}).then(res => {
if (res.data.code == 0) chalkTag.done("产品库目录已同步至后台数据库...") if (res.data.code == 0) chalkTag.done("产品库目录已同步至后台数据库...")
}).catch(err => { }).catch(() => 0)
console.log(err)
})
} }
} }

View File

@@ -25,8 +25,9 @@
</div> </div>
</div> </div>
<!-- <div style="padding-bottom: 70px;"></div> --> <!-- <div style="padding-bottom: 70px;"></div> -->
<div class="subBtn" @click="submit"> <div class="subBtn" flex>
<div>确定选择</div> <div v-if="clearable" class="cancel" @click="cancel">清空</div>
<div @click="submit">确定选择</div>
</div> </div>
</div> </div>
</template> </template>
@@ -56,6 +57,7 @@ export default {
}, },
//是否是网格员申报 //是否是网格员申报
isApply: v => v.$route.query.formType == 2, isApply: v => v.$route.query.formType == 2,
clearable: v => v.$route.query.clearable,
selected: v => [v.$route.query.selected].flat() selected: v => [v.$route.query.selected].flat()
}, },
onLoad(option) { onLoad(option) {
@@ -117,6 +119,7 @@ export default {
getGridsByGridMemberAndParent(row) { getGridsByGridMemberAndParent(row) {
let {id: parentGirdId} = row let {id: parentGirdId} = row
this.treeList = this.allData.filter(e => e.parentGirdId == parentGirdId) this.treeList = this.allData.filter(e => e.parentGirdId == parentGirdId)
this.treeList.map((item) => item.isChecked = this.selected.includes(item.id))
}, },
girdNameClick(row, index) { girdNameClick(row, index) {
if (!index) { //第一级别 if (!index) { //第一级别
@@ -151,6 +154,14 @@ export default {
} else { } else {
return this.$u.toast('请选择网格') return this.$u.toast('请选择网格')
} }
},
cancel() {
this.SelectGird = {}
uni.navigateBack({
success: () => {
uni.$emit("pagePicker:custom", this.SelectGird)
}
})
} }
} }
} }
@@ -234,18 +245,25 @@ export default {
width: 100%; width: 100%;
height: 118px; height: 118px;
background: #f4f8fb; background: #f4f8fb;
justify-content: flex-end;
div { div {
width: 192px; width: 192px;
height: 80px; height: 80px;
line-height: 80px; line-height: 80px;
text-align: center; text-align: center;
border: 2px solid #1365dd;
background: #1365dd; background: #1365dd;
border-radius: 4px; border-radius: 4px;
font-size: 32px; font-size: 32px;
color: #fff; color: #fff;
margin: 20px 34px 0 0; margin-right: 32px;
float: right;
&.cancel {
color: #333;
background: #fff;
border-color: #ddd;
}
} }
} }

View File

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

View File

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