|
@@ -3,10 +3,13 @@
|
|
|
<view class="snapshotList">
|
|
|
<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
|
|
|
<view class="title" @click="planClick()">
|
|
|
- <view class="title-l" >
|
|
|
- <view class="title-l-t">{{newData.data10}}</view>
|
|
|
+ <view class="title-l">
|
|
|
+ <view class="title-l-t">{{newData.planTitle}}</view>
|
|
|
<view class="title-l-b">
|
|
|
- <view v-for="(item,index) in newData.data11" :key="index">{{item}}</view>
|
|
|
+ <view v-if="newData.checkCategory">
|
|
|
+ {{newData.checkCategory==1?'校院巡查':(newData.checkCategory==2?'学院自查':'')}}</view>
|
|
|
+ <view v-if="newData.checkTypeName">{{newData.checkTypeName}}</view>
|
|
|
+ <view v-if="newData.crossCheck==1">交叉互检</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<img class="title-r" src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
|
|
@@ -17,8 +20,8 @@
|
|
|
</view>
|
|
|
<view>
|
|
|
<view class="srearch">
|
|
|
- <picker @change="deptChange" :value="deptIndex" :range="deptArray">
|
|
|
- <view class="college">{{!deptIndex?'学院':deptArray[deptIndex]}}
|
|
|
+ <picker @change="deptChange" :value="deptIndex" :range="deptList" :range-key="'deptName'">
|
|
|
+ <view class="college">{{queryParams.deptName?queryParams.deptName:'学院'}}
|
|
|
<img src="@/pages_safetyCheck/images/icon_06.png">
|
|
|
</view>
|
|
|
</picker>
|
|
@@ -26,7 +29,8 @@
|
|
|
<view class="srearch-l" @click="popupClick(1)">
|
|
|
<img src="@/pages_safetyCheck/images/icon_aqjc_ss.png">
|
|
|
</view>
|
|
|
- <input class="srearch-c" type="text" @confirm="carriageReturnRequest" v-model="form.searchValue" placeholder="实验室/房间号" />
|
|
|
+ <input class="srearch-c" type="text" @confirm="carriageReturnRequest" v-model="form.searchValue"
|
|
|
+ placeholder="实验室/房间号" />
|
|
|
<view class="srearch-r" @click="saoCode()">
|
|
|
<img src="@/pages_safetyCheck/images/icon_aqjc_sm.png">
|
|
|
</view>
|
|
@@ -38,10 +42,10 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="hidden">
|
|
|
- <view class="hidden-li" @click="listClick(item)" v-for="(item,index) in hiddenList">
|
|
|
+ <view class="hidden-li" @click="listClick(item)" v-for="(item,index) in dataList">
|
|
|
<img class="hidden-li-l" src="@/pages_safetyCheck/images/icon_sys_xz@1x.png">
|
|
|
<view class="hidden-li-c">{{item.subName}}</view>
|
|
|
- <view class="hidden-li-r">待检查{{item.num}}项
|
|
|
+ <view class="hidden-li-r">待检查{{item.unCheckCount}}项
|
|
|
<img src="@/pages_safetyCheck/images/icon_ssp_gd@1x.png">
|
|
|
</view>
|
|
|
</view>
|
|
@@ -71,10 +75,13 @@
|
|
|
import {
|
|
|
config
|
|
|
} from '@/api/request/config.js'
|
|
|
- import {} from '@/pages/api/index.js'
|
|
|
+ import {
|
|
|
+ systemDeptDropList,
|
|
|
+ } from '@/pages/api/index.js'
|
|
|
import {
|
|
|
laboratorySubRelInfoGetRelList,
|
|
|
checkOptionListNew,
|
|
|
+ securityAppCheckManageList
|
|
|
} from '@/pages_safetyCheck/api/index.js'
|
|
|
export default {
|
|
|
name: "snapshotList",
|
|
@@ -89,12 +96,10 @@
|
|
|
tabListTow: ['检查任务', '复查验证', '隐患整改'],
|
|
|
tabIndexTow: 0,
|
|
|
//学院选择
|
|
|
- deptIndex:null,
|
|
|
- deptArray:['学院A','学院B'],
|
|
|
- deptList:[{deptId:1,deptName:'学院A'},{deptId:2,deptName:'学院B'},],
|
|
|
+ deptIndex: null,
|
|
|
+ deptList: [],
|
|
|
newData: {
|
|
|
- data10: '计划标题计划标题计划标题计划标题计划标题计标题计划标题计划标题',
|
|
|
- data11: ['校级检查', '全面检查', '交叉检查'],
|
|
|
+ planCategory: [], //检查类别
|
|
|
},
|
|
|
form: {
|
|
|
rectifyDescribe: '',
|
|
@@ -104,35 +109,33 @@
|
|
|
popupType: false,
|
|
|
roomList: [],
|
|
|
checkOptionList: [],
|
|
|
- hiddenList: [{
|
|
|
- subName: '实验室名称实验室名称实验室名称实验室名称',
|
|
|
- num: 3,
|
|
|
- },
|
|
|
- {
|
|
|
- subName: '实验室名称实验室名称实验室名称实验室名称',
|
|
|
- num: 3,
|
|
|
- },
|
|
|
- {
|
|
|
- subName: '实验室名称实验室名称实验室名称实验室名称',
|
|
|
- num: 3,
|
|
|
- },
|
|
|
- ],
|
|
|
levelList: ['一级', '二级', '三级', '四级'],
|
|
|
levelIndex: 0,
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ page: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ deptId: '',
|
|
|
+ deptName: '',
|
|
|
+ manageStatus:'',//0待检查,1检查中,2已检查
|
|
|
+ planSetId:'',//计划批次Id
|
|
|
+ },
|
|
|
+ dataList:[],
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
- //this.$set(this, 'newData', JSON.parse(decodeURIComponent(option.infoData)));
|
|
|
- this.pageType = option.infoData.pageType;
|
|
|
- console.log( this.newData)
|
|
|
+ this.$set(this, 'newData', JSON.parse(decodeURIComponent(option.infoData)));
|
|
|
+ this.pageType = this.newData.pageType;
|
|
|
+ console.log(this.newData)
|
|
|
uni.setNavigationBarTitle({
|
|
|
- title: '第1次检查'
|
|
|
+ title: this.newData.checkPlanSetVoList[0].checkName
|
|
|
})
|
|
|
+ this.queryParams.planSetId= this.newData.checkPlanSetVoList[0].planSetId
|
|
|
if (this.pageType == 0) {
|
|
|
- //检查
|
|
|
+ //校级检查
|
|
|
this.tabListTow = ['检查任务', '复查验证', '隐患整改'];
|
|
|
} else if (this.pageType == 1) {
|
|
|
- //复查
|
|
|
+ //学院自查
|
|
|
this.tabListTow = ['自查任务', '复查验证', '隐患整改'];
|
|
|
}
|
|
|
|
|
@@ -141,11 +144,29 @@
|
|
|
|
|
|
},
|
|
|
mounted() {
|
|
|
-
|
|
|
+ this.systemDeptDropList();
|
|
|
+ this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
//滚动事件
|
|
|
- scrollGet() {},
|
|
|
+ scrollGet() {
|
|
|
+ let self = this;
|
|
|
+ if (self.total / self.queryParams.pageSize <= self.queryParams.page) {
|
|
|
+ this.$set(this, 'getDataType', true);
|
|
|
+ } else {
|
|
|
+ this.queryParams.page += 1;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if(this.pageType==0){
|
|
|
+ //检查任务
|
|
|
+ this.getList();
|
|
|
+ }else if(this.pageType==1){
|
|
|
+
|
|
|
+ }else if(this.pageType==2){
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
levelClick(index) {
|
|
|
this.levelIndex = index;
|
|
|
},
|
|
@@ -153,17 +174,21 @@
|
|
|
this.tabIndexTow = index;
|
|
|
this.pageType = index;
|
|
|
},
|
|
|
- planClick(){
|
|
|
- let infoData='';
|
|
|
+ planClick() {
|
|
|
+ let infoData = {
|
|
|
+ planId: this.newData.planId
|
|
|
+ };
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages_safetyCheck/views/planDetail?infoData=' + encodeURIComponent(JSON.stringify(infoData))
|
|
|
+ url: '/pages_safetyCheck/views/planDetail?infoData=' + encodeURIComponent(JSON.stringify(
|
|
|
+ infoData))
|
|
|
});
|
|
|
},
|
|
|
- listClick(row){
|
|
|
- let infoData=row;
|
|
|
- infoData.pageType=this.tabIndexTow;
|
|
|
+ listClick(row) {
|
|
|
+ let infoData = row;
|
|
|
+ infoData.pageType = this.tabIndexTow;
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' + encodeURIComponent(JSON.stringify(infoData))
|
|
|
+ url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' + encodeURIComponent(
|
|
|
+ JSON.stringify(infoData))
|
|
|
});
|
|
|
},
|
|
|
/******搜索房间弹层开关******/
|
|
@@ -200,15 +225,8 @@
|
|
|
},
|
|
|
//确认搜索房间
|
|
|
popupClickItem(item) {
|
|
|
- console.log(item)
|
|
|
- this.$set(this.form, "subId", item.subId)
|
|
|
- this.$set(this.form, "subName", item.subName)
|
|
|
- this.$set(this.form, "deptId", item.deptId)
|
|
|
- for (let i = 0; i < this.collegeList.length; i++) {
|
|
|
- if (item.deptId == this.collegeList[i].deptId) {
|
|
|
- this.$set(this.form, "deptName", this.collegeList[i].deptName)
|
|
|
- }
|
|
|
- }
|
|
|
+ this.$set(this.queryParams, "subId", item.subId)
|
|
|
+ this.$set(this.queryParams, "levelId", item.levelId)
|
|
|
this.popupType = false;
|
|
|
},
|
|
|
/******调用摄像头******/
|
|
@@ -237,15 +255,57 @@
|
|
|
});
|
|
|
},
|
|
|
//学院选择
|
|
|
- deptChange(e){
|
|
|
- if (this.deptList[0]) {
|
|
|
- this.deptIndex = parseInt(e.target.value);
|
|
|
+ deptChange(e) {
|
|
|
+ let self = this;
|
|
|
+ self.deptList.forEach(function(item, index) {
|
|
|
+ if (index == e.detail.value) {
|
|
|
+ self.$set(self.queryParams, 'deptId', item.deptId)
|
|
|
+ self.$set(self.queryParams, 'deptName', item.deptName)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //获取院系
|
|
|
+ async systemDeptDropList() {
|
|
|
+ const {
|
|
|
+ data
|
|
|
+ } = await systemDeptDropList({
|
|
|
+ deptName: '',
|
|
|
+ level: 2,
|
|
|
+ deptType: 1
|
|
|
+ });
|
|
|
+ if (data.code == 200) {
|
|
|
+ this.deptList = data.data
|
|
|
}
|
|
|
},
|
|
|
//回车触发
|
|
|
- carriageReturnRequest(){
|
|
|
+ carriageReturnRequest() {
|
|
|
console.log('123123')
|
|
|
},
|
|
|
+ //检查任务
|
|
|
+ async getList() {
|
|
|
+ let self = this;
|
|
|
+ const {
|
|
|
+ data
|
|
|
+ } = await securityAppCheckManageList(this.queryParams);
|
|
|
+ if (data.code == 200) {
|
|
|
+ if (self.queryParams.page == 1) {
|
|
|
+ this.dataList = data.data.records;
|
|
|
+ this.total = data.data.total;
|
|
|
+ if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
|
|
|
+ this.$set(this, 'getDataType', true);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.dataList = [...this.dataList, ...data.data.records]
|
|
|
+ this.total = data.data.total;
|
|
|
+ if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
|
|
|
+ this.$set(this, 'getDataType', true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -375,6 +435,9 @@
|
|
|
align-items: center;
|
|
|
padding: 0 26rpx;
|
|
|
box-sizing: border-box;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
|
|
|
>img {
|
|
|
width: 24rpx;
|