Переглянути джерело

update:目标信息发布功能完善

DESKTOP-HI4L4AH\Administrator 5 місяців тому
батько
коміт
9f35c7c41a
2 змінених файлів з 20 додано та 17 видалено
  1. 2 2
      config/index.js
  2. 18 15
      src/views/education/goalOriented.vue

+ 2 - 2
config/index.js

@@ -20,8 +20,8 @@ module.exports = {
         }
       },
       '/aiApi': {
-        // target: 'http://127.0.0.1:8089/',
-        target: 'http://121.37.47.26:8080/',
+        target: 'http://127.0.0.1:8089/',
+        // target: 'http://121.37.47.26:8080/',
         changeOrigin: true,
         pathRewrite: {
           '/aiApi': ''

+ 18 - 15
src/views/education/goalOriented.vue

@@ -674,14 +674,15 @@ export default {
         type: 'warning'
       }).then(() => {
         let data = {
-          courseId: row.courseId,
-          gradeId: row.gradeId,
-          gOriented: row.gOriented,
-          pScoreStd: row.pScoreStd,
-          sScoreStd: row.sScoreStd,
-          rScoreStd: row.rScoreStd,
-          eScoreStd: row.eScoreStd,
-          nScoreStd: row.nScoreStd,
+          id: row.id,
+          // courseId: row.courseId,
+          // gradeId: row.gradeId,
+          // gOriented: row.gOriented,
+          // pScoreStd: row.pScoreStd,
+          // sScoreStd: row.sScoreStd,
+          // rScoreStd: row.rScoreStd,
+          // eScoreStd: row.eScoreStd,
+          // nScoreStd: row.nScoreStd,
           publishFlag: 1
         }
         this.publishGPSREN(data)
@@ -697,13 +698,15 @@ export default {
     publishGPSREN (data) {
       publishGoal(data).then((res) => {
         console.log(res)
-      //   if (res.data.code === 200) {
-      //     this.$message.success('发布成功')
-      //   } else {
-      //     this.$message.error(res.data.message)
-      //   }
-      // }).catch((error) => {
-      //   console.log(error)
+        if (res.data.code === 1) {
+          this.$message.success('发布成功')
+          //刷新页面数据
+          this.getGoalInfoList()
+        } else {
+          this.$message.error(res.data.message)
+        }
+      }).catch((error) => {
+        console.log(error)
       })
     },