调整错误

This commit is contained in:
aixianling
2021-11-23 17:19:02 +08:00
parent f63ace3b70
commit 82171fa489

View File

@@ -1,12 +1,13 @@
<template> <template>
<div class="add-form"> <div class="add-form">
<div class="header-pic"> <div class="header-pic">
<image v-if="form.headPicture" :src="form.headPicture" /> <image v-if="form.headPicture" :src="form.headPicture"/>
</div> </div>
<div class="form-info"> <div class="form-info">
<div class="form-info__wrapper"> <div class="form-info__wrapper">
<textarea class="title" :auto-height="true" disabled placeholder="请输入标题 (必填)" v-model="form.title"></textarea> <textarea class="title" :auto-height="true" disabled placeholder="请输入标题 (必填)" v-model="form.title"></textarea>
<u-input class="content" disabled :clearable="false" type="textarea" v-model="form.tableExplain" placeholder="请输入表单描述 (选填)" :height="80" :auto-height="true" :maxlength="255"></u-input> <u-input class="content" disabled :clearable="false" type="textarea" v-model="form.tableExplain"
placeholder="请输入表单描述 (选填)" :height="80" :auto-height="true" :maxlength="255"></u-input>
</div> </div>
</div> </div>
<div class="components-list"> <div class="components-list">
@@ -38,12 +39,12 @@
<template v-if="(item.type === 'select')"> <template v-if="(item.type === 'select')">
<div class="components-item__select"> <div class="components-item__select">
<span>{{ item.placeholder }}</span> <span>{{ item.placeholder }}</span>
<u-icon name="arrow-down" color="#DEDFDF" /> <u-icon name="arrow-down" color="#DEDFDF"/>
</div> </div>
</template> </template>
<template v-if="(item.type === 'upload')"> <template v-if="(item.type === 'upload')">
<div class="components-item__select components-item__textarea components-item__upload"> <div class="components-item__select components-item__textarea components-item__upload">
<image :src="`${$cdn}askform/upload.png`" /> <image :src="`${$cdn}askform/upload.png`"/>
<span>选择图片2M以内</span> <span>选择图片2M以内</span>
</div> </div>
</template> </template>
@@ -60,401 +61,399 @@
</div> </div>
</div> </div>
</div> </div>
<AiBack custom @back="$emit('back')"></AiBack> <AiBack custom @back="$emit('back')"/>
</div> </div>
</template> </template>
<script> <script>
import AiBack from "@/components/AiBack"; import AiBack from "../../../components/AiBack";
export default {
props: ['formData', 'targetListData'],
data () { export default {
return { components: {AiBack},
form: { props: ['formData', 'targetListData'],
tableExplain: '详细描述', data() {
title: '问卷调查', return {
isShowheadPicture: true, form: {
isShowTableExplain: true, tableExplain: '详细描述',
isShowBtn: true, title: '问卷调查',
headPicture: '', isShowheadPicture: true,
commitType: '1', isShowTableExplain: true,
periodValidityType: '0', isShowBtn: true,
actionNotice: '1', headPicture: '',
dynamicNotice: '1', commitType: '1',
periodValidityEndTime: '', periodValidityType: '0',
shareStatus: '0', actionNotice: '1',
count: 0, dynamicNotice: '1',
wechatId: '0', periodValidityEndTime: '',
type: 0, shareStatus: '0',
buttonExplain: '提交', count: 0,
tips: true wechatId: '0',
},
templateType: 0,
targetList: [],
isShow: false,
type: 0, type: 0,
id: '', buttonExplain: '提交',
touchStart: 0 tips: true
} },
}, templateType: 0,
targetList: [],
isShow: false,
type: 0,
id: '',
touchStart: 0
}
},
mounted () { mounted() {
this.form = this.formData this.form = this.formData
this.targetList = this.targetListData this.targetList = this.targetListData
}, },
components: { methods: {
AiBack getInfo(id) {
}, uni.showLoading()
this.$http.post(`/app/appquestionnairetemplate/queryDetailById?id=${id}`).then(res => {
methods: { if (res.code == 0) {
getInfo (id) { this.form = {
uni.showLoading() ...res.data,
this.$http.post(`/app/appquestionnairetemplate/queryDetailById?id=${id}`).then(res => { headPicture: res.data.headPicture
if (res.code == 0) {
this.form = {
...res.data,
headPicture: res.data.headPicture
}
this.type = res.data.type
this.targetList = res.data.fields.map(item => {
return JSON.parse(item.fieldInfo)
})
this.pageShow = true
} else {
this.$u.toast(res.msg)
} }
uni.hideLoading() this.type = res.data.type
}).catch(() => {
uni.hideLoading() this.targetList = res.data.fields.map(item => {
}) return JSON.parse(item.fieldInfo)
} })
this.pageShow = true
} else {
this.$u.toast(res.msg)
}
uni.hideLoading()
}).catch(() => {
uni.hideLoading()
})
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.add-form { .add-form {
min-height: 100vh; min-height: 100vh;
padding-bottom: 60px; padding-bottom: 60px;
box-sizing: border-box;
background: #F3F6F9;
* {
box-sizing: border-box; box-sizing: border-box;
background: #F3F6F9; }
* { ::v-deep .u-drawer-bottom {
box-sizing: border-box; background-color: transparent;
} }
::v-deep .u-drawer-bottom { .components-list {
background-color: transparent; padding: 0 20px;
}
.components-list { .components-item {
padding: 0 20px; margin-top: 24px;
padding: 32px;
box-shadow: 0 4px 8px 4px rgba(233, 233, 233, 0.39);
border-radius: 8px;
overflow: hidden;
border: 1px solid #EEEFF0;
background: #fff;
.components-item { ::v-deep .u-radio, ::v-deep .u-checkbox {
margin-top: 24px; position: relative;
padding: 32px; margin-bottom: 20px;
box-shadow: 0 4px 8px 4px rgba(233, 233, 233, 0.39);
border-radius: 8px;
overflow: hidden;
border: 1px solid #EEEFF0;
background: #fff;
::v-deep .u-radio, ::v-deep .u-checkbox { &:last-child {
position: relative; margin-bottom: 0;
margin-bottom: 20px;
&:last-child {
margin-bottom: 0;
}
.u-checkbox__icon-wrap, .u-radio__icon-wrap {
position: absolute;
top: 4px;
}
.u-radio__label, .u-checkbox__label {
display: flex;
align-items: center;
margin-right: 0;
margin-left: 40px;
line-height: 1.5;
text-align: justify;
image {
width: 100px;
height: 100px;
margin: 0 10px;
}
}
}
span {
flex: 1;
color: #666;
font-size: 26px;
} }
.components-item__select { .u-checkbox__icon-wrap, .u-radio__icon-wrap {
position: absolute;
top: 4px;
}
.u-radio__label, .u-checkbox__label {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; margin-right: 0;
width: 100%; margin-left: 40px;
height: 80px; line-height: 1.5;
margin-bottom: 8px; text-align: justify;
padding: 0 26px;
border: 1px solid #DEDFDF;
&.components-item__textarea {
align-items: flex-start;
height: 160px;
padding-top: 20px;
image {
width: 46px;
height: 34px;
margin-right: 16px;
}
span {
color: #666;
font-size: 26px;
}
}
&.components-item__upload {
justify-content: center;
align-items: center;
}
}
.components-item__title {
display: flex;
justify-content: space-between;
margin-bottom: 32px;
em {
margin-right: 4px;
font-style: normal;
color: rgb(226, 33, 32);;
}
image { image {
width: 32px; width: 100px;
height: 32px; height: 100px;
box-sizing: content-box; margin: 0 10px;
padding: 20px 0 20px 20px;
}
div {
display: flex;
align-items: baseline;
color: #333333;
font-size: 32px;
i {
font-style: normal;
}
h2 {
font-weight: 600;
font-size: 32px;
}
} }
} }
} }
}
.add-popup { span {
height: 440px; flex: 1;
border-radius: 20px 20px 0 0; color: #666;
background: #fff; font-size: 26px;
}
.add-popup__title { .components-item__select {
display: flex; display: flex;
position: relative;
align-items: center; align-items: center;
justify-content: center; justify-content: space-between;
height: 96px; width: 100%;
border-bottom: 1px solid #E4E5E6; height: 80px;
margin-bottom: 8px;
padding: 0 26px;
border: 1px solid #DEDFDF;
h2 { &.components-item__textarea {
color: #333333; align-items: flex-start;
font-size: 32px; height: 160px;
font-weight: 600; padding-top: 20px;
image {
width: 46px;
height: 34px;
margin-right: 16px;
}
span {
color: #666;
font-size: 26px;
}
}
&.components-item__upload {
justify-content: center;
align-items: center;
}
}
.components-item__title {
display: flex;
justify-content: space-between;
margin-bottom: 32px;
em {
margin-right: 4px;
font-style: normal;
color: rgb(226, 33, 32);;
} }
image { image {
position: absolute; width: 32px;
right: 32px; height: 32px;
top: 50%; box-sizing: content-box;
width: 30px; padding: 20px 0 20px 20px;
height: 20px;
transform: translateY(-50%);
}
}
.add-popup__list {
display: flex;
flex-wrap: wrap;
padding: 0 34px;
span {
width: calc((100% - 64px) / 3);
height: 78px;
line-height: 78px;
margin-top: 32px;
margin-right: 32px;
text-align: center;
color: #333333;
font-size: 28px;
border-radius: 8px;
border: 1px solid #E4E5E6;
&:nth-of-type(3n) {
margin-right: 0;
}
}
}
}
.add-form__footer {
display: flex;
align-items: center;
position: fixed;
left: 0;
bottom: 0;
z-index: 1;
width: 100%;
height: 112px;
text-align: center;
div {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
height: 100%;
text-align: center;
background: #fff;
&:last-child {
color: #fff;
font-size: 36px;
background: #3192F4;
&:active {
opacity: 0.8;
}
} }
span { div {
flex: 1; display: flex;
height: 100%; align-items: baseline;
line-height: 112px;
color: #333333; color: #333333;
font-size: 32px; font-size: 32px;
&:active { i {
background: #eee; font-style: normal;
}
h2 {
font-weight: 600;
font-size: 32px;
} }
} }
} }
} }
.add-form__btn {
display: flex;
align-items: center;
justify-content: center;
width: 214px;
height: 66px;
line-height: 66px;
margin: 64px auto 0;
background: #FFFFFF;
border-radius: 34px;
&:active {
opacity: 0.8;
}
image {
width: 28px;
height: 28px;
}
span {
margin-left: 16px;
color: #4392E6;
font-size: 28px;
}
}
* {
box-sizing: border-box;
}
.form-info {
margin-top: 26px;
padding: 0 20px;
& > h2 {
height: 76px;
line-height: 76px;
color: #999999;
font-weight: normal;
font-size: 28px;
}
.form-info__wrapper {
padding: 0 18px;
background: #fff;
.title {
width: 100%;
padding: 22px 0;
font-size: 36px;
border-bottom: 1px solid #F1F2F3;
}
.content {
padding: 30px 0!important;
font-size: 28px;
::v-deep textarea {
color: #333;
font-size: 28px!important;
}
}
}
}
.header-pic {
position: relative;
font-size: 0;
span {
position: absolute;
bottom: 16px;
right: 16px;
z-index: 1;
width: 148px;
height: 56px;
line-height: 56px;
text-align: center;
color: #fff;
font-size: 26px;
background: rgba(0, 0, 0, 0.16);
border-radius: 28px;
}
image {
width: 100%;
height: 320px;
}
}
} }
.add-popup {
height: 440px;
border-radius: 20px 20px 0 0;
background: #fff;
.add-popup__title {
display: flex;
position: relative;
align-items: center;
justify-content: center;
height: 96px;
border-bottom: 1px solid #E4E5E6;
h2 {
color: #333333;
font-size: 32px;
font-weight: 600;
}
image {
position: absolute;
right: 32px;
top: 50%;
width: 30px;
height: 20px;
transform: translateY(-50%);
}
}
.add-popup__list {
display: flex;
flex-wrap: wrap;
padding: 0 34px;
span {
width: calc((100% - 64px) / 3);
height: 78px;
line-height: 78px;
margin-top: 32px;
margin-right: 32px;
text-align: center;
color: #333333;
font-size: 28px;
border-radius: 8px;
border: 1px solid #E4E5E6;
&:nth-of-type(3n) {
margin-right: 0;
}
}
}
}
.add-form__footer {
display: flex;
align-items: center;
position: fixed;
left: 0;
bottom: 0;
z-index: 1;
width: 100%;
height: 112px;
text-align: center;
div {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
height: 100%;
text-align: center;
background: #fff;
&:last-child {
color: #fff;
font-size: 36px;
background: #3192F4;
&:active {
opacity: 0.8;
}
}
span {
flex: 1;
height: 100%;
line-height: 112px;
color: #333333;
font-size: 32px;
&:active {
background: #eee;
}
}
}
}
.add-form__btn {
display: flex;
align-items: center;
justify-content: center;
width: 214px;
height: 66px;
line-height: 66px;
margin: 64px auto 0;
background: #FFFFFF;
border-radius: 34px;
&:active {
opacity: 0.8;
}
image {
width: 28px;
height: 28px;
}
span {
margin-left: 16px;
color: #4392E6;
font-size: 28px;
}
}
* {
box-sizing: border-box;
}
.form-info {
margin-top: 26px;
padding: 0 20px;
& > h2 {
height: 76px;
line-height: 76px;
color: #999999;
font-weight: normal;
font-size: 28px;
}
.form-info__wrapper {
padding: 0 18px;
background: #fff;
.title {
width: 100%;
padding: 22px 0;
font-size: 36px;
border-bottom: 1px solid #F1F2F3;
}
.content {
padding: 30px 0 !important;
font-size: 28px;
::v-deep textarea {
color: #333;
font-size: 28px !important;
}
}
}
}
.header-pic {
position: relative;
font-size: 0;
span {
position: absolute;
bottom: 16px;
right: 16px;
z-index: 1;
width: 148px;
height: 56px;
line-height: 56px;
text-align: center;
color: #fff;
font-size: 26px;
background: rgba(0, 0, 0, 0.16);
border-radius: 28px;
}
image {
width: 100%;
height: 320px;
}
}
}
</style> </style>