|
@@ -7,12 +7,11 @@
|
|
<view class="header-r" v-if="getData.searchValue" @click="clearSearch()">
|
|
<view class="header-r" v-if="getData.searchValue" @click="clearSearch()">
|
|
<img :src="imagesUrl('commonality/clear.png')">
|
|
<img :src="imagesUrl('commonality/clear.png')">
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<scroll-view scroll-y @scrolltolower="scrollGet" class="list">
|
|
<scroll-view scroll-y @scrolltolower="scrollGet" class="list">
|
|
<view class="list-li" v-for="(item,index) in dataList">
|
|
<view class="list-li" v-for="(item,index) in dataList">
|
|
- <view class="list-li-l">{{item.subName}}({{item.roomNum}})</view>
|
|
|
|
|
|
+ <view class="list-li-l">{{item.subName}}{{item.roomNum?'('+item.roomNum+')':''}}</view>
|
|
<view class="list-li-r" @click="openButton(item)">
|
|
<view class="list-li-r" @click="openButton(item)">
|
|
<view class="null-p"></view>
|
|
<view class="null-p"></view>
|
|
<view>开门</view>
|
|
<view>开门</view>
|
|
@@ -22,6 +21,7 @@
|
|
<view class="get-data-null-p" v-if="getDataType">- 没有更多数据 -</view>
|
|
<view class="get-data-null-p" v-if="getDataType">- 没有更多数据 -</view>
|
|
<view class="get-data-null-p" v-else="getDataType">- 滑动加载更多 -</view>
|
|
<view class="get-data-null-p" v-else="getDataType">- 滑动加载更多 -</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
|
+ <view class="position-button" @click="goPage()">授权记录</view>
|
|
<view class="success" v-if="successVisible">
|
|
<view class="success" v-if="successVisible">
|
|
<view class="null-box" @click="closeTip()"></view>
|
|
<view class="null-box" @click="closeTip()"></view>
|
|
<view class="panel">
|
|
<view class="panel">
|
|
@@ -41,9 +41,10 @@
|
|
config
|
|
config
|
|
} from '@/api/request/config.js'
|
|
} from '@/api/request/config.js'
|
|
import {
|
|
import {
|
|
- systemSubjectGetAppSubject,
|
|
|
|
|
|
+ systemSubjectGetAppSubjectByLogin,
|
|
laboratoryApplyRemoteOpenLock,
|
|
laboratoryApplyRemoteOpenLock,
|
|
- applyRemoteOpenLockConfirm
|
|
|
|
|
|
+ applyRemoteOpenLockConfirm,
|
|
|
|
+ laboratoryLabOpenLockLogUpdateLockData
|
|
} from '@/pages_manage/api/index.js'
|
|
} from '@/pages_manage/api/index.js'
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -69,7 +70,7 @@
|
|
page: 1,
|
|
page: 1,
|
|
pageSize: 20,
|
|
pageSize: 20,
|
|
searchValue: '',
|
|
searchValue: '',
|
|
- adminId: uni.getStorageSync('userId'),
|
|
|
|
|
|
+ // adminId: uni.getStorageSync('userId'),
|
|
},
|
|
},
|
|
getDataType: false,
|
|
getDataType: false,
|
|
msgId:'',
|
|
msgId:'',
|
|
@@ -82,9 +83,15 @@
|
|
|
|
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.systemSubjectGetAppSubject();
|
|
|
|
|
|
+ this.systemSubjectGetAppSubjectByLogin();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //跳转授权记录
|
|
|
|
+ goPage(){
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages_manage/views/accessControl/authorizationRecord'
|
|
|
|
+ });
|
|
|
|
+ },
|
|
openButton(row) {
|
|
openButton(row) {
|
|
let self = this;
|
|
let self = this;
|
|
uni.showModal({
|
|
uni.showModal({
|
|
@@ -112,7 +119,7 @@
|
|
this.$set(this, 'msgId', data.data[0])
|
|
this.$set(this, 'msgId', data.data[0])
|
|
this.$set(this, 'authorizeStatus', 3)
|
|
this.$set(this, 'authorizeStatus', 3)
|
|
this.$set(this, 'successVisible', true)
|
|
this.$set(this, 'successVisible', true)
|
|
- this.getMsg();
|
|
|
|
|
|
+ this.getMsg(row.subId);
|
|
}else{
|
|
}else{
|
|
this.$set(this, 'authorizeStatus', 2)
|
|
this.$set(this, 'authorizeStatus', 2)
|
|
this.$set(this, 'successVisible', true)
|
|
this.$set(this, 'successVisible', true)
|
|
@@ -120,7 +127,7 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async applyRemoteOpenLockConfirm() {
|
|
|
|
|
|
+ async applyRemoteOpenLockConfirm(subId) {
|
|
let self = this;
|
|
let self = this;
|
|
let obj = {
|
|
let obj = {
|
|
messageId: this.msgId,
|
|
messageId: this.msgId,
|
|
@@ -132,15 +139,32 @@
|
|
if (data.data) {
|
|
if (data.data) {
|
|
this.$set(this, 'authorizeStatus', 1)
|
|
this.$set(this, 'authorizeStatus', 1)
|
|
this.$set(this, 'successVisible', true)
|
|
this.$set(this, 'successVisible', true)
|
|
|
|
+ this.laboratoryLabOpenLockLogUpdateLockData(subId,1);
|
|
this.getCode();
|
|
this.getCode();
|
|
} else {
|
|
} else {
|
|
this.$set(this, 'authorizeStatus', 2)
|
|
this.$set(this, 'authorizeStatus', 2)
|
|
this.$set(this, 'successVisible', true)
|
|
this.$set(this, 'successVisible', true)
|
|
|
|
+ this.laboratoryLabOpenLockLogUpdateLockData(subId,0);
|
|
this.getCode();
|
|
this.getCode();
|
|
}
|
|
}
|
|
this.$set(this, 'msgId','')
|
|
this.$set(this, 'msgId','')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ async laboratoryLabOpenLockLogUpdateLockData(subId,type) {
|
|
|
|
+ let self = this;
|
|
|
|
+ let obj = {
|
|
|
|
+ subjectId: subId,
|
|
|
|
+ userId: uni.getStorageSync('userId'),
|
|
|
|
+ openStatus:type
|
|
|
|
+ }
|
|
|
|
+ const {
|
|
|
|
+ data
|
|
|
|
+ } = await laboratoryLabOpenLockLogUpdateLockData(obj);
|
|
|
|
+ if(data.code == 200) {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
//滚动加载事件
|
|
//滚动加载事件
|
|
scrollGet() {
|
|
scrollGet() {
|
|
let self = this;
|
|
let self = this;
|
|
@@ -149,16 +173,16 @@
|
|
} else {
|
|
} else {
|
|
this.getData.page += 1;
|
|
this.getData.page += 1;
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- this.systemSubjectGetAppSubject();
|
|
|
|
|
|
+ this.systemSubjectGetAppSubjectByLogin();
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//获取实验室
|
|
//获取实验室
|
|
- async systemSubjectGetAppSubject() {
|
|
|
|
|
|
+ async systemSubjectGetAppSubjectByLogin() {
|
|
let self = this;
|
|
let self = this;
|
|
const {
|
|
const {
|
|
data
|
|
data
|
|
- } = await systemSubjectGetAppSubject(this.getData);
|
|
|
|
|
|
+ } = await systemSubjectGetAppSubjectByLogin(this.getData);
|
|
if (data.code == 200) {
|
|
if (data.code == 200) {
|
|
if (self.getData.page == 1) {
|
|
if (self.getData.page == 1) {
|
|
this.dataList = data.data.records;
|
|
this.dataList = data.data.records;
|
|
@@ -181,7 +205,7 @@
|
|
this.$set(this, 'dataList', []);
|
|
this.$set(this, 'dataList', []);
|
|
this.$set(this, 'total', 0);
|
|
this.$set(this, 'total', 0);
|
|
this.$set(this.getData, 'page', 1);
|
|
this.$set(this.getData, 'page', 1);
|
|
- this.systemSubjectGetAppSubject();
|
|
|
|
|
|
+ this.systemSubjectGetAppSubjectByLogin();
|
|
},
|
|
},
|
|
//实验室搜索框清除
|
|
//实验室搜索框清除
|
|
clearSearch() {
|
|
clearSearch() {
|
|
@@ -190,10 +214,10 @@
|
|
this.$set(this, 'total', 0);
|
|
this.$set(this, 'total', 0);
|
|
this.$set(this.getData, 'page', 1);
|
|
this.$set(this.getData, 'page', 1);
|
|
this.$set(this.getData, 'searchValue', '');
|
|
this.$set(this.getData, 'searchValue', '');
|
|
- this.systemSubjectGetAppSubject();
|
|
|
|
|
|
+ this.systemSubjectGetAppSubjectByLogin();
|
|
},
|
|
},
|
|
//关闭弹框倒计时
|
|
//关闭弹框倒计时
|
|
- getMsg() {
|
|
|
|
|
|
+ getMsg(subId) {
|
|
let self = this;
|
|
let self = this;
|
|
const TIME_COUNT = 5;
|
|
const TIME_COUNT = 5;
|
|
if (!self.timer) {
|
|
if (!self.timer) {
|
|
@@ -206,7 +230,7 @@
|
|
self.successVisible = false;
|
|
self.successVisible = false;
|
|
clearInterval(self.timer);
|
|
clearInterval(self.timer);
|
|
self.timer = null;
|
|
self.timer = null;
|
|
- self.applyRemoteOpenLockConfirm();
|
|
|
|
|
|
+ self.applyRemoteOpenLockConfirm(subId);
|
|
}
|
|
}
|
|
}, 1000);
|
|
}, 1000);
|
|
}
|
|
}
|
|
@@ -281,13 +305,26 @@
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ .position-button{
|
|
|
|
+ position: absolute;
|
|
|
|
+ bottom:50rpx;
|
|
|
|
+ left:75rpx;
|
|
|
|
+ width:600rpx;
|
|
|
|
+ height:100rpx;
|
|
|
|
+ line-height:100rpx;
|
|
|
|
+ text-align: center;
|
|
|
|
+ background-color: #0183FA;
|
|
|
|
+ font-size:28rpx;
|
|
|
|
+ color:#fff;
|
|
|
|
+ border-radius:20rpx;
|
|
|
|
+ }
|
|
.list {
|
|
.list {
|
|
flex: 1;
|
|
flex: 1;
|
|
overflow-y scroll;
|
|
overflow-y scroll;
|
|
padding: 0 30rpx;
|
|
padding: 0 30rpx;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
background: #fff;
|
|
background: #fff;
|
|
|
|
+ padding-bottom:160rpx;
|
|
|
|
|
|
.list-li {
|
|
.list-li {
|
|
// height: 90rpx;
|
|
// height: 90rpx;
|