yys 3 hari lalu
induk
melakukan
273a474fd7

+ 5 - 0
src/components/RightToolbar/index.vue

@@ -75,6 +75,11 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
+.top-right-btn {
+  float: none;
+  margin-left: auto;
+  flex-shrink: 0;
+}
 ::v-deep .el-transfer__button {
   border-radius: 50%;
   padding: 12px;

+ 49 - 53
src/views/live/live/index.vue

@@ -1,47 +1,9 @@
 <template>
-  <div class="app-container">
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['live:live:add']"
-          >新增</el-button
-        >
-      </el-col>
-      <!--      <el-col :span="1.5">-->
-      <!--        <el-button-->
-      <!--          type="success"-->
-      <!--          plain-->
-      <!--          icon="el-icon-edit"-->
-      <!--          size="mini"-->
-      <!--          :disabled="single"-->
-      <!--          @click="handleUpdate"-->
-      <!--          v-hasPermi="['live:live:edit']"-->
-      <!--        >修改</el-button>-->
-      <!--      </el-col>-->
-      <!--      <el-col :span="1.5">-->
-      <!--        <el-button-->
-      <!--          type="warning"-->
-      <!--          plain-->
-      <!--          icon="el-icon-download"-->
-      <!--          size="mini"-->
-      <!--          :loading="exportLoading"-->
-      <!--          @click="handleExport"-->
-      <!--          v-hasPermi="['live:live:export']"-->
-      <!--        >导出</el-button>-->
-      <!--      </el-col>-->
-      <right-toolbar
-        :showSearch.sync="showSearch"
-        @queryTable="getList"
-      ></right-toolbar>
-    </el-row>
+  <div class="app-container live-list-page">
     <el-form
       :model="queryParams"
       ref="queryForm"
+      class="live-filter-form filter-container"
       :inline="true"
       v-show="showSearch"
       label-width="68px"
@@ -60,6 +22,7 @@
           placeholder="请选择直播状态"
           clearable
           size="small"
+          popper-append-to-body
         >
           <el-option label="待直播" value="1"></el-option>
           <el-option label="直播中" value="2"></el-option>
@@ -81,6 +44,7 @@
           placeholder="请选择直播类型"
           clearable
           size="small"
+          popper-append-to-body
         >
           <el-option label="直播" value="1"></el-option>
           <el-option label="录播" value="2"></el-option>
@@ -94,6 +58,7 @@
           placeholder="选择起始时间"
           value-format="yyyy-MM-dd HH:mm:ss"
           size="small"
+          popper-append-to-body
         ></el-date-picker>
       </el-form-item>
       <!-- 开始时间-范围结束 -->
@@ -104,6 +69,7 @@
           placeholder="选择结束时间"
           value-format="yyyy-MM-dd HH:mm:ss"
           size="small"
+          popper-append-to-body
           :disabled="!queryParams.startTimeS"
         ></el-date-picker>
       </el-form-item>
@@ -113,6 +79,7 @@
           placeholder="请选择上下架状态"
           clearable
           size="small"
+          popper-append-to-body
         >
           <el-option label="上架" value="1"></el-option>
           <el-option label="下架" value="2"></el-option>
@@ -125,6 +92,7 @@
           placeholder="请选择审核状态"
           clearable
           size="small"
+          popper-append-to-body
         >
           <el-option label="审核未通过" value="0"></el-option>
           <el-option label="审核通过" value="1"></el-option>
@@ -150,6 +118,23 @@
         >
       </el-form-item>
     </el-form>
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['live:live:add']"
+          >新增</el-button
+        >
+      </el-col>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
+    </el-row>
     <div class="selection-toolbar">
       <el-checkbox
         :indeterminate="isIndeterminate"
@@ -736,12 +721,18 @@ import Editor from "@/components/Editor/wang";
 import user from "@/store/modules/user";
 import VideoUpload from "@/components/LiveVideoUpload/single.vue";
 
+const LIVE_TYPE_OPTIONS = [
+  { dictLabel: "直播", dictValue: "1" },
+  { dictLabel: "录播", dictValue: "2" },
+  { dictLabel: "直播回放", dictValue: "3" },
+];
+
 export default {
   name: "Live",
   components: { Editor, VideoUpload },
   data() {
     return {
-      liveTypeDictList: [],
+      liveTypeDictList: [...LIVE_TYPE_OPTIONS],
       currentCheck:null,
       currentCheckTagIndex:null,
       lastCheckTagRow:null,
@@ -880,13 +871,7 @@ export default {
   created() {
     this.getList();
     this.initCompanyDropList();
-    this.getDicts("live_mark_type").then((response) => {
-      this.markTypeDropList = response.data;
-    });
-    // 新增:获取直播类型字典
-    this.getDicts("live_type").then((response) => {
-      this.liveTypeDictList = response.data;
-    });
+    this.loadLiveDictOptions();
   },
   watch: {
     "form.startTime": {
@@ -918,6 +903,19 @@ export default {
     },
   },
   methods: {
+    loadLiveDictOptions() {
+      this.getDicts("live_mark_type").then((response) => {
+        this.markTypeDropList = response.data || [];
+      }).catch(() => {
+        this.markTypeDropList = [];
+      });
+      this.getDicts("live_type").then((response) => {
+        const dictList = response.data || [];
+        this.liveTypeDictList = dictList.length ? dictList : [...LIVE_TYPE_OPTIONS];
+      }).catch(() => {
+        this.liveTypeDictList = [...LIVE_TYPE_OPTIONS];
+      });
+    },
     getQwCorpListByCompanyId(companyId) {
       getQwCorpList(companyId)
         .then((res) => {
@@ -931,12 +929,10 @@ export default {
     initCompanyDropList() {
       getCompanyDropList()
         .then((res) => {
-          this.comapnyDropList = res.data;
-          console.log("comapnyDropList");
-          console.log(this.comapnyDropList);
+          this.comapnyDropList = res.data || [];
         })
-        .catch((res) => {
-          console.log(res);
+        .catch(() => {
+          this.comapnyDropList = [];
         });
     },
     /**

+ 36 - 23
src/views/live/liveAfteraSales/index.vue

@@ -1,6 +1,6 @@
 <template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+  <div class="app-container live-list-page">
+    <el-form :model="queryParams" ref="queryForm" class="live-filter-form filter-container" :inline="true" v-show="showSearch" label-width="68px">
 
       <el-form-item label="所属部门" prop="deptId">
         <treeselect style="width:220px" v-model="queryParams.deptId" :options="deptOptions" :show-count="true" placeholder="请选择所属部门" />
@@ -46,7 +46,7 @@
 
 
       <el-form-item label="退款类型" prop="refundType">
-        <el-select  v-model="queryParams.refundType" placeholder="请选择退款类型" clearable size="small" >
+        <el-select  v-model="queryParams.refundType" placeholder="请选择退款类型" clearable size="small" popper-append-to-body>
           <el-option
             v-for="item in serviceTypeOptions"
             :key="item.dictValue"
@@ -58,7 +58,7 @@
 
 
       <el-form-item label="审核状态" prop="status">
-        <el-select  v-model="queryParams.status" placeholder="请选择状态" clearable size="small" >
+        <el-select  v-model="queryParams.status" placeholder="请选择状态" clearable size="small" popper-append-to-body>
           <el-option
             v-for="item in statusOptions"
             :key="item.dictValue"
@@ -68,7 +68,7 @@
         </el-select>
       </el-form-item>
       <el-form-item label="售后状态" prop="salesStatus">
-        <el-select   v-model="queryParams.salesStatus" placeholder="请选择状态" clearable size="small" >
+        <el-select   v-model="queryParams.salesStatus" placeholder="请选择状态" clearable size="small" popper-append-to-body>
           <el-option
             v-for="item in salesStatusOptions"
             :key="item.dictValue"
@@ -78,7 +78,7 @@
         </el-select>
       </el-form-item>
       <el-form-item label="订单状态" prop="orderStatus">
-        <el-select   v-model="queryParams.orderStatus" placeholder="请选择订单状态" clearable size="small" >
+        <el-select   v-model="queryParams.orderStatus" placeholder="请选择订单状态" clearable size="small" popper-append-to-body>
           <el-option
             v-for="item in orderStatusOptions"
             :key="item.dictValue"
@@ -89,7 +89,7 @@
       </el-form-item>
 
       <el-form-item label="客户退回物流状态" prop="deliveryStatus">
-        <el-select   v-model="queryParams.deliveryStatus" placeholder="请选择物流状态" clearable size="small" >
+        <el-select   v-model="queryParams.deliveryStatus" placeholder="请选择物流状态" clearable size="small" popper-append-to-body>
           <el-option
             v-for="item in deliveryStatusOptions"
             :key="item.dictValue"
@@ -330,25 +330,38 @@ export default {
   },
   created() {
     this.getTreeselect();
-    this.getDicts("store_after_sales_sales_status").then((response) => {
-      this.salesStatusOptions = response.data;
-    });
-    this.getDicts("store_after_sales_status").then((response) => {
-      this.statusOptions = response.data;
-    });
-    this.getDicts("store_after_sales_service_type").then((response) => {
-      this.serviceTypeOptions = response.data;
-    });
-    this.getDicts("store_order_delivery_status").then((response) => {
-      this.deliveryStatusOptions = response.data;
-    });
-    this.getDicts("sys_live_order_status").then((response) => {
-      this.orderStatusOptions = response.data;
-    });
-
+    this.loadFilterDictOptions();
     this.getList();
   },
   methods: {
+    loadFilterDictOptions() {
+      const loadDict = (dictType) => {
+        return this.getDicts(dictType)
+          .then((response) => response.data || [])
+          .catch(() => []);
+      };
+      loadDict("store_after_sales_sales_status").then((data) => {
+        this.salesStatusOptions = data;
+      });
+      loadDict("store_after_sales_status").then((data) => {
+        this.statusOptions = data;
+      });
+      loadDict("store_after_sales_service_type").then((data) => {
+        this.serviceTypeOptions = data;
+      });
+      loadDict("store_order_delivery_status").then((data) => {
+        this.deliveryStatusOptions = data;
+      });
+      loadDict("sys_live_order_status").then((data) => {
+        if (data.length) {
+          this.orderStatusOptions = data;
+          return;
+        }
+        return loadDict("live_order_status").then((fallback) => {
+          this.orderStatusOptions = fallback;
+        });
+      });
+    },
     handleShow(row){
       this.title="售后订单"
       this.open=true;

+ 14 - 2
src/views/live/liveConfig/liveCoupon.vue

@@ -365,10 +365,22 @@ export default {
             this.$message.error(res.msg)
             return;
           }
+          const couponData = {
+            liveId: this.liveId,
+            couponIssueId: row.id,
+            status: targetStatus ? 1 : 0,
+            goodsId: row.goodsId,
+            couponName: row.title,
+            couponPrice: row.couponPrice,
+            useMinPrice: row.useMinPrice,
+            couponTime: row.couponTime
+          }
+          if (res.opLogId != null) {
+            couponData.opLogId = res.opLogId
+          }
           const msg = {
             cmd: 'coupon',
-            data: {"liveId":this.liveId,"couponIssueId":row.id,"status":targetStatus ? 1 : 0,"goodsId":row.goodsId,"couponName":row.title,
-              "couponPrice":row.couponPrice,"useMinPrice":row.useMinPrice, "couponTime":row.couponTime}
+            data: couponData
           }
           this.socket.send(JSON.stringify(msg));
 

+ 20 - 10
src/views/live/liveConsole/LiveConsole.vue

@@ -793,18 +793,22 @@ export default {
             this.$message.error(res.msg);
             return;
           }
+          const couponData = {
+            liveId: this.liveId,
+            couponIssueId: row.id,
+            status: targetStatus ? 1 : 0,
+            goodsId: row.goodsId,
+            couponName: row.title,
+            couponPrice: row.couponPrice,
+            useMinPrice: row.useMinPrice,
+            couponTime: row.couponTime
+          };
+          if (res.opLogId != null) {
+            couponData.opLogId = res.opLogId;
+          }
           this.socket.send(JSON.stringify({
             cmd: 'coupon',
-            data: {
-              liveId: this.liveId,
-              couponIssueId: row.id,
-              status: targetStatus ? 1 : 0,
-              goodsId: row.goodsId,
-              couponName: row.title,
-              couponPrice: row.couponPrice,
-              useMinPrice: row.useMinPrice,
-              couponTime: row.couponTime
-            }
+            data: couponData
           }));
         }
       });
@@ -836,6 +840,9 @@ export default {
       };
       updateLiveLotteryConf(param).then(response => {
         if (response.code === 200) {
+          if (response.opLogId != null) {
+            param.opLogId = response.opLogId;
+          }
           this.socket.send(JSON.stringify({ cmd: 'lottery', data: param }));
           this.$message.success('操作成功');
           this.loadMarketingData();
@@ -875,6 +882,9 @@ export default {
       };
       updateLiveRedConf(param).then(response => {
         if (response.code === 200) {
+          if (response.opLogId != null) {
+            param.opLogId = response.opLogId;
+          }
           this.socket.send(JSON.stringify({ cmd: 'red', data: param }));
           this.$message.success('操作成功');
           this.loadMarketingData();

+ 7 - 5
src/views/live/liveData/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="el-container-md">
+  <div class="app-container live-list-page">
     <!-- 数据统计指标展示区域 -->
     <el-card class="statistics-card" shadow="never">
       <el-row :gutter="20">
@@ -116,7 +116,7 @@
     </el-card>
 
     <!-- 筛选条件区域 -->
-    <el-form :model="queryParams" class="live-data-css" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
+    <el-form :model="queryParams" class="live-filter-form filter-container live-data-css" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
       <el-form-item label="直播名称" prop="liveName">
         <el-input
           v-model="queryParams.liveName"
@@ -127,19 +127,19 @@
         />
       </el-form-item>
       <el-form-item label="观看类型" prop="watchType">
-        <el-select v-model="queryParams.watchType" placeholder="请选择观看类型" clearable size="small">
+        <el-select v-model="queryParams.watchType" placeholder="请选择观看类型" clearable size="small" popper-append-to-body>
           <el-option label="直播" value="live"></el-option>
           <el-option label="回放" value="replay"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="完课状态" prop="completeStatus">
-        <el-select v-model="queryParams.completeStatus" placeholder="请选择完课状态" clearable size="small">
+        <el-select v-model="queryParams.completeStatus" placeholder="请选择完课状态" clearable size="small" popper-append-to-body>
           <el-option label="已完课" value="1"></el-option>
           <el-option label="未完课" value="0"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="付费状态" prop="payStatus">
-        <el-select v-model="queryParams.payStatus" placeholder="请选择付费状态" clearable size="small">
+        <el-select v-model="queryParams.payStatus" placeholder="请选择付费状态" clearable size="small" popper-append-to-body>
           <el-option label="已付费" value="1"></el-option>
           <el-option label="未付费" value="0"></el-option>
         </el-select>
@@ -162,6 +162,7 @@
           end-placeholder="结束日期"
           size="small"
           value-format="yyyy-MM-dd HH:mm:ss"
+          popper-append-to-body
         ></el-date-picker>
       </el-form-item>
       <el-form-item>
@@ -966,6 +967,7 @@ export default {
 <style scoped>
 .statistics-card {
   margin-bottom: 20px;
+  overflow: visible;
 }
 
 .statistics-item {

+ 2 - 2
src/views/live/liveVideo/index.vue

@@ -1,6 +1,6 @@
 <template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+  <div class="app-container live-list-page">
+    <el-form :model="queryParams" ref="queryForm" class="live-filter-form filter-container" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="视频名称" prop="remark">
         <el-input
           v-model="queryParams.remark"