Prechádzať zdrojové kódy

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_companyUI

yzx 1 týždeň pred
rodič
commit
34022232bd
44 zmenil súbory, kde vykonal 2492 pridanie a 359 odobranie
  1. 2 2
      .env.prod-bjzm
  2. 25 0
      .env.prod-cfryt
  3. 25 0
      .env.prod-gzzdy
  4. 25 0
      .env.prod-hsyy
  5. 4 0
      package.json
  6. 15 0
      src/api/company/companyRecharge.js
  7. 53 0
      src/api/company/companyRedPacketBalanceLogs.js
  8. 37 0
      src/api/live/liveData.js
  9. 32 0
      src/api/login.js
  10. 8 0
      src/api/qw/sopUserLogs.js
  11. 9 0
      src/api/qw/tagGroup.js
  12. 18 0
      src/api/store/packageOrder.js
  13. 1 1
      src/api/store/patient.js
  14. BIN
      src/assets/logo/cfryt.png
  15. BIN
      src/assets/logo/gzzdy_logo.png
  16. 18 8
      src/store/modules/user.js
  17. 1 0
      src/utils/auth.js
  18. 84 0
      src/views/WechatLoginDialog.vue
  19. 19 0
      src/views/company/companyRecharge/doRecharge.vue
  20. 110 3
      src/views/company/companyRecharge/index.vue
  21. 318 0
      src/views/company/companyRedPacketBalanceLogs/index.vue
  22. 3 3
      src/views/company/companyUser/profile/index.vue
  23. 75 3
      src/views/course/courseRedPacketLog/index.vue
  24. 4 1
      src/views/course/courseWatchLog/deptWatchLog.vue
  25. 19 2
      src/views/course/courseWatchLog/index.vue
  26. 4 1
      src/views/course/courseWatchLog/watchLog.vue
  27. 30 9
      src/views/fastGpt/fastGptRole/fastGptRoleUpdate.vue
  28. 308 0
      src/views/gw/gwAccount/index.vue
  29. 1 1
      src/views/live/components/productAfterSalesOrder.vue
  30. 37 35
      src/views/live/live/index.vue
  31. 1 1
      src/views/live/liveAfteraSales/index.vue
  32. 140 23
      src/views/live/liveConsole/LiveConsole.vue
  33. 364 8
      src/views/live/liveData/index.vue
  34. 2 2
      src/views/live/liveOrder/liveOrderDetails.vue
  35. 43 6
      src/views/login.vue
  36. 55 13
      src/views/qw/externalContact/index.vue
  37. 3 2
      src/views/qw/externalContactUnassigned/index.vue
  38. 6 6
      src/views/qw/sopTemp/updateSopTemp.vue
  39. 318 222
      src/views/qw/sopUserLogs/sopUserLogsSchedule.vue
  40. 3 2
      src/views/qw/user/cuDeptIdIndex.vue
  41. 6 1
      src/views/qw/user/index.vue
  42. 3 1
      src/views/qw/user/myIndex.vue
  43. 248 3
      src/views/store/components/packageOrderDetails.vue
  44. 15 0
      src/views/users/user/blacklist.vue

+ 2 - 2
.env.prod-bjzm

@@ -22,7 +22,7 @@ VUE_APP_COS_BUCKET = bjzmky-1323137866
 # 存储桶配置
 VUE_APP_COS_REGION = ap-chongqing
 # 线路一地址
-VUE_APP_VIDEO_LINE_1 = https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com
+VUE_APP_VIDEO_LINE_1 = https://bjzmkytcpv.ylrzcloud.com
 # 线路二地址
 VUE_APP_VIDEO_LINE_2 = https://bjzmobs.ylrztop.com
 
@@ -37,7 +37,7 @@ VUE_APP_BASE_API = '/prod-api'
 VUE_APP_COURSE_DEFAULT = 1
 
 #项目所属
-VUE_APP_PROJECT_FROM=bjczwh
+VUE_APP_PROJECT_FROM=bjzm
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 25 - 0
.env.prod-cfryt

@@ -0,0 +1,25 @@
+# 页面标题
+VUE_APP_TITLE =赤峰润元堂SCRM销售端
+# 公司名称
+VUE_APP_COMPANY_NAME =云联融智互联网医院有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =渝ICP备2024031984号-1
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/cfryt.png
+
+# 生产环境配置
+ENV = 'production'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+
+#项目所属
+VUE_APP_PROJECT_FROM=kyt
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 25 - 0
.env.prod-gzzdy

@@ -0,0 +1,25 @@
+# 页面标题
+VUE_APP_TITLE =郑多燕SCRM销售端
+# 公司名称
+VUE_APP_COMPANY_NAME =广州郑多燕健康管理有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =粤ICP备2023104913号-7
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/gzzdy_logo.png
+
+# 生产环境配置
+ENV = 'production'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+
+#项目所属
+VUE_APP_PROJECT_FROM=gzzdy
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 25 - 0
.env.prod-hsyy

@@ -0,0 +1,25 @@
+# 页面标题
+VUE_APP_TITLE =河山医院SCRM销售端
+# 公司名称
+VUE_APP_COMPANY_NAME =云联融智互联网医院有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =渝ICP备2024031984号-1
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/kyt.jpg
+
+# 生产环境配置
+ENV = 'production'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+
+#项目所属
+VUE_APP_PROJECT_FROM=kyt
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 4 - 0
package.json

@@ -8,6 +8,8 @@
     "dev": "vue-cli-service serve",
     "build:prod": "vue-cli-service build",
     "build:prod-ylrz": "vue-cli-service build --mode prod-ylrz",
+    "build:prod-cfryt": "vue-cli-service build --mode prod-cfryt",
+    "build:prod-hsyy": "vue-cli-service build --mode prod-hsyy",
     "build:stage": "vue-cli-service build --mode staging",
     "build:prod-jz": "vue-cli-service build --mode prod-jz",
     "build:prod-hzyy": "vue-cli-service build --mode prod-hzyy",
@@ -52,6 +54,7 @@
     "build:prod-jnsyj": "vue-cli-service build --mode prod-jnsyj",
     "build:prod-yxj": "vue-cli-service build --mode prod-yxj",
     "build:prod-bjzm": "vue-cli-service build --mode prod-bjzm",
+    "build:prod-gzzdy": "vue-cli-service build --mode prod-gzzdy",
     "preview": "node build/index.js --preview",
     "lint": "eslint --ext .js,.vue src",
     "test:unit": "jest --clearCache && vue-cli-service test:unit",
@@ -106,6 +109,7 @@
     "normalize.css": "7.0.0",
     "nprogress": "0.2.0",
     "path-to-regexp": "2.4.0",
+    "qrcode.vue": "^1.7.0",
     "qrcodejs2": "0.0.2",
     "quill": "1.3.7",
     "screenfull": "4.2.0",

+ 15 - 0
src/api/company/companyRecharge.js

@@ -60,3 +60,18 @@ export function recharge(data) {
     data: data
   })
 }
+
+export function redRecharge(data) {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs/redRecharge',
+    method: 'post',
+    data: data
+  })
+}
+
+export function getCompanyRedPacketBalance() {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs/redBalance',
+    method: 'get'
+  })
+}

+ 53 - 0
src/api/company/companyRedPacketBalanceLogs.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询企业账户记录列表
+export function listCompanyRedPacketBalanceLogs(query) {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询企业账户记录详细
+export function getCompanyRedPacketBalanceLogs(logsId) {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs/' + logsId,
+    method: 'get'
+  })
+}
+
+// 新增企业账户记录
+export function addCompanyRedPacketBalanceLogs(data) {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改企业账户记录
+export function updateCompanyRedPacketBalanceLogs(data) {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除企业账户记录
+export function delCompanyRedPacketBalanceLogs(logsId) {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs/' + logsId,
+    method: 'delete'
+  })
+}
+
+// 导出企业账户记录
+export function exportCompanyRedPacketBalanceLogs(query) {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs/export',
+    method: 'get',
+    params: query
+  })
+}

+ 37 - 0
src/api/live/liveData.js

@@ -59,3 +59,40 @@ export function listLiveData(data) {
   })
 }
 
+
+export function getLiveDataDetailBySql(liveId) {
+  return request({
+    url: '/liveData/liveData/getLiveDataDetailBySql?liveId=' + liveId,
+    method: 'get'
+  })
+}
+
+export function getLiveUserDetailListBySql(liveId) {
+  return request({
+    url: '/liveData/liveData/getLiveUserDetailListBySql?liveId=' + liveId,
+    method: 'get'
+  })
+}
+
+export function getLiveDataDetailByServer(liveId) {
+  return request({
+    url: '/liveData/liveData/getLiveDataDetailByServer?liveId=' + liveId,
+    method: 'get'
+  })
+}
+
+export function getLiveUserDetailListByServer(liveId) {
+  return request({
+    url: '/liveData/liveData/getLiveUserDetailListByServer?liveId=' + liveId,
+    method: 'get'
+  })
+}
+
+// 导出直播间用户详情数据
+export function exportLiveUserDetail(liveId) {
+  return request({
+    url: '/liveData/liveData/exportLiveUserDetail?liveId=' + liveId,
+    method: 'get'
+  })
+}
+

+ 32 - 0
src/api/login.js

@@ -1,5 +1,6 @@
 import request from '@/utils/request'
 
+
 // 登录方法
 export function login(username, password, code, uuid) {
   const data = {
@@ -45,3 +46,34 @@ export function getFirstLogin() {
     method: 'get'
   })
 }
+
+export function getWechatQrCode(data) {
+  return request({
+    url: '/getWechatQrCode',
+    method: 'post',
+    data: data
+  })
+}
+
+export function checkWechatScan(ticket) {
+  return request({
+    url: '/checkWechatScan',
+    method: 'get',
+    params: { ticket }
+  })
+}
+
+//检查是否需要验证码验证
+export function checkIsNeedCheck(username, password, code, uuid) {
+  const data = {
+    username,
+    password,
+    code,
+    uuid
+  }
+  return request({
+    url: '/checkIsNeedCheck',
+    method: 'post',
+    data: data
+  })
+}

+ 8 - 0
src/api/qw/sopUserLogs.js

@@ -60,6 +60,14 @@ export function repairSopUserLogs(data) {
     data: data
   })
 }
+//修复营期
+export function getShortLink(data) {
+  return request({
+    url: '/qwSop/sopUserLogs/getShortLink',
+    method: 'get',
+    params: data
+  })
+}
 
 // 修改sopUserLogs
 export function updateLogDate(data) {

+ 9 - 0
src/api/qw/tagGroup.js

@@ -16,6 +16,15 @@ export function allListTagGroup(query) {
   })
 }
 
+// 模糊查询分页searchTags
+export function allListTagGroupPage(data) {
+  return request({
+    url: '/qw/tagGroup/allListPage',
+    method: 'get',
+    params: data
+  })
+}
+
 // 查询企微客户标签组详细
 export function getTagGroup(id) {
   return request({

+ 18 - 0
src/api/store/packageOrder.js

@@ -96,6 +96,24 @@ export function getUserPhone(orderId) {
     method: 'get'
   })
 }
+
+// 修改或者添加患者首诊图片
+export function editPatientImages(orderId, imagesList) {
+  const formData = new FormData();
+  formData.append('orderId', orderId);
+  formData.append('imagesList', imagesList);
+  
+  return request({
+    url: '/store/packageOrder/editPatientImages',
+    method: 'post',
+    data: formData,
+    transformRequest: [function (data, headers) {
+      // 删除默认的Content-Type,让浏览器自动设置为multipart/form-data
+      delete headers['Content-Type'];
+      return data;
+    }]
+  })
+}
 export function getWxaCodePackageOrderUnLimit(orderId) {
   return request({
     url: '/store/packageOrder/getWxaCodePackageOrderUnLimit/'+orderId,

+ 1 - 1
src/api/store/patient.js

@@ -45,7 +45,7 @@ export function updatePatient(data) {
 // 删除病人
 export function delPatient(patientId) {
   return request({
-    url: '/his/patient/' + patientId,
+    url: '/store/patient/' + patientId,
     method: 'delete'
   })
 }

BIN
src/assets/logo/cfryt.png


BIN
src/assets/logo/gzzdy_logo.png


+ 18 - 8
src/store/modules/user.js

@@ -1,4 +1,4 @@
-import { login, logout, getInfo } from '@/api/login'
+import { login, logout, getInfo,checkIsNeedCheck } from '@/api/login'
 import { getToken, setToken, removeToken } from '@/utils/auth'
 
 const user = {
@@ -32,6 +32,7 @@ const user = {
     }
   },
 
+
   actions: {
     // 登录
     Login({ commit }, userInfo) {
@@ -40,13 +41,22 @@ const user = {
       const code = userInfo.code
       const uuid = userInfo.uuid
       return new Promise((resolve, reject) => {
-        login(username, password, code, uuid).then(res => {
-          setToken(res.token)
-          commit('SET_TOKEN', res.token)
-          resolve()
-        }).catch(error => {
-          reject(error)
-        })
+        checkIsNeedCheck(username, password, code, uuid).then(resp => {
+          console.log("检查是否需要验证", resp)
+          if (!resp) {
+            // 不需要短信验证,直接登录
+            login(username, password, code, uuid).then(res => {
+              setToken(res.token)
+              commit('SET_TOKEN', res.token)
+              resolve({ needSms: false })
+            }).catch(error => {
+              reject(error)
+            })
+          } else {
+            // 需要短信,交给页面去弹窗
+            resolve({ needSms: true })
+          }
+        }).catch(error => reject(error))
       })
     },
 

+ 1 - 0
src/utils/auth.js

@@ -10,6 +10,7 @@ export function setToken(token) {
   return Cookies.set(TokenKey, token)
 }
 
+
 export function removeToken() {
   return Cookies.remove(TokenKey)
 }

+ 84 - 0
src/views/WechatLoginDialog.vue

@@ -0,0 +1,84 @@
+<!--<template>-->
+<!--  <el-dialog title="微信扫码验证" :visible.sync="visible" width="300px">-->
+<!--    <div class="flex flex-col items-center justify-center">-->
+<!--      &lt;!&ndash; 直接用 qrcode-vue 生成二维码 &ndash;&gt;-->
+<!--      <qrcode-vue :value="qrUrl" :size="200" v-if="qrUrl" />-->
+<!--      <p v-if="status==='waiting'">请使用微信扫码确认</p>-->
+<!--      <p v-if="status==='success'">验证成功,正在跳转...</p>-->
+<!--    </div>-->
+<!--  </el-dialog>-->
+<!--</template>-->
+
+<script>
+import { getWechatQrCode, checkWechatScan } from "@/api/login";
+import QrcodeVue from "qrcode.vue";
+
+export default {
+  name: "WechatLoginDialog",
+  components: { QrcodeVue },
+  props: {
+    visible: Boolean,
+    username: String,
+    redirect: String
+  },
+  data() {
+    return {
+      qrUrl: "",     // 微信扫码登录URL(用来生成二维码内容)
+      ticket: "",
+      status: "waiting",
+      timer: null,
+      errorShown: false
+    };
+  },
+  watch: {
+    visible(newVal) {
+      if (newVal && this.username) this.open(this.username);
+    }
+  },
+  methods: {
+    open(username) {
+      getWechatQrCode({ username }).then(res => {
+        this.ticket = res.data.state;
+        const win = window.open(res.data.url); // 新开窗口扫码
+        this.startPolling(win); // 传入窗口对象
+      });
+    },
+    startPolling(win) {
+      this.timer = setInterval(() => {
+        checkWechatScan(this.ticket)
+          .then(res => {
+            if (res.code === 200 && res.data) {
+              this.status = "success";
+              clearInterval(this.timer);
+              console.log("扫码成功,准备 emit 事件", res.data);
+
+              this.$emit("update:visible", false);
+              this.$emit("loginSuccess", res.data);
+
+              if (win && !win.closed) {
+                win.close(); // 扫码完成后自动关闭窗口
+              }
+            }
+          })
+          .catch(err => {
+            clearInterval(this.timer);
+            this.$emit("update:visible", false);
+
+            if (!this.errorShown) {
+              this.errorShown = true;
+              this.$message.error(err.response?.data?.msg );
+            }
+
+            if (win && !win.closed) {
+              win.close(); // 异常也关闭窗口
+            }
+          });
+      }, 800);
+    }
+
+  },
+  beforeDestroy() {
+    if (this.timer) clearInterval(this.timer);
+  }
+};
+</script>

+ 19 - 0
src/views/company/companyRecharge/doRecharge.vue

@@ -6,6 +6,9 @@
           <el-form-item label="当前余额"  >
              <span style="font-size:20px;color:red;">{{money}}</span>元
           </el-form-item>
+           <el-form-item v-if="showRedPacket" label="红包余额"  >
+             <span style="font-size:20px;color:red;">{{redMoney}}</span>元
+           </el-form-item>
           <el-form-item label="充值金额" prop="money">
             <el-input-number  v-model="form.money" style="width:200px" placeholder="请输入充值金额" />
           </el-form-item>
@@ -46,6 +49,7 @@
 <script>
 import { listCompanyRecharge, getCompanyRecharge, delCompanyRecharge, addCompanyRecharge, updateCompanyRecharge, exportCompanyRecharge } from "@/api/company/companyRecharge";
 import { getCompanyInfo } from "@/api/company/company";
+import { getConfigByKey } from '@/api//company/companyConfig'
 import {queryOrder, weixinPay, wxQrPay} from "@/api/company/pay";
 import QRCode from 'qrcodejs2'
 
@@ -56,12 +60,14 @@ export default {
       qrLoading: false,
       qrPayUrl: '',
       orderNo:"",
+      showRedPacket: false,
       payVisible: false,
       payTitle: '微信支付',
       toPayFlag:true,
       activeName:"first",
       timer: null,
       money:0,
+      redMoney:0,
       form: {
         payType:1,
       },
@@ -107,9 +113,22 @@ export default {
     this.getDicts("company_pay_type").then((response) => {
       this.payTypeOptions = response.data;
     });
+    getConfigByKey("course.config").then(response => {
+      if(response.data && response.data.configValue) {
+        const  config = JSON.parse(response.data.configValue);
+        if( config.isRedPackageBalanceDeduction && config.isRedPackageBalanceDeduction==1){
+          this.showRedPacket=true
+        }
+      } else {
+        this.showRedPacket = false;
+      }
+    });
     getCompanyInfo().then(response => {
       this.money = response.data.money;
+      this.redMoney = response.data.redPackageMoney;
     });
+
+    redMoney
   },
   beforeDestroy() {
     this.clearTimer();

+ 110 - 3
src/views/company/companyRecharge/index.vue

@@ -24,6 +24,16 @@
               />
         </el-select>
       </el-form-item>
+      <el-form-item label="业务类型" prop="businessType">
+        <el-select v-model="queryParams.businessType" placeholder="请选择支付类型" clearable size="small">
+          <el-option
+            v-for="dict in businessTypeOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
 
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -46,6 +56,14 @@
           @click="handleRecharge"
           v-hasPermi="['company:companyRecharge:Recharge']"
         >充值</el-button>
+        <el-button
+          size="mini"
+          type="primary"
+          icon="el-icon-edit"
+          @click="handleRedRecharge"
+          v-if="showRedPacket"
+          v-hasPermi="['company:companyRecharge:Recharge']"
+        >红包充值</el-button>
       </el-col>
 	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -60,6 +78,11 @@
               <el-tag prop="status" v-for="(item, index) in payTypeOptions"   v-if="scope.row.payType==item.dictValue">{{item.dictLabel}}</el-tag>
         </template>
       </el-table-column>
+      <el-table-column label="业务类型" align="center" prop="businessType">
+        <template slot-scope="scope">
+          <dict-tag :options="businessTypeOptions" :value="scope.row.businessType"/>
+        </template>
+      </el-table-column>
       <el-table-column label="凭证照片" align="center" prop="images" >
         <template slot-scope="scope">
           <div v-if="scope.row.imgs != null && scope.row.imgs != undefined && scope.row.imgs != ''">
@@ -160,17 +183,42 @@
       </div>
     </el-dialog>
 
+    <!-- 红包充值对话框 -->
+    <el-dialog :title="redRecharge.title" :visible.sync="redRecharge.open" width="500px" append-to-body>
+      <el-form ref="redRechargeForm" :rules="redRechargeRules" :model="redRechargeForm" label-width="80px">
+        <el-form-item label="公司">
+          <el-input v-model="redRechargeForm.companyName" disabled/>
+        </el-form-item>
+        <el-form-item label="余额">
+          <el-input v-model="redRechargeForm.balance" disabled/>
+        </el-form-item>
+        <el-form-item label="充值金额" prop="money">
+          <el-input-number v-model="redRechargeForm.money" :min="0.01" placeholder="请输入充值金额"/>
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="redRechargeForm.remark" placeholder="请输入备注"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitRedRechargeForm" :disabled="redSubmit">确 定</el-button>
+        <el-button @click="redRecharge.open=false">取 消</el-button>
+      </div>
+    </el-dialog>
+
   </div>
 </template>
 
 <script>
-import { listCompanyRecharge, getCompanyRecharge, delCompanyRecharge, addCompanyRecharge, updateCompanyRecharge, exportCompanyRecharge, recharge } from "@/api/company/companyRecharge";
+import { listCompanyRecharge, getCompanyRecharge, delCompanyRecharge, addCompanyRecharge, updateCompanyRecharge, exportCompanyRecharge, recharge, redRecharge, getCompanyRedPacketBalance } from "@/api/company/companyRecharge";
 import { getInfo } from '@/api/login';
+import { getConfigByKey } from '@/api/company/companyConfig'
 export default {
   name: "CompanyRecharge",
   data() {
     return {
-
+      // 业务类型 0-普通 1-红包充值
+      businessTypeOptions:[],
+      showRedPacket: false,
       payTypeOptions:[],
       statusOptions:[],
       // 遮罩层
@@ -200,7 +248,8 @@ export default {
         money: null,
         rechargeNo: null,
         payTime: null,
-        status: null
+        status: null,
+        businessType:null, // 业务类型
       },
       // 表单参数
       form: {},
@@ -224,6 +273,20 @@ export default {
       rechargeForm: {
         money: 0,
       },
+      redSubmit: false,
+      // 红包充值表单参数
+      redRechargeForm: {
+        money: 0
+      },
+      redRecharge: {
+        open: false,
+        title: '红包充值'
+      },
+      redRechargeRules: {
+        money: [
+          { required: true, message: '扣款金额不能为空', trigger: 'blur' }
+        ]
+      },
     };
   },
   created() {
@@ -234,6 +297,19 @@ export default {
     this.getDicts("comapny_recharge_pay_type").then((response) => {
       this.payTypeOptions = response.data;
     });
+    this.getDicts("sys_company_pay_business_type").then(response => {
+      this.businessTypeOptions = response.data;
+    });
+    getConfigByKey("course.config").then(response => {
+      if(response.data && response.data.configValue) {
+        const  config = JSON.parse(response.data.configValue);
+        if( config.isRedPackageBalanceDeduction && config.isRedPackageBalanceDeduction==1){
+          this.showRedPacket=true
+        }
+      } else {
+        this.showRedPacket = false;
+      }
+    });
     this.getList();
   },
   methods: {
@@ -272,6 +348,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.queryParams.businessType=null;
       this.handleQuery();
     },
     // 多选框选中数据
@@ -320,6 +397,22 @@ export default {
         }
       });
     },
+
+    /** 红包充值提交按钮 */
+    submitRedRechargeForm() {
+      this.$refs['redRechargeForm'].validate(valid => {
+        if (valid) {
+          this.redSubmit=true
+          redRecharge(this.redRechargeForm).then(response => {
+            if (response.code === 200) {
+              this.msgSuccess(response.msg)
+              this.redRecharge.open = false
+              this.getList()
+            }
+          })
+        }
+      })
+    },
     /** 删除按钮操作 */
     handleDelete(row) {
       const rechargeIds = row.rechargeId || this.ids;
@@ -357,6 +450,20 @@ export default {
       };
       this.recharge.open = true;
     },
+    /** 红包充值按钮*/
+    handleRedRecharge(){
+      getCompanyRedPacketBalance().then(response => {
+        console.log(response.data);
+        const data = response.data;
+        this.redSubmit=false
+        this.redRechargeForm.companyId = data.companyId
+        this.redRechargeForm.companyName = data.companyName
+        this.redRechargeForm.balance = data.redPackageMoney
+        this.redRechargeForm.money = null
+        this.redRecharge.open = true
+      })
+
+    },
     /** 提交按钮 */
     submitRechargeForm() {
       this.$refs["rechargeForm"].validate(valid => {

+ 318 - 0
src/views/company/companyRedPacketBalanceLogs/index.vue

@@ -0,0 +1,318 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="ID" prop="logsId">
+        <el-input
+          v-model="queryParams.logsId"
+          placeholder="请输入ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+<!--      <el-form-item label="公司名" prop="companyId">-->
+<!--        <el-select filterable  style="width: 220px" v-model="queryParams.companyId" placeholder="请选择公司名" clearable size="small">-->
+<!--          <el-option-->
+<!--            v-for="item in companys"-->
+<!--            :key="item.companyId"-->
+<!--            :label="item.companyName"-->
+<!--            :value="item.companyId"-->
+<!--          />-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
+      <el-form-item label="类型" prop="logsType">
+        <el-select v-model="queryParams.logsType" placeholder="请选择类型" clearable size="small">
+          <el-option
+            v-for="dict in logsTypeOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="创建时间">
+        <el-date-picker
+          v-model="daterangeCreateTime"
+          size="small"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['company:companyRedPacketBalanceLogs:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table border v-loading="loading" :data="companyRedPacketBalanceLogsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="ID" align="center" prop="logsId" />
+      <el-table-column label="企业" align="center" prop="companyName" />
+      <el-table-column label="金额" align="center" prop="money" />
+      <el-table-column label="余额" align="center" prop="balance" />
+      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="类型" align="center" prop="logsType">
+        <template slot-scope="scope">
+          <dict-tag :options="logsTypeOptions" :value="scope.row.logsType"/>
+        </template>
+      </el-table-column>
+      <el-table-column v-if="false" label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['company:companyRedPacketBalanceLogs:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['company:companyRedPacketBalanceLogs:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改企业红包余额记录对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="企业ID" prop="companyId">
+          <el-input v-model="form.companyId" placeholder="请输入企业ID" />
+        </el-form-item>
+        <el-form-item label="金额" prop="money">
+          <el-input v-model="form.money" placeholder="请输入金额" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" placeholder="请输入备注" />
+        </el-form-item>
+        <el-form-item label="余额" prop="balance">
+          <el-input v-model="form.balance" placeholder="请输入余额" />
+        </el-form-item>
+        <el-form-item label="类型 字典字段" prop="logsType">
+          <el-select v-model="form.logsType" placeholder="请选择类型 字典字段">
+            <el-option
+              v-for="dict in logsTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="parseInt(dict.dictValue)"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listCompanyRedPacketBalanceLogs, getCompanyRedPacketBalanceLogs, delCompanyRedPacketBalanceLogs, addCompanyRedPacketBalanceLogs, updateCompanyRedPacketBalanceLogs, exportCompanyRedPacketBalanceLogs } from "@/api/company/companyRedPacketBalanceLogs";
+import { getCompanyList } from '@/api/company/company'
+
+export default {
+  name: "CompanyRedPacketBalanceLogs",
+  data() {
+    return {
+      companys:[], // 公司列表
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 企业红包余额记录表格数据
+      companyRedPacketBalanceLogsList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 创建时间时间范围
+      daterangeCreateTime: [],
+      // 类型 字典字段字典
+      logsTypeOptions: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        logsId: null,
+        companyId: null,
+        createTime: null,
+        logsType: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+
+    this.getDicts("company_red_packet_balance_type").then(response => {
+      this.logsTypeOptions = response.data;
+    });
+    getCompanyList().then(response => {
+      this.companys = response.data;
+    });
+    this.getList();
+
+  },
+  methods: {
+    /** 查询企业红包余额记录列表 */
+    getList() {
+      this.loading = true;
+      this.queryParams.params = {};
+      if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
+        this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
+        this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
+      }
+      listCompanyRedPacketBalanceLogs(this.queryParams).then(response => {
+        this.companyRedPacketBalanceLogsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        logsId: null,
+        companyId: null,
+        money: null,
+        remark: null,
+        createTime: null,
+        balance: null,
+        logsType: null,
+        status: 0
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.daterangeCreateTime = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.logsId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加企业红包余额记录";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const logsId = row.logsId || this.ids
+      getCompanyRedPacketBalanceLogs(logsId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改企业红包余额记录";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.logsId != null) {
+            updateCompanyRedPacketBalanceLogs(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addCompanyRedPacketBalanceLogs(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const logsIds = row.logsId || this.ids;
+      this.$confirm('是否确认删除企业红包余额记录编号为"' + logsIds + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delCompanyRedPacketBalanceLogs(logsIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有企业红包余额记录数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportCompanyRedPacketBalanceLogs(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>

+ 3 - 3
src/views/company/companyUser/profile/index.vue

@@ -7,9 +7,9 @@
             <span>个人信息</span>
           </div>
           <div>
-<!--            <div class="text-center">-->
-<!--              <userAvatar :user="user" />-->
-<!--            </div>-->
+            <div class="text-center">
+              <userAvatar :user="user" />
+            </div>
             <ul class="list-group list-group-striped">
               <li class="list-group-item">
                 <svg-icon icon-class="user" />用户名称

+ 75 - 3
src/views/course/courseRedPacketLog/index.vue

@@ -48,7 +48,28 @@
 	      @keyup.enter.native="handleQuery"
 	    />
 	  </el-form-item>
-		<el-form-item label="课程" prop="courseId">
+      <el-form-item label="营期" prop="courseId">
+        <el-select
+          v-model="queryParams.periodId"
+          placeholder="请选择课程"
+          filterable
+          clearable
+          size="small"
+          remote
+          :remote-method="remoteMethod"
+          :loading="loadingPeriod"
+          @focus="handleFocus"
+        >
+          <el-option
+            v-for="dict in periodLists"
+            :key="dict.periodId"
+            :label="dict.periodName"
+            :value="parseInt(dict.periodId)"
+          />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item label="课程" prop="courseId">
 		     <el-select filterable  v-model="queryParams.courseId" placeholder="请选择课程"  clearable size="small" @change="courseChange(queryParams.courseId)">
 		         <el-option
 		           v-for="dict in courseLists"
@@ -113,6 +134,7 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="记录编号" align="center" prop="logId" />
       <el-table-column label="批次单号" align="center" prop="outBatchNo" />
+      <el-table-column label="营期名称" align="center" prop="periodName" />
       <el-table-column label="课程名称" align="center" prop="courseName" />
       <el-table-column label="小节名称" align="center" prop="title" />
       <el-table-column label="会员id" align="center" prop="userId" />
@@ -199,7 +221,7 @@
 <script>
 import { courseList,videoList,listCourseRedPacketLog,retryCourseRedPacketLog, myListCourseRedPacketLogNew, getCourseRedPacketLog, delCourseRedPacketLog, addCourseRedPacketLog, updateCourseRedPacketLog, exportCourseRedPacketLog } from "@/api/course/courseRedPacketLog";
 import { getCompanyList } from "@/api/company/company";
-
+import { periodList } from "@/api/course/userCoursePeriod";
 export default {
   name: "CourseRedPacketLog",
   data() {
@@ -208,6 +230,7 @@ export default {
 	  deptOptions:[],
       // 遮罩层
       loading: true,
+      loadingPeriod: false,
       // 导出遮罩层
       exportLoading: false,
       // 选中数组
@@ -220,6 +243,7 @@ export default {
       showSearch: true,
       activeName:"00",
       courseLists:[],
+      periodLists:[],
       videoList:[],
       // 总条数
       total: 0,
@@ -234,6 +258,7 @@ export default {
         pageNum: 1,
         pageSize: 10,
         courseId: null,
+        periodId: null,
         userId: null,
         nickName:null,
         videoId: null,
@@ -246,6 +271,10 @@ export default {
         phoneMk: null,
         sTime:null,
         eTime:null,
+      },
+      queryPeriod: {
+        pageNum: 1,
+        pageSize: 20
       },
 	   createTime:null,
       // 表单参数
@@ -263,9 +292,50 @@ export default {
 	  courseList().then(response => {
 	    this.courseLists = response.list;
 	  });
+    periodList(this.queryPeriod).then(response => {
+      this.periodLists = response.data;
+    });
   },
   methods: {
-	  handleClick(tab, event) {
+
+    // 远程搜索方法
+    async remoteMethod(query) {
+      this.searchKeyword = query
+      if (query !== '') {
+        this.loadingPeriod = true
+        await this.getPeriodList(query)
+        this.loadingPeriod = false
+      } else {
+        // 如果输入为空,可以清空列表或加载默认数据
+        this.periodLists = []
+      }
+    },
+
+    // 获取营期列表
+    async getPeriodList(keyword = '') {
+      try {
+        const params = {
+          periodName: keyword, // 搜索关键词
+          pageNum: 1,
+          pageSize: 50 // 根据需求调整
+        }
+
+        const response = await periodList(params)
+        this.periodLists = response.data.list || response.data || []
+      } catch (error) {
+        console.error('获取营期列表失败:', error)
+        this.periodLists = []
+      }
+    },
+    // 下拉框获取焦点时加载数据
+    async handleFocus() {
+      if (this.periodLists.length === 0) {
+        this.getPeriodList();
+      }
+    },
+
+
+    handleClick(tab, event) {
 	    this.activeName=tab.name;
 	    this.queryParams.status=tab.name
 	    console.log(this.queryParams.status)
@@ -313,6 +383,7 @@ export default {
       this.form = {
         logId: null,
         courseId: null,
+        periodId: null,
         userId: null,
         videoId: null,
         companyUserId: null,
@@ -334,6 +405,7 @@ export default {
 	   this.createTime=null;
 	  this.queryParams.sTime=null;
 	  this.queryParams.eTime=null;
+	  this.queryParams.periodId=null;
       this.handleQuery();
     },
     // 多选框选中数据

+ 4 - 1
src/views/course/courseWatchLog/deptWatchLog.vue

@@ -653,7 +653,10 @@ export default {
       this.queryParams.eTime = this.formatDate(todayEnd);
     },
     handleSendTypeChange() {
-      this.handleQuery(); // 重新查询列表
+      setTimeout(() => {
+        this.handleQuery(); // 重新查询列表
+      }, 200);
+
     },
 
     // 重置日历组件

+ 19 - 2
src/views/course/courseWatchLog/index.vue

@@ -95,6 +95,9 @@
           </el-option>
         </el-select>
       </el-form-item>
+      <el-form-item label="所属部门" prop="deptId">
+        <treeselect style="width:220px" v-model="queryParams.deptId" :options="deptOptions" :show-count="true" placeholder="请选择所属部门" />
+      </el-form-item>
       <el-form-item v-if="companyName==2" label="所属销售" prop="companyUserId">
         <el-select v-model="queryParams.companyUserId" clearable filterable remote
                    placeholder="请输入关键词"
@@ -625,10 +628,14 @@ import Calendar from 'vue-mobile-calendar'
 import {infoSop} from "@/api/qw/sop";
 import {getCompanyUserListLikeName} from "../../../api/company/companyUser";
 import {getQwList} from "@/api/qw/qwUser";
+import {treeselect} from "@/api/company/companyDept";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 Vue.use(Calendar)
 
 export default {
   name: "CourseWatchLog",
+  components: {Treeselect },
   data() {
     return {
       companyUserFirstLoad: true, // 首次加载标志
@@ -682,6 +689,7 @@ export default {
         }
       },
       courseLists:[],
+      deptOptions: undefined,
       scheduleLists:[], // 营期名称
       videoList:[],
       logTypeOptions:[],
@@ -781,6 +789,7 @@ export default {
         qwUserId: null,
         qwUserName: null,
         companyUserId: null,
+        deptId: null,
         companyId: null,
         courseId: null,
         periodId:null,
@@ -829,7 +838,7 @@ export default {
     courseList().then(response => {
       this.courseLists = response.list;
     });
-
+    this.getTreeselect();
     this.getDicts("sys_course_watch_log_type_new").then(response => {
       this.logTypeOptions = response.data;
     });
@@ -850,6 +859,11 @@ export default {
     this.loading=false;
   },
   methods: {
+    getTreeselect() {
+      treeselect().then((response) => {
+        this.deptOptions = response.data;
+      });
+    },
     // 添加辅助方法
     isEmptyArray(arr) {
       return !arr || arr.length === 0;
@@ -1437,7 +1451,10 @@ export default {
       if(this.queryParams.sendType == 1) {
         this.queryParams.qwUserName = null;
       }
-      this.handleQuery(); // 重新查询列表
+      setTimeout(() => {
+        this.handleQuery();
+      }, 200);
+
     },
 
 

+ 4 - 1
src/views/course/courseWatchLog/watchLog.vue

@@ -939,7 +939,10 @@ export default {
       // 强制重新渲染表格
       this.tableKey += 1;
 
-      this.getList();
+      setTimeout(() => {
+        this.getList();
+      }, 200);
+
     },
 
     // 重置日历组件

+ 30 - 9
src/views/fastGpt/fastGptRole/fastGptRoleUpdate.vue

@@ -41,20 +41,37 @@
       </el-form-item>
 
       <el-form-item label="物流提醒" prop="logistics">
-        <el-select v-model="form.logistics" placeholder="请选择类型" clearable size="small" style="width: 150px" >
-          <el-option
-            v-for="item in logisticsOptions"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          />
-        </el-select>
+        <el-switch
+          v-model="form.logistics"
+          :active-value="1"
+          :inactive-value="0"
+          active-text="是"
+          inactive-text="否"
+          active-color="#13ce66"
+          inactive-color="#ff4949"
+        />
         <div style="color: #999;font-size: 14px;display: flex;align-items: center;">
           <i class="el-icon-info"></i>
           AI是否主动发送物流信息,发货和到货的时候会提醒用户
         </div>
       </el-form-item>
 
+      <el-form-item label="禁止夜间回复" prop="forbidStatus">
+        <el-switch
+          v-model="form.forbidStatus"
+          :active-value="1"
+          :inactive-value="0"
+          active-text="是"
+          inactive-text="否"
+          active-color="#13ce66"
+          inactive-color="#ff4949"
+        />
+        <div style="color: #999;font-size: 14px;display: flex;align-items: center;">
+          <i class="el-icon-info"></i>
+          AI是否规定时间内不回复消息,默认为开启,在结束时间后再进行最后一条消息回复,关闭后一天24小时都进行回复
+        </div>
+      </el-form-item>
+
       <el-form-item label="客服头像" prop="avatar">
         <ImageUpload v-model="form.avatar" type="image" :num="1" :width="150" :height="150" style="margin-top: 1%;" />
       </el-form-item>
@@ -318,7 +335,8 @@ export default {
         avatar: null,
         kfMediaId: null,
         channelType: null,
-        logistics: null
+        logistics: null,
+        forbidStatus: null,
       },
       // 表单参数
       form: {
@@ -340,6 +358,9 @@ export default {
         logistics: [
           { required: true, message: "物流提醒不能为空", trigger: "change" }
         ],
+        forbidStatus: [
+          { required: true, message: "禁止夜间回复不能为空", trigger: "change" }
+        ],
       },
       tagsFormRules:{
         tagIds:[

+ 308 - 0
src/views/gw/gwAccount/index.vue

@@ -0,0 +1,308 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="微信昵称" prop="wxNickName">
+        <el-input
+          v-model="queryParams.wxNickName"
+          placeholder="请输入微信昵称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="微信号" prop="wxNo">
+        <el-input
+          v-model="queryParams.wxNo"
+          placeholder="请输入微信号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="手机号" prop="wxNo">
+        <el-input
+          :maxlength="11"
+          v-model="queryParams.phone"
+          placeholder="请输入手机号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="员工" prop="companyUserId">
+        <el-select v-model="queryParams.companyUserId" clearable>
+          <el-option v-for="item in qwUserList" :label="item.qwUserName" :value="item.id" />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['company:companyWx:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['company:companyWx:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['company:companyWx:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['company:companyWx:export']"
+        >导出</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="companyAccountList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="id" align="center" prop="id" />
+      <el-table-column label="微信昵称" align="center" prop="wxNickName" />
+      <el-table-column label="微信号" align="center" prop="wxNo" />
+      <el-table-column label="手机号" align="center" prop="phone" />
+      <el-table-column label="员工" align="center" prop="companyUserName" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['company:companyWx:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['company:companyWx:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改个微账号对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="微信昵称" prop="wxNickName">
+          <el-input v-model="form.wxNickName" placeholder="请输入微信昵称" />
+        </el-form-item>
+        <el-form-item label="微信号" prop="wxNo">
+          <el-input v-model="form.wxNo" placeholder="请输入微信号" />
+        </el-form-item>
+        <el-form-item label="手机号" prop="phone">
+          <el-input v-model="form.phone" :maxlength="11" placeholder="请输入手机号" />
+        </el-form-item>
+        <el-form-item label="员工" prop="companyUserId">
+          <el-select v-model="form.companyUserId" filterable placeholder="请选择员工">
+            <el-option v-for="item in qwUserList" :label="item.nickName" :value="item.userId" />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listCompanyAccount, getCompanyAccount, delCompanyAccount, addCompanyAccount, updateCompanyAccount, exportCompanyAccount, companyListAll } from "@/api/company/companyAccount";
+import {getAllUserlist} from "@/api/company/companyUser";
+
+
+export default {
+  name: "CompanyAccount",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 个微账号表格数据
+      companyAccountList: [],
+      qwUserList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        wxNickName: null,
+        wxNo: null,
+        companyUserId: null,
+        createUser: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+    companyListAll().then(e => {
+      this.qwUserList = e.data;
+    })
+  },
+  methods: {
+    /** 查询个微账号列表 */
+    getList() {
+      this.loading = true;
+      listCompanyAccount(this.queryParams).then(response => {
+        this.companyAccountList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        wxNickName: null,
+        wxNo: null,
+        companyUserId: null,
+        createTime: null,
+        createUser: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加个微账号";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getCompanyAccount(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改个微账号";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateCompanyAccount(this.form).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          } else {
+            addCompanyAccount(this.form).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除个微账号编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delCompanyAccount(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(function() {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有个微账号数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportCompanyAccount(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        }).catch(function() {});
+    },
+  }
+};
+</script>

+ 1 - 1
src/views/live/components/productAfterSalesOrder.vue

@@ -16,7 +16,7 @@
             <el-tag prop="status" v-for="(item, index) in salesStatusOptions"    v-if="afterSales.salesStatus==item.dictValue">{{item.dictLabel}}</el-tag>
           </span>
           <div class="operate-button-container"  >
-            <el-button size="mini" v-hasPermi="['store:storeAfterSales:edit']" v-show="afterSales.salesStatus==0&&afterSales.status===1"  @click="addDelivery">编辑物流</el-button>
+            <el-button size="mini" v-hasPermi="['live:liveAfterSales:edit']" v-show="afterSales.salesStatus==0&&afterSales.status===1"  @click="addDelivery">编辑物流</el-button>
             <el-button size="mini"  @click="showOrder">查看订单</el-button>
          </div>
         </div>

+ 37 - 35
src/views/live/live/index.vue

@@ -110,9 +110,9 @@
       <el-checkbox :indeterminate="isIndeterminate" v-model="allChecked" @change="toggleSelectAll">
         {{ multipleSelection.length > 0 ? `已选 ${multipleSelection.length} 条` : '选中本页' }}
       </el-checkbox>
-      <el-button  plain size="mini" @click="handleShelf">上架</el-button>
-      <el-button  plain size="mini" @click="handleUnshelf">下架</el-button>
-      <el-button  plain size="mini" @click="handleDeleteSelected">删除</el-button>
+<!--      <el-button  plain size="mini" @click="handleShelf" v-hasPermi="['live:live:operation']">上架</el-button>-->
+<!--      <el-button  plain size="mini" @click="handleUnshelf" v-hasPermi="['live:live:operation']">下架</el-button>-->
+<!--      <el-button  plain size="mini" @click="handleDeleteSelected" v-hasPermi="['live:live:operation']">删除</el-button>-->
 <!--      <el-dropdown>-->
 <!--        <el-button plain size="mini">-->
 <!--          更多操作<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
@@ -174,14 +174,14 @@
       </el-table-column>
       <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button
-            v-if="scope.row.companyName != '总台'"
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['live:live:edit']"
-          >修改</el-button>
+<!--          <el-button-->
+<!--            v-if="scope.row.companyName != '总台' || scope.row.status != 2"-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            icon="el-icon-edit"-->
+<!--            @click="handleUpdate(scope.row)"-->
+<!--            v-hasPermi="['live:live:edit', 'live:live:operation']"-->
+<!--          >修改</el-button>-->
           <el-button
             v-if="scope.row.companyName == '总台'"
             size="mini"
@@ -191,13 +191,13 @@
             @click="handleView(scope.row)"
             v-hasPermi="['live:live:edit']"
           >查看</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-setting"
-            @click="handleConfig(scope.row)"
-            v-hasPermi="['live:config:list']"
-          >配置</el-button>
+<!--          <el-button-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            icon="el-icon-setting"-->
+<!--            @click="handleConfig(scope.row)"-->
+<!--            v-hasPermi="['live:config:list']"-->
+<!--          >配置</el-button>-->
           <el-button
             size="mini"
             type="text"
@@ -219,25 +219,27 @@
               </el-dropdown-item>
 
               <!-- 去直播按钮 -->
-              <el-dropdown-item
-                v-if="scope.row.status != 2"
-                @click.native="handleStart(scope.row)"
-              >
-                <i class="el-icon-monitor"></i> 去直播
-              </el-dropdown-item>
+<!--              <el-dropdown-item-->
+<!--                v-if="scope.row.status != 2"-->
+<!--                @click.native="handleStart(scope.row)"-->
+<!--                v-hasPermi="['live:live:operation']"-->
+<!--              >-->
+<!--                <i class="el-icon-monitor"></i> 去直播-->
+<!--              </el-dropdown-item>-->
 
               <!-- 进入直播间按钮 -->
-              <el-dropdown-item
-                v-if="scope.row.status == 2"
-                @click.native="handleEnded(scope.row)"
-              >
-                <i class="el-icon-service"></i> 结束
-              </el-dropdown-item>
-              <el-dropdown-item
-                @click.native="handleCopy(scope.row)"
-              >
-                <i class="el-icon-service"></i> 复制直播间
-              </el-dropdown-item>
+<!--              <el-dropdown-item-->
+<!--                v-if="scope.row.status == 2"-->
+<!--                @click.native="handleEnded(scope.row)"-->
+<!--                v-hasPermi="['live:live:operation']"-->
+<!--              >-->
+<!--                <i class="el-icon-service"></i> 结束-->
+<!--              </el-dropdown-item>-->
+<!--              <el-dropdown-item-->
+<!--                @click.native="handleCopy(scope.row)"-->
+<!--              >-->
+<!--                <i class="el-icon-service"></i> 复制直播间-->
+<!--              </el-dropdown-item>-->
               <el-dropdown-item
                 @click.native="handleLink(scope.row)"
               >

+ 1 - 1
src/views/live/liveAfteraSales/index.vue

@@ -125,7 +125,7 @@
           size="mini"
           :disabled="exportLoading"
           @click="handleExport"
-          v-hasPermi="['live:liveAfteraSales:export']"
+          v-hasPermi="['live:liveAfterSales:export']"
         >导出</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>

+ 140 - 23
src/views/live/liveConsole/LiveConsole.vue

@@ -111,8 +111,9 @@
             全局用户自见
           </label>
         </div>
-        <el-scrollbar class="custom-scrollbar" style="height: 500px; width: 100%;" ref="manageRightRef">
-          <el-row v-for="m in msgList" :key="m.msgId">
+        <div class="message-container" @click="handleMessageBoxClick">
+          <el-scrollbar class="custom-scrollbar" style="height: 500px; width: 100%;" ref="manageRightRef">
+            <el-row v-for="m in msgList" :key="m.msgId">
             <el-row v-if="m.userId !== userId" style="margin-top: 5px" type="flex" align="top" >
               <el-col :span="3" style="margin-left: 10px"><el-avatar :src="m.avatar"/></el-col>
               <el-col :span="15">
@@ -124,11 +125,11 @@
                     </div>
                   </el-col>
                   <el-col>
-                    <a style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click="changeUserState(m)">{{ m.msgStatus === 1 ? '解禁' : '禁言' }}</a>
-                    <a style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click="blockUser(m)">拉黑</a>
-                    <a v-if="m.singleVisible === 1" style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click="singleVisible(m)">解除用户自见</a>
-                    <a v-else style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click="singleVisible(m)">用户自见</a>
-                    <a style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click="deleteMsg(m)">删除</a>
+                    <a style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click.stop="changeUserState(m)">{{ m.msgStatus === 1 ? '解禁' : '禁言' }}</a>
+                    <a style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click.stop="blockUser(m)">拉黑</a>
+                    <a v-if="m.singleVisible === 1" style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click.stop="singleVisible(m)">解除用户自见</a>
+                    <a v-else style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click.stop="singleVisible(m)">用户自见</a>
+                    <a style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click.stop="deleteMsg(m)">删除</a>
                   </el-col>
                 </el-row>
               </el-col>
@@ -145,7 +146,18 @@
           </el-row>
           <!-- 底部留白 -->
           <div style="height: 20px;"></div>
-        </el-scrollbar>
+          </el-scrollbar>
+          <!-- 加载最新消息按钮 -->
+          <el-button
+            v-if="showLoadLatestBtn"
+            class="load-latest-btn"
+            type="primary"
+            size="small"
+            @click.stop="loadLatestMessages"
+            icon="el-icon-refresh">
+            加载最新消息
+          </el-button>
+        </div>
         <!--        <div class="message-list">-->
         <!--          <div class="message-item" v-for="msg in msgList" :key="msg.id">-->
         <!--            <div class="message-avatar">-->
@@ -390,6 +402,15 @@ export default {
       topMsgForm: {
         msg: '',
         duration: 5
+      },
+      // 消息滚动控制
+      isAutoScrollEnabled: true, // 是否启用自动滚动
+      autoScrollTimer: null, // 自动滚动定时器
+      showLoadLatestBtn: false, // 是否显示加载最新消息按钮
+      msgParams: {
+        pageNum: 1,
+        pageSize: 30,
+        liveId: null
       }
     };
   },
@@ -431,6 +452,65 @@ export default {
     this.initScrollListeners();
   },
   methods: {
+    // 点击消息框
+    handleMessageBoxClick() {
+      // 点击消息框时,停止自动滚动
+      this.isAutoScrollEnabled = false;
+      // 停止自动滚动定时器
+      if (this.autoScrollTimer) {
+        clearTimeout(this.autoScrollTimer);
+        this.autoScrollTimer = null;
+      }
+      // 检查是否在底部,如果不在底部则显示加载最新消息按钮
+      this.$nextTick(() => {
+        if (this.$refs.manageRightRef && this.$refs.manageRightRef.wrap) {
+          const wrap = this.$refs.manageRightRef.wrap;
+          const scrollHeight = wrap.scrollHeight;
+          const clientHeight = wrap.clientHeight;
+          const currentScrollTop = wrap.scrollTop;
+          const maxScrollTop = scrollHeight - clientHeight;
+
+          if (currentScrollTop < maxScrollTop - 50) {
+            this.showLoadLatestBtn = true;
+          }
+        }
+      });
+    },
+    // 滚动到底部
+    scrollToBottom(forceScroll = false) {
+      // 如果自动滚动被禁用且不是强制滚动,则不执行
+      console.log("scrollToBottom")
+      console.log(!this.isAutoScrollEnabled && !forceScroll)
+      console.log(this.$refs.manageRightRef && this.$refs.manageRightRef.wrap)
+      console.log(forceScroll || this.isAutoScrollEnabled)
+      if (!this.isAutoScrollEnabled && !forceScroll) {
+        return;
+      }
+
+      if (this.$refs.manageRightRef && this.$refs.manageRightRef.wrap) {
+        this.$nextTick(() => {
+          const wrap = this.$refs.manageRightRef.wrap;
+          if (!wrap) return;
+
+
+          // 强制滚动或启用自动滚动时,直接滚动到底部并隐藏按钮
+          if (forceScroll || this.isAutoScrollEnabled) {
+            this.showLoadLatestBtn = false;
+            this.$refs.manageRightRef.wrap.scrollTop = this.$refs.manageRightRef.wrap.scrollHeight - this.$refs.manageRightRef.wrap.clientHeight
+          }
+        });
+      }
+    },
+    // 加载最新消息
+    loadLatestMessages() {
+      this.showLoadLatestBtn = false;
+      // 恢复自动滚动
+      this.isAutoScrollEnabled = true;
+      // 重新请求最新消息
+      this.resetMsgParams();
+      // loadMsgList 中会自动滚动到底部,因为 isAutoScrollEnabled 已经是 true
+      this.loadMsgList();
+    },
     singleVisible(m){
       // 过滤当前所有消息 找到userId的相同的消息 更改他们的自可见状态
       m.singleVisible= m.singleVisible === 1 ? 0 : 1
@@ -637,12 +717,19 @@ export default {
             this.msgList.shift()
           }
           this.msgList.push(message)
-          // 移动到底部
-          this.$nextTick(() => {
-            setTimeout(() => {
-              this.$refs.manageRightRef.wrap.scrollTop = this.$refs.manageRightRef.wrap.scrollHeight - this.$refs.manageRightRef.wrap.clientHeight
-            }, 200)
-          })
+          // 如果启用自动滚动,自动滚动到底部
+          console.log("handleWsMessage")
+          console.log(this.isAutoScrollEnabled)
+          if (this.isAutoScrollEnabled) {
+            this.$nextTick(() => {
+              this.autoScrollTimer = setTimeout(() => {
+                this.scrollToBottom();
+              }, 200);
+            });
+          } else {
+            // 自动滚动被禁用时,显示加载最新消息按钮
+            this.showLoadLatestBtn = true;
+          }
         } else if (cmd === 'entry' || cmd === 'out') {
           const user = data;
           const online = cmd === 'entry' ? 0 : 1; // 0=在线,1=离线
@@ -1076,22 +1163,13 @@ export default {
           let totalPage = (total % this.msgParams.pageSize == 0) ? Math.floor(total / this.msgParams.pageSize) : Math.floor(total / this.msgParams.pageSize + 1);
           rows.forEach(row => {
             if (!this.msgList.some(m => m.msgId === row.msgId)) {
-
               let user = this.alDisplayList.find(u => u.userId === row.userId)
               if (user) {
                 row.msgStatus = user.msgStatus
               } else {
                 row.msgStatus = 0
               }
-
               this.msgList.push(row)
-
-              // 移动到底部
-              this.$nextTick(() => {
-                setTimeout(() => {
-                  this.$refs.manageRightRef.wrap.scrollTop = this.$refs.manageRightRef.wrap.scrollHeight - this.$refs.manageRightRef.wrap.clientHeight
-                }, 200)
-              })
             }
           })
 
@@ -1100,6 +1178,31 @@ export default {
           this.alDisplayList.forEach(u => {
             this.msgList.filter(m => m.userId === u.userId).forEach(m => m.msgStatus = u.msgStatus)
           })
+
+          // 所有消息加载完成后,根据自动滚动状态决定是否滚动
+          this.$nextTick(() => {
+            setTimeout(() => {
+              if (this.isAutoScrollEnabled) {
+                // 如果启用自动滚动,强制滚动到底部并隐藏按钮
+                this.scrollToBottom(true);
+              } else {
+                // 如果禁用自动滚动,检查是否在底部,决定是否显示按钮
+                if (this.$refs.manageRightRef && this.$refs.manageRightRef.wrap) {
+                  const wrap = this.$refs.manageRightRef.wrap;
+                  const scrollHeight = wrap.scrollHeight;
+                  const clientHeight = wrap.clientHeight;
+                  const currentScrollTop = wrap.scrollTop;
+                  const maxScrollTop = scrollHeight - clientHeight;
+
+                  if (currentScrollTop < maxScrollTop - 50) {
+                    // this.showLoadLatestBtn = true;
+                  } else {
+                    this.showLoadLatestBtn = false;
+                  }
+                }
+              }
+            }, 300);
+          });
         }
       })
 
@@ -1200,6 +1303,7 @@ export default {
         pageSize: 30,
         liveId: this.liveId
       };
+      // 重置时不改变按钮状态,由后续的滚动逻辑决定
       this.taskParams = {
         currentPage: 1,
         pageSize: 20,
@@ -1320,6 +1424,9 @@ export default {
     if (this.autoMsgTimer != null) {
       clearInterval(this.autoMsgTimer);
     }
+    if (this.autoScrollTimer) {
+      clearTimeout(this.autoScrollTimer);
+    }
   },
   // 使用 deactivated 和 activated 钩子替代 beforeDestroy 和 destroyed
   deactivated() {
@@ -1623,4 +1730,14 @@ export default {
   text-align: center;
   border-radius: 4px;
 }
+.message-container {
+  position: relative;
+}
+.load-latest-btn {
+  position: absolute;
+  bottom: 20px;
+  right: 20px;
+  z-index: 10;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
+}
 </style>

+ 364 - 8
src/views/live/liveData/index.vue

@@ -175,8 +175,8 @@
       <el-checkbox :indeterminate="isIndeterminate" v-model="allChecked" @change="toggleSelectAll">
         {{ multipleSelection.length > 0 ? `已选 ${multipleSelection.length} 条` : '选中本页' }}
       </el-checkbox>
-<!--      <el-button plain size="mini" @click="handleAutoTag">自动打标签</el-button>-->
-<!--      <el-button plain size="mini" @click="handleAutoRemark">自动备注</el-button>-->
+      <!--      <el-button plain size="mini" @click="handleAutoTag">自动打标签</el-button>-->
+      <!--      <el-button plain size="mini" @click="handleAutoRemark">自动备注</el-button>-->
       <el-button plain type="primary" size="mini" icon="el-icon-download" :loading="exportLoading" @click="handleExport">导出</el-button>
     </div>
 
@@ -309,13 +309,267 @@
         <el-button type="primary" @click="confirmAutoRemark">确 定</el-button>
       </div>
     </el-dialog>
+
+    <!-- 详情侧边栏 -->
+    <el-drawer
+      title="直播间详情"
+      :visible.sync="detailDrawerVisible"
+      direction="rtl"
+      size="60%"
+      :before-close="closeDetailDrawer"
+    >
+      <div v-if="!showUserDetail" class="detail-content">
+        <el-card shadow="never" style="margin-bottom: 20px;">
+          <div slot="header">
+            <span>总体数据</span>
+            <el-button style="float: right; padding: 3px 0" type="text" @click="handleViewUserDetail">查看用户详情</el-button>
+          </div>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">视频时长:</span>
+                <span class="detail-value">{{ formatDuration(detailData.videoDuration || 0) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">累计观看人数:</span>
+                <span class="detail-value">{{ detailData.totalViewers || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">累计完课人数:</span>
+                <span class="detail-value">{{ detailData.totalCompletedCourses || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">到课完课率:</span>
+                <span class="detail-value">{{ formatPercent(detailData.totalCompletionRate) }}</span>
+              </div>
+            </el-col>
+          </el-row>
+        </el-card>
+
+        <el-card shadow="never" style="margin-bottom: 20px;">
+          <div slot="header">直播数据</div>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">直播观看人数:</span>
+                <span class="detail-value">{{ detailData.liveViewers || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">>20分钟人数(直播):</span>
+                <span class="detail-value">{{ detailData.liveOver20Minutes || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">>30分钟人数(直播):</span>
+                <span class="detail-value">{{ detailData.liveOver30Minutes || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">到课完课率直播(>20分钟):</span>
+                <span class="detail-value">{{ formatPercent(detailData.liveCompletionRate20) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">到课完课率直播(>30分钟):</span>
+                <span class="detail-value">{{ formatPercent(detailData.liveCompletionRate30) }}</span>
+              </div>
+            </el-col>
+          </el-row>
+        </el-card>
+
+        <el-card shadow="never" style="margin-bottom: 20px;">
+          <div slot="header">回放数据</div>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">回放观看人数:</span>
+                <span class="detail-value">{{ detailData.playbackViewers || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">>20分钟人数(回放):</span>
+                <span class="detail-value">{{ detailData.playbackOver20Minutes || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">>30分钟人数(回放):</span>
+                <span class="detail-value">{{ detailData.playbackOver30Minutes || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">到课完课率回放(>20分钟):</span>
+                <span class="detail-value">{{ formatPercent(detailData.playbackCompletionRate20) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">到课完课率回放(>30分钟):</span>
+                <span class="detail-value">{{ formatPercent(detailData.playbackCompletionRate30) }}</span>
+              </div>
+            </el-col>
+          </el-row>
+        </el-card>
+
+        <el-card shadow="never" style="margin-bottom: 20px;">
+          <div slot="header">时长统计</div>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">直播峰值:</span>
+                <span class="detail-value">{{ detailData.livePeak || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">直播平均时长:</span>
+                <span class="detail-value">{{ formatDuration(detailData.liveAvgDuration || 0) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">回放平均时长:</span>
+                <span class="detail-value">{{ formatDuration(detailData.playbackAvgDuration || 0) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">回放完播率:</span>
+                <span class="detail-value">{{ formatPercent(detailData.playbackFinishRate) }}</span>
+              </div>
+            </el-col>
+          </el-row>
+        </el-card>
+
+        <el-card shadow="never" style="margin-bottom: 20px;">
+          <div slot="header">订单数据</div>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">GMV:</span>
+                <span class="detail-value">{{ formatMoney(detailData.gmv) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">付费人数:</span>
+                <span class="detail-value">{{ detailData.paidUsers || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">付费单数:</span>
+                <span class="detail-value">{{ detailData.paidOrders || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">峰值转化率:</span>
+                <span class="detail-value">{{ formatPercent(detailData.peakConversionRate) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">总到课转化率:</span>
+                <span class="detail-value">{{ formatPercent(detailData.totalViewerConversionRate) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">30min完课转化率:</span>
+                <span class="detail-value">{{ formatPercent(detailData.completion30MinConversionRate) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">峰值R值:</span>
+                <span class="detail-value">{{ formatMoney(detailData.peakRValue) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">完课R值:</span>
+                <span class="detail-value">{{ formatMoney(detailData.completionRValue) }}</span>
+              </div>
+            </el-col>
+          </el-row>
+        </el-card>
+
+        <el-card shadow="never" v-if="detailData.productSalesList && detailData.productSalesList.length > 0">
+          <div slot="header">单品销量统计</div>
+          <el-table :data="detailData.productSalesList" border>
+            <el-table-column prop="productName" label="商品名称" min-width="200"></el-table-column>
+            <el-table-column prop="salesCount" label="销量" width="100" align="center"></el-table-column>
+            <el-table-column prop="salesAmount" label="销售额" width="150" align="center">
+              <template slot-scope="scope">
+                {{ formatMoney(scope.row.salesAmount) }}
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-card>
+      </div>
+
+      <!-- 用户详情列表 -->
+      <div v-else class="user-detail-content">
+        <div style="margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center;">
+          <el-button type="text" icon="el-icon-arrow-left" @click="showUserDetail = false">返回</el-button>
+          <el-button type="primary" size="small" icon="el-icon-download" :loading="userDetailExportLoading" @click="handleExportUserDetail">导出用户详情</el-button>
+        </div>
+        <el-table
+          :data="userDetailList"
+          v-loading="userDetailLoading"
+          border
+          style="width: 100%"
+        >
+          <el-table-column type="index" label="序号" width="60" align="center"></el-table-column>
+          <el-table-column prop="userName" label="用户名称" min-width="120"></el-table-column>
+          <el-table-column prop="liveWatchDuration" label="直播观看时长" width="140" align="center">
+            <template slot-scope="scope">
+              {{ formatDuration(scope.row.liveWatchDuration || 0) }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="playbackWatchDuration" label="回放观看时长" width="140" align="center">
+            <template slot-scope="scope">
+              {{ formatDuration(scope.row.playbackWatchDuration || 0) }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="orderCount" label="订单数" width="100" align="center"></el-table-column>
+          <el-table-column prop="orderAmount" label="订单金额" width="120" align="center">
+            <template slot-scope="scope">
+              {{ formatMoney(scope.row.orderAmount) }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="companyName" label="分公司" min-width="150"></el-table-column>
+          <el-table-column prop="salesName" label="销售" min-width="120"></el-table-column>
+        </el-table>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
 <script>
-import { listLiveData, exportLiveData, autoTagAndRemark, dashboardData } from "@/api/live/liveData";
-import { batchUpdateExternalContactNotes } from "@/api/qw/externalContact";
-import { addTag } from "@/api/qw/externalContact";
+import {
+  listLiveData,
+  exportLiveData,
+  autoTagAndRemark,
+  dashboardData,
+  getLiveDataDetailBySql,
+  getLiveUserDetailListBySql,
+  exportLiveUserDetail
+} from "@/api/live/liveData";
 
 export default {
   name: "LiveData",
@@ -377,7 +631,15 @@ export default {
         rules: [],
         remarkFormat: 'time',
         position: 1
-      }
+      },
+      // 详情侧边栏
+      detailDrawerVisible: false,
+      currentLiveId: null,
+      detailData: {},
+      userDetailList: [],
+      userDetailLoading: false,
+      showUserDetail: false,
+      userDetailExportLoading: false
     };
   },
   created() {
@@ -582,8 +844,9 @@ export default {
     },
     /** 查看详情 */
     handleViewDetail(row) {
-      // 可以跳转到详情页面或打开详情弹窗
-      this.$message.info('查看详情功能待实现');
+      this.currentLiveId = row.liveId;
+      this.detailDrawerVisible = true;
+      this.loadDetailData();
     },
     /** 格式化时长 */
     formatDuration(seconds) {
@@ -609,6 +872,75 @@ export default {
       // this.getStatistics();
       this.getList();
       this.$message.success('设置成功');
+    },
+    /** 加载详情数据 */
+    loadDetailData() {
+      if (!this.currentLiveId) return;
+      // 使用SQL方式获取详情数据
+      getLiveDataDetailBySql(this.currentLiveId).then(response => {
+        if (response.code === 200) {
+          this.detailData = response.data || {};
+        }
+      });
+    },
+    /** 查看用户详情 */
+    handleViewUserDetail() {
+      if (!this.currentLiveId) return;
+      this.showUserDetail = true;
+      this.userDetailLoading = true;
+      getLiveUserDetailListBySql(this.currentLiveId).then(response => {
+        if (response.code === 200) {
+          this.userDetailList = response.data || [];
+        }
+        this.userDetailLoading = false;
+      }).catch(() => {
+        this.userDetailLoading = false;
+      });
+    },
+    /** 关闭详情侧边栏 */
+    closeDetailDrawer() {
+      this.detailDrawerVisible = false;
+      this.showUserDetail = false;
+      this.detailData = {};
+      this.userDetailList = [];
+      this.currentLiveId = null;
+    },
+    /** 格式化百分比 */
+    formatPercent(value) {
+      if (value == null || value === undefined) return '0%';
+      return (typeof value === 'number' ? value : parseFloat(value)).toFixed(2) + '%';
+    },
+    /** 格式化金额 */
+    formatMoney(value) {
+      if (value == null || value === undefined) return '¥0.00';
+      return '¥' + (typeof value === 'number' ? value : parseFloat(value)).toFixed(2);
+    },
+    /** 导出用户详情数据 */
+    handleExportUserDetail() {
+      if (!this.currentLiveId) {
+        this.$message.warning('无法获取直播间ID');
+        return;
+      }
+      if (!this.userDetailList || this.userDetailList.length === 0) {
+        this.$message.warning('暂无用户详情数据可导出');
+        return;
+      }
+      this.$confirm('是否确认导出当前直播间的用户详情数据?', "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.userDetailExportLoading = true;
+        return exportLiveUserDetail(this.currentLiveId);
+      }).then(response => {
+        if (response.code === 200) {
+          this.download(response.msg);
+          this.$message.success('导出成功');
+        }
+        this.userDetailExportLoading = false;
+      }).catch(() => {
+        this.userDetailExportLoading = false;
+      });
     }
   }
 };
@@ -656,4 +988,28 @@ export default {
   padding-left: 10px;
   padding-top: 30px;
 }
+
+.detail-content {
+  padding: 20px;
+}
+
+.detail-item {
+  margin-bottom: 15px;
+  line-height: 32px;
+}
+
+.detail-label {
+  color: #606266;
+  font-size: 14px;
+}
+
+.detail-value {
+  color: #303133;
+  font-size: 14px;
+  font-weight: bold;
+}
+
+.user-detail-content {
+  padding: 20px;
+}
 </style>

+ 2 - 2
src/views/live/liveOrder/liveOrderDetails.vue

@@ -6,7 +6,7 @@
     <div class="contentx" v-if="item!=null">
       <div class="desct"></div>
       <div class="order-status" v-if="item!=null" >
-        <el-steps  :active="item.status==3?item.status+1:item.status" align-center>
+        <el-steps  :active="item.status+1" align-center>
           <el-step title="待支付"></el-step>
           <el-step title="待发货"></el-step>
           <el-step title="待收货"></el-step>
@@ -378,7 +378,7 @@ export default {
     this.getDicts("sys_store_pay_type").then(response => {
       this.PayOptions = response.data;
     });
-    this.getDicts("sys_order_status").then(response => {
+    this.getDicts("sys_live_order_status").then(response => {
       this.orderOptions = response.data;
     });
     this.getDicts("sys_order_pay").then(response => {

+ 43 - 6
src/views/login.vue

@@ -66,6 +66,16 @@
         </el-form-item>
       </el-form>
     </div>
+
+    <!-- 微信扫码弹框 -->
+    <WechatLoginDialog
+      ref="wechatDialog"
+      :ticket="loginForm.username"
+      :visible.sync="wechatDialogVisible"
+      @loginSuccess="handleWechatLoginSuccess"
+      :redirect="redirect"
+    />
+
     <!--  底部  -->
     <div class="el-login-footer">
       <span>{{companyName}}</span>
@@ -79,9 +89,11 @@ import { getCodeImg } from "@/api/login";
 import Cookies from "js-cookie";
 import { encrypt, decrypt } from '@/utils/jsencrypt'
 import { getFirstLogin } from "@/api/login";
-
+import WechatLoginDialog from "@/views/WechatLoginDialog";
+import { setToken } from "@/utils/auth";
 export default {
   name: "Login",
+  components: { WechatLoginDialog  },
   data() {
     return {
       codeUrl: "",
@@ -90,6 +102,7 @@ export default {
       icpRecord: process.env.VUE_APP_ICP_RECORD,
       icpUrl: process.env.VUE_APP_ICP_URL,
       cookiePassword: "",
+      wechatDialogVisible: false,
       loginForm: {
         username: "",
         password: "",
@@ -165,7 +178,19 @@ export default {
         rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
       };
     },
+
+    // 微信扫码成功回调
+    handleWechatLoginSuccess(token) {
+      this.loading = false
+      console.log("父组件收到 loginSuccess:", token);
+      this.$store.commit("SET_TOKEN", token);
+      setToken(token);
+      // 登录成功后检查是否是首次登录
+      this.checkFirstLogin();
+    },
+
     handleLogin() {
+      console.log("handleLogin")
       this.$refs.loginForm.validate(valid => {
         if (valid) {
           this.loading = true;
@@ -180,12 +205,24 @@ export default {
           }
           this.$store
             .dispatch("Login", this.loginForm)
-            .then(() => {
-              // 登录成功后检查是否是首次登录
-              this.checkFirstLogin();
-              //this.$router.push({ path: this.redirect || "/" });
+            .then(res => {
+              if (res.needSms) {
+                console.log("打开弹窗")
+                this.wechatDialogVisible = true;
+                // 等 visible 更新后,直接调用弹窗 open()
+                this.$nextTick(() => {
+                  if (this.$refs.wechatDialog) {
+                    this.$refs.wechatDialog.open(this.loginForm.username);
+                  }
+                });
+              } else {
+                // 登录成功后检查是否是首次登录
+                this.checkFirstLogin();
+              }
             })
-            .catch(() => {
+            .catch(res => {
+              console.log("登录失败")
+              console.log(res)
               this.loading = false;
               this.getCode();
             });

+ 55 - 13
src/views/qw/externalContact/index.vue

@@ -310,6 +310,15 @@
           v-hasPermi="['qw:externalContact:addTag']"
         >批量添加标签</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          size="mini"
+          @click="addUserTagFilter"
+          v-hasPermi="['qw:externalContact:addTag']"
+        >批量添加标签(筛选条件)</el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="primary"
@@ -583,7 +592,7 @@
 
       <div>搜索标签:
         <el-input v-model="queryTagParams.name" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchTags(queryTagParams.name)">搜索</el-button>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="getPageListTagGroup()">搜索</el-button>
         <el-button type="primary" icon="el-icon-plus" size="mini" @click="cancelSearchTags">重置</el-button>
       </div>
       <div v-for="item in tagGroupList" :key="item.id"  >
@@ -620,8 +629,8 @@
 
     <el-dialog title="批量添加标签" :visible.sync="tagOpen" width="800px" append-to-body>
       <div>搜索标签:
-        <el-input v-model="tagChange.tagName" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchTags(tagChange.tagName)">搜索</el-button>
+        <el-input v-model="queryTagParams.name" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="getPageListTagGroup()">搜索</el-button>
         <el-button type="primary" icon="el-icon-plus" size="mini" @click="cancelSearchTags">重置</el-button>
       </div>
       <el-form ref="form" :model="addTagForm"  label-width="80px">
@@ -706,8 +715,8 @@
 
     <el-dialog title="批量移除标签" :visible.sync="tagDelOpen" width="800px" append-to-body>
       <div>搜索标签:
-        <el-input v-model="tagChange.tagName" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchTags(tagChange.tagName)">搜索</el-button>
+        <el-input v-model="queryTagParams.name" placeholder="请输入标签名称" clearable size="small" style="width: 200px;margin-right: 10px" />
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="getPageListTagGroup()">搜索</el-button>
         <el-button type="primary" icon="el-icon-plus" size="mini" @click="cancelSearchTags">重置</el-button>
       </div>
       <el-form ref="form" :model="addTagForm"  label-width="80px">
@@ -933,8 +942,8 @@ import {
   unBindUserId, updateExternalContactCall,updateExternalContactStatus,getWatchLogList
 } from '@/api/qw/externalContact'
 import {getMyQwUserList, getMyQwCompanyList, updateUser,getQwUserListLikeName} from "@/api/qw/user";
-import {listTag, getTag, searchTags,} from "@/api/qw/tag";
-import { allListTagGroup} from "@/api/qw/tagGroup";
+import {listTag, getTag, searchTags} from "@/api/qw/tag";
+import { allListTagGroup,allListTagGroupPage} from "@/api/qw/tagGroup";
 import mycustomer from '@/views/qw/externalContact/mycustomer'
 import customerDetails from '@/views/qw/externalContact/customerDetails'
 import SopDialog from '@/views/course/sop/SopDialog.vue'
@@ -1063,7 +1072,9 @@ export default {
 
       addTagForm:{
         userIds:[],
-        tagIds:[]
+        tagIds:[],
+        filter: false,
+        addType: 0,
       },
 
       myQwCompanyList:[],
@@ -1126,7 +1137,7 @@ export default {
       },
 
       tagTotal:0,
-
+      tagFilter:false,
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -1484,13 +1495,37 @@ export default {
 
 
       this.tagOpen = true;
+      this.tagFilter = false;
+
+    },
+
+    addUserTagFilter(){
+
+      if(this.externalContactList.length == 0){
+        return  this.$message('无可添加标签客户');
+      }
+
+      this.getPageListTagGroup();
+
+      setTimeout(() => {
 
+        for (let i = 0; i < this.tagGroupList.length; i++) {
+          for (let x = 0; x < this.tagGroupList[i].tag.length; x++) {
+            this.tagGroupList[i].tag[x].isSelected=false;
+          }
+        }
+      }, 200);
+
+
+      this.tagOpen = true;
+      this.tagFilter = true;
     },
 
 
     getPageListTagGroup(){
+      
       this.queryTagParams.corpId=this.queryParams.corpId
-      allListTagGroup(this.queryTagParams).then(response => {
+      allListTagGroupPage(this.queryTagParams).then(response => {
         this.tagGroupList = response.rows;
         this.tagTotal = response.total;
       });
@@ -1696,7 +1731,12 @@ export default {
 
       this.addTagForm.corpId=this.queryParams.corpId
       this.addTagForm.userIds=this.ids;
-
+      this.addTagForm.filter = this.tagFilter;
+      let obj = JSON.parse(JSON.stringify(this.queryParams))
+      if(obj.tagIds !== null && obj.tagIds !== undefined && obj.tagIds !== ''){
+        obj.tagIds = obj.tagIds.split(",");
+      }
+      this.addTagForm.param = obj;
 
       let loadingRock = this.$loading({
         lock: true,
@@ -1711,8 +1751,10 @@ export default {
        this.tagOpen = false;
         loadingRock.close();
        this.addTagForm={
-         userIds:[],
-         tagIds:[]
+        filter: false,
+        addType: 0,
+        userIds:[],
+        tagIds:[]
        };
        this.getList()
      }).finally(res=>{

+ 3 - 2
src/views/qw/externalContactUnassigned/index.vue

@@ -195,7 +195,7 @@
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
-      :page-sizes="[100, 200, 300, 500]"
+      :page-sizes="[10,100, 200, 300, 500]"
       @pagination="getList"
     />
 
@@ -293,7 +293,7 @@ export default {
       // 查询参数
       queryParams: {
         pageNum: 1,
-        pageSize: 500,
+        pageSize: 10,
         userId: null,
         qwUserName: null,
         externalUserId: null,
@@ -441,6 +441,7 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
+      
       this.ids = selection.map(item => item.id)
       this.single = selection.length!==1
       this.multiple = !selection.length

+ 6 - 6
src/views/qw/sopTemp/updateSopTemp.vue

@@ -89,7 +89,7 @@
                                       v-model="content.time"
                                       value-format="HH:mm"
                                       format="HH:mm"
-                                      :picker-options="{ selectableRange: startTimeRange }"
+                                      :picker-options="{ selectableRange: ['01:00:00 - 01:59:00','05:00:00 - 23:59:59'] }"
                                       placeholder="时间"
                                       style="width: 100px;height: 20px;">
                                     </el-time-picker>
@@ -101,7 +101,7 @@
                                       :disabled="formType == 3 || !roles.includes('update_sop_temp_time')"
                                       class="custom-input"
                                       v-model="content.time"
-                                      :picker-options="{ selectableRange: startTimeRange }"
+                                      :picker-options="{ selectableRange: ['00:01:00 - 00:59:00','05:00:00 - 23:59:59']}"
                                       value-format="HH:mm"
                                       format="HH:mm"
                                       placeholder="时间"
@@ -766,7 +766,7 @@ export default {
       dayList: [],
       ruleList: [],
       ids: [],
-      startTimeRange: [],
+      // startTimeRange: [],
       courseTypeList: ['1','2', '4','5','6', '7','8','9','10'],
       sysFsSopWatchStatus: [],
       //消息内容类型 企微版
@@ -851,9 +851,9 @@ export default {
     this.getDicts("sys_fs_sop_watch_status").then(response => {
       this.sysFsSopWatchStatus = response.data;
     });
-    getSelectableRange().then(e => {
-      this.startTimeRange = e.data;
-    })
+    // getSelectableRange().then(e => {
+    //   this.startTimeRange = e.data;
+    // })
 
     this.getDicts("sys_qwSop_contentType").then(response => {
       this.sysQwSopContentType = response.data;

+ 318 - 222
src/views/qw/sopUserLogs/sopUserLogsSchedule.vue

@@ -2,9 +2,10 @@
   <div class="app-container">
     <div style="margin-bottom: 10px">
       <el-card>
-        <span class="custom-style" style="display: block; margin-bottom: 10px">自动化规则名称:{{sopName}}</span>
-        <span class="custom-style" style="display: block; margin-bottom: 10px">自动化规则编号:{{queryParams.sopId}}</span>
-        <span class="custom-style" style="display: block;">模板编号:{{tempId}}</span>
+        <span class="custom-style" style="display: block; margin-bottom: 10px">自动化规则名称:{{ sopName }}</span>
+        <span class="custom-style" style="display: block; margin-bottom: 10px"
+        >自动化规则编号:{{ queryParams.sopId }}</span>
+        <span class="custom-style" style="display: block;">模板编号:{{ tempId }}</span>
       </el-card>
     </div>
 
@@ -32,19 +33,20 @@
                         v-model="queryParams.startTime"
                         type="date"
                         value-format="yyyy-MM-dd"
-                        placeholder="选择营期时间">
+                        placeholder="选择营期时间"
+        >
         </el-date-picker>
       </el-form-item>
-<!--      <el-form-item label="状态" prop="status">-->
-<!--        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">-->
-<!--          <el-option-->
-<!--            v-for="dict in sopUserLogsDelStatus"-->
-<!--            :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-->
+      <!--            v-for="dict in sopUserLogsDelStatus"-->
+      <!--            :key="dict.dictValue"-->
+      <!--            :label="dict.dictLabel"-->
+      <!--            :value="dict.dictValue"-->
+      <!--          />-->
+      <!--        </el-select>-->
+      <!--      </el-form-item>-->
       <el-form-item label="客户名称" prop="externalUserName">
         <el-input
           v-model="queryParams.externalUserName"
@@ -72,7 +74,9 @@
     <el-row :gutter="10" class="mb8" v-if="filterMode == 1">
 
       <el-col :span="1.5">
-        <el-tooltip class="item" effect="dark" content="此功能用于给 选中的 营期 内【所有的】客户发送 消息【或者发送草稿-/-清楚草稿】" placement="top">
+        <el-tooltip class="item" effect="dark"
+                    content="此功能用于给 选中的 营期 内【所有的】客户发送 消息【或者发送草稿-/-清楚草稿】" placement="top"
+        >
           <el-button
             type="warning"
             icon="el-icon-s-promotion"
@@ -80,24 +84,27 @@
             :disabled="multiple"
             @click="handleCampSendMsg"
             v-hasPermi="['qw:sopUserLogsInfo:msgSchedule']"
-          >营期一键群发(或草稿)</el-button>
+          >营期一键群发(或草稿)
+          </el-button>
         </el-tooltip>
       </el-col>
 
-<!--      <el-col :span="1.5">-->
-<!--        <el-tooltip class="item" effect="dark" content="修改选择的群聊营期时间" placement="top">-->
-<!--          <el-button-->
-<!--            type="danger"-->
-<!--            icon="el-icon-edit"-->
-<!--            size="medium"-->
-<!--            :disabled="multiple"-->
-<!--            @click="updateGroupTime"-->
-<!--          >批量修改营期时间</el-button>-->
-<!--        </el-tooltip>-->
-<!--      </el-col>-->
+      <!--      <el-col :span="1.5">-->
+      <!--        <el-tooltip class="item" effect="dark" content="修改选择的群聊营期时间" placement="top">-->
+      <!--          <el-button-->
+      <!--            type="danger"-->
+      <!--            icon="el-icon-edit"-->
+      <!--            size="medium"-->
+      <!--            :disabled="multiple"-->
+      <!--            @click="updateGroupTime"-->
+      <!--          >批量修改营期时间</el-button>-->
+      <!--        </el-tooltip>-->
+      <!--      </el-col>-->
 
       <el-col :span="1.5">
-        <el-tooltip class="item" effect="dark" content="删除营期之后,将不会在给原营期的客户发送消息,ps:删除之后不可恢复" placement="top">
+        <el-tooltip class="item" effect="dark" content="删除营期之后,将不会在给原营期的客户发送消息,ps:删除之后不可恢复"
+                    placement="top"
+        >
           <el-button
             type="danger"
             icon="el-icon-s-promotion"
@@ -105,7 +112,8 @@
             :disabled="multiple"
             @click="handleDeleteUserLogs"
             v-hasPermi="['qw:sopUserLogs:remove']"
-          >批量删除营期</el-button>
+          >批量删除营期
+          </el-button>
 
         </el-tooltip>
       </el-col>
@@ -119,7 +127,8 @@
             icon="el-icon-plus"
             size="medium"
             @click="addGroup"
-          >追加群聊</el-button>
+          >追加群聊
+          </el-button>
         </el-tooltip>
       </el-col>
 
@@ -131,11 +140,14 @@
             size="medium"
             :disabled="multiple"
             @click="updateGroupTime"
-          >批量修改营期时间</el-button>
+          >批量修改营期时间
+          </el-button>
         </el-tooltip>
       </el-col>
       <el-col :span="1.5">
-        <el-tooltip class="item" effect="dark" content="删除营期之后,将不会在给原营期的群发送消息,ps:删除之后不可恢复" placement="top">
+        <el-tooltip class="item" effect="dark" content="删除营期之后,将不会在给原营期的群发送消息,ps:删除之后不可恢复"
+                    placement="top"
+        >
           <el-button
             type="danger"
             icon="el-icon-s-promotion"
@@ -143,47 +155,55 @@
             :disabled="multiple"
             @click="handleDeleteUserLogs"
             v-hasPermi="['qw:sopUserLogs:remove']"
-          >批量删除营期</el-button>
+          >批量删除营期
+          </el-button>
         </el-tooltip>
       </el-col>
-                  <el-col :span="1.5">
-        <el-tooltip class="item" effect="dark" content="批量更换实际发送人" placement="top" >
+      <el-col :span="1.5">
+        <el-tooltip class="item" effect="dark" content="批量更换实际发送人" placement="top">
           <el-button
             type="primary"
             icon="el-icon-s-custom"
             size="medium"
             :disabled="multiple"
             @click="handleUpdateSender"
-          >批量更换实际发送人</el-button>
+          >批量更换实际发送人
+          </el-button>
         </el-tooltip>
       </el-col>
     </el-row>
-    <div style="color: #999;font-size: 14px;display: flex;align-items: center;margin-bottom: 5px" v-if="filterMode == 1">
+    <div style="color: #999;font-size: 14px;display: flex;align-items: center;margin-bottom: 5px"
+         v-if="filterMode == 1"
+    >
       <i class="el-icon-info"></i>
       【营期一键群发】:此功能用于给 选中的 营期 内【所有的】客户发送 消息【或者发送草稿-/-清楚草稿】
     </div>
-    <div style="color: #999;font-size: 14px;display: flex;align-items: center;margin-bottom: 5px" v-if="filterMode == 1">
+    <div style="color: #999;font-size: 14px;display: flex;align-items: center;margin-bottom: 5px"
+         v-if="filterMode == 1"
+    >
       <i class="el-icon-info"></i>
       【批量删除营期】:此功能用于删除选中的【整个营期】,删除之后将不会在给原营期的客户发送消息,ps:删除之后不可恢复
     </div>
-    <div style="color: #999;font-size: 14px;display: flex;align-items: center;margin-bottom: 5px" v-if="filterMode == 1">
+    <div style="color: #999;font-size: 14px;display: flex;align-items: center;margin-bottom: 5px"
+         v-if="filterMode == 1"
+    >
       <i class="el-icon-info"></i>
       【天数】:【列表:营期时间】对应列表中的天数是几 就代表着 插件助手 会发送【任务模板】里的第几天的消息
     </div>
     <el-table border v-loading="loading" :data="sopUserLogsList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="营期编号" align="center" prop="id" />
-      <el-table-column label="企微员工账号" align="center" prop="qwUserId" />
-      <el-table-column label="企微员工名称" align="center" prop="qwUserName" />
-      <el-table-column label="实际发送人" align="center" prop="actualQwUserName" />
-      <el-table-column label="群聊" align="center" prop="chatName" v-if="filterMode == 2" />
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="营期编号" align="center" prop="id"/>
+      <el-table-column label="企微员工账号" align="center" prop="qwUserId"/>
+      <el-table-column label="企微员工名称" align="center" prop="qwUserName"/>
+      <el-table-column label="实际发送人" align="center" prop="actualQwUserName"/>
+      <el-table-column label="群聊" align="center" prop="chatName" v-if="filterMode == 2"/>
       <el-table-column label="营期时间" align="center" prop="startTime" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="天数" align="center" prop="countDays" />
-      <el-table-column label="状态" align="center" prop="status" >
+      <el-table-column label="天数" align="center" prop="countDays"/>
+      <el-table-column label="状态" align="center" prop="status">
         <template slot-scope="scope">
           <div v-if="scope.row.userId && scope.row.userId.includes('null')">
             <span style="color: orange;">营期异常</span>
@@ -204,7 +224,8 @@
             icon="el-icon-edit"
             @click="handleSelect(scope.row)"
             v-hasPermi="['qw:sop:list']"
-          >营期详情</el-button>
+          >营期详情
+          </el-button>
           <el-button
             v-if="scope.row.userId && scope.row.userId.includes('null')"
             size="mini"
@@ -212,7 +233,8 @@
             icon="el-icon-s-check"
             @click="handleRepairLogs(scope.row)"
             v-hasPermi="['qw:sop:list']"
-          >修复营期</el-button>
+          >修复营期
+          </el-button>
           <!--          <el-button-->
           <!--            size="mini"-->
           <!--            type="text"-->
@@ -222,6 +244,17 @@
         </template>
       </el-table-column>
 
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="filterMode == 2">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            @click="getLink(scope.row)"
+          >获取当天群链接
+          </el-button>
+        </template>
+      </el-table-column>
+
     </el-table>
 
     <pagination
@@ -234,15 +267,19 @@
 
 
     <!--  执行详情  -->
-    <el-drawer :title="logsInfoDetailsOpen.title" :visible.sync="logsInfoDetailsOpen.open" size="88%" style="font-weight: bolder">
-      <sop-user-logs-info-details ref="SopUserLogsInfoDetails" :rowDetailFrom="logsInfoDetailsOpen.item" @flashNotify="flashNotify"></sop-user-logs-info-details>
+    <el-drawer :title="logsInfoDetailsOpen.title" :visible.sync="logsInfoDetailsOpen.open" size="88%"
+               style="font-weight: bolder"
+    >
+      <sop-user-logs-info-details ref="SopUserLogsInfoDetails" :rowDetailFrom="logsInfoDetailsOpen.item"
+                                  @flashNotify="flashNotify"
+      ></sop-user-logs-info-details>
     </el-drawer>
 
-    <send-msg-open-tool ref="sendMsgOpenTool" ></send-msg-open-tool>
-    <el-dialog title="修改营期时间" :visible.sync="updateTimeData.open"  width="800px" append-to-body>
+    <send-msg-open-tool ref="sendMsgOpenTool"></send-msg-open-tool>
+    <el-dialog title="修改营期时间" :visible.sync="updateTimeData.open" width="800px" append-to-body>
       <p>
         <span>选择群聊:</span>
-        <el-tag v-for="name in chatNames">{{name}}</el-tag>
+        <el-tag v-for="name in chatNames">{{ name }}</el-tag>
       </p>
       <el-form ref="msgForm" :model="updateTimeData.form" label-width="100px">
         <el-form-item label="日期">
@@ -250,7 +287,8 @@
             v-model="updateTimeData.form.date"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择日期">
+            placeholder="选择日期"
+          >
           </el-date-picker>
         </el-form-item>
       </el-form>
@@ -259,15 +297,15 @@
         <el-button @click="updateTimeData.open = false">取 消</el-button>
       </div>
     </el-dialog>
-    <el-dialog title="选择企微" :visible.sync="addGroupData.userOpen" width="1300px"   append-to-body>
+    <el-dialog title="选择企微" :visible.sync="addGroupData.userOpen" width="1300px" append-to-body>
       <qwUserList ref="QwUserList" @selectUserList="selectUserList"></qwUserList>
     </el-dialog>
 
-        <el-dialog :title="listUser.title" :visible.sync="listUser.open" width="1300px"   append-to-body>
+    <el-dialog :title="listUser.title" :visible.sync="listUser.open" width="1300px" append-to-body>
       <qwUserSelectOne ref="QwUserListSender" @selectUser="selectSenderSingle"></qwUserSelectOne>
     </el-dialog>
 
-    <el-dialog title="追加群聊" :visible.sync="addGroupData.open"  width="800px" append-to-body>
+    <el-dialog title="追加群聊" :visible.sync="addGroupData.open" width="800px" append-to-body>
       <el-form ref="msgForm" :model="addGroupData.form" label-width="100px">
         <el-form-item label="选择员工" prop="qwUserIds" style="margin-top: 2%">
           <div>
@@ -275,7 +313,9 @@
               size="medium"
               icon="el-icon-circle-plus-outline"
               plain
-              @click="handleCompanyUser">请选择使用员工</el-button>
+              @click="handleCompanyUser"
+            >请选择使用员工
+            </el-button>
           </div>
           <div>
             <el-tag
@@ -285,14 +325,18 @@
               v-for="id in userSelectList"
               closable
               :disable-transitions="false"
-              @close="handleClosegroupUser(id)">
-              <span v-for="list in companyUserLists " :key="list.userId" v-if="list.id == id">{{list.qwUserName}}</span>
+              @close="handleClosegroupUser(id)"
+            >
+              <span v-for="list in companyUserLists " :key="list.userId" v-if="list.id == id"
+              >{{ list.qwUserName }}</span>
             </el-tag>
           </div>
         </el-form-item>
         <el-form-item label="群聊">
           <el-select multiple filterable clearable v-model="addGroupData.form.chatIds">
-            <el-option v-for="item in addGroupData.selectChat" :key="item.chatId" :label="item.name" :value="item.chatId"/>
+            <el-option v-for="item in addGroupData.selectChat" :key="item.chatId" :label="item.name"
+                       :value="item.chatId"
+            />
           </el-select>
         </el-form-item>
         <el-form-item label="日期">
@@ -300,7 +344,8 @@
             v-model="addGroupData.form.date"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择日期">
+            placeholder="选择日期"
+          >
           </el-date-picker>
         </el-form-item>
       </el-form>
@@ -309,6 +354,29 @@
         <el-button @click="addGroupData.open = false">取 消</el-button>
       </div>
     </el-dialog>
+
+    <el-dialog title="链接" :visible.sync="mini.open" width="800px" append-to-body>
+
+      <el-form ref="msgForm" :model="addGroupData.form" label-width="100px">
+        <el-form-item label="小程序" prop="qwUserIds" style="margin-top: 2%">
+          <el-select v-model="mini.appId" placeholder="选择小程序" size="small">
+            <el-option
+              v-for="miniApp in companyMiniAppList"
+              :key="miniApp.appid"
+              :label="miniApp.name"
+              :value="miniApp.appid"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="链接" prop="qwUserIds" style="margin-top: 2%" :loading="mini.loading">
+          {{ mini.link || "无" }}
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="genMiniLink">生 成</el-button>
+        <el-button @click="mini.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -318,37 +386,46 @@ import {
   exportSopUserLogs,
   listSopUserLogs,
   repairSopUserLogs,
+  getShortLink,
   getSelectChat,
   addGroupChat,
-  updateLogDate,UpdateTimeSopUserLogs,replaceUser
-} from "../../../api/qw/sopUserLogs";
-import sopLogsDetails from "@/views/qw/sopLogs/sopLogsList.vue";
-import SopUserLogsInfoDetails from "@/views/qw/sopUserLogsInfo/sopUserLogsInfoDetails.vue";
-import sendMsgOpenTool from "../../../views/qw/sopUserLogsInfo/sendMsgOpenTool.vue";
-import {listAll as chatListAll} from "@/api/qw/groupChat";
-import companyUserList from "@/views/company/companyUser/companyUserList.vue";
-import qwUserList from "@/views/qw/user/qwUserList.vue";
-import qwUserSelectOne from "@/views/qw/user/qwUserSelectOne.vue";
-import {getQwAllUserList, listUser} from "@/api/company/companyUser";
+  updateLogDate, UpdateTimeSopUserLogs, replaceUser
+} from '@/api/qw/sopUserLogs'
+import {
+  getCompanyMiniAppList
+} from '@/api/company/companyConfig'
+import sopLogsDetails from '@/views/qw/sopLogs/sopLogsList.vue'
+import SopUserLogsInfoDetails from '@/views/qw/sopUserLogsInfo/sopUserLogsInfoDetails.vue'
+import sendMsgOpenTool from '../../../views/qw/sopUserLogsInfo/sendMsgOpenTool.vue'
+import { listAll as chatListAll } from '@/api/qw/groupChat'
+import companyUserList from '@/views/company/companyUser/companyUserList.vue'
+import qwUserList from '@/views/qw/user/qwUserList.vue'
+import qwUserSelectOne from '@/views/qw/user/qwUserSelectOne.vue'
+import { getQwAllUserList, listUser } from '@/api/company/companyUser'
 
 export default {
-  name: "sopUserLogsSchedule",
-  components: {qwUserList, qwUserSelectOne, companyUserList, SopUserLogsInfoDetails, sopLogsDetails,sendMsgOpenTool},
-  props:{
-    rowDetailFrom:{},
+  name: 'sopUserLogsSchedule',
+  components: { qwUserList, qwUserSelectOne, companyUserList, SopUserLogsInfoDetails, sopLogsDetails, sendMsgOpenTool },
+  props: {
+    rowDetailFrom: {}
   },
 
   data() {
     return {
       qwUserIds: [],
-      sopUserLogId:null,
-      companyUserLists:[],
-      sopName:'',
-      tempId:'',
+      sopUserLogId: null,
+      companyUserLists: [],
+      sopName: '',
+      tempId: '',
       listUser: {
         title: '选择发送人',
         open: false
       },
+      mini: {
+        open: false,
+        loading: false,
+        row: {},
+      },
       // 遮罩层
       loading: true,
       // 导出遮罩层
@@ -366,17 +443,17 @@ export default {
       showSearch: true,
       // 总条数
       total: 0,
-      logsInfoDetailsOpen:{
-        title:"",
-        open:false,
+      logsInfoDetailsOpen: {
+        title: '',
+        open: false
       },
-      sysQwSopAiContentType:[],
-      userSelectList:[],
+      sysQwSopAiContentType: [],
+      userSelectList: [],
       // sopUserLogs表格数据
       sopUserLogsList: [],
-      sopUserLogsDelStatus:[],
+      sopUserLogsDelStatus: [],
       // 弹出层标题
-      title: "",
+      title: '',
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -385,22 +462,22 @@ export default {
         userOpen: false,
         selectChat: [],
         form: {
-          chatIds: [],
-        },
+          chatIds: []
+        }
       },
       updateTimeData: {
         open: false,
         form: {
-          date: null,
-        },
+          date: null
+        }
       },
       queryParams: {
         pageNum: 1,
         pageSize: 10,
         sopId: null,
-        userLogsId:null,
-        externalUserName:null,
-        externalId:null,
+        userLogsId: null,
+        externalUserName: null,
+        externalId: null,
         sopTempId: null,
         qwUserId: null,
         qwUserName: null,
@@ -408,85 +485,103 @@ export default {
         startTime: null,
         status: null,
         userId: null,
-        type:null,
+        type: null
       },
-      sendMsgOpen:{
-        title:'营期一键批量群发',
-        open:false,
-        ids:null,
+      sendMsgOpen: {
+        title: '营期一键批量群发',
+        open: false,
+        ids: null
       },
-      setting:[],
+      setting: [],
+      companyMiniAppList: [],
       // 表单参数
       form: {},
       tempForm: {
-        setting:null,
-        videoIdSet:null,
-        courseIdSet:null,
+        setting: null,
+        videoIdSet: null,
+        courseIdSet: null
       },
       // 表单校验
-      rules: {
-      }
-    };
+      rules: {}
+    }
   },
   created() {
 
-    this.getDicts("sys_company_status").then(response => {
-      this.statusOptions = response.data;
-    });
-
-    this.getDicts("sop_user_logs_del_status").then(response => {
-      this.sopUserLogsDelStatus = response.data;
-    });
-    this.getDicts("sys_qwSopAi_contentType").then(response => {
-      this.sysQwSopAiContentType = response.data;
-    });
-    this.queryParams.sopId = this.$route.params.id;
-    this.sopName = this.$route.query.name;
-    this.filterMode = this.$route.query.filterMode;
-    this.tempId = this.$route.query.tempId;
-    this.queryParams.corpId= this.$route.query.corpId;
-    this.queryParams.type= this.$route.query.type;
+    this.getDicts('sys_company_status').then(response => {
+      this.statusOptions = response.data
+    })
+
+    this.getDicts('sop_user_logs_del_status').then(response => {
+      this.sopUserLogsDelStatus = response.data
+    })
+    this.getDicts('sys_qwSopAi_contentType').then(response => {
+      this.sysQwSopAiContentType = response.data
+    })
+    this.queryParams.sopId = this.$route.params.id
+    this.sopName = this.$route.query.name
+    this.filterMode = this.$route.query.filterMode
+    this.tempId = this.$route.query.tempId
+    this.queryParams.corpId = this.$route.query.corpId
+    this.queryParams.type = this.$route.query.type
     getQwAllUserList(this.queryParams.corpId).then(response => {
-      this.companyUserLists = response.data;
-    });
+      this.companyUserLists = response.data
+    })
     this.getList()
 
   },
   methods: {
-        selectSenderSingle(user){
-      this.listUser.open=false;
-      const data = { ids: this.ids };
+    selectSenderSingle(user) {
+      this.listUser.open = false
+      const data = { ids: this.ids }
       // 仅在选中员工时携带 actualQwUserId 与 actualQwId,否则两字段均不传,后端按清空处理
       if (user && user.qwUserId) {
-        data.actualQwUserId = user.qwUserId;
-        data.actualQwId     = user.id;
+        data.actualQwUserId = user.qwUserId
+        data.actualQwId = user.id
       }
       replaceUser(data).then(res => {
-        this.msgSuccess(user && user.qwUserId ? "修改成功" : "已清空实际发送人");
-        this.getList();
+        this.msgSuccess(user && user.qwUserId ? '修改成功' : '已清空实际发送人')
+        this.getList()
+      })
+    },
+    getLink(row) {
+      getCompanyMiniAppList().then(res => {
+        this.companyMiniAppList = res.data
+        this.mini.open = true;
+        this.mini.row = row;
+      }).catch(res => {
+        console.log(res)
+      })
+    },
+    genMiniLink() {
+      this.mini.loading = true;
+      getShortLink({ id: this.mini.row.id, sopId: this.mini.row.sopId, appId: this.mini.appId }).then(response => {
+        this.mini.link = response.urlLink;
+        this.$forceUpdate();
+      }).finally(e =>{
+        this.mini.loading = false;
       })
     },
     /** 查询sopUserLogs列表 */
     getList() {
-      this.loading = true;
+      this.loading = true
       listSopUserLogs(this.queryParams).then(response => {
-        this.sopUserLogsList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
+        this.sopUserLogsList = response.rows
+        this.total = response.total
+        this.loading = false
+      })
     },
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.reset();
+      this.open = false
+      this.reset()
     },
-    addSetList(){
+    addSetList() {
       const newSetting = {
-        contentType:'1',
-        value: '',
-      };
+        contentType: '1',
+        value: ''
+      }
       // 将新设置项添加到 content.setting 数组中
-      this.setting.push(newSetting);
+      this.setting.push(newSetting)
 
     },
     // 表单重置
@@ -496,189 +591,190 @@ export default {
         sopId: null,
         sopTempId: null,
         qwUserId: null,
-        externalId:null,
+        externalId: null,
         corpId: null,
         startTime: null,
         status: 0,
         userId: null
-      };
-      this.resetForm("form");
+      }
+      this.resetForm('form')
     },
 
     /**
      * 营期一键群发
      */
-    handleCampSendMsg(){
+    handleCampSendMsg() {
 
       setTimeout(() => {
-        this.$refs.sendMsgOpenTool.oneClickGroupSending(this.ids,2,this.queryParams.corpId);
-      }, 500);
+        this.$refs.sendMsgOpenTool.oneClickGroupSending(this.ids, 2, this.queryParams.corpId)
+      }, 500)
 
     },
 
-        /**
+    /**
      * 批量更换实际发送人
      */
     handleUpdateSender() {
-      this.listUser.open = true;
+      this.listUser.open = true
       this.$nextTick(() => {
-        this.$refs.QwUserListSender.getDetails(this.queryParams.corpId);
+        this.$refs.QwUserListSender.getDetails(this.queryParams.corpId)
       })
     },
     /**
      *  删除营期
      */
-    handleDeleteUserLogs(){
-      const ids =  this.ids;
-      this.$confirm('是否确认删除编号为"' + ids + '"的数据项【注意!!删除后不可恢复,请谨慎操作】?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
+    handleDeleteUserLogs() {
+      const ids = this.ids
+      this.$confirm('是否确认删除编号为"' + ids + '"的数据项【注意!!删除后不可恢复,请谨慎操作】?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       }).then(function() {
-        return delSopUserLogs(ids);
+        return delSopUserLogs(ids)
       }).then(() => {
-        this.getList();
-        this.msgSuccess("删除成功");
-      }).catch(() => {});
+        this.getList()
+        this.msgSuccess('删除成功')
+      }).catch(() => {
+      })
     },
 
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
+      this.queryParams.pageNum = 1
+      this.getList()
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
+      this.resetForm('queryForm')
+      this.handleQuery()
     },
 
-    flashNotify(){
-      this.getList();
+    flashNotify() {
+      this.getList()
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
-      if(this.filterMode == 2){
-        this.chatNames = selection.map(item => item.chatName);
+      if (this.filterMode == 2) {
+        this.chatNames = selection.map(item => item.chatName)
       }
-      this.single = selection.length!==1
+      this.single = selection.length !== 1
       this.multiple = !selection.length
     },
 
-    handleSelect(val){
-      val.filterMode = this.filterMode;
-      this.logsInfoDetailsOpen.title='企微账号:'+val.qwUserId+'  '+'营期时间:'+val.startTime+'  '+'天数:' + val.countDays;
-      this.logsInfoDetailsOpen.open=true;
-      const externalUserName = this.queryParams.externalUserName;
+    handleSelect(val) {
+      val.filterMode = this.filterMode
+      this.logsInfoDetailsOpen.title = '企微账号:' + val.qwUserId + '  ' + '营期时间:' + val.startTime + '  ' + '天数:' + val.countDays
+      this.logsInfoDetailsOpen.open = true
+      const externalUserName = this.queryParams.externalUserName
       setTimeout(() => {
-        this.$refs.SopUserLogsInfoDetails.selectSopUserLogsInfo(val, externalUserName);
-      }, 500);
+        this.$refs.SopUserLogsInfoDetails.selectSopUserLogsInfo(val, externalUserName)
+      }, 500)
 
     },
 
     handleRepairLogs(val) {
-      this.loading = true;
+      this.loading = true
       let loadingRock = this.$loading({
         lock: true,
         text: '正在修复中请稍后~~!!',
         spinner: 'el-icon-loading',
         background: 'rgba(0, 0, 0, 0.7)'
-      });
+      })
 
       repairSopUserLogs(val).then(res => {
-        this.msgSuccess("修复成功成功");
+        this.msgSuccess('修复成功成功')
       }).catch(res => {
       }).finally(res => {
-        loadingRock.close();
-        this.loading = false;
-        this.getList();
+        loadingRock.close()
+        this.loading = false
+        this.getList()
       })
 
     },
     /** 导出按钮操作 */
     handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有sopUserLogs数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
+      const queryParams = this.queryParams
+      this.$confirm('是否确认导出所有sopUserLogs数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       }).then(() => {
-        this.exportLoading = true;
-        return exportSopUserLogs(queryParams);
+        this.exportLoading = true
+        return exportSopUserLogs(queryParams)
       }).then(response => {
-        this.download(response.msg);
-        this.exportLoading = false;
+        this.download(response.msg)
+        this.exportLoading = false
       }).catch(() => {
-      });
+      })
     },
     addGroup() {
-      this.addGroupData.open = true;
-      this.addGroupData.form = {date: new Date(), chatIds: []};
+      this.addGroupData.open = true
+      this.addGroupData.form = { date: new Date(), chatIds: [] }
     },
     updateGroupTime() {
-      this.updateTimeData.open = true;
-      this.updateTimeData.form = {date: new Date()};
+      this.updateTimeData.open = true
+      this.updateTimeData.form = { date: new Date() }
     },
     submitUpdateTimeForm() {
       let form = {
         date: this.updateTimeData.form.date,
-        ids: this.ids,
+        ids: this.ids
       }
       updateLogDate(form).then(response => {
-        if (response.data!=null){
-          this.msgInfo("部分时间已有营期:"+response.data);
+        if (response.data != null) {
+          this.msgInfo('部分时间已有营期:' + response.data)
         }
 
-        this.updateTimeData.open = false;
-        this.getList();
-      });
+        this.updateTimeData.open = false
+        this.getList()
+      })
     },
     submitAddGroupForm() {
       let form = {
         id: this.queryParams.sopId,
         qwUserIds: this.userSelectList.join(),
         chatIds: this.addGroupData.form.chatIds.join(),
-        date: this.addGroupData.form.date,
+        date: this.addGroupData.form.date
       }
       addGroupChat(form).then(e => {
-        this.addGroupData.open = false;
-        this.getList();
-      });
+        this.addGroupData.open = false
+        this.getList()
+      })
     },
     handleCompanyUser() {
       setTimeout(() => {
-        this.$refs.QwUserList.getDetails(this.queryParams.corpId, this.queryParams.type, 2);
-      }, 1);
-      this.addGroupData.userOpen = true;
+        this.$refs.QwUserList.getDetails(this.queryParams.corpId, this.queryParams.type, 2)
+      }, 1)
+      this.addGroupData.userOpen = true
     },
     handleClosegroupUser(list) {
-      const index = this.userSelectList.findIndex(t => t === list);
+      const index = this.userSelectList.findIndex(t => t === list)
       if (index !== -1) {
-        this.userSelectList.splice(index, 1);
-        this.qwUserIds.splice(index, 1);
+        this.userSelectList.splice(index, 1)
+        this.qwUserIds.splice(index, 1)
         this.loadChatList()
       }
     },
     loadChatList() {
       chatListAll(this.qwUserIds.join(), this.queryParams.corpId, this.queryParams.sopId).then(e => {
-        this.addGroupData.selectChat = e.data;
+        this.addGroupData.selectChat = e.data
       })
     },
     selectUserList(list) {
-      this.addGroupData.userOpen = false;
+      this.addGroupData.userOpen = false
       list.forEach(obj => {
         if (!this.userSelectList.some(item => item == obj.id)) {
           console.info(this.userSelectList)
-          this.userSelectList.push(obj.id);
-          this.qwUserIds.push(obj.qwUserId);
+          this.userSelectList.push(obj.id)
+          this.qwUserIds.push(obj.qwUserId)
         }
-      });
+      })
       this.loadChatList()
 
-    },
+    }
   }
-};
+}
 </script>
 
 <style>

+ 3 - 2
src/views/qw/user/cuDeptIdIndex.vue

@@ -843,8 +843,9 @@ export default {
 	handleDelQwIpad(val){
 	  delQwIpad({qwUserId: val.id}).then(res => {
 	    this.$message.success("解绑主机成功");
-		this.getList()
-	  })
+	  }).finally(res => {
+      this.getList();
+    })
 	},
     //传验证码
     handleLoginQwCodeMsg(){

+ 6 - 1
src/views/qw/user/index.vue

@@ -865,6 +865,10 @@ export default {
             this.$message.success('账号企业不一致请重新扫码登录');
             this.clearDl();
           }
+          if (res.msg == 23) {
+            this.$message.success('账号不匹配,请同步信息后重新扫码登录');
+            this.clearDl();
+          }
           if (res.msg == 104001) {
             this.$message.success('登录成功');
             this.clearDl()
@@ -954,7 +958,8 @@ export default {
     handleDelQwIpad(val) {
       delQwIpad({qwUserId: val.id}).then(res => {
         this.$message.success("解绑主机成功");
-        this.getList()
+      }).finally(res => {
+        this.getList();
       })
     },
 

+ 3 - 1
src/views/qw/user/myIndex.vue

@@ -927,9 +927,11 @@ export default {
       });
     },
     handleDelQwIpad(val) {
+
       delQwIpad({qwUserId: val.id}).then(res => {
         this.$message.success("解绑主机成功");
-        this.getList()
+      }).finally(res => {
+        this.getList();
       })
     },
 

+ 248 - 3
src/views/store/components/packageOrderDetails.vue

@@ -162,6 +162,23 @@
                    <el-descriptions-item label="代收金额" ><span v-if="item.payRemain!=null">¥{{item.payRemain.toFixed(2)}}</span></el-descriptions-item>
         </el-descriptions>
            </div>
+
+       <!-- 首诊图片管理 -->
+       <div class="contentx" v-if="item!=null">
+         <div class="desct">
+           首诊图片管理
+           <el-button
+             type="primary"
+             size="mini"
+             style="float: right; margin-top: -5px;"
+             @click="showPatientImagesDialog"
+             :disabled="item.status == 3"
+           >
+             管理首诊图片
+           </el-button>
+         </div>
+       </div>
+
        <el-drawer
            :with-header="false"
            :append-to-body="true"
@@ -200,19 +217,85 @@
           <el-dialog :title="addSms.title" :visible.sync="addSms.open" width="800px" append-to-body>
               <add-sms ref="sms" @close="closeSms()"></add-sms>
           </el-dialog>
+
+          <!-- 首诊图片管理对话框 -->
+          <el-dialog
+            title="首诊图片管理"
+            :visible.sync="patientImagesDialog.visible"
+            width="80%"
+            append-to-body
+            @close="closePatientImagesDialog"
+          >
+            <div v-loading="patientImagesDialog.loading">
+              <div style="margin-bottom: 20px;">
+                <h4>当前首诊图片:</h4>
+                <div v-if="patientImagesDialog.images.length > 0" class="image-gallery">
+                  <div
+                    v-for="(image, index) in patientImagesDialog.images"
+                    :key="index"
+                    class="image-item"
+                  >
+                    <img :src="image" class="thumbnail" @click="previewImage(image)" />
+                    <div class="image-actions">
+                      <el-button
+                        size="mini"
+                        type="danger"
+                        icon="el-icon-delete"
+                        circle
+                        @click="removeImage(index)"
+                      ></el-button>
+                    </div>
+                  </div>
+                </div>
+                <div v-else style="color: #999; text-align: center; padding: 20px;">
+                  暂无首诊图片
+                </div>
+              </div>
+
+              <div style="margin-bottom: 20px;">
+                <h4>添加新图片:</h4>
+                <ImageUpload
+                  v-model="patientImagesDialog.newImages"
+                  :limit="10"
+                  :file-size="5"
+                  :file-type="['jpg', 'jpeg', 'png', 'gif']"
+                />
+              </div>
+            </div>
+
+            <div slot="footer" class="dialog-footer">
+              <el-button @click="closePatientImagesDialog">取 消</el-button>
+              <el-button type="primary" @click="savePatientImages" :loading="patientImagesDialog.saving">
+                保 存
+              </el-button>
+            </div>
+          </el-dialog>
+
+          <!-- 图片预览对话框 -->
+          <el-dialog
+            title="图片预览"
+            :visible.sync="previewDialog.visible"
+            width="60%"
+            append-to-body
+          >
+            <div style="text-align: center;">
+              <img :src="previewDialog.image" style="max-width: 100%; max-height: 500px;" />
+            </div>
+          </el-dialog>
       </div>
 </template>
 
 <script>
 
-import { listPackageOrder,storeRefund,inquiryRefund, payment,getPackageOrder, delPackageOrder,refundAudit, addPackageOrder,refund, updatePackageOrder, exportPackageOrder,getUserPhone } from "@/api/store/packageOrder";
+import { listPackageOrder,storeRefund,inquiryRefund, payment,getPackageOrder, delPackageOrder,refundAudit, addPackageOrder,refund, updatePackageOrder, exportPackageOrder,getUserPhone, editPatientImages } from "@/api/store/packageOrder";
 import { listOrderitem} from "@/api/store/storeOrder";
 import storeOrderDetails from '../components/storeOrderDetails2.vue';
 import inquiryOrderDetails from '../components/inquiryOrderDetails.vue';
 import addSms from '../../crm/components/addSms.vue';
+import ImageUpload from '@/components/ImageUpload/index.vue';
   export default {
     name: "patdetails",
-    components: { storeOrderDetails,inquiryOrderDetails,addSms },
+    components: { storeOrderDetails,inquiryOrderDetails,addSms, ImageUpload },
     props:["data"],
     data() {
 
@@ -248,6 +331,19 @@ import addSms from '../../crm/components/addSms.vue';
       refundStatusOptions: [],
         item:null,
       pay:[],
+      // 患者图片管理对话框数据
+      patientImagesDialog: {
+        visible: false,
+        loading: false,
+        saving: false,
+        images: [], // 当前患者图片列表
+        newImages: '' // 新上传的图片
+      },
+      // 图片预览对话框数据
+      previewDialog: {
+        visible: false,
+        image: ''
+      }
       }
     },
     computed: {
@@ -282,7 +378,7 @@ import addSms from '../../crm/components/addSms.vue';
         setTimeout(() => {
             that.$refs.sms.getPackageOrderId(this.item.orderId,mobile,3);
         }, 500);
-        
+
       },
       handlePhone(){
         const orderId = this.item.orderId;
@@ -408,6 +504,114 @@ import addSms from '../../crm/components/addSms.vue';
             });
           }).catch(function() {});
       },
+      // 显示患者图片管理对话框
+      showPatientImagesDialog() {
+        // 解析patientJson中的firstVisitImages字段
+        if (this.item.patientJson) {
+          try {
+            const patientData = JSON.parse(this.item.patientJson);
+            // 修改:imagesList参数接受的是图片的path字符串,可能包含多个路径用逗号分隔
+            const imagesPath = patientData.firstVisitImages;
+            if (imagesPath) {
+              // 如果是字符串,按逗号分割成数组用于显示
+              if (typeof imagesPath === 'string') {
+                this.patientImagesDialog.images = imagesPath.split(',').filter(img => img.trim() !== '');
+              } else {
+                // 如果已经是数组,直接使用
+                this.patientImagesDialog.images = imagesPath;
+              }
+            } else {
+              this.patientImagesDialog.images = [];
+            }
+          } catch (e) {
+            console.error('解析patientJson失败:', e);
+            this.patientImagesDialog.images = [];
+          }
+        } else {
+          this.patientImagesDialog.images = [];
+        }
+
+        // 重置新上传的图片
+        this.patientImagesDialog.newImages = '';
+        this.patientImagesDialog.visible = true;
+      },
+
+      // 关闭患者图片管理对话框
+      closePatientImagesDialog() {
+        this.patientImagesDialog.visible = false;
+        this.patientImagesDialog.images = [];
+        this.patientImagesDialog.newImages = '';
+      },
+
+      // 预览图片
+      previewImage(image) {
+        this.previewDialog.image = image;
+        this.previewDialog.visible = true;
+      },
+
+      // 移除图片
+      removeImage(index) {
+        this.$confirm('确定要删除这张图片吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.patientImagesDialog.images.splice(index, 1);
+          this.$message.success('删除成功');
+        }).catch(() => {});
+      },
+
+      // 保存患者图片
+      savePatientImages() {
+        this.patientImagesDialog.saving = true;
+
+        // 合并原有图片和新上传的图片
+        let allImages = [...this.patientImagesDialog.images];
+
+        // 如果有新上传的图片,添加到列表中
+        if (this.patientImagesDialog.newImages) {
+          const newImages = this.patientImagesDialog.newImages.split(',').filter(img => img.trim() !== '');
+          allImages = [...allImages, ...newImages];
+        }
+
+        // 修改:根据后端API要求,imagesList参数应该是字符串类型
+        // 将所有图片路径用逗号连接成一个字符串
+        const imagesParam = allImages.join(',');
+
+        console.log('保存患者图片,参数:', {
+          orderId: this.item.orderId,
+          imagesParam: imagesParam
+        });
+
+        // 调用API保存图片
+        editPatientImages(this.item.orderId, imagesParam).then(response => {
+          console.log('保存患者图片成功:', response);
+          this.$message.success('保存成功');
+          this.patientImagesDialog.saving = false;
+          this.patientImagesDialog.visible = false;
+
+          // 更新item中的patientJson
+          if (this.item.patientJson) {
+            try {
+              const patientData = JSON.parse(this.item.patientJson);
+              // 保存时保持与API一致的格式,存储字符串
+              patientData.firstVisitImages = imagesParam;
+              this.item.patientJson = JSON.stringify(patientData);
+            } catch (e) {
+              console.error('更新patientJson失败:', e);
+            }
+          }
+        }).catch(error => {
+          console.error('保存患者图片失败:', error);
+          this.$message.error('保存失败: ' + (error.message || '未知错误'));
+          this.patientImagesDialog.saving = false;
+        }).finally(() => {
+          // 确保无论成功还是失败,都重置saving状态
+          if (this.patientImagesDialog.saving) {
+            this.patientImagesDialog.saving = false;
+          }
+        });
+      }
     }
   }
 </script>
@@ -450,5 +654,46 @@ import addSms from '../../crm/components/addSms.vue';
   float: right;
   margin-right: 20px
 }
+
+/* 图片画廊样式 */
+.image-gallery {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 15px;
+  margin-top: 10px;
+}
+
+.image-item {
+  position: relative;
+  width: 120px;
+  height: 120px;
+  border: 1px solid #ddd;
+  border-radius: 4px;
+  overflow: hidden;
+}
+
+.thumbnail {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+  cursor: pointer;
+  transition: transform 0.3s;
+}
+
+.thumbnail:hover {
+  transform: scale(1.05);
+}
+
+.image-actions {
+  position: absolute;
+  top: 5px;
+  right: 5px;
+  opacity: 0;
+  transition: opacity 0.3s;
+}
+
+.image-item:hover .image-actions {
+  opacity: 1;
+}
 </style>
 

+ 15 - 0
src/views/users/user/blacklist.vue

@@ -11,6 +11,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="项目" prop="projectId">
+        <el-select v-model="queryParams.projectId" placeholder="请选择项目" filterable clearable size="small">
+          <el-option
+            v-for="dict in projectOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -111,11 +121,13 @@ export default {
       total: 0,
       // 用户列表数据
       userList: [],
+      projectOptions:[],
       // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize: 10,
         keyword: null,
+        projectId: null,
         status: 2
       },
       selectUser: []
@@ -123,6 +135,9 @@ export default {
   },
   created() {
     this.getList();
+    this.getDicts("sys_course_project").then(response => {
+      this.projectOptions = response.data;
+    });
   },
   methods: {
     /** 查询客户列表 */