刘洋 1 سال پیش
والد
کامیت
c57e44b884

+ 15 - 1
src/modules/questions/views/Course.vue

@@ -86,7 +86,7 @@
           label="更新时间"
           width="170"
         />
-        <el-table-column label="操作" width="160">
+        <el-table-column label="操作" width="220">
           <div slot-scope="scope">
             <!-- <el-button
                 size="mini"
@@ -113,6 +113,14 @@
             >
               删除
             </el-button>
+            <el-button
+              size="mini"
+              plain
+              type="danger"
+              @click="toKnowledge(scope.row)"
+            >
+              知识点
+            </el-button>
           </div>
         </el-table-column>
       </el-table>
@@ -533,6 +541,12 @@ export default {
           });
       });
     },
+    //知识点
+    toKnowledge(row) {
+      this.$router.push({
+        path: "/questions/property_info/" + row.id,
+      });
+    },
     //删除多条数据
     deleteByIds() {
       if (this.selectedCourseIds.length === 0) {

+ 7 - 2
src/modules/questions/views/GenPaper.vue

@@ -398,7 +398,12 @@
 
     <!-- paper-view-frame -->
     <div v-if="paperPreviewUrl" class="design-preview-frame">
-      <iframe :src="paperPreviewUrl" frameborder="0"></iframe>
+      <iframe
+        :src="paperPreviewUrl"
+        frameborder="0"
+        width="1000"
+        height="800"
+      ></iframe>
     </div>
   </section>
 </template>
@@ -1066,7 +1071,7 @@ export default {
           this.exportDialog = false;
           return;
         }
-        this.paperPreviewUrl = "";
+        // this.paperPreviewUrl = "";
 
         const res = await downloadByApi(() => {
           return paperPdfDownloadApi({

+ 18 - 3
src/modules/questions/views/PropertyInfo.vue

@@ -273,7 +273,7 @@ export default {
     },
   },
   created() {
-    this.coursePropertyId = this.$route.params.id;
+    // this.coursePropertyId = this.$route.params.id;
     this.searchProperty();
   },
   mounted() {
@@ -384,10 +384,25 @@ export default {
         this.courseProperty = JSON.parse(coursePropertyStorge);
         this.getCourses(this.courseProperty.courseId);
       }
+      // this.$http
+      //   .get(QUESTION_API + "/property/all/" + this.coursePropertyId)
+      //   .then((response) => {
+      //     this.treeData = response.data;
+      //     for (var i = 0; i < this.treeData.length; i++) {
+      //       var property = this.treeData[i];
+      //       this.ids.push(property.id);
+      //     }
+      //     this.loading = false;
+      //   });
       this.$http
-        .get(QUESTION_API + "/property/all/" + this.coursePropertyId)
+        .post(
+          QUESTION_API +
+            "/property/all/by/course?courseId=" +
+            this.$route.params.id
+        )
         .then((response) => {
-          this.treeData = response.data;
+          this.coursePropertyId = response.data.coursePropertyId;
+          this.treeData = response.data.propertys;
           for (var i = 0; i < this.treeData.length; i++) {
             var property = this.treeData[i];
             this.ids.push(property.id);