调整错误

This commit is contained in:
aixianling
2021-11-23 17:16:13 +08:00
parent fd8234cc87
commit f63ace3b70
4 changed files with 620 additions and 620 deletions

View File

@@ -2,15 +2,15 @@
<div class="add-form" v-if="pageShow">
<div v-show="!isShowConfig">
<div class="header-pic">
<image v-if="form.headPicture" :src="form.headPicture" />
<image v-if="form.headPicture" :src="form.headPicture"/>
<span @click="upload">更换图片</span>
</div>
<div class="form-info">
<h2>文本选项</h2>
<div class="form-info__wrapper">
<textarea class="title" placeholder="请输入标题 (必填)" :maxlength="30" :auto-height="true" v-model="form.title"></textarea>
<textarea class="title" placeholder="请输入标题 (必填)" :maxlength="30" :auto-height="true"
v-model="form.title"></textarea>
<textarea
style="wdith: 100%"
class="content"
border="none"
:clearable="false"
@@ -33,14 +33,16 @@
}"
draggable=".components-item"
:sort="true">
<div class="components-item" v-for="(item, index) in targetList" :key="index" @click="toFiledSetting(item, index)">
<div class="components-item" v-for="(item, index) in targetList" :key="index"
@click="toFiledSetting(item, index)">
<div class="components-item__title">
<div class="components-item__title--left">
<em :style="{opacity: item.required ? 1 : 0}">*</em>
<i>{{ index + 1 }}.</i>
<h2>{{ item.label }}</h2>
</div>
<image :src="`${$cdn}askform/sc1.png`" @click.stop="removeComponent(index)" @touchstart.stop="removeComponent(index)" />
<image :src="`${$cdn}askform/sc1.png`" @click.stop="removeComponent(index)"
@touchstart.stop="removeComponent(index)"/>
</div>
<div class="components-item__filed">
<template v-if="(item.type === 'radio')">
@@ -62,12 +64,12 @@
<template v-if="(item.type === 'select')">
<div class="components-item__select">
<span>{{ item.placeholder }}</span>
<u-icon name="arrow-down" color="#DEDFDF" />
<u-icon name="arrow-down" color="#DEDFDF"/>
</div>
</template>
<template v-if="(item.type === '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>
</div>
</template>
@@ -85,7 +87,7 @@
</div>
</draggable>
<div class="add-form__btn" @click="isShow = true">
<image :src="`${$cdn}askform/add.png`" />
<image :src="`${$cdn}askform/add.png`"/>
<span>添加问题</span>
</div>
<div class="add-form__footer">
@@ -99,7 +101,7 @@
<div class="add-popup">
<div class="add-popup__title">
<h2>添加问题</h2>
<image :src="`${$cdn}askform/zk.png`" mode="aspectFit" @click="isShow = false" />
<image :src="`${$cdn}askform/zk.png`" mode="aspectFit" @click="isShow = false"/>
</div>
<div class="add-popup__list">
<span @click="toFiledSetting('radio')">单选题</span>
@@ -111,7 +113,7 @@
</div>
</div>
</u-popup>
<AiBack custom @back="back"></AiBack>
<AiBack custom @back="back"/>
</div>
<div class="detail" v-if="isShowConfig">
<component
@@ -131,16 +133,16 @@
</template>
<script>
import AiBack from "@/components/AiBack";
import draggable from 'vuedraggable'
import FiledConfig from './FiledConfig'
import FormSetting from './FormSetting'
import PreviewForm from './PreviewForm'
import draggable from 'vuedraggable'
import FiledConfig from './FiledConfig'
import FormSetting from './FormSetting'
import PreviewForm from './PreviewForm'
import AiBack from "../../../components/AiBack";
export default {
export default {
props: ['params'],
data () {
data() {
return {
pageShow: false,
isShowConfig: false,
@@ -186,7 +188,7 @@
FiledConfig
},
mounted () {
mounted() {
this.type = Number(this.params.type)
if (this.params.isQuote) {
@@ -221,26 +223,26 @@
},
methods: {
toSetting () {
toSetting() {
this.component = 'FormSetting'
this.isShowConfig = true
},
back () {
back() {
this.$emit('change', {
type: 'Tabbar'
})
},
onChange (e) {
onChange(e) {
},
removeComponent (index) {
removeComponent(index) {
this.targetList.splice(index, 1)
},
toPreview () {
toPreview() {
this.component = 'PreviewForm'
this.isShowConfig = true
},
@@ -267,7 +269,7 @@
uni.chooseImage(params)
},
uploadFile (img) {
uploadFile(img) {
uni.showLoading({title: '上传中'})
let formData = new FormData()
formData.append('file', img)
@@ -283,7 +285,7 @@
})
},
onConfirm () {
onConfirm() {
for (let item of this.targetList) {
if (item.isShowPoints) {
if (item.pointType === '0') {
@@ -349,7 +351,7 @@
})
},
getInfo (id) {
getInfo(id) {
uni.showLoading()
this.$http.post(`/app/appquestionnairetemplate/queryDetailById?id=${id}`).then(res => {
if (res.code == 0) {
@@ -375,7 +377,7 @@
})
},
toFiledSetting (type, index) {
toFiledSetting(type, index) {
this.isShow = false
if (index > -1) {
this.filed = type
@@ -392,7 +394,7 @@
this.isShowConfig = true
},
init () {
init() {
if (this.type == 0) {
this.form.headPicture = 'https://cdn.cunwuyun.cn/dvcp/h5/form/interview.png'
}
@@ -414,11 +416,11 @@
}
}
}
}
}
</script>
<style lang="scss" scoped>
.add-form {
.add-form {
min-height: 100vh;
padding-bottom: 140px;
box-sizing: border-box;
@@ -442,6 +444,7 @@
.u-checkbox, .u-radio {
display: block;
image {
width: 100px;
height: 100px;
@@ -459,7 +462,7 @@
.u-checkbox__icon-wrap, .u-radio__icon-wrap {
position: absolute;
top: 4rpx;
top: 4 rpx;
}
.u-radio__label, .u-checkbox__label {
@@ -474,6 +477,7 @@
}
}
}
span {
flex: 1;
color: #666;
@@ -707,9 +711,9 @@
.content {
width: 100%;
padding: 30px 0!important;
padding: 30px 0 !important;
color: #333;
font-size: 28px!important;
font-size: 28px !important;
}
}
}
@@ -742,5 +746,5 @@
::v-deep .u-radio, ::v-deep .u-checkbox {
align-items: baseline;
}
}
}
</style>

View File

@@ -83,14 +83,14 @@
</template>
<script>
import AiTopFixed from '@/components/AiTopFixed'
import AiEmpty from '@/components/AiEmpty'
import {mapActions} from 'vuex'
import AiTopFixed from "../../../components/AiTopFixed";
import AiEmpty from "../../../components/AiEmpty";
export default {
name: 'formList',
label: '表单列表',
components: {AiEmpty, AiTopFixed},
data() {
return {
search: {
@@ -106,12 +106,6 @@ export default {
isShow: false
}
},
components: {
AiEmpty,
AiTopFixed
},
mounted() {
this.injectJWeixin(['sendChatMessage', 'selectEnterpriseContact'])
this.$dict.load(['questionnaireStatus', 'questionnaireType', 'questionnaireFieldType']).then(() => {
@@ -205,7 +199,7 @@ export default {
this.isShow = false
},
toEdit () {
toEdit() {
if (this.info.dataCount !== 0) {
return this.$u.toast('该表单已有数据,无法编辑!')
}

View File

@@ -11,30 +11,30 @@
<script>
import AddList from './AddList.vue'
import List from './List.vue'
import AiTabbar from '@/components/AiTabbar'
import AiTabbar from "../../../components/AiTabbar";
export default {
name: 'AppAskForm',
appName: '问卷表单',
data () {
data() {
return {
currIndex: 0
}
},
components: {
AddList,
AiTabbar,
AddList,
List
},
computed: {
tabBar () {
tabBar() {
const link = icon => `${this.$cdn}askform/${icon}.png`
return [
{text: "表单列表", iconPath: "bdlb1", selectedIconPath: "bdlb2" },
{text: "新建项目", iconPath: "xjxm1", selectedIconPath: "xjxm2" }
{text: "表单列表", iconPath: "bdlb1", selectedIconPath: "bdlb2"},
{text: "新建项目", iconPath: "xjxm1", selectedIconPath: "xjxm2"}
].map(e => ({
...e,
iconPath: link(e.iconPath),
@@ -43,7 +43,7 @@ export default {
}
},
onLoad () {
onLoad() {
uni.$on('reload', () => {
if (this.currIndex === 0) {
this.$refs.list.reload()
@@ -54,7 +54,7 @@ export default {
},
methods: {
onChange (e) {
onChange(e) {
this.$emit('change', e)
}
},
@@ -68,7 +68,7 @@ export default {
</script>
<style lang="scss" scoped>
.form {
.form {
padding-bottom: 98px;
}
}
</style>

View File

@@ -1,39 +1,41 @@
<template>
<div class="emptyWrap">
<img class="emptyImg" src="https://cdn.cunwuyun.cn/dvcp/h5/Empty.png">
<div class="emptyText">{{description}}</div>
<div class="emptyText">{{ description }}</div>
</div>
</template>
<script>
export default {
name:"emptyData",
props:{
description:{
default:'暂无相关信息',
type:String
}
export default {
name: "AiEmpty",
props: {
description: {
default: '暂无相关信息',
type: String
}
}
}
</script>
<style lang="scss" scoped>
.emptyWrap {
.emptyWrap {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.emptyImg{
width: 400rpx;
height: 240rpx;
.emptyImg {
width: 400 rpx;
height: 240 rpx;
margin-top: 112px;
}
.emptyText{
font-size:29rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(183,183,183,1);
}
.emptyText {
font-size: 29 rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(183, 183, 183, 1);
}
}
</style>