From b48a5f64fe196bee6f1c7eb0be1b78c9ebec0860 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 11 Oct 2021 08:44:27 +0800
Subject: [PATCH] 修改完善
---
pages/dispatch/dispatch.vue | 46 +++++++++++++++++++++++++++++++++-------------
1 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/pages/dispatch/dispatch.vue b/pages/dispatch/dispatch.vue
index c0c0018..8b33dab 100644
--- a/pages/dispatch/dispatch.vue
+++ b/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;
--
Gitblit v1.9.3