소스 검색

投诉建议

yanym 5 년 전
부모
커밋
81fc1c4445

+ 2 - 0
dorm-manager-wx/app.json

@@ -49,6 +49,8 @@
     "pages/teacher/visitorcheck/visitorcheck",
     "pages/teacher/statistics/statistics",
     "pages/teacher/pass/pass",
+    "pages/teacher/suggestion/list",
+    "pages/teacher/suggestion/detail",
     "pages/teacher/visitorcheckdetail/visitorcheckdetail",
     "pages/teacher/warning/warning",
     "pages/teacher/facephoto/facephoto",

+ 4 - 1
dorm-manager-wx/pages/student/menu/menu.js

@@ -76,13 +76,16 @@ Page({
     listTeacher: [{
       'title': '预警提醒',
       nav: 'yujing-2',
+      Url: 'warning',
       url: 'warning'
     }, {
       'title': '报表管理',
       nav: 'baobiaoguanli'
     }, {
       'title': '投诉建议',
-      nav: 'tousu'
+      nav: 'tousu',
+      Url: 'suggestion',
+      url: 'list'
     }, {
       'title': '报修管理',
       nav: 'baoxiu'

+ 1 - 1
dorm-manager-wx/pages/student/menu/menu.wxml

@@ -10,7 +10,7 @@
 </view>
 <view class="list">
   <block wx:for='{{userInfo.roleType==10001?listTeacher:listStudent}}' wx:key='{{index}}'>
-    <navigator url="/pages/{{userInfo.roleType==10001?'teacher':'student'}}/{{item.url}}/{{item.url}}">
+    <navigator url="/pages/{{userInfo.roleType==10001?'teacher':'student'}}/{{item.Url}}/{{item.url}}">
       <view catchtap="{{item.url?'':'check'}}" class="line">
         <view class="list-title">
           <image src='/images/{{item.nav}}.png'></image>

+ 117 - 6
dorm-manager-wx/pages/teacher/statistics/statistics.js

@@ -21,7 +21,9 @@ Page({
       []
     ],
     value: [0, 0],
-    weiguiList: []
+    state: '',
+    listTitle: '无进出记录人员',
+    list: []
   },
 
   getCurrentDate: function(e) {
@@ -96,6 +98,7 @@ Page({
               listDept: res.data
             })
             that.getStatisticsInfo();
+            that.getUnOut();
           }
         }
       } else {
@@ -203,32 +206,142 @@ Page({
 
   getUnInInfo: function(e) {
     const that = this;
-    util.httpRequest(api.getUnInfo, {
+    util.httpRequest(api.getUnInInfo, {
       start: that.data.startDate,
       end: that.data.endDate,
       page: 1,
       rows: 20
     }, 'post').then(res => {
       that.setData({
-        weiguiList: res.data.data.data
+        list: res.data.data.data
       })
     })
   },
 
   getOutAndInInfo: function(e) {
     const that = this;
+    let deptId;
+    if (that.data.listDept != '') {
+      deptId = that.data.listDept[that.data.value[1]].deptId
+    } else {
+      deptId = that.data.listCollege[that.data.value[0]].deptId
+    }
     util.httpRequest(api.getOutAndInInfo, {
       startDate: that.data.startDate,
       endDate: that.data.endDate,
       page: 1,
-      rows: 20
+      rows: 20,
+      deptId: deptId,
+      state: that.data.state
     }, 'post').then(res => {
       that.setData({
+        list: res.data.data.data
+      })
+    })
+  },
 
+  getUnOut: function(e) {
+    const that = this;
+    let deptId;
+    if (that.data.listDept != '') {
+      deptId = that.data.listDept[that.data.value[1]].deptId
+    } else {
+      deptId = that.data.listCollege[that.data.value[0]].deptId
+    }
+    util.httpRequest(api.getUnOut, {
+      start: that.data.startDate,
+      end: that.data.endDate,
+      page: 1,
+      rows: 20,
+      deptId: deptId
+    }, 'post').then(res => {
+      that.setData({
+        list: res.data.data.data
       })
     })
   },
 
+  getLateIn: function(e) {
+    const that = this;
+    let deptId;
+    if (that.data.listDept != '') {
+      deptId = that.data.listDept[that.data.value[1]].deptId
+    } else {
+      deptId = that.data.listCollege[that.data.value[0]].deptId
+    }
+    util.httpRequest(api.getLateIn, {
+      start: that.data.startDate,
+      end: that.data.endDate,
+      page: 1,
+      rows: 20,
+      deptId: deptId
+    }, 'post').then(res => {
+      that.setData({
+        list: res.data.data.data
+      })
+    })
+  },
+
+  getInUnOut: function(e) {
+    const that = this;
+    let deptId;
+    if (that.data.listDept != '') {
+      deptId = that.data.listDept[that.data.value[1]].deptId
+    } else {
+      deptId = that.data.listCollege[that.data.value[0]].deptId
+    }
+    util.httpRequest(api.getInUnOunt, {
+      start: that.data.startDate,
+      end: that.data.endDate,
+      page: 1,
+      rows: 20,
+      deptId: deptId
+    }, 'post').then(res => {
+      that.setData({
+        list: res.data.data.data
+      })
+    })
+  },
+
+  qiehuan: function(e) {
+    const that = this;
+    let type = e.currentTarget.dataset.type;
+    let state = e.currentTarget.dataset.state;
+    if (type == 1) {
+      that.setData({
+        listTitle: '无进出记录人员'
+      })
+      that.getUnOut();
+    } else if (type == 2) {
+      that.setData({
+        listTitle: '已出宿舍人员',
+        state: state
+      })
+      that.getOutAndInInfo();
+    } else if (type == 3) {
+      that.setData({
+        listTitle: '已归宿舍人员',
+        state: state
+      })
+      that.getOutAndInInfo();
+    } else if (type == 4) {
+      that.setData({
+        listTitle: '晚归宿舍人员'
+      })
+      that.getLateIn();
+    } else if (type == 5) {
+      that.setData({
+        listTitle: '未归宿舍人员'
+      })
+      that.getUnInInfo();
+    } else if (type == 6) {
+      that.setData({
+        listTitle: '未出宿舍人员'
+      })
+      that.getInUnOut();
+    }
+  },
+
   /**
    * 生命周期函数--监听页面加载
    */
@@ -237,8 +350,6 @@ Page({
     that.getCurrentDate();
     that.data.userInfo = wx.getStorageSync('user');
     that.getCollegeInfo();
-    that.getUnInInfo();
-    that.getOutAndInInfo();
   },
 
   /**

+ 8 - 8
dorm-manager-wx/pages/teacher/statistics/statistics.wxml

@@ -55,35 +55,35 @@
     </view>
     <view class="bottom">
       <view class="my-column my-align-c">
-        <view class="bottom-bigback1 item">{{totalInfo.unAccessCount}}</view>
+        <view class="bottom-bigback1 item" bindtap="qiehuan" data-type="1">{{totalInfo.unAccessCount}}</view>
         <view class="desc">无进出记录人员</view>
       </view>
       <view class="my-column my-align-c">
-        <view class="bottom-bigback2 item">{{totalInfo.out}}</view>
+        <view class="bottom-bigback2 item" bindtap="qiehuan" data-type="2" data-state="1">{{totalInfo.out}}</view>
         <view class="desc">已出宿舍人员</view>
       </view>
       <view class="my-column my-align-c">
-        <view class="bottom-bigback3 item">{{totalInfo.in}}</view>
+        <view class="bottom-bigback3 item" bindtap="qiehuan" data-type="3" data-state="0">{{totalInfo.in}}</view>
         <view class="desc">已归宿舍人员</view>
       </view>
     </view>
     <view class="bottom" style="margin-top:30rpx;margin-bottom:30rpx;">
       <view class="my-column my-align-c">
-        <view class="bottom-bigback4 item">{{totalInfo.laterIn}}</view>
+        <view class="bottom-bigback4 item" bindtap="qiehuan" data-type="4">{{totalInfo.laterIn}}</view>
         <view class="desc">晚归宿舍人员</view>
       </view>
       <view class="my-column my-align-c">
-        <view class="bottom-bigback5 item">{{totalInfo.unIn}}</view>
+        <view class="bottom-bigback5 item" bindtap="qiehuan" data-type="5">{{totalInfo.unIn}}</view>
         <view class="desc">未归宿舍人员</view>
       </view>
       <view class="my-column my-align-c">
-        <view class="bottom-bigback6 item">{{totalInfo.unOut}}</view>
+        <view class="bottom-bigback6 item" bindtap="qiehuan" data-type="6">{{totalInfo.unOut}}</view>
         <view class="desc">未出宿舍人员</view>
       </view>
     </view>
   </view>
   <view class="titlebar">
-    未归宿舍人员统计
+    {{listTitle}}
   </view>
   <view class="weigui">
     <view class="title-item">
@@ -93,7 +93,7 @@
       <view class="name">次数</view>
       <view class="name">时间</view>
     </view>
-    <block wx:for='{{weiguiList}}'>
+    <block wx:for='{{list}}'>
       <view class="item">
         <view class="name">{{item.userName}}</view>
         <view class="name">{{item.storeyTitle}}</view>

+ 106 - 0
dorm-manager-wx/pages/teacher/suggestion/detail.js

@@ -0,0 +1,106 @@
+const util = require('../../../utils/util.js');
+const api = require('../../../utils/api.js');
+const app = getApp()
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    id: '',
+    info: '',
+    responseVal: '',
+    userInfo: ''
+  },
+
+  getInfo: function(e) {
+    const that = this;
+    util.httpRequest(api.getSuggestionDetail, {
+      id: that.data.id
+    }, 'post').then(res => {
+      that.setData({
+        info: res.data.data.data
+      })
+    })
+  },
+
+  response: function(e) {
+    this.setData({
+      responseVal: e.detail.value
+    })
+  },
+
+  apply: function(e) {
+    const that = this;
+    if (that.data.responseVal == '') {
+      wx.showToast({
+        title: '回复不能为空',
+        icon: 'none'
+      })
+    } else {
+      util.httpRequest(api.getSuggestionResponse, {
+        loginId: that.data.userInfo.loginId,
+        id: that.data.id,
+        answer: that.data.responseVal
+      }, 'post').then(res => {
+
+      })
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+    const that = this;
+    let userInfo = wx.getStorageSync('user');
+    that.setData({
+      id: options.id,
+      userInfo: userInfo
+    })
+    that.getInfo();
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+
+  }
+})

+ 3 - 0
dorm-manager-wx/pages/teacher/suggestion/detail.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "投诉建议"
+}

+ 20 - 0
dorm-manager-wx/pages/teacher/suggestion/detail.wxml

@@ -0,0 +1,20 @@
+<!-- detail.wxml -->
+<view class="mycontainer" style="padding-top:30rpx;">
+  <view class="title-item">
+    <view class="title">标题</view>
+    <view class="content">{{info.title}}</view>
+  </view>
+  <view class="title-item">
+    <view class="title">内容</view>
+    <view class="content">{{info.message}}</view>
+  </view>
+  <view class="title-item">
+    <view class="title">投诉/建议人</view>
+    <view class="content">{{info.userName}}</view>
+  </view>
+  <view class="reponse-item">
+    <view class="title">回复:</view>
+    <textarea bindinput="response"></textarea>
+  </view>
+  <view class="apply-btn" bindtap="apply" hover-class="myhover" hover-start-time="50" hover-stay-time="50">提交</view>
+</view>

+ 58 - 0
dorm-manager-wx/pages/teacher/suggestion/detail.wxss

@@ -0,0 +1,58 @@
+page {
+  background-color: #f2f2f2;
+}
+
+.title-item {
+  width: 100%;
+  flex-direction: row;
+  display: flex;
+  align-items: center;
+  margin-bottom: 30rpx;
+}
+
+.title-item .title {
+  font-size: 28rpx;
+  width: 200rpx;
+  min-width: 200rpx;
+}
+
+.title-item .content {
+  font-size: 28rpx;
+  color: #666;
+}
+
+.reponse-item {
+  flex-direction: column;
+  display: flex;
+  width: 100%;
+  box-sizing: border-box;
+}
+
+.reponse-item .title {
+  font-size: 28rpx;
+}
+
+.reponse-item textarea{
+  height: 300rpx;
+  width: 100%;
+  border-radius: 8rpx;
+  margin-top: 10rpx;
+  background-color: #fff;
+  padding: 10rpx;
+  font-size: 28rpx;
+}
+
+.apply-btn{
+  width: 200rpx;
+  height: 70rpx;
+  border-radius: 10rpx;
+  flex-direction: row;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 32rpx;
+  color: #fff;
+  background-color: rgb(31, 96, 236);
+  position: fixed;
+  bottom: 100rpx;
+}

+ 106 - 0
dorm-manager-wx/pages/teacher/suggestion/list.js

@@ -0,0 +1,106 @@
+const util = require('../../../utils/util.js');
+const api = require('../../../utils/api.js');
+const app = getApp()
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    tab: 1,
+    list: '',
+    userInfo: ''
+  },
+
+  checkTab: function(e) {
+    const that = this;
+    let type = e.currentTarget.dataset.type;
+    that.setData({
+      tab: type
+    })
+    if (type == 1) {
+      that.getList(0);
+    } else if (type == 3) {
+      that.getList(1);
+    } else {
+      that.getList('');
+    }
+  },
+
+  getList: function(state) {
+    const that = this;
+    util.httpRequest(api.getSuggestionList, {
+      loginId: that.data.userInfo.loginId,
+      reply: state,
+      page: 1,
+      rows: 20
+    }, 'post').then(res => {
+      that.setData({
+        list: res.data.data.data
+      })
+    })
+  },
+
+  toDetail: function(e) {
+    const that = this;
+    let id = e.currentTarget.dataset.id;
+    wx.navigateTo({
+      url: 'detail?id=' + id,
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+    const that = this;
+    let userInfo = wx.getStorageSync('user');
+    that.setData({
+      userInfo: userInfo
+    })
+    that.getList(0);
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+
+  }
+})

+ 3 - 0
dorm-manager-wx/pages/teacher/suggestion/list.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "投诉建议"
+}

+ 18 - 0
dorm-manager-wx/pages/teacher/suggestion/list.wxml

@@ -0,0 +1,18 @@
+<!-- list.wxml -->
+<view class="mycontainer" style="padding:0rpx;">
+  <view class="tab-item">
+    <view class="item {{tab==1?'item-checked':''}}" bindtap="checkTab" data-type="1">未回复</view>
+    <view class="item {{tab==3?'item-checked':''}}" bindtap="checkTab" data-type="3">已回复</view>
+    <view class="item {{tab==5?'item-checked':''}}" bindtap="checkTab" data-type="5">全部</view>
+  </view>
+  <scroll-view scroll-y='true'>
+    <block wx:for='{{list}}'>
+      <view class="list-item" bindtap="toDetail" data-id="{{item.id}}" hover-class="myhover" hover-start-time="50" hover-stay-time="50">
+        <view class="title">主题:{{item.title}}</view>
+        <view class="title">{{item.userName}}</view>
+        <view class="title">{{item.createDate}}</view>
+        <view class="tag">{{item.messageTag}}</view>
+      </view>
+    </block>
+  </scroll-view>
+</view>

+ 71 - 0
dorm-manager-wx/pages/teacher/suggestion/list.wxss

@@ -0,0 +1,71 @@
+page {
+  background-color: #f2f2f2;
+}
+
+.tab-item {
+  width: 100%;
+  box-sizing: border-box;
+  background-color: #fff;
+  flex-direction: row;
+  display: flex;
+  justify-content: space-around;
+  align-items: center;
+}
+
+.tab-item .item {
+  height: 80rpx;
+  font-size: 32rpx;
+  flex-direction: row;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.tab-item .item-checked {
+  color: #6784f4;
+  border-bottom: 2rpx #6784f4 solid;
+}
+
+scroll-view {
+  width: 100%;
+  height: 93vh;
+  box-sizing: border-box;
+  flex-direction: column;
+  display: flex;
+  padding: 20rpx 30rpx 0rpx 30rpx;
+}
+
+.list-item {
+  width: 100%;
+  height: 200rpx;
+  padding: 20rpx 30rpx 20rpx 30rpx;
+  box-sizing: border-box;
+  flex-direction: column;
+  display: flex;
+  justify-content: space-between;
+  background-color: #fff;
+  border-radius: 10rpx;
+  margin-bottom: 20rpx;
+  position: relative;
+}
+
+.list-item .title {
+  width: 500rpx;
+  font-size: 28rpx;
+  color: #666;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.list-item .tag{
+  flex-direction: row;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 28rpx;
+  color: rgb(31, 96, 236);
+  position: absolute;
+  right: 30rpx;
+  top: 20rpx;
+}

+ 1 - 1
dorm-manager-wx/pages/teacher/warning/warning.js

@@ -37,7 +37,7 @@ Page({
     day5.setTime(day5.getTime() - 5 * 24 * 60 * 60 * 1000);
     let s5 = day5.getFullYear() + "-" + (day5.getMonth() + 1) + "-" + day5.getDate();
     console.log(s1, s3, s5)
-    util.httpRequest(api.getUnInfo, {
+    util.httpRequest(api.getunInByCount, {
       start: that.data.tab == 1 ? s1 : that.data.tab == 3 ? s3 : s5,
       end: stoday,
       page: 1,

+ 12 - 5
dorm-manager-wx/utils/api.js

@@ -92,9 +92,9 @@ const index = 2,
     selfInfo: 'access/selfInfo.if', //访客统计
     editorAlumniVisitor: 'visitor/editorAlumniVisitor.if', //访客申请
     getUserInfo: 'userinfo/getUserInfo.if', //查询用户信息
-    updateUserHeadImage: 'userinfo/updateUserHeadImage.if',//上传用户和底库图片
-    updateimage: 'userinfo/updateImage.if',//修改用户头像
-    getYouTuImage: 'userinfo/getYouTuImage.if',//获取学生人脸自助上传图片
+    updateUserHeadImage: 'userinfo/updateUserHeadImage.if', //上传用户和底库图片
+    updateimage: 'userinfo/updateImage.if', //修改用户头像
+    getYouTuImage: 'userinfo/getYouTuImage.if', //获取学生人脸自助上传图片
 
     //宿管系统--教师端
     getDeptInfo: 'deptInfo/getDeptInfolevel.if', //获取学院信息
@@ -103,10 +103,17 @@ const index = 2,
     getDeviceInfo: 'access/selectDevices.if', //获取所有设备信息
     getPassInfo: '/access/getAccess.if', //通行记录
     getStatisticsInfo: '/access/statisticsBy.if', //考勤统计
-    getOutAndInInfo: '/access/outAndIn.if', //已出已归记录
     getVisitorInfo: '/visitor/searchInviteVisitor.if', //查询访客详情
     getVisitorCheck: '/visitor/approvalAlumniVisitor.if', //访客信息审批
-    getUnInfo: '/access/unIn.if', //未归记录
+    getunInByCount: '/access/unInByCount.if', //按天查询未归记录
+    getOutAndInInfo: '/access/InAndOut.if', //已出已归记录
+    getUnInInfo: '/access/unIn.if', //未归记录
+    getLateIn: '/access/lateIn.if', //晚归记录
+    getInUnOunt: '/access/InUnOunt.if', //未出记录
+    getUnOut: '/access/unOut.if', //查询没有进出记录的人员情况
+    getSuggestionList: '/proposePort/findProposeList.if', //获取投诉列表
+    getSuggestionDetail: '/proposePort/findProposeDetails.if', //获取投诉列表详情
+    getSuggestionResponse: '/proposePort/answerPropose.if', //投诉建议回复
 
     total: '.if', //图片拼接域名
   },