修复网上办事

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,99 +1,97 @@
<template>
<div class="servie">
<div class="serviceItem" v-for="(op,i) in list" :key="i" @click="toServiceList(op)" hover-class="bg-hover">
<img :src="op.icon"/>
<div class="fill flex1">
<div>{{ op.name }}</div>
<u-gap height="6"/>
<span>{{ op.desc }}</span>
<div v-if="list.length>0">
<div class="serviceItem" v-for="(op,i) in list" :key="i" @click="toServiceList(op)" hover-class="bg-hover">
<img :src="op.icon"/>
<div class="fill flex1">
<div>{{ op.name }}</div>
<u-gap height="6"/>
<span>{{ op.desc }}</span>
</div>
<i class="iconfont">&#xe697;</i>
</div>
<i class="iconfont">&#xe697;</i>
</div>
<AiEmpty v-else/>
</div>
</template>
<script>
export default {
name:"AppServiceOnline",
appName:"网上办事",
data () {
return {
list: []
}
export default {
name: "AppServiceOnline",
appName: "网上办事",
data() {
return {
list: []
}
},
onLoad() {
this.getList()
},
methods: {
toServiceList(item) {
this.$linkTo(`./serviceList?id=${item.id}&title=${item.name}&subTitle=${item.desc}`)
},
onLoad () {
this.getList()
},
methods: {
toServiceList(item) {
this.$linkTo(`./serviceList?id=${item.id}&title=${item.name}&subTitle=${item.desc}`)
},
getList() {
let size = 999
this.$instance.post("/app/zwspapprovalclassification/list-xcx", null, {
params: {
size
},
withoutToken: true
}).then(res => {
if (res.code === 0) {
this.list = res.data.records
}
})
}
getList() {
this.$instance.post("/app/zwspapprovalclassification/list-xcx", null, {
params: {size: 999},
withoutToken: true
}).then(res => {
if (res?.data) {
this.list = res.data.records || []
}
})
}
}
}
</script>
<style lang="scss" scoped>
.servie {
min-height: 100vh;
background: #fff;
.servie {
min-height: 100vh;
background: #fff;
}
.serviceItem {
width: 100%;
height: 160px;
padding: 28px 40px 28px;
display: flex;
align-items: center;
box-sizing: border-box;
img {
width: 80px;
height: 80px;
}
.serviceItem {
width: 100%;
height: 160px;
padding: 28px 40px 28px;
.fill {
display: flex;
align-items: center;
box-sizing: border-box;
flex-direction: column;
font-size: 30px;
font-weight: 600;
color: #3C435C;
margin: 0 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
img {
width: 80px;
height: 80px;
}
.fill {
display: flex;
flex-direction: column;
font-size: 30px;
font-weight: 600;
color: #3C435C;
margin: 0 16px;
span {
display: block;
width: 100%;
margin-right: 20px;
font-size: 28px;
font-weight: 500;
color: #BEC1D0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
span {
display: block;
width: 100%;
margin-right: 20px;
font-size: 28px;
font-weight: 500;
color: #BEC1D0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
i {
font-size: 44px;
color: #979797;
}
}
i {
font-size: 44px;
color: #979797;
}
}
</style>

View File

@@ -28,11 +28,7 @@
<i :style="{opacity: item.mustFill === '1' ? 1 : 0}">*</i>
<h2>请上传{{ item.annexName }}</h2>
</div>
<div class="upload-item__wrapper" @click="upload(index)">
<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>
<AiUploader :def="[{url:item.src}]" preview @list="imgs=>handleImage(item,imgs)" :limit="1"/>
</div>
</div>
<div class="service-example" v-if="exampleList.length">
@@ -169,10 +165,10 @@
<script>
import {mapState} from 'vuex'
import Handwriting from '@/utils/signature.js'
import Handwriting from 'dvcp-wui/utils/signature'
export default {
name:"serviceForm",
name: "serviceForm",
data() {
return {
pageShow: false,
@@ -389,40 +385,10 @@ export default {
/**
* 图片上传
*/
upload(index) {
uni.chooseImage({
count: 1,
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()
}
})
}
})
handleImage(item, imgs) {
item.src = imgs?.[0]?.url
item.annexFileId = imgs?.[0]?.id
},
next() {
if (this.currIndex === 2) {
for (let item of this.info.processAnnexDefs) {
@@ -603,6 +569,7 @@ export default {
position: relative;
align-items: center;
left: -16px;
margin-bottom: 16px;
i {
font-size: 32px;
@@ -765,34 +732,6 @@ export default {
color: #333333;
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">
<h2>办理须知</h2>
<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> -->
<!-- <u-parse className="articalContent" :html="content"></u-parse> -->
</div>
@@ -12,7 +12,7 @@
</template>
<script>
import { mapState } from 'vuex'
import {mapState} from 'vuex'
export default {
data() {
@@ -42,21 +42,21 @@ export default {
getInfo(id) {
this.$loading()
this.$instance
.post(`/app/approval-process-def/info-id?id=${id}`, null, {
withoutToken: true,
})
.then((res) => {
if (res.code === 0) {
this.title = res.data.processName
this.content = res.data.needToKnow
this.processType = res.data.processType
uni.setNavigationBarTitle({
title: res.data.processName,
})
this.pageShow = true
this.$hideLoading()
}
})
.post(`/app/approval-process-def/info-id?id=${id}`, null, {
withoutToken: true,
})
.then((res) => {
if (res.code === 0) {
this.title = res.data.processName
this.content = res.data.needToKnow
this.processType = res.data.processType
uni.setNavigationBarTitle({
title: res.data.processName,
})
this.pageShow = true
this.$hideLoading()
}
})
},
handleGoto(url, type) {