Browse Source

添加课程加上权限

lsc 2 năm trước cách đây
mục cha
commit
ace691b08b

+ 1 - 1
dist/index.html

@@ -25,4 +25,4 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.ffe203bd14f05b5fb4034c7773190547.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.85f48b0184f614b2b8d9.js></script><script type=text/javascript src=./static/js/vendor.5381b06bfaaab9dbd007.js></script><script type=text/javascript src=./static/js/app.0be8d1e1f77aee1869d6.js></script></body></html><script>document.domain = document.domain.split(".").slice(-2).join(".");</script>
+    }</style><link href=./static/css/app.f93ee4d2d7a30bbd0dde52294fd97abf.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.85f48b0184f614b2b8d9.js></script><script type=text/javascript src=./static/js/vendor.5381b06bfaaab9dbd007.js></script><script type=text/javascript src=./static/js/app.b6111fea0380a9eb47e7.js></script></body></html><script>document.domain = document.domain.split(".").slice(-2).join(".");</script>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/css/app.f93ee4d2d7a30bbd0dde52294fd97abf.css


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/css/app.f93ee4d2d7a30bbd0dde52294fd97abf.css.map


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/css/app.ffe203bd14f05b5fb4034c7773190547.css.map


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/app.0be8d1e1f77aee1869d6.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/app.0be8d1e1f77aee1869d6.js.map


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/app.b6111fea0380a9eb47e7.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/app.b6111fea0380a9eb47e7.js.map


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/static/js/manifest.85f48b0184f614b2b8d9.js.map


+ 96 - 29
src/components/pages/addCourse.vue

@@ -186,10 +186,28 @@
                       display: flex;
                       flex-flow: row nowrap;
                       flex-direction: row;
-                      align-items: baseline; ;
+                      align-items: baseline;
+                      margin: 0 30px;
                     "
                   >
-                    <div style="flex: 0.5 1 0%; margin: 0 50px 0px">
+                    <!-- <div style="margin: 0 80px">
+                      <div class="bInfo_title">
+                        选择项目成员
+                      </div>
+                      <div
+                        class="addPeople"
+                        @click="addPP"
+                        v-if="this.checkboxList.length == 0"
+                      >添加成员</div>
+                      <div class="addPeople" @click="addPP" v-else>已添加,点击查看</div>
+                    </div> -->
+                    <div style="margin: 0 30px 0 0">
+                      <div class="bInfo_title">添加权限</div>
+                      <div class="addPeople" @click="dialogVisibleClass = true">
+                        添加权限
+                      </div>
+                    </div>
+                    <div style="flex: 0.5 1 0%; margin: 0">
                       <div class="bInfo_title">协同编辑</div>
                       <div
                         class="addPeople"
@@ -225,7 +243,10 @@
             </div>
           </div>
           <div class="rightBox" v-if="this.steps == 2">
-            <div class="basic_box" style="padding: 20px 30px 0px !important;box-sizing: border-box;">
+            <div
+              class="basic_box"
+              style="padding: 20px 30px 0px !important; box-sizing: border-box"
+            >
               <!-- <div
                 style="
                   color: #b8b8b8;
@@ -358,7 +379,14 @@
                     ></div>
                   </div>
                 </div>
-                <div style="margin: 50px 0px 10px; font-size: 1.5em;font-weight: 700;color: #0f7eff;">
+                <div
+                  style="
+                    margin: 50px 0px 10px;
+                    font-size: 1.5em;
+                    font-weight: 700;
+                    color: #0f7eff;
+                  "
+                >
                   添加任务
                 </div>
                 <div
@@ -376,12 +404,7 @@
                           align-items: center;
                         "
                       >
-                        <div
-                          style="
-                          "
-                        >
-                          任务名称
-                        </div>
+                        <div style="">任务名称</div>
                         <div>
                           <input
                             type="text"
@@ -1315,8 +1338,8 @@
           </div>
           <div
             style="
-              width: calc(100% - 17% - 25px);
-              background: #fff;
+              width: calc(100% - 20px);
+              background: rgb(255, 255, 255);
               border-radius: 10px;
               min-height: 550px;
               min-width: 800px;
@@ -1328,8 +1351,8 @@
                 <img src="../../assets/icon/right.png" alt />
               </div>
               <div style="font-weight: bold">成功</div>
-              <div>您的课程编号</div>
-              <div class="number">{{ number }}</div>
+              <!-- <div>您的课程编号</div>
+              <div class="number">{{ number }}</div> -->
               <div class="success_button">
                 <div class="look_course" @click="isNoFinsh">
                   邀请老师协同编辑
@@ -1513,6 +1536,30 @@
         <el-button type="primary" @click="isAddPP">确定</el-button>
       </span>
     </el-dialog>
+    <el-dialog
+      title="添加权限"
+      :visible.sync="dialogVisibleClass"
+      :append-to-body="true"
+      width="400px"
+      height="80%"
+      :before-close="handleClose"
+      class="addNewPP"
+    >
+      <div class="people" style="height: 300px">
+        <div class="people_top">
+          <div class="people_nav">选择班级</div>
+        </div>
+        <el-checkbox-group v-model="checkboxList2" class="people_name">
+          <el-checkbox v-for="item in grade" :key="item.id" :label="item.id">{{
+            item.name ? item.name : "暂无班级可选"
+          }}</el-checkbox>
+        </el-checkbox-group>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisibleClass = false">取 消</el-button>
+        <el-button type="primary" @click="isAddClass">确定</el-button>
+      </span>
+    </el-dialog>
     <el-dialog
       title="创建问卷调查"
       :visible.sync="dialogVisible5"
@@ -1885,6 +1932,7 @@ export default {
       dialogVisible6: false,
       dialogVisible7: false,
       dialogVisible8: false,
+      dialogVisibleClass: false,
       publicTool: 0,
       searchPeople: "",
       userid: this.$route.query.userid,
@@ -1943,6 +1991,7 @@ export default {
       ],
       studentJuri: [],
       checkboxList: [],
+      checkboxList2: [],
       number: "",
       tTitle: "",
       tdetail: "",
@@ -1962,6 +2011,7 @@ export default {
       toolIndex: 0,
       cidType: 0,
       answerQ: "",
+      grade: [],
     };
   },
   computed: {
@@ -2581,7 +2631,21 @@ export default {
     searchStudent() {
       this.getStudent();
     },
-
+    //获取班级列表
+    getClass() {
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectClassBySchool", params)
+        .then((res) => {
+          this.grade = res.data[0];
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
     getChapterData(e, i, j, ic, type) {
       e.stopPropagation();
       this.updataC = true;
@@ -2669,9 +2733,7 @@ export default {
                   },
                 ]),
           astudent:
-            this.checkboxList.length > 0
-              ? JSON.stringify(this.checkboxList)
-              : [],
+            this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
           see: this.isTeacherSee == true ? 0 : 1,
           chapters: JSON.stringify(this.unitJson).replaceAll(/%/g, "%25"),
           template: this.cTemplate != "undefined" ? this.cTemplate : "",
@@ -2679,7 +2741,7 @@ export default {
         },
       ];
       this.ajax
-        .post(this.$store.state.api + "addWorkNew", params)
+        .post(this.$store.state.api + "addWorkNew2", params)
         .then((res) => {
           this.$message({
             message: "新增成功",
@@ -2720,9 +2782,7 @@ export default {
           brief: this.courseText.replace(/%/g, "%25"),
           cover: this.cover.length > 0 ? JSON.stringify(this.cover) : "",
           astudent:
-            this.checkboxList.length > 0
-              ? JSON.stringify(this.checkboxList)
-              : [],
+            this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
           see: this.isTeacherSee == true ? 0 : 1,
           chapters: JSON.stringify(this.unitJson).replaceAll(/%/g, "%25"),
           template: this.myWord != "undefined" ? this.myWord : [],
@@ -2731,7 +2791,7 @@ export default {
         },
       ];
       this.ajax
-        .post(this.$store.state.api + "updateWorkNew", params)
+        .post(this.$store.state.api + "updateWorkNew2", params)
         .then((res) => {
           this.$message({
             message: "修改成功",
@@ -2800,6 +2860,9 @@ export default {
         });
       }
     },
+    isAddClass() {
+      this.dialogVisibleClass = false;
+    },
     getTemplate() {
       this.ajax
         .get(this.$store.state.api + "getCourseTemplateT", "")
@@ -3280,10 +3343,12 @@ export default {
             this.courseText = res.data[0][0].brief;
             this.cover = JSON.parse(res.data[0][0].cover);
             this.noneBtnImg = this.cover.length >= 1;
-            this.checkboxList =
-              res.data[0][0].course_student.length > 0
-                ? JSON.parse(res.data[0][0].course_student)
-                : [];
+            // this.checkboxList =
+            //   res.data[0][0].course_student.length > 0
+            //     ? JSON.parse(res.data[0][0].course_student)
+            //     : [];
+            this.checkboxList2 =
+              res.data[0][0].juri ? res.data[0][0].juri.split(",") : [];
             this.isTeacherSee =
               res.data[0][0].is_teacher_look == 0 ? true : false;
             this.myWord = res.data[0][0].template;
@@ -3353,6 +3418,7 @@ export default {
   },
   created() {
     this.getStudent();
+    this.getClass();
     this.getTemplate();
     this.selectType();
     this.loading = false;
@@ -3456,12 +3522,13 @@ export default {
   position: relative;
 }
 .basic_box_success {
-  width: 80%;
+  width: 100%;
   min-height: 455px;
-  margin: 50px auto;
+  padding: 50px 0;
   position: relative;
   text-align: center;
   border-bottom: 1px solid #bfbfbf;
+  box-sizing: border-box;
 }
 .info_title {
   font-size: 1.5em;

+ 1 - 5
src/components/pages/student.vue

@@ -406,14 +406,10 @@ export default {
     getClass() {
       this.isLoading = true;
       let params = {
-        // username: this.$store.state.userInfo.userid,
-        cu: "",
         oid: this.oid,
-        cn: "",
-        page: this.page,
       };
       this.ajax
-        .get(this.$store.state.api + "selectClass", params)
+        .get(this.$store.state.api + "selectClassBySchool", params)
         .then((res) => {
           this.isLoading = false;
           this.classJuri = res.data[0];

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác