1435 lines
33 KiB
Vue
1435 lines
33 KiB
Vue
<template>
|
|
<view class="addIssue">
|
|
<view class="fixedheader">
|
|
<headers :showBack="true" :themeType="true">
|
|
<view class="headerName">
|
|
我的隐患上报记录
|
|
</view>
|
|
</headers>
|
|
</view>
|
|
<view class="search-box" :style="{paddingTop: mobileTopHeight + 44 + 'px'}">
|
|
<view class="uni-form-item">
|
|
<u-search class="uni-input" placeholder="请输入隐患部位" :show-action="false"
|
|
v-model="projectTypeName"></u-search>
|
|
<!-- <u-input v-model="projectType" type="select" :border="true" @click="projectTypeShow = true" /> -->
|
|
<view @click="dropdownBtnChange('')" class="search-btn">
|
|
<image src="/static/riskPoint/screenIcon.png" mode=""></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="content" :style="{paddingTop: mobileTopHeight + 110 + 'px'}">
|
|
<view class="content_main" v-if="workTicketList.length > 0">
|
|
<view class="main3_box" @click.prevent="onNavigateToDetail(1,item)" v-for="item in workTicketList"
|
|
:key="item.id">
|
|
<view class="main3_box-header">
|
|
{{item.createTime}}
|
|
</view>
|
|
<view class="main3_box-main">
|
|
<image class="main3_box-image" @click="previewImage(item.imageUrl)"
|
|
:src="previewImageUp(item.imageUrl[0].url)" mode=""></image>
|
|
<view class="main3_box-right">
|
|
<view class="box-item">
|
|
<view>隐患描述:</view>
|
|
<view>{{item.addedDescription ? item.addedDescription : '--'}}</view>
|
|
</view>
|
|
<view class="box-item">
|
|
<view>隐患部位:</view>
|
|
<view>{{item.detailPlace ? item.detailPlace : '--'}}</view>
|
|
</view>
|
|
<view class="box-item">
|
|
<view>上报时间:</view>
|
|
<view>{{item.inspectTime ? item.inspectTime : '--'}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="new-nodata" v-else>
|
|
<view></view>
|
|
<text>暂无数据...</text>
|
|
</view>
|
|
<view class="confrim-bottom">
|
|
<view class="btn-primary" @click="onNavigateToDetail(2)">上报隐患</view>
|
|
</view>
|
|
<view class="box2" @click="takePhoto">
|
|
<u-icon name="camera-fill" color="#FFFFFF" size="40"></u-icon>
|
|
</view>
|
|
</view>
|
|
<u-toast ref="uToast" />
|
|
<u-popup v-model="issueInvoiceShow" :closeable="false" mode="bottom">
|
|
<view class="content-popup">
|
|
<!-- <view class="content-popup_header">
|
|
管控清单类型
|
|
</view> -->
|
|
<scroll-view scroll-y="true" style="height: 800rpx;">
|
|
<view class="content-popup_main">
|
|
<view>
|
|
<view>有效时间</view>
|
|
<view @click="constructionTimeShow = true">
|
|
<view v-if="policeCameraInfo.effectiveTimeEnd_begin">
|
|
{{policeCameraInfo.effectiveTimeEnd_begin }} -
|
|
{{policeCameraInfo.effectiveTimeBegin_end}}
|
|
</view>
|
|
<view v-else>
|
|
请选择
|
|
</view>
|
|
<u-icon name="arrow-left" color="#A2A4AF" size="32"></u-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- <view>
|
|
<view>风险分类</view>
|
|
<view @click="onConstructionAreasType(2)">
|
|
<view>
|
|
{{searchInfo.containLibraryNames ? searchInfo.containLibraryNames : '请选择'}}
|
|
</view>
|
|
<u-icon name="arrow-left" color="#A2A4AF" size="32"></u-icon>
|
|
</view>
|
|
</view>
|
|
<view>
|
|
<view>责任区域</view>
|
|
<view @click="onConstructionAreasType(1)">
|
|
<view>
|
|
{{searchInfo.regionNames ? searchInfo.regionNames : '请选择'}}
|
|
</view>
|
|
<u-icon name="arrow-left" color="#A2A4AF" size="32"></u-icon>
|
|
</view>
|
|
</view> -->
|
|
</scroll-view>
|
|
<view class="confrim-btn">
|
|
<view @click="onCancel">重置</view>
|
|
<view @click="onSubmit">确定</view>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
<u-calendar v-model="constructionTimeShow" mode="range" :max-date="'2300-01-01'"
|
|
@change="onConstructionTimeChange"></u-calendar>
|
|
<u-popup :mask-close-able="false" v-model="constructionAreasShow" :closeable="false" mode="bottom">
|
|
<view class="content-popup">
|
|
<view class="content-popup_header">
|
|
{{constructionAreasType == 2 ? '风险分类' : '责任区域'}}
|
|
</view>
|
|
<scroll-view v-if="qualityRegionList.length > 0 && constructionAreasType == 1" scroll-y="true"
|
|
style="max-height: 600rpx;">
|
|
<TreeView :defaultExpanded="true" @node-click="onConstructionAreasClick" :multiple="true"
|
|
checked-bg-color="rgba(81,129,246,0.1)" :data="qualityRegionList" :children-key="'children'"
|
|
:label-key="'regionName'" :id-key="'id'" :value="constructionAreasList" />
|
|
</scroll-view>
|
|
<scroll-view v-else-if="riskPointTreeList.length > 0 && constructionAreasType == 2" scroll-y="true"
|
|
style="max-height: 600rpx;">
|
|
<TreeView :defaultExpanded="true" @node-click="onApplicantsClick" :multiple="true"
|
|
checked-bg-color="rgba(81,129,246,0.1)" :data="riskPointTreeList" :children-key="'children'"
|
|
:label-key="'nodeName'" :id-key="'id'" :value="applicantsList" />
|
|
</scroll-view>
|
|
<view class="new-nodata_height" v-else>
|
|
<view class="new-nodata">
|
|
<view></view>
|
|
<text>暂无数据...</text>
|
|
</view>
|
|
</view>
|
|
<view class="confrim-btn">
|
|
<view @click="onCancelClick">取消</view>
|
|
<view @click="onSubmitType">确定</view>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
<u-popup v-model="riskPointShow" :closeable="false" mode="bottom">
|
|
<view class="content-popup">
|
|
<view class="content-popup_header">
|
|
风险点识别
|
|
</view>
|
|
<scroll-view v-if="riskPointTreeList.length > 0" scroll-y="true" style="max-height: 600rpx;">
|
|
<TreeView :defaultExpanded="true" :multiple="true" checked-bg-color="rgba(81,129,246,0.1)"
|
|
:data="riskPointTreeList" :children-key="'children'" :label-key="'nodeName'" :id-key="'id'"
|
|
v-model="riskPointIds" />
|
|
</scroll-view>
|
|
<view class="new-nodata_height" v-else>
|
|
<view class="new-nodata">
|
|
<view></view>
|
|
<text>暂无数据...</text>
|
|
</view>
|
|
</view>
|
|
<view class="confrim-btn">
|
|
<view @click="riskPointShow = false;">取消</view>
|
|
<view @click="onRiskPointSubmit">确定</view>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
<canversCom v-if="openImg" :style="`position: absolute; left: -9999px;`" @imgUrl="imgUrl" :imgList="imgList">
|
|
</canversCom>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
isJSON
|
|
} from "@/utils/tool.js"
|
|
import TreeView from '@/components/tree-view/TreeView.vue';
|
|
import {
|
|
data
|
|
} from "uview-ui/libs/mixin/mixin";
|
|
import canversCom from "@/pages/projectEnd/safeSame/hiddenTroubleComponents/canversCom/canversCom.vue"
|
|
export default {
|
|
components: {
|
|
TreeView,
|
|
canversCom
|
|
},
|
|
data() {
|
|
return {
|
|
mobileTopHeight: 0,
|
|
projectDetail: {},
|
|
list: [{
|
|
name: '动态风险'
|
|
}, {
|
|
name: '静态风险'
|
|
}],
|
|
current: 0,
|
|
checked: false,
|
|
searchName: "",
|
|
inserviceTypeList: [{
|
|
label: '全部',
|
|
value: ''
|
|
},
|
|
{
|
|
label: '未开始',
|
|
value: '1'
|
|
},
|
|
{
|
|
label: '施工中',
|
|
value: '2'
|
|
},
|
|
{
|
|
label: '暂停中',
|
|
value: '3'
|
|
},
|
|
{
|
|
label: '已完工',
|
|
value: '4'
|
|
}
|
|
],
|
|
dropDownShow: false,
|
|
submitShow: false,
|
|
workTicketList: [],
|
|
policeCameraInfo: {
|
|
effectiveTimeEnd_begin: "",
|
|
effectiveTimeBegin_end: "",
|
|
effectiveTimeBegin: "",
|
|
effectiveTimeEnd: "",
|
|
},
|
|
typeIds: [''],
|
|
checkedIds: [''],
|
|
statusIds: [''],
|
|
selectList: [],
|
|
pageNo: 1,
|
|
pageSize: 10,
|
|
issueInvoiceShow: false,
|
|
checkedIdList: [],
|
|
constructionTimeShow: false,
|
|
stateShow: false,
|
|
stateType: "",
|
|
stateInfo: {},
|
|
// 区域
|
|
qualityRegionList: [],
|
|
constructionAreasList: [],
|
|
constructionAreasNameList: [],
|
|
constructionAreasShow: false,
|
|
// 申请单位
|
|
applicantsList: [],
|
|
applicantsNameList: [],
|
|
constructionAreasType: "",
|
|
searchInfo: {
|
|
regionIds: [],
|
|
regionNames: "",
|
|
containLibraryIds: [],
|
|
containLibraryNames: "",
|
|
specificResponsibilityAreaIds: [],
|
|
specificResponsibilityAreaNames: "",
|
|
},
|
|
value1: 1,
|
|
options1: [{
|
|
label: '有效时间',
|
|
value: 1,
|
|
},
|
|
{
|
|
label: '具体责任区域',
|
|
value: 2,
|
|
},
|
|
],
|
|
projectTypeShow: false,
|
|
defaultIndex: [0],
|
|
projectTypeId: "",
|
|
projectTypeName: "",
|
|
projectTypeList: [],
|
|
riskFactorTypeList: [],
|
|
riskPointTreeList: [],
|
|
riskPointIds: [],
|
|
riskPointShow: false,
|
|
issueInvoiceType: "",
|
|
userInfo: {},
|
|
imageValue: [],
|
|
openImg: false,
|
|
imgList: [],
|
|
width: 0,
|
|
height: 0,
|
|
weatherInfo: '',
|
|
locationInfo: '',
|
|
shooter: '张三' // 可根据实际情况修改或动态获取拍摄人信息
|
|
}
|
|
},
|
|
onLoad(opts) {
|
|
this.projectDetail = JSON.parse(uni.getStorageSync('projectDetail'));
|
|
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'));
|
|
this.shooter = this.userInfo.realName;
|
|
this.getQualityRegionListFn();
|
|
this.getDicProjectTypeList();
|
|
this.getRiskListLibraryList();
|
|
this.loadData();
|
|
},
|
|
mounted() {
|
|
var that = this
|
|
uni.getSystemInfo({
|
|
success(res) {
|
|
that.mobileTopHeight = res.statusBarHeight ? res.statusBarHeight : 0;
|
|
uni.setStorageSync('systemInfo', res)
|
|
console.log(res)
|
|
}
|
|
})
|
|
},
|
|
onShow() {
|
|
let that = this
|
|
uni.$on('updateData', function(data) {
|
|
that.loadData();
|
|
})
|
|
},
|
|
onReachBottom() {
|
|
console.log(1)
|
|
if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
|
|
this.isLoadMore = true
|
|
this.pageNo += 1
|
|
this.getPoliceCameraItemListFn()
|
|
}
|
|
},
|
|
onPullDownRefresh() {
|
|
console.log(2)
|
|
this.pageNo = 1
|
|
this.workTicketList = []
|
|
this.getPoliceCameraItemListFn()
|
|
},
|
|
methods: {
|
|
// 拍照方法
|
|
async takePhoto() {
|
|
try {
|
|
// 调用相机拍照
|
|
const res = await new Promise((resolve, reject) => {
|
|
uni.chooseImage({
|
|
count: 1,
|
|
sourceType: ['camera'],
|
|
success: resolve,
|
|
fail: reject
|
|
});
|
|
});
|
|
|
|
const tempFilePath = res.tempFilePaths[0];
|
|
this.canversList(tempFilePath);
|
|
console.log(334455, tempFilePath, res);
|
|
} catch (error) {
|
|
console.error('拍照出错:', error);
|
|
uni.showToast({
|
|
title: '拍照失败,请重试',
|
|
icon: 'none'
|
|
});
|
|
}
|
|
},
|
|
canversList(tempFilePath) {
|
|
// 设置画布宽高为图片宽高
|
|
uni.getImageInfo({
|
|
src: tempFilePath,
|
|
success: (imageRes) => {
|
|
console.log(88888, imageRes)
|
|
const {
|
|
width,
|
|
height
|
|
} = imageRes;
|
|
this.imgList = {
|
|
imgUrl: tempFilePath,
|
|
imgWidth: width,
|
|
imgHeight: height,
|
|
shooter: this.userInfo.realName,
|
|
}
|
|
this.openImg = true
|
|
console.log('传过去啦', this.imgList)
|
|
},
|
|
fail: (err) => {
|
|
console.error('获取图片信息失败:', err);
|
|
reject(err);
|
|
}
|
|
});
|
|
},
|
|
imgUrl(val) {
|
|
console.log(val);
|
|
this.imageValue = [{
|
|
url: val.imageBase64
|
|
}];
|
|
|
|
// 保存图片到相册
|
|
this.saveBase64Img(val.imageBase64);
|
|
this.openImg = false;
|
|
uni.navigateTo({
|
|
url: `./addHiddenTroubleList?imageUrl=${val.imgUrl}`
|
|
})
|
|
},
|
|
saveBase64Img(base64) {
|
|
const bitmap = new plus.nativeObj.Bitmap('test');
|
|
bitmap.loadBase64Data(
|
|
base64,
|
|
function() {
|
|
const url = '_doc/' + new Date() + '.png'; // url建议用时间戳命名方式
|
|
console.log('url:', url);
|
|
bitmap.save(
|
|
url, {
|
|
overwrite: true // 是否覆盖
|
|
// quality: 'quality' // 图片清晰度
|
|
},
|
|
i => {
|
|
uni.saveImageToPhotosAlbum({
|
|
filePath: url,
|
|
success: function() {
|
|
uni.showToast({
|
|
title: '保存成功',
|
|
icon: 'none'
|
|
})
|
|
bitmap.clear();
|
|
}
|
|
});
|
|
},
|
|
e => {
|
|
uni.showToast({
|
|
title: '保存失败',
|
|
icon: 'none'
|
|
})
|
|
console.log(e);
|
|
bitmap.clear();
|
|
}
|
|
);
|
|
},
|
|
e => {
|
|
console.log('保存失败', e);
|
|
bitmap.clear();
|
|
}
|
|
);
|
|
},
|
|
open() {
|
|
this.dropDownShow = true
|
|
},
|
|
close() {
|
|
this.dropDownShow = false
|
|
},
|
|
dropdownBtnChange(e) {
|
|
console.log("触发了", e);
|
|
if (e) {
|
|
const resultList = this.workTicketList.filter(item => item.checked);
|
|
if (resultList.length == 0) {
|
|
this.showToast('请先选择需要批量设置的风险点', 'warning');
|
|
return
|
|
}
|
|
}
|
|
this.issueInvoiceType = e;
|
|
this.issueInvoiceShow = true;
|
|
},
|
|
// 风险点识别确认
|
|
onRiskPointSubmit() {
|
|
console.log(this.riskPointIds);
|
|
if (this.riskPointIds.length == 0) return this.showToast('请先选择风险点类型', 'warning');
|
|
let data = {
|
|
projectSn: this.projectDetail.projectSn,
|
|
libraryIds: this.riskPointIds
|
|
};
|
|
this.sendRequest({
|
|
url: 'xmgl/riskListPoint/identifyRisk',
|
|
method: 'POST',
|
|
data: data,
|
|
success: res => {
|
|
if (res.code == 200) {
|
|
this.showToast('保存成功!', 'success');
|
|
this.riskPointShow = false;
|
|
this.loadData();
|
|
}
|
|
}
|
|
})
|
|
},
|
|
// 多选下拉 1区域 2单位 3人员
|
|
onConstructionAreasType(type) {
|
|
this.constructionAreasType = type;
|
|
if (type == 1) {
|
|
if (this.issueInvoiceType) {
|
|
this.constructionAreasList = this.searchInfo.specificResponsibilityAreaIds.map(item => item);
|
|
this.constructionAreasNameList = this.searchInfo.specificResponsibilityAreaNames ? this.searchInfo
|
|
.specificResponsibilityAreaNames.split(',') : [];
|
|
} else {
|
|
this.constructionAreasList = this.searchInfo.regionIds.map(item => item);
|
|
this.constructionAreasNameList = this.searchInfo.regionNames ? this.searchInfo
|
|
.regionNames.split(',') : [];
|
|
}
|
|
} else if (type == 2) {
|
|
this.applicantsList = this.searchInfo.containLibraryIds.map(item => item);
|
|
this.applicantsNameList = this.searchInfo.containLibraryNames ? this.searchInfo
|
|
.containLibraryNames.split(',') : [];
|
|
} else if (type == 3) {
|
|
this.operatorsList = this.searchInfo.operators.map(item => item);
|
|
this.operatorsNameList = this.searchInfo.operatorsName ? this.searchInfo
|
|
.operatorsName.split(',') : [];
|
|
}
|
|
this.constructionAreasShow = true;
|
|
},
|
|
// 区域
|
|
onConstructionAreasClick(id, checked, label) {
|
|
console.log(id, checked, label)
|
|
const idx = this.constructionAreasList.indexOf(id);
|
|
if (checked && idx === -1) {
|
|
this.constructionAreasList.push(id);
|
|
this.constructionAreasNameList.push(label);
|
|
} else if (!checked && idx !== -1) {
|
|
this.constructionAreasList.splice(idx, 1);
|
|
this.constructionAreasNameList.splice(idx, 1);
|
|
}
|
|
console.log(1122, this.constructionAreasNameList, this.constructionAreasList)
|
|
},
|
|
// 单位
|
|
onApplicantsClick(id, checked, label) {
|
|
const idx = this.applicantsList.indexOf(id);
|
|
if (checked && idx === -1) {
|
|
this.applicantsList.push(id);
|
|
this.applicantsNameList.push(label);
|
|
} else if (!checked && idx !== -1) {
|
|
this.applicantsList.splice(idx, 1);
|
|
this.applicantsNameList.splice(idx, 1);
|
|
}
|
|
},
|
|
onSubmitType() {
|
|
if (this.constructionAreasType == 1) {
|
|
console.log(11233, this.constructionAreasNameList)
|
|
if (this.issueInvoiceType) {
|
|
this.searchInfo.specificResponsibilityAreaIds = [...this.constructionAreasList];
|
|
this.searchInfo.specificResponsibilityAreaNames = this.constructionAreasNameList.join(',');
|
|
} else {
|
|
this.searchInfo.regionIds = [...this.constructionAreasList];
|
|
this.searchInfo.regionNames = this.constructionAreasNameList.join(',');
|
|
}
|
|
|
|
} else if (this.constructionAreasType == 2) {
|
|
this.searchInfo.containLibraryIds = [...this.applicantsList];
|
|
this.searchInfo.containLibraryNames = this.applicantsNameList.join(',');
|
|
}
|
|
this.constructionAreasShow = false;
|
|
},
|
|
onCancelClick() {
|
|
if (this.constructionAreasType == 1) {
|
|
this.constructionAreasList = [...this.searchInfo.regionIds];
|
|
} else if (this.constructionAreasType == 2) {
|
|
this.applicantsList = [...this.searchInfo.containLibraryIds];
|
|
}
|
|
this.constructionAreasShow = false;
|
|
},
|
|
change(index) {
|
|
this.current = index;
|
|
this.loadData();
|
|
},
|
|
onStateShow(type, row) {
|
|
this.stateType = type;
|
|
this.stateInfo = row,
|
|
this.stateShow = true;
|
|
},
|
|
onStateCancel() {
|
|
this.stateShow = false;
|
|
},
|
|
onStateConfirm() {
|
|
this.onChangeState(this.stateType, this.stateInfo);
|
|
this.stateShow = false;
|
|
},
|
|
// 获取时间
|
|
onConstructionTimeChange(event) {
|
|
console.log(113344, event)
|
|
if (this.issueInvoiceType) {
|
|
this.policeCameraInfo.effectiveTimeBegin = event.startDate;
|
|
this.policeCameraInfo.effectiveTimeEnd = event.endDate;
|
|
} else {
|
|
this.policeCameraInfo.effectiveTimeEnd_begin = event.startDate;
|
|
this.policeCameraInfo.effectiveTimeBegin_end = event.endDate;
|
|
// this.loadData();
|
|
}
|
|
},
|
|
// 打开详情
|
|
onNavigateToDetail(type, row) {
|
|
if (type == 1) {
|
|
uni.navigateTo({
|
|
url: `./hiddenTroubleDetail?id=${row.id}`
|
|
})
|
|
} else if (type == 2) {
|
|
uni.navigateTo({
|
|
url: `./addHiddenTroubleList`
|
|
})
|
|
}
|
|
},
|
|
onCancel() {
|
|
this.policeCameraInfo = {
|
|
effectiveTimeEnd_begin: "",
|
|
effectiveTimeBegin_end: "",
|
|
effectiveTimeBegin: "",
|
|
effectiveTimeEnd: "",
|
|
};
|
|
this.onSubmit();
|
|
},
|
|
onSubmit() {
|
|
this.loadData();
|
|
this.issueInvoiceShow = false;
|
|
},
|
|
loadData() {
|
|
this.pageNo = 1
|
|
this.workTicketList = []
|
|
this.getPoliceCameraItemListFn();
|
|
},
|
|
// 获取施工场站
|
|
getQualityRegionListFn() {
|
|
let that = this;
|
|
let data = {
|
|
projectSn: this.projectDetail.projectSn,
|
|
pageNo: 1,
|
|
pageSize: -1,
|
|
};
|
|
this.sendRequest({
|
|
url: 'xmgl/qualityRegion/tree/page',
|
|
method: 'POST',
|
|
data: data,
|
|
success: res => {
|
|
if (res.code == 200) {
|
|
that.qualityRegionList = res.result.records;
|
|
}
|
|
}
|
|
})
|
|
},
|
|
// 获取管控清单列表
|
|
getPoliceCameraItemListFn() {
|
|
let data = {
|
|
inspectTime_begin: this.policeCameraInfo.effectiveTimeEnd_begin,
|
|
inspectTime_end: this.policeCameraInfo.effectiveTimeBegin_end,
|
|
pageNo: this.pageNo,
|
|
pageSize: this.pageSize,
|
|
inspectManId: this.userInfo.userId,
|
|
detailPlace: this.projectTypeName,
|
|
projectSn: this.projectDetail.projectSn,
|
|
}
|
|
|
|
this.sendRequest({
|
|
url: 'xmgl/xzSecurityQualityInspectionRecordDraft/page',
|
|
method: 'POST',
|
|
data: data,
|
|
success: res => {
|
|
uni.hideLoading()
|
|
if (res.code == 200) {
|
|
console.log("workList======================", res)
|
|
const resultList = res.result.records.map(item => {
|
|
return {
|
|
...item,
|
|
imageUrl: isJSON(item.imageUrl) &&
|
|
Array.isArray(JSON.parse(item.imageUrl)) ?
|
|
JSON.parse(item.imageUrl) : [],
|
|
checked: false,
|
|
expandMoreShow: false,
|
|
}
|
|
})
|
|
this.workTicketList = this.workTicketList.concat(resultList)
|
|
if (res.result.records.length < this.pageSize) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
|
|
this.isLoadMore = true
|
|
this.loadStatus = 'nomore'
|
|
} else {
|
|
this.isLoadMore = false
|
|
// that.loadStatus='more'
|
|
}
|
|
uni.stopPullDownRefresh()
|
|
}
|
|
}
|
|
})
|
|
},
|
|
//预览图片
|
|
previewImage(dataList) {
|
|
uni.previewImage({
|
|
urls: dataList.map(item => this.url_config + 'image/' + item.url),
|
|
})
|
|
},
|
|
// 获取字典工程类别列表
|
|
getDicProjectTypeList() {
|
|
let that = this;
|
|
// 风险清单库工程类别
|
|
this.sendRequest({
|
|
url: 'xmgl/dictionaryItem/list',
|
|
method: 'GET',
|
|
data: {
|
|
projectSn: this.projectDetail.projectSn,
|
|
dictionaryEncoding: "risk_list_project_type",
|
|
},
|
|
success: res => {
|
|
if (res.code == 200) {
|
|
that.projectTypeList = [{
|
|
data: "",
|
|
name: "全部",
|
|
}, ...res.result];
|
|
}
|
|
}
|
|
})
|
|
},
|
|
recursionRiskListLibraryList(dataList) {
|
|
dataList.forEach((item) => {
|
|
if (item.children) {
|
|
item.children = this.recursionRiskListLibraryList(item.children);
|
|
}
|
|
item.disabled = item.ancestors.split(",").length < 4; // 禁用回收站选项
|
|
});
|
|
return dataList;
|
|
},
|
|
getRiskListLibraryList() {
|
|
this.sendRequest({
|
|
url: 'xmgl/riskListLibrary/tree/page',
|
|
method: 'GET',
|
|
data: {
|
|
projectSn: this.projectDetail.projectSn,
|
|
},
|
|
success: res => {
|
|
if (res.code == 200) {
|
|
this.riskPointTreeList = this.recursionRiskListLibraryList(res.result.records);
|
|
}
|
|
}
|
|
})
|
|
},
|
|
// 查找数据
|
|
findNodeById(dataList, id) {
|
|
for (const node of dataList) {
|
|
if (node.id === id) return node;
|
|
if (node.children && node.children.length) {
|
|
const found = this.findNodeById(node.children, id);
|
|
if (found) return found;
|
|
}
|
|
}
|
|
return null;
|
|
},
|
|
showToast(title, type) {
|
|
this.$refs.uToast.show({
|
|
title: title,
|
|
type: type,
|
|
})
|
|
},
|
|
},
|
|
computed: {
|
|
recursionDataListUp() {
|
|
return (dataList, id, typeName) => {
|
|
const find = this.findNodeById(dataList, id)
|
|
return find ? find[typeName] : '--'
|
|
}
|
|
},
|
|
dataListUp() {
|
|
return (dataList, id) => {
|
|
const find = dataList.find(item => item.value == id);
|
|
return find ? find.label : '--'
|
|
}
|
|
},
|
|
statusUp() {
|
|
return (id) => {
|
|
const dataList = [{
|
|
value: 1,
|
|
label: "未开始"
|
|
}, {
|
|
value: 2,
|
|
label: "施工中"
|
|
}, {
|
|
value: 3,
|
|
label: "暂停中"
|
|
}, {
|
|
value: 4,
|
|
label: "已完工"
|
|
}]
|
|
const find = dataList.find(item => item.value == id);
|
|
return find ? find.label : '--'
|
|
}
|
|
},
|
|
previewImageUp() {
|
|
return (url) => {
|
|
return url.includes("http") ? url : this.url_config + 'image/' + url
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.dropdown-btn {
|
|
/deep/ .u-dropdown {
|
|
.u-dropdown__content {
|
|
width: 320rpx;
|
|
left: -50%;
|
|
bottom: 240rpx;
|
|
top: initial !important;
|
|
}
|
|
|
|
.u-dropdown__menu {
|
|
height: initial !important;
|
|
}
|
|
|
|
.u-dropdown__menu__item {
|
|
width: 100%;
|
|
}
|
|
|
|
.u-dropdown__content__mask {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
/deep/ .u-mode-center-box {
|
|
width: 698rpx !important;
|
|
|
|
.u-model__title {
|
|
padding: 0;
|
|
font-size: 32rpx;
|
|
color: #272D45;
|
|
height: 86rpx;
|
|
background-color: #FFFFFF;
|
|
box-shadow: 0rpx 8rpx 10rpx -8rpx rgba(81, 129, 246, 0.42);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.u-model__content__message {
|
|
padding: 26rpx 26rpx 72rpx;
|
|
font-size: 28rpx;
|
|
color: #171717;
|
|
}
|
|
|
|
.u-model__footer__button {
|
|
height: 76rpx;
|
|
line-height: 76rpx;
|
|
background-color: rgba(81, 129, 246, 0.1);
|
|
font-weight: 500;
|
|
font-size: 28rpx;
|
|
color: #5181F6;
|
|
}
|
|
|
|
.hairline-left {
|
|
background-color: #5181F6;
|
|
color: white !important;
|
|
}
|
|
|
|
.content_main-box1 {
|
|
padding: 26rpx 28rpx;
|
|
|
|
>view:first-child {
|
|
font-weight: 500;
|
|
font-size: 28rpx;
|
|
color: #171717;
|
|
}
|
|
|
|
>view:last-child {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
font-size: 24rpx;
|
|
color: #FFA026;
|
|
margin-top: 26rpx;
|
|
|
|
.u-icon {
|
|
font-size: 35rpx;
|
|
margin-right: 20rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/deep/ .u-drawer-content-visible {
|
|
border-radius: 16rpx 16rpx 0rpx 0rpx;
|
|
}
|
|
|
|
.content-popup {
|
|
border-radius: 16rpx 16rpx 0rpx 0rpx;
|
|
|
|
.content-popup_main {
|
|
padding: 0 26rpx;
|
|
|
|
>view {
|
|
display: flex;
|
|
// align-items: center;
|
|
justify-content: space-between;
|
|
line-height: 72rpx;
|
|
|
|
>view:first-child {
|
|
font-weight: 500;
|
|
font-size: 30rpx;
|
|
color: #1A1A1A;
|
|
}
|
|
|
|
>view:last-child {
|
|
font-size: 28rpx;
|
|
color: #808080;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
width: 80%;
|
|
|
|
.u-input {
|
|
text-align: right !important;
|
|
}
|
|
|
|
.u-icon {
|
|
margin-left: 10rpx;
|
|
transform: rotate(-90deg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.content-popup_header {
|
|
height: 86rpx;
|
|
box-shadow: 0rpx 8rpx 10rpx -8rpx rgba(81, 129, 246, 0.42);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-weight: 800;
|
|
font-size: 30rpx;
|
|
color: #1A1A1A;
|
|
}
|
|
|
|
uni-scroll-view {
|
|
margin: 26rpx 0;
|
|
}
|
|
|
|
.confrim-btn {
|
|
padding: 18rpx 26rpx;
|
|
background-color: #FFFFFF;
|
|
box-shadow: 0rpx -8rpx 8rpx 0rpx rgba(0, 0, 0, 0.05);
|
|
display: flex;
|
|
|
|
>view {
|
|
width: 50%;
|
|
height: 76rpx;
|
|
font-weight: 500;
|
|
font-size: 28rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
>view:first-child {
|
|
background-color: rgba(81, 129, 246, 0.1);
|
|
border-radius: 6rpx 0rpx 0rpx 6rpx;
|
|
color: #5181F6;
|
|
}
|
|
|
|
>view:last-child {
|
|
background-color: #5181F6;
|
|
border-radius: 0rpx 6rpx 6rpx 0rpx;
|
|
color: #FFFFFF;
|
|
}
|
|
}
|
|
}
|
|
|
|
.addIssue {
|
|
min-height: 100vh;
|
|
background-color: #F2F3F7;
|
|
}
|
|
|
|
.content {
|
|
.content_main {
|
|
// margin-top: 26rpx;
|
|
// background-color: white;
|
|
padding-bottom: 138rpx;
|
|
min-height: calc(100vh - 130rpx - 138rpx - 26rpx);
|
|
|
|
.pb_140 {
|
|
padding-bottom: 140rpx !important;
|
|
}
|
|
|
|
.main3_box {
|
|
|
|
// border-radius: 18rpx;
|
|
position: relative;
|
|
|
|
.main3_box-header {
|
|
padding: 20rpx 26rpx;
|
|
font-size: 28rpx;
|
|
color: #4D4D4D;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.main3_box-main {
|
|
padding: 26rpx;
|
|
background-color: white;
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.main3_box-image {
|
|
width: 164rpx;
|
|
height: 164rpx;
|
|
}
|
|
|
|
.main3_box-right {
|
|
margin-left: 26rpx;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
width: calc(100% - 164rpx - 26rpx);
|
|
height: 164rpx;
|
|
}
|
|
}
|
|
|
|
.box-bottom {
|
|
width: 100%;
|
|
padding: 0 26rpx;
|
|
height: 112rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
background-color: #FFFFFF;
|
|
box-shadow: 0rpx -8rpx 8rpx 0rpx rgba(0, 0, 0, 0.05);
|
|
border-radius: 0 0 18rpx 18rpx;
|
|
justify-content: flex-end;
|
|
position: absolute;
|
|
left: 0;
|
|
bottom: 0;
|
|
|
|
>view {
|
|
padding: 10rpx 18rpx;
|
|
border-radius: 6rpx;
|
|
border: 2rpx solid #3E89FD;
|
|
font-size: 28rpx;
|
|
color: #3E89FD;
|
|
}
|
|
|
|
>view:not(:first-child) {
|
|
margin-left: 20rpx;
|
|
}
|
|
|
|
.btn-error {
|
|
border-color: #ED2B29;
|
|
color: #ED2B29;
|
|
}
|
|
|
|
.btn-start {
|
|
background-color: #3E89FD;
|
|
border-color: #3E89FD;
|
|
color: #FFFFFF;
|
|
}
|
|
}
|
|
|
|
.box-content_detail {
|
|
font-size: 28rpx;
|
|
color: #4D4D4D;
|
|
margin-top: 4rpx;
|
|
}
|
|
|
|
.webkit-clamp_2 {
|
|
display: -webkit-box;
|
|
-webkit-box-orient: vertical;
|
|
-webkit-line-clamp: 2;
|
|
/* 限制为两行 */
|
|
overflow: hidden;
|
|
}
|
|
|
|
.box-content {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-top: 26rpx;
|
|
font-size: 28rpx;
|
|
|
|
>view:first-child {
|
|
color: #808080;
|
|
}
|
|
|
|
>view:last-child {
|
|
font-size: 24rpx;
|
|
color: #4D8EEC;
|
|
}
|
|
}
|
|
|
|
.box-item {
|
|
display: flex;
|
|
align-items: center;
|
|
// margin-top: 26rpx;
|
|
font-size: 28rpx;
|
|
|
|
>view:first-child {
|
|
width: 120rpx;
|
|
margin-right: 26rpx;
|
|
color: #808080;
|
|
}
|
|
|
|
>view:last-child {
|
|
flex: 1;
|
|
color: #4D4D4D;
|
|
word-break: break-all;
|
|
// display: -webkit-box;
|
|
// -webkit-box-orient: vertical;
|
|
// -webkit-line-clamp: 1;
|
|
// /* 限制为两行 */
|
|
// overflow: hidden;
|
|
}
|
|
|
|
.color-error {
|
|
color: #FF0000 !important;
|
|
}
|
|
|
|
.color-49 {
|
|
color: #498CEC !important;
|
|
}
|
|
}
|
|
|
|
.box-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
|
|
>view:first-child {
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
>view:last-child {
|
|
font-weight: 800;
|
|
font-size: 30rpx;
|
|
color: #171717;
|
|
}
|
|
}
|
|
|
|
// >view:last-child {
|
|
// padding: 4rpx 20rpx;
|
|
// border-radius: 4rpx;
|
|
// border: 2rpx solid #F1F1F1;
|
|
// font-weight: 500;
|
|
// font-size: 22rpx;
|
|
// }
|
|
|
|
.wks_active {
|
|
background-color: #898989;
|
|
color: #1A1A1A;
|
|
}
|
|
|
|
.sgz_active {
|
|
background-color: #BED0FA;
|
|
color: #5181F6;
|
|
}
|
|
|
|
.ztz_active {
|
|
background-color: #C38100;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.ywg_acitve {
|
|
background-color: #88CF65;
|
|
color: #1A1A1A;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.box2 {
|
|
width: 84rpx;
|
|
height: 84rpx;
|
|
background: #5181F6;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: fixed;
|
|
right: 40rpx;
|
|
bottom: 162rpx;
|
|
|
|
/deep/ .uni-file-picker {
|
|
position: absolute;
|
|
height: 100%;
|
|
z-index: 99;
|
|
|
|
.uni-file-picker__container {
|
|
margin: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
|
|
.file-picker__box {
|
|
width: 100% !important;
|
|
height: 100% !important;
|
|
z-index: 99;
|
|
opacity: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
>image {
|
|
width: 36rpx;
|
|
height: 33rpx;
|
|
}
|
|
}
|
|
|
|
.confrim-bottom {
|
|
width: 100%;
|
|
padding: 26rpx 26rpx;
|
|
background-color: #FFFFFF;
|
|
box-shadow: 0rpx -8rpx 8rpx 0rpx rgba(0, 0, 0, 0.05);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
position: fixed;
|
|
bottom: 0;
|
|
z-index: 1;
|
|
|
|
.btn-primary {
|
|
width: 100%;
|
|
padding: 18rpx 26rpx;
|
|
font-weight: 500;
|
|
font-size: 28rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 6rpx;
|
|
background-color: #5181F6;
|
|
color: #FFFFFF;
|
|
}
|
|
}
|
|
}
|
|
|
|
.fixedheader {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
z-index: 999;
|
|
|
|
/deep/ .headerBox {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.headerName {
|
|
z-index: 1;
|
|
}
|
|
}
|
|
|
|
.search-box {
|
|
background-color: white;
|
|
width: 100%;
|
|
position: fixed;
|
|
z-index: 99;
|
|
|
|
.uni-form-item {
|
|
padding: 26rpx;
|
|
position: relative;
|
|
display: flex;
|
|
|
|
.uni-input {
|
|
border: 2rpx solid #E4E4E4;
|
|
border-radius: 68rpx;
|
|
padding: 0;
|
|
font-size: 30rpx;
|
|
color: #444444;
|
|
|
|
/deep/ .u-content {
|
|
background-color: #FFFFFF !important;
|
|
|
|
.u-input {
|
|
background-color: #FFFFFF !important;
|
|
color: #999999 !important;
|
|
}
|
|
}
|
|
}
|
|
|
|
.search-btn {
|
|
width: 72rpx;
|
|
height: 72rpx;
|
|
background: #498CEC;
|
|
border-radius: 48rpx;
|
|
margin-left: 30rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
>image {
|
|
width: 50rpx;
|
|
height: 50rpx;
|
|
}
|
|
}
|
|
}
|
|
|
|
/deep/ .u-dropdown {
|
|
padding-right: 60rpx;
|
|
}
|
|
|
|
.calendar_box {
|
|
position: absolute;
|
|
right: 28rpx;
|
|
bottom: 20rpx;
|
|
|
|
.calendar {
|
|
width: 32rpx;
|
|
height: 32rpx;
|
|
background-image: url('@/static/workTicketManage/calendar.png');
|
|
background-repeat: no-repeat;
|
|
background-size: 100% 100%;
|
|
}
|
|
|
|
.calendar_active {
|
|
background-image: url('@/static/workTicketManage/calendar-active.png');
|
|
}
|
|
}
|
|
}
|
|
|
|
.scroll-view {
|
|
margin: 10rpx 26rpx;
|
|
width: calc(100% - 26rpx - 26rpx);
|
|
max-height: 60vh;
|
|
border-radius: 6rpx;
|
|
}
|
|
|
|
/deep/ .u-dropdown__menu__item__text {
|
|
display: -webkit-box;
|
|
-webkit-box-orient: vertical;
|
|
-webkit-line-clamp: 1;
|
|
/* 限制为两行 */
|
|
overflow: hidden;
|
|
}
|
|
|
|
.cell-box {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
position: relative;
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
padding: 13px 16px;
|
|
font-size: 14px;
|
|
line-height: 27px;
|
|
color: #606266;
|
|
background-color: #fff;
|
|
text-align: left;
|
|
|
|
>view {
|
|
flex: 1;
|
|
margin-right: 20rpx;
|
|
display: -webkit-box;
|
|
-webkit-box-orient: vertical;
|
|
-webkit-line-clamp: 1;
|
|
/* 限制为两行 */
|
|
overflow: hidden;
|
|
}
|
|
|
|
.box-active {
|
|
color: rgb(49, 144, 243);
|
|
}
|
|
|
|
>image {
|
|
width: 32rpx;
|
|
height: 32rpx;
|
|
}
|
|
}
|
|
|
|
/deep/ .u-mask {
|
|
z-index: 10 !important;
|
|
}
|
|
|
|
/deep/ .u-dropdown__content {
|
|
// height: initial !important;
|
|
// top: 166rpx !important;
|
|
overflow: visible !important;
|
|
}
|
|
|
|
/deep/ .van-dropdown-item__content,
|
|
/deep/ .u-cell-item-box {
|
|
margin: 20rpx 26rpx;
|
|
width: calc(100% - 26rpx - 26rpx);
|
|
border-radius: 6rpx;
|
|
}
|
|
|
|
/deep/ .u-cell-item-box {
|
|
// max-height: 60vh;
|
|
// overflow-y: scroll;
|
|
}
|
|
|
|
/deep/ .uicon-arrow-down {
|
|
// position: absolute;
|
|
// top: 50%;
|
|
// right: -4px;
|
|
margin-top: -5px;
|
|
border: 3px solid;
|
|
border-color: transparent transparent #dcdee0 #dcdee0;
|
|
-webkit-transform: rotate(-45deg);
|
|
transform: rotate(-45deg);
|
|
opacity: .8;
|
|
content: '';
|
|
}
|
|
|
|
/deep/ .u-dropdown__menu__item__arrow--rotate .uicon-arrow-down {
|
|
border-color: transparent transparent rgb(49, 144, 243) rgb(49, 144, 243);
|
|
}
|
|
|
|
/deep/ .uicon-arrow-down::before {
|
|
display: none;
|
|
}
|
|
|
|
/deep/ .u-dropdown__menu {
|
|
flex-wrap: wrap;
|
|
// height: 166rpx !important;
|
|
box-shadow: none;
|
|
|
|
.u-dropdown__menu__item {
|
|
width: 33%;
|
|
// height: 82rpx;
|
|
flex: initial;
|
|
}
|
|
}
|
|
|
|
.new-nodata {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
>view {
|
|
width: 300rpx;
|
|
height: 300rpx;
|
|
background-image: url('@/static/staffAttendance/nodata.png');
|
|
background-repeat: no-repeat;
|
|
background-size: 100% 100%;
|
|
}
|
|
|
|
>text {
|
|
font-size: 22rpx;
|
|
color: #808080;
|
|
margin-top: 60rpx;
|
|
}
|
|
}
|
|
|
|
.new-nodata_height {
|
|
min-height: 500rpx;
|
|
position: relative;
|
|
}
|
|
|
|
.new-nodata {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
>view {
|
|
width: 300rpx;
|
|
height: 300rpx;
|
|
background-image: url('@/static/staffAttendance/nodata.png');
|
|
background-repeat: no-repeat;
|
|
background-size: 100% 100%;
|
|
}
|
|
|
|
>text {
|
|
font-size: 22rpx;
|
|
color: #808080;
|
|
margin-top: 60rpx;
|
|
}
|
|
}
|
|
</style> |