Browse Source

同步教研公告添加

WINDOWS-7IFQK7E\EDY 2 years ago
parent
commit
ec3f6cc2da

File diff suppressed because it is too large
+ 1690 - 17204
package-lock.json


+ 2 - 0
src/components/TinymceVue/index.vue

@@ -20,6 +20,7 @@ const props = defineProps({
       ];
     }, type: Array
   },
+  
   toolbar1: { default: 'formatselect | bold italic  strikethrough  forecolor backcolor | link | alignleft aligncenter alignright alignjustify  | numlist bullist outdent indent  | removeformat', type: String },
   toolbar2: { default: '', type: String },
   other_options: {
@@ -27,6 +28,7 @@ const props = defineProps({
       return {};
     }, type: Object
   }
+ 
 })
 
 const emits = defineEmits(['update:modelValue'])

+ 4 - 3
src/pages/personal/components/MyCourse/api.js

@@ -165,7 +165,8 @@ export const tbjy_add = (data = {}) => {
         subject_name: data.subject_name,
         zt_kssj: data.zt_kssj,
         zt_jssj: data.zt_jssj,
-        zt_cyjyjs_json: data.zt_cyjyjs_json
+        zt_cyjyjs_json: data.zt_cyjyjs_json,
+        zt_notice: data.zt_notice
       }
 
     }
@@ -190,8 +191,8 @@ export const tbjy_edit = (data = {}) => {
         subject_name: data.subject_name,
         zt_kssj: data.zt_kssj,
         zt_jssj: data.zt_jssj,
-        zt_cyjyjs_json: data.zt_cyjyjs_json
-
+        zt_cyjyjs_json: data.zt_cyjyjs_json,
+        zt_notice: data.zt_notice
       }
 
     }

+ 17 - 16
src/pages/personal/components/MyCourse/tbjy-create.vue

@@ -16,14 +16,12 @@
         {{ $route.query.id ? "编辑" : "创建" }}
       </div>
       <div class="formContent">
-        <el-form v-if="!loading" :model="formline" ref="formline" :rules="rules" size="large" label-position="top"
-          class="demo-ruleForm">
+        <el-form v-if="!loading" :model="formline" ref="formline" :rules="rules" size="large" label-position="top" class="demo-ruleForm">
           <div class="must">
             <div class="label">课程封面图</div>
             <div class="uploadDiv">
               <div style="display: flex;">
-                <el-upload class="mainUpload" action="" accept=".png, .jpg, .jpeg" :auto-upload="false"
-                  list-type="picture-card" :on-change="handleMainChange" :file-list="fileList">
+                <el-upload class="mainUpload" action="" accept=".png, .jpg, .jpeg" :auto-upload="false" list-type="picture-card" :on-change="handleMainChange" :file-list="fileList">
                   <el-icon size="38" color="#9d9ab9" v-if="fileList.length == 0">
                     <Picture />
                   </el-icon>
@@ -59,14 +57,12 @@
           <div style="display: flex">
             <el-form-item style="flex: 1" label="开始时间" prop="zt_kssj">
               <!-- <el-config-provider :locale="local"> -->
-              <el-date-picker v-model="formline.zt_kssj" type="datetime" placeholder="选择日期时间"
-                value-format="YYYY-MM-DD HH:mm:ss"></el-date-picker>
+              <el-date-picker v-model="formline.zt_kssj" type="datetime" placeholder="选择日期时间" value-format="YYYY-MM-DD HH:mm:ss"></el-date-picker>
               <!-- </el-config-provider> -->
             </el-form-item>
             <el-form-item style="flex: 1; margin-left: 20px" label="结束时间" prop="zt_jssj">
               <!-- <el-config-provider :locale="local"> -->
-              <el-date-picker v-model="formline.zt_jssj" value-format="YYYY-MM-DD HH:mm:ss" type="datetime"
-                placeholder="选择日期时间"></el-date-picker>
+              <el-date-picker v-model="formline.zt_jssj" value-format="YYYY-MM-DD HH:mm:ss" type="datetime" placeholder="选择日期时间"></el-date-picker>
               <!-- </el-config-provider> -->
             </el-form-item>
           </div>
@@ -101,8 +97,7 @@
               </div>
               <div class="goupeTeacher flex">
                 <el-checkbox-group v-if="tbjyTeacher.length > 0" v-model="checkList">
-                  <el-checkbox @change="isCheckJs($event, t)" v-for="t in tbjyTeacher" :label="t.user_id"
-                    :key="t.user_id">{{ t.user_realname }}</el-checkbox>
+                  <el-checkbox @change="isCheckJs($event, t)" v-for="t in tbjyTeacher" :label="t.user_id" :key="t.user_id">{{ t.user_realname }}</el-checkbox>
                 </el-checkbox-group>
                 <div v-else>暂无数据</div>
               </div>
@@ -116,8 +111,10 @@
               {{ checkTip }}
             </div>
           </el-form-item>
-          <el-form-item label="公告" prop="sm_brief">
-            <Tinymce :modelValue="formline.zt_name" @update:modelValue="handleUpdate"></Tinymce>
+          <el-form-item label="公告" prop="zt_notice">
+            <Tinymce :other_options="{menubar: '' }" :modelValue="formline.zt_notice" @update:modelValue="handleUpdate">
+            </Tinymce>
+            <!-- <Tinymce v-else :modelValue="formline.zt_notice" :other_options="{menubar: ''}" @update:modelValue="handleUpdate"></Tinymce> -->
           </el-form-item>
           <el-form-item>
             <el-checkbox class="read" v-model="isRead" label="已阅读并同意《课程上传协议》" size="large" />
@@ -144,12 +141,14 @@ import {
   tbjy_edit,
   user_list,
 } from "./api";
-import Tinymce from "@/components/TinymceVue/index.vue";
+import Tinymce from "@/components/TinymceVue/index.vue"
 import { Picture, FolderOpened } from "@element-plus/icons-vue";
 // import { ElConfigProvider } from "element-plus";
 // import zhcn from "element-plus/lib/locale/lang/zh-cn";
 export default {
-  components: { Tinymce, Picture, FolderOpened },
+  components: {
+    Tinymce, Picture, FolderOpened
+  },
   data() {
     return {
       // local: zhcn,
@@ -170,6 +169,7 @@ export default {
         grade: {},
         subject: {},
         teacher: [],
+        zt_notice: ""
       },
       rules: {
         zt_zrjs: [
@@ -232,9 +232,9 @@ export default {
     };
   },
 
-  methods: { 
+  methods: {
     handleUpdate(data) {
-      this.formline.zt_name = data;
+      this.formline.zt_notice = data;
     },
     goBack() {
       this.$router.go(-1);
@@ -432,6 +432,7 @@ export default {
             zt_kssj: this.formline.zt_kssj,
             zt_jssj: this.formline.zt_jssj,
             zt_cyjyjs_json: this.zt_cyjyjs_json,
+            zt_notice: this.formline.zt_notice
           };
           console.log("data", data);
           if (id == undefined) {

+ 42 - 25
src/pages/zhjy/tbjy/detail.vue

@@ -396,18 +396,15 @@ function handlePreview(d) {
     </div>
   </div> -->
 
-
   <div class="w-full flex items-center justify-center mt-4">
     <div ref="wrapperContainer" class="w-1400px h-min-930px flex flex-col relative bg-light-500" v-loading="loading">
-      <div
-        class="w-full h-210px flex overflow-x-auto bg-light-700 p-2 _scrollbar scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-gray-300 scrollbar-track-transparent">
+      <div class="w-full h-210px flex overflow-x-auto bg-light-700 p-2 _scrollbar scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-gray-300 scrollbar-track-transparent">
         <div class="w-280px h-full flex-none p-1" ref="localPlayerContainer" @click="handleShowing(-1)">
           <div class="w-full h-full bg-black text-white text-sm flex_center" v-show="clientAllUsers[-1]?._show">
             点击切换至小屏模式
           </div>
         </div>
-        <div class="w-280px h-full flex-none p-1 " v-for="(_, idx) in clientRemoteUsersNum"
-          :ref="(el)=>remotePlayerContainer[idx]=el" @click="handleShowing(idx)">
+        <div class="w-280px h-full flex-none p-1 " v-for="(_, idx) in clientRemoteUsersNum" :ref="(el)=>remotePlayerContainer[idx]=el" @click="handleShowing(idx)">
           <div class="w-full h-full bg-black text-white text-sm flex_center" v-show="clientAllUsers[idx]?._show">
             点击切换至小屏模式</div>
 
@@ -415,10 +412,8 @@ function handlePreview(d) {
       </div>
       <div ref="showingPlayerContainer" class="w-full h-full "></div>
 
-      <div
-        class="w-full h-36px absolute bottom-0 left-0 flex justify-end items-center text-xl text-white bg-black px-4 opacity-10 hover:opacity-60">
-        <span class="text-xs mr-4 cursor-pointer px-2 py-1 bg-dark-900" :class="shareBtnLoading&&'cursor-wait'"
-          @click="handleShareScreen">{{shareBtnState?'退出共享':'屏幕共享'}}</span>
+      <div class="w-full h-36px absolute bottom-0 left-0 flex justify-end items-center text-xl text-white bg-black px-4 opacity-10 hover:opacity-60">
+        <span class="text-xs mr-4 cursor-pointer px-2 py-1 bg-dark-900" :class="shareBtnLoading&&'cursor-wait'" @click="handleShareScreen">{{shareBtnState?'退出共享':'屏幕共享'}}</span>
 
         <div class="w-140px flex items-center mr-4">
           <i-clarity:volume-up-solid />
@@ -436,15 +431,15 @@ function handlePreview(d) {
         <el-tabs v-model="tabVal">
           <el-tab-pane label="教研感悟" name="jygw"></el-tab-pane>
           <el-tab-pane label="资源" name="zy"></el-tab-pane>
+          <el-tab-pane label="公告" name="gg">
+            <div v-html="detailInfo.zt_notice" class="gg"></div>
+          </el-tab-pane>
         </el-tabs>
       </div>
 
       <div v-show="tabVal==='jygw'" class="w-full flex flex-col justify-start items-start">
-        <el-input v-model="form_ztkj_gwnr" maxlength="500" placeholder="至少200个字不超过500个字" show-word-limit type="textarea"
-          rows="5" />
-        <div
-          class="mt-2 flex_center h-32px text-sm w-110px leading-26px px-4 bg-gradient-to-l from-green-400 to-blue-500 text-white rounded-14px cursor-pointer btn"
-          @click="handleSubmitComment">
+        <el-input v-model="form_ztkj_gwnr" maxlength="500" placeholder="至少200个字不超过500个字" show-word-limit type="textarea" rows="5" />
+        <div class="mt-2 flex_center h-32px text-sm w-110px leading-26px px-4 bg-gradient-to-l from-green-400 to-blue-500 text-white rounded-14px cursor-pointer btn" @click="handleSubmitComment">
           发表感悟</div>
 
         <div class="w-full divide-y divide-dashed divide-2px">
@@ -465,21 +460,18 @@ function handlePreview(d) {
         </div>
 
         <div class="w-full flex justify-end mt-8 mb-8">
-          <el-pagination background layout="prev, pager, next" :total="commentTotal"
-            v-model:current-page="queryCommentForm.page" />
+          <el-pagination background layout="prev, pager, next" :total="commentTotal" v-model:current-page="queryCommentForm.page" />
         </div>
       </div>
       <div v-show="tabVal==='zy'" class="w-full flex flex-col justify-start items-center">
         <file-upload-progress v-model:full="form_file" @compile="handleSubmitFile" v-if="user.user_role_id < 76">
-          <div
-            class="mt-2 flex_center h-32px text-sm w-110px leading-26px px-4 bg-gradient-to-l from-green-400 to-blue-500 text-white rounded-14px cursor-pointer btn">
+          <div class="mt-2 flex_center h-32px text-sm w-110px leading-26px px-4 bg-gradient-to-l from-green-400 to-blue-500 text-white rounded-14px cursor-pointer btn">
             上传附件</div>
           <template #file>
             <span class="w-0 h-0"></span>
           </template>
         </file-upload-progress>
 
-
         <div class="w-full divide-y divide-dashed divide-2px">
           <template v-if="fileData.length">
             <div class="text-hex-171721 text-sm py-5" v-for="i in fileData">
@@ -497,8 +489,7 @@ function handlePreview(d) {
                     <el-button type="primary" plain>下载
                     </el-button>
                   </a>
-                  <el-button type="primary" plain @click="handleFileDelete(i)"
-                    :disabled="loginUser.user_id!==i.create_user_id" class="ml-2">删除</el-button>
+                  <el-button type="primary" plain @click="handleFileDelete(i)" :disabled="loginUser.user_id!==i.create_user_id" class="ml-2">删除</el-button>
                 </div>
               </div>
             </div>
@@ -511,21 +502,47 @@ function handlePreview(d) {
         </div>
 
         <div class="w-full flex justify-end mt-8 mb-8">
-          <el-pagination background layout="prev, pager, next" :total="fileTotal"
-            v-model:current-page="queryFileForm.page" />
+          <el-pagination background layout="prev, pager, next" :total="fileTotal" v-model:current-page="queryFileForm.page" />
         </div>
       </div>
     </div>
 
-    <el-dialog v-model="dialogVisible" :key="dialogDataFile" draggable width="65vw" >
+    <el-dialog v-model="dialogVisible" :key="dialogDataFile" draggable width="65vw">
       <file-preview :url="dialogDataFile" alt="" class="w-full min-h-65vh" />
     </el-dialog>
   </div>
-   <common-footer/>
+  <common-footer />
 </template>
 
 <style scoped>
 :deep(.el-tabs__nav-wrap::after) {
   background-color: transparent;
 }
+/* .gg {
+  height: 330px;
+  overflow-y: scroll;
+} */
+.gg {
+  height: 343px;
+  overflow-x: hidden;
+  overflow-y: scroll;
+  line-height: 30px;
+}
+/*滚动条样式*/
+.gg::-webkit-scrollbar {
+  width: 3px;
+  height: 200px;
+}
+/* 上下滚动的滚动条颜色 */
+.gg::-webkit-scrollbar-thumb {
+  border-radius: 10px;
+  -webkit-box-shadow: inset 0 0 5px #00a3ff;
+  background: #00a3ff;
+}
+/* 滚动条的整体背景颜色 */
+.gg::-webkit-scrollbar-track {
+  -webkit-box-shadow: inset 0 0 5px white;
+  border-radius: 0;
+  background: white;
+}
 </style>

File diff suppressed because it is too large
+ 1038 - 1130
yarn.lock