BUG 25331

This commit is contained in:
aixianling
2021-12-09 18:31:25 +08:00
parent 21730aa629
commit 8110844bd2
2 changed files with 56 additions and 62 deletions

View File

@@ -1,48 +1,48 @@
<template> <template>
<div class="form"> <div class="form">
<component <component
:is="component" :is="component"
@change="onChange" @change="onChange"
:params="params"> :params="params">
</component> </component>
</div> </div>
</template> </template>
<script> <script>
import Tabbar from './components/Tabbar.vue' import Tabbar from './components/Tabbar.vue'
import AddForm from './components/AddForm.vue' import AddForm from './components/AddForm.vue'
import Result from './components/Result.vue' import Result from './components/Result.vue'
export default { export default {
name: 'AppAskForm', name: 'AppAskForm',
appName: '问卷表单管理', appName: '问卷表单管理',
data () { data() {
return { return {
component: 'Tabbar', component: 'Tabbar',
params: {} params: {}
} }
},
components: {
Tabbar,
Result,
AddForm
},
methods: {
onChange(e) {
this.params = e.params
this.component = e.type
}, },
emitShow() {
components: { this.injectJWeixin(['sendChatMessage', 'selectEnterpriseContact', 'shareAppMessage', 'shareWechatMessage']).then(() => {
Tabbar, this.$dict.load(['questionnaireStatus', 'questionnaireType', 'questionnaireFieldType'])
Result, })
AddForm
},
onLoad () {
},
mounted () {
},
methods: {
onChange (e) {
this.params = e.params
this.component = e.type
},
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -80,7 +80,7 @@
<div class="popup-btn" @click="isShow = false">关闭</div> <div class="popup-btn" @click="isShow = false">关闭</div>
</div> </div>
</u-popup> </u-popup>
<u-modal v-model="isShowModal" show-cancel-button content="确定停止该表单?" @confirm="toStop"></u-modal> <u-modal v-model="isShowModal" show-cancel-button content="确定停止该表单?" @confirm="toStop"></u-modal>
</div> </div>
</template> </template>
@@ -112,16 +112,11 @@ export default {
}, },
created() { created() {
this.$loading() this.$loading()
this.injectJWeixin(['sendChatMessage', 'selectEnterpriseContact']).then(() => { this.getList()
this.$dict.load(['questionnaireStatus', 'questionnaireType', 'questionnaireFieldType']).then(() => {
this.getList()
})
})
}, },
methods: { methods: {
...mapActions(['injectJWeixin', 'wxInvoke']), ...mapActions(['wxInvoke']),
linkTo(url) { linkTo(url) {
this.isShow = false this.isShow = false
@@ -130,7 +125,7 @@ export default {
}) })
}, },
showPopup (item) { showPopup(item) {
if (item.status === '2') { if (item.status === '2') {
this.$confirm('表单已停止发布,请在后台管理系统中查看调查结果', '', { this.$confirm('表单已停止发布,请在后台管理系统中查看调查结果', '', {
showCancel: false showCancel: false
@@ -172,27 +167,25 @@ export default {
this.isShow = false this.isShow = false
} }
if (data.tapIndex === 0 || data.tapIndex === 1) { if (data.tapIndex === 0 || data.tapIndex === 1) {
this.injectJWeixin(['shareAppMessage', 'shareWechatMessage']).then(() => { if (data.tapIndex === 0) {
if (data.tapIndex === 0) { this.wxInvoke(['shareAppMessage', {
this.wxInvoke(['shareAppMessage', { title: this.info.title,
title: this.info.title, desc: this.info.tableExplain,
desc: this.info.tableExplain, link: res.data.linkUrl,
link: res.data.linkUrl, imgUrl: this.info.headPicture
imgUrl: this.info.headPicture }, () => {
}, () => { this.isShow = false
this.isShow = false }])
}]) } else {
} else { this.wxInvoke(['shareWechatMessage', {
this.wxInvoke(['shareWechatMessage', { title: this.info.title,
title: this.info.title, desc: this.info.tableExplain,
desc: this.info.tableExplain, link: res.data.linkUrl,
link: res.data.linkUrl, imgUrl: this.info.headPicture
imgUrl: this.info.headPicture }, () => {
}, () => { this.isShow = false
this.isShow = false }])
}]) }
}
})
} }
} }
}) })
@@ -311,6 +304,7 @@ export default {
.form { .form {
height: 100vh; height: 100vh;
overflow: hidden; overflow: hidden;
::v-deep .u-search { ::v-deep .u-search {
margin-bottom: 0 !important; margin-bottom: 0 !important;