BUG 26118

This commit is contained in:
aixianling
2021-12-28 16:30:48 +08:00
parent c3118f9f8c
commit d7b4306b5b
4 changed files with 7 additions and 12 deletions

View File

@@ -184,7 +184,7 @@ export default {
}) })
uni.$on('filedConfig', res => { uni.$on('filedConfig', res => {
if (!res.index) { if (res.index < 0) {
this.targetList.push(res.config) this.targetList.push(res.config)
} else { } else {
this.targetList.splice(res.index, 1, res.config) this.targetList.splice(res.index, 1, res.config)

View File

@@ -37,7 +37,7 @@ export default {
}, },
onShow() { onShow() {
document.title = "问卷表单" document.title = "问卷表单"
this.$refs.TabPage?.show() this.$refs?.TabPage?.show()
this.$nextTick(() => { this.$nextTick(() => {
this.injectJWeixin(['sendChatMessage', 'selectEnterpriseContact', 'shareAppMessage', 'shareWechatMessage']).then(() => { this.injectJWeixin(['sendChatMessage', 'selectEnterpriseContact', 'shareAppMessage', 'shareWechatMessage']).then(() => {
this.$dict.load(['questionnaireStatus', 'questionnaireType', 'questionnaireFieldType']) this.$dict.load(['questionnaireStatus', 'questionnaireType', 'questionnaireFieldType'])

View File

@@ -157,7 +157,7 @@ export default {
}, },
computed: { computed: {
config() { config() {
return !!this.index ? this.filed : JSON.parse(JSON.stringify(components.filter(v => v.type === this.filedType)[0])) return this.index > -1 ? this.filed : components?.filter(v => v.type === this.filedType)?.[0] || {}
}, },
pointTypeName() { pointTypeName() {
if (!this.config.pointDict) return '' if (!this.config.pointDict) return ''

View File

@@ -211,16 +211,11 @@ export default {
toEdit() { toEdit() {
if (this.info.dataCount !== 0) { if (this.info.dataCount !== 0) {
return this.$u.toast('该表单已有数据,无法编辑!') return this.$u.toast('该表单已有数据,无法编辑!')
} else {
let {id} = this
this.isShow = false
uni.navigateTo({url: `./AddForm?id=${id}`})
} }
this.$emit('change', {
type: 'AddForm',
params: {
id: this.id
}
})
this.isShow = false
}, },
share(id) { share(id) {