Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -19,7 +19,8 @@ export default {
|
|||||||
components: {AiResult, FormDetail},
|
components: {AiResult, FormDetail},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
access: false
|
access: false,
|
||||||
|
err: ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -28,7 +29,7 @@ export default {
|
|||||||
return !!this.$route.query?.id && this.access
|
return !!this.$route.query?.id && this.access
|
||||||
},
|
},
|
||||||
errMsg() {
|
errMsg() {
|
||||||
return this.access ? "表单不存在" : "无法获取用户信息"
|
return this.err || (this.access ? "表单不存在" : "无法获取用户信息")
|
||||||
},
|
},
|
||||||
isPreview() {
|
isPreview() {
|
||||||
return !!this.$route.query?.preview
|
return !!this.$route.query?.preview
|
||||||
@@ -37,11 +38,19 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
...mapActions(['getCode', 'getToken']),
|
...mapActions(['getCode', 'getToken']),
|
||||||
checkAccess() {
|
checkAccess() {
|
||||||
let {corpId, code, suiteId} = this.$route.query
|
let {corpId, code, suiteId, id} = this.$route.query
|
||||||
if (this.isPreview) {
|
if (this.isPreview) {
|
||||||
this.access = true
|
this.access = true
|
||||||
} else if (!!this.token) {
|
} 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) {
|
} else if (code) {
|
||||||
this.getToken({code, corpId, suiteId, isAppForm: true}).then(() => {
|
this.getToken({code, corpId, suiteId, isAppForm: true}).then(() => {
|
||||||
let {query, path, hash} = this.$route
|
let {query, path, hash} = this.$route
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="form-config">
|
<div class="form-config">
|
||||||
<div class="config-group">
|
<div class="config-group">
|
||||||
<div class="config-item">
|
<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>
|
||||||
<div class="config-item__select--wrapper" v-if="['radio', 'select', 'checkbox'].includes(config.type)">
|
<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">
|
<div class="config-item__select" v-for="(item, index) in config.options" :key="index">
|
||||||
@@ -174,7 +174,7 @@ export default {
|
|||||||
|
|
||||||
let index = 0
|
let index = 0
|
||||||
if (this.config.answer) {
|
if (this.config.answer) {
|
||||||
this.config.options.forEach((v, i) => {
|
this.config.options?.forEach((v, i) => {
|
||||||
if (v.label === this.config.answer) {
|
if (v.label === this.config.answer) {
|
||||||
index = i
|
index = i
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,6 +174,8 @@ export default {
|
|||||||
tips: "提交成功!感谢参与",
|
tips: "提交成功!感谢参与",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
this.$u.toast(err || "提交失败")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user