Browse Source

数据概览 消息中事件跳转详情

master
mk 9 months ago
parent
commit
63a5237ed0
  1. 15
      pages/index/index.vue
  2. 312
      pages/statistics/modules/Overview/index.vue
  3. 143
      pages/statistics/statistics.vue
  4. BIN
      static/images/statistics/resi.png
  5. BIN
      static/images/statistics/suggest.png
  6. 241
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.vue
  7. 21
      subpages/morenews/pages/morenews/morenews.vue
  8. 11
      utils/api.js

15
pages/index/index.vue

@ -149,10 +149,10 @@
<view class="Information_one"> <view class="Information_one">
<view class="one_one"> <view class="one_one">
<image src="/static/images/index/Topping.png" class="Information_image" v-if="item.msgType == resident_categiry"></image> <image src="/static/images/index/Topping.png" class="Information_image" v-if="item.msgType == resident_categiry"></image>
<text class="Information_test">{{ item.content }}</text> <text class="Information_test">{{ item.messageContent }}</text>
</view> </view>
<text class="Information_test2">{{ item.readFlag != '1' ? '未读' : '已读' }}</text> <text class="Information_test2">{{ item.readFlag != 'unread' ? '已读' : '未读' }}</text>
</view> </view>
<view class="Information_two"> <view class="Information_two">
@ -457,19 +457,24 @@ export default {
toDetail(e) { toDetail(e) {
this.clearOneMessage(e.currentTarget.dataset.item.id); this.clearOneMessage(e.currentTarget.dataset.item.id);
if (e.currentTarget.dataset.item.msgType == 'resident_base_info') { if (e.currentTarget.dataset.item.messageType == 'resident_base_info') {
uni.navigateTo({ uni.navigateTo({
url: `/subpages/searchResult/pages/resiInfo/resiInfo?resiId=${e.currentTarget.dataset.item.targetId}` url: `/subpages/searchResult/pages/resiInfo/resiInfo?resiId=${e.currentTarget.dataset.item.targetId}`
}); });
} else if (e.currentTarget.dataset.item.msgType == 'community_house') { } else if (e.currentTarget.dataset.item.messageType == 'community_house') {
uni.navigateTo({ uni.navigateTo({
url: `/subpages/addhouse/pages/addhouse/addhouse?type=edit&houseId=${e.currentTarget.dataset.item.targetId}` url: `/subpages/addhouse/pages/addhouse/addhouse?type=edit&houseId=${e.currentTarget.dataset.item.targetId}`
}); });
} else if (e.currentTarget.dataset.item.msgType == 'resident_category') { } else if (e.currentTarget.dataset.item.messageType == 'resident_category') {
uni.navigateTo({ uni.navigateTo({
url: `/subpages/residentCategory/pages/residentCategory/residentCategory?category=${e.currentTarget.dataset.item.category}` url: `/subpages/residentCategory/pages/residentCategory/residentCategory?category=${e.currentTarget.dataset.item.category}`
}); });
} }
else if (e.currentTarget.dataset.item.messageType == 'event') {
uni.navigateTo({
url: `/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck?id=${e.currentTarget.dataset.item.targetId}&type=0`
});
}
this.setData({ this.setData({
[`tableData[${e.currentTarget.dataset.index}].readFlag`]: '1' [`tableData[${e.currentTarget.dataset.index}].readFlag`]: '1'
}); });

312
pages/statistics/modules/Overview/index.vue

@ -0,0 +1,312 @@
<template>
<view class="overview">
<view class="top">
<view class="item">
<view class="num">
{{overViewInfo.newTotal}}
</view>
<view class="type">
12345事件数
</view>
</view>
<view class="item">
<view class="num">
{{overViewInfo.newResolveNum}}
</view>
<view class="type">
已办结
</view>
</view>
<view class="item">
<view class="num">
{{overViewInfo.newUnResolveNum}}
</view>
<view class="type">
未办结
</view>
</view>
</view>
<!-- <view class="bot">
<view class="item">
<view class="num">
24255
</view>
<view class="type">
网格化事件
</view>
</view>
<view class="item">
<view class="num">
24255
</view>
<view class="type">
已办结
</view>
</view>
<view class="item">
<view class="num">
24255
</view>
<view class="type">
未办结
</view>
</view>
</view> -->
<view class="resi">
<view class="item">
<view class="num">
{{overViewInfo.userTotal}}
</view>
<view class="type">
居民服务
</view>
</view>
<view class="item">
<view class="num">
{{overViewInfo.userResolveNum}}
</view>
<view class="type">
已办结
</view>
</view>
<view class="item">
<view class="num">
{{overViewInfo.userUnResolveNum}}
</view>
<view class="type">
未办结
</view>
</view>
</view>
<view class="suggest">
<view class="item">
<view class="num">
{{overViewInfo.ideaTotal}}
</view>
<view class="type">
人民建议
</view>
</view>
<view class="item">
<view class="num">
{{overViewInfo.ideaResolveNum}}
</view>
<view class="type">
已办结
</view>
</view>
<view class="item">
<view class="num">
{{overViewInfo.ideaUnResolveNum}}
</view>
<view class="type">
未办结
</view>
</view>
</view>
</view>
</template>
<script>
import api from '../../../../utils/api';
const app = getApp();
export default {
data() {
return {
agencyId:app.globalData.user.agencyId,
overViewInfo:{}
};
},
created() {
this.getData()
},
methods: {
getData(){
api.statisticEventInfo({agencyId:this.agencyId}).then(res=>{
if(res.code === 0){
console.log(res);
this.overViewInfo = res.data
}
}).catch(err=>{
console.log(err);
})
}
},
components: {},
computed: {},
watch: {},
}
</script>
<style lang='scss' scoped>
.overview {
display: flex;
flex-direction: column;
.top {
background: url('../../../../static/images/statistics/top.png');
.item {
flex: 1;
position: relative;
&::after {
content: ' ';
width: 1px;
height: 13px;
background: #ff9466;
position: absolute;
left: 0;
top: 15px;
}
}
&>:first-child {
&::after {
display: none;
}
.num {
color: #ff4a43;
}
.type {
color: #ff7672;
}
}
}
.bot {
background: url('../../../../static/images/statistics/bot.png');
margin-top: 8px;
.item {
flex: 1;
position: relative;
&::after {
content: ' ';
width: 1px;
height: 13px;
background: #ff844d;
position: absolute;
left: 0;
top: 15px;
}
}
&>:first-child {
&::after {
display: none;
}
.num {
color: #ff882b;
}
.type {
color: #ff964c;
}
}
}
.resi {
background: url('../../../../static/images/statistics/resi.png');
margin-top: 8px;
.item {
flex: 1;
position: relative;
&::after {
content: ' ';
width: 1px;
height: 13px;
background: #52bcb0;
position: absolute;
left: 0;
top: 15px;
}
}
&>:first-child {
&::after {
display: none;
}
.num {
color: #00a99a;
}
.type {
color: #52bcb0;
}
}
}
.suggest {
background: url('../../../../static/images/statistics/suggest.png');
margin-top: 8px;
.item {
flex: 1;
position: relative;
&::after {
content: ' ';
width: 1px;
height: 13px;
background: #8cadf5;
position: absolute;
left: 0;
top: 15px;
}
}
&>:first-child {
&::after {
display: none;
}
.num {
color: #5888f0;
}
.type {
color: #6992ee;
}
}
}
.top,
.bot,
.resi,
.suggest {
display: flex;
align-items: center;
justify-content: space-around;
height: 68px;
background-size: 100% 100%;
.num {
font-size: 18px;
color: #333333;
font-weight: bold;
text-align: center;
}
.type {
text-align: center;
font-size: 13px;
color: #A3ABBA;
}
}
}
</style>

143
pages/statistics/statistics.vue

@ -6,60 +6,7 @@
<view class="title"> <view class="title">
数据概览 数据概览
</view> </view>
<view class="overview"> <Overview/>
<view class="top">
<view class="item">
<view class="num">
24255
</view>
<view class="type">
事件数
</view>
</view>
<view class="item">
<view class="num">
24255
</view>
<view class="type">
事件数
</view>
</view>
<view class="item">
<view class="num">
24255
</view>
<view class="type">
事件数
</view>
</view>
</view>
<view class="bot">
<view class="item">
<view class="num">
24255
</view>
<view class="type">
需求数
</view>
</view>
<view class="item">
<view class="num">
24255
</view>
<view class="type">
已办结
</view>
</view>
<view class="item">
<view class="num">
24255
</view>
<view class="type">
未办结
</view>
</view>
</view>
</view>
</view> </view>
<view class="card"> <view class="card">
<view class="title"> <view class="title">
@ -158,6 +105,8 @@ import problemList from './modules/ProblemList/ProblemList.vue';
import requirementAnalysis from './modules/RequirementAnalysis/RequirementAnalysis.vue'; import requirementAnalysis from './modules/RequirementAnalysis/RequirementAnalysis.vue';
import eventPrediction from './modules/EventPrediction/EventPrediction.vue'; import eventPrediction from './modules/EventPrediction/EventPrediction.vue';
import crowdPortrait from './modules/CrowdPortrait/CrowdPortrait.vue'; import crowdPortrait from './modules/CrowdPortrait/CrowdPortrait.vue';
import Overview from './modules/Overview/index.vue';
import customTabBar from '../../components/custom-tab-bar'; import customTabBar from '../../components/custom-tab-bar';
const app = getApp(); const app = getApp();
export default { export default {
@ -171,7 +120,8 @@ export default {
RequirementAnalysis, RequirementAnalysis,
EventPrediction, EventPrediction,
CrowdPortrait, CrowdPortrait,
customTabBar customTabBar,
Overview
}, },
data() { data() {
return { return {
@ -251,89 +201,6 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.overview{
display: flex;
flex-direction: column;
.top{
background: url('../../static/images/statistics/top.png');
background-size: 100% 100%;
height: 68px;
.item{
flex: 1;
position: relative;
&::after{
content: ' ';
width: 1px;
height: 13px;
background: #ff9466;
position: absolute;
left: 0;
top: 15px;
}
}
&>:first-child{
&::after{
display: none;
}
.num{
color: #ff4a43;
}
.type{
color: #ff7672;
}
}
}
.bot{
background: url('../../static/images/statistics/bot.png');
background-size: 100% 100%;
height: 68px;
margin-top: 8px;
.item{
flex: 1;
position: relative;
&::after{
content: ' ';
width: 1px;
height: 13px;
background: #ff844d;
position: absolute;
left: 0;
top: 15px;
}
}
&>:first-child{
&::after{
display: none;
}
.num{
color: #ff882b;
}
.type{
color: #ff964c;
}
}
}
.top,.bot{
display: flex;
align-items: center;
justify-content: space-around;
.num{
font-size: 18px;
color: #333333;
font-weight: bold;
text-align: center;
}
.type{
text-align: center;
font-size: 13px;
color: #A3ABBA;
}
}
}
.statistics-container { .statistics-container {
padding: 20rpx; padding: 20rpx;

BIN
static/images/statistics/resi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
static/images/statistics/suggest.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

241
subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.vue

@ -12,8 +12,7 @@
</view> </view>
<view style="overflow-x: hidden;"> <view style="overflow-x: hidden;">
<jia-cascader :itemList="angencyList" :defaultItemList="defaultItemList" <jia-cascader :itemList="angencyList" :defaultItemList="defaultItemList"
@completeChange="completeGrid" @inputChange="change" :border="false" @completeChange="completeGrid" :placeholder="agencyName||'请选择'" :border="false" :clearIcon="false"></jia-cascader>
:clearIcon="false"></jia-cascader>
</view> </view>
</view> </view>
<view class="item"> <view class="item">
@ -120,13 +119,12 @@
</view> </view>
<view style="overflow-x: hidden;"> <view style="overflow-x: hidden;">
<jia-cascader :itemList="casOptions" :defaultItemList="defaultItemList" <jia-cascader :itemList="casOptions" :defaultItemList="defaultItemList"
@completeChange="completeCategory" @inputChange="change" :border="false" @completeChange="completeCategory" :border="false"
:clearIcon="false"></jia-cascader> :clearIcon="false"></jia-cascader>
</view> </view>
</view> </view>
<view :class="'item ' + (isDisabled ? 'disabled' : '')"> <view :class="'item ' + (isDisabled ? 'disabled' : '')">
<view class="field"> <view class="field">
<text class="must">*</text>
<view class="field-text">重点问题标注</view> <view class="field-text">重点问题标注</view>
</view> </view>
<view class="value-dl" @click="keyProblemShow = true"> <view class="value-dl" @click="keyProblemShow = true">
@ -187,7 +185,7 @@
</view> </view>
<view hover-class="backC" class="value-dl"> <view hover-class="backC" class="value-dl">
<radio-group class="radio-group-small" @change="handleChangeResponsibleUnit"> <radio-group class="radio-group-small" @change="handleChangeResponsibleUnit">
<radio :checked="true" value="yes" color="#4193fe" class="radio"></radio> <radio :checked="ruTabVal === 'yes'" value="yes" color="#4193fe" class="radio"></radio>
<radio :checked="ruTabVal === 'no'" value="no" color="#4193fe" class="radio"> <radio :checked="ruTabVal === 'no'" value="no" color="#4193fe" class="radio">
</radio> </radio>
</radio-group> </radio-group>
@ -223,8 +221,8 @@
</view> </view>
</view> </view>
</view> </view>
<view class="card"> <view class="card" v-if="tabVal === '2' || fmData.demandType === 'chengguan'">
<view class="item" v-if="tabVal === '2' || fmData.demandType === 'chengguan'" <view class="item"
style="border: none; padding: 0"> style="border: none; padding: 0">
<view class="field" style="width: 190rpx"> <view class="field" style="width: 190rpx">
<text class="must">*</text> <text class="must">*</text>
@ -264,13 +262,12 @@
</view> </view>
</view> </view>
</view> </view>
<view class="process">
<view class="card" v-if="(tabVal === '0' || tabVal === '2') && processData.length > 0"> <view class="card" v-if=" processData">
<view class="title1" style="margin-bottom: 0">处理进展</view> <view class="title1" style="margin-bottom: 0">处理进展</view>
<wux-steps v-if="processData.length > 0" style="margin-top: 50rpx" direction="vertical" <view v-if="processData.length > 0">
:current="0"> <view v-for="(item, index) in processData" :key="index">
<wux-step icon="none" v-for="(item, index) in processData" :key="index"> <view class="step-container">
<view slot="title" class="step-container">
<view class="step-title" v-if="item.agencyId">指派</view> <view class="step-title" v-if="item.agencyId">指派</view>
<view class="step-title" v-if="!item.timeLimit">完成并回复</view> <view class="step-title" v-if="!item.timeLimit">完成并回复</view>
<view class="step-title" v-if="!item.agencyId && item.timeLimit"> <view class="step-title" v-if="!item.agencyId && item.timeLimit">
@ -278,7 +275,7 @@
<view class="step-time">{{ item.formattedTime }}</view> <view class="step-time">{{ item.formattedTime }}</view>
</view> </view>
<view slot="content"> <view >
<view v-if="item.type === 'event'"> <view v-if="item.type === 'event'">
<view v-if="item.agencyId"> <view v-if="item.agencyId">
<view class="card_content"> <view class="card_content">
@ -306,7 +303,7 @@
{{ item.limitTime }} {{ item.limitTime }}
</view> </view>
</view> </view>
<view class="card_content" v-if="item.internalFile.length > 0"> <!-- <view class="card_content" v-if="item.internalFile.length > 0">
<view class="label1">附件</view> <view class="label1">附件</view>
<view class="value1"> <view class="value1">
<view class="image-row"> <view class="image-row">
@ -320,7 +317,7 @@
</block> </block>
</view> </view>
</view> </view>
</view> </view> -->
</view> </view>
<view v-else> <view v-else>
<view class="card_content"> <view class="card_content">
@ -343,7 +340,7 @@
</view> </view>
</view> </view>
<view class="card_content" v-if="item.internalFile.length > 0"> <!-- <view class="card_content" v-if="item.internalFile.length > 0">
<view class="label1">附件</view> <view class="label1">附件</view>
<view class="value1"> <view class="value1">
<view class="image-row"> <view class="image-row">
@ -365,14 +362,16 @@
</block> </block>
</view> </view>
</view> </view>
</view> </view> -->
</view> </view>
</view> </view>
</view> </view>
</wux-step> </view>
</wux-steps> </view>
</view>
</view> </view>
<view class="submit-button" v-if="!optionsId"> <view class="submit-button" v-if="!optionsId">
<button :disabled="submitDisabled" @tap="submitPersonalInfo" <button :disabled="submitDisabled" @tap="submitPersonalInfo"
hover-class="hover-submit">提交</button> hover-class="hover-submit">提交</button>
@ -441,7 +440,6 @@
import CryptoJS from 'crypto-js' import CryptoJS from 'crypto-js'
import MumuRecorder from '@/uni_modules/mumu-recorder/components/mumu-recorder/mumu-recorder.vue' import MumuRecorder from '@/uni_modules/mumu-recorder/components/mumu-recorder/mumu-recorder.vue'
var innerAudioContext = uni.createInnerAudioContext(); var innerAudioContext = uni.createInnerAudioContext();
var timer; var timer;
export default { export default {
components: { components: {
@ -459,12 +457,6 @@
optionsId: '', optionsId: '',
isDisabled: false, isDisabled: false,
happenTime: '', happenTime: '',
//
defaultMeasureNames: {
label: 'categoryName',
value: 'categoryCode',
children: 'childCateList'
},
fmData: { fmData: {
gridId: '', gridId: '',
@ -497,9 +489,9 @@
parentCode: '', parentCode: '',
categoryId: '', categoryId: '',
categoryList: [], categoryList: [],
oneselfDispose:'no' oneselfDispose:'yes'
}, },
oneselfDispose:'no', oneselfDispose:'yes',
tabVal: '0', tabVal: '0',
ruTabVal: 'yes', ruTabVal: 'yes',
uploadImageList: [], uploadImageList: [],
@ -541,7 +533,7 @@
// //
visibleTime: false, visibleTime: false,
angencyList: [], angencyList:[],
// //
angencyId: '', angencyId: '',
@ -638,7 +630,7 @@
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.uploadxfyun() // this.uploadxfyun()
this.setData({ this.setData({
angencyId: app.globalData.user.agencyId, angencyId: app.globalData.user.agencyId,
reportUserName: app.globalData.user.realName, reportUserName: app.globalData.user.realName,
@ -646,7 +638,7 @@
}); });
// this.initSI() // this.initSI()
this.getAgencygridtree(); this.getAgencygridtree();
this.getDemandoption(); // this.getDemandoption();
this.getDictList(); this.getDictList();
this.getCategoryList(); this.getCategoryList();
if (options.id) { if (options.id) {
@ -703,16 +695,6 @@
}); });
} }
console.log('on Show:' + this.optionsId); console.log('on Show:' + this.optionsId);
if (this.optionsId) {
if (this.tabVal === '0' || this.tabVal === '2') {
this.getIcEventOldDetail(this.optionsId);
icEventOldProcess({
icEventId: this.optionsId
}).then((res) => {
this.getProcess(res.data);
});
}
}
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
@ -743,12 +725,45 @@
}) })
}, },
uploadxfyun(){ uploadxfyun(){
const baseString = CryptoJS.SHA1(Md5.hashStr('e0810427' + Math.floor(Date.now() / 1000)),'d432ed34d99fc02d4608063a2fb22d49'); var socketOpen = false;
var base64 = CryptoJS.enc.Base64.stringify(baseString); var socketMsgQueue = [];
console.log(base64); function generateRandomInteger() {
let url = `https://raasr.xfyun.cn/v2/api/upload?signa=${base64}&duration=200&fileName=ces&fileSize=11895&sysDicts=uncivilizedLanguage&appId=e0810427` const min = 1;
let data = {} const max = 9999999999;
uni.request({url,data,header: { 'Content-Type': 'application/json' }}) return Math.floor(Math.random() * (max - min + 1)) + min;
}
function generateVoiceId() {
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11)
.replace(/[018]/g, c =>
(c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16)
);
}
let signature = encodeURIComponent(CryptoJS.enc.Base64.stringify(CryptoJS.HmacSHA1(`asr.cloud.tencent.com/asr/v2/1311830875?engine_model_type=16k_zh&expired=${Math.floor(Date.now() / 1000) + 10 * 86400}&nonce=${generateRandomInteger()}}&secretid=AKIDUuFTUIsDg1HQg2R9i1IslV5ELONI2JRN&timestamp=${Math.floor(Date.now() / 1000)}&voice_id=${generateVoiceId()}, "vogPI60kHguxqb3KNIG9wY3LVL4b2NxO"`,'key' )));
console.log(signature,'签名');
uni.connectSocket({
url: `wss://asr.cloud.tencent.com/asr/v2/1311830875?engine_model_type=16k_zh&expired=${Math.floor(Date.now() / 1000) + 10 * 86400}&nonce=${generateRandomInteger()}&secretid=AKIDUuFTUIsDg1HQg2R9i1IslV5ELONI2JRN&timestamp=${Math.floor(Date.now() / 1000)}&voice_id=${generateVoiceId()}&signature=${signature}`
});
uni.onSocketOpen(function (res) {
socketOpen = true;
for (var i = 0; i < socketMsgQueue.length; i++) {
sendSocketMessage(socketMsgQueue[i]);
}
socketMsgQueue = [];
});
uni.onSocketError(function (res) {
console.log('WebSocket连接打开失败,请检查!');
});
function sendSocketMessage(msg) {
if (socketOpen) {
uni.sendSocketMessage({
data: msg
});
} else {
socketMsgQueue.push(msg);
}
}
}, },
completeGrid(e) { completeGrid(e) {
this.fmData.gridId = e.result[0].value this.fmData.gridId = e.result[0].value
@ -817,8 +832,8 @@
getIcEventOldDetail(id) { getIcEventOldDetail(id) {
let parm = { let parm = {
icEventId: id icEventId: id
}; };
api.getIcEventOld(parm) api.getIcEventOld(parm)
.then((res) => { .then((res) => {
console.log(res); console.log(res);
@ -883,7 +898,18 @@
icEventOldProcess({ icEventOldProcess({
icEventId: id icEventId: id
}).then((res) => { }).then((res) => {
this.getProcess(res.data); const processedData = res.data.map((item) => {
return {
...item,
formattedTime: this.formatTimestamp(item.processTime)
};
});
//
this.setData({
processData: processedData
});
}); });
}, },
downLoadAudio() { downLoadAudio() {
@ -991,20 +1017,6 @@
}); });
console.log('innerAudioContext', innerAudioContext); console.log('innerAudioContext', innerAudioContext);
}, },
getProcess(data) {
//
const processedData = data.map((item) => {
return {
...item,
formattedTime: this.formatTimestamp(item.processTime)
};
});
//
this.setData({
processData: processedData
});
},
// //
formatTimestamp(timestamp) { formatTimestamp(timestamp) {
@ -1399,16 +1411,10 @@
// this.getLocation(false); // this.getLocation(false);
uni.chooseLocation({ uni.chooseLocation({
success: (res) => { success: (res) => {
const {
fmData
} = this;
this.setData({ this.setData({
fmData: { 'fmData.address':res.address,
...fmData, 'fmData.longitude': res.longitude,
address: res.address, 'fmData.latitude': res.latitude,
longitude: res.longitude,
latitude: res.latitude
},
addressContent: res.address addressContent: res.address
}); });
console.log(this.fmData); console.log(this.fmData);
@ -1508,10 +1514,7 @@
this.showToast('发生地点不能为空'); this.showToast('发生地点不能为空');
return; return;
} }
if (!this.fmData.resiId && (this.tabVal == 0 || this.tabVal == 1)) {
this.showToast('联系人不能为空');
return;
}
if (!this.resiMobile && (this.tabVal == 0 || this.tabVal == 1)) { if (!this.resiMobile && (this.tabVal == 0 || this.tabVal == 1)) {
this.showToast('联系人电话不能为空'); this.showToast('联系人电话不能为空');
return; return;
@ -2104,79 +2107,6 @@
}); });
}, },
//
inputSyncPicker(e) {
let {
detail: {
value
},
currentTarget: {
dataset: {
idKey,
nameKey,
listName,
subname,
subindex
}
}
} = e;
let item = this[listName][value];
let {
personalInfo
} = this;
if (subname && subindex !== undefined) {
personalInfo[subname][subindex][idKey] = item.value;
personalInfo[subname][subindex][nameKey] = item.label;
} else {
personalInfo[idKey] = item.value;
personalInfo[nameKey] = item.label;
}
this.setData({
personalInfo
});
this.dataHandle(listName);
},
dataHandle(listName) {
if (listName == 'streetList') {
this.setData({
communityList: [],
gridList: [],
'personalInfo.community': '',
//
'personalInfo.communityId': '' //
});
} else if (listName == 'communityList') {
this.setData({
gridList: [],
'personalInfo.grid': '',
//
'personalInfo.gridId': '' //
});
}
if (this.personalInfo.streetId) {
//
this.streetList.forEach((element, index) => {
if (this.personalInfo.streetId == element.value) {
this.setData({
communityList: element.children
});
}
});
}
if (this.personalInfo.communityId) {
//
this.communityList.forEach((element, index) => {
if (this.personalInfo.communityId == element.value) {
this.setData({
gridList: element.children
});
}
});
}
},
// //
reverseLocation() { reverseLocation() {
@ -2188,11 +2118,12 @@
output: 'jsonp', output: 'jsonp',
get_poi:0 get_poi:0
}; };
//使jsonp
console.log(data);
this.$jsonp(url,data).then(data=>{ this.$jsonp(url,data).then(data=>{
console.log(data,'当前地址'); console.log(data,'当前地址');
this.setData({ this.setData({
'fmData.address':data.result.address,
'fmData.longitude': data.result.location.lng,
'fmData.latitude': data.result.location.lat,
addressContent:data.result.address addressContent:data.result.address
}) })
}).catch(err=>{ }).catch(err=>{
@ -3894,4 +3825,8 @@ background: rgb(175, 1, 1);
pointer-events: none; pointer-events: none;
/* 禁止点击 */ /* 禁止点击 */
} }
.process{
padding: 0 10px;
box-sizing: border-box;
}
</style> </style>

21
subpages/morenews/pages/morenews/morenews.vue

@ -31,8 +31,8 @@
<view class="right"> <view class="right">
<view class="top"> <view class="top">
<text class="title">{{ item.content }}</text> <text class="title">{{ item.messageContent }}</text>
<text :class="item.readFlag != '1' ? '' : 'gray'" style="font-size: 26rpx; font-weight: 300">{{ item.readFlag != '1' ? '未读' : '已读' }}</text> <text :class="item.readFlag != '1' ? '' : 'gray'" style="font-size: 26rpx; font-weight: 300">{{ item.readFlag == 'unread' ? '未读' : '已读' }}</text>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="flex_box"> <view class="flex_box">
@ -95,6 +95,9 @@ export default {
await this.getStaffbasicinfo(); await this.getStaffbasicinfo();
}, },
onShow() { onShow() {
this.setData({
tableData:[]
})
this.getIntelligentMessage(); this.getIntelligentMessage();
}, },
onPullDownRefresh() { onPullDownRefresh() {
@ -123,9 +126,7 @@ export default {
loadMoreType: 'more' loadMoreType: 'more'
}); });
const parm = { const parm = {
type: this.selectValue == 0 ? null : this.selectValue - 1, agencyId: app.globalData.user.agencyId
limit: this.pageSize,
page: this.pageNo
}; };
if (!parm.type) { if (!parm.type) {
delete parm.type; delete parm.type;
@ -200,18 +201,22 @@ export default {
}, },
toDetail(e) { toDetail(e) {
if (e.currentTarget.dataset.item.msgType == 'resident_base_info') { if (e.currentTarget.dataset.item.messageType == 'resident_base_info') {
uni.navigateTo({ uni.navigateTo({
url: `/subpages/searchResult/pages/resiInfo/resiInfo?resiId=${e.currentTarget.dataset.item.targetId}` url: `/subpages/searchResult/pages/resiInfo/resiInfo?resiId=${e.currentTarget.dataset.item.targetId}`
}); });
} else if (e.currentTarget.dataset.item.msgType == 'community_house') { } else if (e.currentTarget.dataset.item.messageType == 'community_house') {
uni.navigateTo({ uni.navigateTo({
url: `/subpages/addhouse/pages/addhouse/addhouse?type=edit&houseId=${e.currentTarget.dataset.item.targetId}` url: `/subpages/addhouse/pages/addhouse/addhouse?type=edit&houseId=${e.currentTarget.dataset.item.targetId}`
}); });
} else if (e.currentTarget.dataset.item.msgType == 'resident_category') { } else if (e.currentTarget.dataset.item.messageType == 'resident_category') {
uni.navigateTo({ uni.navigateTo({
url: `/subpages/residentCategory/pages/residentCategory/residentCategory?category=${e.currentTarget.dataset.item.category}` url: `/subpages/residentCategory/pages/residentCategory/residentCategory?category=${e.currentTarget.dataset.item.category}`
}); });
}else if (e.currentTarget.dataset.item.messageType == 'ic_event_return'||e.currentTarget.dataset.item.messageType == 'event') {
uni.navigateTo({
url: `/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck?id=${e.currentTarget.dataset.item.targetId}&type=0`
});
} }
this.setData({ this.setData({
[`tableData[${e.currentTarget.dataset.index}].readFlag`]: '1' [`tableData[${e.currentTarget.dataset.index}].readFlag`]: '1'

11
utils/api.js

@ -90,7 +90,8 @@ module.exports = {
Enterpriseambiguity, Enterpriseambiguity,
hotResidentSearch, hotResidentSearch,
hotHouseSearch, hotHouseSearch,
carInfoSave carInfoSave,
statisticEventInfo
}; };
// 获取公钥 // 获取公钥
@ -101,8 +102,8 @@ function changePassword(parm) {
return fly.post(`epmetuser/customerstaff/changePassword`, parm); return fly.post(`epmetuser/customerstaff/changePassword`, parm);
} }
// 消息列表 // 消息列表
function getIntelligentMessage(param) { function getIntelligentMessage(data) {
return fly.get(`message/intelligentMessage/page`, param); return fly.post(`message/usermessage/getUserMsg`, data);
} }
function clearOneMessage(parm) { function clearOneMessage(parm) {
return fly.post(`message/intelligentMessage/msg/clearOne/?msgId=${parm.msgId}`); return fly.post(`message/intelligentMessage/msg/clearOne/?msgId=${parm.msgId}`);
@ -483,3 +484,7 @@ function hotHouseSearch() {
function carInfoSave(data) { function carInfoSave(data) {
return fly.post(`epmetuser/carInfo/save`,data); return fly.post(`epmetuser/carInfo/save`,data);
} }
//数据-数据概览
function statisticEventInfo(parm) {
return fly.get(`governance/icEventSpecialSubject/statisticEventInfo`, parm);
}

Loading…
Cancel
Save