BUG 30125
This commit is contained in:
		| @@ -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) | ||||
|   } | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -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; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -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 = '随手拍' | ||||
| @@ -98,7 +89,7 @@ export default { | ||||
|  | ||||
|   }, | ||||
|   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; | ||||
|   | ||||
| @@ -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" 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 > | ||||
|     <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; | ||||
|   // } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user