隐患清单检查+检查结果
parent
daca12f37c
commit
9b12285d73
|
@ -1,4 +1,4 @@
|
|||
export var basePath = "http://192.168.0.42:8099/";
|
||||
export var basePath = "http://192.168.0.69:8091/";
|
||||
// export var basePath = "https://gateway.qhdsafety.com/";
|
||||
export const baseImgPath = "https://file.zcloudchina.com/YTHFile";
|
||||
export const adminPath = "http://192.168.0.18:8085";
|
||||
|
|
38
pages.json
38
pages.json
|
@ -272,6 +272,44 @@
|
|||
"path": "pages/application/check-record/imgs_details",
|
||||
"style": {}
|
||||
},
|
||||
// 隐患排查清单 Begin
|
||||
{
|
||||
"path": "pages/application/hidden-danger-check-standard/custom/list",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/hidden-danger-check-standard/custom/list-item",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/hidden-danger-check-standard/custom/list-item-check-list",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/hidden-danger-check-standard/custom/list-item-check-hidden-form",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/hidden-danger-check-standard/custom/list-item-check-imgs",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/hidden-danger-check-standard/custom/list-item-check-next",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/hidden-danger-check-standard/record/custom-list",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/hidden-danger-check-standard/record/record-list",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/hidden-danger-check-standard/record/record-info",
|
||||
"style": {}
|
||||
},
|
||||
// 隐患排查清单 End
|
||||
{
|
||||
"path": "pages/my/offduty/index",
|
||||
"style": {}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<view>
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" :isRingt="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">清单检查记录</block>
|
||||
<block slot="content">风险检查记录</block>
|
||||
<block slot="right">
|
||||
<view @click="showDrawer('showRight')">查询</view>
|
||||
</block>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,377 @@
|
|||
<template>
|
||||
<view :class="isUps == true ? 'prevent' : ''">
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">检查照片</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y="false" >
|
||||
<view class="form">
|
||||
<view class="cu-bar bg-white margin-top">
|
||||
<view class="action">
|
||||
检查照片
|
||||
</view>
|
||||
<view class="action">
|
||||
{{imgList.length}}/4
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="grid col-4 grid-square flex-sub">
|
||||
<view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
|
||||
<image :src="imgList[index].filePath" mode="aspectFill"></image>
|
||||
<view class="cu-tag bg-red" @tap.stop="DelImg" data-type="0" :data-index="index">
|
||||
<text class='cuIcon-close'></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="solids" @tap="ChooseImage(0)" v-if="imgList.length<4">
|
||||
<text class='cuIcon-cameraadd'></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding flex flex-direction">
|
||||
<button :loading="buttonloading" class="cu-btn bg-blue margin-tb-sm lg" @click="$noMultipleClicks(goSubmit)">提交</button>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,deptId,loginUser,formatDate,loginSession,baseImgPath
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
export default {
|
||||
components: {
|
||||
tkiTree
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isUps:false,
|
||||
RECORDITEM_ID:'',
|
||||
buttonloading: false,
|
||||
index:'',
|
||||
noClick:true,
|
||||
imgList: [],
|
||||
}
|
||||
},
|
||||
onLoad(event){
|
||||
this.RECORDITEM_ID = event.RECORDITEM_ID;
|
||||
this.getData();
|
||||
loginSession();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/imgfiles/listImgs',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
FOREIGN_KEY: _this.RECORDITEM_ID,
|
||||
TYPE:14,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
let files=res.data.imgs;
|
||||
for(var i=0;i<files.length;i++){
|
||||
let img={};
|
||||
img.filePath=baseImgPath+files[i].FILEPATH;
|
||||
img.id=files[i].IMGFILES_ID;
|
||||
_this.imgList.push(img);
|
||||
}
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//图片上传
|
||||
ChooseImage(e) {
|
||||
var _this = this;
|
||||
var ss=4-this.imgList.length;
|
||||
uni.chooseImage({
|
||||
count: ss, //默认9
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['camera','album'], //从相册选择
|
||||
success: (res) => {
|
||||
if(e==0) {
|
||||
for (let i = 0; i < res.tempFilePaths.length; i++) {
|
||||
let img={};
|
||||
img.id='';
|
||||
img.filePath=res.tempFilePaths[i];
|
||||
this.imgList.push(img)
|
||||
}
|
||||
}else {
|
||||
for (let i = 0; i < res.tempFilePaths.length; i++) {
|
||||
let img = {};
|
||||
img.id = '';
|
||||
img.filePath = res.tempFilePaths[i];
|
||||
this.imgList1.push(img)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
ViewImage(e) {
|
||||
console.info(e.currentTarget.dataset.type)
|
||||
if(e.currentTarget.dataset.type==0) {
|
||||
let files =[];
|
||||
for(var i=0;i<this.imgList.length;i++){
|
||||
files.push(this.imgList[i].filePath)
|
||||
}
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
}else{
|
||||
let files =[];
|
||||
for(var i=0;i<this.imgList1.length;i++){
|
||||
files.push(this.imgList1[i].filePath)
|
||||
}
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
}
|
||||
},
|
||||
DelImg(e) {
|
||||
var _this = this;
|
||||
let i=e.currentTarget.dataset.index
|
||||
uni.showModal({
|
||||
title: '秦安双控',
|
||||
content: '确定要删除这张图片吗?',
|
||||
cancelColor:"#000000",
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
if(e.currentTarget.dataset.type==0) {
|
||||
if(_this.imgList[i].id) {
|
||||
uni.showLoading({
|
||||
title: '处理中'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath+'/app/imgfiles/delete',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
IMGFILES_ID: _this.imgList[i].id,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '删除成功',
|
||||
duration: 1500
|
||||
});
|
||||
_this.imgList.splice(i, 1)
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
}else {
|
||||
this.imgList.splice(e.currentTarget.dataset.index, 1)
|
||||
}
|
||||
}else{
|
||||
if(_this.imgList1[i].id) {
|
||||
uni.showLoading({
|
||||
title: '处理中'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath+'/app/imgfiles/delete',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
IMGFILES_ID: _this.imgList1[i].id,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '删除成功',
|
||||
duration: 1500
|
||||
});
|
||||
_this.imgList1.splice(i, 1)
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
}else {
|
||||
this.imgList1.splice(e.currentTarget.dataset.index, 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
goSubmit() {
|
||||
var _this = this;
|
||||
this.buttonloading = true
|
||||
var fileList = [];
|
||||
for (var i = 0; i < _this.imgList.length; i++) {
|
||||
if(!_this.imgList[i].id){
|
||||
var file = {};
|
||||
file.type = 14;
|
||||
file.filePath = _this.imgList[i].filePath;
|
||||
fileList.push(file);
|
||||
}
|
||||
}
|
||||
if(fileList.length > 0){
|
||||
var i=0;
|
||||
_this.uploadImg(fileList,i);
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '保存成功',
|
||||
duration: 1000
|
||||
});
|
||||
this.buttonloading = false
|
||||
setTimeout(function() {
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上一个页面
|
||||
// var task = prePage.$vm.list[_this.index];
|
||||
if(_this.index) {
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
/* prePage.$vm.list[_this.index].ISNORMAL = 1;
|
||||
prePage.$vm.list[_this.index].HIDDEN_ID = _this.pd.HIDDEN_ID; */
|
||||
}
|
||||
uni.navigateBack({});
|
||||
uni.hideLoading();
|
||||
}, 1000);
|
||||
|
||||
}
|
||||
},
|
||||
uploadImg(tempFilePaths,i){
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '上传中'
|
||||
})
|
||||
uni.uploadFile({
|
||||
url: basePath+'/app/imgfiles/add',
|
||||
filePath: tempFilePaths[i].filePath,
|
||||
name: 'FFILE',
|
||||
formData: {
|
||||
'TYPE': tempFilePaths[i].type,
|
||||
'FOREIGN_KEY': _this.RECORDITEM_ID,
|
||||
CORPINFO_ID: loginUser.CORPINFO_ID,
|
||||
USER_ID: loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
i++;
|
||||
if (tempFilePaths.length > i) {
|
||||
_this.uploadImg(tempFilePaths, i);
|
||||
|
||||
} else {
|
||||
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '保存成功',
|
||||
duration: 1000
|
||||
});
|
||||
setTimeout(function() {
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上一个页面
|
||||
// var task = prePage.$vm.list[_this.index];
|
||||
if(_this.index) {
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
/* prePage.$vm.list[_this.index].ISNORMAL = 1;
|
||||
prePage.$vm.list[_this.index].HIDDEN_ID = _this.pd.HIDDEN_ID; */
|
||||
}
|
||||
uni.navigateBack({});
|
||||
uni.hideLoading();
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.prevent {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.cu-form-title{
|
||||
padding: 20upx 0;
|
||||
}
|
||||
.cu-form-textarea{
|
||||
background-color: #ffffff;
|
||||
padding: 1upx 30upx 20upx;
|
||||
min-height: 100upx;
|
||||
}
|
||||
.cu-form-textarea textarea {
|
||||
height: 4.6em;
|
||||
width: 100%;
|
||||
line-height: 1.2em;
|
||||
flex: 1;
|
||||
font-size: 28upx;
|
||||
padding: 0;
|
||||
}
|
||||
.selected{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100upx;
|
||||
}
|
||||
.selected .radio{
|
||||
transform:scale(0.8);
|
||||
margin-right: 10upx;
|
||||
}
|
||||
.group{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.cu-form-group .title{
|
||||
font-size: 28upx;
|
||||
color: #666;
|
||||
}
|
||||
.cu-bar .action:first-child {
|
||||
font-size: 28upx;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,394 @@
|
|||
<template><!-- 源自pages/application/hidden-trouble-investigation/hidden-trouble-app/check-items-custom-list.vue -->
|
||||
<view>
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">隐患排查项</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y>
|
||||
<view class="check-items" v-for="(item,index) in list" :key="item.CUSTOM_ITEM_ID">
|
||||
<view class="title">检查内容:{{item.CHECK_CONTENT}}</view>
|
||||
<view class="title">检查标准:{{item.CHECK_STANDARD}}</view>
|
||||
<view v-if="item.REFERENCE_BASIS" class="title">参考依据:{{item.REFERENCE_BASIS}}</view>
|
||||
<view class="check-items-select">
|
||||
<radio-group class="block">
|
||||
<view class="flex justify-between padding-sm">
|
||||
<view class="select">
|
||||
<view @click="checkTrue({index:index},item.HASHIDDEN,0)" class="flex align-center">
|
||||
<radio class='mr10' :class="item.ISNORMAL==0?'checked':''" :checked="item.ISNORMAL==0" disabled></radio>
|
||||
<text>合格.{{ item.OPERATION_TYPE === 1 ? item.CHECK_QUALIFIED : '' }}</text>
|
||||
</view>
|
||||
<view v-if="item.ISNORMAL==0" @click="$noMultipleClicks(gotoAddImg,item.RECORDITEM_ID)" class="cuIcon-infofill text-blue unqualified"></view>
|
||||
</view>
|
||||
<view v-if="item.ISNORMAL==0 && item.OPERATION_TYPE === 2" class="input">
|
||||
<textarea maxlength="-1" v-model="item.CHECK_UNQUALIFIED" placeholder="合格信息详细描述(必填项)"></textarea>
|
||||
</view>
|
||||
<view class="select">
|
||||
<view class="flex align-center" @click="$noMultipleClicks(goToAdd,
|
||||
{
|
||||
CHECK_CONTENT:item.CHECK_CONTENT,
|
||||
CUSTOM_ITEM_ID:item.CUSTOM_ITEM_ID,
|
||||
RECORDITEM_ID:item.RECORDITEM_ID,
|
||||
index:index,
|
||||
CUSTOM_ID:item.CUSTOM_ID,
|
||||
HASHIDDEN:item.HASHIDDEN,
|
||||
CHECK_CATEGORY:item.CHECK_CATEGORY,
|
||||
CHECK_CATEGORY_NAME:item.CHECK_CATEGORY_NAME,
|
||||
CHECK_ITEM:item.CHECK_ITEM,
|
||||
CHECK_ITEM_NAME:item.CHECK_ITEM_NAME,
|
||||
CHECK_STANDARD: item.CHECK_STANDARD,
|
||||
REFERENCE_BASIS: item.REFERENCE_BASIS,
|
||||
CHECK_UNQUALIFIED: item.item.CHECK_UNQUALIFIED
|
||||
})">
|
||||
<radio class='red mr10' :class="item.ISNORMAL==1?'checked':''" :checked="item.ISNORMAL==1" disabled ></radio>
|
||||
<text>不合格.{{ item.OPERATION_TYPE === 1 ? item.CHECK_UNQUALIFIED : '' }}</text>
|
||||
</view>
|
||||
<view v-if="item.ISNORMAL==1" @click="$noMultipleClicks(goToEdit,item.HIDDEN_ID)" class="cuIcon-infofill text-blue unqualified"></view>
|
||||
<view v-if="item.ISNORMAL==1 && item.OPERATION_TYPE === 2" class="input">
|
||||
<textarea maxlength="-1" disabled v-model="item.CHECK_UNQUALIFIED" placeholder="不合格信息详细描述(必填项)"></textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="select">
|
||||
<view @click="checkTrue({index:index},item.HASHIDDEN,2)" class="flex align-center">
|
||||
<radio class='mr10' :class="item.ISNORMAL==2?'checked':''" :checked="item.ISNORMAL==2" disabled></radio>
|
||||
<text>不涉及</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-tabbar-height"></view>
|
||||
</scroll-view>
|
||||
<view class="bottom-fixed" @tap.stop="openAuth('ACCESS_FINE_LOCATION')">
|
||||
<button :loading="buttonloading" class="cu-btn bg-green" >提交</button>
|
||||
</view>
|
||||
|
||||
<yk-authpup ref="authpup" type="top" @changeAuth="$noMultipleClicks(save)" :permissionID="permissionID"></yk-authpup>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
basePath,corpinfoId,loginUser,loginSession
|
||||
} from '@/common/tool.js';
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
import ykAuthpup from "@/components/yk-authpup/yk-authpup"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
permissionID:'',
|
||||
noClick:true,
|
||||
buttonloading: false,
|
||||
listId:'',
|
||||
listName:'',
|
||||
baoBaoType:'',
|
||||
list: [],
|
||||
pd:[],
|
||||
CHECKRECORD_ID:'',
|
||||
}
|
||||
},
|
||||
onLoad(e){
|
||||
this.listId=e.listId;
|
||||
this.listName=e.listName;
|
||||
this.baoBaoType=e.baoBaoType
|
||||
this.CHECKRECORD_ID=e.CHECKRECORD_ID;
|
||||
this.getData();
|
||||
loginSession();
|
||||
},
|
||||
onShow() {
|
||||
var _this = this;
|
||||
if(_this.initflag){
|
||||
_this.initflag = false;
|
||||
_this.$forceUpdate();//强制刷新
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/hiddenDangerCheckStandardCustom/goCheck',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CUSTOM_ID: _this.listId,
|
||||
USER_NAME : loginUser.NAME,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
uni.hideLoading();
|
||||
_this.pd=res.data.pd;
|
||||
_this.list = res.data.varList;
|
||||
if(res.data.records){
|
||||
for (var i = 0; i <_this.list.length ; i++) {
|
||||
for (var j = 0; j <res.data.records.length ; j++) {
|
||||
if(_this.list[i].CUSTOM_ITEM_ID==res.data.records[j].CUSTOM_ITEM_ID){
|
||||
_this.list[i].ISNORMAL = res.data.records[j].ISNORMAL;
|
||||
_this.list[i].HIDDEN_ID = res.data.records[j].HIDDEN_ID;
|
||||
_this.list[i].CHECKRECORD_ID = res.data.records[j].CHECKRECORD_ID;
|
||||
_this.list[i].RECORDITEM_ID = res.data.records[j].RECORDITEM_ID;
|
||||
// _this.list[i].is_checked = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
openAuth(permissionID){
|
||||
this.permissionID = permissionID;
|
||||
setTimeout(()=>{
|
||||
this.$refs['authpup'].open();
|
||||
},200)
|
||||
},
|
||||
|
||||
//去保存
|
||||
save: function (){
|
||||
|
||||
for(var i=0;i<_this.list.length;i++){
|
||||
if(this.list[i].ISNORMAL && this.list[i].OPERATION_TYPE === 2) {
|
||||
var CHECK_RESULT = ''
|
||||
if (this.list[i].ISNORMAL === 0) {
|
||||
CHECK_RESULT = _this.list[i].CHECK_QUALIFIED
|
||||
} else if (this.list[i].ISNORMAL === 1) {
|
||||
CHECK_RESULT = _this.list[i].CHECK_UNQUALIFIED
|
||||
} else if (this.list[i].ISNORMAL === 2) {
|
||||
CHECK_RESULT = "不涉及"
|
||||
}
|
||||
if (!CHECK_RESULT) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '第'+(i+1)+'项检查为填写检查,检查结果不能为空',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!_this.other[0].USER_ID) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请添加检查人',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
var items=[];
|
||||
var ids=[];
|
||||
for(var i=0;i<_this.list.length;i++){
|
||||
var item = {};
|
||||
if(_this.list[i].ISNORMAL>-1 || _this.list[i].HASHIDDEN > 0) {
|
||||
item.CUSTOM_ITEM_ID = _this.list[i].CUSTOM_ITEM_ID
|
||||
|
||||
item.ISNORMAL = _this.list[i].ISNORMAL
|
||||
if (_this.list[i].ISNORMAL === 0) {
|
||||
item.CHECK_RESULT = _this.list[i].CHECK_QUALIFIED
|
||||
} else if (_this.list[i].ISNORMAL === 1) {
|
||||
item.CHECK_RESULT = _this.list[i].CHECK_UNQUALIFIED
|
||||
} else {
|
||||
item.CHECK_RESULT = ''
|
||||
}
|
||||
item.RECORDITEM_ID = _this.list[i].RECORDITEM_ID
|
||||
items.push(item)
|
||||
if (_this.list[i].HIDDEN_ID) {
|
||||
ids.push(_this.list[i].HIDDEN_ID)
|
||||
}
|
||||
}
|
||||
}
|
||||
let longitude;
|
||||
let latitude;
|
||||
|
||||
uni.getLocation({
|
||||
type: 'GCJ02',
|
||||
success: function (res1) {
|
||||
longitude = res1.longitude;
|
||||
latitude = res1.latitude;
|
||||
var result = gcoord.transform(
|
||||
[longitude, latitude], // 经纬度坐标
|
||||
gcoord.GCJ02, // 当前坐标系
|
||||
gcoord.BD09 // 目标坐标系
|
||||
);
|
||||
longitude = result[0];
|
||||
latitude = result[1];
|
||||
//发送 post 请求提交保存
|
||||
this.buttonloading = true
|
||||
uni.request({
|
||||
url: basePath+'/app/customCheckRecord/add', // /app/checkrecord/add'
|
||||
xhrFields: {
|
||||
withCredentials: true
|
||||
},
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CUSTOM_ID:_this.listId,
|
||||
LIST_NAME:_this.listName,
|
||||
CREATOR:loginUser.NAME,
|
||||
LATITUDE:latitude,
|
||||
LONGITUDE:longitude,
|
||||
ITEMS:JSON.stringify(items),
|
||||
IDS:ids.join(","),
|
||||
CHECKRECORD_ID:_this.CHECKRECORD_ID,
|
||||
tm:new Date().getTime(),
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function(res){
|
||||
this.buttonloading = false
|
||||
if("success" == res.data.result){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '提交成功',
|
||||
duration: 1500
|
||||
});
|
||||
setTimeout(function(){
|
||||
var pages = getCurrentPages(); // 获取当前页面栈
|
||||
var prePage = pages[pages.length - 2]; // 上一个页面
|
||||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
uni.navigateBack({});
|
||||
uni.hideLoading();
|
||||
},1500);
|
||||
}else {
|
||||
uni.showToast({
|
||||
title: "系统错误",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: function(res){
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: "获取位置失败",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
//点击合格
|
||||
checkTrue(e,HASHIDDEN,STATUS) {
|
||||
if(HASHIDDEN > 0){
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: "此检查内容存在未处理隐患,无法检查",
|
||||
duration: 1000
|
||||
});
|
||||
return;
|
||||
}
|
||||
// if(this.list[e.index].ISNORMAL==1){
|
||||
// return;
|
||||
// }
|
||||
let _this=this;
|
||||
if(_this.list[e.index].HIDDEN_ID){
|
||||
//不合格改为合格时 删除旧隐患
|
||||
uni.request({
|
||||
url: basePath+'/app/customHidden/delete', // /app/hidden/delete
|
||||
xhrFields: {
|
||||
withCredentials: true
|
||||
},
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
HIDDEN_ID:_this.list[e.index].HIDDEN_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
loginUserName:loginUser.USER_NAME
|
||||
},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
_this.list[e.index].ISNORMAL=STATUS;
|
||||
_this.list[e.index].HIDDEN_ID='';
|
||||
_this.$forceUpdate();//强制刷新
|
||||
}else {
|
||||
uni.showToast({
|
||||
title: "系统错误",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
_this.list[e.index].ISNORMAL=STATUS;
|
||||
_this.list[e.index].HIDDEN_ID='';
|
||||
_this.$forceUpdate();//强制刷新
|
||||
}
|
||||
},
|
||||
//跳转事件
|
||||
goToAdd(e) {
|
||||
if (e.HASHIDDEN > 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: "此检查内容存在未处理隐患,无法检查",
|
||||
duration: 1000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.list[e.index].ISNORMAL == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/hidden-danger-check-standard/custom/list-item-check-hidden-form?'
|
||||
+'CHECK_CONTENT='+encodeURIComponent(JSON.stringify(e.CHECK_CONTENT.replace('%','%25')))
|
||||
+'&CUSTOM_ITEM_ID='+ encodeURIComponent(JSON.stringify(e.CUSTOM_ITEM_ID))
|
||||
+'&CHECKRECORD_ID='+ encodeURIComponent(JSON.stringify(e.CHECKRECORD_ID))
|
||||
+'&RECORDITEM_ID='+ encodeURIComponent(JSON.stringify(e.RECORDITEM_ID))
|
||||
+'&CUSTOM_ID='+ encodeURIComponent(JSON.stringify(e.CUSTOM_ID))
|
||||
+'&CHECK_CATEGORY='+ encodeURIComponent(JSON.stringify(e.CHECK_CATEGORY))
|
||||
+'&CHECK_CATEGORY_NAME='+ encodeURIComponent(JSON.stringify(e.CHECK_CATEGORY_NAME))
|
||||
+'&CHECK_ITEM='+ encodeURIComponent(JSON.stringify(e.CHECK_ITEM))
|
||||
+'&CHECK_ITEM_NAME='+ encodeURIComponent(JSON.stringify(e.CHECK_ITEM_NAME))
|
||||
+'&CHECK_STANDARD='+ encodeURIComponent(JSON.stringify(e.CHECK_STANDARD))
|
||||
+'&REFERENCE_BASIS='+ encodeURIComponent(JSON.stringify(e.REFERENCE_BASIS))
|
||||
+'&CHECK_UNQUALIFIED='+ encodeURIComponent(JSON.stringify(e.CHECK_UNQUALIFIED))
|
||||
+'&index='+e.index
|
||||
+'&baoBaoType='+this.baoBaoType
|
||||
});
|
||||
},
|
||||
//跳转事件
|
||||
goToEdit(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/hidden-danger-check-standard/custom/list-item-check-hidden-form?HIDDEN_ID='+e
|
||||
});
|
||||
},
|
||||
//添加合格照片
|
||||
gotoAddImg(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/hidden-danger-check-standard/custom/list-item-check-imgs?RECORDITEM_ID='+e
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.select radio {
|
||||
transform: scale(0.9);
|
||||
}
|
||||
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,261 @@
|
|||
<template><!-- 源自 pages/application/hidden-trouble-investigation/hidden-trouble-app/hidden-trouble-spot -->
|
||||
<view>
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" :isRingt="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">检查项目列表</block>
|
||||
<block slot="right">
|
||||
<view @tap.stop="openAuth('CAMERA')">扫描</view>
|
||||
</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y>
|
||||
<view class="spot-list">
|
||||
<view class="spot-item" v-for="item in list" :key="item.CHECK_ITEM" @click="$noMultipleClicks(goToList,{
|
||||
'ELECTRONIC_FENCE_ID':item.ELECTRONIC_FENCE_ID,
|
||||
'CHECK_ITEM':item.CHECK_ITEM,
|
||||
'isChecked':item.isChecked})">
|
||||
<view class="spot-img">
|
||||
<image v-if="item.isChecked" src="../../../../static/zt-over.png" mode=""></image>
|
||||
<image v-else src="../../../../static/zt-ing.png" mode=""></image>
|
||||
</view>
|
||||
<view class="spot-cont">
|
||||
<view class="text f30">
|
||||
{{item.DICTIONARY_NAMES.replaceAll(',','--')}}
|
||||
</view>
|
||||
<view v-if="item.ELECTRONIC_FENCE_ID" class="text f30">
|
||||
所属电子围栏:{{item.ELECTRONIC_FENCE}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-tabbar-height"></view>
|
||||
</scroll-view>
|
||||
<view class="bottom-fixed" @click="$noMultipleClicks(goNext)">
|
||||
<button class="cu-btn bg-green">下一步</button>
|
||||
</view>
|
||||
|
||||
<yk-authpup ref="authpup" type="top" @changeAuth="$noMultipleClicks(scan)" :permissionID="permissionID">
|
||||
</yk-authpup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,
|
||||
loginUser,
|
||||
loginSession
|
||||
} from '@/common/tool.js';
|
||||
import ykAuthpup from "@/components/yk-authpup/yk-authpup"
|
||||
export default {
|
||||
components: {
|
||||
ykAuthpup
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permissionID: '',
|
||||
noClick: true,
|
||||
initflag: false,
|
||||
listId: '',
|
||||
listName: '',
|
||||
baoBaoType: '',
|
||||
list: [],
|
||||
dataFlag: 'noData',
|
||||
CHECKRECORD_ID: '',
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.listId = e.listId;
|
||||
this.listName = e.listName;
|
||||
this.baoBaoType = e.baoBaoType
|
||||
this.getData();
|
||||
loginSession();
|
||||
},
|
||||
onShow(e) {
|
||||
var _this = this;
|
||||
if (_this.initflag) {
|
||||
_this.initflag = false;
|
||||
_this.list = [];
|
||||
this.getData()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/hiddenDangerCheckStandardCustom/getCheckItem',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CUSTOM_ID: _this.listId,
|
||||
USER_NAME: loginUser.NAME,
|
||||
CORPINFO_ID: loginUser.CORPINFO_ID,
|
||||
USER_ID: loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.list = res.data.varList;
|
||||
_this.CHECKRECORD_ID = res.data.CHECKRECORD_ID;
|
||||
if (res.data.checkmap) {
|
||||
for (var i = 0; i < _this.list.length; i++) {
|
||||
if (res.data.checkmap[_this.list[i].CHECK_ITEM] >= _this.list[i].RISK_COUNT) {
|
||||
_this.list[i].isChecked = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '系统异常',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getInorout(e) {
|
||||
uni.request({
|
||||
url: basePath + '/app/listmanager/isInElectronicFence',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ELECTRONIC_FENCE_ID: e.ELECTRONIC_FENCE_ID,
|
||||
USER_NAME: loginUser.NAME,
|
||||
PLS_ID: loginUser.PLS_ID,
|
||||
CORPINFO_ID: loginUser.CORPINFO_ID,
|
||||
USER_ID: loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if(res.data.code != 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/hidden-danger-check-standard/custom/list-item-check-list?CHECK_ITEM=' +
|
||||
e.CHECK_ITEM + "&listId=" + this.listId + '&listName=' + this.listName +
|
||||
"&CHECKRECORD_ID=" + (this.CHECKRECORD_ID ? this.CHECKRECORD_ID : '') + "&baoBaoType=" +
|
||||
this
|
||||
.baoBaoType
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//跳转事件
|
||||
goToList(e) {
|
||||
if (e.ELECTRONIC_FENCE_ID) {
|
||||
this.getInorout(e)
|
||||
}else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/hidden-danger-check-standard/custom/list-item-check-list?CHECK_ITEM=' +
|
||||
e.CHECK_ITEM + "&listId=" + this.listId + '&listName=' + this.listName +
|
||||
"&CHECKRECORD_ID=" + (this.CHECKRECORD_ID ? this.CHECKRECORD_ID : '') + "&baoBaoType=" +
|
||||
this
|
||||
.baoBaoType
|
||||
});
|
||||
}
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/application/hidden-trouble-investigation/hidden-trouble-app/check-items-list?CHECK_ITEM=' +
|
||||
// e.CHECK_ITEM + "&listId=" + this.listId + '&listName=' + this.listName +
|
||||
// "&CHECKRECORD_ID=" + (this.CHECKRECORD_ID ? this.CHECKRECORD_ID : '') + "&baoBaoType=" +
|
||||
// this
|
||||
// .baoBaoType
|
||||
// });
|
||||
},
|
||||
|
||||
openAuth(permissionID) {
|
||||
this.permissionID = permissionID;
|
||||
setTimeout(() => {
|
||||
this.$refs['authpup'].open();
|
||||
}, 200)
|
||||
},
|
||||
|
||||
scan() {
|
||||
let _this = this;
|
||||
uni.scanCode({
|
||||
success: function(res) {
|
||||
let flag = false;
|
||||
let ideId = res.result;
|
||||
for (var i = 0; i < _this.list.length; i++) {
|
||||
if (_this.list[i].CHECK_ITEM == ideId) {
|
||||
flag = true;
|
||||
_this.goToList({
|
||||
'CHECK_ITEM': _this.list[i].CHECK_ITEM
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: "该清单中不含此部位。",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//跳转事件
|
||||
goNext(e) {
|
||||
for (let i = 0; i < this.list.length; i++) {
|
||||
if (this.list[i].isChecked != 1) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '清单未全部检查,无法提交',
|
||||
duration: 3000
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/hidden-danger-check-standard/custom/list-item-check-next?listId=' +
|
||||
this.listId + '&CHECKRECORD_ID=' + (this.CHECKRECORD_ID ? this.CHECKRECORD_ID : '')
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.spot-list {}
|
||||
|
||||
.spot-cont {
|
||||
margin-left: 20upx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.spot-cont .text {
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.spot-img {
|
||||
width: 100upx;
|
||||
height: 100upx;
|
||||
}
|
||||
|
||||
.spot-img image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.spot-list .spot-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
border-radius: 10upx;
|
||||
margin: 20upx;
|
||||
padding: 20upx;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,441 @@
|
|||
<template><!-- 源自pages/application/hidden-trouble-investigation/hidden-trouble-app/hidden-trouble-app -->
|
||||
<view>
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" :isRingt="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">隐患清单排查</block>
|
||||
<block slot="right">
|
||||
<view @tap.stop="openAuth('CAMERA')">清单扫描</view>
|
||||
</block>
|
||||
</cu-custom>
|
||||
<view class="top-fixed">
|
||||
<scroll-view scroll-x class="bg-white nav" scroll-with-animation :scroll-left="scrollLeft">
|
||||
<view class="flex text-center">
|
||||
<view class="cu-item flex-sub" :class="index==TabCur?'text-blue cur':''" v-for="(item,index) in tabNav" :key="index" @tap="tabSelect" :data-id="index">
|
||||
{{tabNav[index]}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="line"></view>
|
||||
<view>
|
||||
<view class="cu-bar search bg-white">
|
||||
<view class="search-form radius" @tap="showDeptTree">{{this.DEPTNAME}}</view>
|
||||
<tki-tree v-show="treeShow" ref="tkiTree" :selectParent=true :range="treeNode" rangeKey="name"
|
||||
@confirm="depttreeConfirm" @cancel="depttreeCancel"></tki-tree>
|
||||
<view class="action">
|
||||
<button class="cu-btn bg-green shadow-blur radius" @click="search()">搜索</button>
|
||||
<button class="cu-btn bg-blue shadow-blur radius" @click="reset()" style="margin-left: 10px">重置</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="TabCur==0">
|
||||
<scroll-view class="dy-scroll-nobg" scroll-y :style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
|
||||
<view v-if="list.length>0" >
|
||||
<view class="dy-card" v-for="item in list" :key="item.CUSTOM_ID" @click="$noMultipleClicks(goToList,{listId:item.CUSTOM_ID,listName:item.NAME,userid:item.USER_ID,BAO_BAO_TYPE:item.BAO_BAO_TYPE})">
|
||||
<view class="dy-card-title">
|
||||
<text><text v-if="item.USER_ID == loginUserId" style="margin-right: 10upx;color: #07BB07;">★</text>{{item.NAME}}</text>
|
||||
<text class="cuIcon-right f30 text-gray"></text>
|
||||
</view>
|
||||
<view class="dy-card-content">
|
||||
<view class="dy-sub-stitle">
|
||||
<text class="text-grey">清单类型:{{item.TYPENAME}}</text>
|
||||
<text class="text-grey">排查周期:{{item.PERIODNAME}}</text>
|
||||
</view>
|
||||
<view class="dy-sub-stitle">
|
||||
<text class="text-grey">包含检查项:{{item.count}}</text>
|
||||
<text class="text-grey">负责人:{{item.USER_NAME}}</text>
|
||||
</view>
|
||||
<view class="dy-stitle">
|
||||
<text class="text-grey">起止时间:{{item.START_DATE}} - {{item.END_DATE}}</text>
|
||||
</view>
|
||||
<!-- <view class="mb12">
|
||||
<text class="cu-tag bg-red radius">重大风险:{{item.ACOUNT}}</text>
|
||||
<text class="cu-tag bg-orange radius">较大:{{item.BCOUNT}}</text>
|
||||
<text class="cu-tag bg-yellow radius text-white">一般:{{item.CCOUNT}}</text>
|
||||
<text class="cu-tag bg-blue radius">低:{{item.DCOUNT}}</text>
|
||||
</view>-->
|
||||
<!-- <view class="cu-progress radius striped active">-->
|
||||
<!-- <view class="bg-olive" :style="[{ width:loading?((item.checkedItem>0 && item.count>0)?(item.checkedItem/item.count*100):0)+'%':''}]">{{(item.checkedItem>0 && item.count>0)?(item.checkedItem/item.count*100):0}}%</view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="dataFlag=='noData'" class="dy-null">
|
||||
<view class="dy-null-img">
|
||||
<image :src="background[dataFlag].url" mode=""></image>
|
||||
</view>
|
||||
<view class="dy-null-title">
|
||||
{{background[dataFlag].msg}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="cu-tabbar-height"></view> -->
|
||||
</scroll-view>
|
||||
</block>
|
||||
|
||||
<block v-if="TabCur==1">
|
||||
<scroll-view class="dy-scroll-nobg" scroll-y :style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
|
||||
<view v-if="list1.length>0" >
|
||||
<view class="dy-card" v-for="item in list1" :key="item.CUSTOM_ID" @click="$noMultipleClicks(goToList,{listId:item.CUSTOM_ID,listName:item.NAME,userid:item.USER_ID,BAO_BAO_TYPE:item.BAO_BAO_TYPE})">
|
||||
<view class="dy-card-title">
|
||||
<text><text v-if="item.USER_ID == loginUserId" style="margin-right: 10upx;color: #07BB07;">★</text>{{item.NAME}}</text>
|
||||
<text class="cuIcon-right f30 text-gray"></text>
|
||||
</view>
|
||||
<view class="dy-card-content">
|
||||
<view class="dy-sub-stitle">
|
||||
<text class="text-grey">清单类型:{{item.TYPENAME}}</text>
|
||||
<text class="text-grey">排查周期:{{item.PERIODNAME}}</text>
|
||||
</view>
|
||||
<view class="dy-sub-stitle">
|
||||
<text class="text-grey">包含检查项:{{item.count}}</text>
|
||||
<text class="text-grey">负责人:{{item.USER_NAME}}</text>
|
||||
</view>
|
||||
<view class="dy-stitle">
|
||||
<text class="text-grey">起止时间:{{item.START_DATE}} - {{item.END_DATE}}</text>
|
||||
</view>
|
||||
<!-- <view class="mb12">-->
|
||||
<!-- <text class="cu-tag bg-red radius">重大风险:{{item.ACOUNT}}</text>-->
|
||||
<!-- <text class="cu-tag bg-orange radius">较大:{{item.BCOUNT}}</text>-->
|
||||
<!-- <text class="cu-tag bg-yellow radius text-white">一般:{{item.CCOUNT}}</text>-->
|
||||
<!-- <text class="cu-tag bg-blue radius">低:{{item.DCOUNT}}</text>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="dataFlag=='noData'" class="dy-null">
|
||||
<view class="dy-null-img">
|
||||
<image :src="background[dataFlag].url" mode=""></image>
|
||||
</view>
|
||||
<view class="dy-null-title">
|
||||
{{background[dataFlag].msg}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-tabbar-height"></view>
|
||||
</scroll-view>
|
||||
</block>
|
||||
|
||||
<yk-authpup ref="authpup" type="top" @changeAuth="$noMultipleClicks(scan)" :permissionID="permissionID"></yk-authpup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,loginUser,loginSession
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import ykAuthpup from "@/components/yk-authpup/yk-authpup"
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ykAuthpup
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permissionID:'',
|
||||
treeShow:false,
|
||||
noClick:true,
|
||||
initflag:false,
|
||||
sTop:0,
|
||||
totalHeight:0,
|
||||
TabCur: 0,
|
||||
scrollLeft: 0,
|
||||
tabNav: ['待排查', '已排查'],
|
||||
loading: false,
|
||||
list: [],
|
||||
list1: [],
|
||||
totalList:[],
|
||||
treeNode: [], //部门下拉数据
|
||||
DEPT: '',
|
||||
page: 1,
|
||||
rows: 1000,
|
||||
totalCount:0,
|
||||
isEnd: false,
|
||||
total:0,
|
||||
dataFlag:'noData',
|
||||
isIndex:0,
|
||||
loginUserId:'',
|
||||
noExamine:false,// 是否禁止检查非本人清单
|
||||
FKEY:'examine'
|
||||
}
|
||||
},
|
||||
onLoad:async function() {
|
||||
let that = this;
|
||||
this.loginUserId = loginUser.USER_ID;
|
||||
this.background = require('@/common/background.json');
|
||||
await this.getFunc();
|
||||
this.getData();
|
||||
// setTimeout(function() {
|
||||
// that.loading = true
|
||||
// }, 500)
|
||||
loginSession();
|
||||
},
|
||||
onReady() {
|
||||
let that=this;
|
||||
let CustomBar = this.CustomBar;
|
||||
uni.getSystemInfo({ //调用uni-app接口获取屏幕高度
|
||||
success(res) { //成功回调函数
|
||||
let titleH=uni.createSelectorQuery().select(".top-fixed"); //想要获取高度的元素名(class/id)
|
||||
titleH.boundingClientRect(data=>{
|
||||
that._data.sTop=data.height //计算高度:元素高度=窗口高度-元素距离顶部的距离(data.top)
|
||||
that.totalHeight = data.height+CustomBar
|
||||
}).exec()
|
||||
}
|
||||
})
|
||||
},
|
||||
async onShow() {
|
||||
var _this = this;
|
||||
if(_this.initflag){
|
||||
_this.initflag = false;
|
||||
_this.list = [];
|
||||
_this.list1 = [];
|
||||
await this.getFunc();
|
||||
this.getData()
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
tabSelect(e) {
|
||||
this.TabCur = e.currentTarget.dataset.id;
|
||||
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
|
||||
},
|
||||
search (){
|
||||
var _this = this;
|
||||
_this.list = [];
|
||||
_this.list1 = [];
|
||||
this.getData()
|
||||
},
|
||||
reset (){
|
||||
this.DEPT = '';
|
||||
this.DEPTNAME = '';
|
||||
this.list = [];
|
||||
this.list1 = [];
|
||||
this.getData()
|
||||
},
|
||||
getData(){
|
||||
var _this=this;
|
||||
console.info(_this.isEnd);
|
||||
if (_this.isEnd){
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
console.log(this.DEPT)
|
||||
uni.request({
|
||||
url: basePath + '/app/hiddenDangerCheckStandardCustom/checkList', // /app/listmanager/checkList
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
USER_NAME: loginUser.NAME,
|
||||
CHECK_DEPARTMENT_ID: loginUser.DEPARTMENT_ID,
|
||||
SUB_DEPARTMENT_IDS: this.DEPT, //选择的部门
|
||||
IS_MAIN:loginUser.ISMAIN,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
ISSUPERVISE:loginUser.ISSUPERVISE,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
|
||||
var content = res.data.varList;
|
||||
for(var i=0;i<content.length;i++){
|
||||
if(content[i].checkCount==0){
|
||||
this.list.push(content[i]);
|
||||
this.totalList.push(content[i]);
|
||||
}else{
|
||||
this.list1.push(content[i]);
|
||||
this.totalList.push(content[i]);
|
||||
}
|
||||
}
|
||||
|
||||
uni.hideLoading();
|
||||
this.getDept()
|
||||
}else{
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '系统异常',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
openAuth(permissionID){
|
||||
this.permissionID = permissionID;
|
||||
setTimeout(()=>{
|
||||
this.$refs['authpup'].open();
|
||||
},200)
|
||||
},
|
||||
|
||||
scan(){
|
||||
let _this=this;
|
||||
uni.scanCode({
|
||||
success: function (res) {
|
||||
let flag=false;
|
||||
let listId = res.result;
|
||||
for(var i=0;i<_this.totalList.length;i++){
|
||||
if(_this.totalList[i].CUSTOM_ID==listId){
|
||||
flag=true;
|
||||
_this.goToList(
|
||||
{
|
||||
listId:_this.totalList[i].CUSTOM_ID,
|
||||
listName:_this.totalList[i].NAME,
|
||||
userid:_this.totalList[i].USER_ID,
|
||||
BAO_BAO_TYPE:_this.totalList[i].BAO_BAO_TYPE
|
||||
}
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
uni.showToast({
|
||||
title: "无法检查该清单",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree', //部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
DEPARTMENT_ID:loginUser.DEPARTMENT_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
_this.treeNode = eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确定回调事件
|
||||
depttreeConfirm(e) {
|
||||
this.DEPT = e[0].id;
|
||||
this.DEPTNAME = e[0].name;
|
||||
this.uindex = -1;
|
||||
this.treeShow = false
|
||||
this.$forceUpdate(); //强制刷新
|
||||
this.list = [];
|
||||
this.list1 = [];
|
||||
this.getData();
|
||||
},
|
||||
showDeptTree() {
|
||||
this.treeShow = true
|
||||
this.$refs.tkiTree._show();
|
||||
},
|
||||
// 取消回调事件
|
||||
depttreeCancel(e) {
|
||||
this.treeShow = false
|
||||
},
|
||||
// 滑动到底方法
|
||||
scrolltolower(){
|
||||
var _this = this;
|
||||
_this.getData();
|
||||
},
|
||||
getFunc(){
|
||||
return new Promise((resolve, reject) => {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/corpfunc/findByKey',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
FKEY: _this.FKEY,
|
||||
CORPINFO_ID: loginUser.CORPINFO_ID,
|
||||
USER_ID: loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
if (res.data.pd != null && res.data.pd.CORPFUNC_ID) {
|
||||
_this.noExamine = true;
|
||||
}
|
||||
resolve()
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '系统异常',
|
||||
duration: 2000
|
||||
});
|
||||
reject()
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
//跳转事件
|
||||
goToList(e) {
|
||||
var _this = this;
|
||||
console.info(_this.noExamine);
|
||||
console.info(e.userid != _this.loginUserId);
|
||||
if(_this.noExamine && e.userid != _this.loginUserId){
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '仅允许检查本人清单',
|
||||
duration: 2000
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/hidden-danger-check-standard/custom/list-item?listId='+e.listId+'&listName='+e.listName + '&baoBaoType='+e.BAO_BAO_TYPE
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.dy-list {
|
||||
background: #fff;
|
||||
margin-top: 2upx;
|
||||
}
|
||||
.dy-card{
|
||||
background-color: #fff;
|
||||
border-radius: 10upx;
|
||||
margin:30upx
|
||||
}
|
||||
.dy-stitle{
|
||||
margin: 16upx 0;
|
||||
}
|
||||
.dy-sub-stitle{
|
||||
margin: 16upx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.dy-card-title{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #eee;
|
||||
min-height: 80upx;
|
||||
line-height: 80upx;
|
||||
padding: 0 30upx;
|
||||
}
|
||||
.dy-card-content{
|
||||
padding: 0upx 30upx 30upx;
|
||||
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,540 @@
|
|||
<template>
|
||||
<view>
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" :isRingt="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">隐患检查清单</block>
|
||||
<block slot="right">
|
||||
<view @click="showDrawer('showRight')">查询</view>
|
||||
</block>
|
||||
</cu-custom>
|
||||
<uni-drawer ref="showRight" mode="right" :mask-click="true" @change="change($event,'showRight')">
|
||||
<view class="scroll-view">
|
||||
<scroll-view class="scroll-view-box" scroll-y="true">
|
||||
<view class="de-drawer">
|
||||
<view class="padding-sm bb-default text-semi">
|
||||
高级查询
|
||||
</view>
|
||||
<view class="picker-tree-select">
|
||||
<view class="">
|
||||
检查部门
|
||||
</view>
|
||||
<view class="picker-tree-box">
|
||||
<view class="picker-tree" style="padding-right: 0upx;" @tap="showDeptTree">
|
||||
{{DEPTNAME}}
|
||||
<text class="cuIcon-triangledownfill"></text>
|
||||
</view>
|
||||
</view>
|
||||
<tki-tree ref="tkiTree" :selectParent=true :range="treeNode" rangeKey="name"
|
||||
@confirm="depttreeConfirm" @cancel="depttreeCancel"></tki-tree>
|
||||
</view>
|
||||
<view class="picker-tree-select">
|
||||
<view class="">
|
||||
检查人
|
||||
</view>
|
||||
<view class="picker-tree-box">
|
||||
<picker @change="PickerUser" :value="uindex" :range="userList" range-key="NAME">
|
||||
<view class="picker">
|
||||
{{USER_NAME?USER_NAME:'请选择'}}
|
||||
<text class="cuIcon-triangledownfill"></text>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="picker-tree-select">
|
||||
<view class="">
|
||||
清单类型
|
||||
</view>
|
||||
<view class="picker-tree-box">
|
||||
<picker @change="PickerType" :value="tindex" :range="typeList" range-key="NAME">
|
||||
<view class="picker">
|
||||
{{TYPE_NAME?TYPE_NAME:'请选择'}}
|
||||
<text class="cuIcon-triangledownfill"></text>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="picker-tree-select">
|
||||
<view class="">
|
||||
排查周期
|
||||
</view>
|
||||
<view class="picker-tree-box">
|
||||
<picker @change="PickerPeriod" :value="pindex" :range="periodList" range-key="NAME">
|
||||
<view class="picker">
|
||||
{{PERIOD_NAME?PERIOD_NAME:'请选择'}}
|
||||
<text class="cuIcon-triangledownfill"></text>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-sm bb-default text-semi">
|
||||
时间查询
|
||||
</view>
|
||||
<view class="search-time-box">
|
||||
<view class="time-style">
|
||||
<picker mode="date" @change="changeStarDate">
|
||||
<text class="cuIcon-calendar text-gray mr10"></text>
|
||||
<text class="text-grey f24">{{starDate==''?'开始时间':starDate}}</text>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="fenge">-</view>
|
||||
<view class="time-style">
|
||||
<picker mode="date" @change="changeEndDate">
|
||||
<text class="cuIcon-calendar text-gray mr10"></text>
|
||||
<text class="text-grey f24">{{endDate==''?'结束时间':endDate}}</text>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="de-drawer-bottom">
|
||||
<view class="cz-btn">
|
||||
<text class="cu-btn" @click="reset">重置</text>
|
||||
</view>
|
||||
<view class="done-btn" @click="closeDrawer('showRight')">
|
||||
<text class="cu-btn bg-blue">完成</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</uni-drawer>
|
||||
<view class="select-fixed top-fixed">
|
||||
<view class="cu-bar search bg-white">
|
||||
<view class="search-form radius">
|
||||
<text class="cuIcon-search"></text>
|
||||
<input @input="InputBlur" placeholder="请输入关键字" confirm-type="search"></input>
|
||||
|
||||
</view>
|
||||
<view class="action">
|
||||
<button class="cu-btn bg-green shadow-blur radius" @click="getQuery">搜索</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
<scroll-view class="dy-scroll-nobg" @scrolltolower="scrolltolower" scroll-y
|
||||
:style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
|
||||
<view v-if="list.length>0">
|
||||
<view class="dy-card" v-for="item in list" :key="item.CUSTOM_ID" @click="$noMultipleClicks(goToList,item.CUSTOM_ID)">
|
||||
<view class="dy-card-title">
|
||||
<text><text v-if="item.USER_ID == loginUserId" style="margin-right: 10upx;color: #07BB07;">★</text>清单名称:{{item.NAME}}</text>
|
||||
<text class="cuIcon-right f30 text-gray"></text>
|
||||
</view>
|
||||
<view class="dy-card-content">
|
||||
<view class="dy-sub-stitle">
|
||||
<text class="text-grey">清单类型:{{item.TYPENAME}}</text>
|
||||
<text class="text-grey">排查周期:{{item.PERIODNAME}}</text>
|
||||
</view>
|
||||
<view class="dy-sub-stitle">
|
||||
<text v-if="item.BAO_BAO_TYPE !== '1'" class="text-grey">部门:{{item.DEPARTMENT_NAME}}</text>
|
||||
<text v-if="item.BAO_BAO_TYPE === '1'" class="text-grey">包保责任人部门:{{item.DEPARTMENT_NAME}}</text>
|
||||
</view>
|
||||
<view class="dy-sub-stitle">
|
||||
<text v-if="item.BAO_BAO_TYPE !== '1'" class="text-grey">岗位:{{item.POST_NAME}}</text>
|
||||
<text v-if="item.BAO_BAO_TYPE === '1'" class="text-grey">包保责任人岗位:{{item.POST_NAME}}</text>
|
||||
<text v-if="item.BAO_BAO_TYPE !== '1'" class="text-grey">人员:{{item.USER_NAME}}</text>
|
||||
<text v-if="item.BAO_BAO_TYPE === '1'" class="text-grey">包保责任人:{{item.USER_NAME}}</text>
|
||||
</view>
|
||||
<view class="dy-sub-stitle">
|
||||
<text class="text-grey">检查次数:{{item.count}}</text>
|
||||
<text class="text-grey">超期未检查次数:{{item.overTimeCount}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="dataFlag=='noData'" class="dy-null">
|
||||
<view class="dy-null-img">
|
||||
<image :src="background[dataFlag].url" mode=""></image>
|
||||
</view>
|
||||
<view class="dy-null-title">
|
||||
{{background[dataFlag].msg}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-tabbar-height"></view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,
|
||||
corpinfoId,
|
||||
loginSession,
|
||||
loginUser,
|
||||
loginUserId
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
export default {
|
||||
components: {
|
||||
tkiTree
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showRight: false,
|
||||
noClick:true,
|
||||
dataFlag: 'noData',
|
||||
sTop: 0,
|
||||
totalHeight: 0,
|
||||
list: [], //返回数据
|
||||
page: 1, //分页参数--页数
|
||||
rows: 10, //分页参数--每页数据条数
|
||||
totalCount: 0, //分页参数--初始化页数
|
||||
isEnd: false, //防止多次刷新
|
||||
totalPage: 0, //分页参数--分页数量
|
||||
NameLikes: '',
|
||||
|
||||
starDate:'',
|
||||
endDate:'',
|
||||
treeNode: [], //部门下拉数据
|
||||
DEPT: '', //部门
|
||||
DEPTNAME: '请选择', //部门
|
||||
|
||||
userList:[],
|
||||
uindex: -1,
|
||||
USER_ID:'',
|
||||
USER_NAME:'',
|
||||
|
||||
typeList:[],
|
||||
tindex: -1,
|
||||
TYPE_ID:'',
|
||||
TYPE_NAME:'',
|
||||
|
||||
periodList:[],
|
||||
pindex: -1,
|
||||
PERIOD_ID:'',
|
||||
PERIOD_NAME:'',
|
||||
|
||||
LEVELID: '',
|
||||
loginUserId:''
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
let that = this;
|
||||
let CustomBar = this.CustomBar;
|
||||
uni.getSystemInfo({ //调用uni-app接口获取屏幕高度
|
||||
success(res) { //成功回调函数
|
||||
let titleH = uni.createSelectorQuery().select(".top-fixed"); //想要获取高度的元素名(class/id)
|
||||
titleH.boundingClientRect(data => {
|
||||
that._data.sTop = data.height //计算高度:元素高度=窗口高度-元素距离顶部的距离(data.top)
|
||||
that.totalHeight = data.height + CustomBar
|
||||
}).exec()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onLoad() { //页面第一次加载时触发,从跳转页面返回时不能触发,可以传递参
|
||||
var _this = this;
|
||||
_this.background = require('@/common/background.json');
|
||||
_this.showCount = -1;
|
||||
_this.currentPage = 1;
|
||||
_this.list = [];
|
||||
_this.isEnd = false;
|
||||
_this.loginUserId = loginUserId;
|
||||
_this.DEPARTMENT_ID = loginUser.DEPARTMENT_ID;
|
||||
_this.getData();
|
||||
_this.getDept();
|
||||
_this.getDicList();
|
||||
loginSession();
|
||||
},
|
||||
onShow() { //页面显示或从后台跳回小程序时显示此页面时触发,从跳转页面返回时触发,不能传递参数
|
||||
},
|
||||
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/basics/risk-distribution/risk-distribution-detail?id=' + e
|
||||
.IDENTIFICATIONPARTS_ID + '&LEVELID=' + e.LEVELID + "&DEPT_NAME=" + e.DEPT_NAME
|
||||
});
|
||||
},
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree', //部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
DEPARTMENT_ID:loginUser.DEPARTMENT_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
_this.treeNode = eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//获取人员列表
|
||||
getUserList(){
|
||||
//发送 post 请求
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath+'/app/sys/listUser',
|
||||
data: {
|
||||
DEPARTMENT_ID:_this.DEPT,
|
||||
tm:new Date().getTime(),
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function(res){
|
||||
if("success" == res.data.result){
|
||||
_this.userList = res.data.userList;
|
||||
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
goToList(id){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/hidden-danger-check-standard/record/record-list?CUSTOM_ID='+id
|
||||
});
|
||||
},
|
||||
//获取数据类型列表
|
||||
getDicList(){
|
||||
var _this = this;
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/dictionaries/getLevels?tm=' + new Date().getTime(),
|
||||
data: {
|
||||
DICTIONARIES_ID: '4a3d0d99b0ea4e268c11dd0b18866917',
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function (res) {
|
||||
_this.typeList = res.data.list;
|
||||
}
|
||||
});
|
||||
uni.request({
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
url: basePath + '/dictionaries/getLevels?tm=' + new Date().getTime(),
|
||||
data: {
|
||||
DICTIONARIES_ID: 'f60cf0e8315b4993b6d6049dd29f2ba5',
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: function (res) {
|
||||
_this.periodList = res.data.list;
|
||||
}
|
||||
});
|
||||
},
|
||||
getQuery() { //搜索按钮事件
|
||||
var _this = this;
|
||||
_this.showCount = -1;
|
||||
_this.currentPage = 1;
|
||||
_this.list = [];
|
||||
_this.isEnd = false;
|
||||
_this.getData();
|
||||
},
|
||||
InputBlur(e) {
|
||||
this.NameLikes = e.detail.value
|
||||
},
|
||||
// 确定回调事件
|
||||
depttreeConfirm(e) {
|
||||
// this.isUps=false;
|
||||
this.DEPT = e[0].id;
|
||||
this.DEPTNAME = e[0].name;
|
||||
this.uindex = -1;
|
||||
this.RISK_UNIT_ID = ''; //单元
|
||||
this.RISK_UNIT_NAME = ''; //单元
|
||||
this.$forceUpdate(); //强制刷新
|
||||
this.getUserList();
|
||||
this.getQuery();
|
||||
},
|
||||
|
||||
changeStarDate(e) {
|
||||
this.starDate = e.detail.value
|
||||
this.getQuery();
|
||||
},
|
||||
changeEndDate(e) {
|
||||
this.endDate = e.detail.value
|
||||
this.getQuery();
|
||||
},
|
||||
// 取消回调事件
|
||||
depttreeCancel(e) {
|
||||
// this.isUps=false;
|
||||
},
|
||||
PickerUser(e) {
|
||||
this.uindex = e.detail.value;
|
||||
this.USER_ID = this.userList[this.uindex].USER_ID;
|
||||
this.USER_NAME = this.userList[this.uindex].NAME;
|
||||
|
||||
this.$forceUpdate(); //强制刷新
|
||||
this.getQuery();
|
||||
},
|
||||
PickerType(e) {
|
||||
this.tindex = e.detail.value;
|
||||
this.TYPE_ID = this.typeList[this.tindex].BIANMA;
|
||||
this.TYPE_NAME = this.typeList[this.tindex].NAME;
|
||||
|
||||
this.$forceUpdate(); //强制刷新
|
||||
this.getQuery();
|
||||
},
|
||||
PickerPeriod(e) {
|
||||
this.pindex = e.detail.value;
|
||||
this.PERIOD_ID = this.periodList[this.pindex].BIANMA;
|
||||
this.PERIOD_NAME = this.periodList[this.pindex].NAME;
|
||||
|
||||
this.$forceUpdate(); //强制刷新
|
||||
this.getQuery();
|
||||
},
|
||||
changeLevel(e) {
|
||||
var _this = this;
|
||||
_this.LEVELID = e
|
||||
_this.getQuery();
|
||||
},
|
||||
reset() {
|
||||
var _this = this;
|
||||
_this.DEPT = '';
|
||||
_this.DEPTNAME = '请选择';
|
||||
|
||||
_this.userList = [];
|
||||
_this.USER_ID = '';
|
||||
_this.USER_NAME = '';
|
||||
_this.uindex = -1;
|
||||
|
||||
_this.PERIOD_ID = '';
|
||||
_this.PERIOD_NAME = '';
|
||||
_this.pindex = -1;
|
||||
_this.TYPE_ID = '';
|
||||
_this.TYPE_NAME = '';
|
||||
_this.tindex = -1;
|
||||
_this.starDate = '';
|
||||
_this.endDate = '';
|
||||
_this.getQuery();
|
||||
},
|
||||
// 显示树形选择器
|
||||
showDeptTree() {
|
||||
// this.isUps=true
|
||||
this.$refs.tkiTree._show();
|
||||
},
|
||||
// 打开窗口
|
||||
showDrawer(e) {
|
||||
this.$refs[e].open()
|
||||
},
|
||||
// 关闭窗口
|
||||
closeDrawer(e) {
|
||||
this.$refs[e].close()
|
||||
},
|
||||
// 抽屉状态发生变化触发
|
||||
change(e, type) {
|
||||
this[type] = e
|
||||
},
|
||||
// 滑动到底方法
|
||||
scrolltolower() {
|
||||
var _this = this;
|
||||
_this.showCount = -1;
|
||||
_this.currentPage = _this.currentPage + 1;
|
||||
_this.isEnd = false;
|
||||
if (_this.totalPage >= _this.currentPage) {
|
||||
_this.getData(); //开始分页查询
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
if (_this.isEnd) {
|
||||
return
|
||||
} else {
|
||||
this.isEnd = true;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: "加载中..."
|
||||
}); //加载中动画
|
||||
uni.request({
|
||||
url: basePath + '/app/hiddenDangerCheckStandardCustom/recordList?showCount=' + _this.showCount + '¤tPage=' + _this
|
||||
.currentPage,
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
DEPARTMENT_ID: _this.DEPARTMENT_ID,
|
||||
DEPT_ID: _this.DEPT,
|
||||
STARTTIME:_this.starDate,
|
||||
ENDTIME:_this.endDate,
|
||||
PERIOD:_this.PERIOD_ID,
|
||||
USERNAME: _this.USER_NAME,
|
||||
TYPE:_this.TYPE_ID,
|
||||
tm: new Date().getTime(),
|
||||
KEYWORDS: _this.NameLikes, //关键字模糊查询
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
uni.hideLoading(); //结束加载中动画
|
||||
if (res.data != null) {
|
||||
_this.totalPage = res.data.page.totalPage;
|
||||
if (_this.list.length == 0) {
|
||||
_this.list = res.data.varList;
|
||||
} else {
|
||||
if (res.data.varList != null) {
|
||||
_this.list2 = res.data.varList;
|
||||
_this.list = _this.list.concat(_this.list2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.dy-list {
|
||||
background: #fff;
|
||||
margin-top: 2upx;
|
||||
}
|
||||
.dy-card{
|
||||
background-color: #fff;
|
||||
border-radius: 10upx;
|
||||
margin:30upx
|
||||
}
|
||||
.dy-stitle{
|
||||
margin: 16upx 0;
|
||||
}
|
||||
.dy-sub-stitle{
|
||||
margin: 16upx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.dy-card-title{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #eee;
|
||||
min-height: 80upx;
|
||||
line-height: 80upx;
|
||||
padding: 0 30upx;
|
||||
}
|
||||
.dy-card-content{
|
||||
padding: 0upx 30upx 30upx;
|
||||
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,439 @@
|
|||
<template>
|
||||
<view>
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">检查记录详情</block>
|
||||
</cu-custom>
|
||||
<view class="bu-title">
|
||||
检查内容
|
||||
</view>
|
||||
<view class="table-box" style="padding: 0 30upx;">
|
||||
<uni-table name='varlist' border stripe emptyText="暂无更多数据">
|
||||
<!-- 表头行 -->
|
||||
<uni-tr>
|
||||
<uni-th align="center" style="font-weight: bold;">检查内容</uni-th>
|
||||
<uni-th align="center" style="font-weight: bold;width:150upx">状态</uni-th>
|
||||
</uni-tr>
|
||||
<uni-tr v-for="item in varList" :key="item.RISKPOINT_ID">
|
||||
<uni-td>{{item.CHECK_CONTENT}}</uni-td>
|
||||
<uni-td v-if='item.ISNORMAL=="0"' align="center">
|
||||
<template v-if="item.IMGCOUNT>0">
|
||||
<view @click="goToImgs(item.RECORDITEM_ID)" style="color: blue;">合格</view>
|
||||
</template>
|
||||
<template v-else>合格</template>
|
||||
</uni-td>
|
||||
<uni-td v-else-if='item.ISNORMAL=="1"' align="center">
|
||||
<view @click="goToDetail(item.HIDDEN_ID)" style="color: blue;">不合格</view>
|
||||
</uni-td>
|
||||
<uni-td v-else-if='item.ISNORMAL=="2"' align="center">
|
||||
<view style="color: blue;">不涉及</view>
|
||||
</uni-td>
|
||||
<uni-td v-else align="center">
|
||||
<view class="text-center">存在未整改隐患</view>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
|
||||
</uni-table>
|
||||
</view>
|
||||
<view class="bu-title">
|
||||
其他隐患信息
|
||||
</view>
|
||||
<view class="table-box" style="padding: 0 30upx 30upx;">
|
||||
<uni-table name='otherHiddenList' border stripe emptyText="暂无更多数据">
|
||||
<!-- 表头行 -->
|
||||
<uni-tr>
|
||||
<uni-th align="center" style="font-weight: bold;">隐患描述</uni-th>
|
||||
<uni-th align="center" style="font-weight: bold;">操作</uni-th>
|
||||
</uni-tr>
|
||||
<uni-tr v-for="item in otherHiddenList" :key="item.HIDDEN_ID">
|
||||
<uni-td>{{item.HIDDENDESCR}}</uni-td>
|
||||
<uni-td align="center">
|
||||
<view @click="goToDetail(item.HIDDEN_ID)">查看</view>
|
||||
</uni-td>
|
||||
</uni-tr>
|
||||
</uni-table>
|
||||
</view>
|
||||
<map style="width: 100%; height: 300px;" :scale="scale" :latitude="latitude" :longitude="longitude"
|
||||
:markers="covers">
|
||||
</map>
|
||||
|
||||
|
||||
<view class="wui-form-list" style="margin: 0;">
|
||||
<view class="bu-title">
|
||||
清单信息
|
||||
</view>
|
||||
|
||||
<view class="cu-form-group">
|
||||
<view class="title">
|
||||
<text>清单名称</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="text-grey">{{pd.LIST_NAME}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">
|
||||
<text>排查清单类型</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="text-grey">{{pd.SCREENTYPENAME}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">
|
||||
<text>检查人</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="text-grey">{{pd.USERS}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">
|
||||
<text>检查时间</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="text-grey">{{pd.CHECK_TIME}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">
|
||||
<text>所属部门 </text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="text-grey">{{pd.DEPARTMENT_NAME}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">
|
||||
<text>所属岗位 </text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="text-grey">{{pd.POST_NAME}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">
|
||||
<text>排查周期</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="text-grey">{{pd.PERIODNAME}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group bb-default">
|
||||
<view class="title">
|
||||
<text>清单类型</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="text-grey">{{pd.TYPENAME}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="pd.TYPENAME == '临时'" class="cu-form-group bb-default">
|
||||
<view class="title">
|
||||
<text>排查日期</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="text-grey">{{pd.START_DATE}} - {{pd.END_DATE}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="cu-form-textarea">
|
||||
<view class="title">
|
||||
<text>签字照片</text>
|
||||
</view>
|
||||
<view class="cu-form-p">
|
||||
<scroll-view scroll-x class="bg-white nav" scroll-with-animation>
|
||||
<view class="cu-item" v-for="(item,index) in files" v-bind:key="index">
|
||||
<view class="imgs">
|
||||
<image :src="baseImgPath+item.FILEPATH" :data-index="index" @click="ViewShowImage"
|
||||
mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="cu-tabbar-height"></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,
|
||||
deptId,
|
||||
corpinfoId,
|
||||
loginSession,
|
||||
baseImgPath,
|
||||
loginUser
|
||||
} from '@/common/tool.js';
|
||||
import gcoord from '@/common/gcoord.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
recordItemList: [],
|
||||
baseImgPath: baseImgPath,
|
||||
CHECKRECORD_ID: '',
|
||||
hiddenList: [],
|
||||
varList: [],
|
||||
pd: [],
|
||||
otherHiddenList: [],
|
||||
title: 'map',
|
||||
scale: 13,
|
||||
latitude: 39.8883,
|
||||
longitude: 119.519,
|
||||
covers: [],
|
||||
mapVarList: [],
|
||||
mapHdList: [],
|
||||
mapPd: [],
|
||||
mapCinfo: [],
|
||||
mapCheckrecord: [],
|
||||
|
||||
files: [],
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
loginSession();
|
||||
this.CHECKRECORD_ID = e.CHECKRECORD_ID;
|
||||
this.getData();
|
||||
this.getOtherHidden();
|
||||
this.getMap();
|
||||
},
|
||||
methods: {
|
||||
//跳转事件
|
||||
goToDetail(e) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/basics/hidden-perils/fill-in-case/fill-in-case-detail-view?id='+e
|
||||
// });
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/hidden-danger-management/hidden-danger-record/hidden-danger-record-detail?id=' +
|
||||
e,
|
||||
});
|
||||
},
|
||||
goToImgs(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/check-record/imgs_details?id=' + e,
|
||||
});
|
||||
},
|
||||
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/customCheckRecord/goEdit',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CHECKRECORD_ID: _this.CHECKRECORD_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
|
||||
if (res.data != null) {
|
||||
uni.hideLoading();
|
||||
_this.varList = res.data.varList;
|
||||
_this.pd = res.data.pd;
|
||||
_this.files = res.data.qianming;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getOtherHidden() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/customHidden/getCheckHidden', // /app/hidden/getChcenkHidden
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CHECKRECORD_ID: _this.CHECKRECORD_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
|
||||
if (res.data != null) {
|
||||
uni.hideLoading();
|
||||
_this.otherHiddenList = res.data.hiddenList;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getMap() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/customCheckRecord/goMap', // /app/checkrecord/goMap
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CHECKRECORD_ID: _this.CHECKRECORD_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
|
||||
if (res.data != null) {
|
||||
uni.hideLoading();
|
||||
_this.mapVarList = res.data.varList;
|
||||
_this.mapHdList = res.data.hdList;
|
||||
_this.mapPd = res.data.pd;
|
||||
_this.mapCinfo = res.data.cinfo;
|
||||
_this.mapCheckrecord = res.data.checkrecord;
|
||||
if (res.data.cinfo.LONGITUDE != undefined && res.data.cinfo.LATITUDE !=
|
||||
undefined &&
|
||||
res.data.cinfo.LONGITUDE != '' && res.data.cinfo.LATITUDE != '') {
|
||||
var result = gcoord.transform(
|
||||
[res.data.cinfo.LONGITUDE, res.data.cinfo.LATITUDE], // 经纬度坐标
|
||||
gcoord.BD09, // 当前坐标系
|
||||
gcoord.GCJ02 // 目标坐标系
|
||||
);
|
||||
_this.longitude = result[0];
|
||||
_this.latitude = result[1];
|
||||
}
|
||||
|
||||
if (res.data.checkrecord.LONGITUDE != undefined && res.data.checkrecord.LATITUDE !=
|
||||
undefined &&
|
||||
res.data.checkrecord.LONGITUDE != '' && res.data.checkrecord.LATITUDE != '') {
|
||||
var result1 = gcoord.transform(
|
||||
[res.data.checkrecord.LONGITUDE, res.data.checkrecord
|
||||
.LATITUDE], // 经纬度坐标
|
||||
gcoord.BD09, // 当前坐标系
|
||||
gcoord.GCJ02 // 目标坐标系
|
||||
);
|
||||
var checkMarker = {
|
||||
latitude: result1[1],
|
||||
longitude: result1[0],
|
||||
iconPath: '../../../static/map/50.png'
|
||||
}
|
||||
_this.covers.push(checkMarker);
|
||||
}
|
||||
|
||||
for (var i = 0; i < res.data.varList.length; i++) {
|
||||
var result2 = gcoord.transform(
|
||||
[res.data.varList[i].LONGITUDE, res.data.varList[i].LATITUDE], // 经纬度坐标
|
||||
gcoord.BD09, // 当前坐标系
|
||||
gcoord.GCJ02 // 目标坐标系
|
||||
);
|
||||
var checkMarker = {
|
||||
latitude: result2[1],
|
||||
longitude: result2[0],
|
||||
iconPath: '../../../static/map/50.png'
|
||||
}
|
||||
_this.covers.push(checkMarker);
|
||||
}
|
||||
|
||||
/* console.info(res.data.hdList);
|
||||
for(var i=0;i<res.data.hdList.length;i++){
|
||||
var result3 = gcoord.transform(
|
||||
[res.data.hdList[i].LONGITUDE, res.data.hdList[i].LATITUDE], // 经纬度坐标
|
||||
gcoord.BD09, // 当前坐标系
|
||||
gcoord.GCJ02 // 目标坐标系
|
||||
);
|
||||
var checkMarker={latitude: result3[1],longitude: result3[0],iconPath: '../../../static/map/h.png'}
|
||||
_this.covers.push(checkMarker);
|
||||
console.info(_this.covers);
|
||||
} */
|
||||
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
ViewShowImage(e) {
|
||||
let files = [];
|
||||
for (var i = 0; i < this.files.length; i++) {
|
||||
files.push(baseImgPath + this.files[i].FILEPATH)
|
||||
}
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: e.currentTarget.dataset.index
|
||||
});
|
||||
},
|
||||
/* getRecordItem() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/hidden/getCheckrecord',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header:{
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CHECKRECORD_ID: _this.CHECKRECORD_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
|
||||
if (res.data != null) {
|
||||
uni.hideLoading();
|
||||
_this.recordItemList = res.data.varList;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.bu-title {
|
||||
font-weight: bold;
|
||||
margin: 30upx 20upx;
|
||||
padding-left: 10upx;
|
||||
border-left: 4px solid #0081FF;
|
||||
}
|
||||
|
||||
navigator {
|
||||
color: #0066CC;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.text-grey {
|
||||
color: #808080;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,285 @@
|
|||
<template>
|
||||
<view>
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" :isRingt="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">隐患检查记录</block>
|
||||
</cu-custom>
|
||||
<view class="top-fixed">
|
||||
<scroll-view scroll-x class="bg-white nav" scroll-with-animation :scroll-left="scrollLeft">
|
||||
<view class="flex text-center">
|
||||
<view class="cu-item flex-sub" :class="index==TabCur?'text-blue cur':''" v-for="(item,index) in tabNav" :key="index" @tap="tabSelect" :data-id="index">
|
||||
{{tabNav[index]}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="cu-bar search bg-white">
|
||||
<view class="search-form radius">
|
||||
<text class="cuIcon-search"></text>
|
||||
<input @input="InputBlur" placeholder="请输入关键字"></input>
|
||||
</view>
|
||||
<view class="action">
|
||||
<button class="cu-btn bg-green shadow-blur radius" @click="getQuery()">搜索</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
|
||||
<block v-if="TabCur==0">
|
||||
|
||||
<scroll-view class="dy-scroll-nobg" scroll-y :style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
|
||||
<view v-if="list.length>0" >
|
||||
<view class="dy-card" v-for="item in list" :key="item.CHECKRECORD_ID" @click="$noMultipleClicks(goToList,item.CHECKRECORD_ID)">
|
||||
<view class="dy-card-title">
|
||||
<text>清单名称:{{item.CUSTOM_NAME}}</text>
|
||||
<text class="cuIcon-right f30 text-gray"></text>
|
||||
</view>
|
||||
<view class="dy-card-content">
|
||||
<view class="dy-sub-stitle">
|
||||
<text class="text-grey">人员:{{item.PRINCIPALNAME?item.PRINCIPALNAME:ls.USER_NAME}}</text>
|
||||
</view>
|
||||
<view class="dy-sub-stitle">
|
||||
<text class="text-grey">检查周期:{{item.DATESTART}}-{{item.DATEEND}}</text>
|
||||
</view>
|
||||
<view class="dy-sub-stitle">
|
||||
<text class="text-grey">检查人:{{item.CHECK_USERS}}</text>
|
||||
<text class="text-grey">检查时间:{{item.CHECK_TIME}}</text>
|
||||
</view>
|
||||
<!-- <view class="cu-progress radius striped active">-->
|
||||
<!-- <view class="bg-olive" :style="[{ width:loading?((item.checkedItem>0 && item.count>0)?(item.checkedItem/item.count*100):0)+'%':''}]">{{(item.checkedItem>0 && item.count>0)?(item.checkedItem/item.count*100):0}}%</view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="dataFlag=='noData'" class="dy-null">
|
||||
<view class="dy-null-img">
|
||||
<image :src="background[dataFlag].url" mode=""></image>
|
||||
</view>
|
||||
<view class="dy-null-title">
|
||||
{{background[dataFlag].msg}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="cu-tabbar-height"></view> -->
|
||||
</scroll-view>
|
||||
</block>
|
||||
|
||||
<block v-if="TabCur==1">
|
||||
<scroll-view class="dy-scroll-nobg" scroll-y :style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
|
||||
<view v-if="list1.length>0" >
|
||||
<view class="dy-card" v-for="item in list1" :key="item.CHECKRECORD_ID" >
|
||||
<view class="dy-card-title">
|
||||
<text>清单名称:{{item.CUSTOM_NAME?item.CUSTOM_NAME:ls.NAME}}</text>
|
||||
</view>
|
||||
<view class="dy-card-content">
|
||||
<view class="dy-sub-stitle">
|
||||
<text class="text-grey">人员:{{item.PRINCIPALNAME?item.PRINCIPALNAME:ls.USER_NAME}}</text>
|
||||
</view>
|
||||
<view class="dy-sub-stitle">
|
||||
<text class="text-grey">检查周期:{{item.DATESTART}}-{{item.DATEEND}}</text>
|
||||
</view>
|
||||
<view class="dy-sub-stitle">
|
||||
<text class="text-grey">清单类型:{{ls.TYPENAME}}</text>
|
||||
<text class="text-grey">清单周期:{{ls.PERIODNAME}}</text>
|
||||
</view>
|
||||
<!-- <view class="cu-progress radius striped active">-->
|
||||
<!-- <view class="bg-olive" :style="[{ width:loading?((item.checkedItem>0 && item.count>0)?(item.checkedItem/item.count*100):0)+'%':''}]">{{(item.checkedItem>0 && item.count>0)?(item.checkedItem/item.count*100):0}}%</view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="dataFlag=='noData'" class="dy-null">
|
||||
<view class="dy-null-img">
|
||||
<image :src="background[dataFlag].url" mode=""></image>
|
||||
</view>
|
||||
<view class="dy-null-title">
|
||||
{{background[dataFlag].msg}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-tabbar-height"></view>
|
||||
</scroll-view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,loginUser,loginSession
|
||||
} from '@/common/tool.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
noClick:true,
|
||||
initflag:false,
|
||||
sTop:0,
|
||||
totalHeight:0,
|
||||
TabCur: 0,
|
||||
scrollLeft: 0,
|
||||
tabNav: ['已检查记录', '超期未检查记录'],
|
||||
loading: false,
|
||||
list: [],
|
||||
list1: [],
|
||||
totalList:[],
|
||||
page: 1,
|
||||
rows: 1000,
|
||||
totalCount:0,
|
||||
isEnd: false,
|
||||
total:0,
|
||||
dataFlag:'noData',
|
||||
isIndex:0,
|
||||
loginUserId:'',
|
||||
CUSTOM_ID:'',
|
||||
ls:'',
|
||||
KEYWORDS:'',
|
||||
}
|
||||
},
|
||||
onLoad: function(e) {
|
||||
let that = this;
|
||||
this.loginUserId = loginUser.USER_ID;
|
||||
this.CUSTOM_ID=e.CUSTOM_ID;
|
||||
this.getData();
|
||||
this.background = require('@/common/background.json');
|
||||
setTimeout(function() {
|
||||
that.loading = true
|
||||
}, 500)
|
||||
loginSession();
|
||||
},
|
||||
onReady() {
|
||||
let that=this;
|
||||
let CustomBar = this.CustomBar;
|
||||
uni.getSystemInfo({ //调用uni-app接口获取屏幕高度
|
||||
success(res) { //成功回调函数
|
||||
let titleH=uni.createSelectorQuery().select(".top-fixed"); //想要获取高度的元素名(class/id)
|
||||
titleH.boundingClientRect(data=>{
|
||||
that._data.sTop=data.height //计算高度:元素高度=窗口高度-元素距离顶部的距离(data.top)
|
||||
that.totalHeight = data.height+CustomBar
|
||||
}).exec()
|
||||
}
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
var _this = this;
|
||||
if(_this.initflag){
|
||||
_this.initflag = false;
|
||||
_this.list = [];
|
||||
_this.list1 = [];
|
||||
this.getData()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
tabSelect(e) {
|
||||
this.TabCur = e.currentTarget.dataset.id;
|
||||
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
|
||||
},
|
||||
getData(){
|
||||
var _this=this;
|
||||
console.info(_this.isEnd);
|
||||
if (_this.isEnd){
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
|
||||
console.info(loginUser);
|
||||
uni.request({
|
||||
|
||||
url: basePath + '/app/customCheckRecord/list',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
CUSTOM_ID:_this.CUSTOM_ID,
|
||||
KEYWORDS:_this.KEYWORDS,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
uni.hideLoading();
|
||||
var content = res.data.varList;
|
||||
_this.ls = res.data.ls;
|
||||
for(var i=0;i<content.length;i++){
|
||||
content[i].DATESTART = content[i].DATESTART.substring(0,content[i].DATESTART.length-3)
|
||||
content[i].DATEEND = content[i].DATEEND.substring(0,content[i].DATEEND.length-3)
|
||||
if(content[i].TYPE=='1'){
|
||||
this.list.push(content[i]);
|
||||
this.totalList.push(content[i]);
|
||||
}else{
|
||||
this.list1.push(content[i]);
|
||||
this.totalList.push(content[i]);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '系统异常',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getQuery() { //搜索按钮事件
|
||||
var _this = this;
|
||||
_this.showCount = -1;
|
||||
_this.currentPage = 1;
|
||||
_this.list = [];
|
||||
_this.list1 = [];
|
||||
_this.isEnd = false;
|
||||
_this.getData();
|
||||
},
|
||||
InputBlur(e){
|
||||
this.KEYWORDS = e.detail.value
|
||||
},
|
||||
// 滑动到底方法
|
||||
scrolltolower(){
|
||||
var _this = this;
|
||||
_this.getData();
|
||||
},
|
||||
//跳转事件
|
||||
goToList(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/hidden-danger-check-standard/record/record_info?CHECKRECORD_ID='+e
|
||||
});
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/application/hidden-trouble-investigation/hidden-trouble-app/check-items-list?listId='+e.listId+'&listName='+e.listName
|
||||
// });
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.dy-list {
|
||||
background: #fff;
|
||||
margin-top: 2upx;
|
||||
}
|
||||
.dy-card{
|
||||
background-color: #fff;
|
||||
border-radius: 10upx;
|
||||
margin:30upx
|
||||
}
|
||||
.dy-stitle{
|
||||
margin: 16upx 0;
|
||||
}
|
||||
.dy-sub-stitle{
|
||||
margin: 16upx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.dy-card-title{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #eee;
|
||||
min-height: 80upx;
|
||||
line-height: 80upx;
|
||||
padding: 0 30upx;
|
||||
}
|
||||
.dy-card-content{
|
||||
padding: 0upx 30upx 30upx;
|
||||
|
||||
}
|
||||
</style>
|
|
@ -4,29 +4,37 @@
|
|||
<image src="../../static/apps-banner.png" mode=""></image>
|
||||
</view>
|
||||
<view class="apps-box">
|
||||
<view class="apps-row">
|
||||
<view class="apps-title">
|
||||
<text class="apps-title-line"></text>
|
||||
<text>隐患快报</text>
|
||||
</view>
|
||||
<view class="apps-warp">
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/hidden-danger-management/hidden-danger-add/hidden-danger-add">
|
||||
<view class="imgs action">
|
||||
<image src="../../static/icon-apps/icon-pc-1.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text-semi">隐患快报</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="apps-row">
|
||||
<view class="apps-title">
|
||||
<text class="apps-title-line"></text>
|
||||
<text>隐患排查</text>
|
||||
<text>风险排查</text>
|
||||
</view>
|
||||
<view class="apps-warp">
|
||||
<navigator v-if="isRest=='1'" class="apps-item" hover-class="none" url="../" @click="showRest()">
|
||||
<view class="imgs action">
|
||||
<image src="../../static/icon-apps/icon-zl-6.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text-semi">隐患排查</view>
|
||||
<view class="text-semi">风险排查</view>
|
||||
</navigator>
|
||||
<navigator v-else class="apps-item" hover-class="none" url="/pages/application/hidden-trouble-investigation/hidden-trouble-app/hidden-trouble-app">
|
||||
<view class="imgs action">
|
||||
<image src="../../static/icon-apps/icon-zl-6.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text-semi">隐患排查</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/hidden-danger-management/hidden-danger-add/hidden-danger-add">
|
||||
<view class="imgs action">
|
||||
<image src="../../static/icon-apps/icon-pc-1.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text-semi">隐患快报</view>
|
||||
<view class="text-semi">风险排查</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/check-record/check_listmanager">
|
||||
<view class="imgs action">
|
||||
|
@ -35,7 +43,32 @@
|
|||
<view class="text-semi">检查记录</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view><view class="apps-row">
|
||||
<view class="apps-title">
|
||||
<text class="apps-title-line"></text>
|
||||
<text>隐患排查</text>
|
||||
</view>
|
||||
<view class="apps-warp">
|
||||
<navigator v-if="isRest=='1'" class="apps-item" hover-class="none" url="../" @click="showRest()">
|
||||
<view class="imgs action">
|
||||
<image src="../../static/icon-apps/icon-zl-6.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text-semi">隐患排查</view>
|
||||
</navigator>
|
||||
<navigator v-else class="apps-item" hover-class="none" url="/pages/application/hidden-danger-check-standard/custom/list">
|
||||
<view class="imgs action">
|
||||
<image src="../../static/icon-apps/icon-zl-6.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text-semi">隐患排查</view>
|
||||
</navigator>
|
||||
<navigator class="apps-item" hover-class="none" url="/pages/application/check-record/check_listmanager">
|
||||
<view class="imgs action">
|
||||
<image src="../../static/icon-apps/icon-zl-2.png" mode=""></image>
|
||||
</view>
|
||||
<view class="text-semi">检查记录</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="apps-row">
|
||||
<view class="apps-title">
|
||||
<text class="apps-title-line"></text>
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
'use strict';
|
||||
exports.main = async (event, context) => {
|
||||
let body = event.body;
|
||||
if (event.isBase64Encoded) {body = Buffer.from(body);}
|
||||
if(!body) {return { message: 'no body'};}
|
||||
|
||||
const param = JSON.parse(body);
|
||||
|
||||
// 云函数是通用的,和项目没有直接的关系。通过传递 appId,可以为多个项目进行推送
|
||||
const uniPush = uniCloud.getPushManager({appId:"__UNI__C846DA5"});
|
||||
return await uniPush.sendMessage(param);
|
||||
};
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"name": "unipush",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"description": "消息推送",
|
||||
"extensions": {
|
||||
"uni-cloud-push": {}
|
||||
}
|
||||
}
|
|
@ -1,142 +0,0 @@
|
|||
{
|
||||
"bsonType": "object",
|
||||
"required": [],
|
||||
"permission": {
|
||||
"read": false,
|
||||
"create": false,
|
||||
"update": false,
|
||||
"delete": false
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "ID,系统自动生成"
|
||||
},
|
||||
"appid": {
|
||||
"bsonType": "string",
|
||||
"description": "DCloud appid"
|
||||
},
|
||||
"device_id": {
|
||||
"bsonType": "string",
|
||||
"description": "设备唯一标识"
|
||||
},
|
||||
"vendor": {
|
||||
"bsonType": "string",
|
||||
"description": "设备厂商"
|
||||
},
|
||||
"push_clientid": {
|
||||
"bsonType": "string",
|
||||
"description": "推送设备客户端标识"
|
||||
},
|
||||
"imei": {
|
||||
"bsonType": "string",
|
||||
"description": "国际移动设备识别码IMEI(International Mobile Equipment Identity)"
|
||||
},
|
||||
"oaid": {
|
||||
"bsonType": "string",
|
||||
"description": "移动智能设备标识公共服务平台提供的匿名设备标识符(OAID)"
|
||||
},
|
||||
"idfa": {
|
||||
"bsonType": "string",
|
||||
"description": "iOS平台配置应用使用广告标识(IDFA)"
|
||||
},
|
||||
"imsi": {
|
||||
"bsonType": "string",
|
||||
"description": "国际移动用户识别码(International Mobile Subscriber Identification Number)"
|
||||
},
|
||||
"model": {
|
||||
"bsonType": "string",
|
||||
"description": "设备型号"
|
||||
},
|
||||
"platform": {
|
||||
"bsonType": "string",
|
||||
"description": "平台类型"
|
||||
},
|
||||
"uni_platform": {
|
||||
"bsonType": "string",
|
||||
"description": "uni-app 运行平台,与条件编译平台相同。"
|
||||
},
|
||||
"os_name": {
|
||||
"bsonType": "string",
|
||||
"description": "ios|android|windows|mac|linux "
|
||||
},
|
||||
"os_version": {
|
||||
"bsonType": "string",
|
||||
"description": "操作系统版本号 "
|
||||
},
|
||||
"os_language": {
|
||||
"bsonType": "string",
|
||||
"description": "操作系统语言 "
|
||||
},
|
||||
"os_theme": {
|
||||
"bsonType": "string",
|
||||
"description": "操作系统主题 light|dark"
|
||||
},
|
||||
"pixel_ratio": {
|
||||
"bsonType": "string",
|
||||
"description": "设备像素比 "
|
||||
},
|
||||
"network_model": {
|
||||
"bsonType": "string",
|
||||
"description": "设备网络型号wifi/3G/4G/"
|
||||
},
|
||||
"window_width": {
|
||||
"bsonType": "string",
|
||||
"description": "设备窗口宽度 "
|
||||
},
|
||||
"window_height": {
|
||||
"bsonType": "string",
|
||||
"description": "设备窗口高度"
|
||||
},
|
||||
"screen_width": {
|
||||
"bsonType": "string",
|
||||
"description": "设备屏幕宽度"
|
||||
},
|
||||
"screen_height": {
|
||||
"bsonType": "string",
|
||||
"description": "设备屏幕高度"
|
||||
},
|
||||
"rom_name": {
|
||||
"bsonType": "string",
|
||||
"description": "rom 名称"
|
||||
},
|
||||
"rom_version": {
|
||||
"bsonType": "string",
|
||||
"description": "rom 版本"
|
||||
},
|
||||
"location_latitude": {
|
||||
"bsonType": "double",
|
||||
"description": "纬度"
|
||||
},
|
||||
"location_longitude": {
|
||||
"bsonType": "double",
|
||||
"description": "经度"
|
||||
},
|
||||
"location_country": {
|
||||
"bsonType": "string",
|
||||
"description": "国家"
|
||||
},
|
||||
"location_province": {
|
||||
"bsonType": "string",
|
||||
"description": "省份"
|
||||
},
|
||||
"location_city": {
|
||||
"bsonType": "string",
|
||||
"description": "城市"
|
||||
},
|
||||
"create_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "创建时间",
|
||||
"forceDefaultValue": {
|
||||
"$env": "now"
|
||||
}
|
||||
},
|
||||
"last_update_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "最后一次修改时间",
|
||||
"forceDefaultValue": {
|
||||
"$env": "now"
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": "0.0.1"
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
"bsonType": "object",
|
||||
"required": [
|
||||
"value",
|
||||
"expired"
|
||||
],
|
||||
"permission": {
|
||||
"read": false,
|
||||
"create": false,
|
||||
"update": false,
|
||||
"delete": false
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "ID,系统自动生成"
|
||||
},
|
||||
"value": {
|
||||
"description": "值"
|
||||
},
|
||||
"expired": {
|
||||
"description": "过期时间",
|
||||
"bsonType": "timestamp"
|
||||
}
|
||||
},
|
||||
"version": "0.0.1"
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
{
|
||||
"bsonType": "object",
|
||||
"required": [
|
||||
"user_id"
|
||||
],
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "ID,系统自动生成"
|
||||
},
|
||||
"user_id": {
|
||||
"bsonType": "string",
|
||||
"description": "用户id,参考uni-id-users表"
|
||||
},
|
||||
"ua": {
|
||||
"bsonType": "string",
|
||||
"description": "userAgent"
|
||||
},
|
||||
"uuid": {
|
||||
"bsonType": "string",
|
||||
"description": "设备唯一标识(需要加密存储)"
|
||||
},
|
||||
"os_name": {
|
||||
"bsonType": "string",
|
||||
"description": "ios|android|windows|mac|linux "
|
||||
},
|
||||
"os_version": {
|
||||
"bsonType": "string",
|
||||
"description": "操作系统版本号 "
|
||||
},
|
||||
"os_language": {
|
||||
"bsonType": "string",
|
||||
"description": "操作系统语言 "
|
||||
},
|
||||
"os_theme": {
|
||||
"bsonType": "string",
|
||||
"description": "操作系统主题 light|dark"
|
||||
},
|
||||
"vendor": {
|
||||
"bsonType": "string",
|
||||
"description": "设备厂商"
|
||||
},
|
||||
"push_clientid": {
|
||||
"bsonType": "string",
|
||||
"description": "推送设备客户端标识"
|
||||
},
|
||||
"imei": {
|
||||
"bsonType": "string",
|
||||
"description": "国际移动设备识别码IMEI(International Mobile Equipment Identity)"
|
||||
},
|
||||
"oaid": {
|
||||
"bsonType": "string",
|
||||
"description": "移动智能设备标识公共服务平台提供的匿名设备标识符(OAID)"
|
||||
},
|
||||
"idfa": {
|
||||
"bsonType": "string",
|
||||
"description": "iOS平台配置应用使用广告标识(IDFA)"
|
||||
},
|
||||
"model": {
|
||||
"bsonType": "string",
|
||||
"description": "设备型号"
|
||||
},
|
||||
"platform": {
|
||||
"bsonType": "string",
|
||||
"description": "平台类型"
|
||||
},
|
||||
"create_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "创建时间",
|
||||
"forceDefaultValue": {
|
||||
"$env": "now"
|
||||
}
|
||||
},
|
||||
"last_active_date": {
|
||||
"bsonType": "timestamp",
|
||||
"description": "最后登录时间"
|
||||
},
|
||||
"last_active_ip": {
|
||||
"bsonType": "string",
|
||||
"description": "最后登录IP"
|
||||
}
|
||||
},
|
||||
"version": "0.0.1"
|
||||
}
|
Loading…
Reference in New Issue