lsc 2 年之前
父节点
当前提交
9600189222

+ 364 - 0
src/components/pages/GM/examine.vue

@@ -0,0 +1,364 @@
+<template>
+  <div class="pb_content" style="
+      overflow: auto;
+      margin: 0px;
+      box-sizing: border-box;
+      width: 100%;
+      height: 100%;
+    ">
+    <div>
+      <div class="pb_content_body" style="
+          background: #fff;
+          padding: 0px 25px;
+          box-sizing: border-box;
+          margin: 10px auto 0;
+        ">
+        <div class="pb_head">
+          <span>项目审核</span>
+          <!-- <span>备注:教师可以根据课程、班级条件筛选学生并查看该学生信息</span> -->
+        </div>
+        <div class="student_head">
+          <div class="student_search">
+            <div class="searchBox">
+              <div>项目筛选</div>
+              <el-input v-model="cn" placeholder="筛选项目名称" @input="search"></el-input>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="pb_content_body" style="margin: 0 auto 10px;">
+        <div class="student_table">
+          <el-table ref="table" :data="tableData" stripe border :header-cell-style="{
+            background: '#f1f1f1',
+          
+          }" style="width: 100%" :height="tableHeight" v-loading="isLoading">
+            <el-table-column prop="title" label="项目名称" min-width="300px" align="center">
+            </el-table-column>
+            <el-table-column prop="uname" label="创建人" min-width="300px" align="center">
+            </el-table-column>
+            <el-table-column prop="school" label="学校名称" min-width="300px" align="center">
+            </el-table-column>
+            <el-table-column prop="date" label="操作" width="300px" align="left">
+              <template slot-scope="scope">
+                <div class="pb_buttonBox">
+                  <el-button class="btnClassGM" size="mini" type="primary"
+                    @click="get(scope.row.courseId)">查看课程</el-button>
+                  <el-button class="btnClassGM" size="mini" type="primary" @click="examine(scope.row.courseId,scope.row.examine,scope.row.title)">
+                    {{scope.row.examine == '1' ? "审核" : "撤销审核"}}
+                  </el-button>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <div class="student_page">
+        <el-pagination background layout="prev, pager, next" :page-size="10" :total="total" v-if="page"
+          @current-change="handleCurrentChange"></el-pagination>
+      </div>
+    </div>
+  </div>
+</template>
+  
+<script>
+export default {
+  data() {
+    return {
+      tableHeight: "500px",
+      isLoading: false,
+      formLabelWidth: "100px",
+      tableData: [],
+      fileList: [],
+      page: 1,
+      total: 0,
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      org: this.$route.query.org,
+      cn: ""
+    };
+  },
+  mounted() {
+    this.$nextTick(function () {
+    });
+  },
+  methods: {
+    goTo(path) {
+      this.$router.push(path);
+    },
+    get(cid) {
+      window.parent.postMessage({ cid: cid, screenType: "3gm" }, "*");
+    },
+    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 "";
+      }
+    },
+
+    handleCurrentChange(val) {
+      this.page = val;
+      this.selectCourse();
+    },
+    selectCourse() {
+      this.isLoading = true;
+      let params = {
+        oid: this.oid,
+        org: this.org,
+        cn: this.cn,
+        page: this.page,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectCourseExamine", 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);
+        });
+    },
+    search() {
+      this.page = 1;
+      this.selectCourse();
+    },
+    examine(cid,examine,title){
+      // examineCourse
+      this.$confirm(
+        examine=='1' ? "确认此课程通过审核吗?" : "确认撤销此课程的审核吗?",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+          }
+        )
+          .then(() => {
+            if (this.time()) {
+              let params = [
+                {
+                  cid:cid,
+                  exa:examine == '1' ? '2' : '1',
+                  title:'新项目:'+title,
+                  oid:this.oid,
+                  org:this.org,
+                },
+              ];
+              this.ajax
+                .post(this.$store.state.api + "examineCourse", params)
+                .then((res) => {
+                  this.$message({
+                    message: "审核成功",
+                    type: "success",
+                  });
+                  this.selectCourse();
+                })
+                .catch((err) => {
+                  this.$message.error("审核失败");
+                  console.error(err);
+                });
+            }
+          })
+          .catch(() => { });
+    }
+  },
+  created() {
+    this.page = 1;
+    this.selectCourse();
+  },
+};
+</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-start;
+}
+
+.student_search1 {
+  justify-content: space-between;
+}
+
+.searchBox {
+  display: flex;
+  align-items: center;
+}
+
+.searchBox>div {
+  width: auto;
+  margin-right: 10px;
+}
+
+.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;
+}
+
+.student_page>>>.el-pagination.is-background .el-pager li:not(.disabled).active {
+  background-color: #5c549f;
+  color: #fff !important;
+}
+
+.student_page>>>.el-pagination.is-background .el-pager li:not(.disabled):hover {
+  color: #5c549f;
+}
+</style>
+  

+ 441 - 0
src/components/pages/GM/notice.vue

@@ -0,0 +1,441 @@
+<template>
+  <div class="pb_content" style="      overflow: auto;
+      margin: 0px;
+      box-sizing: border-box;
+      width: 100%;
+      height: 100%;">
+    <div class="pb_content_body" style="
+         background: #fff;
+          padding: 0px 25px;
+          box-sizing: border-box;
+          margin: 10px auto 0;
+      ">
+      <div class="pb_head">
+        <span>通知公告</span>
+        <div class="student_button">
+          <el-button type="primary" class="bgColor btnClassGM" @click="dialogVisibleAdd = true"
+            v-if="role == '1'">新建通知</el-button>
+        </div>
+      </div>
+    </div>
+    <div class="pb_content_body" style="margin: 0 auto 10px;">
+      <div class="student_table">
+        <el-table ref="table" :data="tableData" border :height="tableHeight" :fit="true" style="width: 100%"
+          :header-cell-style="{ background: '#f1f1f1' }" :row-class-name="tableRowClassName" v-loading="loading">
+          <el-table-column prop="title" label="通知标题" min-width="15" align="center" :show-overflow-tooltip="true">
+          </el-table-column>
+          <el-table-column prop="content" label="通知内容" min-width="35" align="center" :show-overflow-tooltip="true">
+            <template slot-scope="scope">
+              <div v-html="snippet(scope.row.content)"></div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="creatMen" label="创建者" min-width="25" align="center">
+            管理员
+          </el-table-column>
+          <el-table-column prop="creatTime" label="创建时间" min-width="25" align="center">
+          </el-table-column>
+          <el-table-column label="操作" min-width="20">
+            <template slot-scope="scope">
+              <el-button type="primary" size="small" @click="getNewDetail(scope.row)"
+                class="btnClassGM">查看通知</el-button>
+              <el-button type="primary" size="small" @click="deleteNotice(scope.row.id)" v-if="role == '1'"
+                class="btnClassGM">删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div class="student_page">
+        <el-pagination background layout="prev, pager, next" :page-size="10" :total="total" v-if="page"
+          @current-change="handleCurrentChange">
+        </el-pagination>
+      </div>
+    </div>
+    <el-dialog title="查看通知" :visible.sync="dialogVisible" :append-to-body="true" width="50%" :before-close="handleClose"
+      class="dialog_diy">
+      <div>
+        <div class="pb_head">
+          <span style="font-size: 20px">{{ res.title }}</span>
+          <span style="font-size: 15px; line-height: 35px">管理员</span>
+        </div>
+        <div class="notice_content cont" v-html="res.content"></div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button class="close btnClassGM" @click="dialogVisible = false" type="primary">关闭</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog title="添加全站通知" :visible.sync="dialogVisibleAdd" width="550px" :before-close="handleClose"
+      class="dialog_diy" center>
+      <div>
+        <div class="tian1">
+          <span>通知标题</span>
+          <el-input v-model="noticeTitle" style="width: 250px; margin: 15px 0px" placeholder="请输入通知标题"></el-input>
+        </div>
+        <div class="tian1">
+          <span>通知内容</span>
+          <editor-bar v-model="detail" :isClear="isClear" @change="change"></editor-bar>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="addNotice">确认通知</el-button>
+        <el-button @click="dialogVisibleAdd = false">取 消</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import EditorBar from "../../../components/tools/wangEnduit";
+
+export default {
+  components: {
+    EditorBar,
+  },
+  data() {
+    return {
+      tableHeight: "500px",
+      page: 1,
+      total: 0,
+      isLoading: false,
+      formLabelWidth: "100px",
+      dialogVisible: false,
+      dialogVisibleAdd: false,
+      title: "",
+      tableData: [],
+      res: [],
+      userid: this.$route.query.userid,
+      oid: this.$route.query.oid,
+      org: this.$route.query.org,
+      role: this.$route.query.role,
+      noticeTitle: "",
+      detail: "",
+    };
+  },
+  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: {
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    snippet(value) {
+      return value.replace(/<[^>]*>/g, "");
+    },
+    tableRowClassName({ row, rowIndex }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return "even_row";
+      } else {
+        return "";
+      }
+    },
+    handleCurrentChange(val) {
+      this.page = val;
+      this.getNews();
+    },
+    handleClose(done) {
+      done();
+    },
+    getNewDetail(res) {
+      this.dialogVisible = true;
+      this.res = res;
+    },
+
+    getNews() {
+      this.loading = true;
+      let params = { uid: this.userid, oid: this.oid, org: this.org, page: this.page };
+      this.ajax
+        .get(this.$store.state.api + "selectNotice", params)
+        .then((res) => {
+          this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.loading = false;
+          this.tableData = res.data[0];
+        })
+        .catch((err) => {
+          this.loading = false;
+        });
+    },
+    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;
+        }
+      }
+    },
+    //添加通知
+    addNotice() {
+      if (this.noticeTitle === "") {
+        this.$message.error("请输入文章标题");
+        return;
+      } else if (this.detail === "") {
+        this.$message.error("请输入文章内容");
+        return;
+      }
+      if (this.time()) {
+        let params = [
+          {
+            t: this.noticeTitle,
+            nc: this.detail.replace(/%/g, "%25"),
+            oid: this.oid,
+            org: this.org,
+          },
+        ];
+        this.ajax
+          .post(this.$store.state.api + "addNotice", params)
+          .then((res) => {
+            this.$message({
+              message: "添加成功",
+              type: "success",
+            });
+            this.noticeTitle = ""
+            this.detail = ""
+            this.getNews();
+            this.dialogVisibleAdd = false;
+          })
+          .catch((err) => {
+            this.$message.error("添加失败");
+            console.error(err);
+          });
+      }
+    },
+    deleteNotice(id) {
+      this.$confirm(
+        "确定删除此公告吗?",
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          let params = [
+            {
+              id: id
+            },
+          ];
+          this.ajax
+            .post(this.$store.state.api + "deleteNotice", params)
+            .then((res) => {
+              this.$message({
+                message: "删除成功",
+                type: "success",
+              });
+              this.getNews();
+            })
+            .catch((err) => {
+              this.$message.error("删除失败");
+              console.error(err);
+            });
+        })
+        .catch(() => { });
+    }
+  },
+  created() {
+    this.getNews();
+  },
+};
+</script>
+
+<style scoped>
+.pb_head {
+  display: flex;
+  justify-content: space-between;
+}
+
+.student_head {
+  margin-bottom: 20px;
+}
+
+.student_search {
+  display: flex;
+}
+
+.student_search>div:nth-child(1) {
+  line-height: 35px;
+  font-size: 14px;
+}
+
+.student_search>>>.el-input__inner {
+  width: 190px;
+  height: 35px;
+  margin-left: 10px;
+}
+
+.student_table>>>.el-table--border td {
+  border-right: 0px !important;
+}
+
+.header-title {
+  display: flex;
+}
+
+.logoImg {
+  width: 30px;
+}
+
+.logoImg>img {
+  width: 100%;
+  height: 100%;
+}
+
+.title_add_student {
+  margin: 0 auto;
+  color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__header {
+  background: #454545 !important;
+  padding: 15px 20px;
+}
+
+.dialog_diy>>>.el-dialog__title {
+  color: #fff;
+}
+
+.student_table>>>.el-table--border td {
+  border-right: 0px !important;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn {
+  top: 19px;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
+  color: #fff;
+}
+
+.dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
+  color: #fff;
+}
+
+.notice_content {
+  width: 100%;
+  word-wrap: break-word;
+  word-break: break-all;
+  overflow: hidden;
+  font-size: 18px;
+  line-height: 35px;
+  text-indent: 35px;
+  min-width: 385px;
+}
+
+.close {
+  width: 320px;
+  height: 30px;
+  line-height: 30px;
+  font-size: 14px;
+  background: #0e72e6;
+  padding: 0 !important;
+}
+
+/* table 样式 */
+.cont>>>table {
+  border-top: 1px solid #ccc;
+  border-left: 1px solid #ccc;
+}
+
+.cont>>>table td,
+.cont>>>table th {
+  border-bottom: 1px solid #ccc;
+  border-right: 1px solid #ccc;
+  padding: 3px 5px;
+}
+
+.cont>>>table th {
+  border-bottom: 2px solid #ccc;
+  text-align: center;
+}
+
+/* blockquote 样式 */
+.cont>>>blockquote {
+  display: block;
+  border-left: 8px solid #d0e5f2;
+  padding: 5px 10px;
+  margin: 10px 0;
+  line-height: 1.4;
+  font-size: 100%;
+  background-color: #f1f1f1;
+}
+
+/* code 样式 */
+.cont>>>code {
+  display: inline-block;
+  *display: inline;
+  *zoom: 1;
+  background-color: #f1f1f1;
+  border-radius: 3px;
+  padding: 3px 5px;
+  margin: 0 3px;
+}
+
+.cont>>>pre code {
+  display: block;
+}
+
+/* ul ol 样式 */
+.cont>>>ul,
+ol {
+  margin: 10px 0 10px 20px;
+}
+
+.el-table>>>.even_row {
+  background-color: #f1f1f1;
+}
+
+
+.student_page {
+  margin-top: 10px;
+}
+
+.pb_head {
+  margin: 0 !important;
+  width: 100% !important;
+}
+
+.student_table>>>.el-table,
+.student_table>>>.el-table__body-wrapper {
+  height: auto !important;
+}
+
+.student_page>>>.el-pagination.is-background .el-pager li:not(.disabled).active {
+  background-color: #5c549f;
+  color: #fff !important;
+}
+
+.student_page>>>.el-pagination.is-background .el-pager li:not(.disabled):hover {
+  color: #5c549f;
+}
+
+.tian1 {
+  margin-top: 15px;
+}
+
+.tian1 span {
+  display: block;
+}
+</style>

+ 15 - 0
src/components/pages/GM/school.vue

@@ -830,5 +830,20 @@ export default {
 .cardHead {
   display: flex;
 }
+
+.student_page
+  >>> .el-pagination.is-background
+  .el-pager
+  li:not(.disabled).active {
+  background-color: #5c549f;
+  color: #fff !important;
+}
+.student_page
+  >>> .el-pagination.is-background
+  .el-pager
+  li:not(.disabled):hover {
+  color: #5c549f;
+}
+
 </style>
   

+ 8 - 1
src/components/pages/courseGM.vue

@@ -104,6 +104,9 @@
               <div class="kc_t" v-if="item.isCourseType == 2 || groupA == 1">
                 负责老师:{{ item.uname }}
               </div>
+              <!-- <div class="kc_time" v-if=" groupA == '0'">
+                <span style="color: #4b4b4b">审核状态:</span>{{ item.examine == '1' ? '未审核' : '已审核' }}
+              </div> -->
               <div class="kc_time">
                 <span style="color: #4b4b4b">创建日期:</span>{{ item.time }}
               </div>
@@ -112,7 +115,8 @@
               </div>
             </div>
             <div class="three_bottom">
-              <div @click="jump(item.courseId)">评课</div>
+              <!-- <div @click="jump(item.courseId)">评课</div> -->
+              <div @click="get(item.courseId)">预览</div>
               <div v-if="groupA == '0'" @click="goToCourse(item.courseId)">
                 修改
               </div>
@@ -358,6 +362,9 @@ export default {
       // );
       window.parent.postMessage({ cid: cid, screenType: "2gm" }, "*");
     },
+    get(cid){
+      window.parent.postMessage({ cid: cid, screenType: "3gm" }, "*");
+    },
     handle_remove(file, fileList) {
       var _tmp = this.fileList;
       for (var i = 0, len = _tmp.length; i < len; i++) {

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

@@ -227,7 +227,7 @@
                 <el-switch v-model="isTeacherSee" active-text="是否公开此项目" style="padding-bottom: 30px"></el-switch>
               </div> -->
             </div>
-            <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px">
+            <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
               <div class="right_title">目标管理</div>
               <div style="margin: 15px auto; padding: 0 0 0 20px">
                 <div style="

+ 19 - 0
src/router/index.js

@@ -48,6 +48,8 @@ import addRace from '@/components/pages/race/addRace'
 import anliDetail from '@/components/pages/race/eventCenter/anliDetail'
 import schoolGM from '@/components/pages/GM/school'
 import teacherGM from '@/components/pages/GM/teacher'
+import examineGM from '@/components/pages/GM/examine'
+import noticeGM from '@/components/pages/GM/notice'
 import studentCourse from '@/components/pages/student/course'
 import studentAddCourse from '@/components/pages/student/addCourse'
 
@@ -425,5 +427,22 @@ export default new Router({
                 requireAuth: '' // 不需要鉴权
             }
         },
+        {
+            path: '/examineGM',
+            name: 'examineGM',
+            component: examineGM,
+            meta: {
+                requireAuth: '' // 不需要鉴权
+            }
+        },
+        {
+            path: '/noticeGM',
+            name: 'noticeGM',
+            component: noticeGM,
+            meta: {
+                requireAuth: '' // 不需要鉴权
+            }
+        },
+        
     ]
 })