Compare commits

...

11 Commits

Author SHA1 Message Date
du
1913075cb8 2024.7.11 2024-07-11 10:52:11 +08:00
du
49ea865a0b Merge branch 'master' of http://gitea.sczysoft.com/ganzi/daofu-applet 2024-06-19 15:43:00 +08:00
du
7987e15080 20240619 2024-06-19 15:42:55 +08:00
HH
b225fd874b fix:bug修复 2024-06-19 09:18:13 +08:00
du
0a6d79e4bc 6.14 2024-06-14 15:00:33 +08:00
du
40b6064392 Merge branch 'master' of http://gitea.sczysoft.com/ganzi/daofu-applet 2024-06-07 15:58:31 +08:00
du
120e49a293 新增发布工作 2024-06-07 15:58:25 +08:00
HH
9b0d21f66a fix:文件阅览 2024-06-07 15:22:47 +08:00
du
8d356e43e6 Merge branch 'master' of http://gitea.sczysoft.com/ganzi/daofu-applet 2024-06-06 18:02:55 +08:00
du
1d283a01c3 发布工作 2024-06-06 18:02:51 +08:00
HH
ce6fa3ed78 fix:界面调整 2024-06-06 17:57:07 +08:00
57 changed files with 2153 additions and 139 deletions

7
app.js
View File

@ -51,8 +51,8 @@ App({
versionCode: 'V1', versionCode: 'V1',
userInfo: {}, 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.10:8017/" //线下
headerUrl: "http://192.168.110.186:8017/" // headerUrl: "http://192.168.110.186:8017/"
// headerUrl: "https://city.sczysoft.com/df/" // headerUrl: "https://city.sczysoft.com/df/"
}, },
// https://city.sczysoft.com/df/doc.html //接口 // https://city.sczysoft.com/df/doc.html //接口
@ -72,13 +72,14 @@ App({
resumptionAcs: "WorkFile", // 履职附件 resumptionAcs: "WorkFile", // 履职附件
msgAcs: "MsgAcs", // 消息附件 msgAcs: "MsgAcs", // 消息附件
eventAcs: "eventAcs", //突发/应急事件上报 eventAcs: "eventAcs", //突发/应急事件上报
demandsEscalation :"demandsEscalation",//群众诉求上报
userSign: "UserSign", //用户签名 userSign: "UserSign", //用户签名
EmergencyImg: "Content", // 应急预案---一图一表 EmergencyImg: "Content", // 应急预案---一图一表
EmergencyFile: "EmergencyFile", // 应急预案---文件 EmergencyFile: "EmergencyFile", // 应急预案---文件
EmergencyPlanFile: "EmergencyPlanFile", // 应急演练---文件 EmergencyPlanFile: "EmergencyPlanFile", // 应急演练---文件
workManagement : 'workManagement',//工作管理
}, },
// 请求函数封装 // 请求函数封装

View File

@ -36,8 +36,11 @@
"pages/statistic/j-b-x-x/personnel/index", "pages/statistic/j-b-x-x/personnel/index",
"pages/statistic/j-b-x-x/detail/index", "pages/statistic/j-b-x-x/detail/index",
"pages/work/f-b-g-z/index/index", "pages/work/f-b-g-z/index/index",
"pages/work/f-b-g-z/serve/index",
"pages/risk-pool/index", "pages/risk-pool/index",
"pages/risk-pool/add-pool/index" "pages/risk-pool/add-pool/index",
"pages/statistic/j-b-x-x/domicileDetail/index",
"pages/emergency/z-s/index/index"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/home/icon_w_6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/home/icon_yj_5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -15,9 +15,9 @@ Page({
showTypePop: false, showTypePop: false,
showAdvicePop: false, showAdvicePop: false,
TypeData: [], TypeData: [],
postData: {},
files: [], files: [],
userInfo:{}, userInfo:{},
othplanList:[],
areamultiArray:[], areamultiArray:[],
areamultiIndex: [0, 0, 0], areamultiIndex: [0, 0, 0],
@ -32,6 +32,21 @@ Page({
newArr: [], newArr: [],
organization:[], organization:[],
organizationtate : false, organizationtate : false,
areashowTypePop:false,
postData:{
organization:'',
organizationName:''
},
//筛选树结构
areaCode:'',
areaPathName:'',
unitTreepros: {
key: 'performclassname',
val: 'listperformid'
},
unitTreelist: [],
}, },
/** /**
@ -90,7 +105,7 @@ Page({
return return
} }
if (this.data.organizationtate==false) { if (!this.data.postData.organization) {
wx.showToast({ wx.showToast({
title: '请选择所属组织', title: '请选择所属组织',
icon: 'none' icon: 'none'
@ -124,9 +139,12 @@ Page({
emerEventId:this.data.uuid, emerEventId:this.data.uuid,
userId:this.data.userInfo.userId, userId:this.data.userInfo.userId,
address:this.data.postData.addressName, address:this.data.postData.addressName,
areaCode:'',
organization:'',
}; };
data.listPerformId = this.data.organization?this.data.multiArray[0].children[0].children[this.data.organization[2]].listperformid:''; // 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:''; data.areaCode = this.data.areamultiArray[0].children[this.data.area[1]].orgcode?this.data.areamultiArray[0].children[this.data.area[1]].orgcode:'';
data.listPerformId=this.data.postData.organization;
console.log(data,'data===>'); console.log(data,'data===>');
app.axios("POST", "app", `/emerEvent/saveEmerEvent`,data).then(res => { app.axios("POST", "app", `/emerEvent/saveEmerEvent`,data).then(res => {
console.log(res,'res===>'); console.log(res,'res===>');
@ -291,8 +309,14 @@ Page({
getEmerEventDetail: function (id) { getEmerEventDetail: function (id) {
app.axios("GET", "app", `/emerEvent/emerEventDetail/${id}`).then(res => { app.axios("GET", "app", `/emerEvent/emerEventDetail/${id}`).then(res => {
if (res.code == 1) { if (res.code == 1) {
console.log(res.data,'res=====>');
this.data.postData = res.data; this.data.postData = res.data;
this.data.postData.emerTypeName; this.data.postData.emerTypeName;
this.data.addressName = res.data.address;
this.data.postData.addressName = res.data.address;
// this.data.postData.areaPathName = res.data.performclassname;
this.data.postData.organizationName = res.data.performclassname;
this.data.othplanList = res.data.othplanList;
for (let index = 0; index < this.data.TypeData.length; index++) { for (let index = 0; index < this.data.TypeData.length; index++) {
if (this.data.TypeData[index].emerTypeName == res.data.emerTypeName) { if (this.data.TypeData[index].emerTypeName == res.data.emerTypeName) {
this.data.postData.type = index+1; this.data.postData.type = index+1;
@ -536,6 +560,90 @@ toShowAddress() {
}, },
}) })
}, },
/**
* 显示/关闭弹窗筛选
*/
areapopModal: function (params) {
console.log(params,'params===>');
const type = params.currentTarget.dataset.type;
this.data[type] = !this.data[type];
this.setData(this.data)
},
/**
* 获取地区
*/
getAreaTreetext: function () {
app.axios("GET", "app", "/Sys/getListperformTree").then(res => {
if (res.code == 1) {
this.data.unitTreelist = res.data;
console.log(res.data,'res====>');
this.setData(this.data)
}
})
},
handleselectunit(e) {
// e.detail 选中的id数组
this.data.page = 1;
this.data.list = [];
let postData = this.data.postData; // 获取当前的 postData 对象
console.log(postData,'postData==>');
postData.organization = e.detail.item.listperformid;
postData.organizationName = e.detail.item.performclassname;
this.setData({
postData: postData,
areashowTypePop:false
}); // 设置更新后的 postData 对象
},
// 应急上报下载文件
download :function (item) {
console.log(item,'item====>');
console.log(this.data.baseUrl+item.currentTarget.dataset.item.filePath);
//触发点击事件使用uni.showLoading()展示交互提示
wx.showLoading({
title: '正在下载……'
});
// 使用wx.downloadFile()开始下载文件
wx.downloadFile({
url: this.data.baseUrl+item.currentTarget.dataset.item.filePath, //url:请求的完整地址
success: function(res) {
wx.hideLoading() //调用结束,隐藏加载框
const filePath = res.tempFilePath //临时文件路径 (本地路径)
if (res.statusCode == 200) {
//判断后端数据接收成功时提示下载完成
wx.showToast({
icon: 'none',
mask: true,
title: '下载完成,正在打开文件...',
duration: 2000,
});
}
//设置定时器2秒后打开文件
setTimeout(() => {
//调用wx.openDocument()打开刚刚下载的文件
wx.openDocument({
filePath: filePath, //上一步存储的临时文件路径 (本地路径)
fileType: item.type, //要打开的文件类型,
showMenu: true, //是否显示右上角菜单
//下面的测试用了,写不写无所谓
success: function(res) {
},
complete: function(msg) {
}
})
}, 2000)
},
//文件下载失败会走这里具体可以把err打印出来看看有什么错误
fail: (err) => {
uni.showToast({
icon: 'none',
mask: true,
title: '文件下载失败',
});
},
})
},
@ -551,8 +659,8 @@ toShowAddress() {
this.getEmerEventType(); this.getEmerEventType();
this.getAreaTree(); this.getAreaTree();
this.getAreaTree1(); this.getAreaTree1();
this.getAreaTreetext();
if (options.emerEventId) { if (options.emerEventId) {
console.log(options.emerEventId,'options.emerEventId===>');
this.getEmerEventDetail(options.emerEventId) this.getEmerEventDetail(options.emerEventId)
} }
}, },

View File

@ -2,12 +2,12 @@
<title-bar title="应急上报"></title-bar> <title-bar title="应急上报"></title-bar>
<scroll-view scroll-y refresher-enabled style="height: calc(100vh - {{topBarH}}px);"> <scroll-view scroll-y refresher-enabled style="height: calc(100vh - {{topBarH}}px);">
<view class="item"> <view class="item">
<!-- 标题 --> <!-- 标题 -->
<view class="h-div v-center header"> <view class="h-div v-center header">
<text class="single"></text> <text class="single"></text>
<text class="title">标题</text> <text class="title">标题</text>
</view> </view>
<input bindinput="inputContent" data-name="title" class="put v-div h-center" placeholder="请输入标题" value="{{postData.title}}"></input> <input bindinput="inputContent" data-name="title" class="put v-div h-center" placeholder="请输入标题" value="{{postData.title}}"></input>
<!-- 时间 --> <!-- 时间 -->
<view class="h-div v-center header"> <view class="h-div v-center header">
<text class="single"></text> <text class="single"></text>
@ -28,41 +28,33 @@
<text class="title">事件类型</text> <text class="title">事件类型</text>
</view> </view>
<input catchtap="popModal" data-type="showTypePop" disabled class="put v-div h-center" placeholder="请选择" value="{{TypeData[postData.type-1].emerTypeName}}"></input> <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"> <view class="h-div v-center header">
<text class="single"></text> <text class="single"></text>
<text class="title">地区</text> <text class="title">地区</text>
</view> </view>
<picker mode="multiSelector" bindchange="areabindMultiPickerChange" bindcolumnchange="areabindMultiPickerColumnChange" <picker mode="multiSelector" bindchange="areabindMultiPickerChange" bindcolumnchange="areabindMultiPickerColumnChange" value="{{areamultiIndex}}" range="{{areanewArr}}">
value="{{areamultiIndex}}" range="{{areanewArr}}"> <view class="picker picker1">
<view class="picker picker1"> <!-- 当前选择: <van-button type="primary">
<!-- 当前选择: <van-button type="primary">
{{areanewArr[0][areamultiIndex[0]]}}{{areanewArr[1][areamultiIndex[1]]}}{{areanewArr[2][areamultiIndex[2]]}}</van-button> --> {{areanewArr[0][areamultiIndex[0]]}}{{areanewArr[1][areamultiIndex[1]]}}{{areanewArr[2][areamultiIndex[2]]}}</van-button> -->
<view>当前选择:{{areamultiArray[0].children[area[1]].orgname}}</view> <view>当前选择:{{areamultiArray[0].children[area[1]].orgname}}</view>
</view> </view>
</picker> </picker>
<!-- 所属组织 --> <!-- 所属组织 -->
<view class="h-div v-center header"> <view class="h-div v-center header">
<text class="single"></text> <text class="single"></text>
<text class="title">所属组织</text> <text class="title">所属组织</text>
</view> </view>
<picker mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" <view catchtap="areapopModal" data-type="areashowTypePop" class="picker1">
value="{{multiIndex}}" range="{{newArr}}"> 当前选择:{{postData.organizationName}}
<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> </view>
</picker> <view class="h-div v-center header">
<!-- 详细地址 -->
<view class="h-div v-center header">
<text class="single"></text> <text class="single"></text>
<text class="title">详细地址</text> <text class="title">详细地址</text>
</view> </view>
<view catchtap="toShowAddress" class="picker1"> <view catchtap="toShowAddress" class="picker1">
地址:{{postData.addressName}} 地址:{{postData.addressName}}
</view> </view>
<!-- 内容 --> <!-- 内容 -->
<view class="h-div v-center header"> <view class="h-div v-center header">
@ -82,6 +74,21 @@
<image class="img" src="{{baseUrl+item.filepath}}" catchtap="filePre" data-url="{{item.filepath}}" /> <image class="img" src="{{baseUrl+item.filepath}}" catchtap="filePre" data-url="{{item.filepath}}" />
</view> </view>
</view> </view>
<view class="plan">
<view class="plan_div" wx:for="{{othplanList}}" data-item="{{item}}">
<view class="plan_top">
<view class="plan_name">预案名称:</view>
<view class="plan_cent">{{item.planname}}</view>
</view>
<view class="plan_top">
<view class="plan_name">预案简介:</view>
<view class="plan_cent">{{item.introduction}}</view>
</view>
<view data-item="{{item}}" catchtap="download" class="h-div v-center" >
<text class="download">附件下载</text>
</view>
</view>
</view>
</view> </view>
<view class="space"></view> <view class="space"></view>
</scroll-view> </scroll-view>
@ -108,4 +115,20 @@
</view> </view>
</radio-group> </radio-group>
</view> </view>
</view>
<!-- 选择所属组织 -->
<view class="cu-modal {{areashowTypePop?'show':''}}">
<view class="cu-dialog pop" catchtap>
<view class="cu-bar justify-end pop-header">
<view class="content">选择所属组织</view>
<view class="action" catchtap="areapopModal" data-type="areashowTypePop">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<radio-group class="block" style="max-height: 50vh;overflow-y: scroll;">
<tree-node id="tree" dataTree="{{unitTreelist}}" pros="{{unitTreepros}}" bindselect="handleselectunit" isOpenAll="true" />
</radio-group>
</view>
</view> </view>

View File

@ -120,4 +120,40 @@ scroll-view {
margin-top: 16rpx; margin-top: 16rpx;
color: #333333; color: #333333;
font-size: 28rpx; font-size: 28rpx;
} }
.item {
width: 686rpx;
/* height: 296rpx; */
background-color: #FFFFFF;
margin: 32rpx auto;
border-radius: 16rpx;
padding: 32rpx;
position: relative;
}
.item_bot {
padding-top: 24rpx;
}
.item_address {
width: 100%;
}
.plan{
margin-top: 50rpx;
}
.plan_div{
border-radius: 10rpx;
padding: 20rpx;
margin-top: 30rpx;
background: #F5F7FC;
}
.plan_top{
display: flex;
}
.plan_name{
width: 250rpx;
font-size: 35rpx;
font-weight: bold;
}
.plan_cent{
font-size: 30rpx;
margin-top: 10rpx;
}

View File

@ -79,5 +79,10 @@ Component({
this.setData(this.data); this.setData(this.data);
}) })
}, },
call:function(data){
wx.makePhoneCall({
phoneNumber: data.currentTarget.dataset.mobiletel,
})
},
} }
}) })

View File

@ -14,7 +14,7 @@
<view class="h-div v-center"> <view class="h-div v-center">
<text class="lab">联系人:</text> <text class="lab">联系人:</text>
<text class="val flex">{{item.chinaname}}</text> <text class="val flex">{{item.chinaname}}</text>
<text class="phone">{{item.mobiletel}}</text> <text class="phone" data-mobiletel="{{item.mobiletel}}" catchtap="call">{{item.mobiletel}}</text>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="h-div v-center"> <view class="h-div v-center">

View File

@ -100,6 +100,12 @@ Component({
scale: 18, scale: 18,
}); });
}, },
// 拨打电话
call:function(data){
wx.makePhoneCall({
phoneNumber: data.currentTarget.dataset.principaltel,
})
},
/** /**
* 获取列表 * 获取列表

View File

@ -20,7 +20,7 @@
<view class="h-div v-center"> <view class="h-div v-center">
<text class="lab">联系人:</text> <text class="lab">联系人:</text>
<text class="val flex">{{item.principal}}</text> <text class="val flex">{{item.principal}}</text>
<text class="phone">{{item.principaltel}}</text> <text class="phone" data-principaltel="{{item.principaltel}}" catchtap="call">{{item.principaltel}}</text>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="h-div v-center"> <view class="h-div v-center">

View File

@ -13,6 +13,7 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
baseUrl: app.FILE_SERVER_URL,
condition: '', condition: '',
curTab: 0, curTab: 0,
tabs: [], tabs: [],
@ -21,7 +22,7 @@ Component({
freshIng: false, freshIng: false,
page: 1, page: 1,
pageSize: 10, pageSize: 10,
list: [] list: [],
}, },
pageLifetimes: { pageLifetimes: {
@ -90,7 +91,55 @@ Component({
this.setData(this.data) this.setData(this.data)
}) })
}, },
download :function (item) {
console.log(item,'item====>');
console.log(this.data.baseUrl+item.currentTarget.dataset.item.filePath);
//触发点击事件使用uni.showLoading()展示交互提示
wx.showLoading({
title: '正在下载……'
});
// 使用wx.downloadFile()开始下载文件
wx.downloadFile({
url: this.data.baseUrl+item.currentTarget.dataset.item.filePath, //url:请求的完整地址
success: function(res) {
wx.hideLoading() //调用结束,隐藏加载框
const filePath = res.tempFilePath //临时文件路径 (本地路径)
if (res.statusCode == 200) {
//判断后端数据接收成功时提示下载完成
wx.showToast({
icon: 'none',
mask: true,
title: '下载完成,正在打开文件...',
duration: 2000,
});
}
//设置定时器2秒后打开文件
setTimeout(() => {
//调用wx.openDocument()打开刚刚下载的文件
wx.openDocument({
filePath: filePath, //上一步存储的临时文件路径 (本地路径)
fileType: item.type, //要打开的文件类型,
showMenu: true, //是否显示右上角菜单
//下面的测试用了,写不写无所谓
success: function(res) {
},
complete: function(msg) {
}
})
}, 2000)
},
//文件下载失败会走这里具体可以把err打印出来看看有什么错误
fail: (err) => {
uni.showToast({
icon: 'none',
mask: true,
title: '文件下载失败',
});
},
})
},
/** /**
* 获取预案类型 * 获取预案类型
*/ */

View File

@ -13,7 +13,7 @@
</view> </view>
</view> </view>
<view class="item-bg" wx:for="{{list}}"> <view class="item-bg" wx:for="{{list}}">
<view catchtap="toDetail" data-item="{{item}}" class="item"> <view data-item="{{item}}" class="item">
<view class="h-div v-center"> <view class="h-div v-center">
<text class="lab">预案名称:</text> <text class="lab">预案名称:</text>
<text class="val">{{item.planname}}</text> <text class="val">{{item.planname}}</text>
@ -29,7 +29,7 @@
<text class="val">{{item.introduction}}</text> <text class="val">{{item.introduction}}</text>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="h-div v-center"> <view data-item="{{item}}" catchtap="download" class="h-div v-center" >
<text class="download">附件下载</text> <text class="download">附件下载</text>
</view> </view>
</view> </view>

View File

@ -0,0 +1,115 @@
// pages/emergency/z-s/index/index.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
topBarH: app.globalData.CustomBar,
baseUrl: app.FILE_SERVER_URL,
page: 1,
pageSize: 10,
list: []
},
/**
* 刷新
*/
refresh: function (params) {
this.data.page = 1;
this.getList();
},
/**
* 获取列表
*/
getList: function () {
console.log(this.data.curTab,parseInt(this.data.curTab) + 1,'=====>');
app.axios("GET", "app", "/Othteam/dutyList", {
page: this.data.page,
limit: this.data.pageSize,
startTime: this.data.startTime || '',
endTime: this.data.endTime || '',
condition: this.data.condition || '',
state: parseInt(this.data.curTab) + 1,
userId: app.globalData.userInfo.userId
}, false).then(res => {
console.log(res,'resresres==>');
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)
})
},
// 拨打电话
call:function(data){
wx.makePhoneCall({
phoneNumber: data.currentTarget.dataset.mobile,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getList();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

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

View File

@ -0,0 +1,25 @@
<!--pages/emergency/z-s/index/index.wxml-->
<title-bar title="应急值守"></title-bar>
<scroll-view scroll-y style="height: calc(100vh - 100rpx - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="getList" lower-threshold="300" refresher-triggered="{{freshIng}}">
<!-- 列表 -->
<view class="item-bg" wx:for="{{list}}">
<view class="item">
<view class="head h-div v-center">
<view class="single"></view>
<view class="title ellipsis flex">{{item.name}}</view>
</view>
<view class="center">
<view>
<view class="time mobile" data-mobile="{{item.mobile}}" catchtap="call">联系电话:{{item.mobile}}</view>
<view class="time">值班时间:{{item.dutyTime}}</view>
<view class="time">值班地点:{{item.postName}}</view>
<view class="time">所属区域:{{item.areaName}}</view>
</view>
</view>
</view>
</view>
<empty wx:if="{{list.length==0}}" />
<view class="space"></view>
</scroll-view>

View File

@ -0,0 +1,161 @@
page {
background-color: #f5f5f5;
}
.filter {
margin: 0 10rpx 10rpx 10rpx;
width: calc(100vw - 20rpx);
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
align-items: center;
position: sticky;
top: 0;
border-bottom: 1rpx solid #f5f5f5;
}
.filter picker {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
.cu-item {
font-size: 30rpx;
font-weight: bold;
}
.search {
height: 90rpx;
background-color: #f5f5f5;
}
.cu-bar .search-form {
background: #FFFFFF;
box-shadow: 0rpx 0rpx 12rpx 2rpx #DDECF3;
border-radius: 12rpx;
}
.item-bg {
padding: 0 32rpx 20rpx 32rpx;
background-color: #f5f5f5;
margin-top: 50rpx;
}
.item {
background-color: #ffffff;
padding: 32rpx 20rpx 20rpx 20rpx;
position: relative;
border-radius: 10rpx;
z-index: 2;
}
.item .head {
margin: 0 -20rpx;
margin-top: -32rpx;
background-color: #CDE5FC;
padding: 16rpx;
border-radius: 10rpx 10rpx 0 0;
}
.item .head .single {
width: 8rpx;
height: 36rpx;
background: #4882EE;
border-radius: 4rpx;
}
.item .head .title {
flex: 1;
margin-left: 16rpx;
font-size: 28rpx;
font-weight: bold;
color: #4882EE;
}
.item .head .status {
font-weight: bold;
font-size: 28rpx;
}
.item .tv {
font-size: 32rpx;
color: #222222;
padding-top: 20rpx;
margin-bottom: 10rpx;
}
.item .time {
font-size: 26rpx;
color: #666666;
padding-top: 10rpx;
}
.item .done {
color: rgb(12, 118, 240);
border-radius: 8rpx;
padding: 5rpx 20rpx;
background-color: rgba(0, 0, 0, 0.2);
}
.item .bottom {
font-size: 26rpx;
font-weight: bold;
color: #222222;
}
.item .g-container {
flex: 1;
height: 16rpx;
border-radius: 50rpx;
background: #eee;
margin: 20rpx 0;
}
.item .g-progress {
width: 50%;
height: inherit;
border-radius: 50rpx;
}
.item .val {
font-size: 26rpx;
font-weight: 500;
color: #222222;
margin-left: 20rpx;
}
.item .line {
margin: 20rpx -20rpx;
border-top: 2rpx dashed #f5f5f5;
}
.item .bottom-img {
width: calc(100vw - 65rpx);
max-width: calc(100vw - 65rpx);
height: 40rpx;
margin: 0 -20rpx;
position: absolute;
bottom: 0;
z-index: -1;
}
.center{
display: flex;
justify-content: space-between;
align-items: center;
}
.content_img{
width: 180rpx;
height: 140rpx;
}
.content_img image{
width: 100%;
height: 100%;
}
.mobile{
font-size: 35rpx !important;
color: #4882EE !important;
}

View File

@ -136,6 +136,11 @@ Page({
name: "指挥体系", name: "指挥体系",
href: "/pages/emergency/t-x-l/index/index" href: "/pages/emergency/t-x-l/index/index"
}, },
{
icon: "icon_yj_5",
name: "应急值守",
href: "/pages/emergency/z-s/index/index"
},
], ],
// 公告 // 公告

View File

@ -16,7 +16,7 @@
} }
.top { .top {
width: 100vw; width: 100vw;
height: 380rpx; height: 450rpx;
position: relative; position: relative;
} }

View File

@ -8,10 +8,10 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
username: 'admin', // username: 'admin',
password: 'Daofu202406', // password: 'Daofu202406',
// username: '', username: '',
// password: '', password: '',
showLogin: true, showLogin: true,
newname:'', newname:'',
newphone:'', newphone:'',
@ -180,7 +180,6 @@ Page({
classify: 2 classify: 2
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
console.log(res,'res===>');
this.data.TypeData = res.data; this.data.TypeData = res.data;
this.setData(this.data) this.setData(this.data)
} }

View File

@ -1,5 +1,5 @@
<!--pages/login/index.wxml--> <!--pages/login/index.wxml-->
<image class="bg-img" src="/images/bg.png" mode="aspectFill" /> <image class="bg-img" src="https://city.sczysoft.com/dffile/resource/df/bg.png" mode="aspectFill" />
<view class="top"> <view class="top">
<text class="nh">您好!</text> <text class="nh">您好!</text>
<text class="des">欢迎来到鲜水镇“智慧鲜水”数字化平台</text> <text class="des">欢迎来到鲜水镇“智慧鲜水”数字化平台</text>

View File

@ -224,9 +224,17 @@ Page({
*/ */
toMsgDetail: function (params) { toMsgDetail: function (params) {
const item = params.currentTarget.dataset.item; const item = params.currentTarget.dataset.item;
wx.navigateTo({ console.log(params,'params===>');
url: `/pages/the-masses/web/index?id=${item.publicContentId}`, if (params.currentTarget.dataset.type == 'partyMember') {
}) wx.navigateTo({
url: `/pages/the-masses/web/index?id=${item.learnContentId}&type=partyMember`,
})
}else{
wx.navigateTo({
url: `/pages/the-masses/web/index?id=${item.publicContentId}&type=publicContent`,
})
}
}, },
/** /**

View File

@ -45,11 +45,11 @@
<!-- 云学习 --> <!-- 云学习 -->
<swiper wx:if="{{curTab==2}}" class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'> <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}}"> <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> <image catchtap="toMsgDetail" data-type="partyMember" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
<text class="title ellipsis">{{item.title}}</text> <text class="title ellipsis">{{item.title}}</text>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view wx:if="{{curTab==2}}" class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}"> <view wx:if="{{curTab==2}}" class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}" data-type="partyMember">
<view class="study_left"> <view class="study_left">
<image src="{{baseImgUrl+item.coverPath}}" /> <image src="{{baseImgUrl+item.coverPath}}" />
<!-- <view>政策法规</view> --> <!-- <view>政策法规</view> -->
@ -62,12 +62,12 @@
<view wx:if="{{curTab==3}}"> <view wx:if="{{curTab==3}}">
<swiper class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'> <swiper class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'>
<swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}"> <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> <image catchtap="toMsgDetail" data-type="publicContent" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
<text class="title ellipsis">{{item.title}}</text> <text class="title ellipsis">{{item.title}}</text>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="study"> <view class="study">
<view class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}"> <view class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}" data-type="publicContent">
<view class="study_left"> <view class="study_left">
<image src="{{baseImgUrl+item.coverPath}}" /> <image src="{{baseImgUrl+item.coverPath}}" />
<!-- <view>政策法规</view> --> <!-- <view>政策法规</view> -->

View File

@ -242,10 +242,21 @@ Page({
* 通知详情 * 通知详情
*/ */
toMsgDetail: function (params) { toMsgDetail: function (params) {
// const item = params.currentTarget.dataset.item;
// wx.navigateTo({
// url: `/pages/the-masses/web/index?id=${item.publicContentId}`,
// })
const item = params.currentTarget.dataset.item; const item = params.currentTarget.dataset.item;
wx.navigateTo({ console.log(params,'params===>');
url: `/pages/the-masses/web/index?id=${item.publicContentId}`, if (params.currentTarget.dataset.type == 'partyMember') {
}) wx.navigateTo({
url: `/pages/the-masses/web/index?id=${item.learnContentId}&type=partyMember`,
})
}else{
wx.navigateTo({
url: `/pages/the-masses/web/index?id=${item.publicContentId}&type=publicContent`,
})
}
}, },
onLoad(option) { onLoad(option) {

View File

@ -8,7 +8,8 @@
</view> </view>
</view> </view>
<view class="logo"> <view class="logo">
<image class="img" src="/images/logo.png"/> <!-- <image class="img" src="/images/logo.png"/> -->
<image class="img" src="https://city.sczysoft.com/dffile/resource/df/logo1.png"/>
<view> <view>
做干部群众和党员队伍的 做干部群众和党员队伍的
<view>领头雁!</view> <view>领头雁!</view>
@ -60,11 +61,11 @@
<!-- 云学习 --> <!-- 云学习 -->
<swiper wx:if="{{curTab==2}}" class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'> <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}}"> <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> <image catchtap="toMsgDetail" data-item="{{item}}" data-type="partyMember" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
<text class="title ellipsis">{{item.title}}</text> <text class="title ellipsis">{{item.title}}</text>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view wx:if="{{curTab==2}}" class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}"> <view wx:if="{{curTab==2}}" class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}" data-type="partyMember">
<view class="study_left"> <view class="study_left">
<image src="{{baseImgUrl+item.coverPath}}" /> <image src="{{baseImgUrl+item.coverPath}}" />
<!-- <view>政策法规</view> --> <!-- <view>政策法规</view> -->
@ -77,12 +78,12 @@
<view wx:if="{{curTab==3}}"> <view wx:if="{{curTab==3}}">
<swiper class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'> <swiper class="item-bg swiper-msg" autoplay indicator-dots indicator-active-color='#ffffff'>
<swiper-item class="item" wx:for="{{notice}}" wx:key="{{item}}"> <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> <image catchtap="toMsgDetail" data-item="{{item}}" data-type="publicContent" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
<text class="title ellipsis">{{item.title}}</text> <text class="title ellipsis">{{item.title}}</text>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="study"> <view class="study">
<view class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}"> <view class="studyOption" wx:for="{{list}}" wx:key="{{item}}" catchtap="toMsgDetail" data-item="{{item}}" data-type="publicContent">
<view class="study_left"> <view class="study_left">
<image src="{{baseImgUrl+item.coverPath}}" /> <image src="{{baseImgUrl+item.coverPath}}" />
<!-- <view>政策法规</view> --> <!-- <view>政策法规</view> -->

View File

@ -12,6 +12,7 @@ Page({
*/ */
data: { data: {
topBarH: app.globalData.CustomBar, topBarH: app.globalData.CustomBar,
baseUrl: app.FILE_SERVER_URL,
currentIndex: 0, currentIndex: 0,
tabs: [{ tabs: [{
lab: '今日工作' lab: '今日工作'
@ -63,6 +64,7 @@ Page({
endTime: time, endTime: time,
userId: app.globalData.userInfo.userId userId: app.globalData.userInfo.userId
}, false).then(res => { }, false).then(res => {
console.log(res,'res===>');
this.data.freshIng = false; this.data.freshIng = false;
if (res.code == 1) { if (res.code == 1) {
let page = Number.parseInt(res.data.pageNum); let page = Number.parseInt(res.data.pageNum);

View File

@ -20,6 +20,9 @@
<view class="des">{{item.detail}}</view> <view class="des">{{item.detail}}</view>
<view class="time">时间:{{item.createTime}}</view> <view class="time">时间:{{item.createTime}}</view>
</view> </view>
<view class="content_img">
<image src="{{baseUrl+item.filePath}}" mode=""/>
</view>
</view> </view>
<empty wx:if="{{list.length==0}}" /> <empty wx:if="{{list.length==0}}" />
<view class="space"></view> <view class="space"></view>

View File

@ -124,4 +124,12 @@ scroll-view {
.item .more { .item .more {
position: absolute; position: absolute;
right: 10rpx; right: 10rpx;
}
.content_img{
width: 270rpx;
height: 170rpx;
}
.content_img image{
width: 100%;
height: 100%;
} }

View File

@ -19,6 +19,12 @@ Page({
files: [], files: [],
userInfo:{} userInfo:{}
}, },
// 拨打电话
call:function(data){
wx.makePhoneCall({
phoneNumber: data.currentTarget.dataset.phonenumber,
})
},
/** /**
* 查看人员详情 * 查看人员详情
*/ */

View File

@ -22,7 +22,7 @@
</view> </view>
<view class="item_cent"> <view class="item_cent">
<view>联系电话</view> <view>联系电话</view>
<view>{{userInfo.phoneNumber}}</view> <view data-phoneNumber="{{userInfo.phoneNumber}}" catchtap="call">{{userInfo.phoneNumber}}</view>
</view> </view>
<view class="item_cent"> <view class="item_cent">
<view>所属区域</view> <view>所属区域</view>

View File

@ -0,0 +1,120 @@
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:{},
personnelList:[],
},
/**
* 查看户籍详情
*/
getDomicileDetail: function (id) {
app.axios("GET", "app", `/people/domicileDetail/${id}`).then(res => {
if (res.code == 1) {
console.log(res.data,'data===>');
this.data.userInfo = res.data;
this.data.freshIng = false,
this.setData(this.data);
}
})
},
/**
* 查看户籍下人员列表
*/
getPersonnelList: function (id) {
let params = {
limit: 50,
page: 1,
domicileId:id
}
app.axios("GET", "app", `/people/domicilePeoplePageList`,params).then(res => {
if (res.code == 1) {
console.log(res.data,'data===>');
this.data.personnelList = res.data.list;
this.setData(this.data);
}
})
},
// 跳转人员详情
goItem: function (params) {
wx.navigateTo({
url: `/pages/statistic/j-b-x-x/detail/index?peopleId=${params.currentTarget.dataset.item.peopleId}`,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (options.id) {
this.getDomicileDetail(options.id);
this.getPersonnelList(options.id)
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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,65 @@
<title-bar title="{{title}}户籍信息"></title-bar>
<scroll-view scroll-y style="height: calc(100vh - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="dropDown" refresher-triggered="{{freshIng}}">
<view class="item">
<!-- catchtap="goItem" -->
<view class="item_top">
<view class="item_name">
<view>姓名</view>
<view>{{userInfo.name}}</view>
</view>
<view class="item_sex">
<view>性别</view>
<view>{{userInfo.sex==1?'男':'女'}}</view>
</view>
<view class="item_birthday">
<view>出生日期</view>
<view>{{userInfo.birthday}}</view>
</view>
</view>
<view class="item_cent">
<view>所属区域</view>
<view>{{userInfo.areaName}}</view>
</view>
<view class="item_cent">
<view>现居地址</view>
<view>{{userInfo.address}}</view>
</view>
<view class="item_cent">
<view>出生日期</view>
<view>{{userInfo.birthday}}</view>
</view>
<view class="item_cent">
<view>户籍创建时间</view>
<view>{{userInfo.changeTime}}</view>
</view>
</view>
<view class="br">
<view></view>
人员信息
</view>
<view class="item" wx:for="{{personnelList}}" wx:key="{{item.peopleId}}" data-item="{{item}}" data-index="{{index}}" catchtap="goItem">
<view class="item_top">
<view class="item_name">
<view>姓名</view>
<view>{{item.name}}</view>
</view>
<view class="item_sex">
<view>性别</view>
<view>{{item.sex==1?'男':'女'}}</view>
</view>
<view class="item_birthday">
<view>出生日期</view>
<view>{{item.birthday}}</view>
</view>
</view>
<view class="item_bot">
<view class="item_address">
<view>家庭住址</view>
<view>{{item.nowAddress}}</view>
</view>
</view>
<view class="item_details">
详情信息>>
</view>
</view>
</scroll-view>

View File

@ -0,0 +1,143 @@
.content {
display: flex;
flex-direction: column;
}
.line {
width: 1rpx;
height: 80%;
background-color: #f5f5f5;
}
.in-bg {
margin: auto;
background: #ffffff;
border-radius: 12rpx;
height: 76rpx;
width: 92%;
margin-top: 24rpx;
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;
}
.item {
width: 686rpx;
/* height: 296rpx; */
background-color: #FFFFFF;
margin: 32rpx auto;
border-radius: 16rpx;
padding: 32rpx;
position: relative;
}
.item_top {
display: flex;
border-bottom: 1rpx dashed #f5f5f5;
padding-bottom: 24rpx;
}
.item_cent {
border-bottom: 1rpx dashed #f5f5f5;
padding: 22rpx 0rpx;
display: flex;
justify-content: space-between;
}
.item_bot {
padding-top: 24rpx;
}
.item>view>view>view:nth-child(1) {
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 28rpx;
color: #808080;
}
.item>view>view>view:nth-child(2) {
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 32rpx;
color: #333333;
}
.item_name {
width: 210rpx;
}
.item_sex {
width: 110rpx;
}
.item_birthday {
width: 200rpx;
}
.item_address {
width: 100%;
}
.item_details {
width: 180rpx;
height: 48rpx;
background-color: #3587FB;
border-radius: 0rpx 16rpx 0rpx 16rpx;
position: absolute;
top: 0rpx;
right: 0rpx;
text-align: center;
line-height: 48rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 26rpx;
color: #FFFFFF;
}
.item_cent>view:nth-child(1) {
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 28rpx;
color: #808080;
}
.item_cent>view:nth-child(2) {
font-family: PingFang SC, PingFang SC;
font-weight: 500;
font-size: 32rpx;
color: #333333;
}
.br{
width: 92%;
margin: auto;
display: flex;
align-items: center;
font-family: PingFang SC, PingFang SC;
font-weight: bold;
font-size: 36rpx;
color: #333333;
}
.br>view{
width: 4rpx;
height: 36rpx;
background-color: #3587fb;
margin-right: 8rpx;
border-radius: 4rpx 4rpx 4rpx 4rpx;
}

View File

@ -39,17 +39,9 @@ Page({
* 切换tab * 切换tab
*/ */
changeItem: function (params) { changeItem: function (params) {
console.log(params,'切换tabparams====>');
//
wx.navigateTo({ wx.navigateTo({
url: `/pages/statistic/j-b-x-x/personnel/index?typeId=${params.currentTarget.dataset.item.typeId}&typeName=${params.currentTarget.dataset.item.typeName}&orgcode=${this.data.postData.orgcode}&areaPathName=${this.data.postData.areaPathName}`, url: `/pages/statistic/j-b-x-x/personnel/index?typeId=${params.currentTarget.dataset.item.typeId}&typeName=${params.currentTarget.dataset.item.typeName}&orgcode=${this.data.postData.orgcode}&areaPathName=${this.data.postData.areaPathName}`,
}) })
// 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);
}, },
handleselectunit(e) { handleselectunit(e) {
@ -103,7 +95,6 @@ Page({
classify: 2 classify: 2
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
console.log(res,'res===>');
this.data.TypeData = res.data[0].children; this.data.TypeData = res.data[0].children;
this.data.unitTreelist = res.data; this.data.unitTreelist = res.data;
this.setData(this.data) this.setData(this.data)

View File

@ -1,14 +1,16 @@
<title-bar title="基本信息统计"></title-bar> <title-bar title="基本信息统计"></title-bar>
<scroll-view scroll-y style="height: calc(100vh - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="dropDown" refresher-triggered="{{freshIng}}"> <scroll-view scroll-y style="height: calc(100vh - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="dropDown" refresher-triggered="{{freshIng}}">
<view class="h-div v-center in-bg" catchtap="popModal" data-type="showTypePop"> <view class="h-div v-center in-bg" catchtap="popModal" data-type="showTypePop">
<text class="lab">所属社区</text> <text class="lab">所属社区</text>
<text>{{ postData.areaPathName }}</text> <text>{{ postData.areaPathName }}</text>
</view> </view>
<view class="content"> <view class="content">
<view class="table"> <view class="table">
<view catchtap="changeItem" data-item="{{item}}" data-index="{{index}}" class="tab-item" wx:for="{{tab}}" wx:key="{{item.label}}"> <view catchtap="changeItem" data-item="{{item}}" data-index="{{index}}" class="tab-item" wx:for="{{tab}}" wx:key="{{item.label}}">
<text class="lab">{{item.typeName}}</text> <text class="lab">{{item.typeName}}</text>
<text class="val">{{item.houseNum}}</text>
<text class="flex">户</text>
<text class="val">{{item.typeNum}}</text> <text class="val">{{item.typeNum}}</text>
<text class="flex">人</text> <text class="flex">人</text>
<image class="arrow" src="/images/home/icon_arrow.png" /> <image class="arrow" src="/images/home/icon_arrow.png" />
@ -26,17 +28,8 @@
<text class="cuIcon-close text-red"></text> <text class="cuIcon-close text-red"></text>
</view> </view>
</view> </view>
<radio-group class="block" style="max-height: 50vh;overflow-y: scroll;"> <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> -->
<tree-node id="tree" dataTree="{{unitTreelist}}" pros="{{unitTreepros}}" bindselect="handleselectunit" isOpenAll="true" /> <tree-node id="tree" dataTree="{{unitTreelist}}" pros="{{unitTreepros}}" bindselect="handleselectunit" isOpenAll="true" />
</radio-group> </radio-group>
</view> </view>
</view> </view>

View File

@ -19,7 +19,7 @@ Page({
showTypePop: false, showTypePop: false,
postData: { postData: {
orgcode: '', orgcode: '',
areaPathName:'' areaPathName: ''
}, },
typeId: '', typeId: '',
@ -31,6 +31,8 @@ Page({
val: 'orgcode' val: 'orgcode'
}, },
unitTreelist: [], unitTreelist: [],
// 判断是否户籍或者人员 1、户籍。2、人员
listAttribute: 1,
}, },
@ -54,7 +56,7 @@ Page({
postData: postData, postData: postData,
showTypePop: false showTypePop: false
}); // 设置更新后的 postData 对象 }); // 设置更新后的 postData 对象
this.getList(); this.getListPersonnel();
}, },
/** /**
* 获取地区 * 获取地区
@ -64,7 +66,6 @@ Page({
classify: 2 classify: 2
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
console.log(res, 'res===>');
this.data.TypeData = res.data[0].children; this.data.TypeData = res.data[0].children;
this.data.unitTreelist = res.data; this.data.unitTreelist = res.data;
this.setData(this.data) this.setData(this.data)
@ -78,30 +79,28 @@ Page({
this.data.page = 1; this.data.page = 1;
this.data.list = []; this.data.list = [];
this.setData(this.data); this.setData(this.data);
this.getList(); this.getListPersonnel();
}, },
// 下拉获取更多
dropDown: function (params) { dropDown: function (params) {
this.data.page = this.data.page + 1; this.data.page = this.data.page + 1;
this.setData(this.data); this.setData(this.data);
this.getList(); this.getListPersonnel();
}, },
/** /**
* 获取工作统计每项数据列表 * 获取人员列表
*/ */
getList: function (id) { getListPersonnel: function (id) {
let params = { let params = {
limit: this.data.pageSize, limit: this.data.pageSize,
page: this.data.page, page: this.data.page,
typeId: this.data.typeId, typeId: this.data.typeId,
condition: this.data.search, condition: this.data.search,
}; };
if (this.data.postData.orgcode) { if (this.data.postData.orgcode) {
params.orgCode = this.data.postData.orgcode params.orgCode = this.data.postData.orgcode
} }
console.log(params, 'params==>');
app.axios("GET", "app", `/people/peopleInfoByType`, params).then(res => { app.axios("GET", "app", `/people/peopleInfoByType`, params).then(res => {
console.log(res.data, 'res.data=====>');
if (res.code == 1) { if (res.code == 1) {
this.setData({ this.setData({
list: [...this.data.list, ...res.data.list], list: [...this.data.list, ...res.data.list],
@ -110,25 +109,65 @@ Page({
} }
}) })
}, },
goItem:function (params) { /**
* 获取户籍列表
*/
getListDomicile: function (id) {
let params = {
limit: this.data.pageSize,
page: this.data.page,
userId:this.data.userInfo.userId,
};
if (this.data.postData.orgcode) {
params.orgCode = this.data.postData.orgcode
}
console.log(params,'params===>');
app.axios("GET", "app", `/people/domicilePage`, params).then(res => {
if (res.code == 1) {
console.log(res.data,'data===>');
this.setData({
list: [...this.data.list, ...res.data.list],
freshIng: false,
});
}
})
},
// 跳转人员详情
goItem: function (params) {
wx.navigateTo({ wx.navigateTo({
url: `/pages/statistic/j-b-x-x/detail/index?peopleId=${params.currentTarget.dataset.item.peopleId}`, url: `/pages/statistic/j-b-x-x/detail/index?peopleId=${params.currentTarget.dataset.item.peopleId}`,
}) })
}, },
// 跳转户籍详情
goDomicile:function (params) {
console.log(params,'params====>');
wx.navigateTo({
url: `/pages/statistic/j-b-x-x/domicileDetail/index?id=${params.currentTarget.dataset.item.domicileId}`,
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log(options, 'options==>'); console.log(options, 'options====>');
this.data.postData.orgcode = options.orgcode; this.data.postData.orgcode = options.orgcode;
this.data.postData.areaPathName = options.areaPathName; this.data.postData.areaPathName = options.areaPathName;
this.data.title = options.typeName;
this.data.typeId = options.typeId; this.data.typeId = options.typeId;
this.data.freshIng = true; this.data.freshIng = true;
this.data.userInfo = app.globalData.userInfo; this.data.userInfo = app.globalData.userInfo;
this.setData(this.data); if (options.typeId) {
this.getList(); this.data.listAttribute = 2;
this.data.title = options.typeName;
this.setData(this.data);
this.getListPersonnelPersonnel();
} else {
this.data.listAttribute = 1;
this.data.title = '户籍';
this.setData(this.data);
this.getListDomicile();
}
this.getAreaTree(); this.getAreaTree();
}, },

View File

@ -1,34 +1,78 @@
<title-bar title="{{title}}人员信息"></title-bar> <title-bar title="{{title}}信息"></title-bar>
<scroll-view scroll-y style="height: calc(100vh - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="dropDown" refresher-triggered="{{freshIng}}"> <scroll-view scroll-y style="height: calc(100vh - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="dropDown" refresher-triggered="{{freshIng}}">
<view class="h-div v-center in-bg" catchtap="popModal" data-type="showTypePop"> <view class="h-div v-center in-bg" catchtap="popModal" data-type="showTypePop">
<text class="lab">所属社区</text> <text class="lab">所属社区</text>
<text>{{ postData.areaPathName }}</text> <text>{{ postData.areaPathName }}</text>
</view> </view>
<view class="item" wx:for="{{list}}" wx:key="{{item.label}}" data-item="{{item}}" data-index="{{index}}" catchtap="goItem"> <!-- 户籍列表 -->
<view class="item_top"> <view wx:if="{{listAttribute==1}}">
<view class="item_name"> <view class="item" wx:for="{{list}}" wx:key="{{item.label}}" data-item="{{item}}" data-index="{{index}}" catchtap="goDomicile">
<view>姓名</view> <view class="item_top">
<view>{{item.name}}</view> <view class="item_name">
<view>姓名</view>
<view>{{item.name}}</view>
</view>
<view class="item_sex">
<view>性别</view>
<view>{{item.sex==1?'男':'女'}}</view>
</view>
<view class="item_birthday">
<view>出生日期</view>
<view>{{item.birthday}}</view>
</view>
</view> </view>
<view class="item_sex"> <view class="item_bot">
<view>性别</view> <view class="item_address">
<view>{{item.sex==1?'男':'女'}}</view> <view>户籍状态</view>
<view>{{item.domicileState==1?'正常':'注销'}}</view>
</view>
</view> </view>
<view class="item_birthday"> <view class="item_bot">
<view>出生日期</view> <view class="item_address">
<view>{{item.birthday}}</view> <view>居住地址</view>
<view>{{item.address?item.address:'--'}}</view>
</view>
</view> </view>
</view> <view class="item_bot">
<view class="item_bot"> <view class="item_address">
<view class="item_address"> <view>所在地区</view>
<view>家庭住址</view> <view>{{item.areaName?item.areaName:'--'}}</view>
<view>家庭住址家庭住址家庭住址家庭住址家庭住址</view> </view>
</view>
<view class="item_details">
详情信息>>
</view> </view>
</view>
<view class="item_details">
详情信息>>
</view> </view>
</view> </view>
<!-- 人员列表 -->
<view wx:if="{{listAttribute==2}}">
<view class="item" wx:for="{{list}}" wx:key="{{item.label}}" data-item="{{item}}" data-index="{{index}}" catchtap="goItem">
<view class="item_top">
<view class="item_name">
<view>姓名</view>
<view>{{item.name}}</view>
</view>
<view class="item_sex">
<view>性别</view>
<view>{{item.sex==1?'男':'女'}}</view>
</view>
<view class="item_birthday">
<view>出生日期</view>
<view>{{item.birthday}}</view>
</view>
</view>
<view class="item_bot">
<view class="item_address">
<view>家庭住址</view>
<view>{{item.domicileAddress?item.domicileAddress:'--'}}</view>
</view>
</view>
<view class="item_details">
详情信息>>
</view>
</view>
</view>
</scroll-view> </scroll-view>
<!-- 选择所属社区 --> <!-- 选择所属社区 -->
<view class="cu-modal {{showTypePop?'show':''}}"> <view class="cu-modal {{showTypePop?'show':''}}">

View File

@ -148,7 +148,7 @@ Page({
wx.showLoading({ wx.showLoading({
title: '文件上传中...', title: '文件上传中...',
}) })
app.uploadFile(this.data.uuid, app.FileType.resumptionAcs, filePath).then(res => { app.uploadFile(this.data.uuid, app.FileType.demandsEscalation, filePath).then(res => {
wx.hideLoading(); wx.hideLoading();
this.getFiles(); this.getFiles();
}) })
@ -160,7 +160,7 @@ Page({
getFiles: function () { getFiles: function () {
app.axios("GET", "common", "/upload/getFile", { app.axios("GET", "common", "/upload/getFile", {
otcid: this.data.postData.difficultyId || this.data.uuid, otcid: this.data.postData.difficultyId || this.data.uuid,
otctype: app.FileType.resumptionAcs otctype: app.FileType.demandsEscalation
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
this.data.files = res.data; this.data.files = res.data;

View File

@ -8,6 +8,7 @@ Page({
*/ */
data: { data: {
topBarH: app.globalData.CustomBar, topBarH: app.globalData.CustomBar,
baseUrl: app.FILE_SERVER_URL,
curTab: 0, curTab: 0,
tabs: [{ tabs: [{
lab: '待办事项', lab: '待办事项',
@ -73,6 +74,7 @@ Page({
state: parseInt(this.data.curTab) + 1, state: parseInt(this.data.curTab) + 1,
userId: app.globalData.userInfo.userId userId: app.globalData.userInfo.userId
}, false).then(res => { }, false).then(res => {
console.log(res,'resresres==>');
this.data.freshIng = false; this.data.freshIng = false;
if (res.code == 1) { if (res.code == 1) {
let page = Number.parseInt(res.data.pageNum); let page = Number.parseInt(res.data.pageNum);

View File

@ -38,11 +38,20 @@
<view catchtap="toUp" data-item="{{item}}" data-detail="{{0}}" class="done" wx:if="{{item.workState !=3}}">前往完成</view> <view catchtap="toUp" data-item="{{item}}" data-detail="{{0}}" class="done" wx:if="{{item.workState !=3}}">前往完成</view>
<view catchtap="toUp" data-item="{{item}}" data-detail="{{1}}" class="done" wx:else>查看详情</view> <view catchtap="toUp" data-item="{{item}}" data-detail="{{1}}" class="done" wx:else>查看详情</view>
</view> </view>
<view class="tv">{{item.title}}</view> <view class="center">
<view class="time">任务周期:{{item.startTime}} 至 {{item.endTime}}</view> <view>
<view class="time">接收时间:{{item.createTime}}</view> <view class="tv">{{item.title}}</view>
<image class="bottom-img" src="/images/task/icon-bottom-line.png" mode="aspectFill" /> <view class="time">任务周期:{{item.startTime}} 至 {{item.endTime}}</view>
<view class="time">接收时间:{{item.createTime}}</view>
<image class="bottom-img" src="/images/task/icon-bottom-line.png" mode="aspectFill" />
</view>
<view class="content_img">
<image src="{{baseUrl+item.filePath}}" mode="" />
</view>
</view>
</view> </view>
</view> </view>
<empty wx:if="{{list.length==0}}" /> <empty wx:if="{{list.length==0}}" />
<view class="space"></view> <view class="space"></view>

View File

@ -141,4 +141,17 @@ page {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
z-index: -1; z-index: -1;
}
.center{
display: flex;
justify-content: space-between;
align-items: center;
}
.content_img{
width: 180rpx;
height: 140rpx;
}
.content_img image{
width: 100%;
height: 100%;
} }

View File

@ -63,7 +63,43 @@ Page({
const name = e.currentTarget.dataset.name; const name = e.currentTarget.dataset.name;
this.data.postData[name] = e.detail.value; this.data.postData[name] = e.detail.value;
}, },
/**
* 阅览文件
*/
openread: function (e) {
const item = e.currentTarget.dataset.item;
const extension = item.filepath.split('.').pop().toLowerCase();
if(extension == 'jpg' || extension == 'png' ){
wx.previewImage({
urls: [app.FILE_SERVER_URL + item.filepath] // 需要预览的图片http链接列表
})
return
}
if(extension == 'mp4'){
this.setData({
videoSrc:app.FILE_SERVER_URL + item.filepath,
video: true
});
return
}
wx.downloadFile({
url: app.FILE_SERVER_URL + item.filepath, //仅为示例,并非真实的资源
success(res) {
if (res.statusCode === 200) {
wx.openDocument({
filePath: res.tempFilePath,
fail: function (res) {
wx.showToast({
title: '不支持此格式',
icon: 'none',
duration: 1000
});
}
})
}
}
})
},
/** /**
* 选择文件 * 选择文件
*/ */

View File

@ -59,12 +59,21 @@
<text wx:if="{{!readonly}}" catchtap="chooseMessageFile" class="title cuIcon-roundadd" style="font-weight: normal;color: #5DA6F4;margin-left: 20rpx;">文件上传</text> <text wx:if="{{!readonly}}" catchtap="chooseMessageFile" class="title cuIcon-roundadd" style="font-weight: normal;color: #5DA6F4;margin-left: 20rpx;">文件上传</text>
</view> </view>
<view class="grid"> <view style="width: 100%;">
<view style="display: flex;margin: 10px 0;align-items: center;" wx:for="{{ files }}">
<text style="width: 90%;Word-break:break-all" catchtap="openread" data-item="{{item}}">
<text>{{ index + 1 }}</text>
<text>{{ item.realfilename }}</text>
</text>
<text wx:if="{{!readonly}}" catchtap="deleteFile" data-id="{{item.sysdocumentid}}" class="cuIcon-delete del" style="color:red;"></text>
</view>
</view>
<!-- <view class="grid">
<view class="img" wx:for="{{files}}" style="position: relative;"> <view class="img" wx:for="{{files}}" style="position: relative;">
<text wx:if="{{!readonly}}" catchtap="deleteFile" data-id="{{item.sysdocumentid}}" class="cuIcon-delete del" style="color:red;"></text> <text wx:if="{{!readonly}}" 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}}" /> <image class="img" src="{{baseUrl+item.filepath}}" catchtap="filePre" data-url="{{item.filepath}}" />
</view> </view>
</view> </view> -->
</view> </view>
<view class="space"></view> <view class="space"></view>
</scroll-view> </scroll-view>

View File

@ -1,18 +1,133 @@
// pages/work/f-b-g-z/index/index.js const app = getApp();
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
topBarH: app.globalData.CustomBar,
baseUrl: app.FILE_SERVER_URL,
curTab: 0,
tabs: [{
lab: '待办事项',
val: 0
}, {
lab: '已办事项',
val: 1
}],
page: 1,
pageSize: 10,
list: []
},
/**
* 输入内容
*/
inputContent: function (e) {
const name = e.currentTarget.dataset.name;
this.data[name] = e.detail.value;
this.refresh();
},
/**
* 切换筛选
*/
tabSelect: function (params) {
const index = params.currentTarget.dataset.index;
this.data.curTab = index;
this.data.freshIng = true;
this.setData(this.data)
},
/**
* 时间筛选
*/
bindDateChange: function (params) {
const name = params.currentTarget.dataset.name;
this.data[name] = params.detail.value;
this.data.freshIng = true;
this.setData(this.data);
},
/**
* 刷新
*/
refresh: function (params) {
this.data.page = 1;
this.getList();
},
/**
* 获取列表
*/
getList: function () {
// console.log(this.data.curTab,parseInt(this.data.curTab) + 1,'=====>');
app.axios("GET", "app", "/work/sendWorkPage", {
page: this.data.page,
limit: this.data.pageSize,
startTime: this.data.startTime || '',
endTime: this.data.endTime || '',
condition: this.data.condition || '',
userId: app.globalData.userInfo.userId
}, 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)
})
},
/**
* 跳转详情
*/
toDetail: function (params) {
const item = params.currentTarget.dataset.item.workId;
console.log(item,'item==>');
wx.navigateTo({
url: `/pages/work/f-b-g-z/serve/index?workId=${item}&detail=1`,
})
},
/**
* 前往上传
*/
toUp: function (params) {
const item = params.currentTarget.dataset.item;
const detail = params.currentTarget.dataset.detail;
wx.navigateTo({
url: `/pages/work/d-b-s-x/up/index?detail=${detail}`,
success: res => {
res.eventChannel.emit('getItem', item)
}
})
},
/**
* 发布工作
*/
escalationAppeal: function (params) {
wx.navigateTo({
url: `/pages/work/f-b-g-z/serve/index`,
})
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
// this.data.curTab = options.id;
this.data.freshIng = true;
this.setData(this.data)
}, },
/** /**

View File

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

View File

@ -1,2 +1,55 @@
<!--pages/work/f-b-g-z/index/index.wxml--> <title-bar title="发布任务"></title-bar>
<text>pages/work/f-b-g-z/index/index.wxml</text> <!-- 搜索 -->
<view class="cu-bar search">
<view class="search-form round">
<text class="cuIcon-search"></text>
<input bindinput="inputContent" data-name="condition" type="text" placeholder="请输入关键字" confirm-type="search"></input>
</view>
</view>
<view style="background-color: #f5f5f5;">
<view class="filter">
<picker mode="date" value="{{dateFilter}}" bindchange="bindDateChange" data-name="startTime">
<view class="picker">
开始时间: {{startTime}}
</view>
</picker>
<view class="line"></view>
<picker mode="date" value="{{dateFilter}}" bindchange="bindDateChange" data-name="endTime">
<view class="picker">
结束时间: {{endTime}}
</view>
</picker>
</view>
</view>
<scroll-view scroll-y style="height: calc(100vh - 280rpx - {{topBarH}}px);" refresher-enabled bindrefresherrefresh="refresh" bindscrolltolower="getList" lower-threshold="300" refresher-triggered="{{freshIng}}">
<!-- 列表 -->
<view class="item-bg" wx:for="{{list}}">
<view class="item">
<view class="head h-div v-center">
<view class="single"></view>
<view class="title ellipsis flex">{{item.typeName}}</view>
<!-- <view catchtap="toUp" data-item="{{item}}" data-detail="{{0}}" class="done" wx:if="{{item.workState !=3}}">前往完成</view> -->
<view data-item="{{item}}" data-detail="{{1}}" class="done" catchtap="toDetail">查看详情</view>
</view>
<view class="center">
<view>
<view class="tv">{{item.title}}</view>
<view class="time">任务周期:{{item.startTime}}至 {{item.endTime}}</view>
<view class="time">接收时间:{{item.modifyTime}}</view>
<image class="bottom-img" src="/images/task/icon-bottom-line.png" mode="aspectFill" />
</view>
<view class="content_img">
<image src="{{baseUrl+item.filePath}}" mode="" />
</view>
</view>
</view>
</view>
<empty wx:if="{{list.length==0}}" />
<view class="space"></view>
</scroll-view>
<view class="option">
<view catchtap="escalationAppeal" class="btn">发布任务</view>
</view>

View File

@ -1 +1,156 @@
/* pages/work/f-b-g-z/index/index.wxss */ page {
background-color: #f5f5f5;
}
.filter {
margin: 0 10rpx 10rpx 10rpx;
width: calc(100vw - 20rpx);
height: 80rpx;
display: flex;
flex-direction: row;
background-color: white;
border-radius: 10rpx;
align-items: center;
position: sticky;
top: 0;
border-bottom: 1rpx solid #f5f5f5;
}
.filter picker {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
.cu-item {
font-size: 30rpx;
font-weight: bold;
}
.search {
height: 90rpx;
background-color: #f5f5f5;
}
.cu-bar .search-form {
background: #FFFFFF;
box-shadow: 0rpx 0rpx 12rpx 2rpx #DDECF3;
border-radius: 12rpx;
}
.item-bg {
padding: 0 32rpx 20rpx 32rpx;
background-color: #f5f5f5;
}
.item {
background-color: #ffffff;
padding: 32rpx 20rpx 20rpx 20rpx;
position: relative;
border-radius: 10rpx;
z-index: 2;
}
.item .head {
margin: 0 -20rpx;
margin-top: -32rpx;
background-color: #CDE5FC;
padding: 16rpx;
border-radius: 10rpx 10rpx 0 0;
}
.item .head .single {
width: 8rpx;
height: 36rpx;
background: #4882EE;
border-radius: 4rpx;
}
.item .head .title {
flex: 1;
margin-left: 16rpx;
font-size: 28rpx;
font-weight: bold;
color: #4882EE;
}
.item .head .status {
font-weight: bold;
font-size: 28rpx;
}
.item .tv {
font-size: 32rpx;
color: #222222;
padding-top: 20rpx;
margin-bottom: 10rpx;
}
.item .time {
font-size: 26rpx;
color: #666666;
padding-top: 10rpx;
}
.item .done {
color: rgb(12, 118, 240);
border-radius: 8rpx;
padding: 5rpx 20rpx;
background-color: rgba(0, 0, 0, 0.2);
}
.item .bottom {
font-size: 26rpx;
font-weight: bold;
color: #222222;
}
.item .g-container {
flex: 1;
height: 16rpx;
border-radius: 50rpx;
background: #eee;
margin: 20rpx 0;
}
.item .g-progress {
width: 50%;
height: inherit;
border-radius: 50rpx;
}
.item .val {
font-size: 26rpx;
font-weight: 500;
color: #222222;
margin-left: 20rpx;
}
.item .line {
margin: 20rpx -20rpx;
border-top: 2rpx dashed #f5f5f5;
}
.item .bottom-img {
width: calc(100vw - 65rpx);
max-width: calc(100vw - 65rpx);
height: 40rpx;
margin: 0 -20rpx;
position: absolute;
bottom: 0;
z-index: -1;
}
.center{
display: flex;
justify-content: space-between;
align-items: center;
}
.content_img{
width: 180rpx;
height: 140rpx;
}
.content_img image{
width: 100%;
height: 100%;
}

View File

@ -0,0 +1,363 @@
// 上报动态
import Utils from "../../../../utils/util"
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
topBarH: app.globalData.CustomBar,
baseUrl: app.FILE_SERVER_URL,
userInfo:{},
dateFilter: Utils.formatTime(new Date(), '-'),
showTaskPop: false,
showTypePop: false,
showWorkType: false,
postData: {},
//筛选树结构
areaCode:'',
areaPathName:'',
unitTreepros: {
key: 'performclassname',
val: 'listperformid'
},
listperformid:'',
unitTreelist: [],
TypeList:[],
detail:true,
},
/**
* 时间
*/
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.workManagement, filePath).then(res => {
wx.hideLoading();
this.getFiles();
})
},
/**
* 获取图片
*/
getFiles: function () {
app.axios("GET", "common", "/upload/getFile", {
otcid: this.data.postData.workId || this.data.uuid,
otctype: app.FileType.workManagement
}).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();
}
})
}
}
})
},
/**
* 显示/关闭弹窗筛选
*/
popModal: function (params) {
console.log(params);
const type = params.currentTarget.dataset.type;
this.data[type] = !this.data[type];
this.setData(this.data)
},
handleselectunit(e) {
// e.detail 选中的id数组
this.data.page = 1;
this.data.list = [];
let postData = this.data.postData; // 获取当前的 postData 对象
console.log(postData,'postData==>');
postData.listperformid = e.detail.item.listperformid;
postData.performclassname = e.detail.item.performclassname;
this.setData({
postData: postData,
showTypePop:false
}); // 设置更新后的 postData 对象
// this.getType();
},
/**
* 地址
*/
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);
},
/**
* 获取地区
*/
getAreaTree: function () {
app.axios("GET", "app", "/Sys/getListperformTree", ).then(res => {
if (res.code == 1) {
console.log(res,'res===>');
this.data.TypeData = res.data[0].children;
this.data.unitTreelist = res.data;
this.setData(this.data)
}
})
},
/**
* 发布
*/
push: function () {
// "endTime": "",-
// "listperformid": "",
// "startTime": "",-
// "title": "",
// "typeId": "",
// "userId": "",-
// "workId": ""-
this.data.postData.userId = app.globalData.userInfo.userId;
this.data.postData.workId = this.data.uuid;
if (!this.data.postData.listperformid) {
wx.showToast({
title: '请选择所属组织',
icon: 'none'
})
return
}
if (!this.data.postData.worktypeId) {
wx.showToast({
title: '请选择类型',
icon: 'none'
})
return
}
if (!this.data.postData.title) {
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,
userId:this.data.userInfo.userId,
typeId:this.data.postData.worktypeId,
filePath:''
}
this.data.files.forEach(item => {
let flie = item.filepath.substring(item.filepath.length-3);
if (flie == 'png'||flie == 'jpg') {
data.filePath = item.filepath;
return
}
});
console.log(data,'data===>');
app.axios("POST", "app", "/work/workAdd", 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/workDetail/${id}`).then(res => {
console.log(res,'res===>');
this.data.postData = res.data;
this.setData(this.data);
this.getFiles()
})
},
/**
* 事件类型
*/
typeChange: function (params) {
const index = params.currentTarget.dataset.index;
console.log(params,'params===>');
this.data.postData.worktypeId = params.currentTarget.dataset.item.typeId;
this.data.postData.worktype = index + 1;
this.data.shoWworkType = false;
this.setData(this.data);
},
/**
* 查询所有应急上报事件类型
*/
getWkTypes: function () {
app.axios("GET", "app", "/work/wkTypes",{
classify:1
}).then(res => {
if (res.code == 1) {
console.log(res);
this.data.TypeList = res.data;
this.setData(this.data);
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.data.userInfo = app.globalData.userInfo;
this.data.uuid = Utils.uuid();
this.setData(this.data);
console.log(options,'options===>');
if (options.workId) {
this.getDetail(options.workId);
}
this.getAreaTree();
this.getWkTypes();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

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

View File

@ -0,0 +1,105 @@
<!--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 in-bg" catchtap="popModal" data-type="showTypePop">
<text class="lab">所属组织</text>
<text>{{ postData.performclassname }}</text>
</view> -->
<input catchtap="popModal" data-type="showTypePop" disabled class="put v-div h-center" placeholder="请选择" value="{{postData.performclassname}}"></input>
<!-- 类型 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">事件类型</text>
</view>
<input catchtap="popModal" data-type="shoWworkType" disabled class="put v-div h-center" placeholder="请选择" value="{{TypeList[postData.worktype-1].typeName?TypeList[postData.worktype-1].typeName:postData.typeName}}"></input>
<!-- </view> -->
<!-- 内容 -->
<view class="h-div v-center header">
<text class="single"></text>
<text class="title">工作内容</text>
</view>
<textarea bindinput="inputContent" data-name="title" value="{{postData.title}}" 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.workId}}">
<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.orgname}}</view>
</label>
</view>
</view> -->
<tree-node id="tree" dataTree="{{unitTreelist}}" pros="{{unitTreepros}}" bindselect="handleselectunit" isOpenAll="true" />
</radio-group>
</view>
</view>
<!-- 选择通知类型 -->
<view class="cu-modal {{shoWworkType?'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="shoWworkType">
<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="{{TypeList}}" wx:key>
<label catchtap="typeChange" data-item="{{item}}" 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

@ -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

@ -109,7 +109,43 @@ Page({
} }
}); });
}, },
/**
* 阅览文件
*/
openread: function (e) {
const item = e.currentTarget.dataset.item;
const extension = item.filepath.split('.').pop().toLowerCase();
if(extension == 'jpg' || extension == 'png' ){
wx.previewImage({
urls: [app.FILE_SERVER_URL + item.filepath] // 需要预览的图片http链接列表
})
return
}
if(extension == 'mp4'){
this.setData({
videoSrc:app.FILE_SERVER_URL + item.filepath,
video: true
});
return
}
wx.downloadFile({
url: app.FILE_SERVER_URL + item.filepath, //仅为示例,并非真实的资源
success(res) {
if (res.statusCode === 200) {
wx.openDocument({
filePath: res.tempFilePath,
fail: function (res) {
wx.showToast({
title: '不支持此格式',
icon: 'none',
duration: 1000
});
}
})
}
}
})
},
/** /**
* 获取工作类型 * 获取工作类型
*/ */
@ -209,7 +245,18 @@ Page({
}) })
return return
} }
app.axios("POST", "app", "/work/wkDynamicsAdd", this.data.postData).then(res => { let params = {
...this.data.postData,
filePath:''
}
this.data.files.forEach(item => {
let flie = item.filepath.substring(item.filepath.length-3);
if (flie == 'png'||flie == 'jpg') {
params.filePath = item.filepath;
return
}
});
app.axios("POST", "app", "/work/wkDynamicsAdd", params).then(res => {
if (res.code == 1) { if (res.code == 1) {
wx.showToast({ wx.showToast({
title: '发布成功', title: '发布成功',

View File

@ -44,12 +44,21 @@
<text catchtap="chooseFile" class="title cuIcon-roundadd" style="font-weight: normal;color: #5DA6F4;">添加图片</text> <text catchtap="chooseFile" class="title cuIcon-roundadd" style="font-weight: normal;color: #5DA6F4;">添加图片</text>
<text catchtap="chooseMessageFile" class="title cuIcon-roundadd" style="font-weight: normal;color: #5DA6F4;margin-left: 20rpx;">文件上传</text> <text catchtap="chooseMessageFile" class="title cuIcon-roundadd" style="font-weight: normal;color: #5DA6F4;margin-left: 20rpx;">文件上传</text>
</view> </view>
<view class="grid"> <view style="width: 100%;">
<view style="display: flex;margin: 10px 0;align-items: center;" wx:for="{{ files}}">
<text style="width: 90%;Word-break:break-all" catchtap="openread" data-item="{{item}}">
<text>{{ index + 1 }}</text>
<text>{{ item.realfilename }}</text>
</text>
<text catchtap="deleteFile" data-id="{{item.sysdocumentid}}" class="cuIcon-delete del" style="color:red;"></text>
</view>
</view>
<!-- <view class="grid">
<view class="img" wx:for="{{files}}" style="position: relative;"> <view class="img" wx:for="{{files}}" style="position: relative;">
<text catchtap="deleteFile" data-id="{{item.sysdocumentid}}" class="cuIcon-delete del" style="color:red;"></text> <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}}" /> <image class="img" src="{{baseUrl+item.filepath}}" catchtap="filePre" data-url="{{item.filepath}}" />
</view> </view>
</view> </view> -->
</view> </view>
<view class="space"></view> <view class="space"></view>
</scroll-view> </scroll-view>