Explorar o código

课程留言和介绍图片

yuhongqi hai 3 días
pai
achega
f5b1bdf25e

+ 22 - 1
src/views/components/course/userCourseCatalogDetails.vue

@@ -442,6 +442,11 @@
           <el-table-column label="昵称" prop="nickName" width="100"/>
           <el-table-column label="评论内容" prop="content" show-overflow-tooltip/>
           <el-table-column label="上传时间" prop="createTime" width="160"/>
+          <el-table-column label="操作" width="70" align="center">
+            <template slot-scope="scope">
+              <el-button type="text" size="mini" style="color:#F56C6C" @click="handleDeleteComment(scope.row)">删除</el-button>
+            </template>
+          </el-table-column>
         </el-table>
       </div>
       <div slot="footer" class="dialog-footer">
@@ -685,7 +690,7 @@ import {listVideoResource, listPublicVideoResource} from '@/api/course/videoReso
 import {getByIds} from '@/api/course/courseQuestionBank'
 import CourseWatchComment from "./courseWatchComment.vue";
 import {getCateListByPid, getCatePidList, getPublicCateListByPid, getPublicCatePidList} from '@/api/course/userCourseCategory'
-import {downloadCommentImportTemplate, importComments, listFeaturedComments} from '@/api/course/userCourseComment'
+import {downloadCommentImportTemplate, importComments, listFeaturedComments, delUserCourseComment} from '@/api/course/userCourseComment'
 import draggable from 'vuedraggable'
 import { getConfigByKey } from '@/api/system/config'
 
@@ -1748,6 +1753,22 @@ export default {
     handleCommentFileChange(file) {
       this.commentImportDialog.file = file.raw;
     },
+    // 删除精选留言
+    handleDeleteComment(row) {
+      this.$confirm('确认删除该条精选留言?', '提示', {type: 'warning'}).then(() => {
+        delUserCourseComment(row.commentId).then(res => {
+          if (res.code === 200) {
+            this.$message.success('删除成功');
+            // 刷新历史列表
+            listFeaturedComments(this.commentImportDialog.courseId).then(res2 => {
+              this.commentImportDialog.historyList = res2.rows || [];
+            });
+          } else {
+            this.$message.error(res.msg || '删除失败');
+          }
+        });
+      }).catch(() => {});
+    },
     // 下载Word导入模板
     handleDownloadTemplate() {
       downloadCommentImportTemplate().then(res => {

+ 22 - 1
src/views/components/course/userCourseCatalogDetailsZM.vue

@@ -454,6 +454,11 @@
           <el-table-column label="昵称" prop="nickName" width="100"/>
           <el-table-column label="评论内容" prop="content" show-overflow-tooltip/>
           <el-table-column label="上传时间" prop="createTime" width="160"/>
+          <el-table-column label="操作" width="70" align="center">
+            <template slot-scope="scope">
+              <el-button type="text" size="mini" style="color:#F56C6C" @click="handleDeleteComment(scope.row)">删除</el-button>
+            </template>
+          </el-table-column>
         </el-table>
       </div>
       <div slot="footer" class="dialog-footer">
@@ -641,7 +646,7 @@ import {listVideoResource} from '@/api/course/videoResource';
 import {getByIds} from '@/api/course/courseQuestionBank'
 import CourseWatchComment from "./courseWatchComment.vue";
 import {getCateListByPid, getCatePidList} from '@/api/course/userCourseCategory'
-import {downloadCommentImportTemplate, importComments, listFeaturedComments} from '@/api/course/userCourseComment'
+import {downloadCommentImportTemplate, importComments, listFeaturedComments, delUserCourseComment} from '@/api/course/userCourseComment'
 import draggable from 'vuedraggable'
 import { getConfigByKey } from '@/api/system/config'
 
@@ -1834,6 +1839,22 @@ export default {
     handleCommentFileChange(file) {
       this.commentImportDialog.file = file.raw;
     },
+    // 删除精选留言
+    handleDeleteComment(row) {
+      this.$confirm('确认删除该条精选留言?', '提示', {type: 'warning'}).then(() => {
+        delUserCourseComment(row.commentId).then(res => {
+          if (res.code === 200) {
+            this.$message.success('删除成功');
+            // 刷新历史列表
+            listFeaturedComments(this.commentImportDialog.courseId).then(res2 => {
+              this.commentImportDialog.historyList = res2.rows || [];
+            });
+          } else {
+            this.$message.error(res.msg || '删除失败');
+          }
+        });
+      }).catch(() => {});
+    },
     // 下载Word导入模板
     handleDownloadTemplate() {
       downloadCommentImportTemplate().then(res => {

+ 15 - 3
src/views/course/coursePlaySourceConfig/index.vue

@@ -389,6 +389,12 @@
         <el-form-item label="用户注销协议" prop="userRemoveService">
           <editor v-model="agreementForm.userRemoveService" :min-height="200"/>
         </el-form-item>
+        <el-form-item label="APP用户协议" prop="appUserAgreement">
+          <editor v-model="agreementForm.appUserAgreement" :min-height="200"/>
+        </el-form-item>
+        <el-form-item label="APP隐私协议" prop="appPrivacyAgreement">
+          <editor v-model="agreementForm.appPrivacyAgreement" :min-height="200"/>
+        </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="agreementDialogVisible = false">取 消</el-button>
@@ -488,7 +494,9 @@ export default {
         userHealth: '',
         vipService: '',
         vipAutomaticService: '',
-        userRemoveService: ''
+        userRemoveService: '',
+        appUserAgreement: '',
+        appPrivacyAgreement: ''
       },
       agreementRules: {
         // doctorRegister: [
@@ -640,7 +648,9 @@ export default {
             userHealth: agreementData.userHealth || '',
             vipService: agreementData.vipService || '',
             vipAutomaticService: agreementData.vipAutomaticService || '',
-            userRemoveService: agreementData.userRemoveService || ''
+            userRemoveService: agreementData.userRemoveService || '',
+            appUserAgreement: agreementData.appUserAgreement || '',
+            appPrivacyAgreement: agreementData.appPrivacyAgreement || ''
           };
 
           this.agreementDialogVisible = true;
@@ -664,7 +674,9 @@ export default {
               userHealth: this.agreementForm.userHealth,
               vipService: this.agreementForm.vipService,
               vipAutomaticService: this.agreementForm.vipAutomaticService,
-              userRemoveService: this.agreementForm.userRemoveService
+              userRemoveService: this.agreementForm.userRemoveService,
+              appUserAgreement: this.agreementForm.appUserAgreement,
+              appPrivacyAgreement: this.agreementForm.appPrivacyAgreement
             })
           };
           updateAgreementConfig(params).then(response => {

+ 26 - 13
src/views/hisStore/storeProduct/index.vue

@@ -27,13 +27,13 @@
       </el-form-item>
 
 
-      <el-form-item label="商品类型" prop="productType">
-        <el-select   v-model="queryParams.productType" placeholder="请选择商品类型" clearable size="small" >
+      <el-form-item label="商品类型" prop="productTypes">
+        <el-select v-model="queryParams.productTypes" multiple placeholder="请选择商品类型" clearable size="small" >
           <el-option
             v-for="item in productTypeOptions"
             :key="item.dictValue"
             :label="item.dictLabel"
-            :value="item.dictValue"
+            :value="Number(item.dictValue)"
           />
         </el-select>
       </el-form-item>
@@ -596,12 +596,12 @@
           </el-col>
         </el-row>
         <el-form-item label="标签类型" prop="tagType">
-          <el-select v-model="tagType" placeholder="请选择标签类型" clearable style="width: 100%" @change="onTagTypeChange">
+          <el-select v-model="tagType" multiple placeholder="请选择标签类型" clearable style="width: 100%" @change="onTagTypeChange">
             <el-option label="不分润商品" value="no_commission" />
             <el-option label="预售商品" value="presale" />
           </el-select>
         </el-form-item>
-        <el-form-item label="最晚发货时间" prop="presaleShippingTime" v-if="tagType === 'presale'">
+        <el-form-item label="最晚发货时间" prop="presaleShippingTime" v-if="tagType && tagType.includes('presale')">
           <el-date-picker
             v-model="presaleShippingTime"
             type="datetime"
@@ -922,6 +922,11 @@
         </el-form-item>
         <el-form-item label="所属公司">
           <el-select style="width: 240px" v-model="form.companyIds" multiple placeholder="请选择企业" clearable size="small" >
+            <div style="padding: 0 20px; display: flex; justify-content: space-between; line-height: 34px;">
+              <el-button type="text" size="mini" @click="form.companyIds = companyOptions.map(item => item.companyId)">全选</el-button>
+              <el-button type="text" size="mini" @click="form.companyIds = companyOptions.map(item => item.companyId).filter(id => !form.companyIds.includes(id))">反选</el-button>
+              <el-button type="text" size="mini" @click="form.companyIds = []">清空</el-button>
+            </div>
             <el-option
               v-for="item in companyOptions"
               :key="item.companyId"
@@ -1268,7 +1273,7 @@ export default {
       ],
       photoArr:[],
       imageArr:[],
-      tagType: null,
+      tagType: [],
       presaleShippingTime: null,
       activeName:"1",
       productTypeOptions:[],
@@ -1330,6 +1335,7 @@ export default {
         pageSize: 10,
         productName: null,
         productType: null,
+        productTypes: [],
         isShow: "1",
         barCode:null,
         companyIds: null,
@@ -1762,7 +1768,7 @@ export default {
     },
     // 标签类型变更
     onTagTypeChange(val) {
-      if (val !== 'presale') {
+      if (!val || !val.includes('presale')) {
         this.presaleShippingTime = null;
       }
     },
@@ -1835,7 +1841,7 @@ export default {
         tagInfo: null // 标签信息
       };
       // 重置标签类型和预售发货时间
-      this.tagType = null;
+      this.tagType = [];
       this.presaleShippingTime = null;
       // 重置药品展示图
       this.drugImageArr = [];
@@ -1937,14 +1943,21 @@ export default {
         if (this.form.tagInfo) {
           try {
             const tagObj = JSON.parse(this.form.tagInfo);
-            this.tagType = tagObj.type || null;
+            // type 兼容单值(旧)和数组(新)
+            if (Array.isArray(tagObj.type)) {
+              this.tagType = tagObj.type;
+            } else if (tagObj.type) {
+              this.tagType = [tagObj.type];
+            } else {
+              this.tagType = [];
+            }
             this.presaleShippingTime = tagObj.shippingTime || null;
           } catch (e) {
-            this.tagType = null;
+            this.tagType = [];
             this.presaleShippingTime = null;
           }
         } else {
-          this.tagType = null;
+          this.tagType = [];
           this.presaleShippingTime = null;
         }
         this.appIds = this.form.appIds ? this.form.appIds.split(',') : [];
@@ -2009,9 +2022,9 @@ export default {
             this.form.companyIds = this.form.companyIds.join(',');
           }
           // 组装标签信息 tagInfo
-          if (this.tagType) {
+          if (this.tagType && this.tagType.length > 0) {
             const tagObj = { type: this.tagType };
-            if (this.tagType === 'presale' && this.presaleShippingTime) {
+            if (this.tagType.includes('presale') && this.presaleShippingTime) {
               tagObj.shippingTime = this.presaleShippingTime;
             }
             this.form.tagInfo = JSON.stringify(tagObj);

+ 26 - 13
src/views/hisStore/storeProduct/indexZm.vue

@@ -27,13 +27,13 @@
       </el-form-item>
 
 
-      <el-form-item label="商品类型" prop="productType">
-        <el-select   v-model="queryParams.productType" placeholder="请选择商品类型" clearable size="small" >
+      <el-form-item label="商品类型" prop="productTypes">
+        <el-select v-model="queryParams.productTypes" multiple placeholder="请选择商品类型" clearable size="small" >
           <el-option
             v-for="item in productTypeOptions"
             :key="item.dictValue"
             :label="item.dictLabel"
-            :value="item.dictValue"
+            :value="Number(item.dictValue)"
           />
         </el-select>
       </el-form-item>
@@ -596,12 +596,12 @@
 <!--          </el-col>-->
 <!--        </el-row>-->
         <el-form-item label="标签类型" prop="tagType">
-          <el-select v-model="tagType" placeholder="请选择标签类型" clearable style="width: 100%" @change="onTagTypeChange">
+          <el-select v-model="tagType" multiple placeholder="请选择标签类型" clearable style="width: 100%" @change="onTagTypeChange">
             <el-option label="不分润商品" value="no_commission" />
             <el-option label="预售商品" value="presale" />
           </el-select>
         </el-form-item>
-        <el-form-item label="最晚发货时间" prop="presaleShippingTime" v-if="tagType === 'presale'">
+        <el-form-item label="最晚发货时间" prop="presaleShippingTime" v-if="tagType && tagType.includes('presale')">
           <el-date-picker
             v-model="presaleShippingTime"
             type="datetime"
@@ -941,6 +941,11 @@
         </el-form-item>
         <el-form-item label="所属公司">
           <el-select style="width: 240px" v-model="form.companyIds" multiple placeholder="请选择企业" clearable size="small" >
+            <div style="padding: 0 20px; display: flex; justify-content: space-between; line-height: 34px;">
+              <el-button type="text" size="mini" @click="form.companyIds = companyOptions.map(item => item.companyId)">全选</el-button>
+              <el-button type="text" size="mini" @click="form.companyIds = companyOptions.map(item => item.companyId).filter(id => !form.companyIds.includes(id))">反选</el-button>
+              <el-button type="text" size="mini" @click="form.companyIds = []">清空</el-button>
+            </div>
             <el-option
               v-for="item in companyOptions"
               :key="item.companyId"
@@ -1233,7 +1238,7 @@ export default {
       ],
       photoArr:[],
       imageArr:[],
-      tagType: null,
+      tagType: [],
       presaleShippingTime: null,
       activeName:"1",
       productTypeOptions:[],
@@ -1273,6 +1278,7 @@ export default {
         pageSize: 10,
         productName: null,
         productType: null,
+        productTypes: [],
         isShow: "1",
         barCode:null,
         companyIds: null,
@@ -1840,7 +1846,7 @@ export default {
     },
     // 标签类型变更
     onTagTypeChange(val) {
-      if (val !== 'presale') {
+      if (!val || !val.includes('presale')) {
         this.presaleShippingTime = null;
       }
     },
@@ -1920,7 +1926,7 @@ export default {
         tagInfo: null // 标签信息
       };
       // 重置标签类型和预售发货时间
-      this.tagType = null;
+      this.tagType = [];
       this.presaleShippingTime = null;
       // 重置药品展示图
       this.drugImageArr = [];
@@ -2027,14 +2033,21 @@ export default {
         if (this.form.tagInfo) {
           try {
             const tagObj = JSON.parse(this.form.tagInfo);
-            this.tagType = tagObj.type || null;
+            // type 兼容单值(旧)和数组(新)
+            if (Array.isArray(tagObj.type)) {
+              this.tagType = tagObj.type;
+            } else if (tagObj.type) {
+              this.tagType = [tagObj.type];
+            } else {
+              this.tagType = [];
+            }
             this.presaleShippingTime = tagObj.shippingTime || null;
           } catch (e) {
-            this.tagType = null;
+            this.tagType = [];
             this.presaleShippingTime = null;
           }
         } else {
-          this.tagType = null;
+          this.tagType = [];
           this.presaleShippingTime = null;
         }
         this.$set(this.form, 'userEndCategoryIds', (response.userEndCategoryIds || []).map(id => Number(id)).filter(id => !Number.isNaN(id)));
@@ -2126,9 +2139,9 @@ export default {
             this.form.companyIds = this.form.companyIds.join(',');
           }
           // 组装标签信息 tagInfo
-          if (this.tagType) {
+          if (this.tagType && this.tagType.length > 0) {
             const tagObj = { type: this.tagType };
-            if (this.tagType === 'presale' && this.presaleShippingTime) {
+            if (this.tagType.includes('presale') && this.presaleShippingTime) {
               tagObj.shippingTime = this.presaleShippingTime;
             }
             this.form.tagInfo = JSON.stringify(tagObj);

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

@@ -342,6 +342,12 @@
           <el-form-item label="用户注销协议" prop="vipAutomaticService">
             <editor v-model="form3.userRemoveService" :min-height="292"/>
           </el-form-item>
+          <el-form-item label="APP用户协议" prop="appUserAgreement">
+            <editor v-model="form3.appUserAgreement" :min-height="292"/>
+          </el-form-item>
+          <el-form-item label="APP隐私协议" prop="appPrivacyAgreement">
+            <editor v-model="form3.appPrivacyAgreement" :min-height="292"/>
+          </el-form-item>
 
           <div class="footer">
             <el-button type="primary" @click="submitForm3">提 交</el-button>
@@ -592,6 +598,13 @@
               inactive-color="#ff4949">
             </el-switch>
           </el-form-item>
+          <el-form-item label="是否开启购物积分" prop="enableShoppingPoints">
+            <el-switch
+              v-model="form7.enableShoppingPoints"
+              active-color="#13ce66"
+              inactive-color="#ff4949">
+            </el-switch>
+          </el-form-item>
 
           <el-form-item  label="年支付金额限制" prop="yearPayPrice">
             <el-input-number v-model="form7.yearPayPrice" :precision="2" :step="0.1"></el-input-number>