智慧保安互联网APP
shuishen
2021-10-11 b48a5f64fe196bee6f1c7eb0be1b78c9ebec0860
pages/dispatch/dispatch.vue
@@ -17,7 +17,8 @@
                  <span class="header-title">调度指令</span>
                  <u-icon @click="goToAddPage" top='4' class="header-add" name="plus" color="#fff">
                  <u-icon v-if="$store.state.UserData.rname[0].indexOf('保安') == -1" @click="goToAddPage" top='4'
                     class="header-add" name="plus" color="#fff">
                  </u-icon>
               </view>
@@ -120,13 +121,7 @@
      data() {
         return {
            list: [{
                  name: '发送指令'
               },
               {
                  name: '接收指令'
               }
            ],
            list: [],
            current: 0,
@@ -147,6 +142,32 @@
         };
      },
      onLoad() {
         if (this.$store.state.UserData.rname[0] == '保安') {
            this.list = [{
               name: '接收指令查询'
            }]
            this.getSend();
         } else if (this.$store.state.UserData.rname[0] == '保安公司管理员') {
            this.list = [{
               name: '接收指令查询'
            }]
            this.getSend();
         } else {
            this.list = [{
               name: '下发指令查询'
            }, {
               name: '接收指令查询'
            }]
            this.getReceive()
         }
      },
      onReachBottom() {
@@ -189,7 +210,6 @@
      },
      mounted() {
         this.getReceive();
      },
      methods: {
         getReceive() {
@@ -204,7 +224,7 @@
            }
            uni.request({
               url: this.$store.state.piAPI + "/directive/page?receiveDirectiveIds=" + this.$store.state
               url: this.$store.state.piAPI + "/directive/page?sendDirectiveId=" + this.$store.state
                  .puserID,
               method: "get",
               data: {
@@ -253,7 +273,7 @@
            }
            uni.request({
               url: this.$store.state.piAPI + "/directive/page?sendDirectiveId=" + this.$store.state.puserID,
               url: this.$store.state.piAPI + "/directive/page?receiveDirectiveIds=" + this.$store.state.puserID,
               method: "get",
               data: {
                  current: that.pagelist,
@@ -263,7 +283,7 @@
                  that.pages = res.data.data.pages;
                  var resdata = res.data.data.records;
                  if (this.pullDown == true) {
                     this.pullDown = false;
                     uni.stopPullDownRefresh();
@@ -470,7 +490,7 @@
               position: absolute;
               top: 0;
               left: auto;
               right: 3px;
               right: 10px;
               bottom: 0;
               margin: auto;
               display: inline-block;