|
|
@ -1,13 +1,10 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<view> |
|
|
|
<view> |
|
|
|
<view class="investigation-item" |
|
|
|
<view class="investigation-item" :class="investigationSelect === index ? 'active' : ''" |
|
|
|
:class="investigationSelect === index ? 'active' : ''" |
|
|
|
v-for="(item, index) in investigationList" :key="item.name" @click="handleSelect(item, index)"> |
|
|
|
v-for="(item, index) in investigationList" |
|
|
|
|
|
|
|
:key="item.name" |
|
|
|
|
|
|
|
@click="handleSelect(item, index)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<text>{{ item.name }}</text> |
|
|
|
<text>{{ item.name }}</text> |
|
|
|
<uni-icons type="checkmarkempty" size="24" :style="{color: '#2663BF', visibility: investigationSelect === index ? 'visible' : 'hidden'}"/> |
|
|
|
<uni-icons type="checkmarkempty" size="24" |
|
|
|
|
|
|
|
:style="{color: '#2663BF', visibility: investigationSelect === index ? 'visible' : 'hidden'}" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<u-popup :show="showInvestigationDetail" @close="showInvestigationDetail = false"> |
|
|
|
<u-popup :show="showInvestigationDetail" @close="showInvestigationDetail = false"> |
|
|
|
<view class="custom-pop-head"> |
|
|
|
<view class="custom-pop-head"> |
|
|
@ -16,57 +13,35 @@ |
|
|
|
<view class="right" @click="investigationDetailHandle">确认</view> |
|
|
|
<view class="right" @click="investigationDetailHandle">确认</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="box" style="max-height: 800rpx;overflow-y: auto"> |
|
|
|
<view class="box" style="max-height: 800rpx;overflow-y: auto"> |
|
|
|
<view class="investigation-item" |
|
|
|
<view class="investigation-item" v-for="(item, index) in investigationDetailList" :key="index" |
|
|
|
v-for="(item, index) in investigationDetailList" |
|
|
|
style="width: 96%; padding: 0"> |
|
|
|
:key="index" |
|
|
|
|
|
|
|
style="width: 96%; padding: 0" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<view class="detail-item" v-if="item.type === 'number' || item.type === '1'"> |
|
|
|
<view class="detail-item" v-if="item.type === 'number' || item.type === '1'"> |
|
|
|
<uni-forms-item :label="item.name" label-width="300px" style="display: flex;align-items: center"> |
|
|
|
<uni-forms-item :label="item.name" label-width="300px" |
|
|
|
<u-input |
|
|
|
style="display: flex;align-items: center"> |
|
|
|
placeholder="请输入" |
|
|
|
<u-input placeholder="请输入" border="none" v-model="item.standar" inputAlign="right" |
|
|
|
border="none" |
|
|
|
type="number"> |
|
|
|
v-model="item.standar" |
|
|
|
<u-text :text="item.unit" slot="suffix" margin="0 3px 0 0" type="tips"></u-text> |
|
|
|
inputAlign="right" |
|
|
|
|
|
|
|
type="number" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<u-text |
|
|
|
|
|
|
|
:text="item.unit" |
|
|
|
|
|
|
|
slot="suffix" |
|
|
|
|
|
|
|
margin="0 3px 0 0" |
|
|
|
|
|
|
|
type="tips" |
|
|
|
|
|
|
|
></u-text> |
|
|
|
|
|
|
|
</u-input> |
|
|
|
</u-input> |
|
|
|
</uni-forms-item> |
|
|
|
</uni-forms-item> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="detail-item" v-else-if="item.type === 'text' || item.type === '2'"> |
|
|
|
<view class="detail-item" v-else-if="item.type === 'text' || item.type === '2'"> |
|
|
|
<uni-forms-item :label="item.name" label-width="300px" style="display: flex;align-items: center"> |
|
|
|
<uni-forms-item :label="item.name" label-width="300px" |
|
|
|
<u-input |
|
|
|
style="display: flex;align-items: center"> |
|
|
|
placeholder="请输入" |
|
|
|
<u-input placeholder="请输入" border="none" v-model="item.standar" inputAlign="right" /> |
|
|
|
border="none" |
|
|
|
|
|
|
|
v-model="item.standar" |
|
|
|
|
|
|
|
inputAlign="right" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</uni-forms-item> |
|
|
|
</uni-forms-item> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="detail-item" v-else-if="item.type === 'check' || item.type === '3'"> |
|
|
|
<view class="detail-item" v-else-if="item.type === 'check' || item.type === '3'"> |
|
|
|
<uni-forms-item :label="item.name" label-width="300px" style="display: flex;align-items: center"> |
|
|
|
<uni-forms-item :label="item.name" label-width="300px" |
|
|
|
<u-checkbox |
|
|
|
style="display: flex;align-items: center"> |
|
|
|
v-model="item.standar" |
|
|
|
<u-checkbox v-model="item.standar" :customStyle="{justifyContent: 'space-between'}" |
|
|
|
:customStyle="{justifyContent: 'space-between'}" |
|
|
|
:name="'sdfs'" /> |
|
|
|
:name="'sdfs'" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</uni-forms-item> |
|
|
|
</uni-forms-item> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="detail-item" v-else-if="item.type === 'upload' || item.type === '4'"> |
|
|
|
<view class="detail-item" v-else-if="item.type === 'upload' || item.type === '4'"> |
|
|
|
<uni-forms-item :label="item.name" label-position="top" label-width="300px" style="display: flex;align-items: center" /> |
|
|
|
<uni-forms-item :label="item.name" label-position="top" label-width="300px" |
|
|
|
<u-upload |
|
|
|
style="display: flex;align-items: center" /> |
|
|
|
:fileList="item.fileList" |
|
|
|
<u-upload :fileList="item.fileList" @afterRead="(e) => afterRead(e, item)" |
|
|
|
@afterRead="(e) => afterRead(e, item)" |
|
|
|
@delete="(e) => deletePic(e, item)" name="1" :maxCount="1"></u-upload> |
|
|
|
@delete="(e) => deletePic(e, item)" |
|
|
|
|
|
|
|
name="1" |
|
|
|
|
|
|
|
:maxCount="1" |
|
|
|
|
|
|
|
></u-upload> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -107,8 +82,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 页面显示 |
|
|
|
// 页面显示 |
|
|
|
onShow() { |
|
|
|
onShow() {}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 计算属性 |
|
|
|
// 计算属性 |
|
|
|
computed: {}, |
|
|
|
computed: {}, |
|
|
|
// 方法 |
|
|
|
// 方法 |
|
|
@ -131,6 +105,10 @@ export default { |
|
|
|
async afterRead(event, item) { |
|
|
|
async afterRead(event, item) { |
|
|
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式 |
|
|
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式 |
|
|
|
const id = this.uuid() |
|
|
|
const id = this.uuid() |
|
|
|
|
|
|
|
if (!item.fileList) { |
|
|
|
|
|
|
|
item.fileList = [] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.$forceUpdate() |
|
|
|
item.fileList.push({ |
|
|
|
item.fileList.push({ |
|
|
|
id, |
|
|
|
id, |
|
|
|
...event.file, |
|
|
|
...event.file, |
|
|
@ -175,7 +153,9 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
getData2(sid) { |
|
|
|
getData2(sid) { |
|
|
|
this.$request.globalRequest('/hiddenDanger/highDanger/getImportDangerInfo', {sid}, 'GET').then(res => { |
|
|
|
this.$request.globalRequest('/hiddenDanger/highDanger/getImportDangerInfo', { |
|
|
|
|
|
|
|
sid |
|
|
|
|
|
|
|
}, 'GET').then(res => { |
|
|
|
if (res.code == 200) { |
|
|
|
if (res.code == 200) { |
|
|
|
console.log(res.result) |
|
|
|
console.log(res.result) |
|
|
|
this.investigationDetailList = res.result.map(item => { |
|
|
|
this.investigationDetailList = res.result.map(item => { |
|
|
@ -214,8 +194,7 @@ export default { |
|
|
|
this.$emit('select', this.investigationList[this.investigationSelect], this.investigationDetailList) |
|
|
|
this.$emit('select', this.investigationList[this.investigationSelect], this.investigationDetailList) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onReady() { |
|
|
|
onReady() {}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 页面卸载 |
|
|
|
// 页面卸载 |
|
|
|
onUnload() { |
|
|
|
onUnload() { |
|
|
|
|
|
|
|
|
|
|
@ -228,8 +207,7 @@ export default { |
|
|
|
}, 1500); |
|
|
|
}, 1500); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 页面上拉触底事件的处理函数 |
|
|
|
// 页面上拉触底事件的处理函数 |
|
|
|
onReachBottom() { |
|
|
|
onReachBottom() {}, |
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
@ -249,28 +227,34 @@ page { |
|
|
|
justify-content: space-between; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
align-items: center; |
|
|
|
overflow: hidden; |
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
|
|
|
|
&.active { |
|
|
|
&.active { |
|
|
|
background: #DFEBF8; |
|
|
|
background: #DFEBF8; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.detail-item { |
|
|
|
.detail-item { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
background: #F0F3F7; |
|
|
|
background: #F0F3F7; |
|
|
|
padding: 20rpx 30rpx; |
|
|
|
padding: 20rpx 30rpx; |
|
|
|
border-radius: 8rpx; |
|
|
|
border-radius: 8rpx; |
|
|
|
box-sizing: border-box; |
|
|
|
box-sizing: border-box; |
|
|
|
|
|
|
|
|
|
|
|
/deep/ .uni-forms-item__content { |
|
|
|
/deep/ .uni-forms-item__content { |
|
|
|
justify-content: flex-end; |
|
|
|
justify-content: flex-end; |
|
|
|
text-align: right; |
|
|
|
text-align: right; |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/deep/ .uni-forms-item { |
|
|
|
/deep/ .uni-forms-item { |
|
|
|
margin-bottom: 0; |
|
|
|
margin-bottom: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/deep/ .uni-forms-item__label { |
|
|
|
/deep/ .uni-forms-item__label { |
|
|
|
font-size: 16px; |
|
|
|
font-size: 16px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.custom-pop-head { |
|
|
|
.custom-pop-head { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
padding: 20rpx; |
|
|
|
padding: 20rpx; |
|
|
@ -280,12 +264,15 @@ page { |
|
|
|
justify-content: space-between; |
|
|
|
justify-content: space-between; |
|
|
|
border-bottom: 1px solid #E6E6E6; |
|
|
|
border-bottom: 1px solid #E6E6E6; |
|
|
|
margin-bottom: 20rpx; |
|
|
|
margin-bottom: 20rpx; |
|
|
|
|
|
|
|
|
|
|
|
.left { |
|
|
|
.left { |
|
|
|
color: #666666; |
|
|
|
color: #666666; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.title { |
|
|
|
.title { |
|
|
|
font-size: 16px; |
|
|
|
font-size: 16px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.right { |
|
|
|
.right { |
|
|
|
color: #2663BF; |
|
|
|
color: #2663BF; |
|
|
|
} |
|
|
|
} |
|
|
|