diff --git a/src/apps/AppAskForm/AppForm.vue b/src/apps/AppAskForm/AppForm.vue
index 1a096ea0..a059902e 100644
--- a/src/apps/AppAskForm/AppForm.vue
+++ b/src/apps/AppAskForm/AppForm.vue
@@ -1,9 +1,9 @@
@@ -24,29 +24,40 @@ export default {
},
computed: {
...mapState(['user']),
- showDetail() {
- return !!this.$route.query?.id && this.access
- },
+ showDetail: v => !!v.$route.query?.id && v.access,
errMsg() {
this.access && (this.err = "表单不存在")
return this.err || "数据读取中..."
},
- errStatus() {
- return !!this.err ? "error" : "loading"
+ errStatus: v => !!v.err ? "error" : "loading",
+ isPreview: v => !!v.$route.query?.preview,
+ actions() {
+ const config = {
+ default: {
+ pageTitle: "调查问卷",
+ common: "appquestionnairetemplate",
+ detail: "appquestionnairetemplate",
+ preview: true //是否有预览模式的存在,若存在需要无登录查询模板数据
+ },
+ AppAssessmentScoreTask: {
+ pageTitle: "考核评分",
+ common: "appassessmentscortask",
+ detail: "appassessmentscoretemplate",
+ preview: false, //是否有预览模式的存在,若存在需要无登录查询模板数据
+ back: true,//填写完是否要返回按钮
+ }
+ }
+ return config[this.$route.query.from || "default"]
},
- isPreview() {
- return !!this.$route.query?.preview
- },
- action: v => v.$route.query.action || "appquestionnairetemplate"
},
methods: {
...mapActions(['getCode', 'getToken']),
checkAccess(review) {
- let {code, suiteId, id} = this.$route.query
- if (this.isPreview) {
+ const {code, suiteId, id, result} = this.$route.query
+ if (this.isPreview || result) {
this.access = true
} else if (!!this.user.token) {
- this.$http.post(`/app/${this.action}/commitCheck`, null, {
+ this.$http.post(`/app/${this.actions.common}/commitCheck`, null, {
params: {id}
}).then(res => {
if (res?.code == 0) {
@@ -54,7 +65,7 @@ export default {
} else if (res?.code == 401) {
this.checkAccess()
} else {
- this.err = "无法获取表单"
+ this.err = res?.msg || "无法获取表单"
}
}).catch(err => {
this.err = err
@@ -70,7 +81,7 @@ export default {
this.checkAccess()
},
onShow() {
- document.title = '问卷调查'
+ document.title = this.actions.pageTitle
wx.hideOptionMenu()
},
}
diff --git a/src/apps/AppAskForm/components/formDetail.vue b/src/apps/AppAskForm/components/formDetail.vue
index 4521206f..b024c4c3 100644
--- a/src/apps/AppAskForm/components/formDetail.vue
+++ b/src/apps/AppAskForm/components/formDetail.vue
@@ -6,15 +6,17 @@
成绩
分
+ 返回
{{ form.title || "标题" }}
- {{ form.tableExplain }}
-
-
+
+
+
+
@@ -27,7 +29,7 @@
op.fieldValue=detail.value">
-
+
{{ option.label }}
@@ -36,7 +38,7 @@
op.fieldValue=detail.value">
-
+
-
-
+
+
@@ -64,11 +66,13 @@