Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
10 files modified
7 files added
| | |
| | | }, |
| | | { |
| | | name: '我要办', |
| | | img: '/static/images/home/handle001.png', |
| | | img: '/static/images/home/handle002.png', |
| | | url: '../handle/handle' |
| | | } |
| | | ]; |
| | |
| | | <template> |
| | | <view class="pColumn"> |
| | | <view class="inPColumn" > |
| | | <view class="pColumn" > |
| | | <view class="inPColumn" v-if="fromW == 0"> |
| | | <view class="left" @click="chating"> |
| | | <view class="top"> |
| | | <view class="userImg"> |
| | | <img class="img" :src=Pdata.avatar> |
| | | </view> |
| | | <view class="t-type">{{Pdata.recipientName}}</view> |
| | | <view class="t-id">{{Pdata.postTime}}</view> |
| | | </view> |
| | | <view class="bottom">{{Pdata.postMessage}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="inPColumn" v-if="fromW == 1"> |
| | | <view class="left" @click="chating"> |
| | | <view class="top"> |
| | | <view class="userImg"> |
| | |
| | | this.bmainb = '0'; |
| | | //#endif |
| | | }, |
| | | receives() { |
| | | var url = this.$store.state.piAPI + "/alarm/alarm/APP-setAlarm", |
| | | Pid = this.Pdata.id, |
| | | id = this.$store.state.puserID, //警察id |
| | | name = this.$store.state.puserName, //警察id |
| | | data = { |
| | | id: Pid, |
| | | securityId: id, |
| | | alarmPeople: name |
| | | }, |
| | | that = this; |
| | | // console.log(data); |
| | | wx.request({ |
| | | url: url, |
| | | data: data, |
| | | header: { |
| | | "content-type": "application/x-www-form-urlencoded" |
| | | }, |
| | | method: 'POST', |
| | | success(res) { |
| | | // console.log(res.data.msg); |
| | | } |
| | | }) |
| | | }, |
| | | chating(){ |
| | | //发起聊天 |
| | | var datas = this.Pdata; |
| | |
| | | popuShow: false |
| | | }); |
| | | }, |
| | | popupBY() { |
| | | this.receives(); |
| | | // console.log('接收成功'); |
| | | this.$emit('refreshTask', this.fromW) |
| | | // this.triggerEvent('myevent', this.data.fromW); |
| | | this.popuShow = false; |
| | | }, |
| | | popupBN() { |
| | | // console.log('接收取消'); |
| | | this.popuShow = false; |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.beginObj(); |
| | |
| | | "name": "myself", |
| | | "style": { |
| | | "navigationBarTitleText": "", |
| | | "navigationBarBackgroundColor": "#25262E" |
| | | "navigationBarBackgroundColor": "#0BB9C8", |
| | | "navigationBarTextStyle":"white" |
| | | } |
| | | }, |
| | | { |
| | |
| | | "path": "pages/business/business", |
| | | "style": { |
| | | "navigationBarTitleText": "工作台", |
| | | "app-plus":{ |
| | | "titleNView":false |
| | | } |
| | | "navigationBarBackgroundColor":"#0BB9C8", |
| | | "navigationBarTextStyle":"white" |
| | | } |
| | | }, |
| | | { |
| | |
| | | "path": "pages/article/article", |
| | | "style": { |
| | | "navigationBarTitleText": "资讯", |
| | | "app-plus":{ |
| | | "titleNView":false |
| | | } |
| | | "navigationBarBackgroundColor":"#0BB9C8", |
| | | "navigationBarTextStyle":"white" |
| | | } |
| | | }, |
| | | { |
| | |
| | | <view class="alarm-info" v-for="item in data" @click="gotoDetail(item)"> |
| | | <view class="alarm-id-type-status"> |
| | | <view class="alarm-id-type">({{item.id}}){{item.alarmType}}</view> |
| | | <view class="alarm-status" :style="{color:untreatedColor}" v-if="item.securityId==null">未处理 |
| | | <view class="alarm-status" :style="{color:untreatedColor}" v-if="item.securityId==null || item.securityId=='' ">未处理 |
| | | </view> |
| | | <view class="alarm-status" :style="{color:processedColor}" |
| | | v-if="item.securityId!=null && item.jtype==1">处理中</view> |
| | | v-if="item.securityId!='' && item.jtype==1">处理中</view> |
| | | <view class="alarm-status" :style="{color:finishColor}" v-if="item.jtype==2">已处理</view> |
| | | </view> |
| | | <view class="alarm-position-time"> |
| | |
| | | //获取警情数据 |
| | | getAlarmData(tab) { |
| | | var that = this; |
| | | this.$store.state.puserID = 1370564873280430082; |
| | | // this.$store.state.puserID = 1370564873280430082; |
| | | if (this.$store.state.puserID) { |
| | | //获取全部的数据 |
| | | uni.request({ |
| | |
| | | <template> |
| | | <view class="advisory-big "> |
| | | <!-- 自定义顶部导航栏 --> |
| | | <view class="uni-nav-bar-info" :style="{marginTop:navbarTopHeight}"> |
| | | <!-- <view class="uni-nav-bar-info" :style="{marginTop:navbarTopHeight}"> |
| | | <view class="title" @click="goTabDetail(index)" v-for="(item,index) in titleList" |
| | | :style="titleNum==index? 'color:#000000':'color:#808080'">{{item}}</view> |
| | | </view> |
| | | </view> --> |
| | | |
| | | <view class="article-tab"> |
| | | <view :class="{'article-tab-title':true,'cccc':index == articleTabNum}" @click="goArticleTab(index)" v-for="(item,index) in articleTabArr" |
| | |
| | | <image :src="i.url"></image> |
| | | </view> |
| | | </view> |
| | | <u-loadmore :status="status" /> |
| | | </view> |
| | | |
| | | <!-- 底部导航条 --> |
| | |
| | | pathUrl: "http://s16s652780.51mypc.cn/api", |
| | | page: 1, |
| | | pagesize: 10, |
| | | status: 'loadmore', |
| | | // loadStatus:'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式 |
| | | isLoadMore: false, //是否加载中 |
| | | isFlash: false, //是否刷新 |
| | |
| | | mounted() { |
| | | // this.getArtcilePageList(); |
| | | }, |
| | | //上拉加载更多 |
| | | // onReachBottom() { //上拉触底函数 |
| | | // console.log("上拉了") |
| | | // if (!this.isLoadMore) { //此处判断,上锁,防止重复请求 |
| | | // // this.isLoadMore=true |
| | | // this.page += 1 |
| | | // this.getArtcilePageList(2) |
| | | // } |
| | | // }, |
| | | // //下拉刷新 |
| | | // onPullDownRefresh() { |
| | | // // console.log("下拉了!...."); |
| | | // if (!this.isFlash) { //此处判断,上锁,防止重复请求 |
| | | // // this.isFlash=true; |
| | | // this.page = 1; |
| | | // this.getArtcilePageList(1); |
| | | // uni.stopPullDownRefresh(); |
| | | // } |
| | | // }, |
| | | onLoad() { |
| | | this.getArtcilePageList(1); |
| | | this.getArtcilePageList(); |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | //上拉加载更多 |
| | | onReachBottom() { |
| | | // |
| | | if (this.status=='nomore') return; |
| | | this.page = ++this.page; |
| | | setTimeout(() => { |
| | | this.getArtcilePageList(); |
| | | }, 2000); |
| | | }, |
| | | methods: { |
| | | goArticleTab(index) { |
| | |
| | | }, |
| | | //去跳转详情页面 |
| | | goDetail(e) { |
| | | |
| | | //内容传值容易报错,所以直传id,然后调用接口去查询 |
| | | // let detail = { |
| | | // title: e.title, |
| | | // content: e.content, |
| | | // id: e.id, |
| | | // createTime: e.createTime, |
| | | // sourceName: e.sourceName, |
| | | // imgUrl: e.url, |
| | | // videoUrl:e.videoUrl |
| | | // }; |
| | | |
| | | let detail = { |
| | | id: e.id |
| | | }; |
| | |
| | | getArtcilePageList(tab) { |
| | | var that = this; |
| | | uni.request({ |
| | | url: that.pathUrl + '/article/article/page', |
| | | url: this.$store.state.piAPI + '/article/article/page', |
| | | method: 'GET', |
| | | data: { |
| | | current: this.page, |
| | |
| | | success: (res) => { |
| | | if (res.data.code == 200) { |
| | | if (res.data.data.records) { |
| | | if (tab == 1) { |
| | | //如果总数小于pageSize,不做其他操作 |
| | | if (res.data.data.total < this.pagesize) { |
| | | that.data = res.data.data.records; |
| | | } else { |
| | | //如果总数小于pageSize,不做其他操作 |
| | | if (res.data.data.total < this.pagesize) { |
| | | that.data = res.data.data.records; |
| | | if (res.data.data.records.length < this.pagesize) { |
| | | //如果数量小于分页数量,则为最后一页 |
| | | this.status = 'nomore' |
| | | } else { |
| | | if (res.data.data.records.length < this.pagesize) { |
| | | //如果数量小于分页数量,则为最后一页 |
| | | // this.isLoadMore=true; |
| | | // this.loadStatus='nomore'; |
| | | } else { |
| | | // this.isLoadMore=false |
| | | } |
| | | res.data.data.records.forEach((item) => { |
| | | that.data.push(item); |
| | | }) |
| | | //否则继续加载更多数据 |
| | | this.status = 'loading'; |
| | | } |
| | | res.data.data.records.forEach((item) => { |
| | | that.data.push(item); |
| | | }) |
| | | } |
| | | } else { |
| | | // this.isLoadMore=true; |
| | | // this.loadStatus='nomore'; |
| | | } |
| | | uni.stopPullDownRefresh(); |
| | | } |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | page{ |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: #f7f7f7; |
| | | } |
| | | </style> |
| | | |
| | | <style lang="scss" scoped> |
| | | .advisory-big { |
| | | width: 100%; |
| | | height: 70%; |
| | | height: 100%; |
| | | background-color: #f7f7f7; |
| | | |
| | | .uni-nav-bar-info { |
| | | display: flex; |
| | |
| | | |
| | | |
| | | .article-tab { |
| | | // background-color: #007AFF; |
| | | background-color: #fff; |
| | | width: 100%; |
| | | height: 2rem; |
| | | height: 2.5rem; |
| | | border-bottom: 2px solid #D7D7D7; |
| | | z-index: 999; |
| | | position: fixed; |
| | | |
| | | .article-tab-title { |
| | | // text-align: center; |
| | | width: 14%; |
| | | float: left; |
| | | margin-left: 1rem; |
| | | margin-top: 0.5rem; |
| | | // border-bottom: 4px solid #000000; |
| | | } |
| | | |
| | | image { |
| | | margin-top: 0.35rem; |
| | | width: 1.5rem; |
| | | height: 1.5rem; |
| | | } |
| | | } |
| | | |
| | | .article-content{ |
| | | margin-top: 1rem; |
| | | margin-top: 3.5rem; |
| | | width: 100%; |
| | | // background-color: #00FF00; |
| | | |
| | | .advisory-model { |
| | | width: 100%; |
| | | width: 94%; |
| | | margin: 0 auto; |
| | | height: 6rem; |
| | | // background-color: #00FF00; |
| | | background-color: #FFF; |
| | | border-radius: 8px; |
| | | margin-top: 0.5rem; |
| | | |
| | | |
| | | .advisory-left { |
| | | width: 61%; |
| | | width: 64%; |
| | | height: 80%; |
| | | float: left; |
| | | position: relative; |
| | | // background-color: #00FFFF; |
| | | position: relative; |
| | | left: 4%; |
| | | left: 3%; |
| | | top: 10%; |
| | | |
| | | |
| | |
| | | |
| | | .advisory-right { |
| | | // background-color: #222222; |
| | | width: 32%; |
| | | width: 33%; |
| | | height: 80%; |
| | | left: 63%; |
| | | left: 65%; |
| | | position: relative; |
| | | top: 10%; |
| | | |
| | |
| | | width: 30px; |
| | | display: block; |
| | | height: 3.5px; |
| | | background-color: #000; |
| | | background-color: #0BB9C8; |
| | | } |
| | | |
| | | |
| | |
| | | display: flex; |
| | | flex-direction: row; |
| | | position: relative; |
| | | top: 0.35rem; |
| | | top: 2.85rem; |
| | | |
| | | .search-ico-wapper{ |
| | | background-color: #F1F1F1; |
| | |
| | | <style lang="scss" scoped> |
| | | .view-business{ |
| | | width: 100%; |
| | | margin-top: 2rem; |
| | | margin-top: 1rem; |
| | | } |
| | | |
| | | .view-business-nav{ |
| | |
| | | <view class="work"> |
| | | <!-- 自定义顶部导航栏 --> |
| | | <!-- <navBarTop :title="'聊天室'"></navBarTop> --> |
| | | <view class="main"> |
| | | <div> |
| | | <div class="m-main"> |
| | | <!-- <view class="inTitle">{{Task}}</view> --> |
| | | <view class="inTmain"> |
| | | <contacts v-for="(item,index) in dataListP" :key="index" :Pdata="item" :fromW="fromW" |
| | | @refreshTask="refreshTask"></contacts> |
| | | </view> |
| | | </div> |
| | | </div> |
| | | <view class="tab"> |
| | | <u-tabs :list="list" :is-scroll="false" :current="current" active-color="#14B9C8" inactive-color="#595959" |
| | | height="100" @change="change"></u-tabs> |
| | | </view> |
| | | |
| | | <swiper id="swiperBox" :style="{ height: swiperHeight + 'px' }" :current="current" @change="tabsChange"> |
| | | <swiper-item class="swiper-item" v-for="(item, indexs) in list" :key="indexs"> |
| | | <view v-if="indexs == 0" class="main"> |
| | | <div> |
| | | <div class="m-main"> |
| | | <!-- <view class="inTitle">{{Task}}</view> --> |
| | | <view class="inTmain"> |
| | | <contacts v-for="(item,index) in dataListP" :key="index" :Pdata="item" :fromW="indexs" |
| | | @refreshTask="refreshTask"></contacts> |
| | | </view> |
| | | </div> |
| | | </div> |
| | | </view> |
| | | <view v-if="indexs == 1" class="main"> |
| | | <div> |
| | | <div class="m-main"> |
| | | <!-- <view class="inTitle">{{Task}}</view> --> |
| | | <view class="inTmain"> |
| | | <contacts v-for="(item,index) in dataListQZ" :key="index" :Pdata="item" :fromW="indexs" |
| | | @refreshTask="refreshTask"></contacts> |
| | | </view> |
| | | </div> |
| | | </div> |
| | | </view> |
| | | </swiper-item> |
| | | </swiper> |
| | | |
| | | </view> |
| | | </template> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | list: [{ |
| | | name: '正在聊天' |
| | | }, |
| | | { |
| | | name: '群组' |
| | | }, |
| | | { |
| | | name: '通讯录' |
| | | } |
| | | ], |
| | | swiperHeight: 0, |
| | | zhanwei: '', //因为小程序中底部和顶部栏占位置,uniapp中不占位置 |
| | | ingsDB: '#00d1ff 2px solid', |
| | | candoDB: '#fff 2px solid', |
| | | Task: '当前已接任务', |
| | | current: 0, |
| | | show: true, |
| | | dataListP: [], |
| | | dataListQZ: [], |
| | | fromW: '', |
| | | onTop: false, //是否吸顶 |
| | | rect: '', //页面滚动距离 |
| | |
| | | this.beginObj(); |
| | | this.ingss(); |
| | | }, |
| | | onReady() { |
| | | let that = this; |
| | | uni.getSystemInfo({ |
| | | success(e) { |
| | | console.log(e); |
| | | let { |
| | | windowWidth, |
| | | windowHeight, |
| | | safeArea |
| | | } = e; |
| | | const query = uni.createSelectorQuery().in(that); |
| | | query |
| | | .select('#swiperBox') |
| | | .boundingClientRect(data => { |
| | | that.swiperHeight = safeArea.bottom - data.top; |
| | | }) |
| | | .exec(); |
| | | } |
| | | }); |
| | | }, |
| | | methods: { |
| | | change(index) { |
| | | this.current = index; |
| | | }, |
| | | tabsChange(e) { |
| | | this.current = e.detail.current; |
| | | if(this.current == 1){ |
| | | var that = this; |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api/chatgroup/selectList", |
| | | method:"POST", |
| | | data:{ |
| | | senderId: WxStorage.get("ids") |
| | | }, |
| | | success:(res)=> { |
| | | var resdata = res.data.data; |
| | | for (var i = 0; i < resdata.length; i++) { |
| | | if(resdata[i].avatar == null || resdata[i].avatar == ""){ |
| | | resdata[i].avatar = "http://s16s652780.51mypc.cn/img/bg/qunz.png"; |
| | | } |
| | | } |
| | | that.dataListQZ = resdata; |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | beginObj() { |
| | | this.titleTop = '2.6rem'; |
| | | this.zhanwei = '3rem'; |
| | |
| | | this.getdataList(1); |
| | | }, |
| | | getdataList(need) { |
| | | this.fromW = need; |
| | | var that = this; |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api/chat-records/getChatListPage", |
| | |
| | | <!-- 新闻模块 start --> |
| | | <view class="news"> |
| | | <navigator hover-class="none" url="/pages/news/list" class="cell"> |
| | | <view class="ctitle">新闻</view> |
| | | <view class="ctitle">温馨提示</view> |
| | | <view class="more"> |
| | | 更多 |
| | | <u-icon name="arrow-right" color="#A6ABB5" size="16"></u-icon> |
| | |
| | | this.getArtcilePageList(); |
| | | }, |
| | | onReachBottom() { |
| | | |
| | | // 后续将改为与后端联动 |
| | | if (this.page >= 3) return; |
| | | this.status = 'loading'; |
| | | if (this.status == 'nomore') return; |
| | | this.page = ++this.page; |
| | | setTimeout(() => { |
| | | this.list += 10; |
| | | if (this.page >= 3) this.status = 'nomore'; |
| | | else this.status = 'loading'; |
| | | // this.newsList.push(...[{}, {}]); |
| | | this.getArtcilePageList(); |
| | | }, 2000); |
| | | }, |
| | |
| | | that.newsList.push(item); |
| | | }) |
| | | } |
| | | } else { |
| | | // this.isLoadMore=true; |
| | | // this.loadStatus='nomore'; |
| | | } |
| | | uni.stopPullDownRefresh(); |
| | | } |
| | |
| | | height: 140rpx; |
| | | border-radius: 20rpx; |
| | | background-color: #82848a; |
| | | margin-left: 0.5rem; |
| | | } |
| | | } |
| | | } |
| | |
| | | <view class="bomBut"> |
| | | <view class="attendance-btn" @click="goToAttendance()"> |
| | | <view class="attendance-info"> |
| | | <image src="../../static/myself/attendance.png" class="attendance-image"/> |
| | | <image src="../../static/myself/clock01.png" class="attendance-image"/> |
| | | <view class="attendance-title">考勤打卡</view> |
| | | </view> |
| | | </view> |
| | |
| | | // }, |
| | | { |
| | | title: '关于我们', |
| | | imgSrc: '../../static/myself/us01.png', |
| | | imgSrc: '../../static/myself/us003.png', |
| | | open: 'aboutUs' |
| | | }, |
| | | { |
| | | title: '隐私政策', |
| | | imgSrc: '../../static/myself/privacy.png', |
| | | imgSrc: '../../static/myself/privacy01.png', |
| | | open: 'genxin' |
| | | }, |
| | | { |
| | | title: '设置', |
| | | imgSrc: '../../static/myself/system01.png', |
| | | imgSrc: '../../static/myself/system02.png', |
| | | open: 'shezhi' |
| | | }, |
| | | { |
| | | title: '登出', |
| | | imgSrc: '../../static/myself/logout.png', |
| | | imgSrc: '../../static/myself/logout002.png', |
| | | open: 'outIn', |
| | | }, |
| | | |
| | |
| | | page{ |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: #F4F5FC; |
| | | background-color: #F7F7F7; |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | |
| | | width: 100%; |
| | | height: 12rem; |
| | | border-radius: 0px 0px 12px 12px; |
| | | background-image: linear-gradient(to bottom, #25262E, #2F303B); |
| | | background-image: linear-gradient(to bottom, #0BB9C8, #0BB9C8); |
| | | color: #fff; |
| | | flex-direction: column; |
| | | |
| | |
| | | |
| | | .user-id{ |
| | | font-size: 0.6rem; |
| | | color: #97979F; |
| | | color: #fff; |
| | | margin-top: 0.3rem; |
| | | } |
| | | } |
| | |
| | | width: 88%; |
| | | margin: 0 auto; |
| | | height: 2.4rem; |
| | | background-image: linear-gradient(to right, #40404C, #595A62); |
| | | box-shadow:0 0 0.1px 0.1px #595A62; |
| | | background-image: linear-gradient(to right, #1D949F, #0BB9C8); |
| | | box-shadow:0 0 0.1px 0.1px #0BB9C8; |
| | | // border: 1px solid #00ff00; |
| | | |
| | | .dept-info{ |
| | |
| | | line-height: 1.8rem; |
| | | margin-left: 0.6rem; |
| | | margin-top: 0.3rem; |
| | | background-image: linear-gradient(to right,#5C5C65,#5C5C65); |
| | | background-image: linear-gradient(to right,#078893, #0CB5C4); |
| | | |
| | | .dept-name { |
| | | margin-left: 0.3rem; |
| | |
| | | // // dataType: 'JSON', |
| | | success: (res) => { |
| | | if (res.statusCode == 200) { |
| | | if(res.data.error_code == "400"){ |
| | | uni.showToast({ |
| | | title: '密码错误,请重试', |
| | | icon:'none', |
| | | duration: 2000 |
| | | }); |
| | | return; |
| | | } |
| | | store.commit('getUserData',res.data) |
| | | console.log(res.data,123542); |
| | | data.isit = true; |