BUG优化

dev
xiepeng 2024-07-12 19:27:30 +08:00
parent 01693ef150
commit c443b7dac5
7 changed files with 503 additions and 51 deletions

View File

@ -0,0 +1,441 @@
<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.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.USER_NAME}}</text>
</view>
</view>
<view class="cu-form-group">
<view class="title">
<text>检查时间</text>
</view>
<view>
<text class="text-grey">{{pd.CREATTIME}}</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,
LISTMANAGER_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.LISTMANAGER_ID = e.LISTMANAGER_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/checkrecord/goEdit',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
LISTMANAGER_ID: _this.LISTMANAGER_ID,
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
OPERATION: "1",
},
success: (res) => {
if (res.data != null) {
uni.hideLoading();
_this.varList = res.data.varList;
_this.pd = res.data.pd;
console.log(_this.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/hidden/getChcenkHidden',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
LISTMANAGER_ID: _this.LISTMANAGER_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/checkrecord/goMap',
method: 'POST',
dataType: 'json',
header: {
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
LISTMANAGER_ID: _this.LISTMANAGER_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>

View File

@ -304,7 +304,7 @@
},
goToList(id){
uni.navigateTo({
url: '/pages/application/check-record/record_list?LISTMANAGER_ID='+id
url: '/pages/application/check-record/check_info?LISTMANAGER_ID='+id
});
},
//

View File

@ -23,7 +23,7 @@
<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>
<view @click="goToDetail(item.RECORDITEM_ID)" style="color: blue;">不合格</view>
</uni-td>
<uni-td v-else-if='item.ISNORMAL=="2"' align="center">
<view style="color: blue;">不涉及</view>
@ -68,7 +68,7 @@
<text>清单名称</text>
</view>
<view>
<text class="text-grey">{{pd.LIST_NAME}}</text>
<text class="text-grey">{{pd.NAME}}</text>
</view>
</view>
<view class="cu-form-group">
@ -84,7 +84,7 @@
<text>检查人</text>
</view>
<view>
<text class="text-grey">{{pd.USERS}}</text>
<text class="text-grey">{{pd.BAO_BAO_USER_NAME}}</text>
</view>
</view>
<view class="cu-form-group">
@ -92,7 +92,7 @@
<text>检查时间</text>
</view>
<view>
<text class="text-grey">{{pd.CHECK_TIME}}</text>
<text class="text-grey">{{pd.CREATTIME}}</text>
</view>
</view>
<view class="cu-form-group">
@ -172,7 +172,7 @@
return {
recordItemList: [],
baseImgPath: baseImgPath,
CHECKRECORD_ID: '',
CUSTOM_ID: '',
hiddenList: [],
varList: [],
pd: [],
@ -193,7 +193,7 @@
},
onLoad(e) {
loginSession();
this.CHECKRECORD_ID = e.CHECKRECORD_ID;
this.CUSTOM_ID = e.CUSTOM_ID;
this.getData();
this.getOtherHidden();
this.getMap();
@ -228,7 +228,7 @@
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
CHECKRECORD_ID: _this.CHECKRECORD_ID,
CUSTOM_ID: _this.CUSTOM_ID,
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
@ -261,14 +261,15 @@
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
CHECKRECORD_ID: _this.CHECKRECORD_ID,
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
CUSTOM_ID: _this.CUSTOM_ID,
CORPINFO_ID: loginUser.CORPINFO_ID,
USER_ID: loginUser.USER_ID,
},
success: (res) => {
if (res.data != null) {
uni.hideLoading();
_this.pd = res.data.pd;
_this.otherHiddenList = res.data.hiddenList;
} else {
uni.showToast({
@ -292,7 +293,7 @@
'Content-type': 'application/x-www-form-urlencoded'
},
data: {
CHECKRECORD_ID: _this.CHECKRECORD_ID,
CUSTOM_ID: _this.CUSTOM_ID,
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},

View File

@ -28,21 +28,21 @@
<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.LIST_NAME}}</text>
<text class="cuIcon-right f30 text-gray"></text>
</view>
<view class="dy-card" v-for="item in list" :key="item.CHECKRECORD_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.PRINCIPALNAME?item.PRINCIPALNAME:ls.USER_NAME}}</text>
<text class="text-grey">人员{{item.USER_NAME?item.USER_NAME:ls.USER_NAME}}</text>
</view>
<view class="dy-sub-stitle">
<text class="text-grey">检查周期{{item.DATESTART}}-{{item.DATEEND}}</text>
<text class="text-grey">检查周期{{item.PERIODNAME}}</text>
</view>
<view class="dy-sub-stitle">
<text class="text-grey">检查人{{item.CHECK_USERS}}</text>
<text class="text-grey">检查时间{{item.CHECK_TIME}}</text>
<text class="text-grey">检查人{{item.BAO_BAO_USER_NAME}}</text>
<text class="text-grey">检查时间{{item.START_DATE}}</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>-->
@ -66,19 +66,20 @@
<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.LIST_NAME?item.LIST_NAME:ls.NAME}}</text>
</view>
<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.PRINCIPALNAME?item.PRINCIPALNAME:ls.USER_NAME}}</text>
<text class="text-grey">人员{{item.USER_NAME?item.USER_NAME:ls.USER_NAME}}</text>
</view>
<view class="dy-sub-stitle">
<text class="text-grey">检查周期{{item.DATESTART}}-{{item.DATEEND}}</text>
<text class="text-grey">检查周期{{item.PERIODNAME}}</text>
</view>
<view class="dy-sub-stitle">
<text class="text-grey">清单类型{{ls.TYPENAME}}</text>
<text class="text-grey">清单周期{{ls.PERIODNAME}}</text>
<text class="text-grey">清单类型{{ls.BAO_BAO_USER_NAME}}</text>
<text class="text-grey">清单周期{{ls.START_DATE}}</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>-->
@ -189,27 +190,26 @@
'Content-type':'application/x-www-form-urlencoded'
},
data: {
LISTMANAGER_ID:_this.LISTMANAGER_ID,
KEYWORDS:_this.KEYWORDS,
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){
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]);
}
}
uni.hideLoading(); //
if (res.data != null) {
if (_this.list.length == 0) {
_this.list = res.data.varList;
console.log(_this.list)
} else {
if (res.data.varList != null) {
_this.list2 = res.data.varList;
_this.list = _this.list.concat(_this.list2);
}
}
}else{
uni.showToast({
icon:'none',
@ -220,7 +220,6 @@
}
})
},
getQuery() { //
var _this = this;
_this.showCount = -1;
@ -241,7 +240,7 @@
//
goToList(e) {
uni.navigateTo({
url: '/pages/application/check-record/record_info?CHECKRECORD_ID='+e
url: '/pages/application/check-record/record_info?CUSTOM_ID='+e
});
// uni.navigateTo({
// url: '/pages/application/hidden-trouble-investigation/hidden-trouble-app/check-items-list?listId='+e.listId+'&listName='+e.listName

View File

@ -446,11 +446,12 @@
CUSTOM_ID: _this.listId,
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
OPERATETYPE: "CHECKINFO",
},
success: (res) => {
if("success" == res.data.result){
uni.hideLoading();
_this.otherHiddenList = res.data.hiddenList;
/*_this.otherHiddenList = res.data.hiddenList;*/
} else {
uni.showToast({
icon:'none',

View File

@ -570,13 +570,15 @@
},
data: {
HIDDEN_ID: _this.id,
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
CORPINFO_ID: loginUser.CORPINFO_ID,
USER_ID: loginUser.USER_ID,
OPERATION_TYPE: "1",
},
success: (res) => {
if ("success" == res.data.result) {
uni.hideLoading();
_this.pd = res.data.pd; //map
console.log(res.data.hImgs)
_this.hs = res.data.hs; //map
for (let i = 0; i < res.data.hImgs.length; i++) {
if(res.data.hImgs[i].FILEPATH.substring(res.data.hImgs[i].FILEPATH.lastIndexOf(".") + 1, res.data.hImgs[i].FILEPATH.length) === 'mp4'){

View File

@ -151,6 +151,14 @@ import {
url: '/pages/login/home'
});
} else if (this.form.REVIEW_RESULT=='-1') {
uni.request({
url: basePath + '/app/user/setPractitionerConfirmByUser',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
}
})
setloginUserId(null);
setCorpinfoId(null);
setDeptId(null);