11wqe1 3 semanas atrás
pai
commit
cf5a7a1620

+ 1 - 0
src/assets/stuImg/ai6dui.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1774246495151" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4840" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M840.021333 267.690667a42.666667 42.666667 0 0 1 1.621334 60.330666l-384 405.333334a42.666667 42.666667 0 0 1-61.141334 0.853333l-213.333333-213.333333a42.666667 42.666667 0 1 1 60.330667-60.373334l182.357333 182.314667 353.834667-373.504a42.666667 42.666667 0 0 1 60.330666-1.621333z" p-id="4841" fill="#ffffff"></path></svg>

+ 229 - 0
src/components/pages/pptEasy/commpont/aidia.vue

@@ -0,0 +1,229 @@
+<template>
+    <div class="ai_dialog">
+        <el-dialog
+            :visible.sync="dialogVisibleAiD"
+            width="700px"
+            :show-close="false"
+            :before-close="handleClose">
+            <template #title>
+                <div class="title_container">
+                    <div>{{ lang.ssCourseCenter }}</div>
+                    <div class="close_btn">×</div>
+                </div>
+            </template>
+            <div class="course_type_container">
+                <div class="course_type_title">
+                    {{ lang.ssCourseType }}
+                </div>
+                <div class="course_type_select">
+                    <el-select v-model="courseType" :placeholder="lang.ssSelectCourseType" @change="typeChange">
+                        <el-option 
+                            v-for="item in courseTypeList" 
+                            :key="item.id" 
+                            :label="item.name" 
+                            :value="item.id">
+                            <span>{{ item.name }}</span>
+                        </el-option>
+                    </el-select>
+                </div>
+            </div>
+            <div class="course_type_list">
+                    <div v-for="item in courseList" @click="selectCourse(item)" :key="item.id" class="course_item" :class="{'selected': selectedCourseList.includes(item)}">
+                        <img class="course_item_selected" 
+                            src="../../../../assets/stuImg/ai6dui.svg" 
+                            v-if="selectedCourseList.includes(item)"
+                        alt="">
+                        <img class="course_item_img" :src="item.img" alt="">
+                        <div class="course_item_name">
+                            {{ item.name }}
+                        </div>
+                    </div>
+            </div>
+            <div class="course_item_footer">
+                <div>{{ lang.ssSelectedCourse.replace(/\*/g, selectedCourseList.length) }}</div>
+                <div class="confirm_btn" @click="confirmAddCourse">
+                    <img src="../../../../assets/stuImg/ai6dui.svg" alt="">
+                    {{ lang.ssConfirm }}
+                </div>
+            </div>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+export default {
+    name: 'aiDialog',
+    data() {
+        return {
+            dialogVisibleAiD: true,
+            courseType: '',
+            courseTypeList: [],
+            courseList: [],
+            allCourseList: [],
+            selectedCourseList: []
+        }
+    },
+    methods: {
+        openDialog() {
+            this.dialogVisibleAiD = true;
+        },
+        handleClose(done) {
+            this.dialogVisibleAiD = false;
+            done();
+        },
+        selectCourse(item) {
+            if(this.selectedCourseList.includes(item)) {
+                this.selectedCourseList = this.selectedCourseList.filter(item => item.id !== item.id);
+            } else {
+                this.selectedCourseList.push(item);
+            }
+        },
+        confirmAddCourse() {
+            let courseIds = this.selectedCourseList.map(item => item.id);
+            console.log(courseIds);
+        },
+        getCourseTypeList() {
+            let params = {
+                cl: 1,
+            };
+            this.ajax.get(this.$store.state.api + 'selectAiExp', params).then(res => {
+                let data = res.data
+                this.courseTypeList = data[0];
+                this.courseTypeList.unshift({id: '', name: this.lang.ssAll});
+                this.courseList = data[1];
+                this.allCourseList = data[1];
+            })
+            .catch(err => {
+                console.error(err);
+            });
+        },
+        typeChange(value) {
+            console.log(value);
+            if(value === '') {
+                this.courseList = this.allCourseList;
+            } else {
+                this.courseList = this.allCourseList.filter(item => item.levA === value);
+            }
+        }
+    },
+    mounted() {
+        this.getCourseTypeList();
+    }
+}
+</script>
+<style scoped>
+.ai_dialog >>> .el-dialog {
+    border-radius: 10px;
+}
+.title_container {
+    display: flex;
+    font-size: 16px;
+    font-weight: bold;
+    justify-content: space-between;
+    align-items: center;
+}
+.close_btn {
+    cursor: pointer;
+    background-color: #F5F6F6;
+    padding: 3px 5px;
+    border-radius: 5px;
+}
+.course_type_container {
+    display: flex;
+    flex-direction: column;
+    gap: 10px;
+    border-bottom: 1px solid #E5E5E5;
+    padding-bottom: 10px;
+}
+.course_type_title {
+    font-size: 14px;
+}
+.course_type_select >>> .el-select {
+    width: 33%;
+    border-radius: 10px;
+    background-color: #F5F6F6;
+}
+.course_type_select >>> .el-select .el-input__inner {
+    background-color: #FAFCFE;
+    border-radius: 10px;
+}
+.ai_dialog >>> .el-dialog__body {
+    padding: 10px 20px;
+    display: flex;
+    flex-direction: column;
+    gap: 20px;
+}
+.course_type_list {
+    display: grid;
+    grid-template-columns: repeat(3, 1fr);
+    max-height: 400px;
+    height: 350px;
+    overflow-y: auto;
+    gap: 15px;
+}
+.course_item {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    gap: 10px;
+    height: 160px;
+    padding: 15px;
+    box-sizing: border-box;
+    border-radius: 10px;
+    position: relative;
+    border: 1px solid #E5E5E5;
+    cursor: pointer;
+}
+.course_item.selected {
+    border: 2px solid #FF9400;
+}
+.course_item_selected {
+    position: absolute;
+    top: 10px;
+    right: 10px;
+    width: 20px;
+    height: 20px;
+    padding: 2px;
+    box-sizing: border-box;
+    border-radius: 50%;
+    background-color: #FF9400;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    color: #fff;
+    font-size: 12px;
+    font-weight: bold;
+    z-index: 1;
+}
+.course_item_img {
+    width: 100%;
+    border-radius: 5px;
+    object-fit: contain;
+}
+.course_item_footer {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 10px;
+    box-sizing: border-box;
+    border-top: 1px solid #E5E5E5;
+}
+.confirm_btn {
+    background-color: #FF9400;
+    color: #fff;
+    font-size: 14px;
+    border-radius: 10px;
+    display: flex;
+    padding: 7px 10px;
+    align-items: center;
+    justify-content: center;
+    /* padding: 5px 10px; */
+    border: none;
+    cursor: pointer;
+}
+.confirm_btn img {
+    width: 22px;
+    height: 22px;
+    margin-right: 5px;
+}
+</style>

+ 1 - 0
src/components/pages/studentManageNew/component/table.vue

@@ -1511,6 +1511,7 @@ export default {
           });
           this.stuEditvisible = false;
           this.refresh();
+          this.$emit("getGrade");
           this.popBoxdia = false;
           this.EditStubox = "";
           this.stuEditInfo = {};

+ 0 - 5
src/components/pages/studentManageNew/index.vue

@@ -23,7 +23,6 @@
         <el-menu
           :default-active="activeId"
           class="el-menu-vertical-demo"
-          v-loading="editGradeLoading"
         >
           <el-submenu v-for="item in tableData" :index="item.id" :key="item.id">
             <template slot="title">
@@ -357,7 +356,6 @@ export default {
           });
           console.error(err);
           this.addOp3('1', "", { type: "grade_edit" }, err)
-          this.editGradeLoading = false;
         });
     },
 
@@ -433,7 +431,6 @@ export default {
     },
     //获取年级列表
     getGrade(val = 0) {
-      this.editGradeLoading = true;
       let params = {
         oid: this.oid,
       };
@@ -476,10 +473,8 @@ export default {
 
           this.cascaderData = box3;
           this.tableData = box1;
-          this.editGradeLoading = false;
         })
         .catch((err) => {
-          this.editGradeLoading = false;
           this.boxLoading = false;
           console.error(err);
         });

+ 4 - 0
src/lang/cn.json

@@ -2019,6 +2019,10 @@
   "ssPPtUpProgress":"上传进度(*)",
   "ssBilibiliVideoSearchKeyword":"请输入关键词",
   "ssEditGrade":"编辑年级",
+  "ssCourseCenter":"课程中心",
+  "ssCourseType":"课程类型",
+  "ssSelectCourseType":"请选择课程类型",
+  "ssSelectedCourse":"已选择 * 个课程",
   "ssConfirmDeleteClassStudentone":"确认移除*学生?"
 
 

+ 4 - 0
src/lang/en.json

@@ -2032,6 +2032,10 @@
   "ssPPtUpProgress":"Uploading (*)",
   "ssBilibiliVideoSearchKeyword":"Please enter a keyword",
   "ssEditGrade":"Edit Grade",
+  "ssCourseCenter":"Course Center",
+  "ssCourseType":"Course Type",
+  "ssSelectCourseType":"Please select course type",
+  "ssSelectedCourse":"Selected * courses",
   "ssConfirmDeleteClassStudentone":"Confirm remove * student?"
 
 }

+ 4 - 0
src/lang/hk.json

@@ -2032,6 +2032,10 @@
   "ssPPtUpProgress":"上傳進度(*)",
   "ssBilibiliVideoSearchKeyword":"請輸入關鍵詞",
   "ssEditGrade":"修改年級",
+  "ssCourseCenter":"課程中心",
+  "ssCourseType":"課程類型",
+  "ssSelectCourseType":"請選擇課程類型",
+  "ssSelectedCourse":"已選擇 * 個課程",
   "ssConfirmDeleteClassStudentone":"確定移除 * 名學生嗎?"