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) {
axios.post("http://192.168.1.87:12525/node/wechatapps/addOrUpdate", app, {timeout: 1000}).then(res => {
if (res.data.code == 0) chalkTag.done("产品库目录已同步至后台数据库...")
}).catch(err => {
console.log(err)
})
}).catch(() => 0)
}
}

View File

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

View File

@@ -1,13 +1,13 @@
<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=""/>
<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>
</div>
@@ -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 = '随手拍'
@@ -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,18 +128,22 @@ export default {
color: #c4cad4;
line-height: 8px;
}
.color-3267F0 {
color: #3267f0;
}
}
}
.empty {
text-align: center;
img {
width: 282px;
height: 306px;
margin: 136px auto 0;
}
p {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;

View File

@@ -1,24 +1,21 @@
<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" clearable valueObj nodeKey="id"
: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>
<AiCard v-for="(item, i) in datas" :key="i" @click.native="goDetail(item, 1)">
<template #custom>
@@ -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,7 +44,6 @@
</AiCard>
<AiEmpty v-if="!datas.length"></AiEmpty>
</template>
<div class="pad-b120" v-if="datas.length"></div>
</div>
</template>
@@ -70,29 +67,19 @@ 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()
onLoad() {
uni.$on('nextList', () => {
this.current++
this.getList()
@@ -109,21 +96,16 @@ 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, {
let {current, eventStatus, searchGrid: {id: girdId}} = this
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
current, searchType: this.currentTabs == 1 ? '1' : '0',
eventStatus, girdId
},
})
.then((res) => {
@@ -135,34 +117,11 @@ export default {
})
},
girdList() {
this.$http.post(`/app/appgirdmemberinfo/queryMyGirdListWithOut01`, null, {
params: {
size: 9999,
},
})
.then((res) => {
if (res.code == 0) {
this.myGirdList = res.data
var all = {
id: '',
girdName: '全部'
}
this.myGirdList.unshift(all)
}
})
},
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()
},
@@ -175,15 +134,7 @@ export default {
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()
},
@@ -195,15 +146,14 @@ export default {
</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;
// }