lsc 3 years ago
parent
commit
95b6d6534c

+ 1 - 1
src/App.vue

@@ -164,7 +164,7 @@ export default {
       this.$router.push(path);
     },
     getnCount() {
-      let params = { oid: this.$store.state.userinfo.organizeid };
+      let params = { oid: this.$store.state.userInfo.organizeid };
       this.ajax
         .get(this.$store.state.api + "getClassCByOid", params)
         .then((res) => {

+ 1 - 1
src/components/pages/Tgrouping.vue

@@ -231,7 +231,7 @@ export default {
     },
     getGroup() {
       this.isLoading = true;
-      let params = { page: this.page };
+      let params = { oid:this.$store.state.userInfo.organizeid,page: this.page };
       this.ajax
         .get(this.$store.state.api + "getTGroupAdmin", params)
         .then((res) => {

+ 5 - 4
src/components/pages/class.vue

@@ -73,7 +73,7 @@
       </div>
     </div>
     <el-dialog
-      title="添加学生"
+      title="添加班级"
       :visible.sync="dialogVisible"
       :append-to-body="true"
       width="25%"
@@ -82,7 +82,7 @@
     >
       <el-form>
         <el-form-item label="所属学校" :label-width="formLabelWidth">
-          <el-select v-model="oid">
+          <el-select v-model="oid" disabled>
             <el-option
               v-for="item in schoolArray"
               :key="item.id"
@@ -149,6 +149,7 @@ export default {
     this.page = 1;
     this.getClass();
     this.getOrg();
+    this.oid = this.$store.state.userInfo.organizeid;
   },
   methods: {
     tableRowClassName({ row, rowIndex }) {
@@ -193,7 +194,7 @@ export default {
     getClass() {
       this.isLoading = true;
       let params = {
-        username: "",
+        username: this.$store.state.userInfo.organizeid,
         cn: this.sClassName,
         page: this.page,
       };
@@ -236,7 +237,7 @@ export default {
         this.$message.error("班级名字不能为空");
         return;
       }
-      let params = [{ oid: this.oid, n: this.className, cuid: "0" }];
+      let params = [{ oid: this.oid, n: this.className, cuid: this.$store.state.userInfo.userid }];
       let params2 = { pid: this.oid, n: this.className };
       let a = 1
       $.ajax({

+ 8 - 4
src/components/pages/curriculum.vue

@@ -447,9 +447,9 @@ export default {
     },
     //获取分组分类
     getGroup() {
-      let params = {};
+      let params = { oid: this.$store.state.userInfo.organizeid };
       this.ajax
-        .get(this.$store.state.api + "getGroup", params)
+        .get(this.$store.state.api + "getGroupByOid", params)
         .then((res) => {
           this.groupList = res.data[0];
           console.log(this.groupList);
@@ -487,9 +487,13 @@ export default {
     },
     getCourse() {
       this.isLoading = true;
-      let params = { cn: this.courseName, page: this.page };
+      let params = {
+        oid: this.$store.state.userInfo.organizeid,
+        cn: this.courseName,
+        page: this.page,
+      };
       this.ajax
-        .get(this.$store.state.api + "getCourseAdmin", params)
+        .get(this.$store.state.api + "getCourseAdminByOid", params)
         .then((res) => {
           this.isListAjax = false;
           this.isLoading = false;

+ 6 - 1
src/components/pages/find.vue

@@ -356,6 +356,7 @@ export default {
             p: this.fileList1.length ? this.fileList1[0].url : "",
             t: this.contentTitle,
             c: this.detail.replace(/%/g, "%25"),
+            u: this.$store.state.userInfo.userid,
           },
         ];
         this.ajax
@@ -386,7 +387,11 @@ export default {
     //查询文章
     getFind() {
       this.isLoading = true;
-      let params = { pid: this.pid, page: this.page };
+      let params = {
+        oid: this.$store.state.userInfo.organizeid,
+        pid: this.pid,
+        page: this.page,
+      };
       this.ajax
         .get(this.$store.state.api + "getFindAdmin", params)
         .then((res) => {

+ 13 - 5
src/components/pages/home.vue

@@ -466,8 +466,9 @@ export default {
     },
     //获取专区
     getZone() {
+      let params = { oid: this.$store.state.userInfo.organizeid };
       this.ajax
-        .get(this.$store.state.api + "getZone", "")
+        .get(this.$store.state.api + "getZone", params)
         .then((res) => {
           console.log(res.data[0]);
           this.zoneList = res.data[0];
@@ -507,7 +508,7 @@ export default {
         return;
       }
       if (this.time()) {
-        let params = [{ n: this.zoneName, cuid: "0" }];
+        let params = [{ n: this.zoneName, cuid: "0",oid:this.$store.state.userInfo.organizeid }];
         this.ajax
           .post(this.$store.state.api + "addZone", params)
           .then((res) => {
@@ -584,7 +585,7 @@ export default {
     //搜索获取课程
     Search() {
       this.checkList = [];
-      let params = { t: this.searchClassName };
+      let params = { t: this.searchClassName,oid:this.$store.state.userInfo.organizeid };
       this.ajax
         .get(this.$store.state.api + "getSearchCourse", params)
         .then((res) => {
@@ -707,7 +708,13 @@ export default {
       }
       if (this.time()) {
         let params = [
-          { p: list[0].url, url: this.bannerCourse.courseId, uid: "0", n: "0" },
+          {
+            p: list[0].url,
+            url: this.bannerCourse.courseId,
+            uid: this.$store.state.userInfo.userid,
+            n: "0",
+            oid: this.$store.state.userInfo.organizeid,
+          },
         ];
         this.ajax
           .post(this.$store.state.api + "addBanner", params)
@@ -728,8 +735,9 @@ export default {
     },
     //获取banner
     getBanner() {
+      let params = { oid: this.$store.state.userInfo.organizeid };
       this.ajax
-        .get(this.$store.state.api + "getBanner", "")
+        .get(this.$store.state.api + "getBanner", params)
         .then((res) => {
           this.tableData = res.data[0];
           console.log(this.tableData);

+ 2 - 0
src/components/pages/new.vue

@@ -15,6 +15,7 @@
               placeholder="筛选的学校"
               style="min-width: 150px; margin-right: 5px"
               @change="search('school')"
+              disabled
             >
               <el-option label="所有学校" value=""></el-option>
               <el-option
@@ -194,6 +195,7 @@ export default {
     },
   },
   created(){
+    this.schoolX = this.$store.state.userInfo.organizeid;
     this.getStudent();
     console.log(this.$store.state.userInfo);
   }

+ 2 - 2
src/components/pages/notice.vue

@@ -196,7 +196,7 @@ export default {
     //获取通知
     getNotice() {
       this.isLoading = true;
-      let params = { page: this.page };
+      let params = { oid: this.$store.state.userInfo.organizeid,page: this.page };
       this.ajax
         .get(this.$store.state.api + "getNotice", params)
         .then((res) => {
@@ -228,7 +228,7 @@ export default {
           {
             t: this.noticeTitle,
             nc: this.detail.replace(/%/g, "%25"),
-            s:0,
+            s:this.$store.state.userInfo.userid,
             r:0
           },
         ];

+ 1 - 1
src/components/pages/score.vue

@@ -186,7 +186,7 @@ export default {
     },
     getData() {
       this.isLoading = true;
-      let params = { page: this.page };
+      let params = { page: this.page,oid:this.$store.state.userInfo.organizeid };
       this.ajax
         .get(this.$store.state.api + "getScoreHistory", params)
         .then((res) => {

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

@@ -215,7 +215,10 @@ export default {
     },
     getData() {
       this.isLoading = true;
-      let params = { page: this.page };
+      let params = {
+        page: this.page,
+        oid: this.$store.state.userInfo.organizeid,
+      };
       this.ajax
         .get(this.$store.state.api + "getScoreProduct", params)
         .then((res) => {
@@ -379,6 +382,7 @@ export default {
             p: this.fileList[0].url,
             s: this.score,
             nu: this.scoreNum,
+            oid:this.$store.state.userInfo.organizeid
           },
         ];
         this.ajax

+ 8 - 3
src/components/pages/tutor.vue

@@ -286,7 +286,7 @@ export default {
       updateJson: {},
       dialogVisible3: false,
       updateId: "",
-      isListAjax:false,
+      isListAjax: false,
     };
   },
   methods: {
@@ -408,6 +408,7 @@ export default {
             t: this.contentTitle,
             c: this.detail.replace(/%/g, "%25"),
             p: this.fileList1.length ? this.fileList1[0].url : "",
+            u: this.$store.state.userInfo.userid,
           },
         ];
         this.ajax
@@ -438,11 +439,15 @@ export default {
     //查询文章
     getHome() {
       this.isLoading = true;
-      let params = { pid: this.pid, page: this.page };
+      let params = {
+        oid: this.$store.state.userInfo.organizeid,
+        pid: this.pid,
+        page: this.page,
+      };
       this.ajax
         .get(this.$store.state.api + "findHome", params)
         .then((res) => {
-          this.isListAjax = false
+          this.isListAjax = false;
           this.isLoading = false;
           this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
           res.data[0].filter((element) => {

+ 10 - 6
src/components/pages/userManage.vue

@@ -12,6 +12,7 @@
               v-model="schoolX"
               placeholder="筛选的学校"
               @change="getClassX"
+              disabled
               style="margin-right: 5px; width: 150px"
             >
               <el-option label="所有学校" value=""></el-option>
@@ -346,6 +347,8 @@ export default {
         .get(this.$store.state.api + "getAllOrg", "")
         .then((res) => {
           this.schoolList = res.data[0];
+          this.schoolX = this.$store.state.userInfo.organizeid
+          this.getClassX();
           console.log(res.data[0]);
         })
         .catch((err) => {
@@ -371,13 +374,14 @@ export default {
       let params = {
         cn: this.studentnameA,
         cclass: this.cclass,
-        school: this.schoolX,
+        // school: this.schoolX,
+        school: this.$store.state.userInfo.organizeid,
         class: this.classX,
         type: this.typeX,
         page: this.page,
       };
       this.ajax
-        .get(this.$store.state.api + "getAllUser", params)
+        .get(this.$store.state.api + "getAllUserSchool", params)
         .then((res) => {
           this.isListAjax = false;
           this.isLoading = false;
@@ -488,7 +492,7 @@ export default {
         .catch(() => {});
     },
     getnCount() {
-      let params = { oid: this.$store.state.userinfo.organizeid };
+      let params = { oid: this.$store.state.userInfo.organizeid };
       this.ajax
         .get(this.$store.state.api + "getClassCByOid", params)
         .then((res) => {
@@ -546,8 +550,7 @@ export default {
           "用户名称",
           "用户角色(填老师或学生)",
           "用户手机号码",
-          "用户密码",
-          "所属学校",
+          "用户密码"
         ];
         // const filterVal = ["name", "phone", "school", "grade"];
         // const list = [
@@ -634,7 +637,8 @@ export default {
             obj.type = v["用户角色(填老师或学生)"];
             obj.phone = v["用户手机号码"];
             obj.password = v["用户密码"];
-            obj.school = v["所属学校"];
+            // obj.school = v["所属学校"];
+            obj.school = _this.$store.state.userInfo.schoolName;
             arr.push(obj);
           });
           console.log(arr);

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

@@ -321,7 +321,11 @@ export default {
     //获取所有作业
     getWorks() {
       this.isLoading = true;
-      let params = { cn: this.studentnameA, page: this.page };
+      let params = {
+        oid: this.$store.state.userInfo.organizeid,
+        cn: this.studentnameA,
+        page: this.page,
+      };
       this.ajax
         .get(this.$store.state.api + "getAllWorks", params)
         .then((res) => {