lsc il y a 1 an
Parent
commit
7c571fee41

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.e45272cf35736ff176e122f4fd709ebb.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.d2a60cf4f8d4649786e6.js></script><script type=text/javascript src=./static/js/app.aa625cc07e39b2027709.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.8d2ea177d4df01b6f1cd80ca478c69db.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.d2a60cf4f8d4649786e6.js></script><script type=text/javascript src=./static/js/app.b777ec7a7d994cd2265f.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/css/app.8d2ea177d4df01b6f1cd80ca478c69db.css


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/css/app.8d2ea177d4df01b6f1cd80ca478c69db.css.map


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/css/app.e45272cf35736ff176e122f4fd709ebb.css.map


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/js/app.aa625cc07e39b2027709.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/js/app.b777ec7a7d994cd2265f.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/js/app.b777ec7a7d994cd2265f.js.map


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


+ 1 - 0
src/App.vue

@@ -102,6 +102,7 @@ export default {
         "/scourse",
         "/studentCheckCourse",
         "/tcData",
+        "/studioCourse"
         // "/eventCenter",
         // "/addRace",
         // "/anliDetail",

+ 1205 - 0
src/components/pages/Ttype2Studio.vue

@@ -0,0 +1,1205 @@
+<template>
+  <div
+    class="pb_content"
+    style="
+      background: unset;
+      overflow: auto;
+      padding: 20px;
+      margin: 0;
+      box-sizing: border-box;
+    "
+  >
+    <div
+      style="
+        position: absolute;
+        width: 95%;
+        top: 0;
+        height: 100%;
+        overflow: auto;
+        left: 50%;
+        transform: translateX(-50%);
+      "
+    >
+      <div
+        class="pb_content_body"
+        style="
+          background: #fff;
+          padding: 10px 25px;
+          box-sizing: border-box;
+          border-radius: 5px;
+        "
+      >
+        <div class="pb_head">
+          <span>分组管理</span>
+          <!-- <span>备注:教师可以根据课程、班级条件筛选学生并查看该学生信息</span> -->
+        </div>
+        <div class="student_head">
+          <div class="student_search">
+            <el-button
+              size="small"
+              type="primary"
+              @click="dialogVisible = true"
+              v-if="step == 0"
+              >添加学校</el-button
+            >
+            <div class="student_search" v-if="step == 0">
+              <span style="margin-right: 10px">
+                <el-input
+                  placeholder="请输入班级名称"
+                  v-model="sSchoolName"
+                  clearable
+                >
+                </el-input>
+              </span>
+              <el-button type="primary" @click="searchSchool">查询</el-button>
+            </div>
+            <div v-if="step == 1" class="student_search1">
+              <el-breadcrumb
+                separator-class="el-icon-arrow-right"
+                style="margin-top: 15px"
+              >
+                <el-breadcrumb-item>
+                  <span @click="step = 0;" style="cursor: pointer"
+                    >学校列表</span
+                  ></el-breadcrumb-item
+                >
+                <el-breadcrumb-item>
+                  <span style="color: rgb(15, 126, 255)">分类列表</span>
+                </el-breadcrumb-item>
+              </el-breadcrumb>
+              <div>
+                <el-button
+                  size="small"
+                  type="primary"
+                  @click="dialogVisible6 = true"
+                  >修改Banner</el-button
+                >
+                <!-- <el-button
+                  size="small"
+                  type="primary"
+                  @click="dialogVisible2 = true"
+                  >添加分类</el-button
+                > -->
+              </div>
+            </div>
+            <div v-if="step == 2" class="student_search1">
+              <el-breadcrumb
+                separator-class="el-icon-arrow-right"
+                style="margin-top: 15px"
+              >
+                <el-breadcrumb-item>
+                  <span @click="step = 0" style="cursor: pointer"
+                    >学校列表</span
+                  ></el-breadcrumb-item
+                >
+                <el-breadcrumb-item>
+                  <span @click="step = 1" style="cursor: pointer"
+                    >分类列表</span
+                  >
+                </el-breadcrumb-item>
+                <el-breadcrumb-item>
+                  <span style="color: rgb(15, 126, 255)">子分类列表</span>
+                </el-breadcrumb-item>
+              </el-breadcrumb>
+              <el-button
+                size="small"
+                type="primary"
+                @click="dialogVisible4 = true"
+                >添加子分类</el-button
+              >
+            </div>
+          </div>
+        </div>
+        <el-table
+          ref="table"
+          :data="tableData"
+          stripe
+          border
+          :header-cell-style="{ background: '#f1f1f1', 'text-align': 'center' }"
+          :cell-style="{ 'text-align': 'center' }"
+          style="width: 100%"
+          :height="tableHeight"
+          v-loading="isLoading"
+          v-if="step == 0"
+        >
+          <el-table-column prop="name" label="学校名称" min-width="70">
+          </el-table-column>
+          <el-table-column prop="date" label="操作" min-width="30">
+            <template slot-scope="scope">
+              <div class="pb_buttonBox">
+                <el-button
+                  size="mini"
+                  type="primary"
+                  @click="selectType(scope.row.id)"
+                >
+                  查看分类
+                </el-button>
+                <el-button
+                  size="mini"
+                  type="primary"
+                  @click="updateS(scope.row.id, scope.row.name)"
+                  >修改</el-button
+                >
+                <el-button
+                  size="mini"
+                  type="primary"
+                  @click="deleteSchool(scope.row.id)"
+                  >删除</el-button
+                >
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-table
+          ref="table"
+          :data="tableData1"
+          stripe
+          border
+          :header-cell-style="{ background: '#f1f1f1', 'text-align': 'center' }"
+          :cell-style="{ 'text-align': 'center' }"
+          style="width: 100%"
+          :height="tableHeight"
+          v-loading="isLoading"
+          v-if="step == 1"
+        >
+          <el-table-column prop="name" label="分类名称" min-width="70">
+          </el-table-column>
+          <el-table-column prop="date" label="操作" min-width="30">
+            <template slot-scope="scope">
+              <div class="pb_buttonBox">
+                <el-button
+                  size="mini"
+                  type="primary"
+                  @click="selectSType(scope.row.id)"
+                >
+                  查看子分类
+                </el-button>
+                <!-- <el-button
+                  size="mini"
+                  type="primary"
+                  @click="updateP(scope.row.id, scope.row.name)"
+                  >修改</el-button
+                >
+                <el-button
+                  size="mini"
+                  type="primary"
+                  @click="deletePtype(scope.row.id)"
+                  >删除</el-button
+                > -->
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-table
+          ref="table"
+          :data="tableData2"
+          stripe
+          border
+          :header-cell-style="{ background: '#f1f1f1', 'text-align': 'center' }"
+          :cell-style="{ 'text-align': 'center' }"
+          style="width: 100%"
+          :height="tableHeight"
+          v-loading="isLoading"
+          v-if="step == 2"
+        >
+          <el-table-column prop="name" label="子分类名称" min-width="70">
+          </el-table-column>
+          <el-table-column prop="date" label="操作" min-width="30">
+            <template slot-scope="scope">
+              <div class="pb_buttonBox">
+                <!-- <el-button size="mini" type="primary" @click="selectType">
+                  查看子分类
+                </el-button> -->
+                <el-button
+                  size="mini"
+                  type="primary"
+                  @click="updateSPType(scope.row.id, scope.row.name)"
+                  >修改</el-button
+                >
+                <el-button
+                  size="mini"
+                  type="primary"
+                  @click="deleteStype(scope.row.id)"
+                  >删除</el-button
+                >
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div class="student_page" v-show="step == 0">
+        <el-pagination
+          background
+          layout="prev, pager, next"
+          :page-size="10"
+          :total="total"
+          v-if="page"
+          @current-change="handleCurrentChange"
+        ></el-pagination>
+      </div>
+      <div class="student_page" v-show="step == 1">
+        <el-pagination
+          background
+          layout="prev, pager, next"
+          :page-size="10"
+          :total="total1"
+          v-if="page1"
+          @current-change="handleCurrentChange1"
+        ></el-pagination>
+      </div>
+      <div class="student_page" v-show="step == 2">
+        <el-pagination
+          background
+          layout="prev, pager, next"
+          :page-size="10"
+          :total="total2"
+          v-if="page2"
+          @current-change="handleCurrentChange2"
+        ></el-pagination>
+      </div>
+    </div>
+    <el-dialog
+      title="添加学校"
+      :visible.sync="dialogVisible"
+      width="500px"
+      :before-close="handleClose"
+      class="dialog_diy"
+      center
+    >
+      <div class="addBox">
+        <span class="tian1">学校名称</span>
+        <el-input
+          v-model="schoolName"
+          style="width: 250px; margin: 15px 0px"
+          placeholder="请输入学校名称"
+        ></el-input>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="addSchool">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="修改学校"
+      :visible.sync="dialogVisible1"
+      width="500px"
+      :before-close="handleClose"
+      class="dialog_diy"
+      center
+    >
+      <div class="addBox">
+        <span class="tian1">学校名称</span>
+        <el-input
+          v-model="schoolName"
+          style="width: 250px; margin: 15px 0px"
+          placeholder="请输入学校名称"
+        ></el-input>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible1 = false">取 消</el-button>
+        <el-button type="primary" @click="updateSchool">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="添加分类"
+      :visible.sync="dialogVisible2"
+      width="500px"
+      :before-close="handleClose"
+      class="dialog_diy"
+      center
+    >
+      <div class="addBox">
+        <span class="tian1">分类名称</span>
+        <el-input
+          v-model="typeName"
+          style="width: 250px; margin: 15px 0px"
+          placeholder="请输入分类名称"
+        ></el-input>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible2 = false">取 消</el-button>
+        <el-button type="primary" @click="addType">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="修改分类"
+      :visible.sync="dialogVisible3"
+      width="500px"
+      :before-close="handleClose"
+      class="dialog_diy"
+      center
+    >
+      <div class="addBox">
+        <span class="tian1">分类名称</span>
+        <el-input
+          v-model="typeName"
+          style="width: 250px; margin: 15px 0px"
+          placeholder="请输入分类名称"
+        ></el-input>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible3 = false">取 消</el-button>
+        <el-button type="primary" @click="updatePtype">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="添加子分类"
+      :visible.sync="dialogVisible4"
+      width="500px"
+      :before-close="handleClose"
+      class="dialog_diy"
+      center
+    >
+      <div class="addBox">
+        <span class="tian1">子分类名称</span>
+        <el-input
+          v-model="sTypeName"
+          style="width: 250px; margin: 15px 0px"
+          placeholder="请输入子分类名称"
+        ></el-input>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible4 = false">取 消</el-button>
+        <el-button type="primary" @click="addStype">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="修改子分类"
+      :visible.sync="dialogVisible5"
+      width="500px"
+      :before-close="handleClose"
+      class="dialog_diy"
+      center
+    >
+      <div class="addBox">
+        <span class="tian1">子分类名称</span>
+        <el-input
+          v-model="sTypeName"
+          style="width: 250px; margin: 15px 0px"
+          placeholder="请输入子分类名称"
+        ></el-input>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible5 = false">取 消</el-button>
+        <el-button type="primary" @click="updateStype">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+      title="添加图片"
+      :visible.sync="dialogVisible6"
+      width="500px"
+      :before-close="handleClose"
+      class="dialog_diy"
+      center
+    >
+      <div>
+        <div class="dialogBox">
+          <span>添加图片</span>
+
+          <el-upload
+            :class="{ disUoloadSty: noneBtnImg }"
+            action="#"
+            list-type="picture-card"
+            :on-preview="handlePictureCardPreview"
+            :on-remove="handleRemove"
+            v-loading="uploadLoading"
+            :http-request="beforeUpload"
+            ref="upload"
+            :show-file-list="true"
+            :limit="1"
+            accept="image/*"
+          >
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </div>
+        <div class="dialogBox" style="color: #bebebe; margin: 10px 0 0 0">
+          注:适宜上传banner尺寸为1218×300
+        </div>
+        <!-- <div class="dialogBox" style="margin: 10px 0 0 0">
+          <span>Banner课程链接</span>
+          <span style="max-width: 160px">{{ bannerCourse.title }}</span>
+          <el-button type="primary" size="medium" @click="addBannerUrlPop"
+            >选择课程</el-button
+          >
+        </div> -->
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible6 = false">取 消</el-button>
+        <el-button type="primary" @click="addBanner">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog :visible.sync="imgVisible">
+      <img width="100%" :src="dialogImageUrl" alt="" />
+    </el-dialog>
+    <el-dialog
+      title="添加链接"
+      :visible.sync="dialogVisible7"
+      width="500px"
+      :before-close="handleClose"
+      class="dialog_diy"
+      style="text-align: center"
+      center
+    >
+      <div>
+        <el-card class="box-card">
+          <div slot="header" class="cardHead">
+            <el-input
+              v-model="searchClassName"
+              placeholder="请输入需要添加的课程"
+              @keypress.native.enter="Search"
+            ></el-input>
+            <el-button type="text" style="margin: 0 0 0 20px" @click="Search"
+              >搜索</el-button
+            >
+          </div>
+          <div class="cardList">
+            <div v-for="item in courseList" :key="item.courseId">
+              <el-popover placement="top-start" trigger="hover">
+                <p style="max-width: 380px">课程名称: {{ item.title }}</p>
+                <p style="max-width: 380px">简介: {{ item.brief }}</p>
+                <el-radio
+                  :label="item"
+                  slot="reference"
+                  v-model="checkBannerCourse"
+                  ><span>课程名称:</span
+                  ><span>{{ item.title }}</span></el-radio
+                >
+              </el-popover>
+            </div>
+            <!-- </el-checkbox-group> -->
+            <div v-if="courseList.length == 0">暂无数据</div>
+          </div>
+        </el-card>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible7 = false">取 消</el-button>
+        <el-button type="primary" @click="setBannerUrl">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      tableHeight: "500px",
+      isLoading: false,
+      formLabelWidth: "100px",
+      tableData: [],
+      tableData1: [],
+      tableData2: [],
+      fileList: [],
+      schoolName: "",
+      typeName: "",
+      bannerCourse: "",
+      sTypeName: "",
+      searchClassName: "",
+      checkBannerCourse: "",
+      noneBtnImg: false,
+      isBanner: false,
+      page: 1,
+      total: 0,
+      page1: 1,
+      total1: 0,
+      page2: 1,
+      total2: 0,
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      dialogVisible: false,
+      dialogVisible1: false,
+      dialogVisible2: false,
+      dialogVisible3: false,
+      dialogVisible4: false,
+      updateOid: "",
+      dialogVisible5: false,
+      dialogVisible6: false,
+      dialogVisible7: false,
+      step: 0,
+      pid: "",
+      imgVisible: false,
+      dialogImageUrl: "",
+      uploadLoading: false,
+      checkList: [],
+      courseList: [],
+      sSchoolName:"",
+    };
+  },
+  mounted() {
+    this.$nextTick(function () {
+      this.tableHeight =
+        window.innerHeight - this.$refs.table.$el.offsetTop - 200;
+      if (this.tableHeight <= 530) {
+        this.tableHeight = 530;
+      }
+      // 监听窗口大小变化
+      let self = this;
+      window.onresize = function () {
+        self.tableHeight =
+          window.innerHeight - self.$refs.table.$el.offsetTop - 200;
+        if (self.tableHeight <= 530) {
+          self.tableHeight = 530;
+        }
+      };
+    });
+  },
+  methods: {
+    goTo(path) {
+      this.$router.push(path);
+    },
+    time() {
+      if (!this.now) {
+        this.now = new Date().getTime();
+        return true;
+      } else {
+        let time = new Date().getTime();
+        if (time - this.now > 3000) {
+          this.now = time;
+          return true;
+        } else {
+          return false;
+        }
+      }
+    },
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    handleClose(done) {
+      done();
+    },
+    imgChange(file, fileList) {
+      var _tmp = this.fileList;
+      this.noneBtnImg = _tmp.length >= 1;
+    },
+    handleRemove(file) {
+      var _tmp = this.fileList;
+      for (var i = 0, len = _tmp.length; i < len; i++) {
+        if (_tmp[i].uid == file.uid) {
+          _tmp.splice(i, 1);
+          break;
+        }
+        this.fileList = _tmp;
+      }
+      this.noneBtnImg = _tmp.length >= 1;
+    },
+    handlePictureCardPreview(file) {
+      this.dialogImageUrl = this.fileList[0].url;
+      this.imgVisible = true;
+    },
+    handleCurrentChange(val) {
+      this.page = val;
+      this.selectSchool();
+    },
+    handleCurrentChange1(val) {
+      this.page1 = val;
+      this.selectType();
+    },
+    handleCurrentChange2(val) {
+      this.page2 = val;
+      this.selectSType();
+    },
+    beforeUpload(data) {
+      this.$refs.upload.uploadFiles;
+      this.uploadLoading = true;
+      var file = data.file;
+      var credentials = {
+        accessKeyId: "AKIATLPEDU37QV5CHLMH",
+        secretAccessKey: "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",
+      }; //秘钥形式的登录上传
+      window.AWS.config.update(credentials);
+      window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+      var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+      var _this = this;
+
+      if (file) {
+        var params = {
+          Key:
+            file.name.split(".")[0] +
+            new Date().getTime() +
+            "." +
+            file.name.split(".")[1],
+          ContentType: file.type,
+          Body: file,
+          "Access-Control-Allow-Credentials": "*",
+          ACL: "public-read",
+        }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+        var options = {
+          partSize: 2048 * 1024 * 1024,
+          queueSize: 2,
+          leavePartsOnError: true,
+        };
+        bucket
+          .upload(params, options)
+          .on("httpUploadProgress", function (evt) {
+            //这里可以写进度条
+            // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
+          })
+          .send(function (err, data) {
+            _this.uploadLoading = false;
+            if (err) {
+              var a = _this.$refs.upload.uploadFiles;
+              a.splice(a.length - 1, a.length);
+              _this.$message.error("上传失败");
+            } else {
+              //上传成功处理
+              _this.fileList.push({
+                name: file.name,
+                url: data.Location,
+                uid: file.uid,
+              });
+              console.log(data.Location);
+              _this.imgChange();
+            }
+          });
+      }
+    },
+    addBanner() {
+      if (this.isBanner == true) {
+        this.$confirm(
+          "您已经添加过Banner了,如果您再提交将覆盖上次提交的Banner!",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+          }
+        )
+          .then(() => {
+            var list = this.fileList;
+            if (list.length == 0) {
+              this.$message.error("请上传需要添加的banner");
+              return;
+            }
+            if (this.time()) {
+              let params = [
+                {
+                  p: list[0].url,
+                  url: "",
+                  uid: this.userid,
+                  oid: this.updateOid,
+                },
+              ];
+              this.ajax
+                .post(this.$store.state.api + "addBanner", params)
+                .then((res) => {
+                  this.$message({
+                    message: "添加成功",
+                    type: "success",
+                  });
+                  this.dialogVisible6 = false;
+                  this.init();
+                })
+                .catch((err) => {
+                  this.$message.error("添加失败");
+                  console.error(err);
+                });
+            }
+          })
+          .catch(() => {});
+      } else {
+        var list = this.fileList;
+        if (list.length == 0) {
+          this.$message.error("请上传需要添加的banner");
+          return;
+        }
+        if (this.time()) {
+          let params = [
+            {
+              p: list[0].url,
+              url: "",
+              uid: this.userid,
+              oid: this.updateOid,
+            },
+          ];
+          this.ajax
+            .post(this.$store.state.api + "addBanner", params)
+            .then((res) => {
+              this.$message({
+                message: "添加成功",
+                type: "success",
+              });
+              this.dialogVisible6 = false;
+              this.init();
+            })
+            .catch((err) => {
+              this.$message.error("添加失败");
+              console.error(err);
+            });
+        }
+      }
+    },
+    setBannerUrl() {
+      if (this.checkBannerCourse == "") {
+        this.$message.error("请选择作为banner链接的课程");
+        return;
+      }
+      this.bannerCourse = this.checkBannerCourse;
+      this.dialogVisible7 = false;
+    },
+    searchSchool() {
+      this.page = 1;
+      this.selectSchool();
+    },
+    selectSchool() {
+      this.isLoading = true;
+      let params = {
+        cu: "",
+        cn: this.sSchoolName,
+        page: this.page,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectSchoolName", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.tableData = res.data[0];
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    addSchool() {
+      let params = [
+        {
+          n: this.schoolName,
+          cuid: this.userid,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "addSchoolAdmin", params)
+        .then((res) => {
+          this.$message({
+            message: "添加成功",
+            type: "success",
+          });
+          this.dialogVisible = false;
+          this.schoolName = "";
+          this.selectSchool();
+        })
+        .catch((err) => {
+          this.$message.error("添加失败");
+          console.error(err);
+        });
+    },
+    updateS(id, name) {
+      this.dialogVisible1 = true;
+      this.schoolName = name;
+      this.updateId = id;
+    },
+    updateP(id, name) {
+      this.dialogVisible3 = true;
+      this.typeName = name;
+      this.updateId = id;
+    },
+    updateSPType(id, name) {
+      this.dialogVisible5 = true;
+      this.sTypeName = name;
+      this.updateId = id;
+    },
+    updateSchool() {
+      let params = {
+        oid: this.updateId,
+        n: this.schoolName,
+      };
+      this.ajax
+        .get(this.$store.state.api + "updateSN", params)
+        .then((res) => {
+          this.$message({
+            message: "修改成功",
+            type: "success",
+          });
+          this.dialogVisible1 = false;
+          this.updateId = "";
+          this.schoolName = "";
+          this.selectSchool();
+        })
+        .catch((err) => {
+          this.$message.error("修改失败");
+          console.error(err);
+        });
+    },
+    deleteSchool(id) {
+      let params = [
+        {
+          id: id,
+        },
+      ];
+      this.ajax
+        .post(this.$store.state.api + "deleteSchoolAdmin", params)
+        .then((res) => {
+          this.$message({
+            message: "删除成功",
+            type: "success",
+          });
+          this.updateId = "";
+          this.schoolName = "";
+          this.selectSchool();
+        })
+        .catch((err) => {
+          this.$message.error("删除成功");
+          console.error(err);
+        });
+    },
+    selectType(id) {
+      this.tableData1 = [];
+      this.tableData2 = [];
+      this.step = 1;
+      this.updateOid = id;
+      let params = {
+        page: this.page1,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectStudioPtype", params)
+        .then((res) => {
+          this.total1 = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.tableData1 = res.data[0];
+          this.selectBanner();
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    selectBanner() {
+      let params = {
+        oid: this.updateOid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectBannerByOid", params)
+        .then((res) => {
+          if (res.data[0].length > 0) {
+            this.isBanner = true;
+          } else {
+            this.isBanner = false;
+          }
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    selectSType(pid) {
+      this.step = 2;
+      if (pid != undefined) {
+        this.pid = pid;
+      }
+      let params = {
+        pid: pid != undefined ? pid : this.pid,
+        oid: this.updateOid,
+        page: this.page2,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectStudioStype", params)
+        .then((res) => {
+          this.total2 = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.tableData2 = res.data[0];
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    addType() {
+      let params = {
+        n: this.typeName,
+        uid: this.userid,
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "addPtype", params)
+        .then((res) => {
+          this.$message({
+            message: "添加成功",
+            type: "success",
+          });
+          this.dialogVisible2 = false;
+          this.typeName = "";
+          this.selectType();
+        })
+        .catch((err) => {
+          this.$message.error("添加失败");
+          console.error(err);
+        });
+    },
+    updatePtype() {
+      let params = {
+        n: this.typeName,
+        tid: this.updateId,
+      };
+      this.ajax
+        .get(this.$store.state.api + "updatePtype", params)
+        .then((res) => {
+          this.$message({
+            message: "修改成功",
+            type: "success",
+          });
+          this.dialogVisible3 = false;
+          this.updateId = "";
+          this.typeName = "";
+          this.selectType();
+        })
+        .catch((err) => {
+          this.$message.error("修改失败");
+          console.error(err);
+        });
+    },
+    deletePtype(id) {
+      let params = {
+        tid: id,
+      };
+      this.ajax
+        .get(this.$store.state.api + "deletePtype", params)
+        .then((res) => {
+          this.$message({
+            message: "删除成功",
+            type: "success",
+          });
+          this.updateId = "";
+          this.typeName = "";
+          this.selectType();
+        })
+        .catch((err) => {
+          this.$message.error("删除失败");
+          console.error(err);
+        });
+    },
+    addStype() {
+      let params = {
+        n: this.sTypeName,
+        pid: this.pid,
+        uid: this.userid,
+        oid: this.updateOid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "addStudioStype", params)
+        .then((res) => {
+          this.$message({
+            message: "添加成功",
+            type: "success",
+          });
+          this.dialogVisible4 = false;
+          this.sTypeName = "";
+          this.selectSType();
+        })
+        .catch((err) => {
+          this.$message.error("添加成功");
+          console.error(err);
+        });
+    },
+    updateStype() {
+      let params = {
+        n: this.sTypeName,
+        tid: this.updateId,
+      };
+      this.ajax
+        .get(this.$store.state.api + "updateStudioPtype", params)
+        .then((res) => {
+          this.$message({
+            message: "修改成功",
+            type: "success",
+          });
+          this.dialogVisible5 = false;
+          this.updateId = "";
+          this.sTypeName = "";
+          this.selectSType();
+        })
+        .catch((err) => {
+          this.$message.error("修改失败");
+          console.error(err);
+        });
+    },
+    //打开添加弹窗
+    addBannerUrlPop() {
+      this.dialogVisible7 = true;
+      this.searchClassName = "";
+      this.Search();
+    },
+    init() {
+      this.searchClassName = "";
+      this.checkList = [];
+      this.courseList = [];
+      this.fileList = [];
+      this.$refs.upload ? (this.$refs.upload.uploadFiles.length = 0) : "";
+      this.noneBtnImg = false;
+      this.dialogImageUrl = "";
+      this.bannerCourse = "";
+      this.checkBannerCourse = "";
+    },
+    Search() {
+      this.checkList = [];
+      let params = { t: this.searchClassName, oid: this.updateOid };
+      this.ajax
+        .get(this.$store.state.api + "getSearchCourseByoid", params)
+        .then((res) => {
+          this.courseList = res.data[0];
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    deleteStype(id) {
+      let params = {
+        tid: id,
+      };
+      this.ajax
+        .get(this.$store.state.api + "deleteStudioPtype", params)
+        .then((res) => {
+          this.$message({
+            message: "删除成功",
+            type: "success",
+          });
+          this.updateId = "";
+          this.sTypeName = "";
+          this.selectSType();
+        })
+        .catch((err) => {
+          this.$message.error("删除失败");
+          console.error(err);
+        });
+    },
+  },
+  created() {
+    this.page = 1;
+    this.selectSchool();
+  },
+};
+</script>
+
+<style scoped>
+.pb_head > span:nth-child(2) {
+  font-size: 16px;
+  margin-left: 80px;
+  color: #ab582f;
+}
+.addBox {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.tian1 {
+  /* font-size: 16px; */
+  margin-right: 10px;
+}
+.pb_head {
+  margin: 0 !important;
+  width: 100% !important;
+}
+.student_page {
+  margin: 10px 0 0 45px;
+}
+.disUoloadSty >>> .el-upload--picture-card {
+  display: none; /* 上传按钮隐藏 */
+}
+.dialogBox {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.dialogBox span {
+  margin: 0 20px;
+}
+.student_head {
+  margin-top: 10px;
+  padding-bottom: 15px;
+  display: flex;
+  justify-content: space-between;
+}
+.student_search,
+.student_search1 {
+  display: flex;
+  width: 100%;
+  position: relative;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+  justify-content: flex-end;
+}
+
+.student_search1 {
+  justify-content: space-between;
+}
+
+.student_table >>> .el-table--border td {
+  border-right: 0px !important;
+}
+
+.student_table >>> .el-table,
+.student_table >>> .el-table__body-wrapper {
+  height: auto !important;
+}
+
+.el-table >>> .even_row {
+  background-color: #f1f1f1 !important;
+}
+
+.dialog_diy >>> .el-dialog__header {
+  padding: 9px 20px 10px;
+  background: #32455b !important;
+}
+.dialog_diy >>> .el-dialog__title {
+  color: #fff;
+  font-size: 15px;
+}
+.dialog_diy >>> .el-dialog__headerbtn {
+  top: 14px;
+}
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
+  color: #fff;
+}
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
+  color: #fff;
+}
+.dialog_diy >>> .el-dialog__body,
+.dialog_diy >>> .el-dialog__footer {
+  background: #fafafa;
+}
+.r_diy >>> .el-dialog__footer {
+  padding: 0;
+}
+.a_addBox {
+  height: 570px;
+  overflow: auto;
+}
+
+.workdates {
+  height: 100%;
+  position: absolute;
+  top: 0;
+  background: #fff;
+  overflow: auto;
+  z-index: 1;
+  width: 95%;
+  left: 50%;
+  transform: translateX(-50%);
+  padding: 20px;
+  box-sizing: border-box;
+}
+.cancelbox {
+  position: absolute;
+  z-index: 2;
+  left: 50%;
+  width: 95%;
+  transform: translateX(-50%);
+  display: flex;
+  justify-content: flex-end;
+  padding: 0 90px 0px 0px;
+  box-sizing: border-box;
+}
+.cardList {
+  font-size: 14px;
+  height: 360px;
+  overflow: auto;
+}
+.cardList div {
+  margin-bottom: 18px;
+}
+.cardList div:last-child {
+  margin-bottom: 0;
+}
+.cardHead {
+  display: flex;
+}
+</style>

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

@@ -3428,7 +3428,7 @@ export default {
           this.oid +
           "&org=" +
           this.org + 
-          + '&role=' + this.role
+          '&role=' + this.role
         );
       } else {
         if (this.cidType == 0) {

+ 30 - 123
src/components/pages/studio/addCourse.vue

@@ -213,8 +213,8 @@
                               v-model="courseTypeId"
                               v-if="CourseTypeJson[item.id].length > 0"
                             >
+                            <!-- @change="updateType(item1)" -->
                               <el-checkbox
-                                @change="updateType(item1)"
                                 v-for="item1 in CourseTypeJson[item.id]"
                                 :key="item1.id"
                                 :label="item1.id"
@@ -4427,7 +4427,7 @@ export default {
           },
         ];
         this.ajax
-          .post(this.$store.state.api + "updateStudentWorkNew4", params)
+          .post(this.$store.state.api + "updateStudioWorkNew4", params)
           .then((res) => {
             // this.$message({
             //   message: "修改成功",
@@ -4549,34 +4549,8 @@ export default {
       }
     },
     navSteps(s) {
-      let typeT = 1;
-      if (this.courseTypeId.length) {
-        let array = Object.keys(this.CourseTypeJson);
-        for (var t = 0; t < array.length; t++) {
-          var tp = array[t];
-          var tAarray = [];
-          for (var tt = 0; tt < this.CourseTypeJson[tp].length; tt++) {
-            tAarray.push(this.CourseTypeJson[tp][tt].id);
-          }
-          for (var tt = 0; tt < this.courseTypeId.length; tt++) {
-            if (tAarray.indexOf(this.courseTypeId[tt]) != -1) {
-              typeT++;
-            }
-          }
-        }
-      }
-      if (this.oid == "1c3b9def-8fbe-11ed-b13d-005056b86db5") {
-        typeT++;
-      }
-      if(this.CourseType.length == 0){
-        typeT = 3
-      }
-      if (this.courseName == "" || typeT != 3) {
-        if (typeT != 3) {
-          this.$message.error("分类为必选项目,请将信息补充完整后进行下一步");
-        } else {
-          this.$message.error("请将信息填写完整");
-        }
+      if (this.courseName == "" ) {
+        this.$message.error("请将信息填写完整");
         return;
       }
       if (this.cidttt == 0) {
@@ -4771,31 +4745,9 @@ export default {
       this.setVHeight();
     },
     nextSteps() {
-      let typeT = 1;
-      if (this.courseTypeId.length) {
-        let array = Object.keys(this.CourseTypeJson);
-        for (var t = 0; t < array.length; t++) {
-          var tp = array[t];
-          var tAarray = [];
-          for (var tt = 0; tt < this.CourseTypeJson[tp].length; tt++) {
-            tAarray.push(this.CourseTypeJson[tp][tt].id);
-          }
-          for (var tt = 0; tt < this.courseTypeId.length; tt++) {
-            if (tAarray.indexOf(this.courseTypeId[tt]) != -1) {
-              typeT++;
-            }
-          }
-        }
-      }
-      if (this.oid == "1c3b9def-8fbe-11ed-b13d-005056b86db5") {
-        typeT++;
-      }
-      if(this.CourseType.length == 0){
-        typeT = 3
-      }
       if (this.cidttt == 1) {
         if (this.steps == 1) {
-          if (this.courseName != "" && typeT == 3) {
+          if (this.courseName != "") {
             this.steps = 3;
             setTimeout(() => {
               this.checkEva(this.checkId);
@@ -4817,26 +4769,14 @@ export default {
               }
             }
           } else {
-            if (typeT != 3) {
-              this.$message.error(
-                "分类为必选项目,请将信息补充完整后进行下一步"
-              );
-            } else {
-              this.$message.error("请将信息填写完整");
-            }
+            this.$message.error("请将信息填写完整");
             return;
           }
           this.setMan();
         } else if (this.steps == 3) {
           if (this.cid == "" || this.cid == undefined) {
-            if (this.courseName == "" || typeT != 3) {
-              if (typeT != 3) {
-                this.$message.error(
-                  "分类为必选项目,请将信息补充完整后进行下一步"
-                );
-              } else {
-                this.$message.error("请将信息填写完整");
-              }
+            if (this.courseName == "") {
+              this.$message.error("请将信息填写完整");
               return;
             } else {
               this.addWork();
@@ -4847,14 +4787,8 @@ export default {
               }
             }
           } else {
-            if (this.courseName == "" || typeT != 3) {
-              if (typeT != 3) {
-                this.$message.error(
-                  "分类为必选项目,请将信息补充完整后进行下一步"
-                );
-              } else {
-                this.$message.error("请将信息填写完整");
-              }
+            if (this.courseName == "") {
+              this.$message.error("请将信息填写完整");
               return;
             } else {
               if (this.type != 2) {
@@ -4887,7 +4821,7 @@ export default {
         }
       } else {
         if (this.steps == 1) {
-          if (this.courseName != "" && typeT == 3) {
+          if (this.courseName != "") {
             if (this.cid == "" || this.cid == undefined) {
               this.addWork();
             } else {
@@ -4906,13 +4840,7 @@ export default {
             }
             this.steps++;
           } else {
-            if (typeT != 3) {
-              this.$message.error(
-                "分类为必选项目,请将信息补充完整后进行下一步"
-              );
-            } else {
-              this.$message.error("请将信息填写完整");
-            }
+            this.$message.error("请将信息填写完整");
             return;
           }
           this.setMan();
@@ -4927,14 +4855,8 @@ export default {
           }, 1000);
         } else if (this.steps == 3) {
           if (this.cid == "" || this.cid == undefined) {
-            if (this.courseName == "" || typeT != 3) {
-              if (typeT != 3) {
-                this.$message.error(
-                  "分类为必选项目,请将信息补充完整后进行下一步"
-                );
-              } else {
-                this.$message.error("请将信息填写完整");
-              }
+            if (this.courseName == "") {
+              this.$message.error("请将信息填写完整");
               return;
             } else {
               this.addWork();
@@ -4945,14 +4867,8 @@ export default {
               }
             }
           } else {
-            if (this.courseName == "" || typeT != 3) {
-              if (typeT != 3) {
-                this.$message.error(
-                  "分类为必选项目,请将信息补充完整后进行下一步"
-                );
-              } else {
-                this.$message.error("请将信息填写完整");
-              }
+            if (this.courseName == "") {
+              this.$message.error("请将信息填写完整");
               return;
             } else {
               if (this.type != 2) {
@@ -5041,7 +4957,7 @@ export default {
         },
       ];
       this.ajax
-        .post(this.$store.state.api + "deleteStudentWork", params)
+        .post(this.$store.state.api + "deleteStudioWork", params)
         .then((res) => {
           this.$message({
             message: "删除成功",
@@ -5103,7 +5019,7 @@ export default {
         },
       ];
       this.ajax
-        .post(this.$store.state.api + "deleteStudentToolSTT", params)
+        .post(this.$store.state.api + "deleteStudioToolSTT", params)
         .then((res) => {})
         .catch((err) => {
           console.error(err);
@@ -5118,7 +5034,7 @@ export default {
         },
       ];
       this.ajax
-        .post(this.$store.state.api + "deleteStudentToolST", params)
+        .post(this.$store.state.api + "deleteStudioToolST", params)
         .then((res) => {})
         .catch((err) => {
           console.error(err);
@@ -5132,7 +5048,7 @@ export default {
         },
       ];
       this.ajax
-        .post(this.$store.state.api + "deleteStudentToolS", params)
+        .post(this.$store.state.api + "deleteStudioToolS", params)
         .then((res) => {})
         .catch((err) => {
           console.error(err);
@@ -6702,7 +6618,7 @@ export default {
         },
       ];
       this.ajax
-        .post(this.$store.state.api + "addCourseWorkNew22", params)
+        .post(this.$store.state.api + "addStudioCourseWorkNew2", params)
         .then((res) => {
           console.log(this.steps);
           if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
@@ -6789,7 +6705,7 @@ export default {
         },
       ];
       this.ajax
-        .post(this.$store.state.api + "updateStudentWorkNew4", params)
+        .post(this.$store.state.api + "updateStudioWorkNew4", params)
         .then((res) => {
           if (
             this.steps != 1 &&
@@ -6885,7 +6801,7 @@ export default {
         },
       ];
       this.ajax
-        .post(this.$store.state.api + "updateStudentWorkNew22", params)
+        .post(this.$store.state.api + "updateStudioWorkNew2", params)
         .then((res) => {
           if (
             this.steps != 1 &&
@@ -8124,7 +8040,7 @@ export default {
           cid: this.cid,
         };
         this.ajax
-          .get(this.$store.state.api + "select_student_course_detail2", params)
+          .get(this.$store.state.api + "select_studio_course_detail2", params)
           .then((res) => {
             this.loading = true;
             this.unitJson = JSON.parse(res.data[0][0].chapters);
@@ -8216,7 +8132,7 @@ export default {
         cid: this.cid,
       };
       this.ajax
-        .get(this.$store.state.api + "select_student_course_detail", params)
+        .get(this.$store.state.api + "select_studio_course_detail", params)
         .then((res) => {
           console.log(res.data[2]);
           let unitJson = this.unitJson;
@@ -8327,7 +8243,7 @@ export default {
         },
       ];
       this.ajax
-        .post(this.$store.state.api + "restoreStudentWork", params)
+        .post(this.$store.state.api + "restoreStudioWork", params)
         .then((res) => {
           this.$message({
             message: "恢复成功",
@@ -8361,7 +8277,7 @@ export default {
         oid: this.oid && this.oid != "" ? this.oid : "",
       };
       this.ajax
-        .get(this.$store.state.api + "selectAllTypeS", params)
+        .get(this.$store.state.api + "selectAllTypeStudio", params)
         .then((res) => {
           this.CourseType = res.data;
           let _courseTypeId = [];
@@ -8371,14 +8287,8 @@ export default {
               this.courseTypeId[res.data[0][i].id] = "";
             }
             this.CourseTypeJson[res.data[0][i].id] = [];
-            if (this.oid == "1c3b9def-8fbe-11ed-b13d-005056b86db5") {
-              if (res.data[0][i].name == "赛道") {
-                this.CourseType[0][i].name = "项目类型";
-              }
-            }
 
             if (res.data[2].length == 0 && res.data[3].length == 0) {
-              if(this.org == '150e3120-9195-11ed-b13d-005056b86db5'){
                 for (var j = 0; j < res.data[1].length; j++) {
                   if (
                     this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
@@ -8390,9 +8300,6 @@ export default {
                     this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
                   }
                 }
-              }else{
-                this.CourseType = []
-              }
             } else {
               if (res.data[2].length > 0) {
                 for (var j = 0; j < res.data[2].length; j++) {
@@ -8430,7 +8337,7 @@ export default {
     },
     selectType() {
       this.ajax
-        .get(this.$store.state.api + "selectStudentType")
+        .get(this.$store.state.api + "selectStudioType")
         .then((res) => {
           this.CourseType = res.data;
           for (var i = 0; i < res.data[0].length; i++) {
@@ -8458,7 +8365,7 @@ export default {
         oid: this.oid,
       };
       this.ajax
-        .get(this.$store.state.api + "selectStudentTypeByOid", params)
+        .get(this.$store.state.api + "selectStudioTypeByOid", params)
         .then((res) => {
           for (var i = 0; i < res.data[0].length; i++) {
             for (var j = 0; j < res.data[1].length; j++) {
@@ -8480,7 +8387,7 @@ export default {
         oid: this.org,
       };
       this.ajax
-        .get(this.$store.state.api + "selectStudentTypeByOid", params)
+        .get(this.$store.state.api + "selectStudioTypeByOid", params)
         .then((res) => {
           for (var i = 0; i < res.data[0].length; i++) {
             for (var j = 0; j < res.data[1].length; j++) {

+ 57 - 56
src/components/pages/studio/course.vue

@@ -2,14 +2,14 @@
   <div class="pb_content" style="height: auto">
     <div class="pb_head top">
       <div>
-        <span>{{orgArray.indexOf(org) != -1 || oidArray.indexOf(oid) != -1 ? "师生项目" : "项目管理"}}</span>
+        <span>{{"工作管理"}}</span>
         <!-- <span class="subClick" @click="
           goTo('/works?userid=' + userid + '&oid=' + oid + '&org=' + org)
         ">评价管理</span> -->
       </div>
       <div class="student_button">
         <!-- <el-button type="primary" class="bgColor" @click="openCourse">协同编辑</el-button> -->
-        <el-button type="primary" class="bgColor" @click="goToCourse()" v-if="org != '150e3120-9195-11ed-b13d-005056b86db5'">添加项目</el-button>
+        <el-button type="primary" class="bgColor" @click="goToCourse()">添加项目</el-button>
       </div>
     </div>
     <div class="pb_content_body" style="height: 100%">
@@ -17,13 +17,17 @@
         <div class="choose">
           <div class="student_search">
             <span>项目筛选</span>
-            <el-select v-model="groupA" @change="search">
+            <el-select v-model="groupA" @change="search" v-if="role != '1'">
+              <el-option value="3" label="全部项目"></el-option>
               <el-option value="0" label="我的项目"></el-option>
               <el-option value="1" label="协同项目"></el-option>
-              <el-option value="2" label="他人项目"></el-option>
+              <el-option value="2" label="他人项目" v-if="oid != '1c3b9def-8fbe-11ed-b13d-005056b86db5'"></el-option>
+            </el-select>
+            <el-select v-model="groupA" @change="search" v-else>
+              <el-option value="4" label="全部项目"></el-option>
             </el-select>
           </div>
-          <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
+          <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"  v-if="CourseTypeJson[item.id].length">
             <span v-if="CourseTypeJson[item.id].length">{{ item.name }}</span>
             <el-select v-if="CourseTypeJson[item.id].length" v-model="courseTypeId[item.id]" placeholder="请选择" @change="getTypeName">
               <el-option label="全部" value="1">全部</el-option>
@@ -73,12 +77,12 @@
               </div>
             </div>
             <div class="three_bottom">
-              <div @click="goToCourse2(item.courseId)" v-if="org != '150e3120-9195-11ed-b13d-005056b86db5' && groupA != '2'">编辑</div>
+              <div @click="goToCourse2(item.courseId)" v-if="(item.userid == userid || item.course_teacher.indexOf(userid) != -1)">编辑</div>
               <div @click="get(item.courseId)">预览</div>
               <!-- 项目进展 -->
               <div @click="getA(item.courseId)">进展</div>
               <div @click="jump(item.courseId)">评论</div>
-              <div v-if="(item.userid == userid)" @click="deleteCourse(item.courseId)">
+              <div v-if="(item.userid == userid || role == '1')" @click="deleteCourse(item.courseId)">
                 删除
               </div>
             </div>
@@ -125,16 +129,18 @@
           </div>
           <div class="three_bottom">
             <!-- <div @click="jump(item.courseId)">查看内容</div> -->
-            <div v-if="org != '150e3120-9195-11ed-b13d-005056b86db5'" @click="
+            <div @click="
               goTo(
-                '/studentAddCourse?cid=' +
+                '/studioAddCourse?cid=' +
                 item.courseId +
                 '&userid=' +
                 userid +
                 '&oid=' +
                 oid +
                 '&org=' +
-                org
+                org+
+                '&role=' +
+                role 
               )
             ">
               编辑
@@ -188,7 +194,7 @@ export default {
       now: "",
       courseDetail: {},
       addCourse: {},
-      groupA: "0",
+      groupA: "3",
       classX: "",
       course: [],
       courseName: "",
@@ -235,30 +241,34 @@ export default {
     goToCourse(courseId) {
       if (courseId) {
         this.$router.push(
-          "/studentAddCourse?cid=" +
+          "/studioAddCourse?cid=" +
           courseId +
           "&userid=" +
           this.userid +
           "&oid=" +
           this.oid +
           "&org=" +
-          this.org
+          this.org +
+          "&role=" +
+          this.role 
         );
       } else {
         this.$router.push(
-          "/studentAddCourse?userid=" +
+          "/studioAddCourse?userid=" +
           this.userid +
           "&oid=" +
           this.oid +
           "&org=" +
-          this.org
+          this.org +
+          "&role=" +
+          this.role 
         );
       }
       // this.$router.push(path);
     },
     goToCourse2(cid){
       this.$router.push(
-          "/studentAddCourse?cid=" +
+          "/studioAddCourse?cid=" +
           cid +
           "&userid=" +
           this.userid +
@@ -266,7 +276,9 @@ export default {
           this.oid +
           "&org=" +
           this.org +
-          "&type=2"
+          "&type=2"+
+          "&role=" +
+          this.role 
         );
     },
     tableRowClassName({ row, rowIndex }) {
@@ -283,13 +295,13 @@ export default {
       //     "&userid=" +
       //     this.userid
       // );
-      window.parent.postMessage({ cid: cid, screenType: "2s" }, "*");
+      window.parent.postMessage({ cid: cid, screenType: "2studio" }, "*");
     },
     get(cid) {
-      window.parent.postMessage({ cid: cid, screenType: "3s" }, "*");
+      window.parent.postMessage({ cid: cid, screenType: "3studio" }, "*");
     },
     getA(cid) {
-      this.$router.push("/courseProgress?cid=" + cid + "&userid=" +
+      this.$router.push("/studioCourseProgress?cid=" + cid + "&userid=" +
         this.userid +
         "&oid=" +
         this.oid +
@@ -378,23 +390,13 @@ export default {
           if (this.courseTypeId[this.CourseType[0][i].id] == "1") {
             typeE.push(this.CourseType[0][i].id);
           } else if (this.courseTypeId[this.CourseType[0][i].id] != "") {
-            if (this.CourseType[0][i].name == "年级") {
+            if (this.CourseType[0][i].name == "类型") {
               typea = this.courseTypeId[this.CourseType[0][i].id];
-            } else if (this.CourseType[0][i].name == "专栏") {
-              typeb = this.courseTypeId[this.CourseType[0][i].id];
-            } else if (this.CourseType[0][i].name == "栏目") {
-              typeb = this.courseTypeId[this.CourseType[0][i].id];
-            } else if (this.CourseType[0][i].name == "学院") {
+            } else if (this.CourseType[0][i].name == "对象") {
               typeb = this.courseTypeId[this.CourseType[0][i].id];
-            } else if (this.CourseType[0][i].name == "新技能") {
-              typec = this.courseTypeId[this.CourseType[0][i].id];
-            } else if (this.CourseType[0][i].name == "赛道") {
-              typed = this.courseTypeId[this.CourseType[0][i].id];
-            } else if (this.CourseType[0][i].name == "项目类型") {
-              typed = this.courseTypeId[this.CourseType[0][i].id];
             } else if (this.CourseType[0][i].name == "主题") {
-              typef = this.courseTypeId[this.CourseType[0][i].id];
-            }
+              typec = this.courseTypeId[this.CourseType[0][i].id];
+            } 
             this.courseTypeSon.push(
               this.courseTypeId[this.CourseType[0][i].id]
             );
@@ -419,7 +421,7 @@ export default {
         pageSize: this.pageSize,
       };
       this.ajax
-        .get(this.$store.state.api + "selectStudentCourseNew222", params)
+        .get(this.$store.state.api + "selectStudioCourseNew222", params)
         .then((res) => {
           this.isLoading = false;
           this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
@@ -467,7 +469,7 @@ export default {
             cid: cid,
           };
           this.ajax
-            .get(this.$store.state.api + "deleteStudentCourse", params)
+            .get(this.$store.state.api + "deleteStudioCourse", params)
             .then((res) => {
               this.isLoading = false;
               this.$message.success("删除成功");
@@ -490,7 +492,7 @@ export default {
         oid: this.oid && this.oid != "" ? this.oid : "",
       };
       this.ajax
-        .get(this.$store.state.api + "selectAllTypeS", params)
+        .get(this.$store.state.api + "selectAllTypeStudio", params)
         .then((res) => {
           this.CourseType = res.data;
 
@@ -501,11 +503,6 @@ export default {
             if (!this.CourseTypeJson[res.data[0][i].id]) {
               this.CourseTypeJson[res.data[0][i].id] = [];
             }
-            if (this.oid == "1c3b9def-8fbe-11ed-b13d-005056b86db5") {
-              if (res.data[0][i].name == "赛道") {
-                this.CourseType[0][i].name = "项目类型";
-              }
-            }
 
             if (res.data[2].length == 0 && res.data[3].length == 0) {
               // for (var j = 0; j < res.data[1].length; j++) {
@@ -513,15 +510,11 @@ export default {
               //     this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
               //   }
               // }
-              if(this.org == '150e3120-9195-11ed-b13d-005056b86db5'){
                 for (var j = 0; j < res.data[1].length; j++) {
                   if (res.data[0][i].id == res.data[1][j].pid) {
                     this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
                   }
                 }
-              }else{
-                this.CourseType = []
-              }
             } else {
               if (res.data[2].length > 0) {
                 for (var j = 0; j < res.data[2].length; j++) {
@@ -546,7 +539,7 @@ export default {
     },
     selectType() {
       this.ajax
-        .get(this.$store.state.api + "selectStudentType")
+        .get(this.$store.state.api + "selectStudioType")
         .then((res) => {
           this.CourseType = res.data;
           for (var i = 0; i < res.data[0].length; i++) {
@@ -579,7 +572,7 @@ export default {
         oid: this.oid,
       };
       this.ajax
-        .get(this.$store.state.api + "selectStudentTypeByOid", params)
+        .get(this.$store.state.api + "selectStudioTypeByOid", params)
         .then((res) => {
           for (var i = 0; i < res.data[0].length; i++) {
             for (var j = 0; j < res.data[1].length; j++) {
@@ -602,7 +595,7 @@ export default {
         oid: this.org,
       };
       this.ajax
-        .get(this.$store.state.api + "selectStudentTypeByOid", params)
+        .get(this.$store.state.api + "selectStudioTypeByOid", params)
         .then((res) => {
           for (var i = 0; i < res.data[0].length; i++) {
             for (var j = 0; j < res.data[1].length; j++) {
@@ -664,6 +657,9 @@ export default {
     }
   },
   created() {
+    if(this.role == '1'){
+      this.groupA = '4'
+    }
     this.page = 1;
     this.selectAllType();
     this.getCourse();
@@ -995,12 +991,12 @@ export default {
 }
 
 .all_choose {
-  margin: 15px 0 10px;
+  margin: 15px 0 10px 10px;
   height: 20%;
   display: flex;
   flex-direction: row;
   align-items: center;
-  max-width: calc(100% / 3 - 50px);
+  max-width: 250px;
 }
 
 .all_choose>span {
@@ -1017,23 +1013,23 @@ export default {
   align-content: space-between;
   height: 100%;
   justify-content: flex-start;
-  width: 60%;
+  width: calc(100% - 280px);
   min-width: 868px;
   align-items: center;
 }
 
 .choose>div:nth-child(2) {
   margin-left: 1%;
-  width: 32.33333%;
+  width: 250px;
 }
 
 .choose>div:nth-child(3) {
-  margin-left: 1%;
-  width: 32.33333%;
+  margin-left: 10px;
+  width: 250px;
 }
 
 .choose>div:nth-child(5) {
-  margin: 5px 0 0 1%;
+  margin: 5px 0 0 10px;
 }
 
 .choose>div:nth-child(4)>span {
@@ -1048,6 +1044,7 @@ export default {
 
 .clear {
   width: 70px;
+  max-width: 70px;
   height: 35px;
   background: #2268bc;
   color: #fff;
@@ -1137,4 +1134,8 @@ export default {
 .more div>span:hover {
   color: #79a2ff;
 }
+
+.student_right{
+  width: 260px;
+}
 </style>

+ 1 - 1
src/components/pages/studio/courseProgress.vue

@@ -48,7 +48,7 @@ export default {
                 cid: this.cid,
             };
             this.ajax
-                .get(this.$store.state.api + "select_student_course_detail", params)
+                .get(this.$store.state.api + "select_studio_course_detail", params)
                 .then((res) => {
                     this.unitJson = JSON.parse(res.data[0][0].chapters);
                     this.courseUserid = res.data[0][0].userid;

+ 9 - 1
src/router/index.js

@@ -42,6 +42,7 @@ import Ttype from '@/components/pages/Ttype'
 import TtypeGM from '@/components/pages/TtypeGM'
 import Ttype2 from '@/components/pages/Ttype2'
 import Ttype2S from '@/components/pages/Ttype2S'
+import Ttype2Studio from '@/components/pages/Ttype2Studio'
 import TtypeOrg from '@/components/pages/TtypeOrg'
 import banner from '@/components/pages/banner'
 import CaseDesign from '@/components/pages/CaseDesign'
@@ -455,7 +456,14 @@ export default new Router({
             meta: {
                 requireAuth: '' // 不需要鉴权
             }
-        }, {
+        },{
+            path: '/Ttype2Studio',
+            name: 'Ttype2Studio',
+            component: Ttype2Studio,
+            meta: {
+                requireAuth: '' // 不需要鉴权
+            }
+        },{
             path: '/TtypeOrg',
             name: 'TtypeOrg',
             component: TtypeOrg,

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff