小程序

This commit is contained in:
du 2024-06-04 14:45:44 +08:00
parent ceb48961c9
commit 1ff800d718
99 changed files with 7199 additions and 621 deletions

25
app.js
View File

@ -50,22 +50,27 @@ App({
globalData: {
versionCode: 'V1',
userInfo: {},
// headerUrl: "http://42.193.40.239:8017/"
headerUrl: "http://192.168.110.10:8017/"
// headerUrl: "http://192.168.110.186:8017/"
// headerUrl: "http://42.193.40.239:8017/" //线上
// headerUrl: "http://192.168.110.10:8017/" //线下
headerUrl: "https://city.sczysoft.com/df/"
},
// 文件服务器地址
// FILE_SERVER_URL: "http://192.168.110.186", //查看
FILE_SERVER_URL: "http://42.193.40.239:8888", //查看
FILE_SERVER_UP_URL: "http://42.193.40.239:8017/", //上传
// https://city.sczysoft.com/df/doc.html //接口
// https://city.sczysoft.com/dffile //查看拼接
publicService:'656693c8-bd84-11ee-8332-525400286c11',//为民服务id
// 测试地址
// FILE_SERVER_URL: "http://42.193.40.239:8888", //查看
// FILE_SERVER_UP_URL: "http://42.193.40.239:8017/", //上传
// 线上地址
FILE_SERVER_URL: "https://city.sczysoft.com/dffile", //查看
FILE_SERVER_UP_URL: "https://city.sczysoft.com/df/", //上传
// 文件类型
FileType: {
avatar: "SysPhoto", // 用户头像
resumptionAcs: "WorkFile", // 履职附件
msgAcs: "MsgAcs", // 消息附件
eventAcs: "eventAcs", //突发事件上报
eventAcs: "eventAcs", //突发/应急事件上报
userSign: "UserSign", //用户签名
@ -91,7 +96,7 @@ App({
data: data,
header: {
'content-type': 'application/json;charset=UTF-8',
'userToken': this.globalData.userInfo.userToken || ""
'userToken': this.globalData.userInfo.tokenValue || ""
},
success: function (res) {
var data = res.data

View File

@ -21,7 +21,19 @@
"pages/emergency/s-b/index/index",
"pages/emergency/t-x/index/index",
"pages/work/d-b-s-x/up/index",
"pages/the-masses/index/index"
"pages/the-masses/index/index",
"pages/the-masses/appeal/index",
"pages/the-masses/web/index",
"pages/the-masses/escalation/index",
"pages/party-member/index/index",
"pages/party-member/problem/index",
"pages/party-member/web/index",
"pages/party-member/serve/index",
"pages/party-member/internalIndex/index",
"pages/emergency/s-b/escalation/index",
"pages/agreement/index",
"pages/emergency/t-x-l/index/index",
"pages/statistic/j-b-x-x/detail/index"
],
"window": {
"backgroundTextStyle": "light",
@ -35,6 +47,7 @@
"empty": "/components/empty/empty",
"title-bar": "/components/title-bar/index"
},
"requiredPrivateInfos": ["getLocation","chooseLocation"],
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于记录检查佐证"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 987 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1012 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 KiB

After

Width:  |  Height:  |  Size: 56 KiB

BIN
images/home/icon_w_4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
images/theMasses/fuwu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
images/theMasses/title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -77,7 +77,9 @@ Page({
*/
deal: function (params) {
wx.navigateTo({
url: `/pages/web/index?title=用户协议和隐私协议`,
// url: `/pages/web/index?title=用户协议和隐私协议`,
url: `/pages/agreement/index`,
})
},
/**

105
pages/agreement/index.js Normal file
View File

@ -0,0 +1,105 @@
// pages/agreement/index.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
topBarH: app.globalData.CustomBar,
url: '',
title: '',
currentIndex: 0,
tabs: [{
lab: '用户协议'
}, {
lab: '隐私协议'
}],
dealContent:'',
},
/**
* 选择菜单
*/
tabSelect: function (params) {
this.data.currentIndex = params.currentTarget.dataset.index;
console.log(this.data.currentIndex,'this.data.currentIndex==>');
this.setData(this.data);
this.getDetail();
},
/**
* 获取消息详情
*/
getDetail: function () {
let dealKeyWord = '';
if (this.data.currentIndex == 1) {
dealKeyWord = 'privacy_deal';
}else{
dealKeyWord = 'user_deal';
}
app.axios("GET", "app", `/sysKey/dealSetting/${dealKeyWord}`, {}, false).then(res => {
console.log(res,'res===>');
if (res.code == 1) {
this.data.dealContent = res.data.dealContent;
this.setData(this.data)
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getDetail()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationStyle": "custom"
}

View File

@ -0,0 +1,14 @@
<!--pages/agreement/index.wxml-->
<title-bar title="用户协议和隐私协议"></title-bar>
<!-- tab菜单 -->
<scroll-view scroll-x class="bg-white nav">
<view class="flex text-center">
<view class="cu-item flex-sub {{index==currentIndex?'text-blue cur':''}}" wx:for="{{tabs}}" wx:key catchtap="tabSelect" data-index="{{index}}">
{{item.lab}}
</view>
</view>
</scroll-view>
<scroll-view>
<rich-text nodes="{{dealContent}}" />
</scroll-view>

130
pages/agreement/index.wxss Normal file
View File

@ -0,0 +1,130 @@
scroll-view {
background-color: #f5f5f5;
}
.rich-text{
min-height: 100%;
}
.picker {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
background-color: white;
border-top: 1rpx solid #f5f5f5;
height: 80rpx;
font-size: 30rpx;
}
.cu-item {
font-size: 30rpx;
font-weight: bold;
}
.item {
background-color: #ffffff;
padding: 32rpx 20rpx 20rpx 20rpx;
box-shadow: 0px 0px 6px 1px #DDECF3;
margin: 16rpx 16rpx 0 16rpx;
position: relative;
border-radius: 10rpx;
z-index: 2;
}
.item .g-container {
flex: 1;
height: 16rpx;
border-radius: 50rpx;
background: #eee;
margin: 20rpx 0;
overflow: hidden;
}
.item .g-progress {
width: 50%;
height: inherit;
border-radius: 50rpx;
}
.item .content {
font-size: 32rpx;
margin-right: 30rpx;
}
.item .content .time::before {
display: inline-block;
content: '';
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
border-radius: 50%;
background-color: var(--blue);
}
.item .content .title {
display: flex;
align-items: center;
}
.item .content .des {
margin: 10rpx 0;
}
.item .content .time {
font-size: 26rpx;
}
.item .content .title::before {
display: inline-block;
content: '';
width: 10rpx;
height: 30rpx;
margin-right: 10rpx;
border-radius: 5rpx;
background-color: var(--blue);
}
.item .content .des {
font-size: 30rpx;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.item .val {
font-size: 26rpx;
color: #222222;
margin-left: 16rpx;
}
.item .add {
color: var(--blue);
margin-left: 15rpx;
font-size: 30rpx;
margin-left: 20rpx;
}
.item .add .add-tv {
margin-left: 10rpx;
}
.item .line {
margin: 10rpx 0;
border-bottom: 1rpx dashed #f5f5f5;
}
.item .record {
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
color: var(--blue);
}
.item .more {
position: absolute;
right: 10rpx;
}

View File

@ -0,0 +1,611 @@
// 上报动态
import Utils from "../../../../utils/util"
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
topBarH: app.globalData.CustomBar,
baseUrl: app.FILE_SERVER_URL,
dateFilter: Utils.formatTime(new Date(), '-'),
showTypePop: false,
showAdvicePop: false,
TypeData: [],
postData: {},
files: [],
userInfo:{},
areamultiArray:[],
areamultiIndex: [0, 0, 0],
areamultiIds: [],
areanewArr: [],
area:[],
areatate : false,
multiArray: [],
multiIndex: [0, 0, 0],
multiIds: [],
newArr: [],
organization:[],
organizationtate : false,
},
/**
* 显示/关闭弹窗
*/
popModal: function (params) {
const type = params.currentTarget.dataset.type;
this.data[type] = !this.data[type];
this.setData(this.data)
},
/**
* 事件类型
*/
typeChange: function (params) {
const index = params.currentTarget.dataset.index;
console.log(params,'params===>');
this.data.postData.emerTypeId = params.currentTarget.dataset.item.emerTypeId;
this.data.postData.type = index + 1;
this.data.showTypePop = false;
this.setData(this.data);
},
/**
* 输入框赋值
*/
inputContent: function (e) {
const name = e.currentTarget.dataset.name;
this.data.postData[name] = e.detail.value;
this.setData(this.data);
},
/**
* 发布
*/
push: function () {
if (!this.data.postData.title) {
wx.showToast({
title: '请输入标题',
icon: 'none'
})
return
}
if (!this.data.postData.createTime) {
wx.showToast({
title: '请选择时间',
icon: 'none'
})
return
}
if (!this.data.postData.emerTypeId) {
wx.showToast({
title: '请选择事件类型',
icon: 'none'
})
return
}
if (this.data.organizationtate==false) {
wx.showToast({
title: '请选择所属组织',
icon: 'none'
})
return
}
if (this.data.areatate==false) {
wx.showToast({
title: '请选择地区',
icon: 'none'
})
return
}
if (!this.data.postData.addressName) {
wx.showToast({
title: '请选择详细地址',
icon: 'none'
})
return
}
if (!this.data.postData.content) {
wx.showToast({
title: '请输入事件描述',
icon: 'none'
})
return
}
let data = {
...this.data.postData,
emerEventId:this.data.uuid,
userId:this.data.userInfo.userId,
address:this.data.postData.addressName,
};
data.listPerformId = this.data.organization?this.data.multiArray[0].children[0].children[this.data.organization[2]].listperformid:'';
data.areaCode = this.data.areamultiArray[0].children[this.data.area[1]].orgcode?this.data.areamultiArray[0].children[this.data.area[1]].orgcode:'';
console.log(data,'data===>');
app.axios("POST", "app", `/emerEvent/saveEmerEvent`,data).then(res => {
console.log(res,'res===>');
if (res.code == 1) {
wx.showToast({
title: '发布成功',
icon: 'none'
})
setTimeout(() => {
wx.navigateBack()
}, 1500);
} else {
wx.showToast({
title: res.message,
icon: 'none'
})
}
})
},
getweidu:function (params) {
wx.getLocation({
type: 'gcj02', //返回可以用于wx.openLocation的经纬度
success (res) {
const latitude = res.latitude
const longitude = res.longitude
wx.openLocation({
latitude,
longitude,
scale: 18
})
}
})
},
/**
* 选择文件
*/
chooseFile: function () {
wx.chooseImage({
count: 1,
type: 'all',
success: (res) => {
const tempFilePaths = res.tempFiles;
const path = tempFilePaths[0].path;
this.postImg(path)
}
})
},
/**
* 上传图片
*/
postImg(filePath) {
wx.showLoading({
title: '文件上传中...',
})
app.uploadFile(this.data.uuid, app.FileType.eventAcs, filePath).then(res => {
let resdata = JSON.parse(res);
console.log(resdata,'resdata===>');
// if (resdata.code == 1) {
console.log(resdata,'res==>');
wx.hideLoading();
this.getFiles();
// }
})
},
/**
* 获取图片
*/
getFiles: function () {
console.log(1111);
app.axios("GET", "common", "/upload/getFile", {
otcid: this.data.postData.emerEventId || this.data.uuid,
otctype: app.FileType.eventAcs
}).then(res => {
if (res.code == 1) {
console.log(res,'res===>');
this.data.files = res.data;
this.setData(this.data)
}
})
},
/**
* 删除图片
* @param {*} params
*/
deleteFile: function (e) {
var id = e.currentTarget.dataset.id;
wx.showModal({
title: '删除提示',
content: '是否要删除该附件?',
success: (res) => {
if (res.confirm) {
app.axios("GET", 'common', "/upload/delFile", {
documentId: id,
}).then(res => {
if (res.code == 1) {
this.getFiles();
}
})
}
}
})
},
/**
* 预览文件
*/
filePre: function (params) {
const url = params.currentTarget.dataset.url;
const imgs = [];
this.data.files.forEach(item => {
imgs.push(this.data.baseUrl + item.filepath)
})
wx.previewImage({
urls: imgs,
current: this.data.baseUrl + url
})
},
/**
* 时间
*/
bindDateChange: function (params) {
this.data.postData.createTime = params.detail.value;
this.setData(this.data)
},
/**
* 选择位置
*/
// chooseAddress: function (params) {
// wx.chooseLocation({
// success: (res) => {
// this.data.postData.lat = res.latitude;
// this.data.postData.lng = res.longitude;
// this.data.postData.address = res.address;
// this.setData(this.data)
// }
// })
// },
/**
* 查询所有应急上报事件类型
*/
getEmerEventType: function () {
app.axios("GET", "app", "/emerEvent/emerEventType").then(res => {
if (res.code == 1) {
console.log(res);
this.data.TypeData = res.data;
this.setData(this.data);
}
})
},
/**
* 查看应急上报事件详情
*/
getEmerEventDetail: function (id) {
app.axios("GET", "app", `/emerEvent/emerEventDetail/${id}`).then(res => {
if (res.code == 1) {
this.data.postData = res.data;
this.data.postData.emerTypeName;
for (let index = 0; index < this.data.TypeData.length; index++) {
if (this.data.TypeData[index].emerTypeName == res.data.emerTypeName) {
this.data.postData.type = index+1;
}
};
this.setData(this.data);
this.getFiles();
}
})
},
// 地区获取
getAreaTree: function () {
app.axios("GET", "common", "/sysorg/areaTree").then(res => {
if (res.code == 1) {
console.log(res);
this.data.areamultiArray = res.data;
this.data.areamultiArray[0].children.forEach(item => {
item.children = []
});
this.setData(this.data);
let state = {
arr: [],
arr1: [],
arr2: [],
arr3: [],
areamultiIds: []
}
this.data.areamultiArray.map((v, vk) => {
state.arr1.push(v.orgname);
if (this.data.areamultiIndex[0] === vk) {
state.areamultiIds[0] = v;
}
if (state.arr2.length <= 0) {
v.children.map((c, ck) => {
state.arr2.push(c.orgname);
if (this.data.areamultiIndex[1] === ck) {
state.areamultiIds[1] = c;
}
if (state.arr3.length <= 0) {
c.children.map((t, tk) => {
state.arr3.push(t.orgname);
if (this.data.areamultiIndex[2] === tk) {
state.areamultiIds[2] = t;
}
});
}
});
}
});
state.arr[0] = state.arr1;
state.arr[1] = state.arr2;
state.arr[2] = state.arr3;
this.setData({
areanewArr: state.arr,
areamultiIds: state.areamultiIds,
});
}
})
},
// 级联选择地区
areabindMultiPickerChange(e) {
console.log(this.data.areamultiIds,'级联选择地区==>');
this.setData({
area: e.detail.value,
areatate:true
});
},
areabindMultiPickerColumnChange(e) {
let data = {
areanewArr: this.data.areanewArr,
areamultiIndex: this.data.areamultiIndex,
areamultiIds: this.data.areamultiIds,
};
data.areamultiIndex[e.detail.column] = e.detail.value;
let searchColumn = () => {
let arr1 = [];
let arr2 = [];
this.data.areamultiArray.map((v, vk) => {
if (data.areamultiIndex[0] === vk) {
data.areamultiIds[0] = {
...v,
};
v.children.map((c, ck) => {
arr1.push(c.orgname);
if (data.areamultiIndex[1] === ck) {
data.areamultiIds[1] = {
...c,
};
c.children.map((t, vt) => {
arr2.push(t.orgname);
if (data.areamultiIndex[2] === vt) {
data.areamultiIds[2] = {
...t,
};
}
});
}
});
}
});
data.areanewArr[1] = arr1;
data.areanewArr[2] = arr2;
};
switch (e.detail.column) {
case 0:
// 每次切换还原初始值
data.areamultiIndex[1] = 0;
data.areamultiIndex[2] = 0;
// 执行函数处理
searchColumn();
break;
case 1:
data.areamultiIndex[2] = 0;
searchColumn();
break;
}
this.setData(data);
},
// 所属组织获取
getAreaTree1: function () {
app.axios("GET", "app", "/Sys/getListperformTree").then(res => {
if (res.code == 1) {
console.log(res);
this.data.multiArray = res.data
this.setData(this.data);
let state = {
arr: [],
arr1: [],
arr2: [],
arr3: [],
multiIds: []
}
this.data.multiArray.map((v, vk) => {
state.arr1.push(v.performclassname);
if (this.data.multiIndex[0] === vk) {
state.multiIds[0] = v;
}
if (state.arr2.length <= 0) {
v.children.map((c, ck) => {
state.arr2.push(c.performclassname);
if (this.data.multiIndex[1] === ck) {
state.multiIds[1] = c;
}
if (state.arr3.length <= 0) {
c.children.map((t, tk) => {
state.arr3.push(t.performclassname);
if (this.data.multiIndex[2] === tk) {
state.multiIds[2] = t;
}
});
}
});
}
});
state.arr[0] = state.arr1;
state.arr[1] = state.arr2;
state.arr[2] = state.arr3;
this.setData({
newArr: state.arr,
multiIds: state.multiIds,
});
}
})
},
bindMultiPickerChange(e) {
console.log(e,'e==>');
this.setData({
organization: e.detail.value,
organizationtate:true
});
console.log(this.data.organization,'e==>');
console.log(this.data.multiIds);
},
bindMultiPickerColumnChange(e) {
let data = {
newArr: this.data.newArr,
multiIndex: this.data.multiIndex,
multiIds: this.data.multiIds,
};
data.multiIndex[e.detail.column] = e.detail.value;
let searchColumn = () => {
let arr1 = [];
let arr2 = [];
this.data.multiArray.map((v, vk) => {
if (data.multiIndex[0] === vk) {
data.multiIds[0] = {
...v,
};
v.children.map((c, ck) => {
arr1.push(c.performclassname);
if (data.multiIndex[1] === ck) {
data.multiIds[1] = {
...c,
};
c.children.map((t, vt) => {
arr2.push(t.performclassname);
if (data.multiIndex[2] === vt) {
data.multiIds[2] = {
...t,
};
}
});
}
});
}
});
data.newArr[1] = arr1;
data.newArr[2] = arr2;
};
switch (e.detail.column) {
case 0:
// 每次切换还原初始值
data.multiIndex[1] = 0;
data.multiIndex[2] = 0;
// 执行函数处理
searchColumn();
break;
case 1:
data.multiIndex[2] = 0;
searchColumn();
break;
}
this.setData(data);
},
//地点选择/经纬度
toShowAddress() {
let that = this;
wx.chooseLocation({
success(res) {
that.data.postData.lat = res.latitude;
that.data.postData.lon = res.longitude;
that.data.postData.addressName = res.name;
that.setData(that.data);
},
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.data.uuid = Utils.uuid();
this.data.userInfo = app.globalData.userInfo;
this.setData(this.data);
this.getEmerEventType();
this.getAreaTree();
this.getAreaTree1();
if (options.emerEventId) {
console.log(options.emerEventId,'options.emerEventId===>');
this.getEmerEventDetail(options.emerEventId)
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,6 @@
{
"usingComponents": {
"tree": "/components/tree/index"
},
"navigationStyle": "custom"
}

View File

@ -0,0 +1,111 @@
<!--pages/msg/push/index.wxml-->
<title-bar title="应急上报"></title-bar>
<scroll-view scroll-y refresher-enabled style="height: calc(100vh - {{topBarH}}px);">
<view class="item">
<!-- 标题 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">标题</text>
</view>
<input bindinput="inputContent" data-name="title" class="put v-div h-center" placeholder="请输入标题" value="{{postData.title}}"></input>
<!-- 时间 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">事发时间</text>
</view>
<picker mode="date" value="{{postData.createTime}}" bindchange="bindDateChange">
<input disabled class="put v-div h-center" placeholder="请选择" value="{{postData.createTime}}"></input>
</picker>
<!-- 地点 -->
<!-- <view class="h-div v-center header">
<text class="single"></text>
<text class="title">事发地点</text>
</view>
<input catchtap="chooseAddress" class="put v-div h-center" disabled placeholder="请输入" value="{{postData.address}}"></input> -->
<!-- 类型 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">事件类型</text>
</view>
<input catchtap="popModal" data-type="showTypePop" disabled class="put v-div h-center" placeholder="请选择" value="{{TypeData[postData.type-1].emerTypeName}}"></input>
<!-- 地区 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">地区</text>
</view>
<picker mode="multiSelector" bindchange="areabindMultiPickerChange" bindcolumnchange="areabindMultiPickerColumnChange"
value="{{areamultiIndex}}" range="{{areanewArr}}">
<view class="picker picker1">
<!-- 当前选择: <van-button type="primary">
{{areanewArr[0][areamultiIndex[0]]}}{{areanewArr[1][areamultiIndex[1]]}}{{areanewArr[2][areamultiIndex[2]]}}</van-button> -->
<view>当前选择:{{areamultiArray[0].children[area[1]].orgname}}</view>
</view>
</picker>
<!-- 所属组织 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">所属组织</text>
</view>
<picker mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange"
value="{{multiIndex}}" range="{{newArr}}">
<view class="picker picker1">
<!-- 当前选择: <van-button type="primary">
{{newArr[0][multiIndex[0]]}}{{newArr[1][multiIndex[1]]}}{{newArr[2][multiIndex[2]]}}</van-button> -->
<view>当前选择:{{multiArray[0].children[0].children[organization[2]].performclassname}}</view>
</view>
</picker>
<!-- 详细地址 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">详细地址</text>
</view>
<view catchtap="toShowAddress" class="picker1">
地址:{{postData.addressName}}
</view>
<!-- 内容 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">事件描述</text>
</view>
<textarea bindinput="inputContent" data-name="content" value="{{postData.content}}" style="color: #333333;" class="put v-div" placeholder="请输入工作内容"></textarea>
<!-- 附件 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title flex">附件</text>
<text catchtap="chooseFile" class="title cuIcon-roundadd" style="font-weight: normal;color: #5DA6F4;">添加图片</text>
</view>
<view class="grid">
<view class="img" wx:for="{{files}}" style="position: relative;">
<text wx:if="{{!postData.emerEventId}}" catchtap="deleteFile" data-id="{{item.sysdocumentid}}" class="cuIcon-delete del" style="color:red;"></text>
<image class="img" src="{{baseUrl+item.filepath}}" catchtap="filePre" data-url="{{item.filepath}}" />
</view>
</view>
</view>
<view class="space"></view>
</scroll-view>
<view class="option" wx:if="{{!postData.emerEventId}}">
<view catchtap="push" class="btn">上报</view>
</view>
<!-- 选择通知类型 -->
<view class="cu-modal {{showTypePop?'show':''}}">
<view class="cu-dialog pop" catchtap>
<view class="cu-bar justify-end pop-header">
<view class="content">选择工作类型</view>
<view class="action" catchtap="popModal" data-type="showTypePop">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<radio-group class="block" style="max-height: 50vh;overflow-y: scroll;">
<view class="cu-list menu text-left">
<view class="cu-item" wx:for="{{TypeData}}" wx:key>
<label catchtap="typeChange" data-item="{{item}}" data-index="{{index}}" class="flex justify-between align-center flex-sub">
<view class="flex-sub">{{item.emerTypeName}}</view>
</label>
</view>
</view>
</radio-group>
</view>
</view>

View File

@ -0,0 +1,123 @@
/* pages/msg/push/index.wxss */
scroll-view {
background-color: #f5f5f5;
box-sizing: border-box;
}
.filter {
margin: 0 10rpx;
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
}
.filter picker {
flex: 1;
height: 100%;
display: flex;
align-items: center;
}
.item {
background-color: #ffffff;
margin: 32rpx 20rpx 20rpx 20rpx;
padding: 20rpx;
position: relative;
border-radius: 10rpx;
z-index: 2;
}
.item .header {
margin-top: 16rpx;
}
.item .header .single {
width: 8rpx;
height: 36rpx;
background: #4882EE;
border-radius: 4rpx;
margin-right: 10rpx;
}
.item .header .title {
font-size: 30rpx;
font-weight: bold;
color: #222222;
}
.item .put {
width: 100%;
background: #F5F7FC;
border-radius: 12rpx;
min-height: 72rpx;
padding: 15rpx;
margin-top: 16rpx;
color: #333333;
font-size: 28rpx;
}
.grid {
margin-top: 20rpx;
display: grid;
grid-gap: 20rpx 20rpx;
grid-template-columns: calc((100vw - 140rpx)/3) auto auto;
}
.grid .img {
width: calc((100vw - 140rpx)/3);
height: calc((100vw - 140rpx)/3);
background-color: #f5f5f5;
border-radius: 10rpx;
}
.grid .del {
position: absolute;
bottom: 0;
left: 0;
z-index: 1;
font-size: 40rpx;
}
.option {
position: fixed;
bottom: calc(constant(safe-area-inset-bottom) + 30rpx);
bottom: calc(env(safe-area-inset-bottom) + 30rpx);
left: 0;
right: 0;
margin-top: 30rpx;
padding: 16rpx 32rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 12rpx 2rpx #DDECF3;
z-index: 10;
}
.option .btn {
padding: 14rpx;
display: flex;
align-items: center;
justify-content: center;
background: #409CFF;
color: #FFFFFF;
border-radius: 12rpx;
}
.option .btn:active {
opacity: 0.8;
}
.space {
height: calc(constant(safe-area-inset-bottom) + 150rpx);
height: calc(env(safe-area-inset-bottom) + 150rpx);
}
.picker1{
width: 100%;
background: #F5F7FC;
border-radius: 12rpx;
min-height: 72rpx;
padding: 15rpx;
margin-top: 16rpx;
color: #333333;
font-size: 28rpx;
}

View File

@ -1,5 +1,3 @@
// 上报动态
import Utils from "../../../../utils/util"
const app = getApp();
Page({
@ -9,149 +7,87 @@ Page({
*/
data: {
topBarH: app.globalData.CustomBar,
baseUrl: app.FILE_SERVER_URL,
dateFilter: Utils.formatTime(new Date(), '-'),
showTypePop: false,
showAdvicePop: false,
TypeData: ['火灾', '洪涝', '民事纠纷'],
postData: {},
files: []
list: [],
startTime: '',
endTime: '',
page: 1,
pageSize: 10,
userInfo:{}
},
/**
* 显示/关闭弹窗
* 开始时间
*/
popModal: function (params) {
const type = params.currentTarget.dataset.type;
this.data[type] = !this.data[type];
this.setData(this.data)
startTimeChange: function (e) {
this.data.startTime = e.detail.value;
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList();
},
/**
* 事件类型
* 开始时间
*/
typeChange: function (params) {
const index = params.currentTarget.dataset.index;
this.data.postData.type = index + 1;
this.data.showTypePop = false;
this.setData(this.data)
endTimeChange: function (e) {
this.data.endTime = e.detail.value;
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList();
},
/**
* 事件描述
* 上拉刷新
*/
inputContent: function (e) {
this.data.postData.content = e.detail.value;
refresh: function () {
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList();
},
/**
* 发布
* 下拉加载
*/
dropDown: function (params) {
this.data.page = this.data.page+1;
this.setData(this.data);
this.getList();
},
/**
* 上报困难诉求
*/
push: function (params) {
},
/**
* 选择文件
*/
chooseFile: function () {
wx.chooseImage({
count: 1,
type: 'all',
success: (res) => {
const tempFilePaths = res.tempFiles;
const path = tempFilePaths[0].path;
this.postImg(path)
}
wx.navigateTo({
url: `/pages/emergency/s-b/escalation/index`,
})
},
/**
* 上传图片
* 获取工困难诉求列表
*/
postImg(filePath) {
wx.showLoading({
title: '文件上传中...',
})
app.uploadFile(this.data.uuid, app.FileType.eventAcs, filePath).then(res => {
wx.hideLoading();
this.getFiles();
})
},
/**
* 获取图片
*/
getFiles: function () {
app.axios("GET", "common", "/upload/getFile", {
otcid: this.data.uuid,
otctype: app.FileType.eventAcs
}).then(res => {
getList: function () {
let params = {
limit:this.data.pageSize,
page:this.data.page,
endTime:this.data.endTime,
startTime:this.data.startTime,
userId:this.data.userInfo.userId,
};
app.axios("GET", "app", `/emerEvent/userEmerEventPage`, params).then(res => {
console.log(res);
if (res.code == 1) {
this.data.files = res.data;
this.setData(this.data)
this.data.freshIng = false;
this.data.list = [...this.data.list,...res.data.list];
this.setData(this.data);
}
})
},
/**
* 删除图片
* @param {*} params
* 查看详情
*/
deleteFile: function (e) {
var id = e.currentTarget.dataset.id;
wx.showModal({
title: '删除提示',
content: '是否要删除该附件?',
success: (res) => {
if (res.confirm) {
app.axios("GET", 'common', "/upload/delFile", {
documentId: id,
}).then(res => {
if (res.code == 1) {
this.getFiles();
}
})
}
}
})
},
/**
* 预览文件
*/
filePre: function (params) {
const url = params.currentTarget.dataset.url;
const imgs = [];
this.data.files.forEach(item => {
imgs.push(this.data.baseUrl + item.filepath)
})
wx.previewImage({
urls: imgs,
current: this.data.baseUrl + url
})
},
/**
* 时间
*/
bindDateChange: function (params) {
this.data.postData.time = params.detail.value;
this.setData(this.data)
},
/**
* 选择位置
*/
chooseAddress: function (params) {
wx.chooseLocation({
success: (res) => {
this.data.postData.lat = res.latitude;
this.data.postData.lng = res.longitude;
this.data.postData.address = res.address;
this.setData(this.data)
}
toDetail: function (params) {
wx.navigateTo({
url: `/pages/emergency/s-b/escalation/index?emerEventId=${params.currentTarget.dataset.item.emerEventId}`,
})
},
@ -159,8 +95,10 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.data.uuid = Utils.uuid();
this.setData(this.data)
this.data.freshIng = true;
this.data.userInfo = app.globalData.userInfo;
this.setData(this.data);
this.getList();
},
/**
@ -201,7 +139,7 @@ Page({
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
onReachBottom(data) {
},
@ -211,4 +149,14 @@ Page({
onShareAppMessage() {
}
})
})

View File

@ -1,6 +1,4 @@
{
"usingComponents": {
"tree": "/components/tree/index"
},
"usingComponents": {},
"navigationStyle": "custom"
}

View File

@ -1,69 +1,32 @@
<!--pages/msg/push/index.wxml-->
<title-bar title="指挥体系"></title-bar>
<scroll-view scroll-y refresher-enabled style="height: calc(100vh - {{topBarH}}px);">
<view class="item">
<!-- 时间 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">事发时间</text>
<!--pages/emergency/s-b/index1/index.wxml-->
<title-bar title="应急事件"></title-bar>
<scroll-view scroll-y style="height: calc(100vh - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="dropDown" refresher-triggered="{{freshIng}}">
<view class="content">
<view class="filter">
<picker mode="date" value="{{startTime}}" bindchange="startTimeChange">
<view class="picker">
开始时间: {{startTime}}
</view>
</picker>
<view class="line"></view>
<picker mode="date" value="{{endTime}}" bindchange="endTimeChange">
<view class="picker">
结束时间: {{endTime}}
</view>
</picker>
</view>
<picker mode="date" value="{{postData.time}}" bindchange="bindDateChange">
<input disabled class="put v-div h-center" placeholder="请选择" value="{{postData.time}}"></input>
</picker>
<!-- 类型 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">事发地点</text>
</view>
<input catchtap="chooseAddress" class="put v-div h-center" disabled placeholder="请输入" value="{{postData.address}}"></input>
<!-- 类型 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">事件类型</text>
</view>
<input catchtap="popModal" data-type="showTypePop" disabled class="put v-div h-center" placeholder="请选择" value="{{TypeData[postData.type-1]}}"></input>
<!-- 内容 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">事件描述</text>
</view>
<textarea bindinput="inputContent" value="{{postData.content}}" style="color: #333333;" class="put v-div" placeholder="请输入工作内容"></textarea>
<!-- 附件 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title flex">附件</text>
<text catchtap="chooseFile" class="title cuIcon-roundadd" style="font-weight: normal;color: #5DA6F4;">添加图片</text>
</view>
<view class="grid">
<view class="img" wx:for="{{files}}" style="position: relative;">
<text catchtap="deleteFile" data-id="{{item.sysdocumentid}}" class="cuIcon-delete del" style="color:red;"></text>
<image class="img" src="{{baseUrl+item.filepath}}" catchtap="filePre" data-url="{{item.filepath}}" />
<!-- 列表 -->
<view catchtap="toDetail" data-item="{{item}}" class="item h-div" wx:for="{{list}}">
<view class="content">
<view class="title">标题:{{item.title}}</view>
<view class="des">内容:{{item.content}}</view>
<view class="time">类型:{{item.emerTypeName}}</view>
<view class="time">时间:{{item.createTime}}</view>
</view>
</view>
<view class="space"></view>
</view>
<view class="space"></view>
</scroll-view>
<view class="option">
<view catchtap="push" class="btn">上报</view>
</view>
<!-- 选择通知类型 -->
<view class="cu-modal {{showTypePop?'show':''}}">
<view class="cu-dialog pop" catchtap>
<view class="cu-bar justify-end pop-header">
<view class="content">选择工作类型</view>
<view class="action" catchtap="popModal" data-type="showTypePop">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<radio-group class="block" style="max-height: 50vh;overflow-y: scroll;">
<view class="cu-list menu text-left">
<view class="cu-item" wx:for="{{TypeData}}" wx:key>
<label catchtap="typeChange" data-index="{{index}}" class="flex justify-between align-center flex-sub">
<view class="flex-sub">{{item}}</view>
</label>
</view>
</view>
</radio-group>
</view>
<view catchtap="push" class="btn">应急上报</view>
</view>

View File

@ -1,83 +1,145 @@
/* pages/msg/push/index.wxss */
scroll-view {
background-color: #f5f5f5;
box-sizing: border-box;
.content {
display: flex;
flex-direction: column;
}
.filter {
.content .filter {
margin: 0 10rpx;
width: calc(100vw - 20rpx);
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
align-items: center;
}
.filter picker {
.content .filter picker {
flex: 1;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
}
.content .item {
background-color: #ffffff;
padding: 32rpx 20rpx 20rpx 20rpx;
box-shadow: 0px 0px 6px 1px #DDECF3;
margin: 16rpx 16rpx 0 16rpx;
border-radius: 10rpx;
}
.content .item .val::before {
display: inline-block;
content: '';
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
border-radius: 50%;
background-color: var(--blue);
}
.content .item .val {
font-size: 30rpx;
color: #222222;
margin-left: 16rpx;
padding: 10rpx 0;
}
.item .content {
font-size: 32rpx;
margin-right: 30rpx;
}
.item .content .time::before {
display: inline-block;
content: '';
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
border-radius: 50%;
background-color: var(--blue);
}
.item .content .title {
display: flex;
align-items: center;
}
.item {
background-color: #ffffff;
margin: 32rpx 20rpx 20rpx 20rpx;
padding: 20rpx;
position: relative;
border-radius: 10rpx;
z-index: 2;
.item .content .des {
margin: 10rpx 0;
}
.item .header {
margin-top: 16rpx;
.item .content .time {
font-size: 26rpx;
}
.item .header .single {
width: 8rpx;
height: 36rpx;
background: #4882EE;
border-radius: 4rpx;
.item .content .title::before {
display: inline-block;
content: '';
width: 10rpx;
height: 30rpx;
margin-right: 10rpx;
border-radius: 5rpx;
background-color: var(--blue);
}
.item .header .title {
.item .content .des {
font-size: 30rpx;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.item .val {
font-size: 26rpx;
color: #222222;
margin-left: 16rpx;
}
.item .add {
color: var(--blue);
margin-left: 15rpx;
font-size: 30rpx;
margin-left: 20rpx;
}
.item .add .add-tv {
margin-left: 10rpx;
}
.item .line {
margin: 10rpx 0;
border-bottom: 1rpx dashed #f5f5f5;
}
.item .record {
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
color: var(--blue);
}
.item .more {
position: absolute;
right: 10rpx;
}
.line {
width: 1rpx;
height: 80%;
background-color: #f5f5f5;
}
.cu-item {
font-size: 30rpx;
font-weight: bold;
color: #222222;
}
.item .put {
width: 100%;
background: #F5F7FC;
border-radius: 12rpx;
min-height: 72rpx;
padding: 15rpx;
margin-top: 16rpx;
color: #333333;
font-size: 28rpx;
}
.grid {
margin-top: 20rpx;
display: grid;
grid-gap: 20rpx 20rpx;
grid-template-columns: calc((100vw - 140rpx)/3) auto auto;
}
.grid .img {
width: calc((100vw - 140rpx)/3);
height: calc((100vw - 140rpx)/3);
background-color: #f5f5f5;
border-radius: 10rpx;
}
.grid .del {
position: absolute;
bottom: 0;
left: 0;
z-index: 1;
font-size: 40rpx;
}
.option {
@ -105,9 +167,4 @@ scroll-view {
.option .btn:active {
opacity: 0.8;
}
.space {
height: calc(constant(safe-area-inset-bottom) + 150rpx);
height: calc(env(safe-area-inset-bottom) + 150rpx);
}

View File

@ -0,0 +1,83 @@
// pages/emergency/resourse/index/index.js
const app = getApp();
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
condition: '',
canChange: false,
freshIng: false,
latlng: {},
page: 1,
pageSize: 10,
list: []
},
pageLifetimes: {
show: function () {
this.getList();
},
},
/**
* 组件的方法列表
*/
methods: {
/**
* 搜索
*/
inputSearch: function (e) {
this.data.condition = e.detail.value;
this.refresh();
},
/**
* 刷新
* @param {*} params
*/
refresh: function (params) {
this.data.page = 1;
this.data.list = [];
this.setData(this.data)
this.getList();
},
/**
* 获取应急通讯录体系
*/
getList: function () {
const params = {
page: this.data.page,
limit: this.data.pageSize,
userId: app.globalData.userInfo.userId,
condition: this.data.condition
}
app.axios("GET", "app", "/Othexpert/performUserPage", params, false).then(res => {
console.log(res,'res===>');
this.data.freshIng = false;
if (res.code == 1) {
let page = Number.parseInt(res.data.pageNum);
if (this.data.page == 1) {
this.data.list = res.data.list;
} else {
var list = this.data.list;
if (this.data.page == page) this.data.list = [...list, ...res.data.list]
}
if (res.data.list?.length > 0) this.data.page = page + 1
}
this.setData(this.data);
})
},
}
})

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationStyle": "custom"
}

View File

@ -0,0 +1,37 @@
<!--pages/emergency/resourse/index/index.wxml-->
<title-bar title="指挥体系"></title-bar>
<!-- 搜索 -->
<view class="cu-bar search">
<view class="search-form round">
<text class="cuIcon-search"></text>
<input value="{{condition}}" bindinput="inputSearch" type="text" placeholder="请输入关键字" confirm-type="search"></input>
</view>
</view>
<scroll-view scroll-y style="height: calc(100vh - 170rpx - 100rpx)" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="getList" refresher-triggered="{{freshIng}}">
<!-- 列表 -->
<view class="item-bg" wx:for="{{list}}">
<view catchtap="toDetail" data-item="{{item}}" class="item">
<view class="h-div v-center">
<text class="lab">联系人:</text>
<text class="val flex">{{item.chinaname}}</text>
<text class="phone">{{item.mobiletel}}</text>
</view>
<view class="line"></view>
<view class="h-div v-center">
<text class="lab">部门名称:</text>
<text class="val flex">{{item.unitName}}</text>
</view>
<view class="line"></view>
<view class="h-div v-center">
<text class="lab">职务名称:</text>
<text class="val flex">{{item.performName}}</text>
</view>
<view class="line"></view>
<view class="h-div v-center">
<text class="lab">角色:</text>
<text class="val">{{item.roleName}}</text>
</view>
</view>
</view>
<view class="space"></view>
</scroll-view>

View File

@ -0,0 +1,129 @@
/* pages/emergency/resourse/index/index.wxss */
@import "../../../../colorui/main.wxss";
@import "../../../../colorui/icon.wxss";
page {
background-color: #f5f5f5;
}
.v-div {
display: flex;
display: -webkit-flex;
flex-direction: column;
}
.h-div {
display: flex;
display: -webkit-flex;
flex-direction: row;
}
.v-center {
align-items: center;
}
.h-center {
justify-content: center;
}
.flex {
flex: 1;
}
.space-between {
justify-content: space-between;
}
.cu-item {
font-size: 30rpx;
font-weight: bold;
}
.filter {
height: 60rpx;
margin-bottom: 10rpx;
min-width: 100%;
white-space: nowrap;
}
.filter .tag {
background: #CEDFFD;
border-radius: 46rpx;
padding: 2rpx 40rpx;
margin-left: 20rpx;
display: inline-block;
}
.filter .cur {
background: #FFFFFF;
border: 2rpx solid #417AFF;
}
.filter view {
width: fit-content;
}
.search {
background-color: #f5f5f5;
position: sticky;
top: 0;
z-index: 10;
}
.cu-bar .search-form {
background: #FFFFFF;
box-shadow: 0rpx 0rpx 12rpx 2rpx #DDECF3;
border-radius: 12rpx;
}
.item-bg {
padding: 0 20rpx;
/* background-color: #f5f5f5; */
}
.item {
background-color: #ffffff;
padding: 20rpx;
position: relative;
border-radius: 10rpx;
z-index: 2;
margin-bottom: 20rpx;
}
.item .lab {
font-size: 32rpx;
font-weight: bold;
color: #222222;
}
.item .val {
font-size: 32rpx;
color: #222222;
}
.item .age {
font-size: 32rpx;
margin-left: 30rpx;
}
.item .phone {
font-size: 32rpx;
color: var(--blue);
}
.item .guide {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
.item .line {
margin: 20rpx -20rpx;
border-top: 2rpx dashed #f5f5f5;
}
.space {
height: calc(constant(safe-area-inset-bottom) + 30rpx);
height: calc(env(safe-area-inset-bottom) + 30rpx);
}

View File

@ -85,7 +85,8 @@ Component({
toGuid: function (params) {
const item = params.currentTarget.dataset.item;
if (!item.latitude || !item.longitude) {
console.log(item,'item===>');
if (!item.lat || !item.lon) {
wx.showToast({
title: '未采集位置',
icon: 'none',
@ -94,8 +95,8 @@ Component({
return
}
wx.openLocation({
latitude: item.latitude,
longitude: item.longitude,
latitude: item.lat,
longitude: item.lon,
scale: 18,
});
},
@ -114,6 +115,7 @@ Component({
app.axios("GET", "app", "/Othteam/getOthteamPage", params, false).then(res => {
this.data.freshIng = false;
if (res.code == 1) {
let page = Number.parseInt(res.data.pageNum);
if (this.data.page == 1) {
this.data.list = res.data.list;
@ -123,7 +125,8 @@ Component({
}
if (res.data.list?.length > 0) this.data.page = page + 1
}
this.setData(this.data)
this.setData(this.data);
console.log(this.data.list,'this.data.list===>');
})
},
}

View File

@ -71,8 +71,9 @@ Component({
const params = {
page: this.data.page,
limit: this.data.pageSize,
othtypeid: this.data.tabs[this.data.curTab].othtypeid,
planname: this.data.condition
othtypeid: this.data.tabs[this.data.curTab].emerTypeId,
planname: this.data.condition,
userId: app.globalData.userInfo.userId
}
app.axios("GET", "app", "/Othplan/getOthplanPage", params, false).then(res => {
this.data.freshIng = false;
@ -96,6 +97,7 @@ Component({
getType: function () {
app.axios("GET", "app", "/Othplan/getOthtypeList", {}, false).then(res => {
if (res.code == 1) {
console.log(res,'res==');
this.data.tabs = res.data;
this.setData(this.data)
}

View File

@ -3,7 +3,7 @@
<scroll-view scroll-y style="height: calc(100vh - 170rpx)" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="getList" refresher-triggered="{{freshIng}}">
<scroll-view scroll-x class="filter">
<view class="tag text-blue {{index==curTab?'cur':''}}" wx:for="{{tabs}}" wx:key catchtap="tabSelect" data-index="{{index}}">
{{item.othtypename}}
{{item.emerTypeName}}
</view>
</scroll-view>
<view class="cu-bar search">

View File

@ -99,6 +99,11 @@ Page({
name: "已办事项",
href: "/pages/work/d-b-s-x/index/index?id=1"
},
{
icon: "icon_w_4",
name: "有事找党员",
href: "/pages/party-member/index/index"
},
],
// 应急指挥
tab3: [{
@ -108,7 +113,7 @@ Page({
},
{
icon: "icon_yj_2",
name: "指挥体系",
name: "应急上报",
href: "/pages/emergency/s-b/index/index"
},
{
@ -116,6 +121,11 @@ Page({
name: "应急通讯录",
href: "/pages/emergency/t-x/index/index"
},
{
icon: "icon_yj_3",
name: "指挥体系",
href: "/pages/emergency/t-x-l/index/index"
},
],
// 公告

View File

@ -1,4 +1,5 @@
// pages/login/index.js
import utils from "../../utils/util.js"
const app = getApp();
Page({
@ -7,9 +8,19 @@ Page({
* 页面的初始数据
*/
data: {
username: 'admin',
password: 'Daofu123456',
// username: 'admin',
// password: 'Daofu123456',
username: '',
password: '',
showLogin: true,
newname:'',
newaccountNumber:'',
newphone:'',
newpassword:'',
address:'',
showTypePop: false,
postData:{},
TypeData: [],
},
/**
@ -67,6 +78,62 @@ Page({
})
}
},
// 注册
register: function (params) {
if (!this.data.newname) {
wx.showToast({
title: '请输入姓名',
icon: 'none'
})
return
}
if (!this.data.newaccountNumber) {
wx.showToast({
title: '请输入账号',
icon: 'none'
})
return
}
if (!this.data.newphone) {
wx.showToast({
title: '请输入手机号',
icon: 'none'
})
return
}
if (!this.data.newpassword) {
wx.showToast({
title: '请输入登陆密码',
icon: 'none'
})
return
}
if (!this.data.postData.orgcode) {
wx.showToast({
title: '请选择所属区域',
icon: 'none'
})
return
}
let paramss = {
areaCode: this.data.postData.orgcode,
chinaname: this.data.newname,
mobiletel: this.data.newphone,
syspassword: this.data.newpassword,
sysuserid: utils.uuid(),
sysusername: this.data.newaccountNumber,
}
app.axios("POST", "app", "/login/register", paramss).then(res => {
if (res.code == 1) {
this.data.showLogin = true;
this.setData(this.data);
wx.showToast({
title: '注册成功',
icon: 'none'
})
}
})
},
/**
* 实际登录
@ -80,10 +147,19 @@ Page({
key: 'userInfo',
data: res.data,
})
wx.reLaunch({
// url: '/pages/index/index',
url: '/pages/the-masses/index/index',
})
if (res.data.usertype == 1) {
wx.reLaunch({
url: '/pages/index/index',
})
}else if (res.data.usertype == 2) {
wx.reLaunch({
url: '/pages/party-member/internalIndex/index',
})
}else if (res.data.usertype == 3) {
wx.reLaunch({
url: '/pages/the-masses/index/index',
})
}
} else {
wx.showToast({
title: res.message,
@ -92,19 +168,38 @@ Page({
}
})
},
/**
* 绑定弹窗
/**
* 显示/关闭弹窗
*/
handlePop: function (params) {
this.data.showPop = !this.data.showPop;
this.setData(this.data);
if (app.globalData.userInfo.userId) {
wx.reLaunch({
// url: '/pages/index/index',
url: '/pages/the-masses/index/index',
})
}
popModal: function (params) {
const type = params.currentTarget.dataset.type;
this.data[type] = !this.data[type];
this.setData(this.data)
},
/**
* 获取社区
*/
getType: function () {
app.axios("GET", "common", "/sysorg/getFirstOrg", {
classify: 2
}).then(res => {
if (res.code == 1) {
console.log(res,'res===>');
this.data.TypeData = res.data;
this.setData(this.data)
}
})
},
/**
* 地址
*/
typeChange: function (params) {
console.log(params,'paramsparams===>');
const index = params.currentTarget.dataset.index;
this.data.postData.type = index + 1;
this.data.postData.orgcode = this.data.TypeData[index].orgcode;
this.data.showTypePop = false;
this.setData(this.data)
},
/**
@ -112,11 +207,21 @@ Page({
*/
onLoad(options) {
if (app.globalData.userInfo.userId) {
wx.reLaunch({
// url: '/pages/index/index',
url: '/pages/the-masses/index/index',
})
}
if (app.globalData.userInfo.usertype == 1) {
wx.reLaunch({
url: '/pages/index/index',
})
}else if (app.globalData.userInfo.usertype == 2) {
wx.reLaunch({
url: '/pages/party-member/internalIndex/index',
})
}else if (app.globalData.userInfo.usertype == 3) {
wx.reLaunch({
url: '/pages/the-masses/index/index',
})
}
};
this.getType();
},
/**

View File

@ -28,23 +28,48 @@
<text class="title">注册</text>
<view class="h-div v-center in-bg">
<text class="lab">姓名</text>
<input type="text" value="{{form.name}}" placeholder="请输入姓名" bindinput="inputMethed" data-type="name" />
<input type="text" value="{{newname}}" placeholder="请输入姓名" bindinput="inputMethed" data-type="newname" />
</view>
<view class="h-div v-center in-bg">
<text class="lab">账号</text>
<input type="text" value="{{newaccountNumber}}" placeholder="请输入账号" bindinput="inputMethed" data-type="newaccountNumber" />
</view>
<view class="h-div v-center in-bg">
<text class="lab">手机号码</text>
<input type="text" value="{{form.phone}}" placeholder="请输入手机号码" bindinput="inputMethed" data-type="phone" />
<input type="text" value="{{newphone}}" placeholder="请输入手机号码" bindinput="inputMethed" data-type="newphone" />
</view>
<view class="h-div v-center in-bg">
<text class="lab">登录密码</text>
<input type="text" value="{{form.password}}" placeholder="请输入登录密码" bindinput="inputMethed" data-type="password" />
<input type="text" value="{{newpassword}}" placeholder="请输入登录密码" bindinput="inputMethed" data-type="newpassword" />
</view>
<view class="h-div v-center in-bg">
<view class="h-div v-center in-bg" catchtap="popModal" data-type="showTypePop">
<text class="lab">所属社区</text>
<text>{{TypeData[postData.type-1].orgname}}</text>
</view>
<view catchtap="login" class="btn" data-type="{{1}}">立即注册</view>
<view catchtap="register" class="btn" data-type="{{true}}">立即注册</view>
<view class="h-div v-center" style="margin-top: 30rpx;">
<text class="tag" catchtap="changeWay" data-type="{{true}}">已有账号?立即登录</text>
</view>
</view>
</view>
<!-- 选择工作类型 -->
<view class="cu-modal {{showTypePop?'show':''}}">
<view class="cu-dialog pop" catchtap>
<view class="cu-bar justify-end pop-header">
<view class="content">选择所属社区</view>
<view class="action" catchtap="popModal" data-type="showTypePop">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<radio-group class="block" style="max-height: 50vh;overflow-y: scroll;">
<view class="cu-list menu text-left">
<view class="cu-item" wx:for="{{TypeData}}" wx:key>
<label catchtap="typeChange" data-index="{{index}}" class="flex justify-between align-center flex-sub">
<view class="flex-sub">{{item.orgname}}</view>
</label>
</view>
</view>
</radio-group>
</view>
</view>

View File

@ -0,0 +1,268 @@
const app = getApp()
Page({
data: {
baseImgUrl: app.FILE_SERVER_URL,
topBarH: app.globalData.CustomBar,
typeId:app.publicService,
// 公告
notice: [],
list:[],
page: 1,
pageSize: 10,
tabs: [{
lab: '云服务',
val: 0
}, {
lab: '云诉求',
val: 1
}, {
lab: '云学习',
val: 2
}, {
lab: '云公开',
val: 3
}],
curTab:0,
userInfo:{},
startTime: '',
endTime: '',
},
/**
* 切换筛选
*/
tabSelect: function (params) {
this.data.page = 1;
const index = params.currentTarget.dataset.index;
this.data.curTab = index;
this.data.freshIng = true;
this.data.startTime = '';
this.data.endTime = '';
this.setData(this.data)
},
refresh: function (params) {
this.data.page = 1;
this.data.list = [];
this.getList();
},
/**
* 开始时间
*/
startTimeChange: function (e) {
this.data.startTime = e.detail.value;
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList();
},
/**
* 结束时间
*/
endTimeChange: function (e) {
this.data.endTime = e.detail.value;
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList();
},
//下拉刷新
dropDown: function (params) {
this.data.page = this.data.page+1;
this.setData(this.data);
this.getList();
},
getList: function (id) {
if (this.data.curTab == 0) {
this.getWkDynamicsPage();
}
if (this.data.curTab == 1) {
this.getDifficultyList();
}
if (this.data.curTab == 2) {
this.getBanner();
}
if (this.data.curTab == 3) {
this.getPublicContentPage();
}
},
/**
* 获取工困难诉求列表
*/
getDifficultyList: function (id) {
let params = {
limit:this.data.pageSize,
page:this.data.page,
endTime:this.data.endTime,
startTime:this.data.startTime,
userId:this.data.userInfo.userId,
};
console.log(params,'params===>');
app.axios("GET", "app", `/difficultyAppeal/difficultyList`, params).then(res => {
if (res.code == 1) {
this.data.freshIng = false;
this.data.list = [...this.data.list,...res.data.list];
console.log( this.data.list ,' this.data.list ===>');
this.setData(this.data);
}
})
},
/**
* 上报困难诉求
*/
escalationDifficulty: function (params) {
wx.navigateTo({
url: `/pages/the-masses/escalation/index`,
})
},
/**
* 困难诉求查看
*/
toescalationDetail: function (params) {
console.log(params,'params===>');
wx.navigateTo({
url: `/pages/the-masses/escalation/index?difficultyId=${params.currentTarget.dataset.item.difficultyId}`,
})
},
/**
* 查看服务详情
*/
toserveDetail: function (params) {
wx.navigateTo({
url: `/pages/party-member/serve/index?dynamicsId=${params.currentTarget.dataset.item.dynamicsId}`,
})
},
/**
* 上报服务
*/
escalationAppeal: function (params) {
wx.navigateTo({
url: `/pages/party-member/serve/index`,
})
},
// 工作动态列表/云服务
getWkDynamicsPage :function() {
let params = {
limit:this.data.pageSize,
page:this.data.page,
endTime:this.data.endTime,
startTime:this.data.startTime,
typeId:this.data.typeId,
userId:this.data.userInfo.userId,
};
app.axios("GET", "app", `/work/wkDynamicsPage`, params).then(res => {
if (res.code == 1) {
this.data.freshIng = false;
this.data.list = [...this.data.list,...res.data.list];
this.setData(this.data);
}
})
},
/**
* 上报服务
*/
escalationServe: function (params) {
wx.navigateTo({
url: `/pages/party-member/serve/index`,
})
},
/**
* 获取云学习
*/
getBanner: function () {
app.axios("GET", "app", "/partyLearnContent/partyLearnPage", {
limit:this.data.pageSize,
page:this.data.page,
// userId: app.globalData.userInfo.userId
}, false).then(res => {
wx.stopPullDownRefresh();
if (res.code == 1) {
console.log(res,'res====>');
this.data.freshIng = false;
if (this.data.page == 1) {
this.data.notice = [res.data.list[0]];
}
this.data.list = [...this.data.list,...res.data.list];
this.setData(this.data);
}
})
},
/**
* 获取云公开
*/
getPublicContentPage: function () {
app.axios("GET", "app", "/publicContent/publicContentPage", {
limit:this.data.pageSize,
page:this.data.page,
// userId: app.globalData.userInfo.userId
}, false).then(res => {
wx.stopPullDownRefresh();
if (res.code == 1) {
console.log(res,'res====>');
this.data.freshIng = false;
if (this.data.page == 1) {
this.data.notice = [res.data.list[0]];
}
this.data.list = [...this.data.list,...res.data.list];
this.setData(this.data);
}
})
},
/**
* 通知详情
*/
toMsgDetail: function (params) {
const item = params.currentTarget.dataset.item;
wx.navigateTo({
url: `/pages/the-masses/web/index?id=${item.publicContentId}`,
})
},
/**
* 跳转账户信息
*/
toSkip: function (params) {
const item = params.currentTarget.dataset.item;
const url = params.currentTarget.dataset.url;
if (url || item?.href) {
wx.navigateTo({
url: url || item.href,
})
}
},
//跳转为民服务
toAppeal: function () {
wx.navigateTo({
url: `/pages/party-member/problem/index`,
})
},
onLoad(option) {
// this.data.userInfo = app.globalData.userInfo;
// this.getBanner();
// this.data.curTab = 0;
this.data.userInfo = app.globalData.userInfo;
this.data.freshIng = true;
this.setData(this.data)
},
onReady() {
},
// onPullDownRefresh() {
// this.getBanner();
// }
})

View File

@ -0,0 +1,6 @@
{
"usingComponents": {
},
"navigationStyle": "custom"
}

View File

@ -0,0 +1,95 @@
<!--index.wxml-->
<title-bar title=""></title-bar>
<scroll-view scroll-x class="bg-white nav">
<view class="flex text-center">
<view class="cu-item flex-sub {{index==curTab?'text-blue cur':''}}" wx:for="{{tabs}}" wx:key catchtap="tabSelect" data-index="{{index}}">
{{item.lab}}
</view>
</view>
</scroll-view>
<view class="filter" wx:if="{{curTab==0||curTab==1}}">
<picker mode="date" value="{{startTime}}" bindchange="startTimeChange">
<view class="picker">
开始时间: {{startTime}}
</view>
</picker>
<view class="line"></view>
<picker mode="date" value="{{endTime}}" bindchange="endTimeChange">
<view class="picker">
结束时间: {{endTime}}
</view>
</picker>
</view>
<scroll-view scroll-y style="height: calc(100vh - 280rpx - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="dropDown" lower-threshold="300" refresher-triggered="{{freshIng}}">
<!-- 云服务 -->
<view wx:if="{{curTab==0}}" catchtap="toserveDetail" data-item="{{item}}" class="item h-div serve" wx:for="{{list}}">
<view class="content">
<view class="title">标题:{{item.title}}</view>
<view class="des">{{item.detail}}</view>
<view class="time">发布人:{{item.chinaName}}</view>
<view class="time">时间:{{item.startTime}}至{{item.endTime}}</view>
</view>
</view>
<!-- 云诉求 -->
<view wx:if="{{curTab==1}}">
<view catchtap="toescalationDetail" data-item="{{item}}" class="item h-div serve" wx:for="{{list}}">
<view class="content">
<view class="title">{{item.content}}</view>
<view class="time">时间:{{item.createTime}}</view>
<view class="time">处置状态:{{item.difficultyState==1?"待处置":item.difficultyState==2?"已处置":"已取消"}}</view>
</view>
</view>
</view>
<!-- 云学习 -->
<swiper wx:if="{{curTab==2}}" class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'>
<swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}">
<image catchtap="toMsgDetail" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
<text class="title ellipsis">{{item.title}}</text>
</swiper-item>
</swiper>
<view wx:if="{{curTab==2}}" class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}">
<view class="study_left">
<image src="{{baseImgUrl+item.coverPath}}" />
<!-- <view>政策法规</view> -->
</view>
<view class="study_right">
<view class="study_right_title">{{item.title}}</view>
</view>
</view>
<!-- 云公开 -->
<view wx:if="{{curTab==3}}">
<swiper class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'>
<swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}">
<image catchtap="toMsgDetail" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
<text class="title ellipsis">{{item.title}}</text>
</swiper-item>
</swiper>
<view class="study">
<view class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}">
<view class="study_left">
<image src="{{baseImgUrl+item.coverPath}}" />
<!-- <view>政策法规</view> -->
</view>
<view class="study_right">
<view class="study_right_title">{{item.title}}</view>
<!-- <view class="study_right_con">
<view>部门名称</view>
<view>{{item.createTime}}</view>
</view> -->
</view>
</view>
</view>
</view>
<empty wx:if="{{list.length==0}}" />
<view class="space"></view>
</scroll-view>
<view wx:if="{{curTab==0}}" class="option">
<view catchtap="escalationAppeal" class="btn">上报服务</view>
</view>
<view wx:if="{{curTab==1}}" class="option">
<view catchtap="escalationDifficulty" class="btn">上报诉求</view>
</view>

View File

@ -0,0 +1,274 @@
.cu-item {
font-size: 30rpx;
font-weight: bold;
}
.filter {
margin: -1rpx;
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
align-items: center;
}
.filter picker {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
}
/* components/notice/index.wxss */
.swiper-msg {
/* margin-top: -80rpx; */
height: 400rpx;
padding: 0;
}
.swiper-msg .item {
width: 100%;
height: 100%;
border-radius: 12rpx;
position: relative;
}
.swiper-msg .img {
width: 100%;
height: 100% !important;
}
.swiper-msg .item .title {
background-color: #000000BF;
position: absolute;
bottom: 0;
z-index: 1;
left: 0;
right: 0;
color: white;
padding: 15rpx 20rpx;
font-size: 28rpx;
}
.study {
width: 95vw;
/* height: 100%; */
border-radius: 12rpx;
background-color: #FFFFFFFF;
margin: 40rpx auto;
}
.studyOption {
width: 88vw;
height: 200rpx;
margin: auto;
display: flex;
padding: 20rpx 0rpx;
}
.study_left {
display: flex;
position: relative;
}
.study_left image {
width: 262rpx;
height: 154rpx;
border-radius: 8rpx;
}
.study_left view {
position: absolute;
top: 0;
left: 0;
width: 110rpx;
height: 40rpx;
border-radius: 8rpx 0rpx 8rpx 0rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
text-align: center;
background-color: #01010166;
}
.study_right {
margin-left: 20rpx;
display: flex;
flex-direction:column;
justify-content: space-between;
}
.study_right .study_right_title {
font-family: PingFang SC, PingFang SC;
font-weight: 600;
font-size: 28rpx;
color: #333333;
line-height: 40rpx;
text-align: left;
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.study_right .study_right_con{
display: flex;
justify-content: space-between;
font-family: PingFang SC, PingFang SC;
font-size: 22rpx;
color: #545454;
}
.suqiucontent{
width: 100%;
}
.suqiucontent view:nth-child(1){
display: flex;
justify-content: space-between;
}
.content {
display: flex;
flex-direction: column;
}
.content .filter {
margin: 0 10rpx;
width: calc(100vw - 20rpx);
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
align-items: center;
}
.content .filter picker {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
}
.content .item {
background-color: #ffffff;
padding: 32rpx 20rpx 20rpx 20rpx;
box-shadow: 0px 0px 6px 1px #DDECF3;
margin: 16rpx 16rpx 0 16rpx;
border-radius: 10rpx;
}
.content .item .val::before {
display: inline-block;
content: '';
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
border-radius: 50%;
background-color: var(--blue);
}
.content .item .val {
font-size: 30rpx;
color: #222222;
margin-left: 16rpx;
padding: 10rpx 0;
}
.item .content {
font-size: 32rpx;
margin-right: 30rpx;
}
.item .content .time::before {
display: inline-block;
content: '';
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
border-radius: 50%;
background-color: var(--blue);
}
.item .content .title {
display: flex;
align-items: center;
}
.item .content .des {
margin: 10rpx 0;
}
.item .content .time {
font-size: 26rpx;
}
.item .content .title::before {
display: inline-block;
content: '';
width: 10rpx;
height: 30rpx;
margin-right: 10rpx;
border-radius: 5rpx;
background-color: var(--blue);
}
.item .content .des {
font-size: 30rpx;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.item .val {
font-size: 26rpx;
color: #222222;
margin-left: 16rpx;
}
.item .add {
color: var(--blue);
margin-left: 15rpx;
font-size: 30rpx;
margin-left: 20rpx;
}
.item .add .add-tv {
margin-left: 10rpx;
}
.item .line {
margin: 10rpx 0;
border-bottom: 1rpx dashed #f5f5f5;
}
.item .record {
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
color: var(--blue);
}
.item .more {
position: absolute;
right: 10rpx;
}
.line {
width: 1rpx;
height: 80%;
background-color: #f5f5f5;
}
.serve{
background-color: #ffffff;
padding: 10rpx;
margin: 10rpx;
}

View File

@ -0,0 +1,265 @@
const app = getApp()
Page({
data: {
baseImgUrl: app.FILE_SERVER_URL,
topBarH: app.globalData.CustomBar,
typeId:app.publicService,
// 公告
notice: [],
list:[],
page: 1,
pageSize: 10,
tabs: [{
lab: '云服务',
val: 0
}, {
lab: '云诉求',
val: 1
}, {
lab: '云学习',
val: 2
}, {
lab: '云公开',
val: 3
}],
curTab:0,
userInfo:{},
startTime: '',
endTime: '',
},
/**
* 跳转账户信息
*/
toSkip: function (params) {
const item = params.currentTarget.dataset.item;
const url = params.currentTarget.dataset.url;
if (url || item?.href) {
wx.navigateTo({
url: url || item.href,
})
}
},
refresh: function (params) {
this.data.page = 1;
this.data.list = [];
this.getList();
},
/**
* 切换筛选
*/
tabSelect: function (params) {
this.data.page = 1;
const index = params.currentTarget.dataset.index;
this.data.curTab = index;
this.data.freshIng = true;
this.data.startTime = '';
this.data.endTime = '';
this.setData(this.data)
},
//跳转为民服务
toAppeal: function () {
wx.navigateTo({
url: `/pages/party-member/problem/index`,
})
},
/**
* 开始时间
*/
startTimeChange: function (e) {
this.data.startTime = e.detail.value;
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList();
},
/**
* 结束时间
*/
endTimeChange: function (e) {
this.data.endTime = e.detail.value;
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList();
},
//下拉刷新
dropDown: function (params) {
this.data.page = this.data.page+1;
this.setData(this.data);
this.getList();
},
getList: function (id) {
if (this.data.curTab == 0) {
this.getWkDynamicsPage();
}
if (this.data.curTab == 1) {
this.getDifficultyList();
}
if (this.data.curTab == 2) {
this.getBanner();
}
if (this.data.curTab == 3) {
this.getPublicContentPage();
}
},
/**
* 获取工困难诉求列表
*/
getDifficultyList: function (id) {
let params = {
limit:this.data.pageSize,
page:this.data.page,
endTime:this.data.endTime,
startTime:this.data.startTime,
userId:this.data.userInfo.userId,
};
console.log(params,'params===>');
app.axios("GET", "app", `/difficultyAppeal/difficultyList`, params).then(res => {
if (res.code == 1) {
this.data.freshIng = false;
this.data.list = [...this.data.list,...res.data.list];
console.log( this.data.list ,' this.data.list ===>');
this.setData(this.data);
}
})
},
/**
* 上报困难诉求
*/
escalationDifficulty: function (params) {
wx.navigateTo({
url: `/pages/the-masses/escalation/index`,
})
},
/**
* 困难诉求查看
*/
toescalationDetail: function (params) {
console.log(params,'params===>');
wx.navigateTo({
url: `/pages/the-masses/escalation/index?difficultyId=${params.currentTarget.dataset.item.difficultyId}`,
})
},
/**
* 查看服务详情
*/
toserveDetail: function (params) {
wx.navigateTo({
url: `/pages/party-member/serve/index?dynamicsId=${params.currentTarget.dataset.item.dynamicsId}`,
})
},
/**
* 上报服务
*/
escalationAppeal: function (params) {
wx.navigateTo({
url: `/pages/party-member/serve/index`,
})
},
// 工作动态列表/云服务
getWkDynamicsPage :function() {
let params = {
limit:this.data.pageSize,
page:this.data.page,
endTime:this.data.endTime,
startTime:this.data.startTime,
typeId:this.data.typeId,
userId:this.data.userInfo.userId,
};
app.axios("GET", "app", `/work/wkDynamicsPage`, params).then(res => {
if (res.code == 1) {
this.data.freshIng = false;
this.data.list = [...this.data.list,...res.data.list];
this.setData(this.data);
}
})
},
/**
* 上报服务
*/
escalationServe: function (params) {
wx.navigateTo({
url: `/pages/party-member/serve/index`,
})
},
/**
* 获取云学习
*/
getBanner: function () {
app.axios("GET", "app", "/partyLearnContent/partyLearnPage", {
limit:this.data.pageSize,
page:this.data.page,
// userId: app.globalData.userInfo.userId
}, false).then(res => {
wx.stopPullDownRefresh();
if (res.code == 1) {
console.log(res,'res====>');
this.data.freshIng = false;
if (this.data.page == 1) {
this.data.notice = [res.data.list[0]];
}
this.data.list = [...this.data.list,...res.data.list];
this.setData(this.data);
}
})
},
/**
* 获取云公开
*/
getPublicContentPage: function () {
app.axios("GET", "app", "/publicContent/publicContentPage", {
limit:this.data.pageSize,
page:this.data.page,
// userId: app.globalData.userInfo.userId
}, false).then(res => {
wx.stopPullDownRefresh();
if (res.code == 1) {
console.log(res,'res====>');
this.data.freshIng = false;
if (this.data.page == 1) {
this.data.notice = [res.data.list[0]];
}
this.data.list = [...this.data.list,...res.data.list];
this.setData(this.data);
}
})
},
/**
* 通知详情
*/
toMsgDetail: function (params) {
const item = params.currentTarget.dataset.item;
wx.navigateTo({
url: `/pages/the-masses/web/index?id=${item.publicContentId}`,
})
},
onLoad(option) {
this.data.userInfo = app.globalData.userInfo;
this.data.freshIng = true;
this.setData(this.data)
this.getBanner();
},
onReady() {
},
onPullDownRefresh() {
this.getBanner();
}
})

View File

@ -0,0 +1,5 @@
{
"usingComponents": {
},
"navigationStyle": "custom"
}

View File

@ -0,0 +1,128 @@
<!--pages/party-member/internalIndex/index.wxml-->
<view class="h-div v-center top">
<image class="img" src="/images/home/icon_top-bg.png" mode="aspectFill" />
<image class="avatar" catchtap="toSkip" data-url="/pages/account/info/index" src="/images/home/avatar.png" mode="aspectFit" />
<view class="v-div" catchtap="toSkip" data-url="/pages/account/info/index">
<text class="name">{{userInfo.chinaName}}</text>
<text class="point">党员内部</text>
</view>
</view>
<view class="logo">
<image class="img" src="/images/logo.png"/>
<view>
做干部群众和党员队伍的
<view>领头雁!</view>
</view>
</view>
<scroll-view scroll-x class="bg-white nav">
<view class="flex text-center">
<view class="cu-item flex-sub {{index==curTab?'text-blue cur':''}}" wx:for="{{tabs}}" wx:key catchtap="tabSelect" data-index="{{index}}">
{{item.lab}}
</view>
</view>
</scroll-view>
<view class="filter" wx:if="{{curTab==0||curTab==1}}">
<picker mode="date" value="{{startTime}}" bindchange="startTimeChange">
<view class="picker">
开始时间: {{startTime}}
</view>
</picker>
<view class="line"></view>
<picker mode="date" value="{{endTime}}" bindchange="endTimeChange">
<view class="picker">
结束时间: {{endTime}}
</view>
</picker>
</view>
<scroll-view scroll-y style="height: calc(100vh - 280rpx - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="dropDown" lower-threshold="300" refresher-triggered="{{freshIng}}">
<!-- 云服务 -->
<view wx:if="{{curTab==0}}" catchtap="toserveDetail" data-item="{{item}}" class="item h-div serve" wx:for="{{list}}">
<view class="content">
<view class="title">标题:{{item.title}}</view>
<view class="des">{{item.detail}}</view>
<view class="time">发布人:{{item.chinaName}}</view>
<view class="time">时间:{{item.startTime}}至{{item.endTime}}</view>
</view>
</view>
<!-- 云诉求 -->
<view wx:if="{{curTab==1}}">
<view catchtap="toescalationDetail" data-item="{{item}}" class="item h-div serve" wx:for="{{list}}">
<view class="content">
<view class="title">{{item.content}}</view>
<view class="time">时间:{{item.createTime}}</view>
<view class="time">处置状态:{{item.difficultyState==1?"待处置":item.difficultyState==2?"已处置":"已取消"}}</view>
</view>
</view>
</view>
<!-- 云学习 -->
<swiper wx:if="{{curTab==2}}" class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'>
<swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}">
<image catchtap="toMsgDetail" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
<text class="title ellipsis">{{item.title}}</text>
</swiper-item>
</swiper>
<view wx:if="{{curTab==2}}" class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}">
<view class="study_left">
<image src="{{baseImgUrl+item.coverPath}}" />
<!-- <view>政策法规</view> -->
</view>
<view class="study_right">
<view class="study_right_title">{{item.title}}</view>
</view>
</view>
<!-- 云公开 -->
<view wx:if="{{curTab==3}}">
<swiper class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'>
<swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}">
<image catchtap="toMsgDetail" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
<text class="title ellipsis">{{item.title}}</text>
</swiper-item>
</swiper>
<view class="study">
<view class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}">
<view class="study_left">
<image src="{{baseImgUrl+item.coverPath}}" />
<!-- <view>政策法规</view> -->
</view>
<view class="study_right">
<view class="study_right_title">{{item.title}}</view>
<!-- <view class="study_right_con">
<view>部门名称</view>
<view>{{item.createTime}}</view>
</view> -->
</view>
</view>
</view>
</view>
<empty wx:if="{{list.length==0}}" />
<view class="space"></view>
</scroll-view>
<view wx:if="{{curTab==0}}" class="option">
<view catchtap="escalationAppeal" class="btn">上报服务</view>
</view>
<view wx:if="{{curTab==1}}" class="option">
<view catchtap="escalationDifficulty" class="btn">上报诉求</view>
</view>
<!-- 为民服务 -->
<!-- <view class="service" catchtap="toAppeal">
<image class="serviceFuwuImg" src="/images/theMasses/fuwu.png" />
<view class="service_con">
<image class="serviceTitleImg" src="/images/theMasses/title.png" />
<view class="con">点击直接上报群众问题!</view>
</view>
</view> -->
<!-- 学习内容 -->
<!-- <notice notice="{{notice}}" list="{{list}}" type="partyMember"/> -->

View File

@ -0,0 +1,583 @@
/* pages/party-member/internalIndex/index.wxss */
.wx-swiper-dots .wx-swiper-dot {
width: 40rpx;
height: 10rpx;
border-radius: 4rpx;
}
.wx-swiper-dots.wx-swiper-dots-horizontal {
bottom: 80rpx;
width: 90%;
text-align: left;
}
.top {
width: 100vw;
height: 380rpx;
position: relative;
margin-bottom: -50rpx ;
}
.top .img {
width: 100vw;
height: 450rpx;
position: absolute;
z-index: -1;
}
.top .avatar {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background-color: #ffffff;
margin: 0 32rpx;
margin-top: 80rpx;
}
.top .name {
color: white;
font-size: 38rpx;
margin-right: 20rpx;
margin-top: 80rpx;
}
.top .duty {
display: flex;
align-items: center;
justify-content: center;
margin-top: 80rpx;
padding: 0 20rpx;
font-size: 30rpx;
color: #FFC054;
border-radius: 40rpx;
border: 2rpx solid #FFAF54;
}
.top .point {
color: white;
font-size: 32rpx;
margin-right: 20rpx;
margin-top: 10rpx;
opacity: 0.9;
}
/* 背景 */
.item-bg {
padding: 0 32rpx;
/* margin: 0 20rpx; */
margin-top: 20rpx;
box-shadow: 0rpx 2rpx 2rpx 0rpx #E5E5E5;
border-radius: 12rpx;
}
.item-msg {
height: 90rpx;
margin-top: -10rpx;
display: flex;
align-items: center;
}
.item-msg .img {
width: 52rpx;
height: 60rpx;
margin-right: 32rpx;
}
.item-msg .txt {
flex: 1;
font-size: 28rpx;
padding-right: 32rpx;
color: #777777;
}
.swiper-msg {
/* margin-top: -80rpx; */
height: 400rpx;
padding: 0;
}
.swiper-msg .item {
width: 100%;
height: 100%;
border-radius: 12rpx;
position: relative;
}
.swiper-msg .img {
width: 100%;
height: 100% !important;
}
.swiper-msg .item .title {
background-color: #000000BF;
position: absolute;
bottom: 0;
z-index: 1;
left: 0;
right: 0;
color: white;
padding: 15rpx 20rpx;
font-size: 28rpx;
}
.item-bg .title {
padding-top: 20rpx;
}
.item-bg .title .tab {
background-color: #f5f5f5;
border-radius: 10rpx;
}
.item-bg .title .tab text {
padding: 5rpx 25rpx;
font-size: 26rpx;
display: flex;
align-items: center;
justify-content: center;
}
.item-bg .title .tab .checked {
background-color: rgba(116, 180, 240, 1);
color: white;
}
.item-bg .title .tab .left {
border-radius: 10rpx 0 0 10rpx;
}
.item-bg .title .tab .center {}
.item-bg .title .tab .right {
border-radius: 0 10rpx 10rpx 0;
}
.item-bg .title .icon {
width: 24rpx;
height: 24rpx;
margin-right: 20rpx;
}
.item-bg .title .txt {
font-size: 32rpx;
font-weight: bold;
color: #222222;
}
/* 为民服务 */
.service {
width: 95vw;
height: 100rpx;
margin: auto;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 12rpx 2rpx #A1A1A1;
border-radius: 12rpx 12rpx 12rpx 12rpx;
display: flex;
align-items: center;
}
.service .serviceFuwuImg {
width: 66rpx;
height: 60rpx;
margin-left: 22rpx;
margin-right: 5rpx;
}
.service .service_con{
display: flex;
background-color: #F4F8FFFF;
height: 60rpx;
flex: 1;
margin-right: 40rpx;
align-items: center;
}
.service .service_con .serviceTitleImg {
width: 132rpx;
height: 46rpx;
margin-right: 22rpx;
margin-left: 22rpx;
}
.service .service_con .con {
width: 264rpx;
height: 34rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #A3A9C4;
}
.study {
width: 95vw;
/* height: 100%; */
border-radius: 12rpx;
background-color: #FFFFFFFF;
margin: auto;
}
.studyOption {
width: 88vw;
height: 200rpx;
margin: auto;
display: flex;
padding: 20rpx 0rpx;
}
.study_left {
display: flex;
position: relative;
}
.study_left image {
width: 262rpx;
height: 154rpx;
border-radius: 8rpx;
}
.study_left view {
position: absolute;
top: 0;
left: 0;
width: 110rpx;
height: 40rpx;
border-radius: 8rpx 0rpx 8rpx 0rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
text-align: center;
background-color: #01010166;
}
.study_right {
margin-left: 20rpx;
display: flex;
flex-direction:column;
justify-content: space-between;
}
.study_right .study_right_title {
font-family: PingFang SC, PingFang SC;
font-weight: 600;
font-size: 28rpx;
color: #333333;
line-height: 40rpx;
text-align: left;
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.study_right .study_right_con{
display: flex;
justify-content: space-between;
font-family: PingFang SC, PingFang SC;
font-size: 22rpx;
color: #545454;
}
.cu-item {
font-size: 30rpx;
font-weight: bold;
}
.filter {
margin: -1rpx;
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
align-items: center;
}
.filter picker {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
}
/* components/notice/index.wxss */
.swiper-msg {
/* margin-top: -80rpx; */
height: 400rpx;
padding: 0;
}
.swiper-msg .item {
width: 100%;
height: 100%;
border-radius: 12rpx;
position: relative;
}
.swiper-msg .img {
width: 100%;
height: 100% !important;
}
.swiper-msg .item .title {
background-color: #000000BF;
position: absolute;
bottom: 0;
z-index: 1;
left: 0;
right: 0;
color: white;
padding: 15rpx 20rpx;
font-size: 28rpx;
}
.study {
width: 95vw;
/* height: 100%; */
border-radius: 12rpx;
background-color: #FFFFFFFF;
margin: 40rpx auto;
}
.studyOption {
width: 88vw;
height: 200rpx;
margin: auto;
display: flex;
padding: 20rpx 0rpx;
}
.study_left {
display: flex;
position: relative;
}
.study_left image {
width: 262rpx;
height: 154rpx;
border-radius: 8rpx;
}
.study_left view {
position: absolute;
top: 0;
left: 0;
width: 110rpx;
height: 40rpx;
border-radius: 8rpx 0rpx 8rpx 0rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
text-align: center;
background-color: #01010166;
}
.study_right {
margin-left: 20rpx;
display: flex;
flex-direction:column;
justify-content: space-between;
}
.study_right .study_right_title {
font-family: PingFang SC, PingFang SC;
font-weight: 600;
font-size: 28rpx;
color: #333333;
line-height: 40rpx;
text-align: left;
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.study_right .study_right_con{
display: flex;
justify-content: space-between;
font-family: PingFang SC, PingFang SC;
font-size: 22rpx;
color: #545454;
}
.suqiucontent{
width: 100%;
}
.suqiucontent view:nth-child(1){
display: flex;
justify-content: space-between;
}
.content {
display: flex;
flex-direction: column;
}
.content .filter {
margin: 0 10rpx;
width: calc(100vw - 20rpx);
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
align-items: center;
}
.content .filter picker {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
}
.content .item {
background-color: #ffffff;
padding: 32rpx 20rpx 20rpx 20rpx;
box-shadow: 0px 0px 6px 1px #DDECF3;
margin: 16rpx 16rpx 0 16rpx;
border-radius: 10rpx;
}
.content .item .val::before {
display: inline-block;
content: '';
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
border-radius: 50%;
background-color: var(--blue);
}
.content .item .val {
font-size: 30rpx;
color: #222222;
margin-left: 16rpx;
padding: 10rpx 0;
}
.item .content {
font-size: 32rpx;
margin-right: 30rpx;
}
.item .content .time::before {
display: inline-block;
content: '';
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
border-radius: 50%;
background-color: var(--blue);
}
.item .content .title {
display: flex;
align-items: center;
}
.item .content .des {
margin: 10rpx 0;
}
.item .content .time {
font-size: 26rpx;
}
.item .content .title::before {
display: inline-block;
content: '';
width: 10rpx;
height: 30rpx;
margin-right: 10rpx;
border-radius: 5rpx;
background-color: var(--blue);
}
.item .content .des {
font-size: 30rpx;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.item .val {
font-size: 26rpx;
color: #222222;
margin-left: 16rpx;
}
.item .add {
color: var(--blue);
margin-left: 15rpx;
font-size: 30rpx;
margin-left: 20rpx;
}
.item .add .add-tv {
margin-left: 10rpx;
}
.item .line {
margin: 10rpx 0;
border-bottom: 1rpx dashed #f5f5f5;
}
.item .record {
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
color: var(--blue);
}
.item .more {
position: absolute;
right: 10rpx;
}
.line {
width: 1rpx;
height: 80%;
background-color: #f5f5f5;
}
.serve{
background-color: #ffffff;
padding: 10rpx;
margin: 10rpx;
}
.logo{
width: 686rpx;
height: 80rpx;
background: linear-gradient( 270deg, #FFBD7B 0%, #FFF8F2 100%);
border-radius: 30rpx 30rpx 30rpx 30rpx;
margin: 20rpx auto;
display: flex;
align-items: center;
padding-left: 50rpx;
}
.logo image{
width: 80rpx;
height: 80rpx;
}
.logo >view{
margin-left: 30rpx;
}
.logo view{
display: flex;
align-items: center;
margin-top: 5rpx;
font-size: 32rpx;
}
.logo view view:nth-child(1){
margin-top: -5rpx;
height: 60rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 40rpx;
color: #ED6D1B;
}

View File

@ -0,0 +1,154 @@
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
topBarH: app.globalData.CustomBar,
typeId:app.publicService,
list: [],
startTime: '',
endTime: '',
page: 1,
pageSize: 10,
userInfo:{}
},
/**
* 开始时间
*/
startTimeChange: function (e) {
this.data.startTime = e.detail.value;
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList();
},
/**
* 结束时间
*/
endTimeChange: function (e) {
this.data.endTime = e.detail.value;
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList();
},
/**
* 上拉刷新
*/
refresh: function () {
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList();
},
/**
* 下拉加载
*/
dropDown: function (params) {
this.data.page = this.data.page+1;
this.setData(this.data);
this.getList();
},
/**
* 获取工作列表
*/
getList: function (id) {
let params = {
limit:this.data.pageSize,
page:this.data.page,
endTime:this.data.endTime,
startTime:this.data.startTime,
typeId:this.data.typeId,
userId:this.data.userInfo.userId,
};
app.axios("GET", "app", `/work/wkDynamicsPage`, params).then(res => {
if (res.code == 1) {
this.data.freshIng = false;
this.data.list = [...this.data.list,...res.data.list];
this.setData(this.data);
}
})
},
/**
* 上报服务
*/
push: function (params) {
wx.navigateTo({
url: `/pages/party-member/serve/index`,
})
},
/**
* 查看详情
*/
toDetail: function (params) {
wx.navigateTo({
url: `/pages/party-member/serve/index?dynamicsId=${params.currentTarget.dataset.item.dynamicsId}`,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.data.freshIng = true;
this.data.userInfo = app.globalData.userInfo;
this.setData(this.data);
this.getList();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom(data) {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationStyle": "custom"
}

View File

@ -0,0 +1,31 @@
<title-bar title="为民服务"></title-bar>
<scroll-view scroll-y style="height: calc(100vh - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="dropDown" refresher-triggered="{{freshIng}}">
<view class="content">
<view class="filter">
<picker mode="date" value="{{startTime}}" bindchange="startTimeChange">
<view class="picker">
开始时间: {{startTime}}
</view>
</picker>
<view class="line"></view>
<picker mode="date" value="{{endTime}}" bindchange="endTimeChange">
<view class="picker">
结束时间: {{endTime}}
</view>
</picker>
</view>
<!-- 列表 -->
<view catchtap="toDetail" data-item="{{item}}" class="item h-div" wx:for="{{list}}">
<view class="content">
<view class="title">标题:{{item.title}}</view>
<view class="des">{{item.detail}}</view>
<view class="time">发布人:{{item.chinaName}}</view>
<view class="time">时间:{{item.startTime}}至{{item.endTime}}</view>
</view>
</view>
<view class="space"></view>
</view>
</scroll-view>
<view class="option">
<view catchtap="push" class="btn">上报服务</view>
</view>

View File

@ -0,0 +1,138 @@
.content {
display: flex;
flex-direction: column;
}
.content .filter {
margin: 0 10rpx;
width: calc(100vw - 20rpx);
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
align-items: center;
}
.content .filter picker {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
}
.content .item {
background-color: #ffffff;
padding: 32rpx 20rpx 20rpx 20rpx;
box-shadow: 0px 0px 6px 1px #DDECF3;
margin: 16rpx 16rpx 0 16rpx;
border-radius: 10rpx;
}
.content .item .val::before {
display: inline-block;
content: '';
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
border-radius: 50%;
background-color: var(--blue);
}
.content .item .val {
font-size: 30rpx;
color: #222222;
margin-left: 16rpx;
padding: 10rpx 0;
}
.item .content {
font-size: 32rpx;
margin-right: 30rpx;
}
.item .content .time::before {
display: inline-block;
content: '';
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
border-radius: 50%;
background-color: var(--blue);
}
.item .content .title {
display: flex;
align-items: center;
}
.item .content .des {
margin: 10rpx 0;
}
.item .content .time {
font-size: 26rpx;
}
.item .content .title::before {
display: inline-block;
content: '';
width: 10rpx;
height: 30rpx;
margin-right: 10rpx;
border-radius: 5rpx;
background-color: var(--blue);
}
.item .content .des {
font-size: 30rpx;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.item .val {
font-size: 26rpx;
color: #222222;
margin-left: 16rpx;
}
.item .add {
color: var(--blue);
margin-left: 15rpx;
font-size: 30rpx;
margin-left: 20rpx;
}
.item .add .add-tv {
margin-left: 10rpx;
}
.item .line {
margin: 10rpx 0;
border-bottom: 1rpx dashed #f5f5f5;
}
.item .record {
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
color: var(--blue);
}
.item .more {
position: absolute;
right: 10rpx;
}
.line {
width: 1rpx;
height: 80%;
background-color: #f5f5f5;
}

View File

@ -0,0 +1,246 @@
// 上报动态
import Utils from "../../../utils/util"
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
topBarH: app.globalData.CustomBar,
baseUrl: app.FILE_SERVER_URL,
dateFilter: Utils.formatTime(new Date(), '-'),
showTaskPop: false,
postData: {}
},
/**
* 时间
*/
bindDateChange: function (params) {
const name = params.currentTarget.dataset.name;
this.data.postData[name] = params.detail.value;
this.setData(this.data)
},
/**
* 显示/关闭任务弹窗
*/
popTaskModal: function (params) {
const type = params.currentTarget.dataset.type;
this.data[type] = !this.data[type];
this.setData(this.data)
},
/**
* 输入内容
*/
inputContent: function (e) {
const name = e.currentTarget.dataset.name;
this.data.postData[name] = e.detail.value;
},
/**
* 选择文件
*/
chooseFile: function () {
wx.chooseImage({
count: 1,
type: 'all',
success: (res) => {
const tempFilePaths = res.tempFiles;
const path = tempFilePaths[0].path;
this.postImg(path)
}
})
},
/**
* 上传图片
*/
postImg(filePath) {
wx.showLoading({
title: '文件上传中...',
})
app.uploadFile(this.data.uuid, app.FileType.resumptionAcs, filePath).then(res => {
wx.hideLoading();
this.getFiles();
})
},
/**
* 获取图片
*/
getFiles: function () {
app.axios("GET", "common", "/upload/getFile", {
otcid: this.data.postData.dynamicsId || this.data.uuid,
otctype: app.FileType.resumptionAcs
}).then(res => {
if (res.code == 1) {
this.data.files = res.data;
this.setData(this.data)
}
})
},
/**
* 删除图片
* @param {*} params
*/
deleteFile: function (e) {
var id = e.currentTarget.dataset.id;
wx.showModal({
title: '删除提示',
content: '是否要删除该附件?',
success: (res) => {
if (res.confirm) {
app.axios("GET", 'common', "/upload/delFile", {
documentId: id,
}).then(res => {
if (res.code == 1) {
this.getFiles();
}
})
}
}
})
},
/**
* 发布
*/
push: function () {
this.data.postData.userId = app.globalData.userInfo.userId;
this.data.postData.dynamicsId = this.data.uuid;
if (!this.data.postData.title) {
wx.showToast({
title: '请输入工作标题',
icon: 'none'
})
return
}
if (!this.data.postData.detail) {
wx.showToast({
title: '请输入内容',
icon: 'none'
})
return
}
if (!this.data.postData.startTime || !this.data.postData.endTime) {
wx.showToast({
title: '请设置时间',
icon: 'none'
})
return
}
let data = {
...this.data.postData,
}
console.log(data,'data===>');
app.axios("POST", "app", "/work/wkDynamicsAddParty", data).then(res => {
if (res.code == 1) {
wx.showToast({
title: '发布成功',
icon: 'none'
})
setTimeout(() => {
wx.navigateBack()
}, 1500);
} else {
wx.showToast({
title: res.message,
icon: 'none'
})
}
})
},
/**
* 预览文件
*/
filePre: function (params) {
const url = params.currentTarget.dataset.url;
const imgs = [];
this.data.files.forEach(item => {
imgs.push(this.data.baseUrl + item.filepath)
})
wx.previewImage({
urls: imgs,
current: this.data.baseUrl + url
})
},
//查询详情
getDetail: function (id) {
app.axios("GET", "app", `/work/wkDynamicsDetail/${id}`).then(res => {
console.log(res,'res===>');
this.data.postData = res.data
this.setData(this.data);
this.getFiles()
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.data.isUserDetail = options.user;
this.data.uuid = Utils.uuid();
this.setData(this.data);
if (options.dynamicsId) {
this.getDetail(options.dynamicsId);
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationStyle": "custom"
}

View File

@ -0,0 +1,51 @@
<!--pages/msg/push/index.wxml-->
<title-bar title="为民服务"></title-bar>
<scroll-view scroll-y refresher-enabled style="height: calc(100vh - {{topBarH}}px);">
<view class="item">
<!-- 标题 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">工作标题</text>
</view>
<input bindinput="inputContent" data-name="title" value="{{postData.title}}" class="put v-div h-center" placeholder="请输入标题"></input>
<!-- 内容 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">工作内容</text>
</view>
<textarea bindinput="inputContent" data-name="detail" value="{{postData.detail}}" style="color: #333333;" class="put v-div" placeholder="请输入工作内容"></textarea>
<!-- 时间 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">工作时间</text>
</view>
<view class="filter">
<picker mode="date" value="{{postData.startTime}}" data-name="startTime" bindchange="bindDateChange">
<view class="picker">
开始时间: {{postData.startTime||'-'}}
</view>
</picker>
<picker mode="date" value="{{postData.endTime}}" data-name="endTime" bindchange="bindDateChange">
<view class="picker">
结束时间: {{postData.endTime||'-'}}
</view>
</picker>
</view>
<!-- 附件 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title flex">附件</text>
<text catchtap="chooseFile" class="title cuIcon-roundadd" style="font-weight: normal;color: #5DA6F4;">添加图片</text>
</view>
<view class="grid">
<view class="img" wx:for="{{files}}" style="position: relative;">
<text wx:if="{{!postData.dynamicsId}}" catchtap="deleteFile" data-id="{{item.sysdocumentid}}" class="cuIcon-delete del" style="color:red;"></text>
<image class="img" src="{{baseUrl+item.filepath}}" catchtap="filePre" data-url="{{item.filepath}}" />
</view>
</view>
</view>
<view class="space"></view>
</scroll-view>
<view class="option" wx:if="{{!postData.dynamicsId}}">
<view catchtap="push" class="btn">上报</view>
</view>

View File

@ -0,0 +1,113 @@
/* pages/msg/push/index.wxss */
scroll-view {
background-color: #f5f5f5;
box-sizing: border-box;
}
.filter {
margin: 0 10rpx;
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
}
.filter picker {
flex: 1;
height: 100%;
display: flex;
align-items: center;
}
.item {
background-color: #ffffff;
margin: 32rpx 20rpx 20rpx 20rpx;
padding: 20rpx;
position: relative;
border-radius: 10rpx;
z-index: 2;
}
.item .header {
margin-top: 16rpx;
}
.item .header .single {
width: 8rpx;
height: 36rpx;
background: #4882EE;
border-radius: 4rpx;
margin-right: 10rpx;
}
.item .header .title {
font-size: 30rpx;
font-weight: bold;
color: #222222;
}
.item .put {
width: 100%;
background: #F5F7FC;
border-radius: 12rpx;
min-height: 72rpx;
padding: 15rpx;
margin-top: 16rpx;
color: #333333;
font-size: 28rpx;
}
.grid {
margin-top: 20rpx;
display: grid;
grid-gap: 20rpx 20rpx;
grid-template-columns: calc((100vw - 140rpx)/3) auto auto;
}
.grid .img {
width: calc((100vw - 140rpx)/3);
height: calc((100vw - 140rpx)/3);
background-color: #f5f5f5;
border-radius: 10rpx;
}
.grid .del {
position: absolute;
bottom: 0;
left: 0;
z-index: 1;
font-size: 40rpx;
}
.option {
position: fixed;
bottom: calc(constant(safe-area-inset-bottom) + 30rpx);
bottom: calc(env(safe-area-inset-bottom) + 30rpx);
left: 0;
right: 0;
margin-top: 30rpx;
padding: 16rpx 32rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 12rpx 2rpx #DDECF3;
z-index: 10;
}
.option .btn {
padding: 14rpx;
display: flex;
align-items: center;
justify-content: center;
background: #409CFF;
color: #FFFFFF;
border-radius: 12rpx;
}
.option .btn:active {
opacity: 0.8;
}
.space {
height: calc(constant(safe-area-inset-bottom) + 150rpx);
height: calc(env(safe-area-inset-bottom) + 150rpx);
}

View File

@ -0,0 +1,99 @@
// pages/web/index.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
topBarH: app.globalData.CustomBar,
url: '',
title: ''
},
/**
* 查看公开内容详情
*/
getDetail: function (id) {
console.log(id,'id');
app.axios("GET", "app", `/publicContent/publicContentDetail/${id}`, {}, false).then(res => {
if (res.code == 1) {
console.log(res,'res===>');
this.data.content = res.data.content;
this.setData(this.data)
wx.setNavigationBarTitle({
title: res.data.title,
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
const title = options.title || '';
this.data.title = title;
this.setData(this.data)
wx.setNavigationBarTitle({
title,
})
const eventChannel = this.getOpenerEventChannel()
eventChannel.on('getUrl', (url) => {
this.data.url = url;
this.setData(this.data)
})
console.log(options.id,'options.id===>');
this.getDetail(options.id)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@ -0,0 +1,5 @@
{
"usingComponents": {},
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#366CCF"
}

View File

@ -0,0 +1,5 @@
<!--pages/web/index.wxml-->
<web-view wx:if="{{url}}" src="{{url}}" />
<scroll-view wx:else class="sc">
<rich-text nodes="{{content}}" />
</scroll-view>

View File

@ -0,0 +1,10 @@
/* pages/web/index.wxss */
.web {
width: 100vw;
}
.sc {
background-color: white;
height: 100vh;
padding: 30rpx 20rpx;
}

View File

@ -36,7 +36,7 @@ Page({
*/
getFiles: function () {
app.axios("GET", "common", "/upload/getFile", {
otcid: this.data.detail.workId,
otcid: this.data.detail.dynamicsId,
otctype: app.FileType.resumptionAcs
}).then(res => {
if (res.code == 1) {
@ -53,7 +53,7 @@ Page({
const eventChannel = this.getOpenerEventChannel()
eventChannel.on('getItem', (item) => {
this.data.detail = item;
this.setData(this.data)
this.setData(this.data);
this.getFiles();
})
},

View File

@ -8,7 +8,7 @@
</view>
<view class="record-modeul">
<text class="title"> 工作内容 </text>
<textarea disabled class="textarea" value="{{detail.content}}" placeholder="工作内容" placeholder-class="placeholder"></textarea>
<textarea disabled class="textarea" value="{{detail.detail}}" placeholder="工作内容" placeholder-class="placeholder"></textarea>
</view>
<view class="record-modeul">
<text class="title"> 时间 </text>

View File

@ -15,6 +15,7 @@ Page({
endTime: '',
page: 1,
pageSize: 10,
userInfo:{}
},
/**
@ -32,17 +33,17 @@ Page({
*/
startTimeChange: function (e) {
this.data.startTime = e.detail.value;
this.data.page = 1;
this.data.currentIndex = 0;
this.data.list = [];
this.setData(this.data);
this.getList(this.data.tab[0].typeId);
this.timeGetList();
},
/**
* 开始时间
*/
endTimeChange: function (e) {
this.data.endTime = e.detail.value;
this.timeGetList();
},
//时间请求
timeGetList: function () {
this.data.page = 1;
this.data.currentIndex = 0;
this.data.list = [];
@ -74,7 +75,7 @@ Page({
dropDown: function (params) {
this.data.page = this.data.page+1;
this.setData(this.data);
this.getList();
this.getList(this.data.tab[this.data.currentIndex].typeId);
},
/**
* 获取工作统计每项数据列表
@ -86,8 +87,8 @@ Page({
endTime:this.data.endTime,
startTime:this.data.startTime,
typeId:id,
userId:this.data.userInfo.userId,
};
console.log(params,'params===>');
app.axios("GET", "app", `/work/workListPage`, params).then(res => {
if (res.code == 1) {
this.data.freshIng = false;
@ -103,6 +104,7 @@ Page({
*/
onLoad(options) {
this.data.freshIng = true;
this.data.userInfo = app.globalData.userInfo;
this.setData(this.data);
this.getType();
},

View File

@ -0,0 +1,99 @@
// 上报动态
import Utils from "../../../../utils/util"
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
topBarH: app.globalData.CustomBar,
baseUrl: app.FILE_SERVER_URL,
dateFilter: Utils.formatTime(new Date(), '-'),
showTypePop: false,
showAdvicePop: false,
TypeData: [],
postData: {},
files: [],
userInfo:{}
},
/**
* 查看人员详情
*/
getEmerEventDetail: function (id) {
app.axios("GET", "app", `/people/peopleDetail/${id}`).then(res => {
if (res.code == 1) {
console.log(res.data,'data===>');
this.data.userInfo = res.data;
this.setData(this.data);
// this.data.postData.emerTypeName;
// for (let index = 0; index < this.data.TypeData.length; index++) {
// if (this.data.TypeData[index].emerTypeName == res.data.emerTypeName) {
// this.data.postData.type = index+1;
// }
// };
// this.setData(this.data);
// this.getFiles();
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (options.peopleId) {
this.getEmerEventDetail(options.peopleId)
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,6 @@
{
"usingComponents": {
"tree": "/components/tree/index"
},
"navigationStyle": "custom"
}

View File

@ -0,0 +1,72 @@
<!--pages/msg/push/index.wxml-->
<title-bar title="基本信息"></title-bar>
<scroll-view scroll-y refresher-enabled style="height: calc(100vh - {{topBarH}}px);">
<view class="item">
<!-- 标题 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">姓名</text>
</view>
<view class="h-div v-center header">
<text class="title">{{userInfo.name}}</text>
</view>
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">电话</text>
</view>
<view class="h-div v-center header">
<text class="title">{{userInfo.phoneNumber?userInfo.phoneNumber:'--'}}</text>
</view>
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">性别</text>
</view>
<view class="h-div v-center header">
<text class="title">{{userInfo.sex==1?'男':'女'}}</text>
</view>
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">所属区域</text>
</view>
<view class="h-div v-center header">
<text class="title">{{userInfo.areaName?userInfo.areaName:'--'}}</text>
</view>
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">人员标签</text>
</view>
<view class="h-div v-center header">
<text class="title">{{userInfo.peopleTag == 1?'常住人口':'流动人口'}}</text>
</view>
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">关系</text>
</view>
<view class="h-div v-center header">
<text class="title">{{userInfo.relationName?userInfo.relationName:'--'}}</text>
</view>
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">出生日期</text>
</view>
<view class="h-div v-center header">
<text class="title">{{userInfo.birthday?userInfo.birthday:'--'}}</text>
</view>
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">类型</text>
</view>
<view class="h-div v-center header">
<text style="margin-right: 10rpx;" wx:for="{{userInfo.typeName}}" wx:key="{{item}}" class="title">{{item}}</text>
</view>
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">工作地点</text>
</view>
<view class="h-div v-center header">
<text class="title">{{userInfo.workAddress?userInfo.workAddress:'--'}}</text>
</view>
</view>
<view class="space"></view>
</scroll-view>

View File

@ -0,0 +1,113 @@
/* pages/msg/push/index.wxss */
scroll-view {
background-color: #f5f5f5;
box-sizing: border-box;
}
.filter {
margin: 0 10rpx;
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
}
.filter picker {
flex: 1;
height: 100%;
display: flex;
align-items: center;
}
.item {
background-color: #ffffff;
margin: 32rpx 20rpx 20rpx 20rpx;
padding: 20rpx;
position: relative;
border-radius: 10rpx;
z-index: 2;
}
.item .header {
margin-top: 16rpx;
}
.item .header .single {
width: 8rpx;
height: 36rpx;
background: #4882EE;
border-radius: 4rpx;
margin-right: 10rpx;
}
.item .header .title {
font-size: 30rpx;
font-weight: bold;
color: #222222;
}
.item .put {
width: 100%;
background: #F5F7FC;
border-radius: 12rpx;
min-height: 72rpx;
padding: 15rpx;
margin-top: 16rpx;
color: #333333;
font-size: 28rpx;
}
.grid {
margin-top: 20rpx;
display: grid;
grid-gap: 20rpx 20rpx;
grid-template-columns: calc((100vw - 140rpx)/3) auto auto;
}
.grid .img {
width: calc((100vw - 140rpx)/3);
height: calc((100vw - 140rpx)/3);
background-color: #f5f5f5;
border-radius: 10rpx;
}
.grid .del {
position: absolute;
bottom: 0;
left: 0;
z-index: 1;
font-size: 40rpx;
}
.option {
position: fixed;
bottom: calc(constant(safe-area-inset-bottom) + 30rpx);
bottom: calc(env(safe-area-inset-bottom) + 30rpx);
left: 0;
right: 0;
margin-top: 30rpx;
padding: 16rpx 32rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 12rpx 2rpx #DDECF3;
z-index: 10;
}
.option .btn {
padding: 14rpx;
display: flex;
align-items: center;
justify-content: center;
background: #409CFF;
color: #FFFFFF;
border-radius: 12rpx;
}
.option .btn:active {
opacity: 0.8;
}
.space {
height: calc(constant(safe-area-inset-bottom) + 150rpx);
height: calc(env(safe-area-inset-bottom) + 150rpx);
}

View File

@ -9,42 +9,45 @@ Page({
data: {
topBarH: app.globalData.CustomBar,
currentIndex: 0,
tab: [{
label: '总人口',
val: 1000
}, {
label: '常驻人口',
val: 800
}, {
label: '脱贫户',
val: 10
}, {
label: '新生儿',
val: 50
}, {
label: '在校生',
val: 200
}, {
label: '残疾人',
val: 2
}, {
label: '低保户',
val: 2
}, {
label: '五保户',
val: 2
}, {
label: '党员',
val: 60
}, {
label: '村组干部',
val: 100
}],
list: [{
factorcnt: '开展安全生产工作调研和检查指导'
}, {
factorcnt: '认真贯彻执行党中央及上级党委关于安全生产工作的决策部署和指示精神。'
}],
tab: [],
list: [],
// startTime: '',
// endTime: '',
page: 1,
pageSize: 10,
userInfo:{},
search:"",
TypeData: [],
showTypePop: false,
postData:{
orgcode:''
},
typeId:'',
// 地区数据
areamultiIndex: [0, 0, 0],
areamultiIds: [],
areanewArr: [],
area:[],
// value:'',
// tree: [
// {
// id: 1,
// name: '001',
// open: true,
// children: [{
// id: 2,
// name: '001-01',
// children: [{
// id: 3,
// name: '001-01-01',
// children: []
// }]
// }]
// }
// ]
},
/**
@ -52,14 +55,254 @@ Page({
*/
changeItem: function (params) {
this.data.currentIndex = params.currentTarget.dataset.index;
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.data.typeId = params.currentTarget.dataset.item.typeId;
this.getList(params.currentTarget.dataset.item.typeId);
},
/**
* 查看详情
*/
toDetail: function (params) {
wx.navigateTo({
url: `/pages/statistic/j-b-x-x/detail/index?peopleId=${params.currentTarget.dataset.item.peopleId}`,
})
},
/**
* 显示/关闭弹窗筛选
*/
popModal: function (params) {
const type = params.currentTarget.dataset.type;
this.data[type] = !this.data[type];
this.setData(this.data)
},
/**
* 地址
*/
typeChange: function (params) {
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
const index = params.currentTarget.dataset.index;
this.data.postData.type = index + 1;
this.data.postData.orgcode = this.data.TypeData[index].orgcode;
this.data.showTypePop = false;
this.setData(this.data);
this.getList(this.data.typeId);
},
/**
* 获取地区
*/
getAreaTree: function () {
app.axios("GET", "common", "/sysorg/areaTree", {
classify: 2
}).then(res => {
if (res.code == 1) {
console.log(res,'res===>');
this.data.TypeData = res.data[0].children;
this.setData(this.data)
}
})
},
// /**
// * 开始时间
// */
// startTimeChange: function (e) {
// this.data.startTime = e.detail.value;
// this.timeGetList();
// },
// /**
// * 开始时间
// */
// endTimeChange: function (e) {
// this.data.endTime = e.detail.value;
// this.timeGetList();
// },
// //时间请求
// timeGetList: function () {
// this.data.page = 1;
// this.data.currentIndex = 0;
// this.data.list = [];
// this.setData(this.data);
// this.getList(this.data.tab[0].typeId);
// },
/**
* 获取工作统计类型
*/
getType: function () {
app.axios("GET", "app", `/people/populationByType`).then(res => {
if (res.code == 1) {
this.data.tab = res.data;
this.setData(this.data);
this.data.typeId = res.data[0].typeId;
this.getList(res.data[0].typeId);
}
})
},
/**
* 上拉刷新
*/
refresh: function () {
this.data.page = 1;
this.data.currentIndex = 0;
this.data.list = [];
this.setData(this.data);
this.getList(this.data.tab[0].typeId);
},
dropDown: function (params) {
this.data.page = this.data.page+1;
this.setData(this.data);
this.getList(this.data.tab[this.data.currentIndex].typeId);
},
/**
* 获取工作统计每项数据列表
*/
getList: function (id) {
let params = {
limit:this.data.pageSize,
page:this.data.page,
// endTime:this.data.endTime,
// startTime:this.data.startTime,
typeId:id,
typeId:'',
// userId:this.data.userInfo.userId,
condition:this.data.search,
};
if (this.data.postData.orgcode) {
params.orgCode = this.data.postData.orgcode
}
console.log(params,'params==>');
app.axios("GET", "app", `/people/peopleInfoByType`, params).then(res => {
if (res.code == 1) {
this.data.freshIng = false;
this.data.list = [...this.data.list,...res.data.list];
this.setData(this.data);
}
})
},
// 地区获取
// getAreaTree: function () {
// app.axios("GET", "common", "/sysorg/areaTree").then(res => {
// if (res.code == 1) {
// this.data.areamultiArray = res.data
// this.setData(this.data);
// let state = {
// arr: [],
// arr1: [],
// arr2: [],
// arr3: [],
// areamultiIds: []
// }
// this.data.areamultiArray.map((v, vk) => {
// state.arr1.push(v.orgname);
// if (this.data.areamultiIndex[0] === vk) {
// state.areamultiIds[0] = v;
// }
// if (state.arr2.length <= 0) {
// v.children.map((c, ck) => {
// state.arr2.push(c.orgname);
// if (this.data.areamultiIndex[1] === ck) {
// state.areamultiIds[1] = c;
// }
// if (state.arr3.length <= 0) {
// c.children.map((t, tk) => {
// state.arr3.push(t.orgname);
// if (this.data.areamultiIndex[2] === tk) {
// state.areamultiIds[2] = t;
// }
// });
// }
// });
// }
// });
// state.arr[0] = state.arr1;
// state.arr[1] = state.arr2;
// state.arr[2] = state.arr3;
// this.setData({
// areanewArr: state.arr,
// areamultiIds: state.areamultiIds,
// });
// }
// })
// },
// 级联选择地区
areabindMultiPickerChange(e) {
console.log(this.data.areamultiIds,'级联选择地区==>');
this.setData({
area: e.detail.value,
areatate:true
});
},
areabindMultiPickerColumnChange(e) {
let data = {
areanewArr: this.data.areanewArr,
areamultiIndex: this.data.areamultiIndex,
areamultiIds: this.data.areamultiIds,
};
data.areamultiIndex[e.detail.column] = e.detail.value;
let searchColumn = () => {
let arr1 = [];
let arr2 = [];
this.data.areamultiArray.map((v, vk) => {
if (data.areamultiIndex[0] === vk) {
data.areamultiIds[0] = {
...v,
};
v.children.map((c, ck) => {
arr1.push(c.orgname);
if (data.areamultiIndex[1] === ck) {
data.areamultiIds[1] = {
...c,
};
c.children.map((t, vt) => {
arr2.push(t.orgname);
if (data.areamultiIndex[2] === vt) {
data.areamultiIds[2] = {
...t,
};
}
});
}
});
}
});
data.areanewArr[1] = arr1;
data.areanewArr[2] = arr2;
};
switch (e.detail.column) {
case 0:
// 每次切换还原初始值
data.areamultiIndex[1] = 0;
data.areamultiIndex[2] = 0;
// 执行函数处理
searchColumn();
break;
case 1:
data.areamultiIndex[2] = 0;
searchColumn();
break;
}
this.setData(data);
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.data.freshIng = true;
this.data.userInfo = app.globalData.userInfo;
this.setData(this.data);
this.getType();
this.getAreaTree();
},
/**
@ -100,7 +343,7 @@ Page({
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
onReachBottom(data) {
},

View File

@ -1,4 +1,5 @@
{
"usingComponents": {},
"usingComponents": {
},
"navigationStyle": "custom"
}

View File

@ -1,29 +1,45 @@
<title-bar title="基本信息统计"></title-bar>
<scroll-view scroll-y style="height: calc(100vh - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="getList" refresher-triggered="{{freshIng}}">
<scroll-view scroll-y style="height: calc(100vh - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="dropDown" refresher-triggered="{{freshIng}}">
<view class="content">
<view class="filter">
<picker mode="date" value="{{dateFilter}}" bindchange="bindDateChange">
<!-- <view class="filter">
<picker mode="date" value="{{startTime}}" bindchange="startTimeChange">
<view class="picker">
开始时间: {{dateFilter}}
开始时间: {{startTime}}
</view>
</picker>
<view class="line"></view>
<picker mode="date" value="{{dateFilter}}" bindchange="bindDateChange">
<picker mode="date" value="{{endTime}}" bindchange="endTimeChange">
<view class="picker">
结束时间: {{dateFilter}}
结束时间: {{endTime}}
</view>
</picker>
</view>
</view> -->
<!-- 关键字搜索 -->
<input class="search" placeholder="输入姓名/年龄/电话号码查询" />
<!-- <input class="search" value="{{search}}" placeholder="输入姓名" /> -->
<view class="table">
<view catchtap="changeItem" data-item="{{item}}" data-index="{{index}}" class="tab-item {{currentIndex==index?'tab-item-checked':''}}" wx:for="{{tab}}" wx:key="{{item.label}}">
<text class="lab">{{item.label}}</text>
<text class="val">{{item.val}}</text>
<text class="lab">{{item.typeName}}</text>
<text class="val">{{item.typeNum}}</text>
<text class="flex">人</text>
<image wx:if="{{currentIndex==index}}" class="arrow" src="/images/icon-checked.png" />
</view>
</view>
<view class="h-div v-center in-bg" catchtap="popModal" data-type="showTypePop">
<view>
<!-- <tree dataTree="{{tree}}" model:value="{{value}}"/> -->
</view>
<text class="lab">所属社区</text>
<text>{{TypeData[postData.type-1].orgname}}</text>
<!-- <picker mode="multiSelector" bindchange="areabindMultiPickerChange" bindcolumnchange="areabindMultiPickerColumnChange"
value="{{areamultiIndex}}" range="{{areanewArr}}">
<view class="picker picker1">
<view>{{areanewArr[0][areamultiIndex[0]]}}{{areanewArr[1][areamultiIndex[1]]}}{{areanewArr[2][areamultiIndex[2]]}}</view>
</view>
</picker> -->
</view>
<!-- 列表 -->
<view class="item">
<view class="h-div child" catchtap="toDetail" data-item="{{item}}" wx:for="{{list}}">
@ -31,23 +47,47 @@
<view class="v-div h-center">
<view class="h-div">
<text class="lab">姓名:</text>
<text class="val">张三</text>
<text class="val">{{item.name}}</text>
</view>
<view class="h-div">
<text class="lab">性别:男</text>
<text class="age">年龄26</text>
<text class="lab">性别:{{item.sex==1?"":"女"}}</text>
</view>
<view class="h-div">
<text class="lab">出生日期:{{item.birthday}}</text>
</view>
<!-- <view class="h-div">
<text class="lab">联系电话:</text>
<text class="phone">18140159609</text>
</view>
</view> -->
<view class="h-div">
<text class="lab">家庭住址:</text>
<text class="lab address">xxxxx</text>
<text class="lab address">{{item.domicileAddress}}</text>
</view>
</view>
</view>
</view>
<view class="space"></view>
</view>
</scroll-view>
</scroll-view>
<!-- 选择所属社区 -->
<view class="cu-modal {{showTypePop?'show':''}}">
<view class="cu-dialog pop" catchtap>
<view class="cu-bar justify-end pop-header">
<view class="content">选择所属社区</view>
<view class="action" catchtap="popModal" data-type="showTypePop">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<radio-group class="block" style="max-height: 50vh;overflow-y: scroll;">
<view class="cu-list menu text-left">
<view class="cu-item" wx:for="{{TypeData}}" wx:key>
<label catchtap="typeChange" data-index="{{index}}" class="flex justify-between align-center flex-sub">
<view class="flex-sub">{{item.orgname}}</view>
</label>
</view>
</view>
</radio-group>
</view>
</view>

View File

@ -52,7 +52,7 @@
padding: 0 20rpx;
font-size: 28rpx;
position: sticky;
top: 90rpx;
/* top: 90rpx; */
border-bottom: 1rpx solid #f5f5f5;
}
@ -128,4 +128,32 @@
width: 1rpx;
height: 80%;
background-color: #f5f5f5;
}
.in-bg {
margin: auto;
background: #ffffff;
border-radius: 90rpx;
height: 90rpx;
width: 95%;
margin-top: 5rpx;
padding: 0 20rpx;
}
.in-bg input {
width: 100%;
height: 100%;
}
.in-bg image {
width: 40rpx;
height: 35rpx;
margin-right: 20rpx;
}
.in-bg .lab {
margin-left: 20rpx;
width: 230rpx;
font-size: 28rpx;
color: #333333;
}

View File

@ -22,7 +22,7 @@ const getPixelRatio = () => {
/**
* 设置echarts
*/
function initChart(data) {
function initChart(data,typeNum) {
if (chart == null) return
chart.init((canvas, width, height) => {
var dpr = getPixelRatio();
@ -33,13 +33,13 @@ function initChart(data) {
});
canvas.setChart(chart);
var colorList = ["#FF9C00", "#FF4E00", ]
var dataList = [data.resolving, data.unresolved];
var totalNum = 10;
var colorList = ["#FF9C00", "#FF4E00","#0000FF","#FFFF00" ]
var dataList = data;
var totalNum = typeNum;
var seriesList = []
dataList.forEach((item, index) => {
var obj = {
value: Math.floor(item / totalNum * 100),
value: Math.floor(item.typeNum / totalNum * 100),
}
seriesList.push({
type: 'bar',
@ -115,18 +115,18 @@ Page({
* 页面的初始数据
*/
data: {
topBarH: app.globalData.CustomBar,
ec: {
lazyLoad: true
},
topBarH: app.globalData.CustomBar,
currentIndex: 0,
tab: [{
label: '已办事项',
val: 8
}, {
label: '待办事项',
val: 2
}],
tab: [],
list: [],
startTime: '',
endTime: '',
page: 1,
pageSize: 10,
userInfo:{}
},
/**
@ -134,26 +134,109 @@ Page({
*/
changeItem: function (params) {
this.data.currentIndex = params.currentTarget.dataset.index;
this.setData(this.data)
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList(params.currentTarget.dataset.item.typeId);
},
/**
* 开始时间
*/
startTimeChange: function (e) {
this.data.startTime = e.detail.value;
this.timeGetList();
},
/**
* 开始时间
*/
endTimeChange: function (e) {
this.data.endTime = e.detail.value;
this.timeGetList();
},
//时间请求
timeGetList: function () {
this.data.page = 1;
this.data.currentIndex = 0;
this.data.list = [];
this.setData(this.data);
this.getList(this.data.tab[0].typeId);
},
/**
* 获取工作统计类型
*/
getType: function () {
app.axios("GET", "app", `/emerEvent/emerCount/`).then(res => {
if (res.code == 1) {
console.log(res,'res===>');
this.data.tab = res.data;
this.setData(this.data);
console.log(res.data[0].typeId);
this.getList(res.data[0].typeId);
//渲染图标
let typeNum = 0;
res.data.forEach(item => {
typeNum += item.typeNum;
});
setTimeout(() => {
initChart(res.data,typeNum)
}, 500);
}
})
},
/**
* 上拉刷新
*/
refresh: function () {
this.data.page = 1;
this.data.currentIndex = 0;
this.data.list = [];
this.setData(this.data);
this.getList(this.data.tab[0].typeId);
},
dropDown: function (params) {
this.data.page = this.data.page+1;
this.setData(this.data);
this.getList(this.data.tab[this.data.currentIndex].typeId);
},
/**
* 获取工作统计每项数据列表
*/
getList: function (id) {
let params = {
limit:this.data.pageSize,
page:this.data.page,
endTime:this.data.endTime,
startTime:this.data.startTime,
emerTypeId:id,
userId:this.data.userInfo.userId,
};
app.axios("GET", "app", `/emerEvent/userEmerEventPage`, params).then(res => {
if (res.code == 1) {
this.data.freshIng = false;
console.log(res, 'res===>');
this.data.list = [...this.data.list,...res.data.list];
this.setData(this.data);
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {},
onLoad(options) {
this.data.freshIng = true;
this.data.userInfo = app.globalData.userInfo;
this.setData(this.data);
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
chart = this.selectComponent('#d-chart')
this.setData(this.data)
setTimeout(() => {
initChart({
resolving: 10,
unresolved: 1,
})
}, 500);
this.getType();
},
/**

View File

@ -1,31 +1,44 @@
<!--pages/t-j/y-j/index/index.wxml-->
<title-bar title="应急统计"></title-bar>
<scroll-view scroll-y style="height: calc(100vh - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="getList" refresher-triggered="{{freshIng}}">
<scroll-view scroll-y style="height: calc(100vh - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="dropDown" refresher-triggered="{{freshIng}}">
<view class="content">
<view class="filter">
<picker mode="date" value="{{dateFilter}}" bindchange="bindDateChange">
<picker mode="date" value="{{startTime}}" bindchange="startTimeChange">
<view class="picker">
开始时间: {{dateFilter}}
开始时间: {{startTime}}
</view>
</picker>
<view class="line"></view>
<picker mode="date" value="{{dateFilter}}" bindchange="bindDateChange">
<picker mode="date" value="{{endTime}}" bindchange="endTimeChange">
<view class="picker">
结束时间: {{dateFilter}}
结束时间: {{endTime}}
</view>
</picker>
</view>
<view class="table">
<view catchtap="changeItem" data-item="{{item}}" data-index="{{index}}" class="tab-item {{currentIndex==index?'tab-item-checked':''}}" wx:for="{{tab}}" wx:key="{{item.label}}">
<text class="lab">{{item.label}}</text>
<text class="val">{{item.val}}</text>
<view catchtap="changeItem" data-item="{{item}}" data-index="{{index}}" class="tab-item {{currentIndex==index?'tab-item-checked':''}}" wx:for="{{tab}}" wx:key="{{item.typeId}}">
<text class="lab">{{item.typeName}}</text>
<text class="val">{{item.typeNum}}</text>
<text class="flex">条记录</text>
<image wx:if="{{currentIndex==index}}" class="arrow" src="/images/icon-checked.png" />
</view>
</view>
<!-- 图表 -->
<view class="item">
<!-- 图表 -->
<view class="item">
<ec-canvas id="d-chart" canvas-id="d-chart" ec="{{ ec }}" class="charts flex"></ec-canvas>
</view>
<!-- 列表 -->
<view catchtap="toDetail" data-item="{{item}}" class="item h-div" wx:for="{{list}}">
<view class="content">
<view class="title">类型:{{item.emerTypeName}}</view>
<view class="des">标题:{{item.title}}</view>
<view class="des">内容:{{item.content}}</view>
<view class="time">时间:{{item.createTimeString}}</view>
</view>
</view>
<view class="space"></view>
</view>
</scroll-view>
</scroll-view>

View File

@ -76,6 +76,185 @@
height: 300rpx;
}
.line {
width: 1rpx;
height: 80%;
background-color: #f5f5f5;
}
/* pages/t-j/g-z/index/index.wxss */
.table {
display: flex;
flex-direction: column;
background-color: white;
margin: 10rpx;
border-right: 10rpx;
}
.table .tab-item {
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
padding: 10rpx;
border-radius: 10rpx;
border-bottom: 1rpx solid #f5f5f5;
}
.table .tab-item-checked {
background-color: rgba(0, 0, 0, 0.1);
}
.table .tab-item .lab {
font-size: 30rpx;
width: 30vw;
text-align: center;
border-right: 1rpx solid #f5f5f5;
}
.table .tab-item .val {
font-size: 35rpx;
font-weight: bold;
padding-left: 10vw;
padding-right: 10rpx;
}
.table view:last-child {
border-bottom: none;
}
.content {
display: flex;
flex-direction: column;
}
.content .filter {
margin: 0 10rpx;
width: calc(100vw - 20rpx);
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
align-items: center;
}
.content .filter picker {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
}
.content .item {
background-color: #ffffff;
padding: 32rpx 20rpx 20rpx 20rpx;
box-shadow: 0px 0px 6px 1px #DDECF3;
margin: 16rpx 16rpx 0 16rpx;
border-radius: 10rpx;
}
.content .item .val::before {
display: inline-block;
content: '';
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
border-radius: 50%;
background-color: var(--blue);
}
.content .item .val {
font-size: 30rpx;
color: #222222;
margin-left: 16rpx;
padding: 10rpx 0;
}
.item .content {
font-size: 32rpx;
margin-right: 30rpx;
width: 100%;
}
.item .content .time::before {
display: inline-block;
content: '';
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
border-radius: 50%;
background-color: var(--blue);
}
.item .content .title {
display: flex;
align-items: center;
}
.item .content .des {
margin: 10rpx 0;
}
.item .content .time {
font-size: 26rpx;
}
.item .content .title::before {
display: inline-block;
content: '';
width: 10rpx;
height: 30rpx;
margin-right: 10rpx;
border-radius: 5rpx;
background-color: var(--blue);
}
.item .content .des {
font-size: 30rpx;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.item .val {
font-size: 26rpx;
color: #222222;
margin-left: 16rpx;
}
.item .add {
color: var(--blue);
margin-left: 15rpx;
font-size: 30rpx;
margin-left: 20rpx;
}
.item .add .add-tv {
margin-left: 10rpx;
}
.item .line {
margin: 10rpx 0;
border-bottom: 1rpx dashed #f5f5f5;
}
.item .record {
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
color: var(--blue);
}
.item .more {
position: absolute;
right: 10rpx;
}
.line {
width: 1rpx;
height: 80%;

View File

@ -0,0 +1,177 @@
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
topBarH: app.globalData.CustomBar,
curTab: 0,
tabs: [{
lab: '待处置',
val: 1
}, {
lab: '已处置',
val: 2
}, {
lab: '已取消',
val: 3
}],
list: [],
startTime: '',
endTime: '',
page: 1,
pageSize: 10,
userInfo:{}
},
/**
* 开始时间
*/
startTimeChange: function (e) {
this.data.startTime = e.detail.value;
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList(this.data.curTab+1);
},
/**
* 开始时间
*/
endTimeChange: function (e) {
this.data.endTime = e.detail.value;
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList(this.data.curTab+1);
},
/**
* 切换筛选
*/
tabSelect: function (params) {
const index = params.currentTarget.dataset.index;
this.data.curTab = index;
this.data.freshIng = true;
this.setData(this.data)
},
/**
* 上拉刷新
*/
refresh: function () {
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList(this.data.curTab+1);
},
/**
* 下拉加载
*/
dropDown: function (params) {
this.data.page = this.data.page+1;
this.setData(this.data);
this.getList(this.data.curTab+1);
},
/**
* 上报困难诉求
*/
push: function (params) {
wx.navigateTo({
url: `/pages/the-masses/escalation/index`,
})
},
/**
* 获取工困难诉求列表
*/
getList: function (id) {
let params = {
limit:this.data.pageSize,
page:this.data.page,
endTime:this.data.endTime,
startTime:this.data.startTime,
difficultyState:id,
userId:this.data.userInfo.userId,
};
console.log(params,'params===>');
app.axios("GET", "app", `/difficultyAppeal/difficultyList`, params).then(res => {
if (res.code == 1) {
console.log(res,'res===>');
this.data.freshIng = false;
this.data.list = [...this.data.list,...res.data.list];
this.setData(this.data);
}
})
},
/**
* 查看详情
*/
toDetail: function (params) {
console.log(params,'params===>');
wx.navigateTo({
url: `/pages/the-masses/escalation/index?difficultyId=${params.currentTarget.dataset.item.difficultyId}`,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.data.freshIng = true;
this.data.userInfo = app.globalData.userInfo;
this.setData(this.data);
this.getList(1);
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom(data) {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationStyle": "custom"
}

View File

@ -0,0 +1,39 @@
<!--pages/t-j/g-z/index/index.wxml-->
<title-bar title="困难诉求"></title-bar>
<!-- 筛选 -->
<scroll-view scroll-x class="bg-white nav">
<view class="flex text-center">
<view class="cu-item flex-sub {{index==curTab?'text-blue cur':''}}" wx:for="{{tabs}}" wx:key catchtap="tabSelect" data-item="{{item}}" data-index="{{index}}">
{{item.lab}}
</view>
</view>
</scroll-view>
<scroll-view scroll-y style="height: calc(100vh - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="dropDown" refresher-triggered="{{freshIng}}">
<view class="content">
<view class="filter">
<picker mode="date" value="{{startTime}}" bindchange="startTimeChange">
<view class="picker">
开始时间: {{startTime}}
</view>
</picker>
<view class="line"></view>
<picker mode="date" value="{{endTime}}" bindchange="endTimeChange">
<view class="picker">
结束时间: {{endTime}}
</view>
</picker>
</view>
<!-- 列表 -->
<view catchtap="toDetail" data-item="{{item}}" class="item h-div" wx:for="{{list}}">
<view class="content">
<view class="title">处置状态:{{item.difficultyState==1?"待处置":item.difficultyState==2?"已处置":"已取消"}}</view>
<!-- <view class="des">{{item.title}}11</view> -->
<view class="time">时间:{{item.createTime}}</view>
</view>
</view>
<view class="space"></view>
</view>
</scroll-view>
<view class="option">
<view catchtap="push" class="btn">上报诉求</view>
</view>

View File

@ -0,0 +1,170 @@
.content {
display: flex;
flex-direction: column;
}
.content .filter {
margin: 0 10rpx;
width: calc(100vw - 20rpx);
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
align-items: center;
}
.content .filter picker {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
}
.content .item {
background-color: #ffffff;
padding: 32rpx 20rpx 20rpx 20rpx;
box-shadow: 0px 0px 6px 1px #DDECF3;
margin: 16rpx 16rpx 0 16rpx;
border-radius: 10rpx;
}
.content .item .val::before {
display: inline-block;
content: '';
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
border-radius: 50%;
background-color: var(--blue);
}
.content .item .val {
font-size: 30rpx;
color: #222222;
margin-left: 16rpx;
padding: 10rpx 0;
}
.item .content {
font-size: 32rpx;
margin-right: 30rpx;
}
.item .content .time::before {
display: inline-block;
content: '';
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
border-radius: 50%;
background-color: var(--blue);
}
.item .content .title {
display: flex;
align-items: center;
}
.item .content .des {
margin: 10rpx 0;
}
.item .content .time {
font-size: 26rpx;
}
.item .content .title::before {
display: inline-block;
content: '';
width: 10rpx;
height: 30rpx;
margin-right: 10rpx;
border-radius: 5rpx;
background-color: var(--blue);
}
.item .content .des {
font-size: 30rpx;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.item .val {
font-size: 26rpx;
color: #222222;
margin-left: 16rpx;
}
.item .add {
color: var(--blue);
margin-left: 15rpx;
font-size: 30rpx;
margin-left: 20rpx;
}
.item .add .add-tv {
margin-left: 10rpx;
}
.item .line {
margin: 10rpx 0;
border-bottom: 1rpx dashed #f5f5f5;
}
.item .record {
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
color: var(--blue);
}
.item .more {
position: absolute;
right: 10rpx;
}
.line {
width: 1rpx;
height: 80%;
background-color: #f5f5f5;
}
.cu-item {
font-size: 30rpx;
font-weight: bold;
}
.option {
position: fixed;
bottom: calc(constant(safe-area-inset-bottom) + 30rpx);
bottom: calc(env(safe-area-inset-bottom) + 30rpx);
left: 0;
right: 0;
margin-top: 30rpx;
padding: 16rpx 32rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 12rpx 2rpx #DDECF3;
z-index: 10;
}
.option .btn {
padding: 14rpx;
display: flex;
align-items: center;
justify-content: center;
background: #409CFF;
color: #FFFFFF;
border-radius: 12rpx;
}
.option .btn:active {
opacity: 0.8;
}

View File

@ -0,0 +1,174 @@
import Utils from "../../../utils/util"
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
topBarH: app.globalData.CustomBar,
postData: {},
userInfo:{}
},
/**
* 输入内容
*/
inputContent: function (e) {
const name = e.currentTarget.dataset.name;
this.data.postData[name] = e.detail.value;
},
/**
* 发布
*/
push: function () {
if (!this.data.postData.content) {
wx.showToast({
title: '请输入内容',
icon: 'none'
})
return
};
let params= {
...this.data.postData,
difficultyId:this.data.postData.difficultyId||'',
userId:this.data.userInfo.userId,
};
app.axios("POST", "app", "/difficultyAppeal/addDifficulty", params).then(res => {
if (res.code == 1) {
wx.showToast({
title: '发布成功',
icon: 'none'
})
setTimeout(() => {
wx.navigateBack()
}, 1500);
} else {
wx.showToast({
title: res.message,
icon: 'none'
})
}
})
},
//撤销上报
cancellation:function () {
let id = this.data.postData.difficultyId;
let userId = this.data.userInfo.userId;
wx.showModal({
title: '撤销上报',
content: '是否确认撤销上报',
success (res) {
if (res.confirm) {
app.axios("PUT", "app", `/difficultyAppeal/cancelDifficulty/${id}/${userId}`).then(res => {
if (res.code == 1) {
wx.showToast({
title: '撤销上报成功',
icon: 'none'
})
setTimeout(() => {
wx.navigateBack()
}, 1500);
}
});
} else if (res.cancel) {
}
}
})
},
//删除详情
delete:function (params) {
let id = this.data.postData.difficultyId;
let userId = this.data.userInfo.userId;
wx.showModal({
title: '删除',
content: '是否确认取消',
success (res) {
if (res.confirm) {
app.axios("DELETE", "app", `/difficultyAppeal/deleteDifficulty/${id}/${userId}`).then(res => {
if (res.code == 1) {
wx.showToast({
title: '删除成功',
icon: 'none'
})
setTimeout(() => {
wx.navigateBack()
}, 1500);
}
});
} else if (res.cancel) {
}
}
})
},
//获取详情
getDetail:function (id) {
app.axios("GET", "app", `/difficultyAppeal/difficultyDetail/${id}`).then(res => {
this.data.postData = res.data;
this.setData(this.data);
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (options.difficultyId) {
this.getDetail(options.difficultyId);
}
// this.data.isUserDetail = options.user;
// this.data.uuid = Utils.uuid();
// this.setData(this.data)
this.data.userInfo = app.globalData.userInfo;
this.setData(this.data);
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,6 @@
{
"usingComponents": {
"tree": "/components/tree/index"
},
"navigationStyle": "custom"
}

View File

@ -0,0 +1,22 @@
<title-bar title="上报诉求"></title-bar>
<scroll-view scroll-y refresher-enabled style="height: calc(100vh - {{topBarH}}px);">
<view class="item">
<!-- 内容 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">困难诉求</text>
</view>
<textarea bindinput="inputContent" data-name="content" value="{{postData.content}}" style="color: #333333;" class="put v-div" placeholder="请输入困难诉求"></textarea>
</view>
<view class="space"></view>
</scroll-view>
<view class="option" wx:if="{{!postData.difficultyState}}">
<view catchtap="push" class="btn">上报</view>
</view>
<view class="option" wx:else="">
<view class="option_div">
<view catchtap="cancellation" class="btn" wx:if="{{postData.difficultyState == 1}}">取消上报</view>
<view catchtap="delete" class="btn">删除</view>
</view>
</view>

View File

@ -0,0 +1,122 @@
scroll-view {
background-color: #f5f5f5;
box-sizing: border-box;
}
.filter {
margin: 0 10rpx;
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
}
.filter picker {
flex: 1;
height: 100%;
display: flex;
align-items: center;
}
.item {
background-color: #ffffff;
margin: 32rpx 20rpx 20rpx 20rpx;
padding: 20rpx;
position: relative;
border-radius: 10rpx;
z-index: 2;
}
.item .header {
margin-top: 16rpx;
}
.item .header .single {
width: 8rpx;
height: 36rpx;
background: #4882EE;
border-radius: 4rpx;
margin-right: 10rpx;
}
.item .header .title {
font-size: 30rpx;
font-weight: bold;
color: #222222;
}
.item .put {
width: 100%;
background: #F5F7FC;
border-radius: 12rpx;
min-height: 72rpx;
padding: 15rpx;
margin-top: 16rpx;
color: #333333;
font-size: 28rpx;
}
.grid {
margin-top: 20rpx;
display: grid;
grid-gap: 20rpx 20rpx;
grid-template-columns: calc((100vw - 140rpx)/3) auto auto;
}
.grid .img {
width: calc((100vw - 140rpx)/3);
height: calc((100vw - 140rpx)/3);
background-color: #f5f5f5;
border-radius: 10rpx;
}
.grid .del {
position: absolute;
bottom: 0;
left: 0;
z-index: 1;
font-size: 40rpx;
}
.option {
position: fixed;
bottom: calc(constant(safe-area-inset-bottom) + 30rpx);
bottom: calc(env(safe-area-inset-bottom) + 30rpx);
left: 0;
right: 0;
margin-top: 30rpx;
padding: 16rpx 32rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 12rpx 2rpx #DDECF3;
z-index: 10;
}
.option .btn {
padding: 14rpx;
display: flex;
align-items: center;
justify-content: center;
background: #409CFF;
color: #FFFFFF;
border-radius: 12rpx;
}
.option .btn:active {
opacity: 0.8;
}
.space {
height: calc(constant(safe-area-inset-bottom) + 150rpx);
height: calc(env(safe-area-inset-bottom) + 150rpx);
}
.option_div{
display: flex;
}
.option_div view{
width: 100%;
}
.option_div view:nth-child(2){
margin-left: 20rpx;
background-color: red;
}

View File

@ -0,0 +1,271 @@
import Utils from "../../../utils/util"
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
topBarH: app.globalData.CustomBar,
baseUrl: app.FILE_SERVER_URL,
dateFilter: Utils.formatTime(new Date(), '-'),
showTypePop: false,
showTaskPop: false,
TypeData: [],
postData: {}
},
/**
* 时间
*/
bindDateChange: function (params) {
const name = params.currentTarget.dataset.name;
this.data.postData[name] = params.detail.value;
this.setData(this.data)
},
/**
* 显示/关闭任务弹窗
*/
popTaskModal: function (params) {
const type = params.currentTarget.dataset.type;
this.data[type] = !this.data[type];
this.setData(this.data)
},
/**
* 显示/关闭弹窗
*/
popModal: function (params) {
const type = params.currentTarget.dataset.type;
this.data[type] = !this.data[type];
this.setData(this.data)
},
/**
* 通知类型
*/
typeChange: function (params) {
const index = params.currentTarget.dataset.index;
this.data.postData.type = index + 1;
this.data.postData.typeId = this.data.TypeData[index].typeId;
this.data.showTypePop = false;
this.setData(this.data)
},
/**
* 输入内容
*/
inputContent: function (e) {
const name = e.currentTarget.dataset.name;
this.data.postData[name] = e.detail.value;
},
/**
* 选择文件
*/
chooseFile: function () {
wx.chooseImage({
count: 1,
type: 'all',
success: (res) => {
const tempFilePaths = res.tempFiles;
const path = tempFilePaths[0].path;
this.postImg(path)
}
})
},
/**
* 获取工作类型
*/
getType: function () {
app.axios("GET", "app", "/work/wkTypes", {
classify: 2
}).then(res => {
if (res.code == 1) {
this.data.TypeData = res.data;
this.setData(this.data)
}
})
},
/**
* 上传图片
*/
postImg(filePath) {
wx.showLoading({
title: '文件上传中...',
})
app.uploadFile(this.data.uuid, app.FileType.resumptionAcs, filePath).then(res => {
wx.hideLoading();
this.getFiles();
})
},
/**
* 获取图片
*/
getFiles: function () {
app.axios("GET", "common", "/upload/getFile", {
otcid: this.data.uuid,
otctype: app.FileType.resumptionAcs
}).then(res => {
if (res.code == 1) {
this.data.files = res.data;
this.setData(this.data)
}
})
},
/**
* 删除图片
* @param {*} params
*/
deleteFile: function (e) {
var id = e.currentTarget.dataset.id;
wx.showModal({
title: '删除提示',
content: '是否要删除该附件?',
success: (res) => {
if (res.confirm) {
app.axios("GET", 'common', "/upload/delFile", {
documentId: id,
}).then(res => {
if (res.code == 1) {
this.getFiles();
}
})
}
}
})
},
/**
* 发布
*/
push: function () {
this.data.postData.userId = app.globalData.userInfo.userId;
this.data.postData.dynamicsId = this.data.uuid;
if (!this.data.postData.title) {
wx.showToast({
title: '请输入工作标题',
icon: 'none'
})
return
}
if (!this.data.postData.typeId) {
wx.showToast({
title: '请选择工作类型',
icon: 'none'
})
return
}
if (!this.data.postData.content) {
wx.showToast({
title: '请输入内容',
icon: 'none'
})
return
}
if (!this.data.postData.startTime || !this.data.postData.endTime) {
wx.showToast({
title: '请设置时间',
icon: 'none'
})
return
}
app.axios("POST", "app", "/work/wkDynamicsAdd", this.data.postData).then(res => {
if (res.code == 1) {
wx.showToast({
title: '发布成功',
icon: 'none'
})
setTimeout(() => {
wx.navigateBack()
}, 1500);
} else {
wx.showToast({
title: res.message,
icon: 'none'
})
}
})
},
/**
* 预览文件
*/
filePre: function (params) {
const url = params.currentTarget.dataset.url;
const imgs = [];
this.data.files.forEach(item => {
imgs.push(this.data.baseUrl + item.filepath)
})
wx.previewImage({
urls: imgs,
current: this.data.baseUrl + url
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.data.isUserDetail = options.user;
this.data.uuid = Utils.uuid();
this.setData(this.data)
this.getType();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,77 @@
<title-bar title="上报诉求"></title-bar>
<scroll-view scroll-y refresher-enabled style="height: calc(100vh - {{topBarH}}px);">
<view class="item">
<!-- 标题 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">工作标题</text>
</view>
<input bindinput="inputContent" data-name="title" value="{{postData.title}}" class="put v-div h-center" placeholder="请输入标题"></input>
<!-- 类型 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">工作类型</text>
</view>
<input catchtap="popModal" data-type="showTypePop" disabled class="put v-div h-center" placeholder="请选择" value="{{TypeData[postData.type-1].typeName}}"></input>
<!-- 内容 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">工作内容</text>
</view>
<textarea bindinput="inputContent" data-name="detail" value="{{postData.detail}}" style="color: #333333;" class="put v-div" placeholder="请输入工作内容"></textarea>
<!-- 时间 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">工作时间</text>
</view>
<view class="filter">
<picker mode="date" value="{{postData.startTime}}" data-name="startTime" bindchange="bindDateChange">
<view class="picker">
开始时间: {{postData.startTime||'-'}}
</view>
</picker>
<picker mode="date" value="{{postData.endTime}}" data-name="endTime" bindchange="bindDateChange">
<view class="picker">
结束时间: {{postData.endTime||'-'}}
</view>
</picker>
</view>
<!-- 附件 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title flex">附件</text>
<text catchtap="chooseFile" class="title cuIcon-roundadd" style="font-weight: normal;color: #5DA6F4;">添加图片</text>
</view>
<view class="grid">
<view class="img" wx:for="{{files}}" style="position: relative;">
<text catchtap="deleteFile" data-id="{{item.sysdocumentid}}" class="cuIcon-delete del" style="color:red;"></text>
<image class="img" src="{{baseUrl+item.filepath}}" catchtap="filePre" data-url="{{item.filepath}}" />
</view>
</view>
</view>
<view class="space"></view>
</scroll-view>
<view class="option">
<view catchtap="push" class="btn">上报</view>
</view>
<!-- 选择工作类型 -->
<view class="cu-modal {{showTypePop?'show':''}}">
<view class="cu-dialog pop" catchtap>
<view class="cu-bar justify-end pop-header">
<view class="content">选择工作类型</view>
<view class="action" catchtap="popModal" data-type="showTypePop">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<radio-group class="block" style="max-height: 50vh;overflow-y: scroll;">
<view class="cu-list menu text-left">
<view class="cu-item" wx:for="{{TypeData}}" wx:key>
<label catchtap="typeChange" data-index="{{index}}" class="flex justify-between align-center flex-sub">
<view class="flex-sub">{{item.typeName}}</view>
</label>
</view>
</view>
</radio-group>
</view>
</view>

View File

@ -3,157 +3,212 @@ const app = getApp()
Page({
data: {
baseImgUrl: app.FILE_SERVER_URL,
nineType: 0,
ec: {
lazyLoad: true
},
filterIndex: 0,
itemList: [{
icon: "icon_tab1",
name: "履职清单",
href: "/pages/duty/index/index"
},
// {
// icon: "icon_tab2",
// name: "专项任务",
// href: "/pages/task/index/index"
// },
{
icon: "icon_tab3",
name: "一企一档",
href: "/pages/ent-obj/index/index"
},
{
icon: "icon_tab4",
name: "隐患核查",
href: "/pages/danger/list/index"
},
// {
// icon: "icon_tab5",
// name: "群防群治",
// href: "/pages/people/index/index",
// },
// {
// icon: "icon-emergency",
// name: "应急管理",
// href: "/pages/emergency/index/index",
// },
// {
// icon: "icon_tab6",
// name: "发布通知",
// href: "/pages/msg/push-index/index",
// },
],
filter: [{
lab: '今日数据',
val: 0
}, {
lab: '本月数据',
val: 1
}],
dLegend: [{
name: '已整改',
num: 0,
color: '#2678FF'
}, {
name: '整改中',
num: 0,
color: '#FF9C00'
}, {
name: '未整改',
num: 0,
color: '#FF4E00'
}],
// 数据统计
tab1: [{
icon: "icon_tab1",
name: "工作日志",
href: "/pages/statistic/g-z-r-z/index/index"
}, {
icon: "icon_tab2",
name: "工作统计",
href: "/pages/statistic/g-z-t-j/index/index"
}, {
icon: "icon_tab3",
name: "应急统计",
href: "/pages/statistic/y-j/index/index"
}, {
icon: "icon_tab4",
name: "基本信息",
href: "/pages/statistic/j-b-x-x/index/index"
}],
// 工作台
tab2: [{
icon: "icon_w_1",
name: "上报动态",
href: "/pages/work/s-b/index/index",
},
{
icon: "icon_w_2",
name: "待办事项",
href: "/pages/work/d-b-s-x/index/index?id=0"
},
{
icon: "icon_w_3",
name: "已办事项",
href: "/pages/work/d-b-s-x/index/index?id=1"
},
],
// 应急指挥
tab3: [{
icon: "icon_yj_1",
name: "应急预案",
href: "/pages/emergency/y-a/index/index",
},
{
icon: "icon_yj_2",
name: "指挥体系",
href: "/pages/emergency/s-b/index/index"
},
{
icon: "icon_yj_3",
name: "应急通讯录",
href: "/pages/emergency/t-x/index/index"
},
],
topBarH: app.globalData.CustomBar,
typeId:app.publicService,
// 公告
notice: [],
showPop: false,
msgData: null,
checkInfo: {},
userInfo: {}
list:[],
page: 1,
pageSize: 10,
tabs: [{
lab: '云学习',
val: 0
}, {
lab: '云公开',
val: 1
}, {
lab: '云诉求',
val: 2
}, ],
curTab:0,
userInfo:{},
startTime: '',
endTime: '',
},
/**
* 跳转
* 切换筛选
*/
toSkip: function (params) {
const item = params.currentTarget.dataset.item;
const url = params.currentTarget.dataset.url;
if (url || item?.href) {
wx.navigateTo({
url: url || item.href,
})
}
tabSelect: function (params) {
this.data.page = 1;
const index = params.currentTarget.dataset.index;
this.data.curTab = index;
this.data.freshIng = true;
this.data.startTime = '';
this.data.endTime = '';
this.setData(this.data)
},
refresh: function (params) {
this.data.page = 1;
this.data.list = [];
this.getList();
},
/**
* 开始时间
*/
startTimeChange: function (e) {
this.data.startTime = e.detail.value;
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList();
},
/**
* 结束时间
*/
endTimeChange: function (e) {
this.data.endTime = e.detail.value;
this.data.page = 1;
this.data.list = [];
this.setData(this.data);
this.getList();
},
//下拉刷新
dropDown: function (params) {
this.data.page = this.data.page+1;
this.setData(this.data);
this.getList();
},
getList: function (id) {
if (this.data.curTab == 0) {
this.getBanner();
}
if (this.data.curTab == 1) {
this.getPublicContentPage();
}
if (this.data.curTab == 2) {
this.getDifficultyList();
}
},
/**
* 获取工困难诉求列表
*/
getDifficultyList: function (id) {
let params = {
limit:this.data.pageSize,
page:this.data.page,
endTime:this.data.endTime,
startTime:this.data.startTime,
userId:this.data.userInfo.userId,
};
console.log(params,'params===>');
app.axios("GET", "app", `/difficultyAppeal/difficultyList`, params).then(res => {
if (res.code == 1) {
this.data.freshIng = false;
this.data.list = [...this.data.list,...res.data.list];
console.log( this.data.list ,' this.data.list ===>');
this.setData(this.data);
}
})
},
/**
* 困难诉求查看
*/
toescalationDetail: function (params) {
console.log(params,'params===>');
wx.navigateTo({
url: `/pages/the-masses/escalation/index?difficultyId=${params.currentTarget.dataset.item.difficultyId}`,
})
},
/**
* 上报困难诉求
*/
escalationDifficulty: function (params) {
wx.navigateTo({
url: `/pages/the-masses/escalation/index`,
})
},
/**
* 查看服务详情
*/
toserveDetail: function (params) {
wx.navigateTo({
url: `/pages/party-member/serve/index?dynamicsId=${params.currentTarget.dataset.item.dynamicsId}`,
})
},
/**
* 上报服务
*/
escalationAppeal: function (params) {
wx.navigateTo({
url: `/pages/party-member/serve/index`,
})
},
// 工作动态列表/云服务
getWkDynamicsPage :function() {
let params = {
limit:this.data.pageSize,
page:this.data.page,
endTime:this.data.endTime,
startTime:this.data.startTime,
typeId:this.data.typeId,
userId:this.data.userInfo.userId,
};
app.axios("GET", "app", `/work/wkDynamicsPage`, params).then(res => {
if (res.code == 1) {
this.data.freshIng = false;
this.data.list = [...this.data.list,...res.data.list];
this.setData(this.data);
}
})
},
/**
* 上报服务
*/
escalationServe: function (params) {
wx.navigateTo({
url: `/pages/party-member/serve/index`,
})
},
/**
* 获取banner
* 获取云学习
*/
getBanner: function () {
app.axios("GET", "app", "/notice/lastFourNotice", {
page: 1,
limit: 4,
userId: app.globalData.userInfo.userId
app.axios("GET", "app", "/partyLearnContent/partyLearnPage", {
limit:this.data.pageSize,
page:this.data.page,
// userId: app.globalData.userInfo.userId
}, false).then(res => {
wx.stopPullDownRefresh();
if (res.code == 1) {
this.data.notice = res.data;
this.setData(this.data)
console.log(res,'res====>');
this.data.freshIng = false;
if (this.data.page == 1) {
this.data.notice = [res.data.list[0]];
}
this.data.list = [...this.data.list,...res.data.list];
this.setData(this.data);
}
})
},
/**
* 获取云公开
*/
getPublicContentPage: function () {
app.axios("GET", "app", "/publicContent/publicContentPage", {
limit:this.data.pageSize,
page:this.data.page,
// userId: app.globalData.userInfo.userId
}, false).then(res => {
wx.stopPullDownRefresh();
if (res.code == 1) {
console.log(res,'res====>');
this.data.freshIng = false;
if (this.data.page == 1) {
this.data.notice = [res.data.list[0]];
}
this.data.list = [...this.data.list,...res.data.list];
this.setData(this.data);
}
})
},
@ -164,20 +219,44 @@ Page({
toMsgDetail: function (params) {
const item = params.currentTarget.dataset.item;
wx.navigateTo({
url: `/pages/web/index?id=${item.govNoticeId}`,
url: `/pages/the-masses/web/index?id=${item.publicContentId}`,
})
},
/**
* 跳转账户信息
*/
toSkip: function (params) {
const item = params.currentTarget.dataset.item;
const url = params.currentTarget.dataset.url;
if (url || item?.href) {
wx.navigateTo({
url: url || item.href,
})
}
},
//跳转为民服务
toAppeal: function () {
wx.navigateTo({
url: `/pages/party-member/problem/index`,
})
},
onLoad(option) {
// this.data.userInfo = app.globalData.userInfo;
// this.getBanner();
// this.data.curTab = 0;
this.data.userInfo = app.globalData.userInfo;
this.getBanner();
this.data.freshIng = true;
this.setData(this.data)
},
onReady() {
},
onPullDownRefresh() {
this.getBanner();
}
// onPullDownRefresh() {
// this.getBanner();
// }
})

View File

@ -1,24 +1,84 @@
<!--index.wxml-->
<view class="h-div v-center top">
<image class="img" src="/images/home/icon_top-bg.png" mode="aspectFill" />
<image class="avatar" catchtap="toSkip" data-url="/pages/account/info/index" src="/images/home/avatar.png" mode="aspectFit" />
<view class="v-div" catchtap="toSkip" data-url="/pages/account/info/index">
<text class="name">{{userInfo.chinaName}}</text>
<text class="point">党员</text>
<view class="top">
</view>
<scroll-view scroll-x class="bg-white nav">
<view class="flex text-center">
<view class="cu-item flex-sub {{index==curTab?'text-blue cur':''}}" wx:for="{{tabs}}" wx:key catchtap="tabSelect" data-index="{{index}}">
{{item.lab}}
</view>
</view>
</scroll-view>
<view class="filter" wx:if="{{curTab==0}}">
<picker mode="date" value="{{startTime}}" bindchange="startTimeChange">
<view class="picker">
开始时间: {{startTime}}
</view>
</picker>
<view class="line"></view>
<picker mode="date" value="{{endTime}}" bindchange="endTimeChange">
<view class="picker">
结束时间: {{endTime}}
</view>
</picker>
</view>
<!-- 为民服务 -->
<view class="service">
<image class="serviceImg" src="/images/home/icon_top-bg.png"/>
<view class="title">为民服务</view>
<view class="con">点击直接上报群众问题!</view>
</view>
<scroll-view scroll-y style="height: calc(100vh - 280rpx - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="dropDown" lower-threshold="300" refresher-triggered="{{freshIng}}">
<!-- 云诉求 -->
<view wx:if="{{curTab==2}}">
<view catchtap="toescalationDetail" data-item="{{item}}" class="item h-div serve" wx:for="{{list}}">
<view class="content">
<view class="title">{{item.content}}</view>
<view class="time">时间:{{item.createTime}}</view>
<view class="time">处置状态:{{item.difficultyState==1?"待处置":item.difficultyState==2?"已处置":"已取消"}}</view>
</view>
</view>
</view>
<!-- 云学习 -->
<swiper wx:if="{{curTab==0}}" class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'>
<swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}">
<image catchtap="toMsgDetail" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
<text class="title ellipsis">{{item.title}}</text>
</swiper-item>
</swiper>
<view wx:if="{{curTab==0}}" class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}">
<view class="study_left">
<image src="{{baseImgUrl+item.coverPath}}" />
<!-- <view>政策法规</view> -->
</view>
<view class="study_right">
<view class="study_right_title">{{item.title}}</view>
</view>
</view>
<!-- 云公开 -->
<view wx:if="{{curTab==1}}">
<swiper class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'>
<swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}">
<image catchtap="toMsgDetail" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
<text class="title ellipsis">{{item.title}}</text>
</swiper-item>
</swiper>
<view class="study">
<view class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}">
<view class="study_left">
<image src="{{baseImgUrl+item.coverPath}}" />
<!-- <view>政策法规</view> -->
</view>
<view class="study_right">
<view class="study_right_title">{{item.title}}</view>
<!-- <view class="study_right_con">
<view>部门名称</view>
<view>{{item.createTime}}</view>
</view> -->
</view>
</view>
</view>
</view>
<!-- 消息 -->
<swiper class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'>
<swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}">
<image catchtap="toMsgDetail" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverImg}}" mode="widthFix"></image>
<text class="title ellipsis">{{item.title}}</text>
</swiper-item>
</swiper>
<empty wx:if="{{list.length==0}}" />
<view class="space"></view>
</scroll-view>
<view wx:if="{{curTab==2}}" class="option">
<view catchtap="escalationDifficulty" class="btn">上报诉求</view>
</view>

View File

@ -1,4 +1,12 @@
/**index.wxss**/
/**index.wxss**/
page {
background: linear-gradient( 180deg, #4281FF 0%, #E7EDFA 45%, #F9F9F9 100%);
}
.top{
width: 100vw;
height: 160rpx;
}
.wx-swiper-dots .wx-swiper-dot {
width: 40rpx;
height: 10rpx;
@ -11,55 +19,6 @@
text-align: left;
}
.top {
width: 100vw;
height: 380rpx;
position: relative;
}
.top .img {
width: 100vw;
height: 450rpx;
position: absolute;
z-index: -1;
}
.top .avatar {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background-color: #ffffff;
margin: 0 32rpx;
margin-top: 80rpx;
}
.top .name {
color: white;
font-size: 38rpx;
margin-right: 20rpx;
margin-top: 80rpx;
}
.top .duty {
display: flex;
align-items: center;
justify-content: center;
margin-top: 80rpx;
padding: 0 20rpx;
font-size: 30rpx;
color: #FFC054;
border-radius: 40rpx;
border: 2rpx solid #FFAF54;
}
.top .point {
color: white;
font-size: 32rpx;
margin-right: 20rpx;
margin-top: 10rpx;
opacity: 0.9;
}
/* 背景 */
.item-bg {
padding: 0 32rpx;
@ -104,11 +63,11 @@
.swiper-msg .img {
width: 100%;
height: 100%;
height: 100% !important;
}
.swiper-msg .item .title {
background-color: rgba(0, 0, 0, 0.5);
background-color: #000000BF;
position: absolute;
bottom: 0;
z-index: 1;
@ -162,16 +121,390 @@
font-weight: bold;
color: #222222;
}
/* 为民服务 */
.service{
}
.serviceImg{
}
.service .title{
/* 为民服务 */
.service {
width: 95vw;
height: 100rpx;
margin: 32rpx auto;
background: #FFFFFF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
display: flex;
align-items: center;
}
.service .con{
.service .serviceFuwuImg {
width: 60rpx;
height: 68rpx;
margin-left: 22rpx;
margin-right: 5rpx;
}
.service .service_con{
display: flex;
background-color: #F4F8FFFF;
height: 60rpx;
flex: 1;
margin-right: 40rpx;
align-items: center;
}
.service .service_con .serviceTitleImg {
width: 132rpx;
height: 46rpx;
margin-right: 22rpx;
margin-left: 22rpx;
}
.service .service_con .con {
width: 264rpx;
height: 34rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #A3A9C4;
}
.study {
width: 95vw;
/* height: 100%; */
border-radius: 12rpx;
background-color: #FFFFFFFF;
margin: auto;
}
.studyOption {
width: 88vw;
height: 200rpx;
margin: auto;
display: flex;
padding: 20rpx 0rpx;
}
.study_left {
display: flex;
position: relative;
}
.study_left image {
width: 262rpx;
height: 154rpx;
border-radius: 8rpx;
}
.study_left view {
position: absolute;
top: 0;
left: 0;
width: 110rpx;
height: 40rpx;
border-radius: 8rpx 0rpx 8rpx 0rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
text-align: center;
background-color: #01010166;
}
.study_right {
width: 100%;
margin-left: 20rpx;
display: flex;
flex-direction:column;
justify-content: space-between;
}
.study_right .study_right_title {
font-family: PingFang SC, PingFang SC;
font-weight: 600;
font-size: 28rpx;
color: #333333;
line-height: 40rpx;
text-align: left;
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.study_right .study_right_con{
display: flex;
justify-content: space-between;
font-family: PingFang SC, PingFang SC;
font-size: 22rpx;
color: #545454;
}
.cu-item {
font-size: 30rpx;
font-weight: bold;
}
.filter {
margin: -1rpx;
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
align-items: center;
}
.filter picker {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
}
/* components/notice/index.wxss */
.swiper-msg {
/* margin-top: -80rpx; */
height: 400rpx;
padding: 0;
}
.swiper-msg .item {
width: 100%;
height: 100%;
border-radius: 12rpx;
position: relative;
}
.swiper-msg .img {
width: 100%;
height: 100% !important;
}
.swiper-msg .item .title {
background-color: #000000BF;
position: absolute;
bottom: 0;
z-index: 1;
left: 0;
right: 0;
color: white;
padding: 15rpx 20rpx;
font-size: 28rpx;
}
.study {
width: 95vw;
/* height: 100%; */
border-radius: 12rpx;
background-color: #FFFFFFFF;
margin: 40rpx auto;
}
.studyOption {
width: 88vw;
height: 200rpx;
margin: auto;
display: flex;
padding: 20rpx 0rpx;
}
.study_left {
display: flex;
position: relative;
}
.study_left image {
width: 262rpx;
height: 154rpx;
border-radius: 8rpx;
}
.study_left view {
position: absolute;
top: 0;
left: 0;
width: 110rpx;
height: 40rpx;
border-radius: 8rpx 0rpx 8rpx 0rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
text-align: center;
background-color: #01010166;
}
.study_right {
margin-left: 20rpx;
display: flex;
flex-direction:column;
justify-content: space-between;
}
.study_right .study_right_title {
font-family: PingFang SC, PingFang SC;
font-weight: 600;
font-size: 28rpx;
color: #333333;
line-height: 40rpx;
text-align: left;
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.study_right .study_right_con{
display: flex;
justify-content: space-between;
font-family: PingFang SC, PingFang SC;
font-size: 22rpx;
color: #545454;
}
.suqiucontent{
width: 100%;
}
.suqiucontent view:nth-child(1){
display: flex;
justify-content: space-between;
}
.content {
display: flex;
flex-direction: column;
}
.content .filter {
margin: 0 10rpx;
width: calc(100vw - 20rpx);
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
align-items: center;
}
.content .filter picker {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
}
.content .item {
background-color: #ffffff;
padding: 32rpx 20rpx 20rpx 20rpx;
box-shadow: 0px 0px 6px 1px #DDECF3;
margin: 16rpx 16rpx 0 16rpx;
border-radius: 10rpx;
}
.content .item .val::before {
display: inline-block;
content: '';
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
border-radius: 50%;
background-color: var(--blue);
}
.content .item .val {
font-size: 30rpx;
color: #222222;
margin-left: 16rpx;
padding: 10rpx 0;
}
.item .content {
font-size: 32rpx;
margin-right: 30rpx;
}
.item .content .time::before {
display: inline-block;
content: '';
width: 20rpx;
height: 20rpx;
margin-right: 10rpx;
border-radius: 50%;
background-color: var(--blue);
}
.item .content .title {
display: flex;
align-items: center;
}
.item .content .des {
margin: 10rpx 0;
}
.item .content .time {
font-size: 26rpx;
}
.item .content .title::before {
display: inline-block;
content: '';
width: 10rpx;
height: 30rpx;
margin-right: 10rpx;
border-radius: 5rpx;
background-color: var(--blue);
}
.item .content .des {
font-size: 30rpx;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.item .val {
font-size: 26rpx;
color: #222222;
margin-left: 16rpx;
}
.item .add {
color: var(--blue);
margin-left: 15rpx;
font-size: 30rpx;
margin-left: 20rpx;
}
.item .add .add-tv {
margin-left: 10rpx;
}
.item .line {
margin: 10rpx 0;
border-bottom: 1rpx dashed #f5f5f5;
}
.item .record {
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
color: var(--blue);
}
.item .more {
position: absolute;
right: 10rpx;
}
.line {
width: 1rpx;
height: 80%;
background-color: #f5f5f5;
}
.serve{
background-color: #ffffff;
padding: 10rpx;
margin: 10rpx;
}

View File

@ -0,0 +1,113 @@
// pages/web/index.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
topBarH: app.globalData.CustomBar,
url: '',
title: ''
},
/**
* 查看公开内容详情
*/
getDetail: function (id,type) {
console.log(id,type,'id,type==>');
if (type == "partyMember") {
app.axios("GET", "app", `/partyLearnContent/partyLearnDetail/${id}`, {}, false).then(res => {
if (res.code == 1) {
console.log(res,'res===>');
this.data.content = res.data.content;
this.setData(this.data)
wx.setNavigationBarTitle({
title: res.data.title,
})
}
})
}else if (type == "open") {
app.axios("GET", "app", `/publicContent/publicContentDetail/${id}`, {}, false).then(res => {
if (res.code == 1) {
console.log(res,'res===>');
this.data.content = res.data.content;
this.setData(this.data)
wx.setNavigationBarTitle({
title: res.data.title,
})
}
})
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
const title = options.title || '';
this.data.title = title;
this.setData(this.data)
wx.setNavigationBarTitle({
title,
})
const eventChannel = this.getOpenerEventChannel()
eventChannel.on('getUrl', (url) => {
this.data.url = url;
this.setData(this.data);
})
console.log(options,'options=================>');
this.getDetail(options.id,options.type)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@ -0,0 +1,5 @@
{
"usingComponents": {},
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#366CCF"
}

View File

@ -0,0 +1,5 @@
<!--pages/web/index.wxml-->
<web-view wx:if="{{url}}" src="{{url}}" />
<scroll-view wx:else class="sc">
<rich-text nodes="{{content}}" />
</scroll-view>

View File

@ -0,0 +1,10 @@
/* pages/web/index.wxss */
.web {
width: 100vw;
}
.sc {
background-color: white;
height: 100vh;
padding: 30rpx 20rpx;
}

View File

@ -94,4 +94,54 @@ Page({
onShareAppMessage: function () {
}
})
})
// data: {
// topBarH: app.globalData.CustomBar,
// url: '',
// title: '',
// currentIndex: 0,
// tabs: [{
// lab: '今日工作'
// }, {
// lab: '历史工作'
// }],
// dealContent:'',
// },
// /**
// * 选择菜单
// */
// tabSelect: function (params) {
// this.data.currentIndex = params.currentTarget.dataset.index;
// console.log(this.data.currentIndex,'this.data.currentIndex==>');
// this.setData(this.data);
// this.getDetail();
// },
// /**
// * 获取消息详情
// */
// getDetail: function () {
// let dealKeyWord = '';
// if (this.data.currentIndex == 1) {
// dealKeyWord = 'privacy_deal';
// }else{
// dealKeyWord = 'user_deal';
// }
// app.axios("GET", "app", `/sysKey/dealSetting/${dealKeyWord}`, {}, false).then(res => {
// console.log(res,'res===>');
// if (res.code == 1) {
// this.data.dealContent = res.data.dealContent;
// this.setData(this.data)
// // wx.setNavigationBarTitle({
// // title: res.data.title,
// // })
// }
// })
// },

View File

@ -1,5 +1,10 @@
<!--pages/web/index.wxml-->
<web-view wx:if="{{url}}" src="{{url}}" />
<scroll-view wx:else class="sc">
<!-- <view class="flex text-center">
<view class="cu-item flex-sub {{index==currentIndex?'text-blue cur':''}}" wx:for="{{tabs}}" wx:key catchtap="tabSelect" data-index="{{index}}">
{{item.lab}}
</view>
</view> -->
<rich-text nodes="{{content}}" />
</scroll-view>

View File

@ -7,4 +7,8 @@
background-color: white;
height: 100vh;
padding: 30rpx 20rpx;
}
.cu-item {
font-size: 30rpx;
font-weight: bold;
}

View File

@ -63,6 +63,7 @@ Page({
* 获取列表
*/
getList: function () {
console.log(this.data.curTab,parseInt(this.data.curTab) + 1,'=====>');
app.axios("GET", "app", "/work/receiveWork", {
page: this.data.page,
limit: this.data.pageSize,

View File

@ -164,7 +164,7 @@ Page({
})
return
}
if (!this.data.postData.content) {
if (!this.data.postData.detail) {
wx.showToast({
title: '请输入内容',
icon: 'none'