调查问卷
This commit is contained in:
@@ -44,20 +44,20 @@
|
||||
</div>
|
||||
<div class="components-item__filed">
|
||||
<template v-if="(item.type === 'radio')">
|
||||
<radio-group v-model="item.value">
|
||||
<radio class="u-radio" disabled style="display: block;" v-for="(field, i) in item.options" :key="i">
|
||||
<u-radio-group v-model="item.value" wrap>
|
||||
<u-radio class="u-radio" disabled style="display: block;" v-for="(field, i) in item.options" :key="i">
|
||||
<image :src="field.img[0].url" v-if="field.img.length"/>
|
||||
<span>{{ field.label }}</span>
|
||||
</radio>
|
||||
</radio-group>
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</template>
|
||||
<template v-if="(item.type === 'checkbox')">
|
||||
<checkbox-group v-model="item.value" wrap>
|
||||
<checkbox class="u-checkbox" disabled :name="field.label" v-for="(field, i) in item.options" :key="i">
|
||||
<u-checkbox-group v-model="item.value" wrap>
|
||||
<u-checkbox class="u-checkbox" disabled :name="field.label" v-for="(field, i) in item.options" :key="i">
|
||||
<image :src="field.img[0].url" v-if="field.img.length"/>
|
||||
<span>{{ field.label }}</span>
|
||||
</checkbox>
|
||||
</checkbox-group>
|
||||
</u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</template>
|
||||
<template v-if="(item.type === 'select')">
|
||||
<div class="components-item__select">
|
||||
@@ -95,7 +95,7 @@
|
||||
</div>
|
||||
<div @click="onConfirm">立即发布</div>
|
||||
</div>
|
||||
<u-popup :show="isShow" :closeable="false" mode="bottom" @close="isShow = false">
|
||||
<u-popup v-model="isShow" :closeable="false" mode="bottom" @close="isShow = false">
|
||||
<div class="add-popup">
|
||||
<div class="add-popup__title">
|
||||
<h2>添加问题</h2>
|
||||
@@ -114,7 +114,16 @@
|
||||
<AiBack custom @back="back"></AiBack>
|
||||
</div>
|
||||
<div class="detail" v-if="isShowConfig">
|
||||
<component :is="component" @change="onChange" @back="isShowConfig = false" :id="id" :type="type" :formConfig="formConfig"></component>
|
||||
<component
|
||||
:is="component"
|
||||
:index="filedIndex"
|
||||
:filed="filed"
|
||||
@change="onChange"
|
||||
:filedType="filedType"
|
||||
@back="isShowConfig = false"
|
||||
:id="id"
|
||||
:formConfig="formConfig">
|
||||
</component>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -156,6 +165,9 @@
|
||||
isShow: false,
|
||||
type: 0,
|
||||
id: '',
|
||||
filedType: '',
|
||||
filed: {},
|
||||
filedIndex: '',
|
||||
isQuote: false,
|
||||
touchStart: 0,
|
||||
component: '',
|
||||
@@ -167,7 +179,7 @@
|
||||
AiBack,
|
||||
draggable,
|
||||
FormSetting,
|
||||
// FiledConfig
|
||||
FiledConfig
|
||||
},
|
||||
|
||||
mounted () {
|
||||
@@ -195,6 +207,7 @@
|
||||
})
|
||||
|
||||
uni.$on('filedConfig', res => {
|
||||
console.log(33)
|
||||
if (res.index === '-1') {
|
||||
this.targetList.push(res.config)
|
||||
} else {
|
||||
@@ -205,9 +218,6 @@
|
||||
|
||||
methods: {
|
||||
toSetting () {
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/askForm/formSetting?id=${this.id}&formConfig=${JSON.stringify(this.formConfig)}`
|
||||
// })
|
||||
this.component = 'FormSetting'
|
||||
this.isShowConfig = true
|
||||
},
|
||||
@@ -364,18 +374,21 @@
|
||||
},
|
||||
|
||||
toFiledSetting (type, index) {
|
||||
if (index != undefined) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/askForm/filedConfig?config=${JSON.stringify(type)}&index=${index}`
|
||||
})
|
||||
console.log(index)
|
||||
this.isShow = false
|
||||
if (index > -1) {
|
||||
this.filed = type
|
||||
this.filedIndex = index
|
||||
this.component = 'FiledConfig'
|
||||
this.isShowConfig = true
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
this.isShow = false
|
||||
uni.navigateTo({
|
||||
url: `/pages/askForm/filedConfig?type=${type}`
|
||||
})
|
||||
this.filedIndex = ''
|
||||
this.filedType = type
|
||||
this.component = 'FiledConfig'
|
||||
this.isShowConfig = true
|
||||
},
|
||||
|
||||
init () {
|
||||
|
||||
@@ -133,9 +133,10 @@
|
||||
<script>
|
||||
import { components } from './config'
|
||||
export default {
|
||||
props: ['filed', 'index', 'filedType'],
|
||||
|
||||
data () {
|
||||
return {
|
||||
index: '',
|
||||
isShowType: false,
|
||||
isShowAnswer: false,
|
||||
config: {
|
||||
@@ -143,13 +144,17 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
onLoad (query) {
|
||||
if (query.type) {
|
||||
this.config = JSON.parse(JSON.stringify(components.filter(v => v.type === query.type)[0]))
|
||||
} else {
|
||||
this.config = JSON.parse(query.config)
|
||||
this.index = query.index
|
||||
mounted () {
|
||||
console.log('11' + this.index)
|
||||
if (this.index != undefined) {
|
||||
this.config = this.filed
|
||||
this.index = this.index
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
console.log(components)
|
||||
this.config = JSON.parse(JSON.stringify(components.filter(v => v.type === this.filedType)[0]))
|
||||
},
|
||||
|
||||
computed: {
|
||||
@@ -253,9 +258,7 @@ export default {
|
||||
},
|
||||
|
||||
back () {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
this.$emit('back')
|
||||
},
|
||||
|
||||
confirm () {
|
||||
@@ -263,9 +266,8 @@ export default {
|
||||
config: this.config,
|
||||
index: this.index === '' ? '-1' : this.index
|
||||
})
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
|
||||
this.back()
|
||||
},
|
||||
|
||||
addOptions () {
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
</div>
|
||||
<div class="setting-item__right">
|
||||
<u-radio-group v-model="periodValidityType" active-color="#1088F9">
|
||||
<u-radio name="0" label="永久有效" style="padding-right: 20rpx;"></u-radio>
|
||||
<u-radio name="1" label="自定义时间"></u-radio>
|
||||
<u-radio name="0" label="永久有效" style="padding-right: 20rpx;">永久有效</u-radio>
|
||||
<u-radio name="1" label="自定义时间">自定义时间</u-radio>
|
||||
</u-radio-group>
|
||||
<u-icon name="arrow-right" color="#E1E2E3" />
|
||||
</div>
|
||||
@@ -40,8 +40,8 @@
|
||||
</div>
|
||||
<div class="setting-item__right">
|
||||
<u-radio-group v-model="commitType" active-color="#1088F9">
|
||||
<u-radio name="0" label="不限次数" style="padding-right: 20rpx;"></u-radio>
|
||||
<u-radio name="1" label="限提交一次"></u-radio>
|
||||
<u-radio name="0" label="不限次数" style="padding-right: 20rpx;">不限次数</u-radio>
|
||||
<u-radio name="1" label="限提交一次">限提交一次</u-radio>
|
||||
</u-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
@@ -51,7 +51,7 @@
|
||||
<image :src="`${$cdn}askform/bz.png`" @click="tips = '当客户点击或者发布表单时,发送表单的员工将会受到消息提醒' , isShowModal = true" />
|
||||
</div>
|
||||
<div class="setting-item__right">
|
||||
<u-switch v-model="actionNotice" active-value="1" :size="20" active-color="#1088F9"></u-switch>
|
||||
<u-switch v-model="actionNotice" active-value="1" :size="40" active-color="#1088F9"></u-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
@@ -60,7 +60,7 @@
|
||||
<image :src="`${$cdn}askform/bz.png`" @click="tips = '当客户点击或者发布表单时,会将客户的打开行为记录在客户动态里' , isShowModal = true" />
|
||||
</div>
|
||||
<div class="setting-item__right">
|
||||
<u-switch v-model="dynamicNotice" active-value="1" :size="20" active-color="#1088F9"></u-switch>
|
||||
<u-switch v-model="dynamicNotice" active-value="1" :size="40" active-color="#1088F9"></u-switch>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -71,7 +71,7 @@
|
||||
<div @click="confirm">{{ type === 'edit' ? '发布' : '确定' }}</div>
|
||||
</div>
|
||||
<u-modal v-model="isShowModal" :content="tips"></u-modal>
|
||||
<u-picker mode="time" :show="isShowTime" :show-time-tag="true" @close="isShowTime = false" @confirm="onTimeChange" :params="params"></u-picker>
|
||||
<u-picker mode="time" v-model="isShowTime" :show-time-tag="true" @close="isShowTime = false" @confirm="onTimeChange" :params="params"></u-picker>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AiTopFixed from '@/components/AiTopFixed'
|
||||
import {mapActions} from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -105,6 +106,10 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
AiTopFixed
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.injectJWeixin(['sendChatMessage', 'selectEnterpriseContact'])
|
||||
this.$dict.load(['questionnaireStatus', 'questionnaireType', 'questionnaireFieldType']).then(() => {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<script>
|
||||
import AddList from './AddList.vue'
|
||||
import List from './List.vue'
|
||||
import AiTabbar from '@/components/AiTabbar'
|
||||
import AiTabbar from './AiTabbar'
|
||||
|
||||
export default {
|
||||
name: 'AppAskForm',
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AiTopFixed from '@/components/AiTopFixed'
|
||||
import {mapActions} from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -105,6 +106,10 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
AiTopFixed
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.injectJWeixin(['sendChatMessage', 'selectEnterpriseContact'])
|
||||
this.$dict.load(['questionnaireStatus', 'questionnaireType', 'questionnaireFieldType']).then(() => {
|
||||
|
||||
Reference in New Issue
Block a user