From 826a204155819ebb8f50ac69d468a7aa16a352b3 Mon Sep 17 00:00:00 2001 From: Gs Date: Wed, 22 Dec 2021 16:42:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E6=B1=82=E5=8A=A9?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=9A=84=E7=AD=9B=E9=80=89=E5=92=8C=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=B1=95=E7=A4=BA=20Signed-off-by:=20Gs=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wx_project/app.json | 110 +++++++++--------- wx_project/pages/AbnormalList/AbnormalList.js | 82 ++++++++++++- .../pages/AbnormalList/AbnormalList.wxml | 7 +- .../pages/AbnormalList/AbnormalList.wxss | 31 ++++- .../AbnormalList/AbnormalView/AbnormalView.js | 77 ++++++++++++ .../AbnormalView/AbnormalView.json | 3 + .../AbnormalView/AbnormalView.wxml | 38 ++++++ .../AbnormalView/AbnormalView.wxss | 59 ++++++++++ wx_project/project.config.json | 82 ++++++------- 9 files changed, 382 insertions(+), 107 deletions(-) create mode 100644 wx_project/pages/AbnormalList/AbnormalView/AbnormalView.js create mode 100644 wx_project/pages/AbnormalList/AbnormalView/AbnormalView.json create mode 100644 wx_project/pages/AbnormalList/AbnormalView/AbnormalView.wxml create mode 100644 wx_project/pages/AbnormalList/AbnormalView/AbnormalView.wxss diff --git a/wx_project/app.json b/wx_project/app.json index f6b32ef..b9e719c 100644 --- a/wx_project/app.json +++ b/wx_project/app.json @@ -1,57 +1,57 @@ { - "pages": [ - "pages/AbnormalSubmit/AbnormalSubmit", - "pages/AbnormalList/AbnormalList", - "pages/login/login", - "pages/index/index", - - "pages/htclockin/htclockin", - "pages/service/service", - "pages/my/my", - "pages/logs/logs", - "pages/HistoryhtList", - "pages/HistoryhtList/HistoryhtList", - "pages/info", - "pages/info/info", - "pages/visitorCheckIn/visitorCheckIn", - "pages/setting/setting", - "pages/setting/edit/edit", - "pages/info/edit/edit", - "pages/vistiorApproval/visitorApproval", - "pages/addMember/addMember", - "pages/myApprovalLogs/myApprovalLogs" - ], - "window": { - "backgroundTextStyle": "light", - "navigationBarBackgroundColor": "#fff", - "navigationBarTitleText": "青山社区防疫", - "navigationBarTextStyle": "black" - }, - "tabBar": { - "color": "#f4f4f4", - "selectedColor": "#52EFAD", - "borderStyle": "black", - "list": [ - { - "selectedIconPath": "images/home_s.png", - "iconPath": "images/home.png", - "pagePath": "pages/index/index", - "text": "首页" - }, - { - "selectedIconPath": "images/service_s.png", - "iconPath": "images/service.png", - "pagePath": "pages/service/service", - "text": "服务" - }, - { - "selectedIconPath": "images/my_s.png", - "iconPath": "images/my.png", - "pagePath": "pages/my/my", - "text": "我的" - } - ] - }, - "style": "v2", - "sitemapLocation": "sitemap.json" + "pages": [ + "pages/AbnormalSubmit/AbnormalSubmit", + "pages/AbnormalList/AbnormalList", + "pages/login/login", + "pages/index/index", + "pages/htclockin/htclockin", + "pages/service/service", + "pages/my/my", + "pages/logs/logs", + "pages/HistoryhtList", + "pages/HistoryhtList/HistoryhtList", + "pages/info", + "pages/info/info", + "pages/visitorCheckIn/visitorCheckIn", + "pages/setting/setting", + "pages/setting/edit/edit", + "pages/info/edit/edit", + "pages/vistiorApproval/visitorApproval", + "pages/addMember/addMember", + "pages/myApprovalLogs/myApprovalLogs", + "pages/AbnormalList/AbnormalView/AbnormalView" + ], + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "青山社区防疫", + "navigationBarTextStyle": "black" + }, + "tabBar": { + "color": "#f4f4f4", + "selectedColor": "#52EFAD", + "borderStyle": "black", + "list": [ + { + "selectedIconPath": "images/home_s.png", + "iconPath": "images/home.png", + "pagePath": "pages/index/index", + "text": "首页" + }, + { + "selectedIconPath": "images/service_s.png", + "iconPath": "images/service.png", + "pagePath": "pages/service/service", + "text": "服务" + }, + { + "selectedIconPath": "images/my_s.png", + "iconPath": "images/my.png", + "pagePath": "pages/my/my", + "text": "我的" + } + ] + }, + "style": "v2", + "sitemapLocation": "sitemap.json" } \ No newline at end of file diff --git a/wx_project/pages/AbnormalList/AbnormalList.js b/wx_project/pages/AbnormalList/AbnormalList.js index b4d82a6..1ac75f4 100644 --- a/wx_project/pages/AbnormalList/AbnormalList.js +++ b/wx_project/pages/AbnormalList/AbnormalList.js @@ -16,7 +16,7 @@ Page({ onLoad: function (options) { var _that=this wx.request({ - url: 'http://localhost/Wx/abnormalHistory', + url: 'http://192.168.31.166/Wx/abnormalHistory', method:'post', header:{ "Content-Type": "application/x-www-form-urlencoded" @@ -90,11 +90,87 @@ Page({ }, onConfirm(event) { + var _that=this const { picker, value, index } = event.detail; - Toast(`当前值:${value}, 当前索引:${index}`); - }, + console.log("value:"+value+" .index:"+index) + if(index==0){ + wx.request({ + url: 'http://192.168.31.166/Wx/abnormalHistory', + method:'post', + header:{ + "Content-Type": "application/x-www-form-urlencoded" + }, + data:{ + openid:wx.getStorageSync('openid'), + }, + success(res){ + if(res.data.code==200){ + _that.setData({ + data:res.data.data, + show:false + }) + }else{ + + } + } + }) + } + if(index==1){ + wx.request({ + url: 'http://192.168.31.166/Wx/abnormalHistory', + method:'post', + header:{ + "Content-Type": "application/x-www-form-urlencoded" + }, + data:{ + openid:wx.getStorageSync('openid'), + status:1 + }, + success(res){ + if(res.data.code==200){ + _that.setData({ + data:res.data.data, + show:false + }) + }else{ + + } + } + }) + } + if(index==2){ + wx.request({ + url: 'http://192.168.31.166/Wx/abnormalHistory', + method:'post', + header:{ + "Content-Type": "application/x-www-form-urlencoded" + }, + data:{ + openid:wx.getStorageSync('openid'), + status:0 + }, + success(res){ + if(res.data.code==200){ + _that.setData({ + data:res.data.data, + show:false + }) + }else{ + + } + } + }) + } + }, onCancel() { this.setData({show:false}) }, + + onClickView(e){ + console.log(e) + wx.navigateTo({ + url: './AbnormalView/AbnormalView?id='+e.currentTarget.dataset.index, + }) + } }) \ No newline at end of file diff --git a/wx_project/pages/AbnormalList/AbnormalList.wxml b/wx_project/pages/AbnormalList/AbnormalList.wxml index 760a58a..6d8c9b3 100644 --- a/wx_project/pages/AbnormalList/AbnormalList.wxml +++ b/wx_project/pages/AbnormalList/AbnormalList.wxml @@ -4,7 +4,7 @@ - + 由{{user.realname}}在{{item.Date}}发起的求助... @@ -13,8 +13,11 @@ 由{{user.realname}}提交 + +

{{item.status==0?'未审批':'已审批'}}

+

{{item.status==0?'未审批':'已审批'}}

+
-
diff --git a/wx_project/pages/AbnormalList/AbnormalList.wxss b/wx_project/pages/AbnormalList/AbnormalList.wxss index b04f377..90d922e 100644 --- a/wx_project/pages/AbnormalList/AbnormalList.wxss +++ b/wx_project/pages/AbnormalList/AbnormalList.wxss @@ -32,15 +32,34 @@ page{ font-weight: 700; } .content .item .remark{ + margin: 8px 0px 15px 0px; padding-left: 30rpx; - font-weight: 600; font-size: 13px; - color: #ccc; + color: rgb(109, 109, 109); } .content .item .botn .avatar{ - width: 50rpx; - height: 50rpx; - margin-left: 30rpx; - + width: 40rpx; + height: 40rpx; + margin: 0rpx 15rpx 0rpx 30rpx; border-radius: 50%; +} +.content .item .botn{ + font-size: 20rpx; + display: flex; + flex-direction: row; + align-items: center; +} +.content .item .botn .status{ + margin-left: 370rpx; + font-size: 25rpx; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + width: 100rpx; + height: 40rpx; + border: #e0e0e0 1rpx solid; + border-radius: 8rpx; + background-color: #e9fdeb83; + color: rgb(0, 197, 131); } \ No newline at end of file diff --git a/wx_project/pages/AbnormalList/AbnormalView/AbnormalView.js b/wx_project/pages/AbnormalList/AbnormalView/AbnormalView.js new file mode 100644 index 0000000..6016bf6 --- /dev/null +++ b/wx_project/pages/AbnormalList/AbnormalView/AbnormalView.js @@ -0,0 +1,77 @@ +// pages/AbnormalList/AbnormalView/AbnormalView.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + user:wx.getStorageSync('userDetail') + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var _that=this + console.log(options) + wx.request({ + url: 'http://192.168.31.166/Wx/abnormalView?id='+options.id, + method:'get', + success(res){ + console.log(res.data) + _that.setData({ + data:res.data, + }) + } + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/wx_project/pages/AbnormalList/AbnormalView/AbnormalView.json b/wx_project/pages/AbnormalList/AbnormalView/AbnormalView.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/wx_project/pages/AbnormalList/AbnormalView/AbnormalView.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/wx_project/pages/AbnormalList/AbnormalView/AbnormalView.wxml b/wx_project/pages/AbnormalList/AbnormalView/AbnormalView.wxml new file mode 100644 index 0000000..0bb620d --- /dev/null +++ b/wx_project/pages/AbnormalList/AbnormalView/AbnormalView.wxml @@ -0,0 +1,38 @@ + + + + + + 由{{user.realname}}在{{data.Date}}发起的求助... + + + {{data.userRemark}} + + + 由{{user.realname}}提交 + + +

{{data.status==0?'未审批':'已审批'}}

+

{{data.status==0?'未审批':'已审批'}}

+
+
+
+ + + 审批编号 +

{{data.id}}

+
+ + 用户信息 + 地址:{{user.AmName}}-{{user.BlockName}}\n + 身份证号:{{user.idcard}}\n + 昵称:{{user.nickname}}\n + 联系电话:{{user.phone}}\n + 真实姓名:{{user.realname}} + + + 处理意见 +

{{data.managerRemark==null?'暂无':data.managerRemark}}

+
+
+
diff --git a/wx_project/pages/AbnormalList/AbnormalView/AbnormalView.wxss b/wx_project/pages/AbnormalList/AbnormalView/AbnormalView.wxss new file mode 100644 index 0000000..38e84f3 --- /dev/null +++ b/wx_project/pages/AbnormalList/AbnormalView/AbnormalView.wxss @@ -0,0 +1,59 @@ +/* pages/AbnormalList/AbnormalView/AbnormalView.wxss */ +page{ + background-color: #f4f4f4; +} +.content{ + overflow:hidden; + clear:both; + padding-top: 10rpx; +} +.content .item{ + margin-top: 25rpx; + margin-bottom: 25rpx; + margin-left: 20rpx; + margin-right: 20rpx; + background-color: #ffffff; + height: 240rpx; +} +.content .item .title{ + padding-top: 20rpx; + padding-left: 30rpx; +} +.content .item .title b { + font-weight: 700; +} +.content .item .remark{ + margin: 8px 0px 15px 0px; + padding-left: 30rpx; + font-size: 13px; + color: rgb(109, 109, 109); +} +.content .item .botn .avatar{ + width: 40rpx; + height: 40rpx; + margin: 0rpx 15rpx 0rpx 30rpx; + border-radius: 50%; +} +.content .item .botn{ + font-size: 20rpx; + display: flex; + flex-direction: row; + align-items: center; +} +.content .item .status{ + margin: 15rpx 0rpx 0rpx 15rpx; + font-size: 25rpx; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + width: 100rpx; + color: rgb(0, 197, 131); +} +.body{ + background-color: #ffffff; + padding: 30rpx 0rpx 15rpx 30rpx; +} +.body>view{ + margin-bottom: 30rpx; +} \ No newline at end of file diff --git a/wx_project/project.config.json b/wx_project/project.config.json index d8ab141..0db906a 100644 --- a/wx_project/project.config.json +++ b/wx_project/project.config.json @@ -1,44 +1,44 @@ { - "description": "项目配置文件", - "packOptions": { - "ignore": [] + "description": "项目配置文件", + "packOptions": { + "ignore": [] + }, + "setting": { + "urlCheck": false, + "es6": true, + "enhance": true, + "postcss": true, + "preloadBackgroundData": false, + "minified": true, + "newFeature": false, + "coverView": true, + "nodeModules": true, + "autoAudits": false, + "showShadowRootInWxmlPanel": true, + "scopeDataCheck": false, + "uglifyFileName": false, + "checkInvalidKey": true, + "checkSiteMap": true, + "uploadWithSourceMap": true, + "compileHotReLoad": false, + "lazyloadPlaceholderEnable": false, + "useMultiFrameRuntime": true, + "useApiHook": true, + "useApiHostProcess": true, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" }, - "setting": { - "urlCheck": false, - "es6": true, - "enhance": true, - "postcss": true, - "preloadBackgroundData": false, - "minified": true, - "newFeature": false, - "coverView": true, - "nodeModules": true, - "autoAudits": false, - "showShadowRootInWxmlPanel": true, - "scopeDataCheck": false, - "uglifyFileName": false, - "checkInvalidKey": true, - "checkSiteMap": true, - "uploadWithSourceMap": true, - "compileHotReLoad": false, - "lazyloadPlaceholderEnable": false, - "useMultiFrameRuntime": false, - "useApiHook": false, - "useApiHostProcess": false, - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - }, - "enableEngineNative": false, - "useIsolateContext": true, - "userConfirmedBundleSwitch": false, - "packNpmManually": false, - "packNpmRelationList": [], - "minifyWXSS": true, - "disableUseStrict": false, - "showES6CompileOption": false, - "useCompilerPlugins": false - }, - "condition": {} + "enableEngineNative": false, + "useIsolateContext": true, + "userConfirmedBundleSwitch": false, + "packNpmManually": false, + "packNpmRelationList": [], + "minifyWXSS": true, + "disableUseStrict": false, + "showES6CompileOption": false, + "useCompilerPlugins": false + }, + "condition": {} } \ No newline at end of file -- Gitee