浏览代码

feat: 学生毕业要求达成度调试完毕

zhangjie 1 年之前
父节点
当前提交
dad237f978

+ 3 - 2
src/assets/styles/base.scss

@@ -173,11 +173,12 @@ body {
     align-items: stretch;
     justify-content: space-between;
     min-height: 30px;
-    margin: -10px 0 10px -10px;
+    margin: 0 0 10px;
     color: $--color-text-dark;
 
     > h3 {
-      font-size: 17px;
+      font-size: 16px;
+      font-weight: 600;
     }
     .el-icon-question {
       margin-left: 10px;

+ 12 - 0
src/components/base/TrainingPlanSelect.vue

@@ -29,6 +29,7 @@ export default {
     clearable: { type: Boolean, default: true },
     professionalId: { type: String },
     professionalRequired: { type: Boolean, default: false },
+    defaultSelect: { type: Boolean, default: false },
   },
   data() {
     return {
@@ -60,6 +61,8 @@ export default {
       if (this.professionalRequired && !this.professionalId) return;
       const res = await conditionTrainingPlanList(this.professionalId);
       this.optionList = res;
+
+      if (this.defaultSelect && !this.value) this.selectDefault();
     },
     select() {
       this.$emit("input", this.selected);
@@ -68,6 +71,15 @@ export default {
         this.optionList.find((item) => item.id === this.selected)
       );
     },
+    selectDefault() {
+      const defaultData = this.optionList[0];
+      if (defaultData) {
+        this.selected = defaultData.id;
+        this.$emit("input", this.selected);
+        this.$emit("change", defaultData);
+        this.$emit("default-selected", defaultData);
+      }
+    },
   },
 };
 </script>

+ 1 - 1
src/modules/target/api.js

@@ -218,5 +218,5 @@ export const studentTargetListPage = (datas) => {
   return $postParam("/api/admin/obe/student_requirement/page", datas);
 };
 export const studentTargetDetail = (datas) => {
-  return $postParam("/api/admin/course/degree/report/view", datas);
+  return $postParam("/api/admin/obe/student_requirement/detail", datas);
 };

+ 5 - 1
src/modules/target/components/requirement-statistics/RequirementStatisticsRadar.vue

@@ -3,7 +3,11 @@
     <el-row type="flex" :gutter="20">
       <el-col :span="12">
         <div class="chart-box" style="height: 520px">
-          <v-chart v-if="chartOption" :option="chartOption"></v-chart>
+          <v-chart
+            v-if="chartOption"
+            :option="chartOption"
+            autoresize
+          ></v-chart>
         </div>
       </el-col>
       <el-col :span="12">

+ 31 - 23
src/modules/target/components/student-target/DetailStudentTarget.vue

@@ -6,48 +6,53 @@
     :close-on-press-escape="false"
     append-to-body
     fullscreen
+    @opened="openedHandle"
   >
-    <div slot="title">{{ rowData.name }}毕业要求达成情况</div>
+    <div slot="title">{{ rowData.studentName }}毕业要求达成情况</div>
 
     <div class="part-box part-box-pad">
-      <div class="part-title">
-        <h2>个人与本院对比情况</h2>
-        <div class="chart-box" style="height: 400px">
-          <v-chart v-if="chartOption" :option="chartOption"></v-chart>
-        </div>
+      <div class="part-box-head">
+        <h3>个人与本院对比情况</h3>
+      </div>
+      <div class="chart-box" style="height: 400px">
+        <v-chart v-if="chartOption" :option="chartOption" autoresize></v-chart>
       </div>
     </div>
 
     <div class="part-box part-box-pad">
-      <div class="part-title">
-        <h2>个人毕业要求达成度情况</h2>
+      <div class="part-box-head">
+        <h3>个人毕业要求达成度情况</h3>
       </div>
 
-      <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
+      <el-form ref="FilterForm" label-position="left" inline>
         <el-form-item label-width="0px">
-          <semester-select v-model="filter.semesterId"></semester-select>
+          <semester-select
+            v-model="filter.semesterId"
+            :clearable="false"
+          ></semester-select>
         </el-form-item>
         <el-form-item label-width="0px">
           <el-button type="primary" @click="search">查询</el-button>
         </el-form-item>
       </el-form>
 
-      <el-table ref="TableList" :data="dataList">
+      <el-table ref="TableList" :data="tableData">
         <el-table-column label="课程名称(代码)" min-width="200">
           <template slot-scope="scope">
             {{ scope.row.courseName }}({{ scope.row.courseCode }})
           </template>
         </el-table-column>
-        <el-table-column prop="semesterName" label="所属学期">
+        <el-table-column prop="semesterName" label="所属学期" width="160">
+        </el-table-column>
+        <el-table-column prop="score" label="期末成绩" width="80">
         </el-table-column>
-        <el-table-column prop="score" label="期末成绩"> </el-table-column>
         <el-table-column
           v-for="(column, cindex) in columns"
           :key="cindex"
           :label="column"
         >
           <template slot-scope="scope">
-            {{ scope.row.requirements[cindex] }}
+            {{ scope.row.requirementDetailList[cindex].studentDegree }}
           </template>
         </el-table-column>
       </el-table>
@@ -87,9 +92,12 @@ export default {
     open() {
       this.modalIsShow = true;
     },
+    openedHandle() {
+      this.search();
+    },
     async search() {
       const res = await studentTargetDetail({
-        cultureProgramId: this.rowData.id,
+        cultureProgramId: this.rowData.cultureProgramId,
         studentCode: this.rowData.studentCode,
         ...this.filter,
       });
@@ -107,27 +115,28 @@ export default {
       const option = {
         color: ["#3a5ae5", "#fe5d4e"],
         grid: {
-          left: 40,
-          top: 40,
-          right: 80,
+          left: 30,
+          top: 60,
+          right: 20,
           bottom: 50,
           containLabel: true,
         },
         legend: {
           top: 0,
           data: ["个人达成情况", "专业达成情况"],
-          itemWidth: 12,
+          itemWidth: 16,
           itemHeight: 4,
           itemGap: 22,
-          left: 40,
+          left: "center",
         },
         xAxis: {
           type: "category",
-          name: "课程目标",
           nameTextStyle: {
             color: "#363D59",
           },
-          data: this.dataList.map((item) => item.requirementName),
+          data: this.dataList.map(
+            (item, index) => `${index + 1}.${item.requirementName}`
+          ),
           axisLabel: {
             color: "#6F7482",
             interval: 0,
@@ -152,7 +161,6 @@ export default {
         },
         yAxis: {
           type: "value",
-          name: "达成值",
           min: 0,
           max: 1,
           interval: 0.1,

+ 1 - 1
src/modules/target/views/CourseOutlineManage.vue

@@ -197,7 +197,7 @@ export default {
     },
     async toDelete(row) {
       const confirm = await this.$confirm(
-        `确定要删除课程大纲【${row.name}】吗?`,
+        `确定要删除课程大纲【${row.outlineName}】吗?`,
         "提示",
         {
           type: "warning",

+ 5 - 0
src/modules/target/views/StudentTarget.vue

@@ -7,6 +7,9 @@
             <training-plan-select
               v-model="filter.cultureProgramId"
               placeholder="培养方案"
+              :clearable="false"
+              default-select
+              @default-selected="search"
             ></training-plan-select>
           </el-form-item>
           <el-form-item label="学生学号/姓名:">
@@ -104,6 +107,8 @@ export default {
     async getList() {
       if (!this.checkPrivilege("list", "list")) return;
 
+      if (!this.filter.cultureProgramId) return;
+
       const datas = {
         ...this.filter,
         pageNumber: this.current,