lideyin 5 年之前
父节点
当前提交
74db417be0
共有 1 个文件被更改,包括 12 次插入3 次删除
  1. 12 3
      src/modules/examwork/view/onlineExam.vue

+ 12 - 3
src/modules/examwork/view/onlineExam.vue

@@ -704,6 +704,7 @@
 </template>
 
 <script>
+import { mapState } from "vuex";
 import { EXAM_TYPE, EXAM_WORK_API, CORE_API } from "@/constants/constants.js";
 import moment from "moment";
 import ckeditor from "@/components/ckeditor.vue";
@@ -1301,7 +1302,10 @@ export default {
       });
 
       let url2 =
-        CORE_API + "/org/property/" + this.rootOrgId + "/WEIXIN_ANSWER_ENABLED";
+        CORE_API +
+        "/org/property/" +
+        this.user.rootOrgId +
+        "/WEIXIN_ANSWER_ENABLED";
       this.$httpWithMsg.get(url2).then(response => {
         let res = response.data;
         this.rootOrgWenXinAnswerEnabled = res == true;
@@ -1309,14 +1313,16 @@ export default {
           this.form.properties.WEIXIN_ANSWER_ENABLED = false;
         }
       });
+      let that = this;
       this.getOrgProperty("IDENTIFICATION_OF_LIVING_BODY_SCHEME", function(
         res
       ) {
-        this.form.properties.IDENTIFICATION_OF_LIVING_BODY_SCHEME = res;
+        that.form.properties.IDENTIFICATION_OF_LIVING_BODY_SCHEME = res;
       });
     },
     getOrgProperty: function(propkey, callback) {
-      let url = CORE_API + "/org/property/" + this.rootOrgId + "/" + propkey;
+      let url =
+        CORE_API + "/org/property/" + this.user.rootOrgId + "/" + propkey;
       this.$httpWithMsg.get(url).then(response => {
         let res = response.data;
         callback(res);
@@ -1372,6 +1378,9 @@ export default {
     _this = this;
     this.examId = this.$route.params.id;
     this.init();
+  },
+  computed: {
+    ...mapState({ user: state => state.user })
   }
 };
 </script>