jiangniuniu 4 years ago
parent
commit
40f8d37004

+ 1 - 1
components/tm-tabbar/tm-tabbar.vue

@@ -54,7 +54,7 @@
 						text: '日历',
 						iconPath: '/static/tabbar/calendar-unselect.png',
 						selectedIconPath: '/static/tabbar/calendar-select.png',
-						pagePath: 'pages/index/index'
+						pagePath: 'pages/calendar/calendar'
 					}
 				],
 				// 不同角色的拥有 tabbar下标(1、管理员 2、查核组长 3、查核组员 4、单位负责人 5、改善者)

+ 14 - 0
pages.json

@@ -64,6 +64,20 @@
 				"navigationBarTitleText": "消息中心",
 				"enablePullDownRefresh": false
 			}
+		},
+		{
+			"path": "pages/calendar/calendar",
+			"style": {
+				"navigationBarTitleText": "日历",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/todayCheck/todayCheck",
+			"style": {
+				"navigationBarTitleText": "今日查核",
+				"enablePullDownRefresh": false
+			}	
 		}
 	],
 	"globalStyle": {

+ 492 - 0
pages/calendar/calendar.vue

@@ -0,0 +1,492 @@
+<template>
+  <view class="calender-page">
+    <view class="calender-remind" @click="toMessagePage">
+      <image
+        :src="
+          messageType
+            ? '/static/mission/消息中心未读.png'
+            : '/static/mission/消息中心已读.png'
+        "
+        mode=""
+      ></image>
+    </view>
+    <view class="cheanged-time" @click="clickTile"
+      >{{ changedYear }}年{{ changedMonth }}月
+      <!-- <text class="weekDay">{{changedDay}}</text> -->
+    </view>
+    <view>
+      <text v-for="item in dayArray1" class="calendarTitle">{{ item }}</text>
+    </view>
+    <view>
+      <view v-for="item in data1">
+        <!-- {{item}} -->
+        <view
+          v-for="(items, index) in item"
+          class="calendarCon"
+          @click="dateClick(items, index)"
+        >
+          <view class="date">
+            {{
+              items.time
+                ? items.time.slice(9, 10) == "0"
+                  ? items.time.slice(10, 11)
+                  : items.time.slice(9, 11)
+                : ""
+            }}
+          </view>
+          <view class="yinDate">
+            {{ items.yinTime ? items.yinTime : "" }}
+          </view>
+          <view :class="items.work ? 'work' : ''">
+            <view class="sum">{{ items.work ? items.work : "" }}</view>
+            <view class="danwei">{{ items.work ? "单位" : "" }}</view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <!-- <view v-for=""></view> -->
+    <change-calendar
+      v-if="showCC"
+      :changedYear="changedYear"
+      :changedMonth="changedMonth"
+      @cancelCC="cancelCC"
+      @sureCC="sureCC"
+    ></change-calendar>
+    <tm-tabbar />
+  </view>
+</template>
+
+<script>
+import websocket from "../../utils/ws.js"; //引入websocket
+import moment from "moment";
+import changeCalendar from "./components/changeCalendar.vue";
+export default {
+  data() {
+    return {
+      refTimer: null,
+      isInitWs: null,
+      messageType: null,
+      dayArray: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
+      dayArray1: ["日", "一", "二", "三", "四", "五", "六"],
+      days_per_month: [],
+      changedYear: moment().format("YYYY"),
+      changedMonth: moment().format("MM"),
+      changedDay: "",
+      showCC: false,
+      firstday: "",
+      dayOfWeek: "",
+      str_nums: "",
+      data1: [],
+    };
+  },
+  components: {
+    changeCalendar,
+  },
+  created() {
+    // this.getMissionList();
+    // var data = '2021-02-19';
+    this.changedDay = this.dayArray[new Date().getDay()];
+    this.init(true);
+    this.refTimer = setInterval(() => {
+      this.isInitWs = websocket.ws ? false : true;
+      this.init(this.isInitWs);
+    }, 3 * 60 * 1000);
+  },
+  beforeDestroy() {
+    // 关闭ws连接
+    websocket.close();
+    clearInterval(this.refTimer);
+  },
+  mounted() {
+    this.days_per_month = new Array(
+      31,
+      28 + this.isLeap(this.changedYear),
+      31,
+      30,
+      31,
+      30,
+      31,
+      31,
+      30,
+      31,
+      30,
+      31
+    ); //创建月份数组
+    this.getCanList2();
+  },
+  methods: {
+    getCanList() {
+      this.$store
+        .dispatch({
+          type: "calendar/commActions",
+          payload: {
+            key: "getDefault",
+            data: {
+              pageNum: 1,
+              pageSize: 10,
+            },
+          },
+        })
+        .then((data) => {
+          if (data) {
+            let hiId = uni.getStorageSync("hiId");
+            let user = uni.getStorageSync("id");
+            let permission = uni.getStorageSync("nowPermission");
+            this.isInitWs && this.initWebsocket(hiId, user, permission);
+          }
+        });
+    },
+    init(isInitWs) {
+      this.isInitWs = isInitWs;
+      this.getCanList();
+    },
+    initWebsocket(hiId, user, permission) {
+      websocket.url = `ws://192.168.1.45:8088/imed/pfm/websocket/${hiId}/${user}/${permission}`;
+      websocket.createWebSocket(this.resolverWsData.bind(this));
+    },
+    // 解析websocket返回数据
+    resolverWsData(type) {
+      let types = JSON.parse(type);
+      console.log(types, "iiiiiii");
+      switch (types.type) {
+        case "TO_READ":
+          alert("99999");
+          this.messageType = true;
+          break;
+        default:
+          this.messageType = false;
+          break;
+      }
+    },
+    toMessagePage() {
+      uni.navigateTo({
+        url: `/pages/messages/messages`,
+      });
+    },
+    clickTile() {
+      this.showCC = true;
+    },
+    cancelCC(data) {
+      this.showCC = data;
+    },
+    sureCC(data, year, month) {
+      this.showCC = data;
+      this.changedYear = year;
+      this.changedMonth = month;
+      let day = year + "-" + month + "-01";
+      this.changedDay = this.dayArray[new Date(day).getDay()];
+      this.getCanList2();
+    },
+    isLeap(year) {
+      return year % 4 == 0
+        ? year % 100 != 0
+          ? 1
+          : year % 400 == 0
+          ? 1
+          : 0
+        : 0;
+    },
+    getMonth(m) {
+      console.log(m);
+      if (m.substr(0, 1) == "0") {
+        console.log(true);
+        return m.substr(1, 2);
+      } else {
+        return m;
+      }
+    },
+    //获取上个月的天数
+    getPreMonthCount(year, month) {
+      if (month === 0) {
+        return getMonthCount(year - 1, 11);
+      } else {
+        return getMonthCount(year, month - 1);
+      }
+    },
+    getCanList2() {
+      this.$store
+        .dispatch({
+          type: "calendar/commActions",
+          payload: {
+            key: "getDefault",
+            data: {
+              pageNum: 1,
+              pageSize: 10,
+            },
+          },
+        })
+        .then((data) => {
+          let data1 = [
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: 5,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+            {
+              time: "2021-02-03",
+              yinTime: "二十",
+              work: null,
+            },
+          ];
+
+          this.firstday = new Date(
+            this.changedYear,
+            this.changedMonth.slice(0, 1) == "0"
+              ? this.changedMonth.slice(1, 2) - 1
+              : this.changedMonth - 1,
+            1
+          ); //获取每月第一天
+          this.dayOfWeek = this.firstday.getDay(); //判断第一天是星期几(返回[0-6]中的一个,0代表星期天,1代表星期一,以此类推)
+          this.str_nums = Math.ceil((this.dayOfWeek + data1.length) / 7); //确定日期表格所需的行数
+          let data2 = [];
+          for (let i = 0; i < this.str_nums; i++) {
+            data2[i] = [];
+            if (i == 0 && this.dayOfWeek != 0) {
+              for (let j = 0; j < this.dayOfWeek; j++) {
+                data2[i].push({});
+              }
+              let data3 = data1.splice(0, 7 - this.dayOfWeek);
+              for (let k = 0; k < data3.length; k++) {
+                data2[i].push(data3[k]);
+              }
+            } else if (i == 0 && this.dayOfWeek == 0) {
+              data2[i] = data1.splice(0, 7);
+            } else {
+              if (i == this.str_nums - 1 && data1.length < 7) {
+                data2[i] = data1.splice(0, 7);
+                for (let k = 1; k < 7 - data1.length; k++) {
+                  data2[i].push({});
+                }
+              } else if (i == this.str_nums - 1 && data1.length == 7) {
+                data2[i] = data1.splice(0, 7);
+              } else {
+                data2[i] = data1.splice(0, 7);
+              }
+            }
+          }
+          console.log(data2);
+          this.data1 = data2;
+        });
+    },
+    dateClick(data, i) {
+      console.log(data, i);
+      if (data && data.work) {
+        // uni.navigateTo({
+        //   url: `/pages/mission-details/mission-details?taskId=${data.businessId}`,
+        // });
+      }
+    },
+  },
+};
+</script>
+
+<style lang="less">
+.calender-page {
+  height: 100%;
+  position: relative;
+  .calender-remind {
+    width: 62.5rpx;
+    height: 62.5rpx;
+    position: fixed;
+    top: 12.5rpx;
+    right: 25rpx;
+    background: rgba(255, 255, 255, 0.95);
+    border-radius: 50%;
+    z-index: 2;
+    image {
+      margin-left: 17.5rpx;
+      margin-top: 16.87rpx;
+      width: 27.5rpx;
+      height: 28.75rpx;
+    }
+  }
+  .cheanged-time {
+    padding: 25rpx 0rpx 15rpx 25rpx;
+    font-size: 35rpx;
+    .weekDay {
+      padding-left: 15rpx;
+      font-size: 20rpx;
+      color: #666f80;
+    }
+  }
+  .calendarTitle {
+    background-color: #fff;
+    display: inline-block;
+    width: 14.286%;
+    text-align: center;
+    font-size: 20rpx;
+    color: #666e80;
+    line-height: 55rpx;
+  }
+  .calendarCon {
+    margin-right: 1.25rpx;
+    margin-top: 1.25rpx;
+    height: 168.75rpx;
+    background-color: #fff;
+    float: left;
+    width: 14.1%;
+    text-align: center;
+    font-size: 35rpx;
+    color: #292c33;
+    .date {
+      padding-top: 25rpx;
+      padding-bottom: 15rpx;
+    }
+    .yinDate {
+      color: #666e80;
+      font-size: 17.5rpx;
+      line-height: 17.5rpx;
+    }
+    .work {
+      width: 87.5rpx;
+      height: 50rpx;
+      background-color: #ff894d;
+      border-radius: 5rpx;
+      margin: 16.25rpx auto;
+      .sum {
+        font-size: 20rpx;
+        color: #fff;
+        font-weight: bold;
+        line-height: 30rpx;
+      }
+      .danwei {
+        font-weight: 400;
+        font-size: 15rpx;
+        color: #fff;
+        line-height: 15rpx;
+      }
+    }
+  }
+}
+</style>
+

+ 370 - 0
pages/calendar/components/changeCalendar.vue

@@ -0,0 +1,370 @@
+<template>
+  <view class="changeCalendar">
+    <view class="zheZhao"></view>
+    <view class="content">
+      <view class="title">选择日期</view>
+      <view class="cont">
+        <view class="highLight" v-if="pcOrYd">
+          <view
+            class="left"
+            :style="{ marginTop: top }"
+            @touchstart="touchstart1"
+            @touchmove="touchmove1"
+          >
+            <view
+              v-for="(item, i) in yearList"
+              :style="index1 == i ? { color: '#292C33' } : { color: '#DADEE6' }"
+            >
+              {{ item }}
+            </view>
+          </view>
+          <view class="diagonalLine"> / </view>
+          <view
+            class="right"
+            :style="{ marginTop: top2 }"
+            @touchstart="touchstart2"
+            @touchmove="touchmove2"
+          >
+            <view
+              v-for="(item, i) in monthList"
+              :style="index2 == i ? { color: '#292C33' } : { color: '#DADEE6' }"
+            >
+              {{ item }}
+            </view>
+          </view>
+        </view>
+        <view class="highLight" v-else>
+          <view
+            class="left"
+            :style="{ marginTop: top }"
+            @mousedown="mousedown1"
+          >
+            <view
+              v-for="(item, i) in yearList"
+              :style="index1 == i ? { color: '#292C33' } : { color: '#DADEE6' }"
+            >
+              {{ item }}
+            </view>
+          </view>
+          <view class="diagonalLine"> / </view>
+          <view
+            class="right"
+            :style="{ marginTop: top2 }"
+            @mousedown="mousedown2"
+          >
+            <view
+              v-for="(item, i) in monthList"
+              :style="index2 == i ? { color: '#292C33' } : { color: '#DADEE6' }"
+            >
+              {{ item }}
+            </view>
+          </view>
+        </view>
+      </view>
+      <view class="change">
+        <view class="cancel" @click="cancelCC">取消</view>
+        <view class="sure" @click="sureCC">确定</view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+import moment from "moment";
+export default {
+  props: {
+    changedYear: {},
+    changedMonth: {},
+  },
+  data() {
+    return {
+      startYear: 1990,
+      nowYear: moment().format("YYYY"),
+      undYear: parseInt(moment().format("YYYY")) + 100,
+      yearList: [],
+      monthList: [
+        "01",
+        "02",
+        "03",
+        "04",
+        "05",
+        "06",
+        "07",
+        "08",
+        "09",
+        "10",
+        "11",
+        "12",
+      ],
+      top: "0rpx",
+      top2: "0rpx",
+      pageY: 0,
+      pageY2: 0,
+      index1: 0,
+      index2: 0,
+      pcOrYd: false,
+    };
+  },
+  mounted() {
+    if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
+      this.pcOrYd = true;
+    } else {
+      this.pcOrYd = false;
+    }
+    let list = [];
+    for (let i = this.startYear; i < this.undYear; i++) {
+      list.push(i);
+    }
+    this.yearList = list;
+    for (let i = 0; i < this.yearList.length; i++) {
+      if (this.yearList[i] == this.changedYear) {
+        this.top = -i * 80 + "rpx";
+        this.index1 = i;
+      }
+    }
+    for (let i = 0; i < this.monthList.length; i++) {
+      if (this.monthList[i] == this.changedMonth) {
+        this.top2 = -i * 80 + "rpx";
+        this.index2 = i;
+      }
+    }
+  },
+  methods: {
+    cancelCC() {
+      this.$emit("cancelCC", false);
+    },
+    sureCC() {
+      this.$emit(
+        "sureCC",
+        false,
+        this.yearList[this.index1],
+        this.monthList[this.index2]
+      );
+    },
+    touchstart1() {
+      this.pageY = event.touches[0].pageY;
+    },
+    touchmove1() {
+      if (this.pageY < event.touches[0].pageY) {
+        let dif = event.touches[0].pageY - this.pageY;
+        this.index1 = this.index1 - Math.round(dif / 2);
+        if (this.index1 <= 0) {
+          this.index1 = 0;
+          this.top = "0rpx";
+        } else {
+          this.top = -this.index1 * 80 + "rpx";
+        }
+      } else {
+        let dif = this.pageY - event.touches[0].pageY;
+        this.index1 = this.index1 + Math.round(dif / 2);
+        if (this.index1 >= this.yearList.length - 1) {
+          this.index1 = this.yearList.length - 1;
+          this.top = -(this.yearList.length - 1) * 80 + "rpx";
+        } else {
+          this.top = -this.index1 * 80 + "rpx";
+        }
+        this.top = -this.index1 * 80 + "rpx";
+      }
+      this.pageY = event.touches[0].pageY;
+    },
+    touchstart2() {
+      this.pageY2 = event.touches[0].pageY;
+    },
+    touchmove2() {
+      if (this.pageY2 < event.touches[0].pageY) {
+        let dif = event.touches[0].pageY - this.pageY2;
+        this.index2 = this.index2 - Math.round(dif / 2);
+        if (this.index2 <= 0) {
+          this.index2 = 0;
+          this.top2 = "0rpx";
+        } else {
+          this.top2 = -this.index2 * 80 + "rpx";
+        }
+      } else {
+        let dif = this.pageY2 - event.touches[0].pageY;
+        this.index2 = this.index2 + Math.round(dif / 2);
+        if (this.index2 >= this.monthList.length - 1) {
+          this.index2 = this.monthList.length - 1;
+          this.top2 = -(this.monthList.length - 1) * 80 + "rpx";
+        } else {
+          this.top2 = -this.index2 * 80 + "rpx";
+        }
+      }
+      this.pageY2 = event.touches[0].pageY;
+    },
+    mousedown1() {
+      this.pageY = event.pageY;
+      document.onmousemove = (e) => {
+        if (this.pageY < e.pageY) {
+          let dif = e.pageY - this.pageY;
+          this.index1 = this.index1 - Math.round(dif / 2);
+          if (this.index1 <= 0) {
+            this.index1 = 0;
+            this.top = "0rpx";
+          } else {
+            this.top = -this.index1 * 80 + "rpx";
+          }
+        } else {
+          let dif = this.pageY - e.pageY;
+          this.index1 = this.index1 + Math.round(dif / 2);
+          if (this.index1 >= this.yearList.length - 1) {
+            this.index1 = this.yearList.length - 1;
+            this.top = -(this.yearList.length - 1) * 80 + "rpx";
+          } else {
+            this.top = -this.index1 * 80 + "rpx";
+          }
+        }
+        this.pageY = e.pageY;
+      };
+      document.onmouseup = (e) => {
+        document.onmousemove = null;
+        document.onmouseup = null;
+      };
+      return false; //兼容firefox
+    },
+    mousedown2() {
+      this.pageY2 = event.pageY;
+      document.onmousemove = (e) => {
+        if (this.pageY2 < e.pageY) {
+          let dif = e.pageY - this.pageY2;
+          this.index2 = this.index2 - Math.round(dif / 2);
+          if (this.index2 <= 0) {
+            this.index2 = 0;
+            this.top2 = "0rpx";
+          } else {
+            this.top2 = -this.index2 * 80 + "rpx";
+          }
+        } else {
+          let dif = this.pageY2 - e.pageY;
+          this.index2 = this.index2 + Math.round(dif / 2);
+          if (this.index2 >= this.monthList.length - 1) {
+            this.index2 = this.monthList.length - 1;
+            this.top2 = -(this.monthList.length - 1) * 80 + "rpx";
+          } else {
+            this.top2 = -this.index2 * 80 + "rpx";
+          }
+        }
+        this.pageY2 = e.pageY;
+      };
+      document.onmouseup = (e) => {
+        document.onmousemove = null;
+        document.onmouseup = null;
+      };
+      return false; //兼容firefox
+    },
+  },
+};
+</script>
+
+<style lang="less">
+.changeCalendar {
+  // margin-top: -105rpx;
+  // width: 100%;
+  // height: 100vh;
+  // background: #12141A;
+  // opacity: 0.5;
+  // position: absolute;
+  // left: 0rpx;
+  // top: 0rpx;
+  // z-index: 3;
+  .zheZhao {
+    width: 100%;
+    height: calc(100% - 575rpx);
+    background: #12141a;
+    opacity: 0.5;
+    position: absolute;
+    left: 0rpx;
+    top: 0rpx;
+    z-index: 3;
+  }
+  .content {
+    width: 100%;
+    height: 600rpx;
+    background-color: #fff;
+    position: absolute;
+    bottom: 0rpx;
+    opacity: 1;
+    z-index: 4;
+    border-radius: 25rpx 25rpx 0rpx 0px;
+    // height: 575rpx;
+    .title {
+      margin-top: 35rpx;
+      margin-left: 40rpx;
+      font-size: 30rpx;
+      color: #292c33;
+    }
+    .cont {
+      margin: 42.5rpx 0rpx 17.5rpx 0rpx;
+      height: 400rpx;
+      overflow: hidden;
+      // .top{
+      // 	height: 190rpx;
+      // 	opacity: .3;
+      // 	z-index: 4;
+      // }
+      .highLight {
+        height: 80rpx;
+        // z-index: 3;
+        position: relative;
+        // top: 222.5rpx;
+        top: 160rpx;
+        .left {
+          padding-right: 62.5rpx;
+          width: 49%;
+          float: left;
+          text-align: right;
+          color: #dadee6;
+          font-size: 40rpx;
+          font-weight: bold;
+
+          uni-view {
+            line-height: 80rpx;
+          }
+        }
+        .diagonalLine {
+          width: 2%;
+          float: left;
+          text-align: center;
+          font-size: 25rpx;
+          font-weight: bold;
+          line-height: 80rpx;
+        }
+        .right {
+          padding-left: 62.5rpx;
+          float: left;
+          width: 49%;
+          text-align: left;
+          color: #dadee6;
+          font-size: 40rpx;
+          font-weight: bold;
+          uni-view {
+            line-height: 80rpx;
+          }
+        }
+      }
+      // .bottom{
+      // 	height: 190rpx;
+      // 	opacity: .3;
+      // 	z-index: 4;
+      // }
+    }
+    .change {
+      text-align: center;
+      border-top: 0.62rpx solid #dadee6;
+      .cancel {
+        padding: 26.25rpx 0rpx;
+        display: inline-block;
+        width: 50%;
+        color: #3377ff;
+      }
+      .sure {
+        padding: 26.25rpx 0rpx;
+        display: inline-block;
+        width: 50%;
+        color: #fff;
+        background-color: #3377ff;
+      }
+    }
+  }
+}
+</style>

+ 29 - 0
pages/calendar/model.js

@@ -0,0 +1,29 @@
+import { commServer } from './server.js';
+
+export default {
+  namespaced: true,
+  state: {
+    // baseInfo: 'test',
+    // // 包含院区,病区, 床号
+    // patParams: {
+    //   hiId: '1',
+    //   wardDm: '-10022',
+    //   bedNo: '201'
+    // }
+  },
+  mutations: {
+  //   changeBaseInfo(state, { baseInfo }) {
+  //     state.baseInfo = baseInfo;
+  //   },
+  //   // 修改第三方应用传递的参数
+  //   changePatParams(state, { patParams }) {
+  //     state.patParams = patParams;
+  //   },
+  },
+  actions: {
+    commActions({ commit, state }, { payload }) {
+	  // payload = {key,data} // data是请求数据,key是请求接口id
+      return commServer(payload);
+	},
+  }
+}

+ 25 - 0
pages/calendar/server.js

@@ -0,0 +1,25 @@
+import { creatRequest } from '../../utils/request.js';
+
+const requestList = {
+	// 保存配置
+	postResultConfig: {
+		method: 'POST',
+		url: 'resultConfig'
+	},
+	//最新配置
+	getResultConfig:{
+		method: 'GET',
+		url: 'resultConfig'
+	},
+	//默认配置列表
+	getDefault:{
+		method: 'GET',
+		url: 'notice/page'
+	}
+	
+};
+
+export const commServer = ({ key, data }) => {
+  let obj = requestList[key];
+  return creatRequest(obj, data);
+}

+ 2 - 1
pages/messages/messages.vue

@@ -113,8 +113,9 @@ export default {
               url: `/pages/mission-details/mission-details?taskId=${data.businessId}`,
             });
           } else if (data.businessType == 2) {
+			  uni.setStorageSync('situaionID', data.businessId);
             uni.navigateTo({
-              url: `/pages/home/home`,
+              url: `/pages/situationDetail/situationDetail`,
             });
           }
           this.MessList = [];

+ 5 - 1
pages/model.js

@@ -5,6 +5,8 @@ import configure from './configure/model.js';
 import messages from './messages/model.js';
 import mission from './mission/model.js';
 import creatingSituations from "./creatingSituations/model.js";
+import calendar from './calendar/model.js';
+import todayCheck from './todayCheck/model.js';
 
 export default module = {
   login,
@@ -13,5 +15,7 @@ export default module = {
   roleSwitching,
   messages,
   mission,
-	creatingSituations
+  creatingSituations,
+  calendar,
+  todayCheck,
 }

+ 14 - 0
pages/todayCheck/model.js

@@ -0,0 +1,14 @@
+import { commServer } from './server.js';
+
+export default {
+  namespaced: true,
+  state: {
+  },
+  mutations: {},
+  actions: {
+		commActions({ commit, state }, { payload }) {
+			// payload = {key,data} // data是请求数据,key是请求接口id
+      return commServer(payload);
+		},
+  }
+}

+ 13 - 0
pages/todayCheck/server.js

@@ -0,0 +1,13 @@
+import { creatRequest } from '../../utils/request.js';
+
+const requestList = {
+  //登录
+  login: {
+    method: 'POST',
+    url: 'login/in'
+  },
+};
+export const commServer = ({ key, data }) => {
+  let obj = requestList[key];
+  return creatRequest(obj, data);
+}

+ 8 - 0
pages/todayCheck/todayCheck.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style lang="less">
+</style>