Compare commits
No commits in common. "1913075cb858dffae69d4bed8a88dfbafe1a172a" and "ebcc3ff8c75a515e3db0ca59e02cc05dce1e549b" have entirely different histories.
1913075cb8
...
ebcc3ff8c7
7
app.js
7
app.js
|
|
@ -51,8 +51,8 @@ App({
|
|||
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://192.168.110.10:8017/" //线下
|
||||
headerUrl: "http://192.168.110.186:8017/"
|
||||
// headerUrl: "https://city.sczysoft.com/df/"
|
||||
},
|
||||
// https://city.sczysoft.com/df/doc.html //接口
|
||||
|
|
@ -72,14 +72,13 @@ App({
|
|||
resumptionAcs: "WorkFile", // 履职附件
|
||||
msgAcs: "MsgAcs", // 消息附件
|
||||
eventAcs: "eventAcs", //突发/应急事件上报
|
||||
demandsEscalation :"demandsEscalation",//群众诉求上报
|
||||
|
||||
userSign: "UserSign", //用户签名
|
||||
|
||||
|
||||
EmergencyImg: "Content", // 应急预案---一图一表
|
||||
EmergencyFile: "EmergencyFile", // 应急预案---文件
|
||||
EmergencyPlanFile: "EmergencyPlanFile", // 应急演练---文件
|
||||
workManagement : 'workManagement',//工作管理
|
||||
},
|
||||
|
||||
// 请求函数封装
|
||||
|
|
|
|||
5
app.json
5
app.json
|
|
@ -36,11 +36,8 @@
|
|||
"pages/statistic/j-b-x-x/personnel/index",
|
||||
"pages/statistic/j-b-x-x/detail/index",
|
||||
"pages/work/f-b-g-z/index/index",
|
||||
"pages/work/f-b-g-z/serve/index",
|
||||
"pages/risk-pool/index",
|
||||
"pages/risk-pool/add-pool/index",
|
||||
"pages/statistic/j-b-x-x/domicileDetail/index",
|
||||
"pages/emergency/z-s/index/index"
|
||||
"pages/risk-pool/add-pool/index"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
|
|
|
|||
BIN
images/bg.png
Normal file
BIN
images/bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 356 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB |
BIN
images/logo.png
Normal file
BIN
images/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
|
|
@ -15,9 +15,9 @@ Page({
|
|||
showTypePop: false,
|
||||
showAdvicePop: false,
|
||||
TypeData: [],
|
||||
postData: {},
|
||||
files: [],
|
||||
userInfo:{},
|
||||
othplanList:[],
|
||||
|
||||
areamultiArray:[],
|
||||
areamultiIndex: [0, 0, 0],
|
||||
|
|
@ -32,21 +32,6 @@ Page({
|
|||
newArr: [],
|
||||
organization:[],
|
||||
organizationtate : false,
|
||||
|
||||
|
||||
areashowTypePop:false,
|
||||
postData:{
|
||||
organization:'',
|
||||
organizationName:''
|
||||
},
|
||||
//筛选树结构
|
||||
areaCode:'',
|
||||
areaPathName:'',
|
||||
unitTreepros: {
|
||||
key: 'performclassname',
|
||||
val: 'listperformid'
|
||||
},
|
||||
unitTreelist: [],
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -105,7 +90,7 @@ Page({
|
|||
return
|
||||
}
|
||||
|
||||
if (!this.data.postData.organization) {
|
||||
if (this.data.organizationtate==false) {
|
||||
wx.showToast({
|
||||
title: '请选择所属组织',
|
||||
icon: 'none'
|
||||
|
|
@ -139,12 +124,9 @@ Page({
|
|||
emerEventId:this.data.uuid,
|
||||
userId:this.data.userInfo.userId,
|
||||
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.listPerformId=this.data.postData.organization;
|
||||
console.log(data,'data===>');
|
||||
app.axios("POST", "app", `/emerEvent/saveEmerEvent`,data).then(res => {
|
||||
console.log(res,'res===>');
|
||||
|
|
@ -309,14 +291,8 @@ Page({
|
|||
getEmerEventDetail: function (id) {
|
||||
app.axios("GET", "app", `/emerEvent/emerEventDetail/${id}`).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res.data,'res=====>');
|
||||
this.data.postData = res.data;
|
||||
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++) {
|
||||
if (this.data.TypeData[index].emerTypeName == res.data.emerTypeName) {
|
||||
this.data.postData.type = index+1;
|
||||
|
|
@ -560,90 +536,6 @@ 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: '文件下载失败',
|
||||
});
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
|
@ -659,8 +551,8 @@ toShowAddress() {
|
|||
this.getEmerEventType();
|
||||
this.getAreaTree();
|
||||
this.getAreaTree1();
|
||||
this.getAreaTreetext();
|
||||
if (options.emerEventId) {
|
||||
console.log(options.emerEventId,'options.emerEventId===>');
|
||||
this.getEmerEventDetail(options.emerEventId)
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
<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">
|
||||
<!-- 标题 -->
|
||||
<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>
|
||||
<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>
|
||||
|
|
@ -28,33 +28,41 @@
|
|||
<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">
|
||||
<!-- 地区 -->
|
||||
<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">
|
||||
<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">
|
||||
</view>
|
||||
</picker>
|
||||
<!-- 所属组织 -->
|
||||
<view class="h-div v-center header">
|
||||
<text class="single"></text>
|
||||
<text class="title">所属组织</text>
|
||||
</view>
|
||||
<view catchtap="areapopModal" data-type="areashowTypePop" class="picker1">
|
||||
当前选择:{{postData.organizationName}}
|
||||
<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>
|
||||
<view class="h-div v-center header">
|
||||
</picker>
|
||||
<!-- 详细地址 -->
|
||||
<view class="h-div v-center header">
|
||||
<text class="single"></text>
|
||||
<text class="title">详细地址</text>
|
||||
</view>
|
||||
<view catchtap="toShowAddress" class="picker1">
|
||||
<view catchtap="toShowAddress" class="picker1">
|
||||
地址:{{postData.addressName}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 内容 -->
|
||||
<view class="h-div v-center header">
|
||||
|
|
@ -74,21 +82,6 @@
|
|||
<image class="img" src="{{baseUrl+item.filepath}}" catchtap="filePre" data-url="{{item.filepath}}" />
|
||||
</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 class="space"></view>
|
||||
</scroll-view>
|
||||
|
|
@ -115,20 +108,4 @@
|
|||
</view>
|
||||
</radio-group>
|
||||
</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>
|
||||
|
|
@ -120,40 +120,4 @@ scroll-view {
|
|||
margin-top: 16rpx;
|
||||
color: #333333;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -79,10 +79,5 @@ Component({
|
|||
this.setData(this.data);
|
||||
})
|
||||
},
|
||||
call:function(data){
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: data.currentTarget.dataset.mobiletel,
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
<view class="h-div v-center">
|
||||
<text class="lab">联系人:</text>
|
||||
<text class="val flex">{{item.chinaname}}</text>
|
||||
<text class="phone" data-mobiletel="{{item.mobiletel}}" catchtap="call">{{item.mobiletel}}</text>
|
||||
<text class="phone">{{item.mobiletel}}</text>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="h-div v-center">
|
||||
|
|
|
|||
|
|
@ -100,12 +100,6 @@ Component({
|
|||
scale: 18,
|
||||
});
|
||||
},
|
||||
// 拨打电话
|
||||
call:function(data){
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: data.currentTarget.dataset.principaltel,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<view class="h-div v-center">
|
||||
<text class="lab">联系人:</text>
|
||||
<text class="val flex">{{item.principal}}</text>
|
||||
<text class="phone" data-principaltel="{{item.principaltel}}" catchtap="call">{{item.principaltel}}</text>
|
||||
<text class="phone">{{item.principaltel}}</text>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="h-div v-center">
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ Component({
|
|||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
baseUrl: app.FILE_SERVER_URL,
|
||||
condition: '',
|
||||
curTab: 0,
|
||||
tabs: [],
|
||||
|
|
@ -22,7 +21,7 @@ Component({
|
|||
freshIng: false,
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
list: [],
|
||||
list: []
|
||||
},
|
||||
|
||||
pageLifetimes: {
|
||||
|
|
@ -91,55 +90,7 @@ Component({
|
|||
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: '文件下载失败',
|
||||
});
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取预案类型
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="item-bg" wx:for="{{list}}">
|
||||
<view data-item="{{item}}" class="item">
|
||||
<view catchtap="toDetail" data-item="{{item}}" class="item">
|
||||
<view class="h-div v-center">
|
||||
<text class="lab">预案名称:</text>
|
||||
<text class="val">{{item.planname}}</text>
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
<text class="val">{{item.introduction}}</text>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view data-item="{{item}}" catchtap="download" class="h-div v-center" >
|
||||
<view class="h-div v-center">
|
||||
<text class="download">附件下载</text>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -1,115 +0,0 @@
|
|||
// 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() {
|
||||
|
||||
}
|
||||
})
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<!--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>
|
||||
|
|
@ -1,161 +0,0 @@
|
|||
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;
|
||||
}
|
||||
|
|
@ -136,11 +136,6 @@ Page({
|
|||
name: "指挥体系",
|
||||
href: "/pages/emergency/t-x-l/index/index"
|
||||
},
|
||||
{
|
||||
icon: "icon_yj_5",
|
||||
name: "应急值守",
|
||||
href: "/pages/emergency/z-s/index/index"
|
||||
},
|
||||
],
|
||||
|
||||
// 公告
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
}
|
||||
.top {
|
||||
width: 100vw;
|
||||
height: 450rpx;
|
||||
height: 380rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ Page({
|
|||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
// username: 'admin',
|
||||
// password: 'Daofu202406',
|
||||
username: '',
|
||||
password: '',
|
||||
username: 'admin',
|
||||
password: 'Daofu202406',
|
||||
// username: '',
|
||||
// password: '',
|
||||
showLogin: true,
|
||||
newname:'',
|
||||
newphone:'',
|
||||
|
|
@ -180,6 +180,7 @@ Page({
|
|||
classify: 2
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res,'res===>');
|
||||
this.data.TypeData = res.data;
|
||||
this.setData(this.data)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!--pages/login/index.wxml-->
|
||||
<image class="bg-img" src="https://city.sczysoft.com/dffile/resource/df/bg.png" mode="aspectFill" />
|
||||
<image class="bg-img" src="/images/bg.png" mode="aspectFill" />
|
||||
<view class="top">
|
||||
<text class="nh">您好!</text>
|
||||
<text class="des">欢迎来到鲜水镇“智慧鲜水”数字化平台</text>
|
||||
|
|
|
|||
|
|
@ -224,17 +224,9 @@ Page({
|
|||
*/
|
||||
toMsgDetail: function (params) {
|
||||
const item = params.currentTarget.dataset.item;
|
||||
console.log(params,'params===>');
|
||||
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`,
|
||||
})
|
||||
}
|
||||
|
||||
wx.navigateTo({
|
||||
url: `/pages/the-masses/web/index?id=${item.publicContentId}`,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -45,11 +45,11 @@
|
|||
<!-- 云学习 -->
|
||||
<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-type="partyMember" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
|
||||
<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}}" data-type="partyMember">
|
||||
<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> -->
|
||||
|
|
@ -62,12 +62,12 @@
|
|||
<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-type="publicContent" data-item="{{item}}" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
|
||||
<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}}" data-type="publicContent">
|
||||
<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> -->
|
||||
|
|
|
|||
|
|
@ -242,21 +242,10 @@ Page({
|
|||
* 通知详情
|
||||
*/
|
||||
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;
|
||||
console.log(params,'params===>');
|
||||
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`,
|
||||
})
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: `/pages/the-masses/web/index?id=${item.publicContentId}`,
|
||||
})
|
||||
},
|
||||
|
||||
onLoad(option) {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="logo">
|
||||
<!-- <image class="img" src="/images/logo.png"/> -->
|
||||
<image class="img" src="https://city.sczysoft.com/dffile/resource/df/logo1.png"/>
|
||||
<image class="img" src="/images/logo.png"/>
|
||||
<view>
|
||||
做干部群众和党员队伍的
|
||||
<view>领头雁!</view>
|
||||
|
|
@ -61,11 +60,11 @@
|
|||
<!-- 云学习 -->
|
||||
<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}}" data-type="partyMember" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
|
||||
<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}}" data-type="partyMember">
|
||||
<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> -->
|
||||
|
|
@ -78,12 +77,12 @@
|
|||
<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}}" data-type="publicContent" class="img" src="{{baseImgUrl+item.coverPath}}" mode="widthFix"></image>
|
||||
<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}}" data-type="publicContent">
|
||||
<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> -->
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ Page({
|
|||
*/
|
||||
data: {
|
||||
topBarH: app.globalData.CustomBar,
|
||||
baseUrl: app.FILE_SERVER_URL,
|
||||
currentIndex: 0,
|
||||
tabs: [{
|
||||
lab: '今日工作'
|
||||
|
|
@ -64,7 +63,6 @@ Page({
|
|||
endTime: time,
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -20,9 +20,6 @@
|
|||
<view class="des">{{item.detail}}</view>
|
||||
<view class="time">时间:{{item.createTime}}</view>
|
||||
</view>
|
||||
<view class="content_img">
|
||||
<image src="{{baseUrl+item.filePath}}" mode=""/>
|
||||
</view>
|
||||
</view>
|
||||
<empty wx:if="{{list.length==0}}" />
|
||||
<view class="space"></view>
|
||||
|
|
|
|||
|
|
@ -124,12 +124,4 @@ scroll-view {
|
|||
.item .more {
|
||||
position: absolute;
|
||||
right: 10rpx;
|
||||
}
|
||||
.content_img{
|
||||
width: 270rpx;
|
||||
height: 170rpx;
|
||||
}
|
||||
.content_img image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
|
@ -19,12 +19,6 @@ Page({
|
|||
files: [],
|
||||
userInfo:{}
|
||||
},
|
||||
// 拨打电话
|
||||
call:function(data){
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: data.currentTarget.dataset.phonenumber,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 查看人员详情
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
</view>
|
||||
<view class="item_cent">
|
||||
<view>联系电话</view>
|
||||
<view data-phoneNumber="{{userInfo.phoneNumber}}" catchtap="call">{{userInfo.phoneNumber}}</view>
|
||||
<view>{{userInfo.phoneNumber}}</view>
|
||||
</view>
|
||||
<view class="item_cent">
|
||||
<view>所属区域</view>
|
||||
|
|
|
|||
|
|
@ -1,120 +0,0 @@
|
|||
|
||||
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() {
|
||||
|
||||
}
|
||||
})
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"tree": "/components/tree/index"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
<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>
|
||||
|
|
@ -1,143 +0,0 @@
|
|||
.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;
|
||||
}
|
||||
|
|
@ -39,9 +39,17 @@ Page({
|
|||
* 切换tab
|
||||
*/
|
||||
changeItem: function (params) {
|
||||
console.log(params,'切换tabparams====>');
|
||||
//
|
||||
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}`,
|
||||
})
|
||||
// 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) {
|
||||
|
|
@ -95,6 +103,7 @@ Page({
|
|||
classify: 2
|
||||
}).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)
|
||||
|
|
|
|||
|
|
@ -1,16 +1,14 @@
|
|||
<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="h-div v-center in-bg" catchtap="popModal" data-type="showTypePop">
|
||||
<text class="lab">所属社区</text>
|
||||
<text>{{ postData.areaPathName }}</text>
|
||||
</view>
|
||||
<text class="lab">所属社区</text>
|
||||
<text>{{ postData.areaPathName }}</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="table">
|
||||
|
||||
|
||||
<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="val">{{item.houseNum}}</text>
|
||||
<text class="flex">户</text>
|
||||
<text class="val">{{item.typeNum}}</text>
|
||||
<text class="flex">人</text>
|
||||
<image class="arrow" src="/images/home/icon_arrow.png" />
|
||||
|
|
@ -28,8 +26,17 @@
|
|||
<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>
|
||||
|
|
@ -19,7 +19,7 @@ Page({
|
|||
showTypePop: false,
|
||||
postData: {
|
||||
orgcode: '',
|
||||
areaPathName: ''
|
||||
areaPathName:''
|
||||
},
|
||||
typeId: '',
|
||||
|
||||
|
|
@ -31,8 +31,6 @@ Page({
|
|||
val: 'orgcode'
|
||||
},
|
||||
unitTreelist: [],
|
||||
// 判断是否户籍或者人员 1、户籍。2、人员
|
||||
listAttribute: 1,
|
||||
},
|
||||
|
||||
|
||||
|
|
@ -56,7 +54,7 @@ Page({
|
|||
postData: postData,
|
||||
showTypePop: false
|
||||
}); // 设置更新后的 postData 对象
|
||||
this.getListPersonnel();
|
||||
this.getList();
|
||||
},
|
||||
/**
|
||||
* 获取地区
|
||||
|
|
@ -66,6 +64,7 @@ Page({
|
|||
classify: 2
|
||||
}).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)
|
||||
|
|
@ -79,28 +78,30 @@ Page({
|
|||
this.data.page = 1;
|
||||
this.data.list = [];
|
||||
this.setData(this.data);
|
||||
this.getListPersonnel();
|
||||
this.getList();
|
||||
},
|
||||
// 下拉获取更多
|
||||
dropDown: function (params) {
|
||||
this.data.page = this.data.page + 1;
|
||||
this.setData(this.data);
|
||||
this.getListPersonnel();
|
||||
this.getList();
|
||||
},
|
||||
/**
|
||||
* 获取人员列表
|
||||
* 获取工作统计每项数据列表
|
||||
*/
|
||||
getListPersonnel: function (id) {
|
||||
getList: function (id) {
|
||||
let params = {
|
||||
limit: this.data.pageSize,
|
||||
page: this.data.page,
|
||||
typeId: this.data.typeId,
|
||||
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 => {
|
||||
console.log(res.data, 'res.data=====>');
|
||||
if (res.code == 1) {
|
||||
this.setData({
|
||||
list: [...this.data.list, ...res.data.list],
|
||||
|
|
@ -109,65 +110,25 @@ Page({
|
|||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取户籍列表
|
||||
*/
|
||||
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) {
|
||||
goItem:function (params) {
|
||||
wx.navigateTo({
|
||||
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) {
|
||||
console.log(options, 'options====>');
|
||||
console.log(options, 'options==>');
|
||||
this.data.postData.orgcode = options.orgcode;
|
||||
this.data.postData.areaPathName = options.areaPathName;
|
||||
this.data.title = options.typeName;
|
||||
this.data.typeId = options.typeId;
|
||||
this.data.freshIng = true;
|
||||
this.data.userInfo = app.globalData.userInfo;
|
||||
if (options.typeId) {
|
||||
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.setData(this.data);
|
||||
this.getList();
|
||||
this.getAreaTree();
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -1,78 +1,34 @@
|
|||
<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}}">
|
||||
<view class="h-div v-center in-bg" catchtap="popModal" data-type="showTypePop">
|
||||
<text class="lab">所属社区</text>
|
||||
<text>{{ postData.areaPathName }}</text>
|
||||
</view>
|
||||
<!-- 户籍列表 -->
|
||||
<view wx:if="{{listAttribute==1}}">
|
||||
<view class="item" wx:for="{{list}}" wx:key="{{item.label}}" data-item="{{item}}" data-index="{{index}}" catchtap="goDomicile">
|
||||
<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 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_bot">
|
||||
<view class="item_address">
|
||||
<view>户籍状态</view>
|
||||
<view>{{item.domicileState==1?'正常':'注销'}}</view>
|
||||
</view>
|
||||
<view class="item_sex">
|
||||
<view>性别</view>
|
||||
<view>{{item.sex==1?'男':'女'}}</view>
|
||||
</view>
|
||||
<view class="item_bot">
|
||||
<view class="item_address">
|
||||
<view>居住地址</view>
|
||||
<view>{{item.address?item.address:'--'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item_bot">
|
||||
<view class="item_address">
|
||||
<view>所在地区</view>
|
||||
<view>{{item.areaName?item.areaName:'--'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item_details">
|
||||
详情信息>>
|
||||
<view class="item_birthday">
|
||||
<view>出生日期</view>
|
||||
<view>{{item.birthday}}</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 class="item_bot">
|
||||
<view class="item_address">
|
||||
<view>家庭住址</view>
|
||||
<view>家庭住址家庭住址家庭住址家庭住址家庭住址</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item_details">
|
||||
详情信息>>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
<!-- 选择所属社区 -->
|
||||
<view class="cu-modal {{showTypePop?'show':''}}">
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ Page({
|
|||
wx.showLoading({
|
||||
title: '文件上传中...',
|
||||
})
|
||||
app.uploadFile(this.data.uuid, app.FileType.demandsEscalation, filePath).then(res => {
|
||||
app.uploadFile(this.data.uuid, app.FileType.resumptionAcs, filePath).then(res => {
|
||||
wx.hideLoading();
|
||||
this.getFiles();
|
||||
})
|
||||
|
|
@ -160,7 +160,7 @@ Page({
|
|||
getFiles: function () {
|
||||
app.axios("GET", "common", "/upload/getFile", {
|
||||
otcid: this.data.postData.difficultyId || this.data.uuid,
|
||||
otctype: app.FileType.demandsEscalation
|
||||
otctype: app.FileType.resumptionAcs
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
this.data.files = res.data;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ Page({
|
|||
*/
|
||||
data: {
|
||||
topBarH: app.globalData.CustomBar,
|
||||
baseUrl: app.FILE_SERVER_URL,
|
||||
curTab: 0,
|
||||
tabs: [{
|
||||
lab: '待办事项',
|
||||
|
|
@ -74,7 +73,6 @@ Page({
|
|||
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);
|
||||
|
|
|
|||
|
|
@ -38,20 +38,11 @@
|
|||
<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>
|
||||
<view class="center">
|
||||
<view>
|
||||
<view class="tv">{{item.title}}</view>
|
||||
<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 class="tv">{{item.title}}</view>
|
||||
<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>
|
||||
<empty wx:if="{{list.length==0}}" />
|
||||
<view class="space"></view>
|
||||
|
|
|
|||
|
|
@ -141,17 +141,4 @@ page {
|
|||
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%;
|
||||
}
|
||||
|
|
@ -63,43 +63,7 @@ Page({
|
|||
const name = e.currentTarget.dataset.name;
|
||||
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
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 选择文件
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -59,21 +59,12 @@
|
|||
|
||||
<text wx:if="{{!readonly}}" catchtap="chooseMessageFile" class="title cuIcon-roundadd" style="font-weight: normal;color: #5DA6F4;margin-left: 20rpx;">文件上传</text>
|
||||
</view>
|
||||
<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="grid">
|
||||
<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>
|
||||
<image class="img" src="{{baseUrl+item.filepath}}" catchtap="filePre" data-url="{{item.filepath}}" />
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="space"></view>
|
||||
</scroll-view>
|
||||
|
|
|
|||
|
|
@ -1,133 +1,18 @@
|
|||
const app = getApp();
|
||||
|
||||
// pages/work/f-b-g-z/index/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
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) {
|
||||
// this.data.curTab = options.id;
|
||||
this.data.freshIng = true;
|
||||
this.setData(this.data)
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"navigationStyle": "custom"
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,55 +1,2 @@
|
|||
<title-bar title="发布任务"></title-bar>
|
||||
<!-- 搜索 -->
|
||||
<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>
|
||||
<!--pages/work/f-b-g-z/index/index.wxml-->
|
||||
<text>pages/work/f-b-g-z/index/index.wxml</text>
|
||||
|
|
@ -1,156 +1 @@
|
|||
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%;
|
||||
}
|
||||
/* pages/work/f-b-g-z/index/index.wxss */
|
||||
|
|
@ -1,363 +0,0 @@
|
|||
// 上报动态
|
||||
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() {
|
||||
|
||||
}
|
||||
})
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
<!--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>
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
/* 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);
|
||||
}
|
||||
|
|
@ -109,43 +109,7 @@ 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
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取工作类型
|
||||
*/
|
||||
|
|
@ -245,18 +209,7 @@ Page({
|
|||
})
|
||||
return
|
||||
}
|
||||
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 => {
|
||||
app.axios("POST", "app", "/work/wkDynamicsAdd", this.data.postData).then(res => {
|
||||
if (res.code == 1) {
|
||||
wx.showToast({
|
||||
title: '发布成功',
|
||||
|
|
|
|||
|
|
@ -44,21 +44,12 @@
|
|||
<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>
|
||||
</view>
|
||||
<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="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>
|
||||
<view class="space"></view>
|
||||
</scroll-view>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user