Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -19,7 +19,8 @@ export default {
|
||||
components: {AiResult, FormDetail},
|
||||
data() {
|
||||
return {
|
||||
access: false
|
||||
access: false,
|
||||
err: ""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -28,7 +29,7 @@ export default {
|
||||
return !!this.$route.query?.id && this.access
|
||||
},
|
||||
errMsg() {
|
||||
return this.access ? "表单不存在" : "无法获取用户信息"
|
||||
return this.err || (this.access ? "表单不存在" : "无法获取用户信息")
|
||||
},
|
||||
isPreview() {
|
||||
return !!this.$route.query?.preview
|
||||
@@ -37,11 +38,19 @@ export default {
|
||||
methods: {
|
||||
...mapActions(['getCode', 'getToken']),
|
||||
checkAccess() {
|
||||
let {corpId, code, suiteId} = this.$route.query
|
||||
let {corpId, code, suiteId, id} = this.$route.query
|
||||
if (this.isPreview) {
|
||||
this.access = true
|
||||
} else if (!!this.token) {
|
||||
this.access = true
|
||||
this.$http.post("/app/appquestionnairetemplate/commitCheck", null, {
|
||||
params: {id}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.access = true
|
||||
}
|
||||
}).catch(err => {
|
||||
this.err = err
|
||||
})
|
||||
} else if (code) {
|
||||
this.getToken({code, corpId, suiteId, isAppForm: true}).then(() => {
|
||||
let {query, path, hash} = this.$route
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="form-config">
|
||||
<div class="config-group">
|
||||
<div class="config-item">
|
||||
<u-input class="form-maintitle" :maxlength="200" v-model="config.label" :placeholder="`请输入${config.fixedLabel}标题 ${config.required ? '(必填)' : ''}`" placeholder-style="color: #999999; font-weight: 600" />
|
||||
<u-input class="form-maintitle" :maxlength="200" v-model="config.label" :placeholder="`请输入${config.fixedLabel||''}标题 ${config.required ? '(必填)' : ''}`" placeholder-style="color: #999999; font-weight: 600" />
|
||||
</div>
|
||||
<div class="config-item__select--wrapper" v-if="['radio', 'select', 'checkbox'].includes(config.type)">
|
||||
<div class="config-item__select" v-for="(item, index) in config.options" :key="index">
|
||||
@@ -174,7 +174,7 @@ export default {
|
||||
|
||||
let index = 0
|
||||
if (this.config.answer) {
|
||||
this.config.options.forEach((v, i) => {
|
||||
this.config.options?.forEach((v, i) => {
|
||||
if (v.label === this.config.answer) {
|
||||
index = i
|
||||
}
|
||||
|
||||
@@ -174,6 +174,8 @@ export default {
|
||||
tips: "提交成功!感谢参与",
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$u.toast(err || "提交失败")
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user