新增党员页面

This commit is contained in:
du 2024-03-25 17:29:56 +08:00
parent 54d40e74fe
commit ceb48961c9
9 changed files with 484 additions and 43 deletions

3
app.js
View File

@ -50,7 +50,8 @@ App({
globalData: {
versionCode: 'V1',
userInfo: {},
headerUrl: "http://42.193.40.239:8017/"
// headerUrl: "http://42.193.40.239:8017/"
headerUrl: "http://192.168.110.10:8017/"
// headerUrl: "http://192.168.110.186:8017/"
},

View File

@ -20,7 +20,8 @@
"pages/emergency/y-a/index/index",
"pages/emergency/s-b/index/index",
"pages/emergency/t-x/index/index",
"pages/work/d-b-s-x/up/index"
"pages/work/d-b-s-x/up/index",
"pages/the-masses/index/index"
],
"window": {
"backgroundTextStyle": "light",

View File

@ -81,7 +81,8 @@ Page({
data: res.data,
})
wx.reLaunch({
url: '/pages/index/index',
// url: '/pages/index/index',
url: '/pages/the-masses/index/index',
})
} else {
wx.showToast({
@ -100,7 +101,8 @@ Page({
this.setData(this.data);
if (app.globalData.userInfo.userId) {
wx.reLaunch({
url: '/pages/index/index',
// url: '/pages/index/index',
url: '/pages/the-masses/index/index',
})
}
},
@ -111,7 +113,8 @@ Page({
onLoad(options) {
if (app.globalData.userInfo.userId) {
wx.reLaunch({
url: '/pages/index/index',
// url: '/pages/index/index',
url: '/pages/the-masses/index/index',
})
}
},

View File

@ -9,26 +9,12 @@ Page({
data: {
topBarH: app.globalData.CustomBar,
currentIndex: 0,
tab: [{
label: '常规工作',
val: 2
}, {
label: '督办工作',
val: 2
}, {
label: '已办事项',
val: 2
}, {
label: '待办事项',
val: 2
}],
list: [{
factorcnt: '开展安全生产工作调研和检查指导'
}, {
factorcnt: '认真贯彻执行党中央及上级党委关于安全生产工作的决策部署和指示精神。'
}],
onTime:'',
endTime:'',
tab: [],
list: [],
startTime: '',
endTime: '',
page: 1,
pageSize: 10,
},
/**
@ -36,28 +22,89 @@ 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);
},
/**
* 开始时间
*/
onTimeChange: function(e){
this.data.onTime = e.detail.value;
this.setData(this.data)
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);
},
/**
* 开始时间
*/
endTimeChange: function(e){
endTimeChange: function (e) {
this.data.endTime = e.detail.value;
this.setData(this.data)
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", `/work/workCount/${1}`).then(res => {
if (res.code == 1) {
this.data.tab = res.data;
this.setData(this.data);
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();
},
/**
* 获取工作统计每项数据列表
*/
getList: function (id) {
let params = {
limit:this.data.pageSize,
page:this.data.page,
endTime:this.data.endTime,
startTime:this.data.startTime,
typeId:id,
};
console.log(params,'params===>');
app.axios("GET", "app", `/work/workListPage`, 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) {
this.data.freshIng = true;
this.setData(this.data);
this.getType();
},
/**
@ -98,7 +145,7 @@ Page({
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
onReachBottom(data) {
},

View File

@ -1,11 +1,11 @@
<!--pages/t-j/g-z/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="{{onTime}}" bindchange="onTimeChange">
<picker mode="date" value="{{startTime}}" bindchange="startTimeChange">
<view class="picker">
开始时间: {{onTime}}
开始时间: {{startTime}}
</view>
</picker>
<view class="line"></view>
@ -16,9 +16,9 @@
</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.count}}</text>
<text class="flex">条记录</text>
<image wx:if="{{currentIndex==index}}" class="arrow" src="/images/icon-checked.png" />
</view>
@ -26,9 +26,9 @@
<!-- 列表 -->
<view catchtap="toDetail" data-item="{{item}}" class="item h-div" wx:for="{{list}}">
<view class="content">
<view class="title">标题</view>
<view class="des">{{item.factorcnt}}</view>
<view class="time">时间:2024-01-26</view>
<view class="title">{{item.chinaName}}</view>
<view class="des">{{item.title}}</view>
<view class="time">时间:{{item.createTime}}</view>
</view>
</view>
<view class="space"></view>

View File

@ -0,0 +1,183 @@
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"
},
],
// 公告
notice: [],
showPop: false,
msgData: null,
checkInfo: {},
userInfo: {}
},
/**
* 跳转
*/
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,
})
}
},
/**
* 获取banner
*/
getBanner: function () {
app.axios("GET", "app", "/notice/lastFourNotice", {
page: 1,
limit: 4,
userId: app.globalData.userInfo.userId
}, false).then(res => {
wx.stopPullDownRefresh();
if (res.code == 1) {
this.data.notice = res.data;
this.setData(this.data)
}
})
},
/**
* 通知详情
*/
toMsgDetail: function (params) {
const item = params.currentTarget.dataset.item;
wx.navigateTo({
url: `/pages/web/index?id=${item.govNoticeId}`,
})
},
onLoad(option) {
this.data.userInfo = app.globalData.userInfo;
this.getBanner();
},
onReady() {
},
onPullDownRefresh() {
this.getBanner();
}
})

View File

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

View File

@ -0,0 +1,24 @@
<!--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="service">
<image class="serviceImg" src="/images/home/icon_top-bg.png"/>
<view class="title">为民服务</view>
<view class="con">点击直接上报群众问题!</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>

View File

@ -0,0 +1,177 @@
/**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;
}
.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%;
}
.swiper-msg .item .title {
background-color: rgba(0, 0, 0, 0.5);
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{
}
.serviceImg{
}
.service .title{
}
.service .con{
}