Browse Source

课程模块优化配置优化

zyp 3 weeks ago
parent
commit
d6116a8b9e

+ 25 - 28
src/components/Editor/wang.vue

@@ -1,23 +1,23 @@
-<template>  
+<template>
     <div>
       <div  ref='editor1' class="myedit"></div>
-    </div> 
-</template>  
-  
-<script>  
-  import E from 'wangeditor'  
-  export default {  
-    name: 'editoritem',  
-    data() {  
+    </div>
+</template>
+
+<script>
+  import E from 'wangeditor'
+  export default {
+    name: 'editoritem',
+    data() {
       return {
         index:0,
         uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadWang",
         editor: null
-      }  
+      }
     },
     created() {
-       
-      
+
+
     },
     beforeDestroy() {
       // 销毁编辑器
@@ -25,7 +25,7 @@
         this.editor.destroy()
         this.editor = null
       }
-      
+
     },
     methods:{
       initEditor(){
@@ -34,11 +34,8 @@
             //创建编辑器
             this.editor = new E(that.$refs.editor1 )
             this.editor.config.uploadImgServer = this.uploadUrl;
-
-
-            
-             this.editor.config.uploadImgMaxLength = 5
-            this.editor.config.uploadImgMaxSize = 2 * 1024 * 1024 // 2M
+            this.editor.config.uploadImgMaxLength = 5
+            this.editor.config.uploadImgMaxSize = 10 * 1024 * 1024 // 10M
             this.editor.config.uploadImgAccept = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']
             this.editor.config.uploadFileName = 'file'
             this.editor.config.zIndex = 1
@@ -79,7 +76,7 @@
                 // 上传图片之前
                 before: function(xhr) {
                     //console.log(xhr)
-                    
+
                 },
                 // 图片上传并返回了结果,图片插入已成功
                 success: function(xhr) {
@@ -112,8 +109,8 @@
                           }
                           console.log(url);
                       }
-                      
-                     
+
+
                       // result 必须是一个 JSON 格式字符串!!!否则报错
                 }
             }
@@ -131,13 +128,13 @@
         else{
           this.editor.txt.html(text);
         }
-        
+
       },
      }
-   
-  }  
-</script>  
-  
+
+  }
+</script>
+
 <style scoped>
 .toolbar {
   border: 1px solid #ccc;
@@ -152,5 +149,5 @@
 .w-e-text-container{
   z-index: 1 !important;
 }
- 
-</style>
+
+</style>

+ 91 - 48
src/components/VideoUpload/index.vue

@@ -1,12 +1,5 @@
 <template>
   <div>
-    <el-form-item label="上传类型"  >
-      <el-radio-group v-model="localUploadType">
-        <el-radio :label="2" >线路一</el-radio>
-        <el-radio :label="1" >线路二</el-radio>
-<!--        <el-radio :label="3" >线路三</el-radio>-->
-      </el-radio-group>
-    </el-form-item>
     <el-form-item label="视频上传">
       <div class="upload_video" id="upload_video">
         <el-upload
@@ -21,21 +14,52 @@
           :auto-upload="false"
           :key="uploadKey"
         >
-          <el-button slot="trigger" size="small" type="primary">选取视频</el-button>
+          <el-button slot="trigger" size="small" type="primary" >选取视频</el-button>
           <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">点击上传</el-button>
-          <el-progress style="margin-top: 10px;" class="progress" :text-inside="true" :stroke-width="18" :percentage="progress" status="success"></el-progress>
+<!--          <el-progress style="margin-top: 10px;" :key="'线路一'" class="progress" :text-inside="true" :stroke-width="18" :percentage="txProgress" status="success"></el-progress>-->
+<!--          <el-progress style="margin-top: 10px;" :key="'线路二'" class="progress" :text-inside="true" :stroke-width="18" :percentage="hwProgress" status="success"></el-progress>-->
+          <!-- 线路一 -->
+          <div class="progress-container">
+            <span class="progress-label">线路一</span>
+            <el-progress
+              style="margin-top: 5px;"
+              class="progress"
+              :text-inside="true"
+              :stroke-width="18"
+              :percentage="txProgress"
+              status="success">
+            </el-progress>
+          </div>
+
+          <!-- 线路二 -->
+          <div class="progress-container">
+            <span class="progress-label">线路二</span>
+            <el-progress
+              style="margin-top: 5px;"
+              class="progress"
+              :text-inside="true"
+              :stroke-width="18"
+              :percentage="hwProgress"
+              status="success">
+            </el-progress>
+          </div>
           <div slot="tip" class="el-upload__tip">只能上传mp4文件,且不超过500M</div>
         </el-upload>
-        <video v-if="videoUrl" ref="myvideo" :src="videoUrl" id="video" width="100%" height="300px" controls></video>
-        <!-- <canvas id="mycanvas" style="display:none"></canvas> -->
-        <div v-if="fileName">视频文件名: {{ fileName }}</div>
-        <div v-if="fileKey">文件Key: {{ fileKey }}</div>
-        <div v-if="fileSize">文件大小(MB): {{ (fileSize / (1024 * 1024)).toFixed(2) }} MB</div>
       </div>
     </el-form-item>
-    <!-- <el-form-item label="视频封面">
-
-    </el-form-item> -->
+    <el-form-item label="视频播放">
+      <video v-if="videoUrl" ref="myvideo" :src="videoUrl" id="video" width="100%" height="300px" controls></video>
+      <div v-if="fileName">视频文件名: {{ fileName }}</div>
+      <div v-if="fileKey">文件Key: {{ fileKey }}</div>
+      <div v-if="fileSize">文件大小(MB): {{ (fileSize / (1024 * 1024)).toFixed(2) }} MB</div>
+    </el-form-item>
+    <el-form-item label="播放线路"  >
+      <el-radio-group v-model="localUploadType">
+        <el-radio :label="1" >线路一</el-radio>
+        <el-radio :label="2" >线路二</el-radio>
+        <!--        <el-radio :label="3" >线路三</el-radio>-->
+      </el-radio-group>
+    </el-form-item>
   </div>
 </template>
 
@@ -101,15 +125,14 @@ export default {
       duration: 0,
       fileId: "",
       uploadTypeOptions: [
-        { dictLabel: "线路一", dictValue: 2 }, //腾讯pcdn
-
-        { dictLabel: "线路二", dictValue: 1 }, //电信
-        // { dictLabel: "线路三", dictValue: 3 }, //华为云obs
+        { dictLabel: "线路一", dictValue: 1 }, //腾讯pcdn
+        { dictLabel: "线路二", dictValue: 2 }, //华为云obs
         // { dictLabel: "华为云VOD", dictValue: 4 },
         // { dictLabel: "腾讯云VOD", dictValue: 5 },
       ],
       fileList: [],
-      progress: 0,
+      txProgress: 0,
+      hwProgress: 0,
       uploadLoading: false,
       uploadKey: 0,
       // thumbnail: '',
@@ -147,18 +170,13 @@ export default {
       if (this.fileList.length < 1) {
         return this.$message.error("请先选取视频,再进行上传");
       }
-      if (this.localUploadType == null) {
-        return this.$message.error("请先选择上传类型,再进行上传");
-      }
-      this.getFirstThumbnail();
-      if (this.localUploadType == 1 || this.localUploadType == 2) {
-        // 腾讯云PCDN 上传逻辑
-        this.uploadVideoToTxPcdn();
-      } else if (this.localUploadType == 3) {
-        this.uploadVideoToHwObs();
-      }
+      await this.getFirstThumbnail();
+      //同时上传个线路
+      await this.uploadVideoToTxPcdn();
+      await this.uploadVideoToHwObs();
       this.$emit("update:fileName", this.fileList[0].name);
     },
+    //获取第一帧封面
     async getFirstThumbnail(){
       const file = this.fileList[0].raw;
       getThumbnail(file).then(response => {
@@ -166,25 +184,27 @@ export default {
         this.$emit("update:thumbnail", response.url);
       })
     },
+    //更新华为线路进度条
     updateHwProgress(progress) {
-      this.progress = progress;
+      this.hwProgress = progress;
     },
+    //更新腾讯线路进度条
     updateTxProgress(progressData) {
-      this.progress = Math.round(progressData.percent * 100);
+      this.txProgress = Math.round(progressData.percent * 100);
     },
+    //上传腾讯云Pcdn
     async uploadVideoToTxPcdn() {
       try {
         const file = this.fileList[0].raw;
-        // const type = 2;
         const data = await uploadObject(file, this.updateTxProgress,this.type);
         console.log("腾讯COS返回========>",data);
         console.log("isPrivate=======>",this.isPrivate)
         let line_1='' ;
-        let line_2 ='';
-
-        line_1 = `https://zzftcpv.ylrzcloud.com${data.urlPath}`;
-        line_2 = `https://zzfctev.ylrzcloud.com${data.urlPath}`;
-
+        if (this.isPrivate===0){
+          line_1 = `https://tcpv.ylrzcloud.com${data.urlPath}`;
+        }else {
+          line_1 = `https://blytcpv.ylrzcloud.com${data.urlPath}`;
+        }
 
         let urlPathWithoutFirstSlash = data.urlPath.substring(1);
         this.$emit("update:fileKey", urlPathWithoutFirstSlash);
@@ -193,31 +213,54 @@ export default {
         console.log("组装URL========>",line_1);
         this.$emit("update:videoUrl", line_1);
         this.$emit("update:line_1", line_1);
-        this.$emit("update:line_2", line_2);
-        this.$message.success("视频上传成功");
+        // this.$emit("update:line_2", line_2);
+        this.$message.success("线路一上传成功");
       } catch (error) {
-        this.$message.error("上传失败");
+        this.$message.error("线路一上传失败");
       }
     },
+    //上传华为云Obs
     async uploadVideoToHwObs() {
       try {
         const file = this.fileList[0].raw;
         const data = await uploadToOBS(file, this.updateHwProgress,this.type);
-        this.$emit("update:videoUrl", data);
-        this.$emit("update:line_3", data);
-        this.$message.success("视频上传成功");
+        console.log("华为OBS返回========>",data);
+        let line_2='' ;
+        if (this.isPrivate===0){
+          line_2 = `https://obs.ylrztop.com/${data.urlPath}`;
+        }else {
+          line_2 = `https://blyobs.ylrztop.com/${data.urlPath}`;
+        }
+        // this.$emit("update:videoUrl", data);
+        this.$emit("update:line_2", line_2);
+        this.$message.success("线路二上传成功");
       } catch (error) {
-        this.$message.error("上传失败");
+        this.$message.error("线路二上传失败");
       }
     },
     handleRemove(file, fileList) {
       console.log(file, fileList.length);
     },
     resetUpload() {
-      this.progress = 0;
+      this.txProgress = 0;
+      this.hwProgress=0;
       this.fileList = [];
       this.uploadKey++;
     },
   },
 };
 </script>
+
+<style>
+.progress-container {
+  margin-bottom: 5px; /* 进度条之间的间距 */
+}
+
+.progress-label {
+  display: block;
+  //margin-bottom: 5px;
+  font-weight: bold;
+  font-size: 13px;
+  color: #303331; /* 标签颜色,可以根据需要调整 */
+}
+</style>

+ 1 - 1
src/utils/cos.js

@@ -3,7 +3,7 @@ import { Message } from 'element-ui';
 import { getTmpSecretKey } from '@/api/common';
 
 const config = {
-    Bucket: 'zhengzf-1323137866',
+    Bucket: 'beliyo-1323137866',
     Region: 'ap-chongqing',
 };
 

+ 7 - 12
src/utils/obs.js

@@ -38,18 +38,13 @@ export const uploadToOBS = async(file,progressCallback,type) =>  {
                     reject(err);
                     console.error('Error-->' + err);
                 }else{
-                const resultUrl = "https://obs.jy.cc/"+key;
-                resolve(resultUrl);
-                    console.log("OBS返回==========>",result);
-                    if(result.CommonMsg.Status < 300){
-                        console.log('RequestId-->' + result.InterfaceResult.RequestId);
-                        console.log('ETag-->' + result.InterfaceResult.ETag);
-                        console.log('VersionId-->' + result.InterfaceResult.VersionId);
-                        console.log('StorageClass-->' + result.InterfaceResult.StorageClass);
-                    }else{
-                        console.log('Code-->' + result.CommonMsg.Code);
-                        console.log('Message-->' + result.CommonMsg.Message);
-                    }
+                  // 将上传的key包含在返回的数据中
+                  const a = {
+                    ...result,
+                    urlPath: key
+                  };
+                  console.log('上传成功', a);
+                  resolve(a);
                 }
             });
         });

+ 74 - 12
src/views/components/course/userCourseCatalogDetails.vue

@@ -79,7 +79,7 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
-    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body >
+    <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body >
       <el-form ref="form" :model="form" :rules="rules" label-width="110px" v-loading="uploadLoading">
         <el-form-item label="视频标题" prop="title">
           <el-input v-model="form.title"  placeholder="请输入内容" />
@@ -122,6 +122,7 @@
           ref="videoUpload"
           append-to-body
         />
+
         <el-form-item label="课题选择" prop="questionBankId">
           <el-button size="small" type="primary" @click="chooseQuestionBank">选取课题</el-button>
           <el-table border width="100%" style="margin-top:5px;"  :data="form.questionBankList">
@@ -153,9 +154,9 @@
             </el-table-column>
           </el-table>
         </el-form-item >
-		<el-form-item label="红包金额" prop="redPacketMoney">
-		  <el-input-number v-model="form.redPacketMoney" :min="0.1" :max="200" :step="0.1" ></el-input-number>
-		</el-form-item>
+        <el-form-item label="红包金额" prop="redPacketMoney">
+          <el-input-number v-model="form.redPacketMoney" :min="0.1" :max="200" :step="0.1" ></el-input-number>
+        </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -182,6 +183,13 @@ import VideoUpload from "@/components/VideoUpload/index.vue";
     components: {VideoUpload,QuestionBank},
     data() {
       return {
+        duration: null,
+        packageList:[],
+        //课题
+        package:{
+          title:'',
+          open:false,
+        },
         //课题
         questionBank:{
           title:'',
@@ -192,8 +200,7 @@ import VideoUpload from "@/components/VideoUpload/index.vue";
         uploadTypeOptions: [
           { dictLabel: "线路一", dictValue: 2 },
 
-          { dictLabel: "线路二", dictValue: 1 },
-          { dictLabel: "线路三", dictValue: 3 },
+          { dictLabel: "线路二", dictValue: 3 },
         ],
         uploadLoading:false,
         courseId:null,
@@ -253,6 +260,25 @@ import VideoUpload from "@/components/VideoUpload/index.vue";
       });
     },
     methods: {
+      getPickerOptions() {
+        const durationInMinutes = Math.floor(this.form.duration / 60); // 将秒转换为分钟
+        const endHour  = Math.floor(durationInMinutes / 60); // 起始小时
+        const endMinute  = durationInMinutes % 60; // 起始分钟
+        return {
+          start: "00:00", // 固定开始时间
+          step: "00:01", // 时间间隔
+          end: `${endHour.toString().padStart(2, "0")}:${endMinute
+            .toString()
+            .padStart(2, "0")}`, // 动态结束时间
+        };
+      },
+      handlePackageDelete(row){
+        this.packageList.splice(this.packageList.findIndex(item => item.packageId === row.packageId), 1)
+      },
+      choosePackage(){
+        this.package.open=true;
+        this.package.title='疗法选择';
+      },
       /**
        * 选择课题
        */
@@ -261,6 +287,28 @@ import VideoUpload from "@/components/VideoUpload/index.vue";
         this.questionBank.title='课题选择';
       },
 
+      //选择疗法
+      selectPackage(row){
+        const drug = {};
+        for(var i=0;i<this.packageList.length;i++){
+          if(this.packageList[i].packageId==row.packageId){
+            this.$message.warning("疗法已存在!")
+            return;
+          }
+        }
+        drug.packageId=row.packageId;
+        drug.packageName=row.packageName;
+        drug.secondName=row.secondName;
+        drug.totalPrice=row.totalPrice;
+        drug.imgUrl=row.imgUrl;
+        this.packageList.push(drug);
+        this.$message({
+          message: '添加成功',
+          type: 'success'
+        });
+
+      },
+
       //选择结果
       questionBankResult(val){
 
@@ -285,9 +333,9 @@ import VideoUpload from "@/components/VideoUpload/index.vue";
         this.form.questionBankList.splice(this.form.questionBankList.findIndex(item => item.id === row.id), 1)
       },
       handleVideoChange(){
-        if(this.form.uploadType==2){
+        if(this.form.uploadType==1){
           this.videoUrl = this.form.lineOne;
-        }else if(this.form.uploadType==1){
+        }else if(this.form.uploadType==2){
           this.videoUrl = this.form.lineTwo;
         }else if(this.form.uploadType==3){
           this.videoUrl = this.form.lineThree;
@@ -385,7 +433,7 @@ import VideoUpload from "@/components/VideoUpload/index.vue";
           productJson: null,
           questionBankId:null,
           questionBankList:[],
-		      redPacketMoney:0,
+		  redPacketMoney:0,
         };
         this.videoURL = '';
         this.progress=0;
@@ -413,6 +461,7 @@ import VideoUpload from "@/components/VideoUpload/index.vue";
         this.open = true;
         this.title = "添加课堂视频";
         this.videoUrl = '';
+        this.packageList=[];
         getSort(this.courseId).then(response => {
           this.form.courseSort = Number(response.data);
         })
@@ -424,13 +473,16 @@ import VideoUpload from "@/components/VideoUpload/index.vue";
       /** 修改按钮操作 */
       handleUpdate(row) {
         this.reset();
-
+        this.packageList=[];
         const videoId = row.videoId || this.ids
         getUserCourseVideo(videoId).then(response => {
           this.form = response.data;
           if(response.data.videoUrl!=null && response.data.videoUrl!==''){
             this.videoUrl = response.data.videoUrl;
           }
+          if (this.form.packageJson!=null){
+            this.packageList = JSON.parse(this.form.packageJson);
+          }
           setTimeout(() => {
             this.$refs.videoUpload.resetUpload();
           }, 500);
@@ -448,20 +500,30 @@ import VideoUpload from "@/components/VideoUpload/index.vue";
             if(this.form.videoUrl==null || this.form.videoUrl===''){
               this.$message({
                 message: '请上传视频!',
-                type: 'info'
+                type: 'warning'
               });
               return
             }
             if(this.form.duration==null){
               this.$message({
                 message: '未识别到视频时长请稍等。。。',
-                type: 'info'
+                type: 'warning'
+              });
+              return
+            }
+            if(this.form.uploadType==null){
+              this.$message({
+                message: '请选择播放线路!',
+                type: 'warning'
               });
               return
             }
             if (this.form.questionBankList!==null){
               this.form.questionBankId = this.form.questionBankList.map(item => item.id).join(',');
             }
+            if (this.packageList.length>0){
+              this.form.packageJson = JSON.stringify(this.packageList);
+            }
             if (this.form.videoId != null) {
               updateUserCourseVideo(this.form).then(response => {
                 this.msgSuccess("修改成功");

+ 4 - 1
src/views/components/course/userTalentDetails.vue

@@ -134,7 +134,7 @@ export default {
      this.getDicts("sys_company_status").then(response => {
        this.statusOptions = response.data;
      });
-     this.getDicts("sys_user_sex").then(response => {
+     this.getDicts("sys_sex").then(response => {
        this.sexOptions = response.data;
      });
     },
@@ -148,6 +148,9 @@ export default {
           }
         });
       },
+
+
+
     }
   }
 </script>

+ 6 - 6
src/views/components/course/userVideoDetails.vue

@@ -131,7 +131,7 @@
             <dict-tag :options="diseaseTypeOptions" :value="packageItem.diseaseType"/>
           </span>
         </el-descriptions-item>
-
+        
         <el-descriptions-item label="创建时间" >
             <span v-if="packageItem!=null">{{packageItem.createTime}}</span>
         </el-descriptions-item>
@@ -140,13 +140,13 @@
             <span v-if="packageItem!=null">{{packageItem.updateTime}}</span>
         </el-descriptions-item>
         <el-descriptions-item label="封面图" >
-
-          <el-image
+          
+          <el-image 
             style="width: 100px"
             :src="packageItem.imgUrl"
             :preview-src-list="[packageItem.imgUrl]">
           </el-image>
-
+          
         </el-descriptions-item>
       </el-descriptions>
       <div class="desct">
@@ -215,7 +215,7 @@ import {getUserVideoItem} from "@/api/course/userVideo";
       }
     },
     created() {
-      this.getDicts("store_product_is_show").then(response => {
+      this.getDicts("sys_spec_show").then(response => {
         this.specShowOptions = response.data;
       });
       this.getDicts("sys_user_video_status").then(response => {
@@ -260,7 +260,7 @@ import {getUserVideoItem} from "@/api/course/userVideo";
                 this.packageItem = response.package;
                 this.productJson=JSON.parse(response.package.productJson);
             }
-
+            
           });
       },
     }

+ 9 - 1
src/views/course/courseTrafficLog/index.vue

@@ -45,7 +45,11 @@
           <span>{{ formatTrafficData(scope.row.totalInternetTraffic) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="费用" align="center" prop="money" />
+      <el-table-column label="费用" align="center">
+        <template slot-scope="scope">
+          <span>{{ formatTrafficMoney(scope.row.totalInternetTraffic) }}</span>
+        </template>
+      </el-table-column>
     </el-table>
 
     <pagination
@@ -135,6 +139,10 @@ export default {
         }
 
     },
+    formatTrafficMoney(traffic){
+      return (traffic / (1024 * 1024 * 1024) * 0.095).toFixed(2) + ' 元'
+    },
+
     handleShortcut() {
       this.queryParams.time = new Date().toISOString().slice(0, 7);
     },

+ 27 - 22
src/views/course/userCourse/index.vue

@@ -413,6 +413,16 @@
             </el-form-item>
           </el-col>
         </el-row>
+		<el-form-item label="关联公司" prop="tags">
+		  <el-select v-model="companyIds" multiple placeholder="请选择公司" filterable clearable style="width: 90%;">
+		    <el-option
+		      v-for="dict in companyOptions"
+		      :key="dict.dictValue"
+		      :label="dict.dictLabel"
+		      :value="dict.dictValue"
+		    />
+		  </el-select>
+		</el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -421,7 +431,7 @@
     </el-dialog>
     <el-drawer
         :with-header="false"
-        size="60%"
+        size="75%"
          :title="show.title" :visible.sync="show.open" append-to-body>
      <userCourseCatalogDetails  ref="userCourseCatalogDetails" />
    </el-drawer>
@@ -437,7 +447,7 @@ import ImageUpload from '@/components/ImageUpload/index';
 import { listBySearch} from "@/api/course/userTalent";
 import userCourseCatalogDetails from '../../components/course/userCourseCatalogDetails.vue';
 import { getAllCourseCategoryList,getCatePidList ,getCateListByPid} from "@/api/course/userCourseCategory";
-
+import {allList} from "@/api/company/company";
 export default {
   name: "UserCourse",
   components: {
@@ -459,6 +469,7 @@ export default {
       projectOptions:[],
       tagsOptions:[],
       tags:[],
+	  companyIds:[],
       courseTypeOptions:[],
       orOptions: [],
       specShowOptions: [],
@@ -482,6 +493,7 @@ export default {
       total: 0,
       // 课程表格数据
       userCourseList: [],
+	  companyOptions:[],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
@@ -511,24 +523,12 @@ export default {
       form: {},
       // 表单校验
       rules: {
-        // talentId: [
-        //   { required: true, message: "归属达人不能为空", trigger: "change" }
-        // ],
-        cateId: [
-          { required: true, message: "分类不能为空", trigger: "change" }
-        ],
-        subCateId: [
-          { required: true, message: "子分类不能为空", trigger: "change" }
-        ],
         courseName: [
           { required: true, message: "课堂名称不能为空", trigger: "blur" }
         ],
         imgUrl: [
           { required: true, message: "封面图片不能为空", trigger: "blur" }
         ],
-        secondImg: [
-          { required: true, message: "小封面图片不能为空", trigger: "blur" }
-        ],
         isTui: [
           { required: true, message: "是否推荐不能为空", trigger: "blur" }
         ],
@@ -559,12 +559,6 @@ export default {
         isIntegral: [
           { required: true, message: "是否允许积分兑换不能为空", trigger: "blur" }
         ],
-        price: [
-          { required: true, message: "原价不能为空", trigger: "blur" }
-        ],
-        sellPrice: [
-          { required: true, message: "售价不能为空", trigger: "blur" }
-        ],
         isShow: [
           { required: true, message: "上架状态不能为空", trigger: "blur" }
         ],
@@ -582,6 +576,7 @@ export default {
     getCatePidList().then(response => {
         this.categoryOptions = response.data;
     });
+
     // this.getTreeselect();
     this.getDicts("sys_spec_show").then(response => {
       this.specShowOptions = response.data;
@@ -601,6 +596,9 @@ export default {
     this.getDicts("sys_company_or").then(response => {
       this.orOptions = response.data;
     });
+	allList().then(response => {
+	    this.companyOptions = response.rows;
+	});
   },
   methods: {
     selectTalent(){
@@ -647,7 +645,7 @@ export default {
       const courseId = row.courseId;
       this.show.open=true;
         setTimeout(() => {
-             this.$refs.userCourseCatalogDetails.getDetails(courseId,row.courseName);
+             this.$refs.userCourseCatalogDetails.getDetails(courseId,row.courseName,row.isPrivate);
         }, 200);
     },
     handleClick(tab, event) {
@@ -708,7 +706,7 @@ export default {
         isTui:"1",
         isBest:"1",
         isNext:"1",
-        isPrivate:"0",
+        isPrivate:"1",
         views: 100000,
         duration: null,
         description: null,
@@ -775,6 +773,12 @@ export default {
         this.form.isNext = response.data.isNext.toString();
         this.form.isPrivate = response.data.isPrivate.toString();
         this.talentParam.talentId = response.data.talentId;
+		if(this.form.companyIds!=null){
+			this.companyIds=((this.form.companyIds).split(",").map(Number))
+		}else{
+			this.companyIds=[]
+		}
+
         listBySearch(this.talentParam).then(response => {
           this.talentList = response.data;
         });
@@ -792,6 +796,7 @@ export default {
             else{
               this.form.tags=null
             }
+			this.form.companyIds=this.companyIds.toString()
           if (this.form.courseId != null) {
             updateUserCourse(this.form).then(response => {
               this.msgSuccess("修改成功");

+ 3 - 3
src/views/course/userCourseCategory/index.vue

@@ -98,14 +98,14 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['store:storeProductCategory:edit']"
+            v-hasPermi="['course:userCourseCategory:edit']"
           >修改</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-hasPermi="['store:storeProductCategory:remove']"
+            v-hasPermi="['course:userCourseCategory:remove']"
           >删除</el-button>
         </template>
       </el-table-column>
@@ -159,8 +159,8 @@ export default {
   },
   data() {
     return {
-      categoryOptions:[],
       orOptions:[],
+      categoryOptions:[],
       // 遮罩层
       loading: true,
       // 导出遮罩层

+ 25 - 34
src/views/store/disease/index.vue

@@ -19,16 +19,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="科室" prop="deptId">
-       <el-select v-model="queryParams.deptId" placeholder="请选择所属科室">
-         <el-option
-             v-for="dict in depList"
-             :key="dict.dictValue"
-             :label="dict.dictLabel"
-             :value="dict.dictValue"
-           />
-         </el-select>
-      </el-form-item>
+<!--      <el-form-item label="科室" prop="deptId">-->
+<!--       <el-select v-model="queryParams.deptId" placeholder="请选择所属科室">-->
+<!--         <el-option-->
+<!--             v-for="dict in depList"-->
+<!--             :key="dict.dictValue"-->
+<!--             :label="dict.dictLabel"-->
+<!--             :value="dict.dictValue"-->
+<!--           />-->
+<!--         </el-select>-->
+<!--      </el-form-item>-->
       <el-form-item label="状态" prop="status">
        <el-select v-model="queryParams.status" placeholder="状态" clearable size="small">
          <el-option
@@ -97,7 +97,7 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="疾病名称" align="center" prop="diseaseName" />
       <el-table-column label="疾病编码" align="center" prop="diseaseCode" />
-      <el-table-column label="所属科室" align="center" prop="deptName" />
+<!--      <el-table-column label="所属科室" align="center" prop="deptName" />-->
       <el-table-column label="简介" align="center" prop="introduction" show-overflow-tooltip/>
       <el-table-column label="诊断" align="center" prop="diagnose" show-overflow-tooltip/>
       <el-table-column label="状态" align="center">
@@ -152,17 +152,17 @@
         <el-form-item label="疾病编码" prop="diseaseCode">
           <el-input  v-model="form.diseaseCode" placeholder="请输入疾病编码" />
         </el-form-item>
-        <el-form-item label="所属科室" prop="deptId">
-          <el-select v-model="form.deptId" placeholder="请选择所属科室">
-              <el-option
-                  v-for="dict in depList"
-                  :key="dict.dictValue"
-                  :label="dict.dictLabel"
-                  :value="dict.dictValue"
-                />
+<!--        <el-form-item label="所属科室" prop="deptId">-->
+<!--          <el-select v-model="form.deptId" placeholder="请选择所属科室">-->
+<!--              <el-option-->
+<!--                  v-for="dict in depList"-->
+<!--                  :key="dict.dictValue"-->
+<!--                  :label="dict.dictLabel"-->
+<!--                  :value="dict.dictValue"-->
+<!--                />-->
 
-              </el-select>
-        </el-form-item>
+<!--              </el-select>-->
+<!--        </el-form-item>-->
       <el-form-item label="简介">
           <el-input v-model="form.introduction"  type="textarea"/>
       </el-form-item>
@@ -195,7 +195,7 @@
     </el-dialog>
 
  <el-drawer
-      :with-header="false" 
+      :with-header="false"
      size="75%"
       :title="show.title" :visible.sync="show.open">
   <diseaseDetails  ref="diseaseDetails" :data='show'/>
@@ -218,8 +218,7 @@ export default {
         title:"疾病详情",
         open:false,
       },
-      //科室列表
-      depList:[],
+
       statusOptions: [],
       // 遮罩层
       loading: true,
@@ -264,9 +263,6 @@ export default {
         diseaseCode: [
           { required: true, message: "疾病编码不能为空", trigger: "blur" }
         ],
-        deptId: [
-          { required: true, message: "科室不能为空", trigger: "blur" }
-        ],
         introduction: [
           { required: true, message: "简介不能为空", trigger: "blur" }
         ],
@@ -281,15 +277,10 @@ export default {
     this.getDicts("sys_company_status").then(response => {
       this.statusOptions = response.data;
     });
-    this.getdeplist();
+
   },
   methods: {
-   /** 查询科室列表 */
-    getdeplist() {
-      listDepartment().then(response => {
-        this.depList = response.rows;
-      });
-    },
+
     /** 查询疾病列表 */
     getList() {
       this.loading = true;

+ 7 - 8
src/views/store/doctorArticle/index.vue

@@ -148,7 +148,6 @@
       @pagination="getList"
     />
 
-    <!-- 添加或修改医生文章对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body :rules="rules">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="分类" prop="cateId">
@@ -255,7 +254,7 @@ export default {
       uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
       baseUrl: process.env.VUE_APP_BASE_API,
       show:{
-              title:"医生文章详情",
+              title:"养生讲堂详情",
               open:false,
             },
       cateStatus: [],
@@ -275,7 +274,7 @@ export default {
       showSearch: true,
       // 总条数
       total: 0,
-      // 医生文章表格数据
+
       articleList: [],
       // 弹出层标题
       title: "",
@@ -390,7 +389,7 @@ export default {
              this.$refs.articleDetails.getDetails(row.articleId);
         }, 1);
     },
-    /** 查询医生文章列表 */
+
     getList() {
       this.loading = true;
       listArticle(this.queryParams).then(response => {
@@ -441,7 +440,7 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加医生文章";
+      this.title = "添养生讲堂文章";
         setTimeout(() => {
           this.$refs.myeditor.setText("");
         }, 100);
@@ -460,7 +459,7 @@ export default {
           }
         }, 1);
         this.open = true;
-        this.title = "修改医生文章";
+        this.title = "修改养生讲堂文章";
         this.form.status = String(this.form.status)
         this.form.cateId = String(this.form.cateId)
       });
@@ -488,7 +487,7 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const articleIds = row.articleId || this.ids;
-      this.$confirm('是否确认删除医生文章编号为"' + articleIds + '"的数据项?', "警告", {
+      this.$confirm('是否确认删除养生讲堂文章编号为"' + articleIds + '"的数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
@@ -502,7 +501,7 @@ export default {
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有医生文章数据项?', "警告", {
+      this.$confirm('是否确认导出所有养生讲堂文章数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"

+ 10 - 10
src/views/store/questions/index.vue

@@ -150,16 +150,16 @@
                   />
                 </el-select>
         </el-form-item>
-        <el-form-item label="科室" prop="deptId">
-          <el-select v-model="form.deptId" placeholder="请选择科室">
-                <el-option
-                    v-for="dict in depList"
-                    :key="dict.dictValue"
-                    :label="dict.dictLabel"
-                    :value=" parseInt(dict.dictValue)"
-                  />
-                </el-select>
-        </el-form-item>
+<!--        <el-form-item label="科室" prop="deptId">-->
+<!--          <el-select v-model="form.deptId" placeholder="请选择科室">-->
+<!--                <el-option-->
+<!--                    v-for="dict in depList"-->
+<!--                    :key="dict.dictValue"-->
+<!--                    :label="dict.dictLabel"-->
+<!--                    :value=" parseInt(dict.dictValue)"-->
+<!--                  />-->
+<!--                </el-select>-->
+<!--        </el-form-item>-->
 
         <el-form-item label="答案" prop="answers">
           <el-input v-model="form.answers" type="textarea" placeholder="请输入内容" rows="4"/>

+ 1 - 1
src/views/store/user/index.vue

@@ -243,7 +243,7 @@
             <el-radio :label="item.dictValue" v-for="item in statusOptions" >{{item.dictLabel}}</el-radio>
           </el-radio-group>
         </el-form-item>
-        <el-form-item label="是否允许下单" prop="isShow">
+        <el-form-item label="是否展示" prop="isShow">
           <el-radio-group v-model="form.isShow">
             <el-radio :label="item.dictValue" v-for="item in isShowOptions" >{{item.dictLabel}}</el-radio>
           </el-radio-group>

+ 38 - 0
src/views/system/config/config.vue

@@ -370,6 +370,28 @@
            </div>
          </el-form>
        </el-tab-pane>
+       <el-tab-pane label="布局配置" name="store.appShow" >
+         <div >
+           <el-table border :data="form10">
+             <el-table-column prop="name" label="模块名称" width="300">
+               <template slot-scope="scope"> <el-input    v-model="scope.row.name"   ></el-input></template>
+             </el-table-column>
+             <el-table-column prop="sort"label="排序号" width="300">
+               <template slot-scope="scope"><el-input-number  v-model="scope.row.sort" :min="0" :max="100"    ></el-input-number>  </template>
+             </el-table-column>
+             <el-table-column prop="isShow" label="是否展示" width="100">
+               <template slot-scope="scope">  <el-switch
+                 v-model="scope.row.isShow"
+                 active-color="#13ce66"
+                 inactive-color="#ff4949">
+               </el-switch> </template>
+             </el-table-column>
+           </el-table>
+           <div class="footer">
+             <el-button type="primary" @click="submitForm10">提  交</el-button>
+           </div>
+         </div>
+       </el-tab-pane>
 
 
     </el-tabs>
@@ -474,6 +496,7 @@ export default {
       },
       form18:{
       },
+      form10:[],
       form19:{
       },
       // 表单校验
@@ -577,15 +600,22 @@ export default {
               this.form6 =JSON.parse(response.data.configValue);
             }
            if(key=="course.config"){
+             this.configId=response.data.configId;
              this.form18 =JSON.parse(response.data.configValue);
            }
            if(key=="redPacket.config"){
+             this.configId=response.data.configId;
              this.form19 =JSON.parse(response.data.configValue);
            }
+           if(key=="store.appShow"){
+             this.configId=response.data.configId;
+             this.form10 =JSON.parse(response.data.configValue);
+           }
         });
      },
     /** 提交按钮 */
     submitForm1: function() {
+
       this.$refs["form1"].validate(valid => {
         if (valid) {
           var param={configId:this.configId,configKey:this.configKey,configValue:JSON.stringify(this.form1)}
@@ -681,6 +711,14 @@ export default {
         }
       });
     },
+    submitForm10(){
+      var param={configId:this.configId,configValue:JSON.stringify(this.form10)}
+      updateConfigByKey(param).then(response => {
+        if (response.code === 200) {
+          this.msgSuccess("修改成功");
+        }
+      });
+    },
     /** 清理缓存按钮操作 */
     handleClearCache() {
       clearCache().then(response => {