调整错误
This commit is contained in:
@@ -2,15 +2,15 @@
|
|||||||
<div class="add-form" v-if="pageShow">
|
<div class="add-form" v-if="pageShow">
|
||||||
<div v-show="!isShowConfig">
|
<div v-show="!isShowConfig">
|
||||||
<div class="header-pic">
|
<div class="header-pic">
|
||||||
<image v-if="form.headPicture" :src="form.headPicture" />
|
<image v-if="form.headPicture" :src="form.headPicture"/>
|
||||||
<span @click="upload">更换图片</span>
|
<span @click="upload">更换图片</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-info">
|
<div class="form-info">
|
||||||
<h2>文本选项</h2>
|
<h2>文本选项</h2>
|
||||||
<div class="form-info__wrapper">
|
<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
|
<textarea
|
||||||
style="wdith: 100%"
|
|
||||||
class="content"
|
class="content"
|
||||||
border="none"
|
border="none"
|
||||||
:clearable="false"
|
:clearable="false"
|
||||||
@@ -33,14 +33,16 @@
|
|||||||
}"
|
}"
|
||||||
draggable=".components-item"
|
draggable=".components-item"
|
||||||
:sort="true">
|
: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">
|
||||||
<div class="components-item__title--left">
|
<div class="components-item__title--left">
|
||||||
<em :style="{opacity: item.required ? 1 : 0}">*</em>
|
<em :style="{opacity: item.required ? 1 : 0}">*</em>
|
||||||
<i>{{ index + 1 }}.</i>
|
<i>{{ index + 1 }}.</i>
|
||||||
<h2>{{ item.label }}</h2>
|
<h2>{{ item.label }}</h2>
|
||||||
</div>
|
</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>
|
||||||
<div class="components-item__filed">
|
<div class="components-item__filed">
|
||||||
<template v-if="(item.type === 'radio')">
|
<template v-if="(item.type === 'radio')">
|
||||||
@@ -62,12 +64,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>
|
||||||
@@ -85,7 +87,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</draggable>
|
</draggable>
|
||||||
<div class="add-form__btn" @click="isShow = true">
|
<div class="add-form__btn" @click="isShow = true">
|
||||||
<image :src="`${$cdn}askform/add.png`" />
|
<image :src="`${$cdn}askform/add.png`"/>
|
||||||
<span>添加问题</span>
|
<span>添加问题</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="add-form__footer">
|
<div class="add-form__footer">
|
||||||
@@ -99,7 +101,7 @@
|
|||||||
<div class="add-popup">
|
<div class="add-popup">
|
||||||
<div class="add-popup__title">
|
<div class="add-popup__title">
|
||||||
<h2>添加问题</h2>
|
<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>
|
||||||
<div class="add-popup__list">
|
<div class="add-popup__list">
|
||||||
<span @click="toFiledSetting('radio')">单选题</span>
|
<span @click="toFiledSetting('radio')">单选题</span>
|
||||||
@@ -111,7 +113,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<AiBack custom @back="back"></AiBack>
|
<AiBack custom @back="back"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="detail" v-if="isShowConfig">
|
<div class="detail" v-if="isShowConfig">
|
||||||
<component
|
<component
|
||||||
@@ -131,16 +133,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AiBack from "@/components/AiBack";
|
import draggable from 'vuedraggable'
|
||||||
import draggable from 'vuedraggable'
|
import FiledConfig from './FiledConfig'
|
||||||
import FiledConfig from './FiledConfig'
|
import FormSetting from './FormSetting'
|
||||||
import FormSetting from './FormSetting'
|
import PreviewForm from './PreviewForm'
|
||||||
import PreviewForm from './PreviewForm'
|
import AiBack from "../../../components/AiBack";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ['params'],
|
props: ['params'],
|
||||||
|
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageShow: false,
|
pageShow: false,
|
||||||
isShowConfig: false,
|
isShowConfig: false,
|
||||||
@@ -186,7 +188,7 @@
|
|||||||
FiledConfig
|
FiledConfig
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted () {
|
mounted() {
|
||||||
this.type = Number(this.params.type)
|
this.type = Number(this.params.type)
|
||||||
|
|
||||||
if (this.params.isQuote) {
|
if (this.params.isQuote) {
|
||||||
@@ -221,26 +223,26 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
toSetting () {
|
toSetting() {
|
||||||
this.component = 'FormSetting'
|
this.component = 'FormSetting'
|
||||||
this.isShowConfig = true
|
this.isShowConfig = true
|
||||||
},
|
},
|
||||||
|
|
||||||
back () {
|
back() {
|
||||||
this.$emit('change', {
|
this.$emit('change', {
|
||||||
type: 'Tabbar'
|
type: 'Tabbar'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onChange (e) {
|
onChange(e) {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
removeComponent (index) {
|
removeComponent(index) {
|
||||||
this.targetList.splice(index, 1)
|
this.targetList.splice(index, 1)
|
||||||
},
|
},
|
||||||
|
|
||||||
toPreview () {
|
toPreview() {
|
||||||
this.component = 'PreviewForm'
|
this.component = 'PreviewForm'
|
||||||
this.isShowConfig = true
|
this.isShowConfig = true
|
||||||
},
|
},
|
||||||
@@ -267,7 +269,7 @@
|
|||||||
uni.chooseImage(params)
|
uni.chooseImage(params)
|
||||||
},
|
},
|
||||||
|
|
||||||
uploadFile (img) {
|
uploadFile(img) {
|
||||||
uni.showLoading({title: '上传中'})
|
uni.showLoading({title: '上传中'})
|
||||||
let formData = new FormData()
|
let formData = new FormData()
|
||||||
formData.append('file', img)
|
formData.append('file', img)
|
||||||
@@ -283,7 +285,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onConfirm () {
|
onConfirm() {
|
||||||
for (let item of this.targetList) {
|
for (let item of this.targetList) {
|
||||||
if (item.isShowPoints) {
|
if (item.isShowPoints) {
|
||||||
if (item.pointType === '0') {
|
if (item.pointType === '0') {
|
||||||
@@ -349,7 +351,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getInfo (id) {
|
getInfo(id) {
|
||||||
uni.showLoading()
|
uni.showLoading()
|
||||||
this.$http.post(`/app/appquestionnairetemplate/queryDetailById?id=${id}`).then(res => {
|
this.$http.post(`/app/appquestionnairetemplate/queryDetailById?id=${id}`).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
@@ -375,7 +377,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
toFiledSetting (type, index) {
|
toFiledSetting(type, index) {
|
||||||
this.isShow = false
|
this.isShow = false
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
this.filed = type
|
this.filed = type
|
||||||
@@ -392,7 +394,7 @@
|
|||||||
this.isShowConfig = true
|
this.isShowConfig = true
|
||||||
},
|
},
|
||||||
|
|
||||||
init () {
|
init() {
|
||||||
if (this.type == 0) {
|
if (this.type == 0) {
|
||||||
this.form.headPicture = 'https://cdn.cunwuyun.cn/dvcp/h5/form/interview.png'
|
this.form.headPicture = 'https://cdn.cunwuyun.cn/dvcp/h5/form/interview.png'
|
||||||
}
|
}
|
||||||
@@ -414,11 +416,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.add-form {
|
.add-form {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding-bottom: 140px;
|
padding-bottom: 140px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -442,6 +444,7 @@
|
|||||||
|
|
||||||
.u-checkbox, .u-radio {
|
.u-checkbox, .u-radio {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
@@ -459,7 +462,7 @@
|
|||||||
|
|
||||||
.u-checkbox__icon-wrap, .u-radio__icon-wrap {
|
.u-checkbox__icon-wrap, .u-radio__icon-wrap {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 4rpx;
|
top: 4 rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-radio__label, .u-checkbox__label {
|
.u-radio__label, .u-checkbox__label {
|
||||||
@@ -474,6 +477,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
color: #666;
|
color: #666;
|
||||||
@@ -707,9 +711,9 @@
|
|||||||
|
|
||||||
.content {
|
.content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 30px 0!important;
|
padding: 30px 0 !important;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 28px!important;
|
font-size: 28px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -742,5 +746,5 @@
|
|||||||
::v-deep .u-radio, ::v-deep .u-checkbox {
|
::v-deep .u-radio, ::v-deep .u-checkbox {
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -83,14 +83,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AiTopFixed from '@/components/AiTopFixed'
|
|
||||||
import AiEmpty from '@/components/AiEmpty'
|
|
||||||
import {mapActions} from 'vuex'
|
import {mapActions} from 'vuex'
|
||||||
|
import AiTopFixed from "../../../components/AiTopFixed";
|
||||||
|
import AiEmpty from "../../../components/AiEmpty";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'formList',
|
name: 'formList',
|
||||||
label: '表单列表',
|
label: '表单列表',
|
||||||
|
components: {AiEmpty, AiTopFixed},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
search: {
|
search: {
|
||||||
@@ -106,12 +106,6 @@ export default {
|
|||||||
isShow: false
|
isShow: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
|
||||||
AiEmpty,
|
|
||||||
AiTopFixed
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.injectJWeixin(['sendChatMessage', 'selectEnterpriseContact'])
|
this.injectJWeixin(['sendChatMessage', 'selectEnterpriseContact'])
|
||||||
this.$dict.load(['questionnaireStatus', 'questionnaireType', 'questionnaireFieldType']).then(() => {
|
this.$dict.load(['questionnaireStatus', 'questionnaireType', 'questionnaireFieldType']).then(() => {
|
||||||
@@ -205,7 +199,7 @@ export default {
|
|||||||
this.isShow = false
|
this.isShow = false
|
||||||
},
|
},
|
||||||
|
|
||||||
toEdit () {
|
toEdit() {
|
||||||
if (this.info.dataCount !== 0) {
|
if (this.info.dataCount !== 0) {
|
||||||
return this.$u.toast('该表单已有数据,无法编辑!')
|
return this.$u.toast('该表单已有数据,无法编辑!')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,30 +11,30 @@
|
|||||||
<script>
|
<script>
|
||||||
import AddList from './AddList.vue'
|
import AddList from './AddList.vue'
|
||||||
import List from './List.vue'
|
import List from './List.vue'
|
||||||
import AiTabbar from '@/components/AiTabbar'
|
import AiTabbar from "../../../components/AiTabbar";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppAskForm',
|
name: 'AppAskForm',
|
||||||
appName: '问卷表单',
|
appName: '问卷表单',
|
||||||
|
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
currIndex: 0
|
currIndex: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
AddList,
|
|
||||||
AiTabbar,
|
AiTabbar,
|
||||||
|
AddList,
|
||||||
List
|
List
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
tabBar () {
|
tabBar() {
|
||||||
const link = icon => `${this.$cdn}askform/${icon}.png`
|
const link = icon => `${this.$cdn}askform/${icon}.png`
|
||||||
return [
|
return [
|
||||||
{text: "表单列表", iconPath: "bdlb1", selectedIconPath: "bdlb2" },
|
{text: "表单列表", iconPath: "bdlb1", selectedIconPath: "bdlb2"},
|
||||||
{text: "新建项目", iconPath: "xjxm1", selectedIconPath: "xjxm2" }
|
{text: "新建项目", iconPath: "xjxm1", selectedIconPath: "xjxm2"}
|
||||||
].map(e => ({
|
].map(e => ({
|
||||||
...e,
|
...e,
|
||||||
iconPath: link(e.iconPath),
|
iconPath: link(e.iconPath),
|
||||||
@@ -43,7 +43,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad () {
|
onLoad() {
|
||||||
uni.$on('reload', () => {
|
uni.$on('reload', () => {
|
||||||
if (this.currIndex === 0) {
|
if (this.currIndex === 0) {
|
||||||
this.$refs.list.reload()
|
this.$refs.list.reload()
|
||||||
@@ -54,7 +54,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
onChange (e) {
|
onChange(e) {
|
||||||
this.$emit('change', e)
|
this.$emit('change', e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -68,7 +68,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.form {
|
.form {
|
||||||
padding-bottom: 98px;
|
padding-bottom: 98px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,39 +1,41 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="emptyWrap">
|
<div class="emptyWrap">
|
||||||
<img class="emptyImg" src="https://cdn.cunwuyun.cn/dvcp/h5/Empty.png">
|
<img class="emptyImg" src="https://cdn.cunwuyun.cn/dvcp/h5/Empty.png">
|
||||||
<div class="emptyText">{{description}}</div>
|
<div class="emptyText">{{ description }}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name:"emptyData",
|
name: "AiEmpty",
|
||||||
props:{
|
props: {
|
||||||
description:{
|
description: {
|
||||||
default:'暂无相关信息',
|
default: '暂无相关信息',
|
||||||
type:String
|
type: String
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.emptyWrap {
|
.emptyWrap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
.emptyImg{
|
|
||||||
width: 400rpx;
|
.emptyImg {
|
||||||
height: 240rpx;
|
width: 400 rpx;
|
||||||
|
height: 240 rpx;
|
||||||
margin-top: 112px;
|
margin-top: 112px;
|
||||||
}
|
}
|
||||||
.emptyText{
|
|
||||||
font-size:29rpx;
|
.emptyText {
|
||||||
font-family:PingFangSC-Regular,PingFang SC;
|
font-size: 29 rpx;
|
||||||
font-weight:400;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
color:rgba(183,183,183,1);
|
font-weight: 400;
|
||||||
}
|
color: rgba(183, 183, 183, 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user