修复网上办事

This commit is contained in:
aixianling
2022-03-03 16:44:55 +08:00
parent 9e091b2fee
commit cafe80e2da
3 changed files with 97 additions and 160 deletions

View File

@@ -1,5 +1,6 @@
<template> <template>
<div class="servie"> <div class="servie">
<div v-if="list.length>0">
<div class="serviceItem" v-for="(op,i) in list" :key="i" @click="toServiceList(op)" hover-class="bg-hover"> <div class="serviceItem" v-for="(op,i) in list" :key="i" @click="toServiceList(op)" hover-class="bg-hover">
<img :src="op.icon"/> <img :src="op.icon"/>
<div class="fill flex1"> <div class="fill flex1">
@@ -10,9 +11,12 @@
<i class="iconfont">&#xe697;</i> <i class="iconfont">&#xe697;</i>
</div> </div>
</div> </div>
<AiEmpty v-else/>
</div>
</template> </template>
<script> <script>
export default { export default {
name: "AppServiceOnline", name: "AppServiceOnline",
appName: "网上办事", appName: "网上办事",
@@ -21,26 +25,20 @@
list: [] list: []
} }
}, },
onLoad() { onLoad() {
this.getList() this.getList()
}, },
methods: { methods: {
toServiceList(item) { toServiceList(item) {
this.$linkTo(`./serviceList?id=${item.id}&title=${item.name}&subTitle=${item.desc}`) this.$linkTo(`./serviceList?id=${item.id}&title=${item.name}&subTitle=${item.desc}`)
}, },
getList() { getList() {
let size = 999
this.$instance.post("/app/zwspapprovalclassification/list-xcx", null, { this.$instance.post("/app/zwspapprovalclassification/list-xcx", null, {
params: { params: {size: 999},
size
},
withoutToken: true withoutToken: true
}).then(res => { }).then(res => {
if (res.code === 0) { if (res?.data) {
this.list = res.data.records this.list = res.data.records || []
} }
}) })
} }

View File

@@ -28,11 +28,7 @@
<i :style="{opacity: item.mustFill === '1' ? 1 : 0}">*</i> <i :style="{opacity: item.mustFill === '1' ? 1 : 0}">*</i>
<h2>请上传{{ item.annexName }}</h2> <h2>请上传{{ item.annexName }}</h2>
</div> </div>
<div class="upload-item__wrapper" @click="upload(index)"> <AiUploader :def="[{url:item.src}]" preview @list="imgs=>handleImage(item,imgs)" :limit="1"/>
<image v-if="item.src" mode="aspectFill" :src="item.src"/>
<i v-if="!item.src" class="iconfont">&#xe72c;</i>
<h2 v-if="!item.src">上传照片</h2>
</div>
</div> </div>
</div> </div>
<div class="service-example" v-if="exampleList.length"> <div class="service-example" v-if="exampleList.length">
@@ -169,7 +165,7 @@
<script> <script>
import {mapState} from 'vuex' import {mapState} from 'vuex'
import Handwriting from '@/utils/signature.js' import Handwriting from 'dvcp-wui/utils/signature'
export default { export default {
name: "serviceForm", name: "serviceForm",
@@ -389,40 +385,10 @@ export default {
/** /**
* 图片上传 * 图片上传
*/ */
upload(index) { handleImage(item, imgs) {
uni.chooseImage({ item.src = imgs?.[0]?.url
count: 1, item.annexFileId = imgs?.[0]?.id
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
success: res => {
const path = res.tempFilePaths[0]
this.$loading()
uni.uploadFile({
url: this.$instance.baseURL + '/admin/file/add',
filePath: path,
name: 'file',
header: {
'Content-Type': 'multipart/form-data',
Authorization: uni.getStorageSync('token')
}, },
success: res => {
const data = JSON.parse(res.data)
if (data.code === 0) {
this.$set(this.info.processAnnexDefs[index], 'src', data.data[0].split(';')[0])
this.$set(this.info.processAnnexDefs[index], 'annexFileId', data.data[0].split(';')[1])
} else {
this.$toast(data.msg)
}
},
complete: () => {
this.$hideLoading()
}
})
}
})
},
next() { next() {
if (this.currIndex === 2) { if (this.currIndex === 2) {
for (let item of this.info.processAnnexDefs) { for (let item of this.info.processAnnexDefs) {
@@ -603,6 +569,7 @@ export default {
position: relative; position: relative;
align-items: center; align-items: center;
left: -16px; left: -16px;
margin-bottom: 16px;
i { i {
font-size: 32px; font-size: 32px;
@@ -765,34 +732,6 @@ export default {
color: #333333; color: #333333;
font-size: 30px; font-size: 30px;
} }
.upload-item__wrapper {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
width: 310px;
height: 180px;
margin-top: 48px;
border-radius: 8px;
border: 2px dashed #AAA8A8;
image {
width: 100%;
height: 100%;
}
i {
margin-bottom: 8px;
color: #E4E4E4;
font-size: 68px;
}
h2 {
color: #666666;
font-size: 28px;
}
}
} }
} }

View File

@@ -2,7 +2,7 @@
<div class="service-notice" v-if="pageShow"> <div class="service-notice" v-if="pageShow">
<h2>办理须知</h2> <h2>办理须知</h2>
<div class="service-content"> <div class="service-content">
<u-parse :imageProp="imageProp" className="articalContent" :content="content" /> <u-parse :imageProp="imageProp" className="articalContent" :html="content"/>
<!-- <div v-html="content" class="articalContent"></div> --> <!-- <div v-html="content" class="articalContent"></div> -->
<!-- <u-parse className="articalContent" :html="content"></u-parse> --> <!-- <u-parse className="articalContent" :html="content"></u-parse> -->
</div> </div>