重点排查附件处理

main
limingtao 11 months ago
parent 94aabf89f4
commit d3ea1684ab
  1. 95
      pages/investigation/components/investigation-item.vue
  2. 76
      pages/investigation/components/investigation-item2.vue
  3. 11
      pages/investigation/task.vue

@ -1,13 +1,10 @@
<template>
<view>
<view class="investigation-item"
:class="investigationSelect === index ? 'active' : ''"
v-for="(item, index) in investigationList"
:key="item.name"
@click="handleSelect(item, index)"
>
<view class="investigation-item" :class="investigationSelect === index ? 'active' : ''"
v-for="(item, index) in investigationList" :key="item.name" @click="handleSelect(item, index)">
<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>
<u-popup :show="showInvestigationDetail" @close="showInvestigationDetail = false">
<view class="custom-pop-head">
@ -16,57 +13,35 @@
<view class="right" @click="investigationDetailHandle">确认</view>
</view>
<view class="box" style="max-height: 800rpx;overflow-y: auto">
<view class="investigation-item"
v-for="(item, index) in investigationDetailList"
:key="index"
style="width: 96%; padding: 0"
>
<view class="investigation-item" v-for="(item, index) in investigationDetailList" :key="index"
style="width: 96%; padding: 0">
<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">
<u-input
placeholder="请输入"
border="none"
v-model="item.standar"
inputAlign="right"
type="number"
>
<u-text
:text="item.unit"
slot="suffix"
margin="0 3px 0 0"
type="tips"
></u-text>
<uni-forms-item :label="item.name" label-width="300px"
style="display: flex;align-items: center">
<u-input placeholder="请输入" border="none" v-model="item.standar" inputAlign="right"
type="number">
<u-text :text="item.unit" slot="suffix" margin="0 3px 0 0" type="tips"></u-text>
</u-input>
</uni-forms-item>
</view>
<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">
<u-input
placeholder="请输入"
border="none"
v-model="item.standar"
inputAlign="right"
/>
<uni-forms-item :label="item.name" label-width="300px"
style="display: flex;align-items: center">
<u-input placeholder="请输入" border="none" v-model="item.standar" inputAlign="right" />
</uni-forms-item>
</view>
<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">
<u-checkbox
v-model="item.standar"
:customStyle="{justifyContent: 'space-between'}"
:name="'sdfs'"
/>
<uni-forms-item :label="item.name" label-width="300px"
style="display: flex;align-items: center">
<u-checkbox v-model="item.standar" :customStyle="{justifyContent: 'space-between'}"
:name="'sdfs'" />
</uni-forms-item>
</view>
<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" />
<u-upload
:fileList="item.fileList"
@afterRead="(e) => afterRead(e, item)"
@delete="(e) => deletePic(e, item)"
name="1"
:maxCount="1"
></u-upload>
<uni-forms-item :label="item.name" label-position="top" label-width="300px"
style="display: flex;align-items: center" />
<u-upload :fileList="item.fileList" @afterRead="(e) => afterRead(e, item)"
@delete="(e) => deletePic(e, item)" name="1" :maxCount="1"></u-upload>
</view>
</view>
</view>
@ -107,8 +82,7 @@ export default {
}
},
//
onShow() {
},
onShow() {},
//
computed: {},
//
@ -131,6 +105,10 @@ export default {
async afterRead(event, item) {
// multiple true , file
const id = this.uuid()
if (!item.fileList) {
item.fileList = []
}
this.$forceUpdate()
item.fileList.push({
id,
...event.file,
@ -175,7 +153,9 @@ export default {
})
},
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) {
console.log(res.result)
this.investigationDetailList = res.result.map(item => {
@ -214,8 +194,7 @@ export default {
this.$emit('select', this.investigationList[this.investigationSelect], this.investigationDetailList)
}
},
onReady() {
},
onReady() {},
//
onUnload() {
@ -228,8 +207,7 @@ export default {
}, 1500);
},
//
onReachBottom() {
},
onReachBottom() {},
}
</script>
@ -249,28 +227,34 @@ page {
justify-content: space-between;
align-items: center;
overflow: hidden;
&.active {
background: #DFEBF8;
}
}
.detail-item {
width: 100%;
background: #F0F3F7;
padding: 20rpx 30rpx;
border-radius: 8rpx;
box-sizing: border-box;
/deep/ .uni-forms-item__content {
justify-content: flex-end;
text-align: right;
display: flex;
}
/deep/ .uni-forms-item {
margin-bottom: 0;
}
/deep/ .uni-forms-item__label {
font-size: 16px;
}
}
.custom-pop-head {
width: 100%;
padding: 20rpx;
@ -280,12 +264,15 @@ page {
justify-content: space-between;
border-bottom: 1px solid #E6E6E6;
margin-bottom: 20rpx;
.left {
color: #666666;
}
.title {
font-size: 16px;
}
.right {
color: #2663BF;
}

@ -7,57 +7,32 @@
<view class="right" @click="investigationDetailHandle">确认</view>
</view>
<view class="box" style="max-height: 800rpx;overflow-y: auto">
<view class="investigation-item"
v-for="(item, index) in investigationDetailList"
:key="index"
style="width: 96%; padding: 0"
>
<view class="investigation-item" v-for="(item, index) in investigationDetailList" :key="index"
style="width: 96%; padding: 0">
<view class="detail-item" v-if="item.type === 'number' || item.type === '1'">
<uni-forms-item :label="item.name" label-width="500rpx" style="display: flex;align-items: center">
<u-input
placeholder="请输入"
border="none"
v-model="item.standar"
inputAlign="right"
type="number"
>
<u-text
:text="item.unit"
slot="suffix"
margin="0 3px 0 0"
type="tips"
></u-text>
<u-input placeholder="请输入" border="none" v-model="item.standar" inputAlign="right"
type="number">
<u-text :text="item.unit" slot="suffix" margin="0 3px 0 0" type="tips"></u-text>
</u-input>
</uni-forms-item>
</view>
<view class="detail-item" v-else-if="item.type === 'text' || item.type === '2'">
<uni-forms-item :label="item.name" label-width="500rpx" style="display: flex;align-items: center">
<u-input
placeholder="请输入"
border="none"
v-model="item.standar"
inputAlign="right"
/>
<u-input placeholder="请输入" border="none" v-model="item.standar" inputAlign="right" />
</uni-forms-item>
</view>
<view class="detail-item" v-else-if="item.type === 'check' || item.type === '3'">
<uni-forms-item :label="item.name" label-width="500rpx" style="display: flex;align-items: center">
<u-checkbox
v-model="item.standar"
:customStyle="{justifyContent: 'space-between'}"
:name="'sdfs'"
/>
<u-checkbox v-model="item.standar" :customStyle="{justifyContent: 'space-between'}"
:name="'sdfs'" />
</uni-forms-item>
</view>
<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" />
<u-upload
:fileList="item.fileList"
@afterRead="(e) => afterRead(e, item)"
@delete="(e) => deletePic(e, item)"
name="1"
:maxCount="1"
></u-upload>
<uni-forms-item :label="item.name" label-position="top" label-width="300px"
style="display: flex;align-items: center" />
<u-upload :fileList="item.fileList" @afterRead="(e) => afterRead(e, item)"
@delete="(e) => deletePic(e, item)" name="1" :maxCount="1"></u-upload>
</view>
</view>
</view>
@ -97,6 +72,9 @@
mounted() {
if (this.json.name) {
this.investigationDetailList = this.json.extraConfigs.map(item => {
if (!item.fileList) {
item.fileList = []
}
switch (item.type) {
// case "1":
// item.standar = 0
@ -132,8 +110,7 @@
}
},
//
onShow() {
},
onShow() {},
//
computed: {},
//
@ -154,6 +131,7 @@
},
//
async afterRead(event, item) {
// multiple true , file
const id = this.uuid()
item.fileList.push({
@ -193,7 +171,9 @@
})
},
getData() {
this.$request.globalRequest('/hiddenDanger/highDanger/getImportDangerInfo', {sid: this.$props.sid}, 'GET').then(res => {
this.$request.globalRequest('/hiddenDanger/highDanger/getImportDangerInfo', {
sid: this.$props.sid
}, 'GET').then(res => {
if (res.code == 200) {
this.investigationDetailList = res.result.map(item => {
switch (item.type) {
@ -234,8 +214,7 @@
this.$emit('select', this.json)
}
},
onReady() {
},
onReady() {},
//
onUnload() {
@ -248,8 +227,7 @@
}, 1500);
},
//
onReachBottom() {
},
onReachBottom() {},
}
</script>
@ -269,28 +247,34 @@
justify-content: space-between;
align-items: center;
overflow: hidden;
&.active {
background: #DFEBF8;
}
}
.detail-item {
width: 100%;
background: #F0F3F7;
padding: 20rpx 30rpx;
border-radius: 8rpx;
box-sizing: border-box;
/deep/ .uni-forms-item__content {
justify-content: flex-end;
text-align: right;
display: flex;
}
/deep/ .uni-forms-item {
margin-bottom: 0;
}
/deep/ .uni-forms-item__label {
font-size: 16px;
}
}
.custom-pop-head {
width: 100%;
padding: 20rpx;
@ -300,15 +284,17 @@
justify-content: space-between;
border-bottom: 1px solid #E6E6E6;
margin-bottom: 20rpx;
.left {
color: #666666;
}
.title {
font-size: 16px;
}
.right {
color: #2663BF;
}
}
</style>

@ -703,6 +703,7 @@ export default {
},
methods: {
showInvestigationTag(v) {
console.log(v)
this.showInvestigation2 = true;
this.showInvestigation2Item = v;
},
@ -1086,11 +1087,11 @@ export default {
console.log(res);
if (res.code === 200) {
this.$.toast("保存成功");
// setTimeout(() => {
// uni.navigateBack({
// delta: 1, // 1
// });
// }, 1000);
setTimeout(() => {
uni.navigateBack({
delta: 1, // 1
});
}, 1000);
// this.data = res.result;
// this.rname = this.data[0].name;

Loading…
Cancel
Save