Browse Source

行程上报功能

release
FightingN 4 years ago
parent
commit
14d71a5dd9
  1. 5
      epdc-resident-mp-yushan/app.json
  2. 1
      epdc-resident-mp-yushan/dist/date-picker-view/index.js
  3. 6
      epdc-resident-mp-yushan/dist/date-picker-view/index.json
  4. 15
      epdc-resident-mp-yushan/dist/date-picker-view/index.wxml
  5. 0
      epdc-resident-mp-yushan/dist/date-picker-view/index.wxss
  6. 1
      epdc-resident-mp-yushan/dist/date-picker-view/locales/en.js
  7. 1
      epdc-resident-mp-yushan/dist/date-picker-view/locales/index.js
  8. 1
      epdc-resident-mp-yushan/dist/date-picker-view/locales/zh_CN.js
  9. 1
      epdc-resident-mp-yushan/dist/date-picker-view/locales/zh_TW.js
  10. 1
      epdc-resident-mp-yushan/dist/date-picker-view/props.js
  11. 1
      epdc-resident-mp-yushan/dist/date-picker/index.js
  12. 7
      epdc-resident-mp-yushan/dist/date-picker/index.json
  13. 45
      epdc-resident-mp-yushan/dist/date-picker/index.wxml
  14. 1
      epdc-resident-mp-yushan/dist/date-picker/index.wxss
  15. 1
      epdc-resident-mp-yushan/dist/date-picker/utils.js
  16. 383
      epdc-resident-mp-yushan/pages/index/index.js
  17. BIN
      epdc-resident-mp-yushan/subpages/extend/images/back-white.png
  18. BIN
      epdc-resident-mp-yushan/subpages/extend/images/by.png
  19. BIN
      epdc-resident-mp-yushan/subpages/extend/images/dingwei.png
  20. BIN
      epdc-resident-mp-yushan/subpages/extend/images/jiezhongchaxun.png
  21. BIN
      epdc-resident-mp-yushan/subpages/extend/images/pos.png
  22. BIN
      epdc-resident-mp-yushan/subpages/extend/images/right-sword.png
  23. BIN
      epdc-resident-mp-yushan/subpages/extend/images/wodeshangbao.png
  24. BIN
      epdc-resident-mp-yushan/subpages/extend/images/xingchengshangbao.png
  25. 57
      epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.js
  26. 8
      epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.json
  27. 31
      epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.wxml
  28. 107
      epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.wxss
  29. 61
      epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.js
  30. 7
      epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.json
  31. 26
      epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.wxml
  32. 78
      epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.wxss
  33. 363
      epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.js
  34. 8
      epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.json
  35. 162
      epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxml
  36. 231
      epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxss
  37. 22
      epdc-resident-mp-yushan/subpages/extend/utils/tripReport.js
  38. 10
      epdc-resident-mp-yushan/utils/config.js
  39. 38
      epdc-resident-mp-yushan/utils/request.js

5
epdc-resident-mp-yushan/app.json

@ -159,7 +159,10 @@
"root": "subpages/extend",
"name": "extend",
"pages": [
"pages/vaccines/vaccines"
"pages/vaccines/vaccines",
"pages/epidemicControl/epidemicControl",
"pages/tripReport/tripReport",
"pages/moreList/moreList"
]
},
{

1
epdc-resident-mp-yushan/dist/date-picker-view/index.js

File diff suppressed because one or more lines are too long

6
epdc-resident-mp-yushan/dist/date-picker-view/index.json

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"wux-multi-picker-view": "../multi-picker-view/index"
}
}

15
epdc-resident-mp-yushan/dist/date-picker-view/index.wxml

@ -0,0 +1,15 @@
<wux-multi-picker-view
id="wux-picker"
prefixCls="{{ multiPickerPrefixCls }}"
pickerPrefixCls="{{ pickerPrefixCls }}"
value="{{ inputValue }}"
itemHeight="{{ itemHeight }}"
itemStyle="{{ itemStyle }}"
indicatorStyle="{{ indicatorStyle }}"
indicatorClass="{{ indicatorClass }}"
maskStyle="{{ maskStyle }}"
maskClass="{{ maskClass }}"
labelAlign="{{ labelAlign }}"
options="{{ cols }}"
bind:valueChange="onValueChange"
/>

0
epdc-resident-mp-yushan/dist/date-picker-view/index.wxss

1
epdc-resident-mp-yushan/dist/date-picker-view/locales/en.js

@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default={year:"",month:"",day:"",hour:"",minute:"",am:"AM",pm:"PM"};exports.default=_default;

1
epdc-resident-mp-yushan/dist/date-picker-view/locales/index.js

@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _en=_interopRequireDefault(require("./en")),_zh_CN=_interopRequireDefault(require("./zh_CN")),_zh_TW=_interopRequireDefault(require("./zh_TW"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default={en:_en.default,zh_CN:_zh_CN.default,zh_TW:_zh_TW.default};exports.default=_default;

1
epdc-resident-mp-yushan/dist/date-picker-view/locales/zh_CN.js

@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default={year:"年",month:"月",day:"日",hour:"时",minute:"分",am:"上午",pm:"下午"};exports.default=_default;

1
epdc-resident-mp-yushan/dist/date-picker-view/locales/zh_TW.js

@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default={year:"年",month:"月",day:"日",hour:"時",minute:"分",am:"上午",pm:"下午"};exports.default=_default;

1
epdc-resident-mp-yushan/dist/date-picker-view/props.js

@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.props=void 0;var props={prefixCls:{type:String,value:"wux-date-picker"},multiPickerPrefixCls:{type:String,value:"wux-picker"},pickerPrefixCls:{type:String,value:"wux-picker-col"},value:{type:null,value:null},itemHeight:{type:Number,value:34},itemStyle:{type:[String,Object,Array],value:""},indicatorStyle:{type:[String,Object,Array],value:""},indicatorClass:{type:String,value:""},maskStyle:{type:[String,Object,Array],value:""},maskClass:{type:String,value:""},labelAlign:{type:String,value:"center"},mode:{type:String,value:"datetime"},minuteStep:{type:Number,value:1},use12Hours:{type:Boolean,value:!1},minDate:{type:null,value:null},maxDate:{type:null,value:null},minHour:{type:Number,value:0},maxHour:{type:Number,value:23},minMinute:{type:Number,value:0},maxMinute:{type:Number,value:59},lang:{type:String,value:"zh_CN"}};exports.props=props;

1
epdc-resident-mp-yushan/dist/date-picker/index.js

@ -0,0 +1 @@
"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_popupMixin=_interopRequireDefault(require("../helpers/popupMixin")),_props=require("../date-picker-view/props"),_utils=require("./utils");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var platformProps={labelPropName:"label",format:function(e,r){return(0,_utils.formatDate)(e.date,{datetime:"yyyy-MM-dd hh:mm",date:"yyyy-MM-dd",year:"yyyy",month:"yyyy-MM",time:"hh:mm"}[r.mode])}};(0,_baseComponent.default)({behaviors:[(0,_popupMixin.default)("#wux-picker",platformProps)],properties:_props.props});

7
epdc-resident-mp-yushan/dist/date-picker/index.json

@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"wux-popup": "../popup/index",
"wux-date-picker-view": "../date-picker-view/index"
}
}

45
epdc-resident-mp-yushan/dist/date-picker/index.wxml

@ -0,0 +1,45 @@
<wux-popup
position="bottom"
visible="{{ popupVisible }}"
hasHeader="{{ false }}"
hasFooter="{{ false }}"
mountOnEnter="{{ false }}"
safeArea="bottom"
bind:close="close"
bind:closed="onClosed"
>
<view class="{{ classes.wrap }}" wx:if="{{ mounted }}">
<view class="{{ classes.toolbar }}" wx:if="{{ toolbar }}" catchtouchmove="noop">
<view class="{{ classes.inner }}">
<view class="{{ classes.cancel }}" hover-class="{{ classes.hover }}" bindtap="onCancel" wx:if="{{ toolbar.cancelText }}">{{ toolbar.cancelText }}</view>
<view class="{{ classes.title }}">{{ toolbar.title }}</view>
<view class="{{ classes.confirm }}" hover-class="{{ classes.hover }}" bindtap="onConfirm" wx:if="{{ toolbar.confirmText }}">{{ toolbar.confirmText }}</view>
</view>
</view>
<wux-date-picker-view
id="wux-picker"
multiPickerPrefixCls="{{ multiPickerPrefixCls }}"
pickerPrefixCls="{{ pickerPrefixCls }}"
value="{{ inputValue }}"
itemHeight="{{ itemHeight }}"
itemStyle="{{ itemStyle }}"
indicatorStyle="{{ indicatorStyle }}"
indicatorClass="{{ indicatorClass }}"
maskStyle="{{ maskStyle }}"
maskClass="{{ maskClass }}"
labelAlign="{{ labelAlign }}"
mode="{{ mode }}"
minuteStep="{{ minuteStep }}"
use12Hours="{{ use12Hours }}"
minDate="{{ minDate }}"
maxDate="{{ maxDate }}"
minHour="{{ minHour }}"
maxHour="{{ maxHour }}"
minMinute="{{ minMinute }}"
maxMinute="{{ maxMinute }}"
lang="{{ lang }}"
bind:valueChange="onValueChange"
/>
</view>
</wux-popup>
<slot></slot>

1
epdc-resident-mp-yushan/dist/date-picker/index.wxss

@ -0,0 +1 @@
.wux-date-picker__toolbar{position:relative;width:100%;font-size:34rpx;line-height:1.5;color:rgba(0,0,0,.85);background:#f7f7f8}.wux-date-picker__toolbar::before{content:" ";position:absolute;left:0;top:0;right:0;height:1PX;border-top:1PX solid #d9d9d9;color:#d9d9d9;transform-origin:0 0;transform:scaleY(.5)}.wux-date-picker__inner{height:88rpx;display:-ms-flexbox;display:flex;text-align:center}.wux-date-picker__title{position:absolute;display:block;width:100%;padding:0;font-size:34rpx;font-weight:400;line-height:88rpx;color:rgba(0,0,0,.85);text-align:center;white-space:nowrap}.wux-date-picker__button{position:absolute;box-sizing:border-box;height:88rpx;line-height:88rpx;padding:0 30rpx;z-index:10}.wux-date-picker__button--cancel{left:0;color:#b2b2b2}.wux-date-picker__button--confirm{right:0;color:#33cd5f}.wux-date-picker__button--hover{background-color:#ececec}

1
epdc-resident-mp-yushan/dist/date-picker/utils.js

@ -0,0 +1 @@
"use strict";function formatDate(e,t){e instanceof Date||(e=new Date(e));var r={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};for(var a in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),r)new RegExp("(".concat(a,")")).test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?r[a]:("00"+r[a]).substr((""+r[a]).length)));return t}Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatDate=formatDate;

383
epdc-resident-mp-yushan/pages/index/index.js

@ -15,9 +15,10 @@ Page({
noticeList: [], // 通知公告列表
unReadNum: 0, // 未读数量
timestamp: '', // 时间戳
sudokuState: { // 九宫格显隐状态
sudokuState: {
// 九宫格显隐状态
consultAvailable: '0', // 网格专员
appraiseAvailable: '0' // 请您监督
appraiseAvailable: '0', // 请您监督
},
completeInfoDialogVisible: false, // 完善信息弹框显隐
gridId: '', // 网格id
@ -28,11 +29,36 @@ Page({
communityNewsList: [],
currentIndex: 0,
moduleList: [
{ icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/db9d4408de344c419bb22be21ba163b9.png', tip: '积分排名', module: 'pointRank' },
{ icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/59b127e9fc8042969334c31fe0272c3f.png', tip: '指尖榆山', module: 'fingerYushan' },
{ icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/ccbab2a8a4a847548a72972770009576.png', tip: '网格队伍', module: 'gridArmy' },
{ icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/db945b5cc30147df80923f6c5928074f.png', tip: '志愿服务', module: 'volunteerService' },
{ icon: 'https://epdc-yushan.elinkservice.cn/files-pro/20211009/47c5baebb4d54987b4faebfeadd92a25.png', tip: '社会组织', module: 'societyOrg' }
{
icon:
'https://epdc-yushan.elinkservice.cn/files-pro/20211009/db9d4408de344c419bb22be21ba163b9.png',
tip: '积分排名',
module: 'pointRank',
},
{
icon:
'https://epdc-yushan.elinkservice.cn/files-pro/20211009/59b127e9fc8042969334c31fe0272c3f.png',
tip: '指尖榆山',
module: 'fingerYushan',
},
{
icon:
'https://epdc-yushan.elinkservice.cn/files-pro/20211009/ccbab2a8a4a847548a72972770009576.png',
tip: '网格队伍',
module: 'gridArmy',
},
{
icon:
'https://epdc-yushan.elinkservice.cn/files-pro/20211009/db945b5cc30147df80923f6c5928074f.png',
tip: '志愿服务',
module: 'volunteerService',
},
{
icon:
'https://epdc-yushan.elinkservice.cn/files-pro/20211009/47c5baebb4d54987b4faebfeadd92a25.png',
tip: '社会组织',
module: 'societyOrg',
},
],
serviceImgUrl: '',
servicePhone: '',
@ -44,7 +70,7 @@ Page({
pageNo: 1,
pageSize: 10,
currentView: 'item',
phoneSlideState: 'close'
phoneSlideState: 'close',
},
onLoad(options) {
if (options.scene) {
@ -52,14 +78,17 @@ Page({
this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight,
gridId: options.scene.substring(0, options.scene.length - 2)
gridId: options.scene.substring(0, options.scene.length - 2),
})
wx.setStorageSync('redirectToAddIssue', options.scene.substr(options.scene.length - 2, 2))
wx.setStorageSync(
'redirectToAddIssue',
options.scene.substr(options.scene.length - 2, 2)
)
} else {
this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight,
gridId: options.scene
gridId: options.scene,
})
}
} else {
@ -82,7 +111,7 @@ Page({
},
onReachBottom() {
this.setData({
loadMoreVisible: true
loadMoreVisible: true,
})
if (this.data.loadMoreType === 'loading') {
this.data.pageNo += 1
@ -90,9 +119,9 @@ Page({
}
},
swiperChange: function (e) {
if (e.detail.source === "touch") {
if (e.detail.source === 'touch') {
this.setData({
currentIndex: e.detail.current
currentIndex: e.detail.current,
})
}
},
@ -103,64 +132,66 @@ Page({
success(res) {
if (res.code) {
let code = res.code
api.getToken(code).then(res => {
api.getToken(code).then((res) => {
const state = res.data.userState
app.globalData.infoCompleted = state
wx.setStorageSync('topGridName', res.data.grid)
wx.setStorageSync('token', res.data.token)
that.setData({
departmentName: res.data.grid
departmentName: res.data.grid,
})
// 扫码进入
if (that.data.gridId !== '') {
// 扫的是网格长码
if (that.data.gridId == 'gridLeader') {
wx.redirectTo({
url: '/pages/gridLeaderRegister/gridLeaderRegister'
url: '/pages/gridLeaderRegister/gridLeaderRegister',
})
// 扫的是网格码
} else {
wx.redirectTo({
url: '/pages/formid/formid?gid=' + that.data.gridId
url: '/pages/formid/formid?gid=' + that.data.gridId,
})
}
} else {
if (state == '4') {
// 非扫码进入,通过搜索小程序直接进入的情况
wx.redirectTo({
url: '/pages/toRegister/toRegister'
url: '/pages/toRegister/toRegister',
})
} else {
if (wx.getStorageSync('redirectToAddIssue')) {
wx.navigateTo({
url: '/subpages/discussion/pages/addIssue/addIssue'
url: '/subpages/discussion/pages/addIssue/addIssue',
})
} else {
that.initLoad()
}
}
}
})
} else {
console.log('登录失败' + res.errMsg)
}
}
},
})
},
// 获取banner列表
getBannerList() {
api.bannerList('0').then(res => {
console.log('首页banner列表', res)
this.setData({
bannerList: res.data
api
.bannerList('0')
.then((res) => {
console.log('首页banner列表', res)
this.setData({
bannerList: res.data,
})
})
}).catch(() => {
console.log('获取banner列表失败')
this.setData({
bannerList: []
.catch(() => {
console.log('获取banner列表失败')
this.setData({
bannerList: [],
})
})
})
},
// 获取项目列表
getProjectList() {
@ -169,76 +200,91 @@ Page({
pageSize: 10,
timestamp: this.data.timestamp,
searchContent: '',
firstCategoryCode: ''
firstCategoryCode: '',
}
api.getProjectList(para).then(res => {
console.log('项目列表', res)
this.setData({
projectList: res.data,
api
.getProjectList(para)
.then((res) => {
console.log('项目列表', res)
this.setData({
projectList: res.data,
})
})
}).catch(() => {
console.log('获取项目列表失败')
this.setData({
projectList: []
.catch(() => {
console.log('获取项目列表失败')
this.setData({
projectList: [],
})
})
})
},
// 获取最新一条消息-主要获取消息未读数
getUnreadNum() {
api.getFirstInfo().then(res => {
console.log('获取消息未读数', res)
this.setData({
unReadNum: res.data.amount
api
.getFirstInfo()
.then((res) => {
console.log('获取消息未读数', res)
this.setData({
unReadNum: res.data.amount,
})
})
.catch(() => {
console.log('获取消息未读数失败')
})
}).catch(() => {
console.log('获取消息未读数失败')
})
},
// 获取消息列表
getInfoList() {
let para = {
pageIndex: 1,
pageSize: 10,
timestamp: this.data.timestamp
timestamp: this.data.timestamp,
}
homeApi.getInfoList(para).then(res => {
console.log('消息列表', res)
this.setData({
infoList: res.data
homeApi
.getInfoList(para)
.then((res) => {
console.log('消息列表', res)
this.setData({
infoList: res.data,
})
})
.catch((err) => {
console.log('获取消息列表失败')
})
}).catch((err) => {
console.log('获取消息列表失败')
})
},
// 获取通知公告列表
getNoticeList() {
let para = {
pageIndex: 1,
pageSize: 10,
timestamp: this.data.timestamp
timestamp: this.data.timestamp,
}
homeApi.getNoticeList(para).then(res => {
this.setData({
noticeList: res.data
homeApi
.getNoticeList(para)
.then((res) => {
this.setData({
noticeList: res.data,
})
})
.catch((err) => {
console.log(err)
})
}).catch(err => {
console.log(err)
})
},
// 获取 网格员
gridmanList() {
const params = {
pageIndex: 1,
pageSize: 10
pageSize: 10,
}
api.gridmanList(params).then(res => {
console.log('网格员列表', res)
this.setData({
griderList: res.data
api
.gridmanList(params)
.then((res) => {
console.log('网格员列表', res)
this.setData({
griderList: res.data,
})
})
.catch((err) => {
console.error('网格员列表', err)
})
}).catch(err => {
console.error('网格员列表', err)
})
},
// 初始化加载
initLoad() {
@ -248,7 +294,7 @@ Page({
timestamp: getTimestamp(),
newsList: [],
loadMoreType: 'loading',
loadMoreVisible: false
loadMoreVisible: false,
})
this.getBannerList()
this.getProjectList()
@ -267,15 +313,15 @@ Page({
// 跳转到通知公告列表
navigateToInfoList() {
wx.navigateTo({
url: '/subpages/home/pages/notice/notice'
url: '/subpages/home/pages/notice/notice',
})
},
// 消息没有数据
noMore() {
wx.showToast({
title: "暂无更多消息~",
icon: "none",
duration: 1000
title: '暂无更多消息~',
icon: 'none',
duration: 1000,
})
},
// 跳转到消息页面
@ -287,56 +333,68 @@ Page({
const { id, url, newsflag } = e.currentTarget.dataset
if (newsflag == '0') {
wx.navigateTo({
url: `/subpages/home/pages/webview/webview?url=${url}`
url: `/subpages/home/pages/webview/webview?url=${url}`,
})
} else if (newsflag == '1') {
wx.navigateTo({
url: `/subpages/home/pages/newsDetail/newsDetail?id=${id}`
url: `/subpages/home/pages/newsDetail/newsDetail?id=${id}`,
})
}
},
//积分排行
navigateToIntegral() {
api.getUserInfo().then(res => {
// console.log('用户信息', res)
wx.navigateTo({
url: "/subpages/integralCentre/pages/index/index?points=" + res.data.points
api
.getUserInfo()
.then((res) => {
// console.log('用户信息', res)
wx.navigateTo({
url:
'/subpages/integralCentre/pages/index/index?points=' +
res.data.points,
})
})
.catch((err) => {
console.log(err)
})
}).catch(err => {
console.log(err)
})
},
//社区教育
navigateToEducation() {
wx.navigateTo({
url: '/subpages/education/pages/index/index'
url: '/subpages/education/pages/index/index',
})
},
navigateToSynthetical() {
wx.navigateTo({
url: '/subpages/education/pages/healthyLife/healthyLife?page=zhfw'
url: '/subpages/education/pages/healthyLife/healthyLife?page=zhfw',
})
},
// 获取疫苗配置
getResidentConfig() {
homeApi.getResidentConfig().then(res => {
if (res.code === 0 && res.msg === "success") {
res.data.forEach(item => {
if (item.residentType === "vaccination_config" && item.residentCode === "vaccination_switch") {
this.setData({
vaccinationSwitch: item.residentValue === 'on'
})
}
})
}
}).catch(err => {
console.log(err)
})
homeApi
.getResidentConfig()
.then((res) => {
if (res.code === 0 && res.msg === 'success') {
res.data.forEach((item) => {
if (
item.residentType === 'vaccination_config' &&
item.residentCode === 'vaccination_switch'
) {
this.setData({
vaccinationSwitch: item.residentValue === 'on',
})
}
})
}
})
.catch((err) => {
console.log(err)
})
},
//疫苗接种
toVaccines() {
wx.navigateTo({
url: '/subpages/extend/pages/vaccines/vaccines'
url: '/subpages/extend/pages/epidemicControl/epidemicControl',
// url: '/subpages/extend/pages/vaccines/vaccines'
})
},
// 获取最新社区资讯
@ -344,39 +402,42 @@ Page({
const params = {
pageIndex: 1,
pageSize: 5,
typeId: ''
typeId: '',
}
homeApi.contentList(params).then(res => {
console.log('社区最新资讯', res)
this.setData({
communityNewsList: res.data
homeApi
.contentList(params)
.then((res) => {
console.log('社区最新资讯', res)
this.setData({
communityNewsList: res.data,
})
})
.catch((err) => {
console.error(err)
})
}).catch(err => {
console.error(err)
})
},
// 模块列表跳转
navigateToModule(e) {
const { module } = e.currentTarget.dataset
if (module === 'gridArmy') {
wx.navigateTo({
url: '/subpages/gridArmy/pages/index/index'
url: '/subpages/gridArmy/pages/index/index',
})
} else if (module === 'pointRank') {
wx.navigateTo({
url: '/subpages/integralCentre/pages/index/index'
url: '/subpages/integralCentre/pages/index/index',
})
} else if (module === 'volunteerService') {
wx.navigateTo({
url: '/pages/heart/heart'
url: '/pages/heart/heart',
})
} else if (module === 'societyOrg') {
wx.navigateTo({
url: '/subpages/societyOrg/pages/orgList/orgList'
url: '/subpages/societyOrg/pages/orgList/orgList',
})
} else if (module === 'fingerYushan') {
wx.navigateTo({
url: '/subpages/fingertipYushan/pages/index/index'
url: '/subpages/fingertipYushan/pages/index/index',
})
}
},
@ -384,12 +445,12 @@ Page({
navigateToDiscussion() {
if (app.globalData.infoCompleted == 0) {
this.setData({
completeInfoDialogVisible: !this.data.completeInfoDialogVisible
completeInfoDialogVisible: !this.data.completeInfoDialogVisible,
})
return false
}
wx.navigateTo({
url: '/pages/discussion/discussion'
url: '/pages/discussion/discussion',
})
// wx.navigateTo({
// url: '/subpages/discussion/pages/addIssue/addIssue'
@ -398,37 +459,40 @@ Page({
navigateToWork() {
if (app.globalData.infoCompleted == 0) {
this.setData({
completeInfoDialogVisible: !this.data.completeInfoDialogVisible
completeInfoDialogVisible: !this.data.completeInfoDialogVisible,
})
return false
}
wx.navigateTo({
url: '/subpages/workTodo/pages/index/index'
url: '/subpages/workTodo/pages/index/index',
})
},
navigateToSumbit() {
if (app.globalData.infoCompleted == 0) {
this.setData({
completeInfoDialogVisible: !this.data.completeInfoDialogVisible
completeInfoDialogVisible: !this.data.completeInfoDialogVisible,
})
return false
}
wx.navigateTo({
url: '/subpages/submitAdvise/pages/activeApply/activeApply'
url: '/subpages/submitAdvise/pages/activeApply/activeApply',
})
},
// 获取服务电话
getImgUrl() {
const imgType = '3'
api.getImgUrl(imgType).then(res => {
console.log('服务电话', res)
this.setData({
serviceImgUrl: res.data[0].imgUrl,
servicePhone: res.data[0].remark
api
.getImgUrl(imgType)
.then((res) => {
console.log('服务电话', res)
this.setData({
serviceImgUrl: res.data[0].imgUrl,
servicePhone: res.data[0].remark,
})
})
.catch((err) => {
console.error(err)
})
}).catch(err => {
console.error(err)
})
},
// 拨打便民服务电话
callPhone(e) {
@ -457,11 +521,11 @@ Page({
loadMoreType: 'none',
loadMoreVisible: false,
newsList: [],
currentView: `item${tab}`
currentView: `item${tab}`,
})
this.data.pageNo = 1
wx.showLoading({
title: '加载中...'
title: '加载中...',
})
this.contentList()
},
@ -470,49 +534,56 @@ Page({
const params = {
pageIndex: this.data.pageNo,
pageSize: this.data.pageSize,
typeId: this.data.currentTab
typeId: this.data.currentTab,
}
homeApi.contentList(params).then(res => {
console.log('社区最新资讯', res)
this.setData({
newsList: this.data.newsList.concat(res.data),
loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none'
homeApi
.contentList(params)
.then((res) => {
console.log('社区最新资讯', res)
this.setData({
newsList: this.data.newsList.concat(res.data),
loadMoreType:
res.data.length === this.data.pageSize ? 'loading' : 'none',
})
wx.hideLoading()
})
.catch((err) => {
console.error(err)
wx.hideLoading()
})
wx.hideLoading()
}).catch(err => {
console.error(err)
wx.hideLoading()
})
},
// 获取栏目列表
contentModuleList() {
homeApi.contentModuleList().then(res => {
console.log('栏目列表', res)
const tabList = []
res.data.forEach(item => {
tabList.push({ label: item.typeName, value: item.id })
homeApi
.contentModuleList()
.then((res) => {
console.log('栏目列表', res)
const tabList = []
res.data.forEach((item) => {
tabList.push({ label: item.typeName, value: item.id })
})
this.setData({
tabList: [...[{ label: '最新资讯', value: '' }], ...tabList],
})
})
this.setData({
tabList: [...[{ label: '最新资讯', value: '' }], ...tabList]
.catch((err) => {
console.error('', err)
})
}).catch(err => {
console.error('', err)
})
},
navigateToDetail(e) {
const { id } = e.currentTarget.dataset
wx.navigateTo({
url: `/subpages/communityNews/pages/detail/detail?id=${id}`
url: `/subpages/communityNews/pages/detail/detail?id=${id}`,
})
},
openPhonePannel() {
this.setData({
phoneSlideState: this.data.phoneSlideState === "open" ? "close" : "open"
phoneSlideState: this.data.phoneSlideState === 'open' ? 'close' : 'open',
})
},
pageTouchEnd() {
this.setData({
phoneSlideState: "close"
phoneSlideState: 'close',
})
}
})
},
})

BIN
epdc-resident-mp-yushan/subpages/extend/images/back-white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

BIN
epdc-resident-mp-yushan/subpages/extend/images/by.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

BIN
epdc-resident-mp-yushan/subpages/extend/images/dingwei.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
epdc-resident-mp-yushan/subpages/extend/images/jiezhongchaxun.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
epdc-resident-mp-yushan/subpages/extend/images/pos.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
epdc-resident-mp-yushan/subpages/extend/images/right-sword.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
epdc-resident-mp-yushan/subpages/extend/images/wodeshangbao.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
epdc-resident-mp-yushan/subpages/extend/images/xingchengshangbao.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

57
epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.js

@ -0,0 +1,57 @@
const app = getApp()
Page({
data: {
statusHeight: app.globalData.deviceInfo.statusHeight, // 自定义头部状态栏高度
navigationHeight: app.globalData.deviceInfo.navigationHeight, // 自定义头部导航栏高度
},
onLoad: function (options) {},
goBack() {
wx.navigateBack({
delta: 1,
})
},
//疫苗接种
toVaccines() {
wx.navigateTo({
url: '/subpages/extend/pages/vaccines/vaccines',
})
},
// 行程上报
toTripReport() {
wx.navigateTo({
url: '/subpages/extend/pages/tripReport/tripReport',
})
},
onReady: function () {},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {},
})

8
epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.json

@ -0,0 +1,8 @@
{
"usingComponents": {
"nav-bar": "/components/navbar/index"
},
"navigationStyle": "custom",
"navigationBarTextStyle": "white",
"backgroundColor": "#f7f7f7"
}

31
epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.wxml

@ -0,0 +1,31 @@
<view class="epidemic-control">
<view class="header" style="height: {{statusHeight + navigationHeight}}px;">
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">
<image src="../../images/back-white.png" class="back-icon" bind:tap="goBack" />
<view class="header-title" hover-class="none" hover-stop-propagation="false">疫情防控</view>
</view>
</view>
<image class="by" src="../../images/by.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<view class="box">
<view class="box-item" style="margin-bottom:20rpx" bind:tap="toTripReport">
<view class="left">
<image src="../../images/xingchengshangbao.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
<view class="center">
<view class="center-title">行程上报</view>
<view class="center-content">上报近期的行程信息,群防群控,共同抗击疫情。</view>
</view>
<view class="right">></view>
</view>
<view class="box-item" bind:tap="toVaccines">
<view class="left">
<image src="../../images/jiezhongchaxun.png" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
<view class="center">
<view class="center-title">接种查询</view>
<view class="center-content">查询疫苗接种情况信息,共同抗疫,人人有责</view>
</view>
<view class="right">></view>
</view>
</view>
</view>

107
epdc-resident-mp-yushan/subpages/extend/pages/epidemicControl/epidemicControl.wxss

@ -0,0 +1,107 @@
page {
background: #f7f7f7;
}
.epidemic-control {
box-sizing: border-box;
width: 100%;
}
.header {
position: fixed;
width: 100%;
top: 0;
left: 0;
z-index: 1000;
/* background: #349c83; */
}
.header .header-bg {
width: 100%;
height: 100%;
position: absolute;
z-index: 10;
left: 0;
top: 0;
}
.header .navigation {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
color: rgba(255, 255, 255, 0.9);
font-size: 32rpx;
position: relative;
z-index: 100;
letter-spacing: 2rpx;
}
.back-icon {
width: 16rpx;
height: 28rpx;
}
.header-title {
width: 90%;
text-align: center;
}
.by {
width: 750rpx;
height: 410rpx;
}
/* 头结束 */
.box {
width: 100%;
box-sizing: border-box;
position: relative;
left: 0;
top: -100rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.box-item {
box-sizing: border-box;
width: 690rpx;
height: 190rpx;
background-color: #ffffff;
border-radius: 14rpx;
display: flex;
align-items: center;
padding: 0 43rpx 29rpx;
}
.left {
width: 86rpx;
height: 86rpx;
}
.left image {
width: 86rpx;
height: 86rpx;
}
.center {
/* width: calc(100% - 200rpx); */
margin: 0 30rpx;
}
.center-title {
font-size: 32rpx;
color: #333333;
margin-bottom: 18rpx;
}
.center-content {
font-size: 28rpx;
color: #999999;
}
.right {
color: #999999;
}

61
epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.js

@ -0,0 +1,61 @@
import { getTripInfoList } from '../../utils/tripReport'
Page({
data: {
newsList: [],
pageIndex: 1,
pageSize: 10,
loadMoreVisible: true,
loadMoreType: 'loading',
isShow: false,
},
onShow: function () {
this.getTripInfoList()
},
// 列表点击事件
toDetail(e) {
let type = e.currentTarget.dataset.type
wx.navigateTo({
url: `/subpages/extend/pages/tripReport/tripReport?id=${e.currentTarget.dataset.id}&type=${type}`,
})
},
getTripInfoList() {
let params = {
pageIndex: this.data.pageIndex,
pageSize: this.data.pageSize,
}
if (this.data.pageIndex == 1) {
this.setData({
newsList: [],
})
}
getTripInfoList(params)
.then((res) => {
this.setData({
newsList: this.data.newsList.concat(res.data),
loadMoreType:
res.data.length < this.data.pageSize ? 'none' : 'loading',
})
if (this.data.newsList == 0) {
this.setData({
isShow: true,
loadMoreVisible: false,
})
}
})
.catch((err) => {
this.setData({
loadMoreVisible: false,
isShow: true,
})
})
},
onReachBottom: function () {
if (this.data.loadMoreType == 'none') {
return
}
this.setData({
pageIndex: ++this.data.pageIndex,
})
this.getTripInfoList()
},
})

7
epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.json

@ -0,0 +1,7 @@
{
"navigationBarTitleText": "我的上报",
"usingComponents": {
"load-more": "../../../../components/loadMore/loadMore",
"no-data": "../../../../components/nodata/nodata"
}
}

26
epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.wxml

@ -0,0 +1,26 @@
<view class="more-list">
<view class="item-box" wx:for="{{newsList}}" wx:key="index" bind:tap="toDetail" data-type="look" data-id="{{item.id}}">
<view class="item-box-left">
<view class="item-title" hover-class="none" hover-stop-propagation="false">
上报时间: {{item.createdTime}}
</view>
<view class="item-bottom">
<view class="item-bottom-left">
<view class="state">
<image src="../../images/dingwei.png" class="location-icon" />
</view>
<view class="time">{{item.comeAddressName}}</view>
</view>
<!-- <view class="item-bottom-right">
<view class="edit" wx:if="{{item.isFeedback ==0}}" bindtap="toDetail" data-type="edit" data-id="{{item.id}}">
编辑
</view>
<view class="look" bind:tap='toDetail' data-type="look" data-id="{{item.id}}">查看</view>
</view> -->
</view>
</view>
<view class="right-icon">></view>
</view>
</view>
<load-more loadMoreVisible="{{loadMoreVisible}}" loadMoreType="{{loadMoreType}}" bg-f="bg-f"></load-more>
<no-data isShow='{{isShow}}'></no-data>

78
epdc-resident-mp-yushan/subpages/extend/pages/moreList/moreList.wxss

@ -0,0 +1,78 @@
page {
background: #f7f7f7;
}
.more-list {
box-sizing: border-box;
width: 100%;
}
.item-box {
box-sizing: border-box;
width: 100%;
height: 188rpx;
background: #fff;
margin-bottom: 7rpx;
padding: 30rpx 37rpx 0 31rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.item-title {
height: 80rpx;
font-size: 32rpx;
color: #000000;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.item-bottom {
display: flex;
justify-content: space-between;
}
.item-bottom-left {
display: flex;
align-items: center;
}
.location-icon {
width: 26rpx;
height: 32rpx;
margin-right: 10rpx;
vertical-align: middle;
}
.time {
font-size: 26rpx;
color: #666666;
vertical-align: middle;
}
.item-bottom-right {
display: flex;
align-items: center;
}
.edit {
font-size: 26rpx;
color: #bb0300;
margin-right: 53rpx;
}
.look {
font-size: 26rpx;
color: #666666;
}
.right-icon {
width: 16rpx;
height: 23rpx;
font-size: 28rpx;
color: #a3a3a3;
}

363
epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.js

@ -0,0 +1,363 @@
import {
saveTripInfo,
getTripInfoDetail,
deleteTripById,
getAreaInfo,
} from '../../utils/tripReport.js'
Page({
data: {
lock: false, // 防止重复点击
id: '', // 活动id
name: '', // 姓名
phone: '', //手机号
card: '', //身份证号
visibleNowAddress: false, //级联
nowAddressValue: [], // 现居地址ip
nowAddress: '', //现居地址
detailAddress: '', //详细地址
comeFromAddress: '', //来自地址
comeFromAddressValue: [],
visibleComeFromAddress: false,
localTime: '', //来到本地时间
visibleLocalTime: '',
localTimeValue: [],
backTime: '', //返回时间
backTimeValue: [],
visibleBackTime: false,
actContent: '', // 备注信息
type: '', // 编辑 还是 查看
options1: [
// {
// label: '北京',
// value: '110000',
// children: [
// {
// label: '北京市',
// value: '110000',
// children: [
// {
// label: '东城区',
// value: '110101',
// },
// ],
// },
// ],
// },
// {
// label: '上海',
// value: '310000',
// children: [
// {
// label: '上海市',
// value: '310000',
// children: [
// {
// label: '黄浦区',
// value: '310101',
// },
// ],
// },
// ],
// },
],
defaultFieldNames: {
value: 'id',
label: 'shortName',
},
pid: 0,
},
onLoad: function (options) {
this.getNowTime()
this.getAreaInfo()
if (options.id) {
this.setData({
id: options.id,
type: options.type,
})
}
if (this.data.type == 'look') {
this.getTripInfoDetail()
}
},
getNowTime() {
const date = new Date()
const year = date.getFullYear()
const month = date.getMonth()
const day = date.getDate()
this.setData({
localTimeValue: [year, month, day],
backTimeValue: [year, month, day],
})
},
// 获取类别
getAreaInfo() {
getAreaInfo(this.data.pid).then((res) => {
res.data.forEach((item) => {
item.label = item.shortName
item.value = item.id
item.isLeaf = false
})
if (this.data.pid == 0) {
this.setData({
options1: res.data,
})
} else {
if (res.data.length === 0) {
wx.hideLoading()
this.setData({
visibleNowAddress: false,
visibleComeFromAddress: false,
})
return
}
// 如果不是第一层级,要往下加children
let options1 = this.data.options1
this.recursionMethod(options1, this.data.pid, res.data)
}
})
},
recursionMethod(arr, pid, children) {
arr.forEach((item) => {
if (item.id === pid) {
item.children = children
wx.hideLoading()
}
if (item.children) {
this.recursionMethod(item.children, this.data.pid, children)
}
})
this.setData({
options1: arr,
})
},
// 动态加载级联选择器
onLoadOptions(e) {
console.log('onLoadOptions', e.detail)
const { value } = e.detail
wx.showLoading({ mask: true })
this.setData({
pid: value[value.length - 1],
})
this.getAreaInfo()
},
onLoadComeAddress(e) {
const { value } = e.detail
wx.showLoading({ mask: true })
this.setData({
pid: value[value.length - 1],
})
this.getAreaInfo()
},
// 获取申请详情
getTripInfoDetail() {
let _this = this
getTripInfoDetail(this.data.id).then((res) => {
if (res.code == 0 && res.msg == 'success') {
if (res.data) {
this.setData({
id: res.data.id,
name: res.data.name,
phone: res.data.mobile,
card: res.data.idCard,
nowAddress: res.data.nowAddressName,
detailAddress: res.data.nowAddressDetail,
comeFromAddress: res.data.comeAddressName,
localTime: res.data.comeDate,
backTime: res.data.backDate,
actContent: res.data.note,
})
}
console.log('详情', res.data.backDate)
}
})
},
// 删除
deleteTripById() {
wx.showModal({
title: '提示',
content: '确定要删除吗',
success: (res) => {
if (res.confirm) {
const params = {
id: this.data.id,
}
deleteTripById(params).then((res) => {
wx.showToast({
title: '删除成功',
icon: 'success',
duration: 2000,
success: () => {
wx.navigateBack({
delta: 1,
})
},
})
})
} else if (res.cancel) {
console.log('用户点击取消')
}
},
})
},
confirmButton() {
wx.navigateBack({
delta: 1,
})
},
// 提交申请
onSubmitApply() {
if (this.data.lock) {
return
}
if (!this.data.name.trim('')) {
this.showToast('姓名不能为空')
return
}
if (!this.data.phone.trim('')) {
this.showToast('手机号不能为空')
return
}
if (!this.data.card.trim('')) {
this.showToast('身份证号不能为空')
return
}
if (this.data.nowAddressValue.length === 0) {
this.showToast('现居住地不能为空')
return
}
if (!this.data.detailAddress.trim('')) {
this.showToast('详细地址不能为空')
return
}
if (this.data.comeFromAddressValue.length === 0) {
this.showToast('来自地区不能为空')
return
}
if (this.data.localTimeValue.length === 0) {
this.showToast('来到本地时间不能为空')
return
}
this.setData({
lock: true,
})
this.setData({
nowAddress: this.data.nowAddress.split('-'),
comeFromAddress: this.data.comeFromAddress.split('-'),
})
let params = {
name: this.data.name.trim(''),
mobile: this.data.phone.trim(''),
idCard: this.data.card.trim(''),
nowAddressCode: this.data.nowAddressValue.join(','),
nowAddressName: this.data.nowAddress.join('-'),
nowAddressDetail: this.data.detailAddress,
comeAddressCode: this.data.comeFromAddressValue.join(','),
comeAddressName: this.data.comeFromAddress.join('-'),
comeDate: this.data.localTime,
backDate: this.data.backTime,
note: this.data.actContent.trim(''),
}
saveTripInfo(params)
.then((res) => {
if (res.code == 0 && res.msg == 'success') {
this.showToast('提交成功')
setTimeout(() => {
this.setData({
lock: false,
})
wx.switchTab({
url: '/pages/index/index',
})
}, 1000)
} else {
this.setData({
lock: false,
})
}
})
.catch((err) => {
this.setData({
lock: false,
})
})
},
onInputValue(e) {
let code = e.currentTarget.dataset.code
this.setData({
[code]: e.detail.value,
})
},
// 简化提示
showToast(title, time = 2500) {
wx.showToast({
title: title || '请耐心等待...',
icon: 'none',
duration: time,
})
},
toApplyList() {
wx.navigateTo({
url: '/subpages/extend/pages/moreList/moreList',
})
},
// 现地址
onOpenNowAddress() {
this.setData({
visibleNowAddress: true,
})
},
onCloseNowAddress() {
this.setData({ visibleNowAddress: false })
},
onChangeAdress(e) {
this.setData({
nowAddressValue: e.detail.value,
nowAddress: e.detail.options.map((n) => n.label).join('-'),
})
},
// 来自地址
onOpenComeFromAddress() {
this.setData({
visibleComeFromAddress: true,
})
},
onCloseComeFromAddress() {
this.setData({ visibleComeFromAddress: false })
},
onChangeComeFromAddress(e) {
this.setData({
comeFromAddressValue: e.detail.value,
comeFromAddress: e.detail.options.map((n) => n.label).join('-'),
})
},
// 来到时间
onOpenLocalTime() {
this.setData({
visibleLocalTime: true,
})
},
onConfirm(e) {
const { name, label, visible } = e.currentTarget.dataset
this.setData({
[name]: e.detail.value,
[label]: e.detail.label,
[visible]: false,
})
},
onCancelTime(e) {
const { visible } = e.currentTarget.dataset
this.setData({
[visible]: false,
})
},
onOpenBackTime() {
this.setData({
visibleBackTime: true,
})
},
})

8
epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.json

@ -0,0 +1,8 @@
{
"navigationBarTitleText": "行程上报",
"usingComponents": {
"date-time-picker": "../../../../components/DateTimePicker/index",
"wux-cascader": "../../../../dist/cascader/index",
"wux-date-picker": "../../../../dist/date-picker/index"
}
}

162
epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxml

@ -0,0 +1,162 @@
<view class="active-apply" wx:if="{{type == 'edit' || type == ''}}">
<view class="apply-list" bindtap="toApplyList" wx:if="{{!type}}">
<image src="../../images/wodeshangbao.png" />
</view>
<view class="data-form">
<view class="data-form-item">
<view class="item-label item-label-title">基本信息</view>
</view>
<view class="data-form-item">
<text class="must">*</text>
<view class="item-label">姓名</view>
<view class="item-value">
<input type="text" placeholder-class="placeholder" placeholder="请输入姓名" value="{{name}}" bindinput="onInputValue" data-code="name" maxlength='6' />
</view>
</view>
<view class="data-form-item">
<text class="must">*</text>
<view class="item-label">手机号</view>
<view class="item-value">
<input type="number" placeholder-class="placeholder" placeholder="请输入手机号" value="{{phone}}" bindinput="onInputValue" data-code="phone" maxlength='11' />
</view>
</view>
<view class="data-form-item" style="margin-bottom:10rpx">
<text class="must">*</text>
<view class="item-label">身份证号</view>
<view class="item-value">
<input type="idcard" placeholder-class="placeholder" placeholder="请输入证件号" value="{{card}}" bindinput="onInputValue" data-code="card" maxlength='18' />
</view>
</view>
<view class="data-form-item">
<view class="item-label item-label-title">现居住地</view>
</view>
<view class="data-form-item">
<text class="must">*</text>
<view class="item-label">现居地</view>
<view class="item-value" bind:tap="onOpenNowAddress">
<view class="value-text {{nowAddress ? '' : 'placeholder'}}">{{nowAddress || '请选择'}}</view>
</view>
<view class="item-select" bind:tap="onOpenNowAddress">
<!-- <image src="../../images/right-sword.png" class="arrow" /> -->
</view>
<!-- defaultFieldNames='{{defaultFieldNames}}' -->
<block wx:if="{{visibleNowAddress}}">
<wux-cascader visible="{{ visibleNowAddress }}" title="所在地区" controlled value="{{ nowAddressValue }}" options="{{ options1 }}" bind:close="onCloseNowAddress" bind:change="onChangeAdress" bind:load="onLoadOptions" />
</block>
</view>
<view class="data-form-item" style="margin-bottom:10rpx">
<text class="must">*</text>
<view class="item-label">详情地址</view>
<view class="item-value">
<input type="text" placeholder-class="placeholder" placeholder="请输入地址" value="{{detailAddress}}" bindinput="onInputValue" data-code="detailAddress" />
</view>
</view>
<view class="data-form-item">
<view class="item-label item-label-title">行程信息</view>
</view>
<view class="data-form-item">
<text class="must">*</text>
<view class="item-label">来自地区</view>
<view class="item-value" bind:tap="onOpenComeFromAddress">
<view class="value-text {{comeFromAddress ? '' : 'placeholder'}}">
{{comeFromAddress || '请选择'}}
</view>
</view>
<block wx:if="{{visibleComeFromAddress}}">
<wux-cascader visible="{{ visibleComeFromAddress }}" controlled value="{{ comeFromAddressValue }}" options="{{ options1 }}" bind:close="onCloseComeFromAddress" bind:change="onChangeComeFromAddress" bind:load="onLoadComeAddress" />
</block>
</view>
<view class="data-form-item">
<text class="must">*</text>
<view class="item-label" style="width:200rpx">来到本地时间</view>
<view class="item-value" bind:tap="onOpenLocalTime">
<view class="value-text {{localTime ? '' : 'placeholder'}}">{{localTime || '请选择'}}</view>
</view>
<block wx:if="{{visibleLocalTime}}">
<wux-date-picker visible="{{ visibleLocalTime }}" controlled mode="date" value="{{ localTimeValue }}" lang="zh_CN" data-name="localTimeValue" data-mode="date" data-label='localTime' data-visible='visibleLocalTime' bind:confirm="onConfirm" bind:cancel='onCancelTime'></wux-date-picker>
</block>
</view>
<view class="data-form-item">
<!-- <text class="must">*</text> -->
<view class="item-label">返回时间</view>
<view class="item-value" bind:tap="onOpenBackTime">
<view class="value-text {{backTime ? '' : 'placeholder'}}">{{backTime || '请选择'}}</view>
</view>
<block wx:if="{{visibleBackTime}}">
<wux-date-picker visible="{{ visibleBackTime }}" controlled mode="date" value="{{ backTimeValue }}" lang="zh_CN" data-name="backTimeValue" data-mode="date" data-label='backTime' data-visible='visibleBackTime' bind:confirm="onConfirm" bind:cancel='onCancelTime'></wux-date-picker>
</block>
</view>
<view class="data-form">
<view class="textarea-item">
<textarea class="textarea" placeholder-class="placeholder" placeholder="请输入备注信息" maxlength="100" value="{{actContent}}" bindinput="onInputValue" data-code="actContent"></textarea>
</view>
</view>
</view>
<view class="data-form">
<view class="footer-item">
<view class="submit" bindtap="onSubmitApply">提交</view>
</view>
</view>
</view>
<view class="active-apply" wx:elif="{{type == 'look'}}">
<view class="data-form">
<view class="data-form-item">
<view class="item-label item-label-title">基本信息</view>
</view>
<view class="data-form-item">
<view class="item-label">姓名</view>
<view class="item-value">{{name}}</view>
</view>
<view class="data-form-item">
<view class="item-label">手机号</view>
<view class="item-value">{{phone}}</view>
</view>
<view class="data-form-item" style="margin-bottom:10rpx">
<view class="item-label">身份证号</view>
<view class="item-value">{{card}}</view>
</view>
</view>
<view class="data-form">
<view class="data-form-item">
<view class="item-label item-label-title">现居住地</view>
</view>
<view class="data-form-item">
<view class="item-label">现居地</view>
<view class="item-value">{{nowAddress}}</view>
</view>
<view class="data-form-item" style="margin-bottom:10rpx">
<view class="item-label">详细地址</view>
<view class="item-value">{{detailAddress}}</view>
</view>
</view>
<view class="data-form">
<view class="data-form-item">
<view class="item-label item-label-title">行程信息</view>
</view>
<view class="data-form-item">
<view class="item-label">来自地区</view>
<view class="item-value">{{comeFromAddress}}</view>
</view>
<view class="data-form-item">
<view class="item-label" style="width:200rpx">来到本地时间</view>
<view class="item-value">{{localTime}}</view>
</view>
<view class="data-form-item">
<view class="item-label">返回时间</view>
<view class="item-value">{{backTime? backTime:'暂无'}}</view>
</view>
</view>
<view class="data-form">
<view class="textarea-item">
<view class="item-label">备注</view>
<view class="textarea">{{actContent}}</view>
</view>
</view>
<view class="data-form" wx:if="{{type==='look'}}">
<view class="footer-item">
<view class="submit delete" bindtap="deleteTripById">删除</view>
<view class="submit confirm" bind:tap="confirmButton">确定</view>
</view>
</view>
</view>
<wux-actionsheet id="wux-actionsheet" />

231
epdc-resident-mp-yushan/subpages/extend/pages/tripReport/tripReport.wxss

@ -0,0 +1,231 @@
.active-apply {
background-color: #f7f7f7;
position: relative;
}
.data-form {
box-sizing: border-box;
/* margin-bottom: 10rpx; */
}
.data-form-item {
box-sizing: border-box;
display: flex;
align-items: center;
height: 110rpx;
border-bottom: 1px solid #eee;
background-color: #fff;
padding-left: 30rpx;
box-sizing: border-box;
}
.data-form .must {
color: #ff0000;
}
.data-form .item-label {
width: 150rpx;
font-size: 32rpx;
color: #333333;
display: flex;
}
.data-form .reason-label {
width: 200rpx;
}
.data-form .item-value {
width: 490rpx;
}
.data-form .item-value .value-text {
width: 480rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.data-form .placeholder {
color: #c1c1c1;
}
.data-form .item-select {
width: 60rpx;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.upload-image {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-around;
height: 300rpx;
}
.upload-image .wux-upload--picture-card .wux-upload__select {
width: 214rpx !important;
height: 214rpx !important;
}
.upload-image .wux-upload--picture-card .wux-upload__file {
width: 214rpx !important;
height: 214rpx !important;
}
.item-select .arrow {
width: 20rpx;
height: 30rpx;
}
.item-select .pos {
width: 34rpx;
height: 38rpx;
}
.textarea-item {
display: flex;
flex-direction: column;
align-items: flex-start;
height: 360rpx;
/* border-bottom: 1px solid #eee; */
background-color: #fff;
padding-left: 30rpx;
padding-top: 40rpx;
box-sizing: border-box;
}
.textarea-item .textarea {
width: 690rpx;
padding: 24rpx 12rpx;
}
.switch-item {
display: flex;
align-items: center;
justify-content: space-between;
height: 110rpx;
border-bottom: 1px solid #eee;
background-color: #fff;
padding-left: 30rpx;
padding-right: 30rpx;
box-sizing: border-box;
}
.switch-item .switch-label {
width: 200rpx;
font-size: 32rpx;
color: #333333;
}
.footer-item {
display: flex;
align-items: center;
justify-content: center;
height: 200rpx;
/* background-color: #fff; */
padding-left: 30rpx;
box-sizing: border-box;
}
.submit {
width: 500rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
border-radius: 40rpx;
background-color: #ff0000;
color: #fff;
}
/* 上传图片 start */
.image-list {
width: 100%;
display: grid;
grid-template-columns: 214rpx 214rpx 214rpx;
grid-template-rows: 214rpx;
grid-gap: 17rpx;
height: 214rpx;
}
.image-list .image-item {
width: 100%;
height: 100%;
position: relative;
}
.image-list image {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 8rpx;
}
.image-list .image-item .loading {
position: absolute;
left: 25%;
top: 25%;
width: 50%;
height: 50%;
}
.image-list .image-item .close {
position: absolute;
top: -10rpx;
right: -10rpx;
width: 40rpx;
height: 40rpx;
}
/* 上传图片 end */
.apply-list {
width: 160rpx;
height: 56rpx;
position: absolute;
right: 0rpx;
/* top: -20rpx; */
z-index: 999;
}
.apply-list image {
width: 100%;
height: 100%;
}
.data-form .item-label-title {
font-size: 34rpx;
color: #333333;
font-weight: bold;
}
.delete {
width: 200rpx;
height: 72rpx;
background-image: linear-gradient(90deg,
#fc6c3b 0%,
#fe861e 51%,
#ffa000 100%),
linear-gradient(#c9c9c9,
#c9c9c9);
background-blend-mode: normal,
normal;
box-shadow: 0rpx 4rpx 27rpx 0rpx rgba(205, 205, 205, 0.33);
border-radius: 36rpx;
margin-right: 67rpx;
}
.confirm {
width: 200rpx;
height: 72rpx;
background-image: linear-gradient(90deg,
#db1a1f 20%,
#e95027 100%),
linear-gradient(#ffffff,
#ffffff);
background-blend-mode: normal,
normal;
box-shadow: 0rpx 4rpx 27rpx 0rpx rgba(220, 28, 31, 0.29);
border-radius: 36rpx;
}

22
epdc-resident-mp-yushan/subpages/extend/utils/tripReport.js

@ -0,0 +1,22 @@
var fly = require('../../../utils/request')
// 行程上报
export function saveTripInfo(params) {
return fly.post('custom/epidemic/saveTripInfo', params)
}
// 我的上报列表
export function getTripInfoList(params) {
return fly.get('custom/epidemic/getTripInfoList', params)
}
// 我的上报详情
export function getTripInfoDetail(id) {
return fly.get(`custom/epidemic/getTripInfoDetail?id=${id}`)
}
// 删除
export function deleteTripById(params) {
return fly.deleted('custom/epidemic/deleteTripById', params)
}
// 级联
export function getAreaInfo(pid) {
return fly.get(`admin/city/getAreaInfo?pid=${pid}`)
}

10
epdc-resident-mp-yushan/utils/config.js

@ -2,13 +2,13 @@ module.exports = {
BASEURL: BASEURL,
WEBROOT: WEBROOT,
Token: getToken,
userId: ""
};
userId: '',
}
function BASEURL() {
// return 'http://192.168.51.31:9094/epdc-api/api/' // 测试环境 接口地址
// return "https://epdc-api-test.elinkservice.cn/epdc-api/api/" // 测试环境 ip接口地址
return 'https://epdc-yushan.elinkservice.cn/epdc-api/api/' // 现代榆山正式环境
return 'https://epdc-api-test.elinkservice.cn/epdc-api/api/' // 测试环境 ip接口地址
// return 'https://epdc-yushan.elinkservice.cn/epdc-api/api/' // 现代榆山正式环境
}
function WEBROOT() {
@ -17,5 +17,5 @@ function WEBROOT() {
}
function getToken() {
return wx.getStorageSync("token");
return wx.getStorageSync('token')
}

38
epdc-resident-mp-yushan/utils/request.js

@ -1,31 +1,32 @@
var global = require('./config.js')
const request = function (url, options) {
const request = function (url, options) {
let token = wx.getStorageSync('token')
if (token==undefined || token==null) {
if (token == undefined || token == null) {
token = ''
}
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
wx.request({
url: `${global.BASEURL()}${url}`,
method: options.method,
data: options.method === 'GET' ? options.data : JSON.stringify(options.data),
data:
options.method === 'GET' ? options.data : JSON.stringify(options.data),
header: {
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': token
Authorization: token,
},
success (response) {
success(response) {
if (response.statusCode === 200) {
if(response.data.code===0){
resolve(response.data)
}else{
if (response.data.code === 0) {
resolve(response.data)
} else {
let errmsg = response.data.msg
if(errmsg==undefined || errmsg=='undefined' ){
if (errmsg == undefined || errmsg == 'undefined') {
errmsg = '未返回错误信息'
}
wx.showToast({
title: errmsg,
icon: 'none',
duration: 3000
duration: 3000,
})
reject(false)
}
@ -33,19 +34,19 @@ const request = function (url, options) {
wx.showToast({
title: '网络问题,请稍后再试。',
icon: 'none',
duration: 2000
duration: 2000,
})
reject(false)
}
},
fail (error) {
fail(error) {
wx.showToast({
title: '网络问题,请稍后再试。',
icon: 'none',
duration: 2000
duration: 2000,
})
reject(error.data)
}
},
})
})
}
@ -60,9 +61,14 @@ function post(url, options = {}) {
function put(url, options = {}) {
return request(url, { method: 'PUT', data: options })
}
// 写delete报错
function deleted(url, options = {}) {
return request(url, { method: 'DELETE', data: options })
}
module.exports = {
get: get,
post: post,
put: put
put: put,
deleted: deleted,
}

Loading…
Cancel
Save