Przeglądaj źródła

Merge branch 'master' into bjcz_his_scrm

# Conflicts:
#	src/views/components/course/userCourseCatalogDetails.vue
#	src/views/course/coursePlaySourceConfig/index.vue
#	src/views/course/courseWatchLog/index.vue
#	src/views/course/userCourse/index.vue
#	src/views/course/userCoursePeriod/index.vue
#	src/views/his/company/index.vue
#	src/views/hisStore/storeOrder/healthStoreList.vue
#	src/views/hisStore/storeOrder/index.vue
#	src/views/hisStore/storePayment/index.vue
#	src/views/hisStore/storeProduct/index.vue
#	src/views/system/config/config.vue
吴树波 1 miesiąc temu
rodzic
commit
4689ecb50e
100 zmienionych plików z 10464 dodań i 590 usunięć
  1. 5 1
      .env.development
  2. 42 0
      .env.prod-bjzm
  3. 40 0
      .env.prod-cfryt
  4. 40 0
      .env.prod-gzzdy
  5. 40 0
      .env.prod-heyantang
  6. 39 0
      .env.prod-knt2
  7. 40 0
      .env.prod-sczy
  8. 6 3
      .env.prod-sft
  9. 4 2
      .env.prod-test
  10. 40 0
      .env.prod-yxj
  11. 33 4
      .env.production
  12. 3 0
      .gitignore
  13. 8 0
      package.json
  14. 19 0
      src/api/company/company.js
  15. 8 1
      src/api/company/companyConfig.js
  16. 192 0
      src/api/company/companyUserAll.js
  17. 9 0
      src/api/course/courseQuestionBank.js
  18. 17 1
      src/api/course/courseTrafficLog.js
  19. 8 0
      src/api/course/qw/courseWatchLog.js
  20. 53 0
      src/api/course/statistics.js
  21. 19 0
      src/api/course/userCourse.js
  22. 26 0
      src/api/course/userCourseVideo.js
  23. 152 0
      src/api/doctor/doctor.js
  24. 24 0
      src/api/his/company.js
  25. 10 1
      src/api/his/divItem.js
  26. 54 0
      src/api/his/integralOrder.js
  27. 53 0
      src/api/his/storeActivity.js
  28. 9 0
      src/api/his/user.js
  29. 1 1
      src/api/hisStore/city.js
  30. 9 0
      src/api/hisStore/storeOrder.js
  31. 7 0
      src/api/hisStore/storeProduct.js
  32. 62 0
      src/api/live/gift.js
  33. 84 1
      src/api/live/live.js
  34. 102 0
      src/api/live/liveAfterSales.js
  35. 1 1
      src/api/live/liveAfterSalesItem.js
  36. 1 1
      src/api/live/liveAfterSalesLogs.js
  37. 0 53
      src/api/live/liveAfteraSales.js
  38. 1 1
      src/api/live/liveAnchor.js
  39. 0 53
      src/api/live/liveCart.js
  40. 136 0
      src/api/live/liveCoupon.js
  41. 63 0
      src/api/live/liveCouponIssue.js
  42. 53 0
      src/api/live/liveCouponIssueUser.js
  43. 53 0
      src/api/live/liveCouponUser.js
  44. 15 0
      src/api/live/liveData.js
  45. 53 0
      src/api/live/liveEventConf.js
  46. 44 1
      src/api/live/liveGoods.js
  47. 62 0
      src/api/live/liveLotteryConf.js
  48. 61 0
      src/api/live/liveLotteryProductConf.js
  49. 53 0
      src/api/live/liveLotteryRecord.js
  50. 53 0
      src/api/live/liveLotteryRegistration.js
  51. 9 1
      src/api/live/liveMsg.js
  52. 262 3
      src/api/live/liveOrder.js
  53. 0 53
      src/api/live/liveOrderItem.js
  54. 1 1
      src/api/live/liveOrderLogs.js
  55. 35 0
      src/api/live/liveOrderPayment.js
  56. 1 1
      src/api/live/liveOrderStatus.js
  57. 19 19
      src/api/live/liveOrderitems.js
  58. 1 1
      src/api/live/liveQuestion.js
  59. 89 0
      src/api/live/liveQuestionLive.js
  60. 64 0
      src/api/live/liveRedConf.js
  61. 19 0
      src/api/live/liveRewardRecord.js
  62. 53 0
      src/api/live/liveTrafficLog.js
  63. 63 0
      src/api/live/liveUserLotteryRecord.js
  64. 53 0
      src/api/live/liveUserRedRecord.js
  65. 7 0
      src/api/live/liveVideo.js
  66. 25 0
      src/api/live/liveWatchUser.js
  67. 87 0
      src/api/live/task.js
  68. 53 0
      src/api/live/words.js
  69. 86 0
      src/api/qw/applyIpad.js
  70. 17 0
      src/api/qw/qwDept.js
  71. 9 0
      src/api/qw/qwIpadServer.js
  72. 7 0
      src/api/qw/user.js
  73. 275 0
      src/api/store/storeOrder.js
  74. BIN
      src/assets/images/videoIsAudit.png
  75. BIN
      src/assets/images/videoNotStart.png
  76. BIN
      src/assets/logo/bjzmky.png
  77. BIN
      src/assets/logo/cdhyt.jpg
  78. BIN
      src/assets/logo/cfryt.png
  79. BIN
      src/assets/logo/gzzdy_logo.png
  80. BIN
      src/assets/logo/sczy.png
  81. BIN
      src/assets/logo/yxj.jpg
  82. 493 0
      src/components/City/indexZm.vue
  83. 139 0
      src/components/Editor/wangZm.vue
  84. 282 0
      src/components/LiveVideoUpload/index.vue
  85. 493 0
      src/components/LiveVideoUpload/single.vue
  86. 2 1
      src/components/TreeSelect/index.vue
  87. 10 12
      src/router/index.js
  88. 40 1
      src/store/index.js
  89. 111 0
      src/utils/liveWS.js
  90. 6 1
      src/utils/obs.js
  91. 48 0
      src/utils/util.js
  92. 3 0
      src/views/chat/chatSession/index.vue
  93. 4 5
      src/views/company/companyMoneyLogs/index.vue
  94. 1 1
      src/views/company/companyRecharge/index.vue
  95. 1692 0
      src/views/company/companyUser/indexAll.vue
  96. 253 0
      src/views/company/components/selectQwUser.vue
  97. 410 102
      src/views/components/course/userCourseCatalogDetails.vue
  98. 950 263
      src/views/components/his/integralOrderDetails.vue
  99. 2313 0
      src/views/components/index/statisticsDashboard.vue
  100. 72 0
      src/views/components/index/welcomePage.vue

+ 5 - 1
.env.development

@@ -27,8 +27,12 @@ VUE_APP_VIDEO_LINE_1 = https://xfktcpv.ylrzcloud.com
 # 线路二地址
 VUE_APP_VIDEO_LINE_2 = https://xfkobs.ylrztop.com
 
+
+VUE_APP_LIVE_WS_URL = ws://127.0.0.1:7114/ws
+
+
 # 开发环境配置
-ENV = 'production'
+ENV = 'development'
 
 # FS管理系统/开发环境
 VUE_APP_BASE_API = '/prod-api'

+ 42 - 0
.env.prod-bjzm

@@ -0,0 +1,42 @@
+# 页面标题
+VUE_APP_TITLE =北京卓美悦康直播管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =卓美悦康直播系统
+# 公司名称
+VUE_APP_COMPANY_NAME =北京卓美悦康
+# ICP备案号
+VUE_APP_ICP_RECORD =京ICP备2024068752号
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/bjzmky.png
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://bjzmobs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = bjzm
+# 存储桶配置
+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_2 = https://bjzmobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'production'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true
+
+VUE_APP_LIVE_WS_URL = wss://ws.klbycp.com/ws

+ 40 - 0
.env.prod-cfryt

@@ -0,0 +1,40 @@
+# 页面标题
+VUE_APP_TITLE =赤峰润元堂
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =赤峰润元堂
+# 公司名称
+VUE_APP_COMPANY_NAME =赤峰润元堂健康咨询有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =蒙ICP备2024019526号-1
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/cfryt.png
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = cfryt-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = cfryt-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://cfrytcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://cqtytobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'production'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 40 - 0
.env.prod-gzzdy

@@ -0,0 +1,40 @@
+# 页面标题
+VUE_APP_TITLE =郑多燕总管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =郑多燕管理系统
+# 公司名称
+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
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = gzzdy1-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = gzzdy-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://gzzdytcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://gzzdyobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'development'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 40 - 0
.env.prod-heyantang

@@ -0,0 +1,40 @@
+# 页面标题
+VUE_APP_TITLE =成都鹤颜堂健康管理
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =成都鹤颜堂健康管理
+# 公司名称
+VUE_APP_COMPANY_NAME =成都御养堂健康管理有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =蜀ICP备2024054506号-51
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/cdhyt.jpg
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = cdhyt-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = cdhyt-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://cdhyttcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://cdhytobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'production'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 39 - 0
.env.prod-knt2

@@ -0,0 +1,39 @@
+# 页面标题
+VUE_APP_TITLE = 康年堂SCRM管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX = 康年堂
+# 公司名称
+VUE_APP_COMPANY_NAME = 陕西康年堂医药连锁有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD = 陕ICP备2023011686号-5
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/knt.jpg
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = jnmy-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = jnmy-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://jnmytcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://jnmyobs.ylrztop.com
+# 生产环境配置
+ENV = 'production'
+
+#FS管理系统/生产环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 40 - 0
.env.prod-sczy

@@ -0,0 +1,40 @@
+# 页面标题
+VUE_APP_TITLE =致医总管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =致医管理系统
+# 公司名称
+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/sczy.png
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = sczy-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = sczy-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://sczycpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://sczyobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'development'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 6 - 3
.env.prod-sft

@@ -17,13 +17,16 @@ VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
 # 存储桶配置
 VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
 # 存储桶配置
-VUE_APP_OBS_BUCKET = sft-hw079058881
+#VUE_APP_COS_BUCKET = sft-1361917636
+VUE_APP_COS_BUCKET = cqsft-1323137866
 # 存储桶配置
-VUE_APP_COS_BUCKET = sft-1323137866
+VUE_APP_OBS_BUCKET = sft-hw079058881
 # 存储桶配置
 VUE_APP_COS_REGION = ap-chongqing
+
 # 线路一地址
-VUE_APP_VIDEO_LINE_1 = https://sfttcpv.ylrzcloud.com
+#VUE_APP_VIDEO_LINE_1 = https://video.sft12.cn
+VUE_APP_VIDEO_LINE_1 = https://cqsfttcpv.ylrzcloud.com
 # 线路二地址
 VUE_APP_VIDEO_LINE_2 = https://sftobs.ylrztop.com
 

+ 4 - 2
.env.prod-test

@@ -27,13 +27,15 @@ VUE_APP_VIDEO_LINE_1 = https://myhktcpv.ylrzcloud.com
 # 线路二地址
 VUE_APP_VIDEO_LINE_2 = https://myhkobs.ylrztop.com
 
- 
+
 
 # 开发环境配置
 ENV = 'development'
 
 # FS管理系统/开发环境
-VUE_APP_BASE_API = '/prod-api'
+VUE_APP_BASE_API = '/admin-api'
+
+VUE_APP_LIVE_WS_URL = ws://127.0.0.1:7114/ws
 
 #默认 1、会员 2、企微
 VUE_APP_COURSE_DEFAULT = 1

+ 40 - 0
.env.prod-yxj

@@ -0,0 +1,40 @@
+# 页面标题
+VUE_APP_TITLE =易行健总管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =易行健管理系统
+# 公司名称
+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/yxj.jpg
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = whyxj-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = yxj-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://yxjtcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://whyxjobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'development'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 33 - 4
.env.production

@@ -1,8 +1,37 @@
+#弘珍医药互联网医院管理系统/生产环境
+VUE_APP_BASE_API = '/admin-api'
+
+
+# 公司名称
+VUE_APP_COMPANY_NAME =重庆云联融智科技有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =蜀ICP备2023036719号
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/logo.png
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = zkzh-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = fs-1319721001
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://cos.his.cdwjyyh.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://zkzhobs.ylrztop.com
+
+
 # 页面标题
 VUE_APP_TITLE = 弘珍医药互联网医院管理系统
 
-# 生产环境配置
-ENV = 'production'
+VUE_APP_LIVE_WS_URL = ws://127.0.0.1:7114/ws
 
-#弘珍医药互联网医院管理系统/生产环境
-VUE_APP_BASE_API = '/prod-api'
+# 开发环境配置
+ENV = 'production'

+ 3 - 0
.gitignore

@@ -25,3 +25,6 @@ pnpm-debug.log*
 
 package-lock.json
 yarn.lock
+
+# AGENTS.md - 项目指导文档,不上传到远程仓库
+AGENTS.md

+ 8 - 0
package.json

@@ -15,11 +15,13 @@
     "build:prod-myhk": "vue-cli-service build --mode prod-myhk",
     "build:prod-nmgyt": "vue-cli-service build --mode prod-nmgyt",
     "build:prod-cqtyt": "vue-cli-service build --mode prod-cqtyt",
+    "build:prod-heyantang": "vue-cli-service build --mode prod-heyantang",
     "build:prod-bly": "vue-cli-service build --mode prod-bly",
     "build:prod-sxjz": "vue-cli-service build --mode prod-sxjz",
     "build:prod-xfk": "vue-cli-service build --mode prod-xfk",
     "build:prod-jnmy": "vue-cli-service build --mode prod-jnmy",
     "build:prod-knt": "vue-cli-service build --mode prod-knt",
+    "build:prod-knt2": "vue-cli-service build --mode prod-knt2",
     "build:prod-hdt": "vue-cli-service build --mode prod-hdt",
     "build:prod-yzt": "vue-cli-service build --mode prod-yzt",
     "build:prod-fcky": "vue-cli-service build --mode prod-fcky",
@@ -44,7 +46,12 @@
     "build:prod-hst": "vue-cli-service build --mode prod-hst",
     "build:prod-czt": "vue-cli-service build --mode prod-czt",
     "build:prod-hat": "vue-cli-service build --mode prod-hat",
+    "build:prod-sczy": "vue-cli-service build --mode prod-sczy",
     "build:prod-ddgy": "vue-cli-service build --mode prod-ddgy",
+    "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",
+    "build:prod-cfryt": "vue-cli-service build --mode prod-cfryt",
     "preview": "node build/index.js --preview",
     "lint": "eslint --ext .js,.vue src"
   },
@@ -85,6 +92,7 @@
     "file-saver": "2.0.4",
     "fuse.js": "6.4.3",
     "highlight.js": "9.18.5",
+    "hls.js": "^1.6.14",
     "image-conversion": "^2.1.1",
     "js-beautify": "1.13.0",
     "js-cookie": "2.2.1",

+ 19 - 0
src/api/company/company.js

@@ -107,3 +107,22 @@ export function getCitysArea(query) {
     params: query
   })
 }
+
+// 批量修改公司显示状态
+export function batchUpdateCompanyLiveShow(data) {
+  return request({
+    url: '/company/company/batchUpdateLiveShow',
+    method: 'post',
+    data: data
+  })
+}
+
+// 查询企业列表
+export function liveShowList(query) {
+  return request({
+    url: '/company/company/liveShowList',
+    method: 'get',
+    params: query
+  })
+}
+

+ 8 - 1
src/api/company/companyConfig.js

@@ -9,6 +9,13 @@ export function listCompanyConfig(query) {
   })
 }
 
+export function getConfigByKey(configKey) {
+  return request({
+    url: '/company/companyConfig/getConfigByKey/' + configKey,
+    method: 'get'
+  })
+}
+
 // 查询参数配置详细
 export function getCompanyConfig(configId) {
   return request({
@@ -50,4 +57,4 @@ export function exportCompanyConfig(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 192 - 0
src/api/company/companyUserAll.js

@@ -0,0 +1,192 @@
+import request from '@/utils/request'
+import { praseStrEmpty } from "@/utils/common";
+
+// 查询企微用户列表
+export function qwList(query) {
+  return request({
+    url: '/company/CompanyUserAll/qwList',
+    method: 'get',
+    params: query
+  })
+}
+export function getList(query) {
+  return request({
+    url: '/company/CompanyUserAll/getList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询用户详细
+export function getUser(userId) {
+  return request({
+    url: '/company/CompanyUserAll/' + praseStrEmpty(userId),
+    method: 'get'
+  })
+}
+
+// 查询用户详细
+export function addInfo(companyId) {
+  return request({
+    url: '/company/CompanyUserAll/addInfo/' +companyId,
+    method: 'get'
+  })
+}
+
+
+// 新增用户
+export function addUser(data) {
+  return request({
+    url: '/company/CompanyUserAll',
+    method: 'post',
+    data: data
+  })
+}
+
+//创建二维码
+export function addCodeUrl(data) {
+  return request({
+    url: '/company/CompanyUserAll/addCodeUrl',
+    method: 'post',
+    data: data
+  })
+}
+
+
+// 修改用户
+export function updateUser(data) {
+  return request({
+    url: '/company/CompanyUserAll',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除用户
+export function delUser(userIds) {
+  return request({
+    url: '/company/CompanyUserAll/' + userIds,
+    method: 'delete'
+  })
+}
+
+// 导出用户
+export function exportUser(query) {
+  return request({
+    url: '/company/CompanyUserAll/export',
+    method: 'get',
+    params: query
+  })
+}
+
+// 用户密码重置
+export function resetUserPwd(userId, password) {
+  const data = {
+    userId,
+    password
+  }
+  return request({
+    url: '/company/CompanyUserAll/resetPwd',
+    method: 'put',
+    data: data
+  })
+}
+
+// 用户状态修改
+export function changeUserStatus(userId, status) {
+  const data = {
+    userId,
+    status
+  }
+  return request({
+    url: '/company/CompanyUserAll/changeStatus',
+    method: 'put',
+    data: data
+  })
+}
+
+// 下载用户导入模板
+export function importTemplate() {
+  return request({
+    url: '/company/CompanyUserAll/importTemplate',
+    method: 'get'
+  })
+}
+
+/**
+ * 获取地区
+ */
+export function getCitysAreaList(query) {
+  return request({
+    url: '/company/CompanyUserAll/getCitysAreaList',
+    method: 'get',
+    params: query
+  })
+}
+
+/**
+ * 批量修改 销售的所属区域(临时的)
+ */
+export function updateCompanyUserAreaList(data) {
+  return request({
+    url: '/company/CompanyUserAll/updateCompanyUserAreaList',
+    method: 'post',
+    data: data
+  })
+}
+
+
+//生成域名
+export function generateSubDomain(query){
+  return request({
+    url: '/company/CompanyUserAll/generateSubDomain',
+    method: 'get',
+    params: query
+  })
+}
+
+// 设置是否需要单独注册会员
+export function setIsRegisterMember(status, data) {
+  return request({
+    url: '/company/CompanyUserAll/setRegister',
+    method: 'put',
+    params: status,
+    data: data
+  })
+}
+
+// 开关是否允许所有方式注册会员
+export function isAllowedAllRegister(status, data) {
+  return request({
+    url: '/company/CompanyUserAll/allowedAllRegister',
+    method: 'put',
+    params: status,
+    data: data
+  })
+}
+
+// 绑定医生
+export function bindDoctorId(data) {
+  return request({
+    url: '/company/CompanyUserAll/bindDoctorId',
+    method: 'post',
+    data: data
+  })
+}
+
+//解绑医生
+export function unBindDoctorId(userId) {
+  return request({
+    url: '/company/CompanyUserAll/unBindDoctorId/'+userId,
+    method: 'get'
+  })
+}
+
+//批量修改用户的角色
+export function updateBatchUserRoles(data) {
+  return request({
+    url: '/company/CompanyUserAll/updateBatchUserRoles',
+    method: 'post',
+    data: data
+  })
+}

+ 9 - 0
src/api/course/courseQuestionBank.js

@@ -52,6 +52,15 @@ export function exportCourseQuestionBank(query) {
   })
 }
 
+export function exportFail(data) {
+  return request({
+    url: '/course/courseQuestionBank/exportFail',
+    method: 'post',
+    data: data
+  })
+}
+
+
 // 下载模板
 export function importTemplate() {
   return request({

+ 17 - 1
src/api/course/courseTrafficLog.js

@@ -50,4 +50,20 @@ export function exportCourseTrafficLog(query) {
     method: 'get',
     params: query
   })
-}
+}
+
+export function statisticsSummaryList(query) {
+  return request({
+    url: '/course/courseTrafficLog/statisticsSummaryList',
+    method: 'get',
+    params: query
+  })
+}
+
+export function exportStatisticsSummary(query) {
+  return request({
+    url: '/course/courseTrafficLog/exportStatisticsSummary',
+    method: 'get',
+    params: query
+  })
+}

+ 8 - 0
src/api/course/qw/courseWatchLog.js

@@ -126,3 +126,11 @@ export function listBytrainingCampId(query) {
     params: query
   })
 }
+
+export function getSignProjectName() {
+  return request({
+    url: '/qw/course/courseWatchLog/getSignProjectName',
+    method: 'get'
+  })
+}
+

+ 53 - 0
src/api/course/statistics.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询会员每日看课统计列表
+export function listStatistics(query) {
+  return request({
+    url: '/course/statistics/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询会员每日看课统计详细
+export function getStatistics(id) {
+  return request({
+    url: '/course/statistics/' + id,
+    method: 'get'
+  })
+}
+
+// 新增会员每日看课统计
+export function addStatistics(data) {
+  return request({
+    url: '/course/statistics',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改会员每日看课统计
+export function updateStatistics(data) {
+  return request({
+    url: '/course/statistics',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除会员每日看课统计
+export function delStatistics(id) {
+  return request({
+    url: '/course/statistics/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出会员每日看课统计
+export function exportStatistics(query) {
+  return request({
+    url: '/course/statistics/export',
+    method: 'get',
+    params: query
+  })
+}

+ 19 - 0
src/api/course/userCourse.js

@@ -35,6 +35,16 @@ export function updateUserCourse(data) {
   })
 }
 
+//统一修改课程红包
+export function updateUserCourseRedPage(data) {
+  return request({
+    url: '/course/userCourse/editRedPage',
+    method: 'post',
+    data: data
+  })
+}
+
+
 // 删除课程
 export function delUserCourse(courseId) {
   return request({
@@ -88,3 +98,12 @@ export function pullOff(courseIds) {
     method: 'post'
   })
 }
+
+// 修改课堂配置
+export function editConfig(data) {
+  return request({
+    url: '/course/userCourse/editConfig',
+    method: 'post',
+    data: data
+  })
+}

+ 26 - 0
src/api/course/userCourseVideo.js

@@ -82,6 +82,15 @@ export function delUserCourseVideo(videoId) {
   })
 }
 
+// 同步课程模板
+export function syncTemplate(courseId) {
+  console.log(courseId)
+  return request({
+    url: '/course/userCourse/syncTemplate/' + courseId,
+    method: 'post'
+  })
+}
+
 // 导出课堂视频
 export function exportUserCourseVideo(query) {
   return request({
@@ -92,6 +101,14 @@ export function exportUserCourseVideo(query) {
 }
 
 
+export function getVideoListByCourseIdAll(courseId) {
+  return request({
+    url: '/course/userCourseVideo/getVideoListByCourseIdAll',
+    method: 'get',
+    params: {courseId}
+  })
+}
+
 export function getVideoListByCourseId(query) {
   return request({
     url: '/course/userCourseVideo/getVideoListByCourseId',
@@ -100,6 +117,15 @@ export function getVideoListByCourseId(query) {
   })
 }
 
+export function sortCourseVideo(list) {
+  return request({
+    url: '/course/userCourseVideo/sortCourseVideo',
+    method: 'post',
+    data: list
+  })
+}
+
+
 // 获取选项列表
 export function getVideoListLikeName(query) {
   return request({

+ 152 - 0
src/api/doctor/doctor.js

@@ -0,0 +1,152 @@
+import request from '@/utils/request'
+
+// 查询医生管理列表
+export function listDoctor(query) {
+  return request({
+    url: '/his/doctor/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getUserList(name) {
+  return request({
+    url: '/his/doctor/user/list',
+    method: 'get',
+    params: name
+  })
+}
+export function getFollowDoctorList(query) {
+  return request({
+    url: '/his/doctor/followDoctorList',
+    method: 'get',
+    params: query
+  })
+}
+export function getAllFollowDoctorList(query) {
+  return request({
+    url: '/his/doctor/allFollowDoctorList',
+    method: 'get',
+    params: query
+  })
+}
+export function docList() {
+  return request({
+    url: '/his/doctor/doc/list',
+    method: 'get',
+
+  })
+}
+// 查询医生名称列表
+export function listdocuser(query) {
+  return request({
+    url: '/his/doctor/userdoc/list',
+    method: 'get',
+    params: query
+  })
+}
+export function getDoctorPrice(doctorId) {
+  return request({
+    url: '/his/price/getDoctorPrice/' + doctorId,
+    method: 'get'
+  })
+}
+
+
+export function editPassWord(data) {
+  return request({
+    url: '/his/doctor/editPassWord',
+    method: 'put',
+    data: data
+  })
+}
+
+export function editDoctorPrice(data) {
+  return request({
+    url: '/his/price/editDoctorPrice',
+    method: 'post',
+    data: data
+  })
+}
+// 查询医生管理详细
+export function getDoctor(doctorId) {
+  return request({
+    url: '/his/doctor/' + doctorId,
+    method: 'get'
+  })
+}
+// 新增医生管理
+export function addDoctor(data) {
+  return request({
+    url: '/his/doctor',
+    method: 'post',
+    data: data
+  })
+}
+export function editFollow(data) {
+  return request({
+    url: '/his/doctor/editFollow',
+    method: 'put',
+    data: data
+  })
+}
+// 修改医生管理
+export function updateDoctor(data) {
+  return request({
+    url: '/his/doctor',
+    method: 'put',
+    data: data
+  })
+}
+
+// 修改医生管理
+export function editPrice(data) {
+  return request({
+    url: '/his/doctor/editDoctorPrice',
+    method: 'put',
+    data: data
+  })
+}
+
+// 修改医生管理
+export function updateAuditDoctor(data) {
+  return request({
+    url: '/his/doctor/editDoctor',
+    method: 'put',
+    data: data
+  })
+}
+
+
+// 删除医生管理
+export function delDoctor(doctorId) {
+  return request({
+    url: '/his/doctor/' + doctorId,
+    method: 'delete'
+  })
+}
+
+// 导出医生管理
+export function getWxaCodeUnLimit() {
+  return request({
+    url: '/his/doctor/getWxaCodeUnLimit',
+    method: 'get',
+  })
+}
+// 导出医生管理
+export function exportDoctor(query) {
+  return request({
+    url: '/his/doctor/export',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询医生管理列表
+export function listDoctorVO(query) {
+  return request({
+    url: '/his/doctor/getDocVoList',
+    method: 'get',
+    params: query
+  })
+}

+ 24 - 0
src/api/his/company.js

@@ -29,6 +29,14 @@ export function deduct(data) {
     data: data
   })
 }
+
+export function redDeduct(data) {
+  return request({
+    url: '/his/company/redDeduct',
+    method: 'post',
+    data: data
+  })
+}
 export function recharge(data) {
   return request({
     url: '/his/company/recharge',
@@ -36,6 +44,15 @@ export function recharge(data) {
     data: data
   })
 }
+// 红包充值
+export function redRecharge(data) {
+  return request({
+    url: '/his/company/redRecharge',
+    method: 'post',
+    data: data
+  })
+}
+
 
 // 新增诊所管理
 export function addCompany(data) {
@@ -88,3 +105,10 @@ export function setDiv(data) {
     data: data
   })
 }
+export function exitMiniProgram(data) {
+  return request({
+    url: '/his/company/exitMiniProgram',
+    method: 'post',
+    data: data
+  })
+}

+ 10 - 1
src/api/his/divItem.js

@@ -50,4 +50,13 @@ export function exportDivItem(query) {
     method: 'get',
     params: query
   })
-}
+}
+
+// 延迟分账确认
+export function confirm(data) {
+  return request({
+    url: '/his/divItem/confirm',
+    method: 'post',
+    data: data
+  })
+}

+ 54 - 0
src/api/his/integralOrder.js

@@ -87,3 +87,57 @@ export function cancelOrder(orderCode) {
     data: {orderCode}
   })
 }
+//申请退款
+export function mandatoryRefunds(orderCode) {
+  return request({
+    url: '/his/integralOrder/mandatoryRefunds',
+    method: 'post',
+    data: {orderCode}
+  })
+}
+
+// 确认收货
+export function finishOrder(orderCode) {
+  return request({
+    url: '/his/integralOrder/finishOrder/' + orderCode,
+    method: 'get'
+  })
+}
+//数据分捡
+export function batchSetErpOrder(params) {
+  return request({
+    url: '/his/integralOrder/batchSetErpOrder',
+    method: 'post',
+    data: params
+  })
+}
+//数据分捡
+export function batchCreateErpOrder(params) {
+  return request({
+    url: '/his/integralOrder/batchCreateErpOrder',
+    method: 'post',
+    data: params
+  })
+}
+//获取城市
+export function getCitys(){
+  return request({
+    url: '/his/city/getCitys',
+    method: 'get'
+  })
+}
+//获取模版
+export function getIntegralTemplate(){
+  return request({
+    url: '/his/integralOrder/importUpdateOrderTemplate',
+    method: 'get'
+  })
+}
+
+// 获取订单操作记录
+export function getOrderLogs(orderId) {
+  return request({
+    url: '/his/logs/order/' + orderId,
+    method: 'get'
+  })
+}

+ 53 - 0
src/api/his/storeActivity.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询活动列表
+export function listStoreActivity(query) {
+  return request({
+    url: '/his/storeActivity/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询活动详细
+export function getStoreActivity(activityId) {
+  return request({
+    url: '/his/storeActivity/' + activityId,
+    method: 'get'
+  })
+}
+
+// 新增活动
+export function addStoreActivity(data) {
+  return request({
+    url: '/his/storeActivity',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改活动
+export function updateStoreActivity(data) {
+  return request({
+    url: '/his/storeActivity',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除活动
+export function delStoreActivity(activityId) {
+  return request({
+    url: '/his/storeActivity/' + activityId,
+    method: 'delete'
+  })
+}
+
+// 导出活动
+export function exportStoreActivity(query) {
+  return request({
+    url: '/his/storeActivity/export',
+    method: 'get',
+    params: query
+  })
+}

+ 9 - 0
src/api/his/user.js

@@ -142,3 +142,12 @@ export function delUserCompanyUser(id) {
     method: 'delete'
   })
 }
+
+// 解绑会员看课的会员和销售的关系
+export function batchUnbindUser(data) {
+  return request({
+    url: '/his/user/batchUnbind',
+    method: 'delete',
+    data: data
+  })
+}

+ 1 - 1
src/api/hisStore/city.js

@@ -10,7 +10,7 @@ export function listCity(query) {
 }
 export function getAllList(query) {
   return request({
-    url: '/store/city/getAllList',
+    url: '/his/city/getAllList',
     method: 'get',
     params: query
   })

+ 9 - 0
src/api/hisStore/storeOrder.js

@@ -395,3 +395,12 @@ export function getErpAccount() {
     method: 'get'
   })
 }
+
+// 导出发货单
+export function healthExportShippingOrder(query) {
+  return request({
+    url: '/store/store/storeOrder/healthExportShippingOrder',
+    method: 'get',
+    params: query
+  })
+}

+ 7 - 0
src/api/hisStore/storeProduct.js

@@ -57,6 +57,13 @@ export function delStoreProduct(productId) {
     method: 'delete'
   })
 }
+// 复制商品
+export function copyStoreProduct(productId) {
+  return request({
+    url: '/store/store/storeProduct/copyStoreProduct?productId=' + productId,
+    method: 'get'
+  })
+}
 
 // 批量复制商品
 export function bulkCopy(productId) {

+ 62 - 0
src/api/live/gift.js

@@ -0,0 +1,62 @@
+import request from '@/utils/request'
+
+// 查询直播间礼物配置列表
+export function listGift(query) {
+  return request({
+    url: '/live/gift/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询直播间礼物配置详细
+export function getGift(giftId) {
+  return request({
+    url: '/live/gift/' + giftId,
+    method: 'get'
+  })
+}
+
+// 新增直播间礼物配置
+export function addGift(data) {
+  return request({
+    url: '/live/gift',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改直播间礼物配置
+export function updateGift(data) {
+  return request({
+    url: '/live/gift',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除直播间礼物配置
+export function delGift(giftId) {
+  return request({
+    url: '/live/gift/' + giftId,
+    method: 'delete'
+  })
+}
+
+// 导出直播间礼物配置
+export function exportGift(query) {
+  return request({
+    url: '/live/gift/export',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 查询直播间礼物配置详细
+export function getDictData(dictType) {
+  return request({
+    url: '/system/dict/data/type/' + dictType,
+    method: 'get'
+  })
+}

+ 84 - 1
src/api/live/live.js

@@ -50,4 +50,87 @@ export function exportLive(query) {
     method: 'get',
     params: query
   })
-}
+}
+
+export function selectLiveToStudent(query) {
+  return request({
+    url: '/live/live/selectLiveToStudent',
+    method: 'post',
+    data: query
+  })
+}
+
+export function selectCompanyTalent() {
+  return request({
+    url: '/live/live/selectCompanyTalent',
+    method: 'get'
+  })
+}
+
+export function getLivingUrl(liveId) {
+  return request({
+    url: '/live/live/living/' + liveId,
+    method: 'get'
+  })
+}
+
+export function updateLiveIsAudit(data) {
+  return request({
+    url: '/live/live/updateLiveIsAudit' ,
+    method: 'post',
+    data: data
+  })
+}
+
+//上下架视频
+export function handleShelfOrUn(data) {
+  return request({
+    url: '/live/live/handleShelfOrUn',
+    method: 'post',
+    data: data
+  })
+}
+
+
+export function handleDeleteSelected(data) {
+  return request({
+    url: '/live/live/handleDeleteSelected',
+    method: 'post',
+    data: data
+  })
+}
+
+export function verifyIdInfo(data) {
+  return request({
+    url: '/live/live/verifyIdInfo',
+    method: 'post',
+    data: data
+  })
+}
+
+// 结束录播直播间
+export function finishLive(data) {
+  return request({
+    url: '/live/live/finishLive',
+    method: 'get',
+    params: data
+  })
+}
+
+// 结束录播直播间
+export function startLive(data) {
+  return request({
+    url: '/live/live/startLive',
+    method: 'get',
+    params: data
+  })
+}
+
+// 复制录播直播间
+export function copyLive(data) {
+  return request({
+    url: '/live/live/copyLive',
+    method: 'get',
+    params: data
+  })
+}

+ 102 - 0
src/api/live/liveAfterSales.js

@@ -0,0 +1,102 @@
+import request from '@/utils/request'
+
+// 查询售后记录列表
+export function listLiveAfterSales(query) {
+  return request({
+    url: '/live/liveAfterSales/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询售后记录详细
+export function getLiveAfterSales(id) {
+  return request({
+    url: '/live/liveAfterSales/' + id,
+    method: 'get'
+  })
+}
+
+// 新增售后记录
+export function addLiveAfterSales(data) {
+  return request({
+    url: '/live/liveAfterSales',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改售后记录
+export function updateLiveAfterSales(data) {
+  return request({
+    url: '/live/liveAfterSales',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除售后记录
+export function delLiveAfterSales(id) {
+  return request({
+    url: '/live/liveAfterSales/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出售后记录
+export function exportLiveAfterSales(query) {
+  return request({
+    url: '/live/liveAfterSales/export',
+    method: 'get',
+    params: query
+  })
+}
+
+export function cancel(data) {
+  return request({
+    url: '/live/liveAfterSales/cancel',
+    method: 'post',
+    data: data
+  })
+}
+
+export function refund(data) {
+  return request({
+    url: '/live/liveAfterSales/refund',
+    method: 'post',
+    data: data
+  })
+}
+
+export function audit(data) {
+  return request({
+    url: '/live/liveAfterSales/audit',
+    method: 'post',
+    data: data
+  })
+}
+
+export function audit1(data) {
+  return request({
+    url: '/live/liveAfterSales/audit1',
+    method: 'post',
+    data: data
+  })
+}
+export function audit2(data) {
+  return request({
+    url: '/live/liveAfterSales/audit2',
+    method: 'post',
+    data: data
+  })
+}
+
+export function handleImmediatelyRefund(data) {
+  return request({
+    url: '/live/liveAfterSales/handleImmediatelyRefund',
+    method: 'post',
+    data: data
+  })
+}
+
+

+ 1 - 1
src/api/live/liveAfterSalesItem.js

@@ -50,4 +50,4 @@ export function exportLiveAfterSalesItem(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 1 - 1
src/api/live/liveAfterSalesLogs.js

@@ -50,4 +50,4 @@ export function exportLiveAfterSalesLogs(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 0 - 53
src/api/live/liveAfteraSales.js

@@ -1,53 +0,0 @@
-import request from '@/utils/request'
-
-// 查询售后记录列表
-export function listLiveAfteraSales(query) {
-  return request({
-    url: '/live/liveAfteraSales/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询售后记录详细
-export function getLiveAfteraSales(id) {
-  return request({
-    url: '/live/liveAfteraSales/' + id,
-    method: 'get'
-  })
-}
-
-// 新增售后记录
-export function addLiveAfteraSales(data) {
-  return request({
-    url: '/live/liveAfteraSales',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改售后记录
-export function updateLiveAfteraSales(data) {
-  return request({
-    url: '/live/liveAfteraSales',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除售后记录
-export function delLiveAfteraSales(id) {
-  return request({
-    url: '/live/liveAfteraSales/' + id,
-    method: 'delete'
-  })
-}
-
-// 导出售后记录
-export function exportLiveAfteraSales(query) {
-  return request({
-    url: '/live/liveAfteraSales/export',
-    method: 'get',
-    params: query
-  })
-}

+ 1 - 1
src/api/live/liveAnchor.js

@@ -50,4 +50,4 @@ export function exportLiveAnchor(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 0 - 53
src/api/live/liveCart.js

@@ -1,53 +0,0 @@
-import request from '@/utils/request'
-
-// 查询购物车列表
-export function listLiveCart(query) {
-  return request({
-    url: '/live/liveCart/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询购物车详细
-export function getLiveCart(cardId) {
-  return request({
-    url: '/live/liveCart/' + cardId,
-    method: 'get'
-  })
-}
-
-// 新增购物车
-export function addLiveCart(data) {
-  return request({
-    url: '/live/liveCart',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改购物车
-export function updateLiveCart(data) {
-  return request({
-    url: '/live/liveCart',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除购物车
-export function delLiveCart(cardId) {
-  return request({
-    url: '/live/liveCart/' + cardId,
-    method: 'delete'
-  })
-}
-
-// 导出购物车
-export function exportLiveCart(query) {
-  return request({
-    url: '/live/liveCart/export',
-    method: 'get',
-    params: query
-  })
-}

+ 136 - 0
src/api/live/liveCoupon.js

@@ -0,0 +1,136 @@
+import request from '@/utils/request'
+
+// 查询优惠券列表
+export function listStoreCoupon(query) {
+  return request({
+    url: '/live/coupon/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询优惠券详细
+export function getStoreCoupon(couponId) {
+  return request({
+    url: '/live/coupon/' + couponId,
+    method: 'get'
+  })
+}
+
+// 新增优惠券
+export function addStoreCoupon(data) {
+  return request({
+    url: '/live/coupon',
+    method: 'post',
+    data: data
+  })
+}
+export function publishCoupon(data) {
+  return request({
+    url: '/live/coupon/publish',
+    method: 'post',
+    data: data
+  })
+}
+
+export function batchPublishCoupon(data) {
+  return request({
+    url: '/live/coupon/batchPublish',
+    method: 'post',
+    data: data
+  })
+}
+
+
+
+// 修改优惠券
+export function updateStoreCoupon(data) {
+  return request({
+    url: '/live/coupon',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除优惠券
+export function delStoreCoupon(couponId) {
+  return request({
+    url: '/live/coupon/' + couponId,
+    method: 'delete'
+  })
+}
+
+// 导出优惠券
+export function exportStoreCoupon(query) {
+  return request({
+    url: '/live/coupon/export',
+    method: 'get',
+    params: query
+  })
+}
+
+export function listLiveCoupon(query) {
+  return request({
+    url: '/live/coupon/listLiveCoupon',
+    method: 'get',
+    params: query
+  })
+}
+
+export function listCoupon(query) {
+  return request({
+    url: '/live/coupon/listCoupon',
+    method: 'get',
+    params: query
+  })
+}
+export function addLiveCoupon(data) {
+  return request({
+    url: '/live/coupon/addLiveCoupon',
+    method: 'post',
+    data: data
+  })
+}
+
+export function handleDeleteSelected(data) {
+  return request({
+    url: '/live/coupon/handleDeleteSelected',
+    method: 'post',
+    data: data
+  })
+}
+
+export function handleIsShowChange(data) {
+  return request({
+    url: '/live/coupon/handleIsShowChange',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除直播商品
+export function delLiveCoupon(data) {
+  return request({
+    url: '/live/coupon/delLiveCoupon',
+    method: 'post',
+    data: data
+  })
+}
+// 删除直播商品
+export function updateLiveCouponBind(data) {
+  return request({
+    url: '/live/coupon/updateLiveCouponBind',
+    method: 'post',
+    data: data
+  })
+}
+
+// 查询直播抽奖配置列表  未开启
+export function listLiveCouponOn(query) {
+  return request({
+    url: '/live/coupon/listOn',
+    method: 'get',
+    params: query
+  })
+}
+

+ 63 - 0
src/api/live/liveCouponIssue.js

@@ -0,0 +1,63 @@
+import request from '@/utils/request'
+
+
+// 查询可用套餐优惠券列表
+export function listAllAvailable(query) {
+  return request({
+    url: '/live/coupon/issue/listAllAvailable',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询优惠券领取列表
+export function listStoreCouponIssue(query) {
+  return request({
+    url: '/live/coupon/issue/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询优惠券领取详细
+export function getStoreCouponIssue(id) {
+  return request({
+    url: '/live/coupon/issue/' + id,
+    method: 'get'
+  })
+}
+
+// 新增优惠券领取
+export function addStoreCouponIssue(data) {
+  return request({
+    url: '/live/coupon/issue',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改优惠券领取
+export function updateStoreCouponIssue(data) {
+  return request({
+    url: '/live/coupon/issue',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除优惠券领取
+export function delStoreCouponIssue(id) {
+  return request({
+    url: '/live/coupon/issue/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出优惠券领取
+export function exportStoreCouponIssue(query) {
+  return request({
+    url: '/live/coupon/issue/export',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
src/api/live/liveCouponIssueUser.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询优惠券用户领取记录列表
+export function listStoreCouponIssueUser(query) {
+  return request({
+    url: '/live/coupon/issue/user/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询优惠券用户领取记录详细
+export function getStoreCouponIssueUser(id) {
+  return request({
+    url: '/live/coupon/issue/user/' + id,
+    method: 'get'
+  })
+}
+
+// 新增优惠券用户领取记录
+export function addStoreCouponIssueUser(data) {
+  return request({
+    url: '/live/coupon/issue/user',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改优惠券用户领取记录
+export function updateStoreCouponIssueUser(data) {
+  return request({
+    url: '/live/coupon/issue/user',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除优惠券用户领取记录
+export function delStoreCouponIssueUser(id) {
+  return request({
+    url: '/live/coupon/issue/user/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出优惠券用户领取记录
+export function exportStoreCouponIssueUser(query) {
+  return request({
+    url: '/live/coupon/issue/user/export',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
src/api/live/liveCouponUser.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询优惠券发放记录列表
+export function listStoreCouponUser(query) {
+  return request({
+    url: '/live/coupon/user/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询优惠券发放记录详细
+export function getStoreCouponUser(id) {
+  return request({
+    url: '/live/coupon/user/' + id,
+    method: 'get'
+  })
+}
+
+// 新增优惠券发放记录
+export function addStoreCouponUser(data) {
+  return request({
+    url: '/live/coupon/user',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改优惠券发放记录
+export function updateStoreCouponUser(data) {
+  return request({
+    url: '/live/coupon/user',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除优惠券发放记录
+export function delStoreCouponUser(id) {
+  return request({
+    url: '/live/coupon/user/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出优惠券发放记录
+export function exportStoreCouponUser(query) {
+  return request({
+    url: '/live/coupon/user/export',
+    method: 'get',
+    params: query
+  })
+}

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

@@ -5,3 +5,18 @@ export function recentLive() {
     method: 'get',
   })
 }
+
+export function dashboardData(liveId) {
+  return request({
+    url: '/liveData/liveData/dashboardData' + '?liveId=' +liveId,
+    method: 'get'
+  })
+}
+
+export function listLiveData(data) {
+  return request({
+    url: '/liveData/liveData/listLiveData',
+    method: 'post',
+    data:data,
+  })
+}

+ 53 - 0
src/api/live/liveEventConf.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询直播触发事件配置列表
+export function listLiveEventConf(query) {
+  return request({
+    url: '/live/liveEventConf/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询直播触发事件配置详细
+export function getLiveEventConf(eventId) {
+  return request({
+    url: '/live/liveEventConf/' + eventId,
+    method: 'get'
+  })
+}
+
+// 新增直播触发事件配置
+export function addLiveEventConf(data) {
+  return request({
+    url: '/live/liveEventConf',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改直播触发事件配置
+export function updateLiveEventConf(data) {
+  return request({
+    url: '/live/liveEventConf',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除直播触发事件配置
+export function delLiveEventConf(eventId) {
+  return request({
+    url: '/live/liveEventConf/' + eventId,
+    method: 'delete'
+  })
+}
+
+// 导出直播触发事件配置
+export function exportLiveEventConf(query) {
+  return request({
+    url: '/live/liveEventConf/export',
+    method: 'get',
+    params: query
+  })
+}

+ 44 - 1
src/api/live/liveGoods.js

@@ -34,6 +34,14 @@ export function updateLiveGoods(data) {
     data: data
   })
 }
+// 修改直播商品
+export function updateGoodsStock(data) {
+  return request({
+    url: '/live/liveGoods',
+    method: 'put',
+    data: data
+  })
+}
 
 // 删除直播商品
 export function delLiveGoods(goodsId) {
@@ -50,4 +58,39 @@ export function exportLiveGoods(query) {
     method: 'get',
     params: query
   })
-}
+}
+
+// 直播商品
+export function listStoreProduct(data) {
+  return request({
+    url: '/live/liveGoods/liveList',
+    method: 'get',
+    params: data
+  })
+}
+
+//上下架商品
+export function handleShelfOrUn(data) {
+  return request({
+    url: '/live/liveGoods/handleShelfOrUn',
+    method: 'post',
+    data: data
+  })
+}
+
+
+export function handleDeleteSelected(data) {
+  return request({
+    url: '/live/liveGoods/handleDeleteSelected',
+    method: 'post',
+    data: data
+  })
+}
+
+export function handleIsShowChange(data) {
+  return request({
+    url: '/live/liveGoods/handleIsShowChange',
+    method: 'post',
+    data: data
+  })
+}

+ 62 - 0
src/api/live/liveLotteryConf.js

@@ -0,0 +1,62 @@
+import request from '@/utils/request'
+
+// 查询直播抽奖配置列表
+export function listLiveLotteryConf(query) {
+  return request({
+    url: '/live/liveLotteryConf/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询直播抽奖配置详细
+export function getLiveLotteryConf(lotteryId) {
+  return request({
+    url: '/live/liveLotteryConf/' + lotteryId,
+    method: 'get'
+  })
+}
+
+// 新增直播抽奖配置
+export function addLiveLotteryConf(data) {
+  return request({
+    url: '/live/liveLotteryConf',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改直播抽奖配置
+export function updateLiveLotteryConf(data) {
+  return request({
+    url: '/live/liveLotteryConf',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除直播抽奖配置
+export function delLiveLotteryConf(lotteryId) {
+  return request({
+    url: '/live/liveLotteryConf/' + lotteryId,
+    method: 'delete'
+  })
+}
+
+// 导出直播抽奖配置
+export function exportLiveLotteryConf(query) {
+  return request({
+    url: '/live/liveLotteryConf/export',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询直播抽奖配置列表  未开启
+export function listLiveLotteryConfOn(query) {
+  return request({
+    url: '/live/liveLotteryConf/listOn',
+    method: 'get',
+    params: query
+  })
+}

+ 61 - 0
src/api/live/liveLotteryProductConf.js

@@ -0,0 +1,61 @@
+import request from '@/utils/request'
+
+// 查询直播抽奖记录列表
+export function listLiveLotteryProductConf(query) {
+  return request({
+    url: '/live/liveLotteryProductConf/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询直播抽奖记录详细
+export function getLiveLotteryProductConf(id) {
+  return request({
+    url: '/live/liveLotteryProductConf/' + id,
+    method: 'get'
+  })
+}
+
+//查询抽奖商品列表
+export function listStoreProduct(query) {
+  return request({
+    url: '/live/liveLotteryConf/getGoods/'+query,
+    method: 'get'
+  })
+}
+
+// 新增直播抽奖记录
+export function addLiveLotteryProductConf(data) {
+  return request({
+    url: '/live/liveLotteryProductConf',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改直播抽奖记录
+export function updateLiveLotteryProductConf(data) {
+  return request({
+    url: '/live/liveLotteryConf/product',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除直播抽奖记录
+export function delLiveLotteryProductConf(id) {
+  return request({
+    url: '/live/liveLotteryProductConf/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出直播抽奖记录
+export function exportLiveLotteryProductConf(query) {
+  return request({
+    url: '/live/liveLotteryProductConf/export',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
src/api/live/liveLotteryRecord.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询直播抽奖记录列表
+export function listLiveLotteryRecord(query) {
+  return request({
+    url: '/live/liveLotteryRecord/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询直播抽奖记录详细
+export function getLiveLotteryRecord(lotteryId) {
+  return request({
+    url: '/live/liveLotteryRecord/' + lotteryId,
+    method: 'get'
+  })
+}
+
+// 新增直播抽奖记录
+export function addLiveLotteryRecord(data) {
+  return request({
+    url: '/live/liveLotteryRecord',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改直播抽奖记录
+export function updateLiveLotteryRecord(data) {
+  return request({
+    url: '/live/liveLotteryRecord',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除直播抽奖记录
+export function delLiveLotteryRecord(lotteryId) {
+  return request({
+    url: '/live/liveLotteryRecord/' + lotteryId,
+    method: 'delete'
+  })
+}
+
+// 导出直播抽奖记录
+export function exportLiveLotteryRecord(query) {
+  return request({
+    url: '/live/liveLotteryRecord/export',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
src/api/live/liveLotteryRegistration.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询直播抽奖登记列表
+export function listLiveLotteryRegistration(query) {
+  return request({
+    url: '/live/liveLotteryRegistration/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询直播抽奖登记详细
+export function getLiveLotteryRegistration(registrationId) {
+  return request({
+    url: '/live/liveLotteryRegistration/' + registrationId,
+    method: 'get'
+  })
+}
+
+// 新增直播抽奖登记
+export function addLiveLotteryRegistration(data) {
+  return request({
+    url: '/live/liveLotteryRegistration',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改直播抽奖登记
+export function updateLiveLotteryRegistration(data) {
+  return request({
+    url: '/live/liveLotteryRegistration',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除直播抽奖登记
+export function delLiveLotteryRegistration(registrationId) {
+  return request({
+    url: '/live/liveLotteryRegistration/' + registrationId,
+    method: 'delete'
+  })
+}
+
+// 导出直播抽奖登记
+export function exportLiveLotteryRegistration(query) {
+  return request({
+    url: '/live/liveLotteryRegistration/export',
+    method: 'get',
+    params: query
+  })
+}

+ 9 - 1
src/api/live/liveMsg.js

@@ -8,6 +8,14 @@ export function listLiveMsg(query) {
     params: query
   })
 }
+// 查询直播讨论列表
+export function listLiveSingleMsg(query) {
+  return request({
+    url: '/live/liveMsg/singleList',
+    method: 'get',
+    params: query
+  })
+}
 
 // 查询直播讨论详细
 export function getLiveMsg(msgId) {
@@ -50,4 +58,4 @@ export function exportLiveMsg(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 262 - 3
src/api/live/liveOrder.js

@@ -9,14 +9,39 @@ export function listLiveOrder(query) {
   })
 }
 
+// 查询订单列表
+export function listLiveOrderZm(query) {
+  return request({
+    url: '/live/liveOrder/listZm',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询订单详细
 export function getLiveOrder(orderId) {
   return request({
-    url: '/live/liveOrder/' + orderId,
+    url: '/live/liveOrder/info/' + orderId,
     method: 'get'
   })
 }
 
+// 推广金额
+export function tuiMoneyLogs(orderId){
+  return request({
+    url: '/live/liveOrder/tuiMoneyLogs?orderId='+orderId,
+    method: 'get',
+  })
+}
+// 获取订单支付记录
+export function getOrderPayments(orderId){
+  return request({
+    url: '/live/liveOrder/payments/'+orderId,
+    method: 'get'
+  })
+}
+
+
 // 新增订单
 export function addLiveOrder(data) {
   return request({
@@ -29,7 +54,7 @@ export function addLiveOrder(data) {
 // 修改订单
 export function updateLiveOrder(data) {
   return request({
-    url: '/live/liveOrder',
+    url: '/live/liveOrder/update',
     method: 'put',
     data: data
   })
@@ -50,4 +75,238 @@ export function exportLiveOrder(query) {
     method: 'get',
     params: query
   })
-}
+}
+
+// 导出订单
+export function exportLiveOrderZm(query) {
+  return request({
+    url: '/live/liveOrder/exportZm',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getExpress(data) {
+  return request({
+    url: '/live/liveOrder/getExpressByDeliverId',
+    method: 'post',
+    data: data
+  })
+}
+
+export function editDeliveryId(data){
+  return request({
+    url: '/live/liveOrder/editDeliveryId',
+    method: 'put',
+    data: data
+  })
+}
+
+// 获取表格 时间粒度
+export function getLiveOrderTimeGranularity(query) {
+  return request({
+    url: '/live/liveOrder/getLiveOrderTimeGranularity',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 同步快递信息
+export function syncExpress(orderId) {
+  return request({
+    url: '/live/liveOrder/syncExpress/' + orderId,
+    method: 'get'
+  })
+}
+
+
+
+export function listOrderitem(orderId) {
+  return request({
+    url: '/live/liveOrder/ltemlist/' + orderId,
+    method: 'get'
+  })
+}
+
+export function tuiOrder(data) {
+  return request({
+    url: '/live/liveOrder/tuiOrder',
+    method: 'put',
+    data: data
+  })
+}
+
+export function refundOrderMoney(data) {
+  return request({
+    url: '/live/liveOrder/refundOrderMoney',
+    method: 'post',
+    data: data
+  })
+}
+
+
+export function getExpressByDeliverId(param) {
+  return request({
+    url: '/live/liveOrder/getExpressByDeliverId',
+    method: 'post',
+    data: param
+  })
+}
+
+/**
+ * 根据订单获取物流信息
+ * @param orderId
+ * @returns {*}
+ */
+export function getByOrderId(orderId){
+  return request({
+    url: '/live/liveOrder/getByOrderId/'+orderId,
+    method: 'get'
+  })
+}
+
+/**
+ * 获取订单日志
+ * @param orderId
+ * @returns {*}
+ */
+export function getOrderLog(orderId){
+  return request({
+    url: '/live/liveOrder/logs/'+orderId,
+    method: 'get'
+  })
+}
+export function getOrderExpress(orderId){
+  return request({
+    url: '/live/liveOrder/express/'+orderId,
+    method: 'get'
+  })
+}
+export function bindCustomer(data) {
+  return request({
+    url: '/live/liveOrder/bindCustomer',
+    method: 'post',
+    data: data
+  })
+}
+// 查询订单详细
+export function getLiveOrderAll(id) {
+  return request({
+    url: '/live/liveOrder/' + id,
+    method: 'get'
+  })
+}
+// 查询订单详细
+export function getLiveOrderAddress(id) {
+  return request({
+    url: '/live/liveOrder/queryAddress/' + id,
+    method: 'get'
+  })
+}
+// 查询电话
+export function getUserPhone(id) {
+  return request({
+    url: '/live/liveOrder/queryPhone/' + id,
+    method: 'get'
+  })
+}
+
+//审核
+export function auditPayRemain(data) {
+  return request({
+    url: '/live/liveOrder/auditPayRemain',
+    method: 'post',
+    data: data
+  })
+}
+
+export function addTuiMoney(data) {
+  return request({
+    url: '/live/liveOrder/addTuiMoney',
+    method: 'post',
+    data: data
+  })
+}
+
+export function syncExpressB(data) {
+  return request({
+    url: '/live/liveOrder/syncExpress',
+    method: 'post',
+    data: data
+  })
+}
+
+export function updateExpress(data) {
+  return request({
+    url: '/live/liveOrder/updateExpress',
+    method: 'post',
+    data: data
+  })
+}
+
+export function getEroOrder(query) {
+  return request({
+    url: '/live/liveOrder/getEroOrder',
+    method: 'get',
+    params: query
+  })
+}
+
+export function editTuiMoney(data) {
+  return request({
+    url: '/live/liveOrder/editTuiMoney',
+    method: 'post',
+    data: data
+  })
+}
+
+export function finishOrder(data) {
+  return request({
+    url: '/live/liveOrder/finishOrder',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改物流编号
+export function updateDeliveryId(data) {
+  return request({
+    url: '/live/liveOrder/editDeliveryId',
+    method: 'put',
+    data: data
+  })
+}
+
+export function createErpOrder(query) {
+  return request({
+    url: '/live/liveOrder/createErpOrder',
+    method: 'get',
+    params: query
+  })
+}
+
+export function updateErp(data) {
+  return request({
+    url: '/live/liveOrder/updateErpOrder',
+    method: 'post',
+    data: data
+  })
+}
+
+
+// 导出发货单
+export function healthExportShippingOrder(query) {
+  return request({
+    url: '/live/liveOrder/healthExportShippingOrder',
+    method: 'get',
+    params: query
+  })
+}
+
+export function importDeliveryNoteExpressTemplate() {
+  return request({
+    url: '/live/liveOrder/importDeliveryNoteExpressTemplate',
+    method: 'get'
+  })
+}

+ 0 - 53
src/api/live/liveOrderItem.js

@@ -1,53 +0,0 @@
-import request from '@/utils/request'
-
-// 查询订单详情列表
-export function listLiveOrderItem(query) {
-  return request({
-    url: '/live/liveOrderItem/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询订单详情详细
-export function getLiveOrderItem(itemId) {
-  return request({
-    url: '/live/liveOrderItem/' + itemId,
-    method: 'get'
-  })
-}
-
-// 新增订单详情
-export function addLiveOrderItem(data) {
-  return request({
-    url: '/live/liveOrderItem',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改订单详情
-export function updateLiveOrderItem(data) {
-  return request({
-    url: '/live/liveOrderItem',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除订单详情
-export function delLiveOrderItem(itemId) {
-  return request({
-    url: '/live/liveOrderItem/' + itemId,
-    method: 'delete'
-  })
-}
-
-// 导出订单详情
-export function exportLiveOrderItem(query) {
-  return request({
-    url: '/live/liveOrderItem/export',
-    method: 'get',
-    params: query
-  })
-}

+ 1 - 1
src/api/live/liveOrderLogs.js

@@ -50,4 +50,4 @@ export function exportLiveOrderLogs(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 35 - 0
src/api/live/liveOrderPayment.js

@@ -0,0 +1,35 @@
+import request from '@/utils/request'
+
+// 查询订单详情列表
+export function listLiveOrderPayments(query) {
+  return request({
+    url: '/live/order/payment',
+    method: 'get',
+    params: query
+  })
+}
+// 查询订单详情列表
+export function exportLiveOrderPayments(query) {
+  return request({
+    url: '/live/order/payment/export',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询支付明细详细
+export function getLivePayment(paymentId) {
+  return request({
+    url: '/live/order/payment/' + paymentId,
+    method: 'get'
+  })
+}
+
+// 修改支付明细
+export function updateLivePayment(data) {
+  return request({
+    url: '/live/order/payment',
+    method: 'put',
+    data: data
+  })
+}

+ 1 - 1
src/api/live/liveOrderStatus.js

@@ -50,4 +50,4 @@ export function exportLiveOrderStatus(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 19 - 19
src/api/live/liveOrderitems.js

@@ -1,53 +1,53 @@
 import request from '@/utils/request'
 
-// 查询订单商品列表
-export function listLiveOrderitems(query) {
+// 查询订单详情列表
+export function listLiveOrderItem(query) {
   return request({
-    url: '/live/liveOrderitems/list',
+    url: '/live/liveOrderItem/list',
     method: 'get',
     params: query
   })
 }
 
-// 查询订单商品详细
-export function getLiveOrderitems(id) {
+// 查询订单详情详细
+export function getLiveOrderItem(itemId) {
   return request({
-    url: '/live/liveOrderitems/' + id,
+    url: '/live/liveOrderItem/' + itemId,
     method: 'get'
   })
 }
 
-// 新增订单商品
-export function addLiveOrderitems(data) {
+// 新增订单详情
+export function addLiveOrderItem(data) {
   return request({
-    url: '/live/liveOrderitems',
+    url: '/live/liveOrderItem',
     method: 'post',
     data: data
   })
 }
 
-// 修改订单商品
-export function updateLiveOrderitems(data) {
+// 修改订单详情
+export function updateLiveOrderItem(data) {
   return request({
-    url: '/live/liveOrderitems',
+    url: '/live/liveOrderItem',
     method: 'put',
     data: data
   })
 }
 
-// 删除订单商品
-export function delLiveOrderitems(id) {
+// 删除订单详情
+export function delLiveOrderItem(itemId) {
   return request({
-    url: '/live/liveOrderitems/' + id,
+    url: '/live/liveOrderItem/' + itemId,
     method: 'delete'
   })
 }
 
-// 导出订单商品
-export function exportLiveOrderitems(query) {
+// 导出订单详情
+export function exportLiveOrderItem(query) {
   return request({
-    url: '/live/liveOrderitems/export',
+    url: '/live/liveOrderItem/export',
     method: 'get',
     params: query
   })
-}
+}

+ 1 - 1
src/api/live/liveQuestion.js

@@ -50,4 +50,4 @@ export function exportLiveQuestion(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 89 - 0
src/api/live/liveQuestionLive.js

@@ -0,0 +1,89 @@
+import request from '@/utils/request'
+
+// 查询直播间题库列表
+export function listLiveQuestionLive(query) {
+    return request({
+        url: '/live/liveQuestionLive/list',
+        method: 'get',
+        params: query
+    })
+}
+
+// 查询直播间可选题库列表
+export function listLiveQuestionOptionList(query) {
+    return request({
+        url: '/live/liveQuestionLive/optionList',
+        method: 'get',
+        params: query
+    })
+}
+
+// 新增直播间题库
+export function addLiveQuestionLive(data) {
+    return request({
+        url: '/live/liveQuestionLive',
+        method: 'post',
+        params: data
+    })
+}
+
+// 删除直播间题库
+export function deleteLiveQuestionLive(data) {
+    return request({
+        url: '/live/liveQuestionLive/' + data.liveId,
+        method: 'delete',
+        params: {ids: data.ids}
+    })
+}
+
+// 查询直播观看奖励设置列表
+export function listConfig(query) {
+  return request({
+    url: '/live/config/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询直播观看奖励设置详细
+export function getConfig(id) {
+  return request({
+    url: '/live/config/' + id,
+    method: 'get'
+  })
+}
+
+// 新增直播观看奖励设置
+export function addConfig(data,liveId) {
+  return request({
+    url: '/live/config' + '?liveId=' + liveId,
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改直播观看奖励设置
+export function updateConfig(data,liveId) {
+  return request({
+    url: '/live/config' + '?liveId=' + liveId,
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除直播观看奖励设置
+export function delConfig(id) {
+  return request({
+    url: '/live/config/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出直播观看奖励设置
+export function exportConfig(query) {
+  return request({
+    url: '/live/config/export',
+    method: 'get',
+    params: query
+  })
+}

+ 64 - 0
src/api/live/liveRedConf.js

@@ -0,0 +1,64 @@
+import request from '@/utils/request'
+
+// 查询直播红包记录配置列表
+export function listLiveRedConf(query) {
+  return request({
+    url: '/live/liveRedConf/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询直播红包记录配置详细
+export function getLiveRedConf(redId) {
+  return request({
+    url: '/live/liveRedConf/' + redId,
+    method: 'get'
+  })
+}
+
+// 新增直播红包记录配置
+export function addLiveRedConf(data) {
+  return request({
+    url: '/live/liveRedConf',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改直播红包记录配置
+export function updateLiveRedConf(data) {
+  return request({
+    url: '/live/liveRedConf',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除直播红包记录配置
+export function delLiveRedConf(redId) {
+  return request({
+    url: '/live/liveRedConf/' + redId,
+    method: 'delete'
+  })
+}
+
+// 导出直播红包记录配置
+export function exportLiveRedConf(query) {
+  return request({
+    url: '/live/liveRedConf/export',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 查询直播红包 未使用的红包
+export function listLiveRedConfOn(query) {
+  return request({
+    url: '/live/liveRedConf/listOn',
+    method: 'get',
+    params: query
+  })
+}
+

+ 19 - 0
src/api/live/liveRewardRecord.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+
+export function statistics(query) {
+  return request({
+    url: '/live/record/statistics',
+    method: 'post',
+    data: query
+  })
+}
+
+export function exportLiveIntegral(data) {
+  return request({
+    url: '/live/record/export',
+    method: 'post',
+    data: data
+  })
+}
+

+ 53 - 0
src/api/live/liveTrafficLog.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询短链课程流量记录列表
+export function listCourseTrafficLog(query) {
+  return request({
+    url: '/live/trafficLog/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询短链课程流量记录详细
+export function getCourseTrafficLog(logId) {
+  return request({
+    url: '/live/trafficLog/' + logId,
+    method: 'get'
+  })
+}
+
+// 新增短链课程流量记录
+export function addCourseTrafficLog(data) {
+  return request({
+    url: '/live/trafficLog',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改短链课程流量记录
+export function updateCourseTrafficLog(data) {
+  return request({
+    url: '/live/trafficLog',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除短链课程流量记录
+export function delCourseTrafficLog(logId) {
+  return request({
+    url: '/live/trafficLog/' + logId,
+    method: 'delete'
+  })
+}
+
+// 导出短链课程流量记录
+export function exportCourseTrafficLog(query) {
+  return request({
+    url: '/live/trafficLog/export',
+    method: 'get',
+    params: query
+  })
+}

+ 63 - 0
src/api/live/liveUserLotteryRecord.js

@@ -0,0 +1,63 @@
+import request from '@/utils/request'
+
+// 查询直播用户中奖记录列表
+export function listLiveUserLotteryRecord(query) {
+  return request({
+    url: '/live/liveUserLotteryRecord/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询直播用户中奖记录详细
+export function getLiveUserLotteryRecord(id) {
+  return request({
+    url: '/live/liveUserLotteryRecord/' + id,
+    method: 'get'
+  })
+}
+
+// 新增直播用户中奖记录
+export function addLiveUserLotteryRecord(data) {
+  return request({
+    url: '/live/liveUserLotteryRecord',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改直播用户中奖记录
+export function updateLiveUserLotteryRecord(data) {
+  return request({
+    url: '/live/liveUserLotteryRecord',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除直播用户中奖记录
+export function delLiveUserLotteryRecord(id) {
+  return request({
+    url: '/live/liveUserLotteryRecord/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出直播用户中奖记录
+export function exportLiveUserLotteryRecord(query) {
+  return request({
+    url: '/live/liveUserLotteryRecord/export',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 查询单一数据的中奖信息
+export function info(data) {
+  return request({
+    url: '/live/liveUserLotteryRecord/info',
+    method: 'post',
+    data: data
+  })
+}

+ 53 - 0
src/api/live/liveUserRedRecord.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询直播用户红包记录列表
+export function listLiveUserRedRecord(query) {
+  return request({
+    url: '/live/liveUserRedRecord/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询直播用户红包记录详细
+export function getLiveUserRedRecord(id) {
+  return request({
+    url: '/live/liveUserRedRecord/' + id,
+    method: 'get'
+  })
+}
+
+// 新增直播用户红包记录
+export function addLiveUserRedRecord(data) {
+  return request({
+    url: '/live/liveUserRedRecord',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改直播用户红包记录
+export function updateLiveUserRedRecord(data) {
+  return request({
+    url: '/live/liveUserRedRecord',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除直播用户红包记录
+export function delLiveUserRedRecord(id) {
+  return request({
+    url: '/live/liveUserRedRecord/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出直播用户红包记录
+export function exportLiveUserRedRecord(query) {
+  return request({
+    url: '/live/liveUserRedRecord/export',
+    method: 'get',
+    params: query
+  })
+}

+ 7 - 0
src/api/live/liveVideo.js

@@ -59,3 +59,10 @@ export function exportLiveVideo(query) {
     params: query
   })
 }
+
+export function getLiveVideoByLiveIdAndType(liveId) {
+  return request({
+    url: '/live/liveVideo/preview/' + liveId,
+    method: 'get'
+  })
+}

+ 25 - 0
src/api/live/liveWatchUser.js

@@ -8,6 +8,14 @@ export function watchUserList(query) {
     params: query
   })
 }
+// 查询直播间用户列表
+export function getLiveUserTotals(query) {
+  return request({
+    url: '/live/liveWatchUser/liveUserTotals',
+    method: 'get',
+    params: query
+  })
+}
 
 // 直播间用户禁言
 export function changeUserStatus(query) {
@@ -17,3 +25,20 @@ export function changeUserStatus(query) {
     params: query
   })
 }
+
+// 直播间用户禁言
+export function blockUser(query) {
+  return request({
+    url: '/live/liveWatchUser/blockUser/' + query,
+    method: 'get',
+  })
+}
+
+// 查询直播间用户列表
+export function dashBoardWatchUserList(query) {
+  return request({
+    url: '/live/liveWatchUser/dashBoardWatchUserList',
+    method: 'get',
+    params: query
+  })
+}

+ 87 - 0
src/api/live/task.js

@@ -0,0 +1,87 @@
+import request from '@/utils/request'
+
+// 查询直播间自动化任务配置列表
+export function listTask(query) {
+  return request({
+    url: '/live/task/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询直播间自动化任务配置列表
+export function listTaskBarrage(query) {
+  return request({
+    url: '/live/task/listBarrage',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询直播间自动化任务配置详细
+export function getTask(id) {
+  return request({
+    url: '/live/task/' + id,
+    method: 'get'
+  })
+}
+
+// 新增直播间自动化任务配置
+export function addTask(data) {
+  return request({
+    url: '/live/task',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改直播间自动化任务配置
+export function updateTask(data) {
+  return request({
+    url: '/live/task',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除直播间自动化任务配置
+export function delTask(id) {
+  return request({
+    url: '/live/task/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出直播间自动化任务配置
+export function exportTask(query) {
+  return request({
+    url: '/live/task/export',
+    method: 'get',
+    params: query
+  })
+}
+// 导出直播间自动化任务配置
+export function exportTaskBarrage(query) {
+  return request({
+    url: '/live/task/exportBarrage',
+    method: 'get',
+    params: query
+  })
+}
+
+// 下载用户导入模板
+export function importTemplate() {
+  return request({
+    url: '/live/task/importTemplate',
+    method: 'get'
+  })
+}
+
+// 新直播控制台任务列表
+export function consoleList(query) {
+  return request({
+    url: '/live/task/consoleList',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
src/api/live/words.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询直播间敏感词过滤列表
+export function listWords(query) {
+  return request({
+    url: '/live/words/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询直播间敏感词过滤详细
+export function getWords(wordId) {
+  return request({
+    url: '/live/words/' + wordId,
+    method: 'get'
+  })
+}
+
+// 新增直播间敏感词过滤
+export function addWords(data) {
+  return request({
+    url: '/live/words',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改直播间敏感词过滤
+export function updateWords(data) {
+  return request({
+    url: '/live/words',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除直播间敏感词过滤
+export function delWords(wordId) {
+  return request({
+    url: '/live/words/' + wordId,
+    method: 'delete'
+  })
+}
+
+// 导出直播间敏感词过滤
+export function exportWords(query) {
+  return request({
+    url: '/live/words/export',
+    method: 'get',
+    params: query
+  })
+}

+ 86 - 0
src/api/qw/applyIpad.js

@@ -0,0 +1,86 @@
+import request from '@/utils/request'
+
+// 查询分配记录列表
+export function listRecords(query) {
+  return request({
+    url: '/qw/records/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询分配记录详细
+export function getRecords(id) {
+  return request({
+    url: '/qw/records/' + id,
+    method: 'get'
+  })
+}
+
+// 新增分配记录
+export function addRecords(data) {
+  return request({
+    url: '/qw/records',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改分配记录
+export function updateRecords(data) {
+  return request({
+    url: '/qw/records',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除分配记录
+export function delRecords(id) {
+  return request({
+    url: '/qw/records/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出分配记录
+export function exportRecords(query) {
+  return request({
+    url: '/qw/records/export',
+    method: 'get',
+    params: query
+  })
+}
+
+export function apply(applyCount) {
+  return request({
+    url: '/qw/records/apply',
+    method: 'get',
+    params: applyCount
+  })
+}
+// 新增分配记录
+//@PostMapping("/batchUpdate")
+// public AjaxResult batchUpdate(@RequestBody Long[] ids)
+//后端接收结构
+export function batchUpdate(data) {
+  return request({
+    url: '/qw/records/batchUpdate',
+    method: 'post',
+    data: data
+  })
+}
+// 获取服务器信息
+export function getServerInfo(id) {
+  return request({
+    url: '/qw/records/server/' + id,
+    method: 'get'
+  })
+}
+export function release(data) {
+  return request({
+    url: '/qw/records/release',
+    method: 'post',
+    data: data
+  })
+}

+ 17 - 0
src/api/qw/qwDept.js

@@ -0,0 +1,17 @@
+import request from '@/utils/request'
+
+// 同步企业微信部门
+export function syncDept(companyId) {
+  return request({
+    url: '/qw/qwDept/syncDept/'+companyId,
+    method: 'get'
+  })
+}
+
+export function treeselect(query) {
+  return request({
+    url: '/qw/qwDept/treeselect',
+    method: 'get',
+    params: query
+  })
+}

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

@@ -50,4 +50,13 @@ export function exportQwIpadServer(query) {
     method: 'get',
     params: query
   })
+}
+
+// 新增ipad服务器
+export function release(data) {
+  return request({
+    url: '/qw/records/release',
+    method: 'post',
+    data: data
+  })
 }

+ 7 - 0
src/api/qw/user.js

@@ -67,6 +67,13 @@ export function getQwUserByIds(ids) {
   })
 }
 
+export function addQwUserName(id) {
+  return request({
+    url: '/qw/user/syncName/' + id,
+    method: 'post',
+  })
+}
+
 // 新增企微用户
 export function addUser(data) {
   return request({

+ 275 - 0
src/api/store/storeOrder.js

@@ -0,0 +1,275 @@
+import request from '@/utils/request'
+
+// 查询订单列表
+export function listStoreOrder(query) {
+  return request({
+    url: '/store/storeOrder/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询订单明细总数
+export function getOrderItemsNum(query) {
+  return request({
+    url: '/store/storeOrder/orderItemsNum',
+    method: 'get',
+    params: query
+  })
+}
+// 查询尾款订单列表
+export function listPayRemainOrder(query) {
+  return request({
+    url: '/store/storeOrder/payRemainList',
+    method: 'get',
+    params: query
+  })
+}
+// 查询推广订单列表
+export function listPromotionOrder(query) {
+  return request({
+    url: '/store/storeOrder/promotionList',
+    method: 'get',
+    params: query
+  })
+}
+// 查询健康商城订单列表
+export function listHealthStoreOrder(query) {
+  return request({
+    url: '/store/storeOrder/healthList',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getCustomerOrderList(query) {
+  return request({
+    url: '/store/storeOrder/getCustomerOrderList',
+    method: 'get',
+    params: query
+  })
+}
+
+
+
+
+
+// 查询订单详细
+export function getStoreOrder(id) {
+  return request({
+    url: '/store/storeOrder/' + id,
+    method: 'get'
+  })
+}
+export function getStoreOrderLive(id,payTypeCode) {
+  return request({
+    url: '/store/storeOrder/v2/' + id+'/'+payTypeCode,
+    method: 'get'
+  })
+}
+
+// 查询订单详细
+export function getStoreOrderAddress(id) {
+  return request({
+    url: '/store/storeOrder/queryAddress/' + id,
+    method: 'get'
+  })
+}
+
+// 查询订单详细
+export function getStoreOrderPhone(id) {
+  return request({
+    url: '/store/storeOrder/queryPhone/' + id,
+    method: 'get'
+  })
+}
+
+
+export function getExpress(id) {
+  return request({
+    url: '/store/storeOrder/getExpress/' + id,
+    method: 'get'
+  })
+}
+
+// 新增订单
+export function addStoreOrder(data) {
+  return request({
+    url: '/store/storeOrder',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改订单
+export function updateStoreOrder(data) {
+  return request({
+    url: '/store/storeOrder',
+    method: 'put',
+    data: data
+  })
+}
+
+// 修改物流编号
+export function updateDeliveryId(data) {
+  return request({
+    url: '/store/storeOrder/editDeliveryId',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除订单
+export function delStoreOrder(id) {
+  return request({
+    url: '/store/storeOrder/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出订单
+export function exportStoreOrder(query) {
+  return request({
+    url: '/store/storeOrder/export',
+    method: 'get',
+    params: query
+  })
+}
+
+// 导出订单
+export function exportHealthStoreOrder(query) {
+  return request({
+    url: '/store/storeOrder/healthExport',
+    method: 'get',
+    params: query
+  })
+}
+
+// 导出订单
+export function exportPromotionOrder(query) {
+  return request({
+    url: '/store/storeOrder/promotionExport',
+    method: 'get',
+    params: query
+  })
+}
+
+// 导出付尾款订单
+export function exportStorePayRemainOrder(query) {
+  return request({
+    url: '/store/storeOrder/payRemainExport',
+    method: 'get',
+    params: query
+  })
+}
+
+// 导出订单
+export function exportStoreOrderItems(query) {
+  return request({
+    url: '/store/storeOrder/exportItems',
+    method: 'get',
+    params: query
+  })
+}
+
+// 导出订单
+export function exportHealthStoreOrderItems(query) {
+  return request({
+    url: '/store/storeOrder/healthExportItems',
+    method: 'get',
+    params: query
+  })
+}
+
+export function createUserOrder(data) {
+  return request({
+    url: '/store/storeOrder/createUserOrder',
+    method: 'post',
+    data: data
+  })
+}
+
+export function finishOrder(data) {
+  return request({
+    url: '/store/storeOrder/finishOrder',
+    method: 'post',
+    data: data
+  })
+}
+export function importTemplate() {
+  return request({
+    url: '/store/storeOrder/importTemplate',
+    method: 'get'
+  })
+}
+
+export function editTuiMoney(data) {
+  return request({
+    url: '/store/storeOrder/editTuiMoney',
+    method: 'post',
+    data: data
+  })
+}
+
+export function refundOrderMoney(data) {
+  return request({
+    url: '/store/storeOrder/refundOrderMoney',
+    method: 'post',
+    data: data
+  })
+}
+
+export function updateExpress(data) {
+  return request({
+    url: '/store/storeOrder/updateExpress',
+    method: 'post',
+    data: data
+  })
+}
+export function syncExpress(data) {
+  return request({
+    url: '/store/storeOrder/syncExpress',
+    method: 'post',
+    data: data
+  })
+}
+
+export function updateErp(data) {
+  return request({
+    url: '/store/storeOrder/updateErpOrder',
+    method: 'post',
+    data: data
+  })
+}
+export function addTuiMoney(data) {
+  return request({
+    url: '/store/storeOrder/addTuiMoney',
+    method: 'post',
+    data: data
+  })
+}
+
+export function getEroOrder(query) {
+  return request({
+    url: '/store/storeOrder/getEroOrder',
+    method: 'get',
+    params: query
+  })
+}
+
+export function createErpOrder(query) {
+  return request({
+    url: '/store/storeOrder/createErpOrder',
+    method: 'get',
+    params: query
+  })
+}
+
+//审核
+export function auditPayRemain(data) {
+  return request({
+    url: '/store/storeOrder/auditPayRemain',
+    method: 'post',
+    data: data
+  })
+}

BIN
src/assets/images/videoIsAudit.png


BIN
src/assets/images/videoNotStart.png


BIN
src/assets/logo/bjzmky.png


BIN
src/assets/logo/cdhyt.jpg


BIN
src/assets/logo/cfryt.png


BIN
src/assets/logo/gzzdy_logo.png


BIN
src/assets/logo/sczy.png


BIN
src/assets/logo/yxj.jpg


+ 493 - 0
src/components/City/indexZm.vue

@@ -0,0 +1,493 @@
+<template>
+  <el-dialog :close-on-click-modal="false"
+             :visible.sync="addressView"
+             append-to-body
+             class="modal"
+             title="选择城市" width="950px">
+    <el-row :gutter="24" type="flex">
+      <el-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24" class="item">
+        <div class="check-btn">
+          <el-checkbox v-model="iSselect" @change="allCheckbox">全选</el-checkbox>
+          <div class="empty" @click="empty">清空</div>
+        </div>
+      </el-col>
+    </el-row>
+    <el-row  :gutter="24"  :loading="loading" >
+      <el-col  :xl="6" :lg="6" :md="6" :sm="8" :xs="6" class="item"  v-for="(item,index) in cityList" :key="index">
+        <div @mouseenter="enter(index)" @mouseleave="leave()" v-if="item.level==1">
+          <el-checkbox
+            v-model="item.checked"
+            :label="item.cityName"
+            :disabled="item.disabled"
+            @change="checkedClick(index)"
+            :class="{ 'disabled-checkbox': item.disabled }"
+          >{{item.cityName}}</el-checkbox>
+          <div class="city" v-show="activeCity===index">
+            <div class="checkBox">
+              <div class="arrow"></div>
+              <div>
+                <el-checkbox
+                  v-model="subitem.checked"
+                  :label="subitem.cityName"
+                  :disabled="subitem.disabled"
+                  @change="primary(index,subindex)"
+                  class="itemn"
+                  v-for="(subitem,subindex) in item.children"
+                  :key="subindex"
+                  :class="{ 'disabled-checkbox': subitem.disabled }"
+                >{{subitem.cityName}}</el-checkbox>
+              </div>
+            </div>
+          </div>
+        </div>
+      </el-col>
+    </el-row>
+    <div slot="footer">
+      <el-button @click="close">取消</el-button>
+      <el-button type="primary" @click="confirm">确定</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import {getAllList} from "@/api/hisStore/city";
+
+export default {
+  name: 'CityZm',
+  props: {
+    type: {
+      type: Number,
+      default: 0
+    },
+    selectedCities: {
+      type: Array,
+      default: () => []
+    }
+  },
+  data() {
+    return {
+      iSselect: false,
+      addressView: false,
+      cityList: [],
+      activeCity: -1,
+      loading: false
+    }
+  },
+  methods: {
+    enter(index) {
+      this.activeCity = index;
+    },
+    leave() {
+      this.activeCity = null;
+    },
+    getCityList() {
+      this.loading = true;
+      getAllList().then(res => {
+        this.loading = false;
+        console.log(res.data)
+        var data = res.data;
+        this.cityList = data.filter(item => item.level === 1)
+
+        this.cityList.forEach((item, index, arr) => {
+          // 加载市的数据
+          var subData = data.filter(subitem => subitem.parentId === item.cityId && subitem.level === 2)
+          console.log(subData)
+          item.children = subData;
+
+          // 加载县的数据到每个市下
+          item.children.forEach((city, cityIndex) => {
+            var countyData = data.filter(county => county.parentId === city.cityId && county.level === 3);
+            if (countyData && countyData.length > 0) {
+              city.children = countyData;
+            }
+          });
+
+          // 标记已选择的城市
+          this.markSelectedCities(item);
+        });
+      })
+    },
+    // 标记已选择的城市为禁用状态
+    markSelectedCities(province) {
+      let that = this;
+      if (!that.selectedCities || that.selectedCities.length === 0) {
+        return;
+      }
+
+      // 检查是否选择了整个省(children为空数组或不存在)
+      let selectedProvince = that.selectedCities.find(city => {
+        if (city.cityId === province.cityId) {
+          // 如果没有children属性,或者children是空数组,说明选择了整个省
+          return !city.children || city.children.length === 0;
+        }
+        return false;
+      });
+
+      if (selectedProvince) {
+        // 整个省已选择,禁用省和所有市
+        that.$set(province, 'disabled', true);
+        if (province.children && province.children.length > 0) {
+          province.children.forEach((city, cityIndex) => {
+            that.$set(province.children[cityIndex], 'disabled', true);
+            // 如果市下有县,也禁用所有县
+            if (city.children && city.children.length > 0) {
+              city.children.forEach((county, countyIndex) => {
+                that.$set(province.children[cityIndex].children[countyIndex], 'disabled', true);
+              });
+            }
+          });
+        }
+      } else {
+        // 检查是否有部分市被选择
+        let selectedCityMap = new Map(); // 存储已选择的市及其县信息
+        that.selectedCities.forEach(selectedCity => {
+          if (selectedCity.cityId === province.cityId && selectedCity.children && selectedCity.children.length > 0) {
+            // 该省下有选择的市
+            selectedCity.children.forEach(child => {
+              if (!selectedCityMap.has(child.cityId)) {
+                selectedCityMap.set(child.cityId, new Set());
+              }
+              // 如果市下有选择的县,记录县的ID
+              if (child.children && child.children.length > 0) {
+                child.children.forEach(county => {
+                  selectedCityMap.get(child.cityId).add(county.cityId);
+                });
+              }
+            });
+          }
+        });
+
+        if (selectedCityMap.size > 0) {
+          // 检查该省下所有市是否都被选择
+          let allCitiesSelected = true;
+          if (province.children && province.children.length > 0) {
+            province.children.forEach(city => {
+              if (!selectedCityMap.has(city.cityId)) {
+                allCitiesSelected = false;
+              }
+            });
+          } else {
+            allCitiesSelected = false;
+          }
+
+          // 如果所有市都被选择,禁用整个省
+          if (allCitiesSelected) {
+            that.$set(province, 'disabled', true);
+          }
+
+          // 标记已选择的市为禁用,并检查市下的县
+          if (province.children && province.children.length > 0) {
+            province.children.forEach((city, cityIndex) => {
+              if (selectedCityMap.has(city.cityId)) {
+                // 该市已被选择
+                let selectedCountyIds = selectedCityMap.get(city.cityId);
+
+                // 检查是否选择了整个市(没有选择具体的县,或者县列表为空)
+                let citySelectedData = null;
+                that.selectedCities.forEach(selectedCity => {
+                  if (selectedCity.cityId === province.cityId && selectedCity.children) {
+                    let foundCity = selectedCity.children.find(c => c.cityId === city.cityId);
+                    if (foundCity && (!foundCity.children || foundCity.children.length === 0)) {
+                      citySelectedData = foundCity;
+                    }
+                  }
+                });
+
+                if (citySelectedData) {
+                  // 选择了整个市,禁用该市和所有县
+                  that.$set(province.children[cityIndex], 'disabled', true);
+                  if (city.children && city.children.length > 0) {
+                    city.children.forEach((county, countyIndex) => {
+                      that.$set(province.children[cityIndex].children[countyIndex], 'disabled', true);
+                    });
+                  }
+                } else if (city.children && city.children.length > 0 && selectedCountyIds.size > 0) {
+                  // 检查该市下所有县是否都被选择
+                  let allCountiesSelected = true;
+                  city.children.forEach(county => {
+                    if (!selectedCountyIds.has(county.cityId)) {
+                      allCountiesSelected = false;
+                    }
+                  });
+
+                  // 如果所有县都被选择,禁用该市
+                  if (allCountiesSelected) {
+                    that.$set(province.children[cityIndex], 'disabled', true);
+                  }
+
+                  // 标记已选择的县为禁用
+                  city.children.forEach((county, countyIndex) => {
+                    if (selectedCountyIds.has(county.cityId)) {
+                      that.$set(province.children[cityIndex].children[countyIndex], 'disabled', true);
+                    }
+                  });
+                } else {
+                  // 选择了整个市(没有县的数据或没有选择县),禁用该市
+                  that.$set(province.children[cityIndex], 'disabled', true);
+                }
+              }
+            });
+          }
+        }
+      }
+    },
+    /**
+     * 全选或者反选
+     * @param checked
+     */
+    allCheckbox: function () {
+      let that = this, checked = this.iSselect;
+      that.cityList.forEach(function (item, key) {
+        // 跳过已禁用的省
+        if (item.disabled) {
+          return;
+        }
+        that.$set(that.cityList[key], 'checked', checked);
+        if (checked) {
+          // 只计算未禁用的市的数量
+          let enabledCount = that.cityList[key].children.filter(city => !city.disabled).length;
+          that.$set(that.cityList[key], 'count', enabledCount);
+        } else {
+          that.$set(that.cityList[key], 'count', 0);
+        }
+        that.cityList[key].children.forEach(function (val, k) {
+          // 跳过已禁用的市
+          if (!val.disabled) {
+            that.$set(that.cityList[key].children[k], 'checked', checked);
+          }
+        })
+      });
+    },
+    // 清空;
+    empty() {
+      let that = this;
+      that.cityList.forEach(function (item, key) {
+        // 跳过已禁用的省
+        if (item.disabled) {
+          return;
+        }
+        that.$set(that.cityList[key], 'checked', false);
+        that.cityList[key].children.forEach(function (val, k) {
+          // 跳过已禁用的市
+          if (!val.disabled) {
+            that.$set(that.cityList[key].children[k], 'checked', false);
+          }
+        });
+        that.$set(that.cityList[key], 'count', 0);
+      });
+      this.iSselect = false;
+    },
+    /**
+     * 点击省
+     * @param index
+     */
+    checkedClick: function (index) {
+      let that = this;
+      // 如果省被禁用,不允许操作
+      if (that.cityList[index].disabled) {
+        return;
+      }
+      if (that.cityList[index].checked) {
+        // 只选择未禁用的市
+        let enabledCount = 0;
+        that.cityList[index].children.forEach(function (item, key) {
+          if (!item.disabled) {
+            that.$set(that.cityList[index].children[key], 'checked', true);
+            enabledCount++;
+          }
+        });
+        that.$set(that.cityList[index], 'count', enabledCount);
+      } else {
+        that.$set(that.cityList[index], 'count', 0);
+        that.$set(that.cityList[index], 'checked', false);
+        that.cityList[index].children.forEach(function (item, key) {
+          // 只取消未禁用的市的选中状态
+          if (!item.disabled) {
+            that.$set(that.cityList[index].children[key], 'checked', false);
+          }
+        });
+        that.iSselect = false;
+      }
+    },
+    /**
+     * 点击市区
+     * @param index
+     * @param ind
+     */
+    primary: function (index, ind) {
+      // 如果市被禁用,不允许操作
+      if (this.cityList[index].children[ind].disabled) {
+        return;
+      }
+      let checked = false, count = 0;
+      this.cityList[index].children.forEach(function (item, key) {
+        console.log("item:" + item.checked)
+        if (item.checked) {
+          checked = true;
+          count++;
+        }
+      });
+      this.$set(this.cityList[index], 'count', count);
+      this.$set(this.cityList[index], 'checked', checked);
+    },
+    // 确定;
+    confirm() {
+      let that = this;
+      // 被选中的省市;
+      let selectList = [];
+      that.cityList.forEach(function (item, key) {
+        // 跳过已禁用的省
+        if (item.disabled) {
+          return;
+        }
+        let data = {};
+        if (item.checked) {
+          data = {
+            name: item.cityName,
+            cityId: item.cityId,
+            children: []
+          };
+
+        }
+        that.cityList[key].children.forEach(function (i, k) {
+          // 只添加未禁用且选中的市
+          if (i.checked && !i.disabled) {
+            let cityData = {
+              cityId: i.cityId
+            };
+
+            // 如果市下有县,检查是否有选中的县
+            if (i.children && i.children.length > 0) {
+              let selectedCounties = [];
+              i.children.forEach(function (county, countyIndex) {
+                if (county.checked && !county.disabled) {
+                  selectedCounties.push({
+                    cityId: county.cityId
+                  });
+                }
+              });
+
+              // 如果有选中的县,添加到市的children中
+              if (selectedCounties.length > 0) {
+                cityData.children = selectedCounties;
+              }
+            }
+
+            data.children.push(cityData);
+          }
+        });
+        if (data.cityId !== undefined) {
+          selectList.push(data);
+        }
+      });
+      console.log(selectList);
+      if (selectList.length === 0) {
+        return this.$message({
+          message: '至少选择一个省份或者城市',
+          type: 'error'
+        });
+      } else {
+        this.$emit('selectCity', selectList, this.type);
+        that.addressView = false;
+        this.cityList = []
+      }
+    },
+    close() {
+      this.addressView = false;
+      this.cityList = [];
+      // 重置选中状态
+      this.iSselect = false;
+    }
+  },
+  mounted() {
+  }
+}
+</script>
+
+<style scoped>
+
+.modal .item {
+  position: relative;
+  margin-bottom: 20px;
+}
+
+.modal .item .city {
+  position: absolute;
+  z-index: 9;
+  top: 17px;
+  width: 100%;
+  padding-top: 18px;
+}
+
+.modal .item .city .checkBox {
+  width: 97%;
+  padding: 10px;
+  border: 1px solid #eee;
+  background-color: #fff;
+  max-height: 100px;
+  overflow-x: hidden;
+  overflow-y: auto;
+}
+
+.modal .item .city .checkBox .arrow {
+  position: absolute;
+  top: 3px;
+  width: 0;
+  height: 0;
+  border: 8px solid transparent;
+  border-bottom-color: #ddd;
+}
+
+.modal .item .city .checkBox .arrow:before {
+  position: absolute;
+  bottom: -8px;
+  right: -7px;
+  content: "";
+  width: 0;
+  height: 0;
+  border: 7px solid transparent;
+  border-bottom-color: #fff;
+}
+
+.modal .item .city .checkBox .itemn {
+  margin-bottom: 10px;
+}
+
+.radio {
+  padding: 5px 0;
+  font-size: 14px !important;
+}
+
+.red {
+  color: #ff0000;
+}
+
+.empty {
+  cursor: pointer;
+  margin-left: 10px
+}
+
+.check-btn {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: flex-end;
+}
+
+/* 禁用状态的复选框样式 */
+.disabled-checkbox {
+  opacity: 0.5;
+  cursor: not-allowed !important;
+}
+
+.disabled-checkbox /deep/ .el-checkbox__input.is-disabled .el-checkbox__inner {
+  background-color: #f5f7fa;
+  border-color: #e4e7ed;
+  cursor: not-allowed;
+}
+
+.disabled-checkbox /deep/ .el-checkbox__input.is-disabled + .el-checkbox__label {
+  color: #c0c4cc;
+  cursor: not-allowed;
+}
+</style>

+ 139 - 0
src/components/Editor/wangZm.vue

@@ -0,0 +1,139 @@
+<template>
+  <div>
+    <div ref='editor1' class="myedit"></div>
+  </div>
+</template>
+
+<script>
+import E from 'wangeditor'
+export default {
+  name: 'editoritem',
+  data() {
+    return {
+      uploadUrl: process.env.VUE_APP_BASE_API + "/common/uploadWang",
+      editor: null,
+      selectedImageCount: 0, // 记录选择的图片数量
+      uploadedImageCount: 0  // 记录已上传的图片数量
+    }
+  },
+  beforeDestroy() {
+    if (this.editor != null) {
+      this.editor.destroy()
+      this.editor = null
+    }
+  },
+  methods: {
+    initEditor() {
+      const that = this;
+      if (this.editor == null) {
+        this.editor = new E(that.$refs.editor1)
+        this.editor.config.uploadImgServer = this.uploadUrl;
+        this.editor.config.uploadImgMaxSize = 6 * 1024 * 1024 // 2M
+        this.editor.config.uploadImgAccept = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']
+        this.editor.config.uploadFileName = 'fileName'
+        this.editor.config.zIndex = 1
+
+        // 关键配置:允许多选,串行上传
+        this.editor.config.uploadImgMultiple = true;
+        this.editor.config.uploadImgMaxLength = 15;
+        this.editor.config.uploadImgConcurrent = 1;
+
+        this.editor.config.customUploadImg = function (files, insertImgFn) {
+          // 获取选择的图片数量
+          that.selectedImageCount = files.length;
+          that.uploadedImageCount = 0;
+          console.log(`已选择 ${that.selectedImageCount} 张图片,准备开始上传`);
+
+          that.$emit('image-selected', that.selectedImageCount);
+
+          const uploadNext = (index) => {
+            if (index >= files.length) {
+              console.log(`所有 ${files.length} 张图片上传处理完毕`);
+              that.$emit('all-images-uploaded', that.uploadedImageCount);
+              return;
+            }
+
+            const formData = new FormData();
+            formData.append(that.editor.config.uploadFileName, files[index]);
+
+            const xhr = new XMLHttpRequest();
+            xhr.open('POST', that.uploadUrl);
+
+            xhr.onload = function () {
+              if (xhr.status >= 200 && xhr.status < 300) {
+                const result = JSON.parse(xhr.responseText);
+                if (result.errno === 0 && result.data && result.data[0] && result.data[0].url) {
+                  insertImgFn(result.data[0].url);
+                  that.uploadedImageCount++;
+                  that.$emit('image-uploaded', that.uploadedImageCount, that.selectedImageCount);
+                } else {
+                  console.error(`第 ${index+1} 张图片上传失败:`, result);
+                  that.$emit('image-upload-error', index+1);
+                }
+              } else {
+                console.error(`第 ${index+1} 张图片上传请求失败:`, xhr.statusText);
+                that.$emit('image-upload-error', index+1);
+              }
+              uploadNext(index + 1);
+            };
+
+            xhr.onerror = function () {
+              console.error(`第 ${index+1} 张图片上传出错`);
+              that.$emit('image-upload-error', index+1);
+              uploadNext(index + 1);
+            };
+
+            // 发送请求
+            xhr.send(formData);
+          };
+
+          // 开始上传第一张
+          uploadNext(0);
+        };
+
+        this.editor.config.menus = [
+          'head', 'bold', 'fontSize', 'fontName', 'italic', 'underline',
+          'strikeThrough', 'indent', 'lineHeight', 'foreColor', 'backColor',
+          'link', 'list', 'todo', 'justify', 'quote', 'emoticon', 'image',
+          'table', 'code', 'splitLine', 'undo', 'redo'
+        ]
+
+        this.editor.config.onchange = function (newHtml) {
+          that.$emit("on-text-change", newHtml);
+        }
+
+        this.editor.config.pasteFilterStyle = false
+        this.editor.config.onchangeTimeout = 500
+
+        this.editor.create()
+      }
+      this.editor.txt.html("");
+    },
+
+    setText(text) {
+      if (this.editor == null) {
+        this.initEditor()
+      }
+      this.editor.txt.html(text || "");
+    },
+
+    getSelectedImageCount() {
+      return this.selectedImageCount;
+    },
+
+    getUploadedImageCount() {
+      return this.uploadedImageCount;
+    }
+  }
+}
+</script>
+
+<style scoped>
+.myedit {
+  min-height: 300px;
+  z-index: 1 !important;
+}
+.w-e-toolbar, .w-e-text-container {
+  z-index: 1 !important;
+}
+</style>

+ 282 - 0
src/components/LiveVideoUpload/index.vue

@@ -0,0 +1,282 @@
+<template>
+  <div>
+    <el-form-item label="视频上传">
+      <div class="upload_video" id="upload_video">
+        <el-upload
+          ref="upload"
+          action="#"
+          :http-request="uploadVideoToTxPcdn"
+          accept=".mp4"
+          :limit="1"
+          :on-remove="handleRemove"
+          :on-change="handleChange"
+          :auto-upload="false"
+          :key="uploadKey"
+        >
+          <el-button slot="trigger" size="small" type="primary">选取视频</el-button>
+          <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">点击上传</el-button>
+          <!-- 线路一 -->
+          <div class="progress-container" style="width:100% !important;">
+            <span class="progress-label">线路一</span>
+            <el-progress
+              style="margin-top: 5px;"
+              class="progress"
+              :text-inside="true"
+              :stroke-width="18"
+              :percentage="txProgress"
+              status="success">
+            </el-progress>
+          </div>
+
+          <!-- 线路二 -->
+          <!--          <div class="progress-container">-->
+          <!--            <span class="progress-label">线路er</span>-->
+          <!--            <el-progress-->
+          <!--              style="margin-top: 5px;"-->
+          <!--              class="progress"-->
+          <!--              :text-inside="true"-->
+          <!--              :stroke-width="18"-->
+          <!--              :percentage="hwProgress"-->
+          <!--              status="success">-->
+          <!--            </el-progress>-->
+          <!--          </div>-->
+          <div slot="tip" class="el-upload__tip">只能上传mp4文件,且不超过500M</div>
+        </el-upload>
+      </div>
+    </el-form-item>
+    <el-form-item label="视频播放">
+      <video v-if="videoUrl" ref="myvideo" :src="videoUrl" id="video" width="100%" height="300px" controls></video>
+      <div v-if="fileName">视频文件名: {{ fileName }}</div>
+      <div v-if="fileKey">文件Key: {{ fileKey }}</div>
+      <div v-if="fileSize">文件大小(MB): {{ (fileSize / (1024 * 1024)).toFixed(2) }} MB</div>
+    </el-form-item>
+    <!-- 仅当showControl为true时显示播放线路选择器 -->
+    <el-form-item v-if="showControl" label="播放线路">
+      <el-radio-group v-model="localUploadType">
+        <el-radio :label="1" >线路一</el-radio>
+        <!--        <el-radio :label="2" >线路二</el-radio>-->
+        <!--        <el-radio :label="3" >线路三</el-radio>-->
+      </el-radio-group>
+    </el-form-item>
+
+  </div>
+</template>
+
+<script>
+import { uploadObject } from "@/utils/cos.js";
+import Pagination from "@/components/Pagination";
+
+export default {
+  components: {
+    Pagination
+  },
+  props: {
+    videoUrl: {
+      type: String,
+      default: "",
+    },
+    fileKey: {
+      type: String,
+      default: "",
+    },
+    fileSize: {
+      type: Number,
+      default: null,
+    },
+    fileName: {
+      type: String,
+      default: "",
+    },
+    line_1: {
+      type: String,
+      default: "",
+    },
+    line_2: {
+      type: String,
+      default: "",
+    },
+    line_3: {
+      type: String,
+      default: "",
+    },
+    thumbnail: {
+      type: String,
+      default: "",
+    },
+    uploadType: {
+      type: Number,
+      default: null,
+    },
+    type: {
+      type: Number,
+      default: null,
+    },
+    isPrivate: {
+      type: Number,
+      default: 0,
+    },
+
+    // 使用一个变量控制显示,默认为true显示所有控制项
+    showControl: {
+      type: Boolean,
+      default: false,
+    }
+  },
+  data() {
+    return {
+      videoName:'',
+      isHidden : false,
+      localUploadType: this.uploadType,
+      duration: 0,
+      fileId: "",
+      uploadTypeOptions: [
+        { dictLabel: "线路一", dictValue: 1 }, // 腾讯pcdn
+        // { dictLabel: "线路二", dictValue: 2 }, // 华为云obs
+        // { dictLabel: "华为云VOD", dictValue: 4 },
+        // { dictLabel: "腾讯云VOD", dictValue: 5 },
+      ],
+      fileList: [],
+      txProgress: 0,
+      hwProgress: 0,
+      uploadLoading: false,
+      uploadKey: 0,
+    };
+  },
+  watch: {
+    localUploadType(newType) {
+      this.reset()
+      this.$emit("update:uploadType", newType);
+    },
+    uploadType(newType) {
+      this.localUploadType = newType;
+    },
+  },
+  mounted() {
+    this.reset()
+  },
+  methods: {
+
+// 提供重置方法供父组件调用
+    reset() {
+      this.txProgress = 0;
+      this.fileList = [];
+      this.$refs.upload.clearFiles();
+      // 重置其他状态...
+    },
+    handleChange(file, fileList) {
+      this.fileList = fileList;
+      this.getVideoDuration(file.raw);
+    },
+    getVideoDuration(file) {
+      const video = document.createElement("video");
+      video.preload = "metadata";
+      video.onloadedmetadata = () => {
+        window.URL.revokeObjectURL(video.src);
+        this.duration = parseInt(video.duration.toFixed(2));
+        console.log("视频时长=========>", this.duration);
+        this.$emit("video-duration", this.duration);
+        console.log("文件大小=====>", file.size);
+        this.$emit("update:fileSize", file.size);
+      };
+      video.src = URL.createObjectURL(file);
+    },
+    async submitUpload() {
+      if (this.fileList.length < 1) {
+        return this.$message.error("请先选取视频,再进行上传");
+      }
+      //同时上传个线路
+      await this.uploadVideoToTxPcdn();
+      // await this.uploadVideoToHwObs();
+      this.$emit("update:fileName", this.fileList[0].name);
+    },
+    //获取第一帧封面
+    async getFirstThumbnail() {
+      const file = this.fileList[0].raw;
+      getThumbnail(file).then(response => {
+        console.log("获取到第一帧为封面======>", response.url)
+        this.$emit("update:thumbnail", response.url);
+      })
+    },
+    //更新华为线路进度条
+    updateHwProgress(progress) {
+      this.hwProgress = progress;
+    },
+    //更新腾讯线路进度条
+    updateTxProgress(progressData) {
+      this.txProgress = Math.round(progressData.percent * 100);
+    },
+    //上传腾讯云Pcdn
+    async uploadVideoToTxPcdn() {
+      try {
+        const file = this.fileList[0].raw;
+        const data = await uploadObject(file, this.updateTxProgress, this.type);
+        console.log("腾讯COS返回========>", data);
+        console.log("isPrivate=======>", this.isPrivate)
+        let line_1 = '';
+        if (this.isPrivate === 0) {
+          line_1 = `${process.env.VUE_APP_VIDEO_LINE_1}${data.urlPath}`;
+        } else {
+          line_1 = `${process.env.VUE_APP_VIDEO_LINE_1}${data.urlPath}`;
+        }
+
+        let urlPathWithoutFirstSlash = data.urlPath.substring(1);
+        this.$emit("update:fileKey", urlPathWithoutFirstSlash);
+
+        console.log("文件key", urlPathWithoutFirstSlash);
+        console.log("组装URL========>", line_1);
+        this.$emit("update:videoUrl", line_1);
+        this.$emit("update:line_1", line_1);
+        this.$emit("change", line_1,line_1);
+        // this.$emit("update:line_2", line_2);
+        this.$message.success("线路一上传成功");
+      } catch (error) {
+        this.$message.error("线路一上传失败");
+      }
+    },
+    // //上传华为云Obs
+    // async uploadVideoToHwObs() {
+    //   try {
+    //     const file = this.fileList[0].raw;
+    //     const data = await uploadToOBS(file, this.updateHwProgress, this.type);
+    //     console.log("华为OBS返回========>", data);
+    //     let line_2 = '';
+    //     if (this.isPrivate === 0) {
+    //       line_2 = `${process.env.VUE_APP_VIDEO_LINE_2}/${data.urlPath}`;
+    //     } else {
+    //       line_2 = `${process.env.VUE_APP_VIDEO_LINE_2}/${data.urlPath}`;
+    //     }
+    //     this.$emit("update:videoUrl", line_2);
+    //     this.$emit("update:line_2", line_2);
+    //     this.$message.success("线路二上传成功");
+    //   } catch (error) {
+    //     this.$message.error("线路二上传失败");
+    //   }
+    // },
+    handleRemove(file, fileList) {
+      console.log(file, fileList.length);
+    },
+  }
+};
+</script>
+
+<style>
+.progress-container {
+  margin-bottom: 5px; /* 进度条之间的间距 */
+}
+
+.progress-label {
+  display: block;
+  font-weight: bold;
+  font-size: 13px;
+  color: #303331; /* 标签颜色,可以根据需要调整 */
+}
+
+/* 视频库选择对话框样式 */
+.library-search {
+  margin-bottom: 15px;
+}
+
+.el-table .el-table__row:hover {
+  cursor: pointer;
+}
+</style>

+ 493 - 0
src/components/LiveVideoUpload/single.vue

@@ -0,0 +1,493 @@
+<template>
+  <div>
+    <el-form-item label="">
+      <div class="upload_video" id="upload_video">
+<!--        <el-upload-->
+<!--          class="upload-demo"-->
+<!--          ref="upload"-->
+<!--          action="#"-->
+<!--          :http-request="uploadVideoToTxPcdn"-->
+<!--          accept=".mp4"-->
+<!--          :limit="1"-->
+<!--          :on-remove="handleRemove"-->
+<!--          :on-change="handleChange"-->
+<!--          :auto-upload="false"-->
+<!--          :key="uploadKey"-->
+<!--        >-->
+<!--          <el-button slot="trigger" size="small" type="primary" >选取视频</el-button>-->
+<!--          <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">点击上传</el-button>-->
+          <!-- 仅当showControl为true时显示视频库选取按钮 -->
+          <el-button v-if="showControl" style="margin-left: 10px;" size="small" type="success" @click="openVideoLibrary">视频库选取</el-button>
+<!--          &lt;!&ndash; 线路一 &ndash;&gt;-->
+<!--          <div class="progress-container">-->
+<!--            <span class="progress-label">线路一</span>-->
+<!--            <el-progress-->
+<!--              style="margin-top: 5px;"-->
+<!--              class="progress"-->
+<!--              :text-inside="true"-->
+<!--              :stroke-width="18"-->
+<!--              :percentage="txProgress"-->
+<!--              status="success">-->
+<!--            </el-progress>-->
+<!--          </div>-->
+
+          <!-- 线路二 -->
+<!--          <div class="progress-container">-->
+<!--            <span class="progress-label">线路二</span>-->
+<!--            <el-progress-->
+<!--              style="margin-top: 5px;"-->
+<!--              class="progress"-->
+<!--              :text-inside="true"-->
+<!--              :stroke-width="18"-->
+<!--              :percentage="hwProgress"-->
+<!--              status="success">-->
+<!--            </el-progress>-->
+<!--          </div>-->
+          <div slot="tip" class="el-upload__tip">只能上传mp4文件,且不超过500M</div>
+<!--        </el-upload>-->
+      </div>
+    </el-form-item>
+    <el-form-item label="视频播放">
+      <video v-if="videoUrl.endsWith('mp4')" ref="myvideo" :src="videoUrl" id="video" width="100%" height="300px" controls></video>
+      <video v-if="videoUrl.endsWith('m3u8')" ref="myM3u8Video" :src="videoUrl" id="meu8Video" width="100%" height="300px" controls type="application/x-mpegURL"></video>
+      <div v-if="fileName">视频文件名: {{ fileName }}</div>
+      <div v-if="fileKey">文件Key: {{ fileKey }}</div>
+      <div v-if="fileSize">文件大小(MB): {{ (fileSize / (1024 * 1024)).toFixed(2) }} MB</div>
+    </el-form-item>
+    <!-- 仅当showControl为true时显示播放线路选择器 -->
+<!--    <el-form-item v-if="showControl" label="播放线路">-->
+<!--      <el-radio-group v-model="localUploadType">-->
+<!--        <el-radio :label="1" >线路一</el-radio>-->
+<!--&lt;!&ndash;        <el-radio :label="2" >线路二</el-radio>&ndash;&gt;-->
+<!--        &lt;!&ndash;        <el-radio :label="3" >线路三</el-radio>&ndash;&gt;-->
+<!--      </el-radio-group>-->
+<!--    </el-form-item>-->
+
+    <!-- 视频库选择对话框 -->
+    <el-dialog title="视频库选择" :visible.sync="libraryOpen" width="900px" append-to-body>
+      <!-- 搜索条件 -->
+      <el-form :inline="true" :model="libraryQueryParams" class="library-search">
+        <el-form-item label="素材名称">
+          <el-input
+            v-model="libraryQueryParams.remark"
+            placeholder="请输入素材名称"
+            clearable
+            size="small"
+            @keyup.enter.native="handleLibraryQuery"
+          />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleLibraryQuery">搜索</el-button>
+          <el-button icon="el-icon-refresh" size="mini" @click="resetLibraryQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
+
+      <!-- 视频列表 -->
+      <el-table v-loading="libraryLoading" :data="libraryList" @row-click="handleLibrarySelect" highlight-current-row>
+        <el-table-column label="素材名称" align="center" prop="remark" />
+<!--        <el-table-column label="缩略图" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--            <video-->
+<!--              :src="scope.row.videoUrl"-->
+<!--              controls-->
+<!--              controlsList="nodownload"-->
+<!--              class="video-player"-->
+<!--              @contextmenu.prevent-->
+<!--            ></video>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+        <el-table-column label="视频时长" align="center">
+          <template slot-scope="scope">
+            <span>{{ formatDuration(scope.row.duration) }}</span>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <!-- 分页 -->
+      <pagination
+        v-show="libraryTotal>0"
+        :total="libraryTotal"
+        :page.sync="libraryQueryParams.pageNum"
+        :limit.sync="libraryQueryParams.pageSize"
+        @pagination="getList"
+      />
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="confirmVideoSelection">确 定</el-button>
+        <el-button @click="cancelVideoSelection">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { uploadObject } from "@/utils/cos.js";
+import Pagination from "@/components/Pagination";
+// import { listVideoResource } from '@/api/course/videoResource';
+import { listLiveVideo, getLiveVideo, delLiveVideo, addLiveVideo, updateLiveVideo, exportLiveVideo } from "@/api/live/liveVideo";
+import Hls from 'hls.js';
+
+export default {
+  components: {
+    Pagination
+  },
+  props: {
+    videoUrl: {
+      type: String,
+      default: "",
+    },
+    fileKey: {
+      type: String,
+      default: "",
+    },
+    fileSize: {
+      type: Number,
+      default: null,
+    },
+    fileName: {
+      type: String,
+      default: "",
+    },
+    line_1: {
+      type: String,
+      default: "",
+    },
+    line_2: {
+      type: String,
+      default: "",
+    },
+    line_3: {
+      type: String,
+      default: "",
+    },
+    thumbnail: {
+      type: String,
+      default: "",
+    },
+    uploadType: {
+      type: Number,
+      default: null,
+    },
+    type: {
+      type: Number,
+      default: null,
+    },
+    isPrivate: {
+      type: Number,
+      default: 0,
+    },
+
+    // 使用一个变量控制显示,默认为true显示所有控制项
+    showControl: {
+      type: Boolean,
+      default: true,
+    }
+  },
+  destroyed() {
+    this.hls?.destroy();
+  },
+  data() {
+    return {
+      videoName:'',
+      isHidden : false,
+      localUploadType: this.uploadType,
+      duration: 0,
+      fileId: "",
+      uploadTypeOptions: [
+        { dictLabel: "线路一", dictValue: 1 }, // 腾讯pcdn
+        { dictLabel: "线路二", dictValue: 2 }, // 华为云obs
+        // { dictLabel: "华为云VOD", dictValue: 4 },
+        // { dictLabel: "腾讯云VOD", dictValue: 5 },
+      ],
+      fileList: [],
+      txProgress: 0,
+      hwProgress: 0,
+      uploadLoading: false,
+      uploadKey: 0,
+      // 视频库选择相关数据
+      libraryOpen: false,
+      libraryLoading: false,
+      libraryTotal: 0,
+      libraryList: [],
+      selectedVideo: null,
+      hls:null,
+      libraryQueryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        resourceName: null,
+        liveId: -1,
+        videoUrl: null,
+        videoType: -1,
+        sort: null,
+        remark: null,
+        finishStatus:1
+      },
+      liveQueryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        liveId: -1,
+        videoUrl: null,
+        videoType: -1,
+        sort: null,
+        remark: null,
+      },
+    };
+  },
+  mounted() {
+    this.reset();
+    if (this.videoUrl.endsWith(".m3u8")) {
+      this.$nextTick(() => {
+        this.initPlayer()
+      })
+    }
+  },
+  watch: {
+    videoUrl(newVal,oldVal){
+      console.log("触发数据改变")
+      if (this.videoUrl.endsWith(".m3u8")) {
+        this.$nextTick(() => {
+          this.initPlayer()
+        })
+      }
+    },
+    uploadType(newType) {
+      this.localUploadType = newType;
+    },
+
+  },
+  methods: {
+    initPlayer() {
+      this.hls?.destroy();
+      if (Hls.isSupported()) {
+        const videoElement = this.$refs.myM3u8Video
+        if (!videoElement) {
+          console.error('找不到 video 元素')
+          return
+        }
+        this.hls = new Hls();
+        this.hls.attachMedia(videoElement);
+        this.hls.on(Hls.Events.MEDIA_ATTACHED, () => {
+          this.hls.loadSource(this.videoUrl);
+          this.hls.on(Hls.Events.STREAM_LOADED, (event, data) => {
+            videoElement.play();
+          });
+        });
+        this.hls.on(Hls.Events.ERROR, (event, data) => {
+          console.error('HLS 错误:', data);
+        });
+      } else {
+        console.error('浏览器不支持 HLS')
+      }
+    },
+    /** 查询直播视频列表 */
+    getList() {
+      this.libraryLoading = true;
+      listLiveVideo(this.libraryQueryParams).then(response => {
+        this.libraryList = response.rows;
+        this.libraryTotal = response.total;
+        this.libraryLoading = false;
+      });
+    },
+    // 打开视频库对话框
+    openVideoLibrary() {
+      this.libraryOpen = true;
+      this.selectedVideo = null;
+      this.getList();
+    },
+    handleChange(file, fileList) {
+      this.fileList = fileList;
+      this.getVideoDuration(file.raw);
+    },
+    getVideoDuration(file) {
+      const video = document.createElement("video");
+      video.preload = "metadata";
+      video.onloadedmetadata = () => {
+        window.URL.revokeObjectURL(video.src);
+        this.duration = parseInt(video.duration.toFixed(2));
+        console.log("视频时长=========>",this.duration);
+        this.$emit("video-duration", this.duration);
+        console.log("文件大小=====>",file.size);
+        this.$emit("update:fileSize", file.size);
+      };
+      video.src = URL.createObjectURL(file);
+    },
+    async submitUpload() {
+      if (this.fileList.length < 1) {
+        return this.$message.error("请先选取视频,再进行上传");
+      }
+      //同时上传个线路
+      await this.uploadVideoToTxPcdn();
+      this.$emit("update:fileName", this.fileList[0].name);
+    },
+    //获取第一帧封面
+    async getFirstThumbnail(){
+      const file = this.fileList[0].raw;
+      getThumbnail(file).then(response => {
+        console.log("获取到第一帧为封面======>",response.url)
+        this.$emit("update:thumbnail", response.url);
+      })
+    },
+    //更新华为线路进度条
+    // updateHwProgress(progress) {
+    //   this.hwProgress = progress;
+    // },
+    //更新腾讯线路进度条
+    updateTxProgress(progressData) {
+      this.txProgress = Math.round(progressData.percent * 100);
+    },
+    //上传腾讯云Pcdn
+    async uploadVideoToTxPcdn() {
+      try {
+        const file = this.fileList[0].raw;
+        const data = await uploadObject(file, this.updateTxProgress,this.type);
+        console.log("腾讯COS返回========>",data);
+        console.log("isPrivate=======>",this.isPrivate)
+        let line_1='' ;
+        if (this.isPrivate===0){
+          line_1 = `${process.env.VUE_APP_VIDEO_LINE_1}${data.urlPath}`;
+        }else {
+          line_1 = `${process.env.VUE_APP_VIDEO_LINE_1}${data.urlPath}`;
+        }
+        line_1 = line_1.replace(/\.mp4$/, '.m3u8');
+
+        let urlPathWithoutFirstSlash = data.urlPath.substring(1);
+        this.$emit("update:fileKey", urlPathWithoutFirstSlash);
+
+        console.log("文件key",urlPathWithoutFirstSlash);
+        console.log("组装URL========>",line_1);
+        this.$emit("update:videoUrl", line_1);
+        this.$emit("update:line_1", line_1);
+        this.$emit("change", line_1,line_1);
+        // this.$emit("update:line_2", line_2);
+        this.$message.success("线路一上传成功");
+      } catch (error) {
+        this.$message.error("线路一上传失败");
+      }
+    },
+    //上传华为云Obs
+    async uploadVideoToHwObs() {
+      try {
+        const file = this.fileList[0].raw;
+        const data = await uploadToOBS(file, this.updateHwProgress,this.type);
+        console.log("华为OBS返回========>",data);
+        let line_2='' ;
+        if (this.isPrivate===0){
+          line_2 = `${process.env.VUE_APP_VIDEO_LINE_2}/${data.urlPath}`;
+        }else {
+          line_2 = `${process.env.VUE_APP_VIDEO_LINE_2}/${data.urlPath}`;
+        }
+        // this.$emit("update:videoUrl", data);
+        this.$emit("update:line_2", line_2);
+        this.$message.success("线路二上传成功");
+      } catch (error) {
+        this.$message.error("线路二上传失败");
+      }
+    },
+    handleRemove(file, fileList) {
+      console.log(file, fileList.length);
+    },
+    reset() {
+      // 重置内部状态
+      this.txProgress = 0;
+      this.fileList = [];
+      // this.$refs.upload.clearFiles();
+      this.uploadKey++;
+    },
+    /** 查询视频库列表 */
+    getLibraryList() {
+      this.libraryLoading = true;
+      // listVideoResource(this.libraryQueryParams).then(response => {
+      //   this.libraryList = response.rows;
+      //   this.libraryTotal = response.total;
+      //   this.libraryLoading = false;
+      // });
+    },
+    /** 搜索视频库按钮操作 */
+    handleLibraryQuery() {
+      this.libraryQueryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置视频库查询按钮操作 */
+    resetLibraryQuery() {
+      this.libraryQueryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        resourceName: null,
+        liveId: -1,
+        videoUrl: null,
+        videoType: -1,
+        sort: null,
+        remark: null,
+        finishStatus:1
+      };
+      this.handleLibraryQuery();
+    },
+    /** 视频库选择行点击 */
+    handleLibrarySelect(row) {
+      this.selectedVideo = row;
+    },
+    /** 格式化视频时长 */
+    formatDuration(seconds) {
+      if (!seconds) return '00:00';
+
+      const minutes = Math.floor(seconds / 60);
+      const remainingSeconds = seconds % 60;
+
+      return `${minutes.toString().padStart(2, '0')}:${remainingSeconds.toString().padStart(2, '0')}`;
+    },
+    /** 确认选择视频 */
+    confirmVideoSelection() {
+      if (!this.selectedVideo) {
+        this.$message.warning("请选择一个视频");
+        return;
+      }
+      console.log("confirmVideoSelection")
+      console.log(this.selectedVideo)
+
+      // 更新组件内部数据
+      this.$emit("update:fileName", this.selectedVideo.fileName);
+      this.$emit("update:line_1", this.selectedVideo.lineOne);
+      this.$emit("update:fileSize", this.selectedVideo.fileSize);
+      this.$emit("update:fileKey", this.selectedVideo.fileKey);
+      this.$emit("video-duration", this.selectedVideo.duration);
+      // 设置预览URL
+      this.$emit("update:videoUrl", this.selectedVideo.videoUrl);
+      this.$emit("change", this.selectedVideo.videoUrl,this.selectedVideo.lineOne);
+
+      if (this.videoUrl.endsWith(".m3u8")) {
+        this.$nextTick(() => {
+          this.initPlayer()
+        })
+      }
+      this.libraryOpen = false;
+    },
+    /** 取消视频选择 */
+    cancelVideoSelection() {
+      this.libraryOpen = false;
+      this.selectedVideo = null;
+    }
+  }
+};
+</script>
+
+<style>
+.progress-container {
+  margin-bottom: 5px; /* 进度条之间的间距 */
+}
+
+.progress-label {
+  display: block;
+  font-weight: bold;
+  font-size: 13px;
+  color: #303331; /* 标签颜色,可以根据需要调整 */
+}
+
+/* 视频库选择对话框样式 */
+.library-search {
+  margin-bottom: 15px;
+}
+
+.el-table .el-table__row:hover {
+  cursor: pointer;
+}
+</style>

+ 2 - 1
src/components/TreeSelect/index.vue

@@ -73,7 +73,7 @@
                   :value="checkedKeysSet.has(item.key)"
                   :disabled="checkboxDisabled(item)"
                   @change="handleCheckboxChange(item, $event)"
-                  @click.stop
+                  @click.native.stop
                   class="node-checkbox"
                 ></el-checkbox>
 
@@ -569,6 +569,7 @@ export default {
       }
     },
     handleCheckboxChange(node, checked) {
+
       if (this.checkboxDisabled(node)) return;
 
       const newCheckedKeys = new Set(this.checkedKeysSet);

+ 10 - 12
src/router/index.js

@@ -5,6 +5,8 @@ Vue.use(Router)
 
 /* Layout */
 import Layout from '@/layout'
+import LiveConsole from "@/views/live/liveConsole/index.vue";
+
 
 /**
  * Note: 路由配置项
@@ -228,19 +230,15 @@ export const constantRoutes = [
       }
     ]
   },
+  // 独立页路由:不嵌套根布局,直接渲染目标组件
   {
-    path: '/live',
-    component: Layout,
-    hidden: true,
-    children: [
-      {
-        path: 'LiveConsole/:liveId', // 动态路由参数
-        component: () => import('@/views/live/liveConsole'), // 使用 import 动态加载
-        name: 'LiveConsole',
-        meta: { title: '直播中控台', activeMenu: '/live/liveConsole' }
-      }
-    ]
-  }
+    path: '/live/liveConsole/:liveId',
+    name: 'LiveConsole',
+    component: LiveConsole, // 直接渲染目标组件,无侧边栏
+    meta: {
+      isIndependentPage: true // 标记为“独立页”
+    }
+  },
 ]
 
 export default new Router({

+ 40 - 1
src/store/index.js

@@ -6,6 +6,7 @@ import tagsView from './modules/tagsView'
 import permission from './modules/permission'
 import settings from './modules/settings'
 import getters from './getters'
+import {LiveWS} from "@/utils/liveWS";
 
 Vue.use(Vuex)
 
@@ -17,7 +18,45 @@ const store = new Vuex.Store({
     permission,
     settings
   },
-  getters
+  getters,
+  state: {
+    liveWs: {}
+  },
+  mutations: {
+    // 更新为支持多个 WebSocket 连接
+    setLiveWs(state, { ws, liveId }) {
+      // 使用 liveId 作为键来存储不同的 WebSocket 连接
+      Vue.set(state.liveWs, liveId, ws);
+    },
+    // 添加移除 WebSocket 连接的 mutation
+    removeLiveWs(state, liveId) {
+      Vue.delete(state.liveWs, liveId);
+    }
+  },
+  actions: {
+    // 修改 action 以正确传递参数
+    initLiveWs({ commit, state }, { liveWsUrl, liveId, userId }) {
+      // 如果已经存在对应 liveId 的连接,先关闭它
+      if (state.liveWs[liveId]) {
+        state.liveWs[liveId].close();
+      }
+
+      // 创建新的 WebSocket 连接
+      const ws = new LiveWS(liveWsUrl, liveId, userId);
+
+      // 提交到 mutation
+      commit('setLiveWs', { ws, liveId });
+
+      return ws;
+    },
+    // 添加关闭特定 WebSocket 连接的 action
+    closeLiveWs({ commit, state }, liveId) {
+      if (state.liveWs[liveId]) {
+        state.liveWs[liveId].close();
+        commit('removeLiveWs', liveId);
+      }
+    }
+  }
 })
 
 export default store

+ 111 - 0
src/utils/liveWS.js

@@ -0,0 +1,111 @@
+import CryptoJS from 'crypto-js'
+
+export class LiveWS {
+  /**
+   * @param {string} url - WebSocket 服务器地址
+   * @param {number} liveId - 直播间ID
+   * @param {number} userId - 用户ID
+   * @param {number} checkInterval - 检查连接状态的时间间隔,单位毫秒
+   * @param {number} reconnectDelay - 连接断开后重连的延迟,单位毫秒
+   */
+  constructor(url, liveId, userId, checkInterval = 5000, reconnectDelay = 3000) {
+    let timestamp = new Date().getTime()
+    let userType = 1
+    let signature = CryptoJS.HmacSHA256(
+      CryptoJS.enc.Utf8.parse('' + liveId + userId + userType + timestamp),
+      CryptoJS.enc.Utf8.parse(timestamp)).toString(CryptoJS.enc.Hex)
+    this.url = url + `?liveId=${liveId}&userId=${userId}&userType=${userType}&timestamp=${timestamp}&signature=${signature}`;
+    this.liveId = liveId;
+    this.userId = userId;
+    this.checkInterval = checkInterval;
+    this.reconnectDelay = reconnectDelay;
+    this.ws = null;
+    this.reconnectTimer = null;
+    this.heartbeatTimer = null;
+    this.isManualClose = false;
+    this.connect();
+    this.startHeartbeat();
+  }
+
+  connect() {
+    // 如果已经有一个连接处于 OPEN 或 CONNECTING 状态,则不再创建新连接
+    if (this.ws && (this.ws.readyState === WebSocket.OPEN || this.ws.readyState === WebSocket.CONNECTING)) {
+      return;
+    }
+
+    this.ws = new WebSocket(this.url);
+
+    // 绑定事件
+    this.ws.onopen = (event) => {
+      // 连接成功后,清除重连计时器
+      if (this.reconnectTimer) {
+        clearTimeout(this.reconnectTimer);
+        this.reconnectTimer = null;
+      }
+    };
+
+    this.ws.onmessage = (event) => {
+      this.onmessage(event);
+    };
+
+    this.ws.onerror = (error) => {
+    };
+
+    this.ws.onclose = (event) => {
+      // 如果不是主动关闭,则重连
+      if (!this.isManualClose) {
+        setTimeout(() => this.reconnect(), this.reconnectDelay);
+      }
+    };
+  }
+
+  onmessage(event) {}
+
+  reconnect() {
+    this.connect();
+  }
+
+  // 调度重连
+  scheduleReconnect() {
+    // 避免多次重连定时器同时存在
+    if (this.reconnectTimer) return;
+    this.reconnectTimer = setTimeout(() => {
+      this.connect();
+    }, this.reconnectDelay);
+  }
+
+  // 定时检查连接状态
+  startHeartbeat() {
+    this.heartbeatTimer = setInterval(() => {
+      if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
+        this.scheduleReconnect();
+      } else {
+        // 发送信息
+        this.ws.send(JSON.stringify({'cmd':'heartbeat','msg':'ping', 'liveId': this.liveId, 'userId': this.userId}));
+      }
+    }, this.checkInterval);
+  }
+
+  // 主动关闭 WebSocket 连接,并清除定时任务
+  close() {
+    this.isManualClose = true;
+    if (this.heartbeatTimer) {
+      clearInterval(this.heartbeatTimer);
+    }
+    if (this.reconnectTimer) {
+      clearTimeout(this.reconnectTimer);
+    }
+    if (this.ws) {
+      this.ws.close();
+    }
+  }
+
+  // 发送消息方法
+  send(message) {
+    if (this.ws && this.ws.readyState === WebSocket.OPEN) {
+      this.ws.send(message);
+    } else {
+      console.error("WebSocket is not open. Message not sent.");
+    }
+  }
+}

+ 6 - 1
src/utils/obs.js

@@ -39,7 +39,11 @@ export const uploadToOBS = async (file, progressCallback, type, cancelCallback)
           },
         })
       }
-
+      //四福堂专属配置
+   /*   resolve({
+        "RequestId": "",
+        "urlPath": ""
+      })*/
       obsClient.putObject(
         {
           Bucket: process.env.VUE_APP_OBS_BUCKET,
@@ -65,6 +69,7 @@ export const uploadToOBS = async (file, progressCallback, type, cancelCallback)
           }
         },
       )
+      //注释到这里【四福堂】
     })
   } catch (error) {
     console.error("Error during upload:", error)

+ 48 - 0
src/utils/util.js

@@ -0,0 +1,48 @@
+import {isExternal} from '@/utils/validate'
+import store from '@/store'
+
+export function formatDictText(dicts, values) {
+    if (!(Array.isArray(dicts) && dicts.length > 0)) {
+        return values;
+    }
+    if (!values) {
+        return ""
+    }
+    let valueArr = values.split(",")
+    let contentArr = []
+    dicts.forEach(dict => {
+        for (let i = 0; i < valueArr.length; i++) {
+            if (valueArr[i] === dict.value) {
+                contentArr.push(dict.content)
+                break;
+            }
+        }
+    })
+    return contentArr.toString()
+}
+
+export function randomString(len) {
+    len = len || 32
+    const $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'
+    /** **默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
+    const maxPos = $chars.length
+    let pwd = ''
+    for (let i = 0; i < len; i++) {
+        pwd += $chars.charAt(Math.floor(Math.random() * maxPos))
+    }
+    return pwd
+}
+
+function isEmpty(str) {
+  // 检查是否为 null 或 undefined
+  if (str == null) return true;
+
+  // 检查是否为字符串类型
+  if (typeof str !== 'string') {
+    // 如果不是字符串,尝试转换为字符串再判断
+    return String(str).trim() === '';
+  }
+
+  // 字符串类型直接去除空格后判断
+  return str.trim() === '';
+}

+ 3 - 0
src/views/chat/chatSession/index.vue

@@ -327,6 +327,9 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.dateRange = [];
+      this.queryParams.beginTime=null;
+      this.queryParams.endTime=null;
       this.resetForm("queryForm");
       this.handleQuery();
     },

+ 4 - 5
src/views/company/companyMoneyLogs/index.vue

@@ -106,8 +106,8 @@
       <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="money" />
+      <el-table-column label="余额" align="center" prop="balance" />
 
       <el-table-column label="商城订单号" align="center" prop="orderCode"  v-if="queryParams.logsType==3 || queryParams.logsType==4 ||queryParams.logsType==5 || queryParams.logsType==6"  />
       <el-table-column label="支付类型" align="center" prop="payTypeCode"  v-if="queryParams.logsType==3 || queryParams.logsType==4 ||queryParams.logsType==5 || queryParams.logsType==6 " />
@@ -302,14 +302,13 @@ export default {
     /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.pageNum = 1;
-
       this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
-
-      this.resetForm("queryForm");
+      this.createTimeRange=[]
       this.dateRange=[];
+      this.resetForm("queryForm");
       this.queryParams.beginTime=null;
       this.queryParams.endTime=null;
       this.handleQuery();

+ 1 - 1
src/views/company/companyRecharge/index.vue

@@ -246,8 +246,8 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
       this.dateRange=[];
+      this.resetForm("queryForm");
       this.handleQuery();
     },
     // 多选框选中数据

+ 1692 - 0
src/views/company/companyUser/indexAll.vue

@@ -0,0 +1,1692 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="20">
+      <!--部门数据-->
+      <el-col :span="3" :xs="24">
+        <div class="head-container">
+          <el-input v-model="deptName" placeholder="请输入部门名称" clearable size="small" prefix-icon="el-icon-search" style="margin-bottom: 20px" />
+        </div>
+        <div class="head-container">
+          <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" :filter-node-method="filterNode" ref="tree"  @node-click="handleNodeClick" />
+        </div>
+      </el-col>
+      <!--用户数据-->
+      <el-col :span="21" :xs="24">
+        <el-form  :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
+          <el-form-item label="员工后台昵称" prop="nickName">
+            <el-input v-model="queryParams.nickName" placeholder="请输入员工后台昵称" clearable size="small" style="width: 240px" @keyup.enter.native="handleQuery" />
+          </el-form-item>
+          <el-form-item label="手机号码" prop="phonenumber">
+            <el-input v-model="queryParams.phonenumber" placeholder="请输入手机号码" clearable size="small" style="width: 240px" @keyup.enter.native="handleQuery" />
+          </el-form-item>
+          <el-form-item label="状态" prop="status">
+            <el-select v-model="queryParams.status" placeholder="员工状态" clearable size="small" style="width: 240px" @change="handleQuery">
+              <el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="企微状态" prop="qwStatus">
+            <el-select v-model="queryParams.qwStatus" placeholder="企微绑定状态" clearable size="small" style="width: 240px"  @change="handleQuery">
+              <el-option v-for="dict in qwStatusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
+            </el-select>
+          </el-form-item>
+
+          <el-form-item label="创建时间">
+            <el-date-picker v-model="dateRange" 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  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  plain type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['company:user:add']">新增</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button  plain type="success" icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['company:user:edit']">修改</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button  plain type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['company:user:remove']">删除</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button  plain type="info" icon="el-icon-upload2" size="mini" @click="handleImport" v-hasPermi="['company:user:import']">导入</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button  plain type="warning" icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['company:user:export']">导出</el-button>
+          </el-col>
+          <el-col :span="1.5">
+           <el-button
+             type="primary"
+             plain
+             size="mini"
+             @click="synOpen=true"
+             v-hasPermi="['qw:user:sync']"
+           >同步企微员工和部门</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              plain
+              size="mini"
+              @click="synNameOpen=true"
+              v-hasPermi="['qw:user:sync']"
+            >同步企微员工名称</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              plain
+              size="mini"
+              :disabled="multiple"
+              @click="handerCompanyUserAreaList"
+            >批量设置销售所属区域</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              plain
+              size="mini"
+              :disabled="multiple"
+              @click="handleSetRegister"
+            >设置单独注册会员</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              plain
+              size="mini"
+              :disabled="multiple"
+              @click="handleAllowedAllRegister"
+            >允许注册会员开关</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              plain
+              size="mini"
+              @click="handleBindCompanyUserCode"
+            >生成注册/绑定销售二维码</el-button>
+          </el-col>
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+        </el-row>
+
+        <el-table  height="500" border v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
+          <el-table-column type="selection" width="50" align="center" />
+          <el-table-column label="ID" align="center" prop="userId" :show-overflow-tooltip="true" />
+          <el-table-column label="员工后台账号" align="center" prop="userName" :show-overflow-tooltip="true" width="100" />
+          <el-table-column label="员工后台昵称" align="center" prop="nickName" :show-overflow-tooltip="true" 员工后台  width="100"/>
+          <el-table-column label="部门" align="center" prop="deptName" :show-overflow-tooltip="true" />
+          <el-table-column label="手机号码" align="center" prop="phonenumber" width="120" />
+          <el-table-column label="账户角色" align="center" :show-overflow-tooltip="true" width="150">
+            <template slot-scope="scope">
+              <span v-if="scope.row.roleNames && scope.row.roleNames.length > 0">
+                {{ scope.row.roleNames.join('、') }}
+              </span>
+              <span v-else>-</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="二维码" align="center" prop="qrCodeWeixin">
+            <template slot-scope="scope">
+              <!-- 显示已上传的二维码 -->
+              <el-image
+                v-if="scope.row.qrCodeWeixin"
+                style="width: 80px; height: 80px; margin-bottom: 5px; display: block; margin-left: auto; margin-right: auto;"
+                :src="scope.row.qrCodeWeixin"
+                :preview-src-list="[scope.row.qrCodeWeixin]"
+                fit="contain">
+                <div slot="error" class="image-slot">
+                  <i class="el-icon-picture-outline"></i>
+                </div>
+              </el-image>
+              <!-- 上传组件 -->
+              <el-upload
+                class="avatar-uploader"
+                action="#"
+                :show-file-list="false"
+                :http-request="(options) => handleCustomUpload(options, scope.row)"
+                :before-upload="(file) => beforeImageUpload(file, scope.row)"
+              >
+                <el-button size="small" type="primary" :loading="scope.row.uploading">
+                  {{ scope.row.qrCodeWeixin ? '更换图片' : '上传图片' }}
+                  <i class="el-icon-upload el-icon--right"></i>
+                </el-button>
+              </el-upload>
+              <div v-if="scope.row.uploadError" class="el-upload__tip" style="color: red;">
+                {{ scope.row.uploadError }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="状态" align="center">
+            <template slot-scope="scope">
+              <el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
+            </template>
+          </el-table-column>
+          <el-table-column label="企微状态" align="center">
+            <template slot-scope="scope">
+              <dict-tag :options="qwStatusOptions" :value="scope.row.qwStatus"/>
+            </template>
+          </el-table-column>
+          <el-table-column label="绑定的企微号" align="center">
+            <template slot-scope="scope">
+              <div v-if="scope.row.qwUsers && scope.row.qwUsers.length > 0">
+                <div v-for="user in scope.row.qwUsers" :key="user.id">
+                  <el-tag size="mini">{{ user.qwUserName }}</el-tag>
+                </div>
+              </div>
+              <div v-else>
+                <dict-tag :options="qwStatusOptions" :value="scope.row.qwStatus"/>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column label="区域" align="center" prop="addressId">
+          </el-table-column>
+          <el-table-column label="创建时间"  sortable align="center" prop="createTime" width="160">
+            <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.createTime) }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="是否单独注册会员" align="center" prop="isNeedRegisterMember" width="80px">
+            <template slot-scope="scope">
+              <el-tag
+                :type="scope.row.isNeedRegisterMember === 1 ? 'success' : 'info'">{{scope.row.isNeedRegisterMember === 1 ? '是' : '否' }}</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column label="允许注册会员" align="center" prop="isNeedRegisterMember" width="80px">
+            <template slot-scope="scope">
+              <el-tag
+                :type="scope.row.isAllowedAllRegister === 1 ? 'success' : 'info'">{{scope.row.isAllowedAllRegister === 1 ? '是' : '否' }}</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-connection"
+                plain
+                v-if="scope.row.doctorId!=null"
+                @click="handleUpdateDoctor(scope.row)"
+              >换绑医生</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                plain
+                icon="el-icon-link"
+                v-else
+                @click="handleUpdateDoctor(scope.row)"
+              >绑定医生</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-unlock"
+                plain
+                v-if="scope.row.doctorId!=null"
+                @click="handleUnBindUserId(scope.row)"
+              >解绑医生</el-button>
+              <el-button
+                v-if="scope.row.qwStatus == 0"
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="qwBind(scope.row)"
+                v-hasPermi="['qw:user:bind']"
+              >绑定企微</el-button>
+
+              <el-button
+                v-else
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="qwBind(scope.row)"
+                v-hasPermi="['qw:user:bind']"
+              >查或换绑企微</el-button>
+
+              <el-button v-if="scope.row.userType !== '00'" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['company:user:edit']">修改</el-button>
+              <el-button v-if="scope.row.userType !== '00'" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['company:user:remove']">删除</el-button>
+              <el-button size="mini" type="text" icon="el-icon-key" @click="handleResetPwd(scope.row)" v-hasPermi="['company:user:resetPwd']">重置密码</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-col>
+    </el-row>
+
+    <!-- 批量修改角色对话框 -->
+    <el-dialog title="批量修改角色" :visible.sync="batchRoleDialogVisible" width="500px" append-to-body>
+      <el-form :model="batchRoleForm" label-width="80px">
+        <el-form-item label="选择角色">
+          <el-select v-model="selectedRoleIds" multiple placeholder="请选择角色" style="width: 100%;">
+            <el-option
+              v-for="item in roleOptions"
+              :key="item.roleId"
+              :label="item.roleName"
+              :value="item.roleId">
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="batchRoleDialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitBatchRoles">确 定</el-button>
+      </div>
+    </el-dialog>
+
+    <!--当点击查或换绑微信时候弹出此框-->
+    <el-dialog title="绑定企微账号"  :visible.sync="qwOpen" width="800px" append-to-body >
+      <el-form ref="form" :model="form"  label-width="80px" >
+        <el-form-item label="查询"  prop="companyUserId">
+          <el-button type="primary" icon="el-icon-search"  @click="selectQwUser()"  size="mini">搜索账号</el-button>
+        </el-form-item>
+        <el-form-item label="企微账号"  prop="companyUserId">
+          <el-tag
+            style="margin-left: 5px"
+            size="medium"
+            :key="id"
+            v-for="id in qwUser"
+            closable
+            :disable-transitions="false"
+            @close="handleClosegroupUser(id)">
+            <span v-for="list in qwUserList" :key="list.qwUserId" v-if="list.id==id">{{list.qwUserName}}({{list.corpName}})
+            </span>
+          </el-tag>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="qwSubmitForm">绑 定</el-button>
+        <el-button @click="qwCancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog title="选择企微主体" :visible.sync="synOpen" width="800px" append-to-body>
+      <el-form   label-width="80px">
+        <el-form-item label="企微公司" prop="corpId">
+          <el-select v-model="synform.corpId" placeholder="企微公司"  >
+            <el-option
+              v-for="dict in myQwCompanyList"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="synSubmitForm">确 定</el-button>
+        <el-button @click="synOpen=false">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog title="选择企微主体" :visible.sync="synNameOpen" width="800px" append-to-body>
+      <el-form   label-width="80px">
+        <el-form-item label="企微公司" prop="corpId">
+          <el-select v-model="synNameform.corpId" placeholder="企微公司"  >
+            <el-option
+              v-for="dict in myQwCompanyList"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="synNameSubmitForm">确 定</el-button>
+        <el-button @click="synNameOpen=false">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 添加或修改参数配置对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-row>
+          <el-col :span="12">
+<!--            <el-form-item label="员工账号" prop="userName">-->
+<!--              <el-input v-model="form.userName" placeholder="请输入员工后台账号" />-->
+<!--            </el-form-item>-->
+            <el-form-item label="员工姓名" prop="nickName">
+              <el-input v-model="form.nickName" placeholder="请输入员工后台昵称" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="归属部门" prop="deptId">
+              <treeselect v-model="form.deptId" :options="deptOptionsByCompanyId" :show-count="true" placeholder="请选择归属部门" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="手机号码" prop="phonenumber">
+              <el-input v-model="form.phonenumber" placeholder="请输入手机号码" maxlength="11" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="邮箱" prop="email">
+              <el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="员工账号" prop="userName">
+              <el-input v-model="form.userName" placeholder="请输入员工工号" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
+              <el-input v-model="form.password" placeholder="请输入用户密码" type="password" show-password />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="员工性别">
+              <el-select v-model="form.sex" placeholder="请选择">
+                <el-option v-for="dict in sexOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="状态">
+              <el-radio-group v-model="form.status">
+                <el-radio v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictValue">{{dict.dictLabel}}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="岗位">
+              <el-select v-model="form.postIds" multiple placeholder="请选择">
+                <el-option v-for="item in postOptions" :key="item.postId" :label="item.postName" :value="item.postId" :disabled="item.status == 1"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="角色">
+              <el-select v-model="form.roleIds" multiple placeholder="请选择">
+                <el-option v-for="item in roleOptions" :key="item.roleId" :label="item.roleName" :value="item.roleId" :disabled="item.status == 1"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+        </el-row>
+         <el-row>
+          <el-col :span="12">
+            <el-form-item label="身份证号">
+              <el-input v-model="form.idCard" placeholder="请输入身份证号" maxlength="18" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="销售区域" prop="addressId">
+              <el-select v-model="form.addressId"  filterable placeholder="请选择所属销售的区域" style="width: 200px;">
+                <el-option
+                  v-for="item in citysAreaList"
+                  :key="item.cityId"
+                  :label="item.cityName"
+                  :value="item.cityId"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+<!--        <el-row>-->
+<!--          <el-col :span="24">-->
+<!--            <el-form-item label="数据权限">-->
+<!--              <el-radio-group v-model="form.userType">-->
+<!--                <el-radio v-for="dict in userTypeOptions" :key="dict.dictValue" :label="dict.dictValue">{{dict.dictLabel}}</el-radio>-->
+<!--              </el-radio-group>-->
+<!--            </el-form-item>-->
+<!--          </el-col>-->
+<!--        </el-row>-->
+<!--        <el-row>
+          <el-col :span="24">
+            <el-form-item label="看课域名">
+              <el-input
+                v-model="form.domain"
+                style="width: 250px"
+                placeholder="请生成域名"
+                @change="onDomainBlur"
+                disabled
+              ></el-input>
+              <el-button type="primary" style="margin-left: 20px" @click="generateDomain">生成域名</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>-->
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="备注">
+              <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </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>
+
+    <el-dialog :title="title" :visible.sync="bindCompanyOpen" width="700px" append-to-body>
+      <el-form ref="formBindCompany" :model="formBindCompany" :rules="bindCompanyRules" label-width="80px">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="企微主体" prop="corpId">
+              <el-select v-model="formBindCompany.corpId" placeholder="企微主体" size="small">
+                <el-option
+                  v-for="dict in myQwCompanyList"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="销售公司" prop="companyId">
+              <el-select filterable  v-model="formBindCompany.companyId" placeholder="请选择销售公司"  clearable size="small" @change="formBindCompanyChange">
+                <el-option
+                  v-for="item in companys"
+                  :key="item.companyId"
+                  :label="item.companyName"
+                  :value="item.companyId"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <div v-if="formBindCompany.companyId!=null">
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="归属部门" prop="deptId">
+                <treeselect v-model="formBindCompany.deptId" :options="deptOptionsByCompanyId" :show-count="true" placeholder="请选择归属部门" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="角色" prop="roleIds">
+                <el-select v-model="formBindCompany.roleIds" multiple placeholder="请选择">
+                  <el-option v-for="item in roleBindOptions" :key="item.roleId" :label="item.roleName" :value="item.roleId "></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="销售区域" prop="addressId">
+              <el-select v-model="formBindCompany.addressId"  filterable placeholder="请选择所属销售的区域" style="width: 200px;">
+                <el-option
+                  v-for="item in citysAreaList"
+                  :key="item.cityId"
+                  :label="item.cityName"
+                  :value="item.cityId"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitBingCompanyForm">确 定</el-button>
+        <el-button @click="cancelBind">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 修改 selectUser 组件的引用 -->
+    <el-dialog :title="user.title" :visible.sync="user.open" width="1000px" append-to-body>
+      <selectUser ref="selectUser" @bindQwUser="bindQwUser" @close="handleSelectUserClose"/>
+    </el-dialog>
+
+    <el-dialog :title="companyUserArea.title" :visible.sync="companyUserArea.open" width="300px" append-to-body>
+      <el-select v-model="addressId"  filterable placeholder="请选择所属销售的区域" style="width: 200px;">
+        <el-option
+          v-for="item in citysAreaList"
+          :key="item.cityId"
+          :label="item.cityName"
+          :value="item.cityId"
+        ></el-option>
+      </el-select>
+      <div slot="footer" style="text-align: center;">
+        <el-button type="primary" @click="submitFormArea(addressId)">确 定</el-button>
+        <el-button @click="cancelArea">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 设置单独注册会员弹窗 -->
+    <!-- 设置单独注册会员 -->
+    <el-dialog title="设置单独注册会员" :visible.sync="registerOpen" width="400px" append-to-body>
+      <el-form ref="registerForm" :model="registerForm" label-width="160px">
+        <el-form-item label="是否开启单独注册">
+          <el-switch v-model="registerForm.status" :active-value="true" :inactive-value="false"></el-switch>
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitRegisterForm">确 定</el-button>
+          <el-button @click="registerOpen = false">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <!-- 允许注册会员 -->
+    <el-dialog title="允许注册会员" :visible.sync="allowedAllRegisterOpen" width="400px" append-to-body>
+      <el-form ref="allowedAllRegisterForm" :model="allowedAllRegisterForm" label-width="160px">
+        <el-form-item label="是否允许注册会员">
+          <el-switch v-model="allowedAllRegisterForm.status" :active-value="true" :inactive-value="false"></el-switch>
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitAllowedAllRegisterForm">确 定</el-button>
+          <el-button @click="allowedAllRegisterOpen = false">取 消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <el-dialog :title="bindCompanyUrl.title" v-if="bindCompanyUrl.open"  :visible.sync="bindCompanyUrl.open" width="450px"  append-to-body>
+      <div style="padding-bottom:15px;" >
+        <img :src="bindCompanyUrl.url" width="400px">
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="downloadImage(bindCompanyUrl.url, bindCompanyUrl.name+'.png')">下载二维码</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        <div class="el-upload__tip text-center" slot="tip">
+          <div class="el-upload__tip" slot="tip">
+          </div>
+          <span>仅允许导入xls、xlsx格式文件。</span>
+          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
+        </div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog :title="doctor.title" :visible.sync="doctor.open" width="800px" append-to-body>
+      <selectDoctor ref="selectDoctor" @bindCompanyUserDoctorId="bindCompanyUserDoctorId"></selectDoctor>
+    </el-dialog>
+
+    <el-dialog title="请选择要新增的销售公司" :visible.sync="companyIdOpen.open" width="400px" append-to-body>
+      <el-form>
+        <el-form-item label="公司名" prop="companyId">
+          <el-select filterable  v-model="companyIdOpen.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>
+          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQueryCompanyId">确定</el-button>
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQueryCompanyId">取消</el-button>
+        </el-form-item>
+      </el-form>
+
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import {
+  qwList,
+  delUser,
+  addUser,
+  getUser,
+  updateUser,
+  exportUser,
+  resetUserPwd,
+  importTemplate,
+  getCitysAreaList,
+  changeUserStatus,
+  generateSubDomain,
+  setIsRegisterMember,
+  updateCompanyUserAreaList,
+  isAllowedAllRegister, unBindDoctorId, bindDoctorId, updateBatchUserRoles, addCodeUrl, addInfo
+} from '@/api/company/companyUserAll'
+import { getToken } from "@/utils/auth";
+import { treeselect } from "@/api/company/companyDept";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {bindQwUser, addQwUser, getQwUserByIds,addQwUserName} from '@/api/qw/user';
+import { syncDept } from '@/api/qw/qwDept';
+import {getMyQwCompanyList } from "@/api/qw/user";
+import  selectUser  from "@/views/company/components/selectQwUser.vue";
+import { getConfigByKey } from "@/api/company/companyConfig";
+import axios from "axios";
+import selectDoctor from "@/views/qw/user/selectDoctor.vue";
+import { getCompanyList } from '@/api/company/company'
+export default {
+  name: "User",
+  components: {selectDoctor, Treeselect ,selectUser},
+  data() {
+    return {
+      companyIdOpen:{
+        open:null,
+        companyId:null,
+      },
+      companys:[],
+      doctor: {
+        open: false,
+        title: '绑定医生'
+      },
+      doctorForm: {
+        userId: null,
+        doctorId: null
+      },
+      uploadUrl: process.env.VUE_APP_BASE_API+"/company/CompanyUserAll/common/uploadOSS",
+      // 遮罩层
+      loading: false,
+      qwUserList:[],
+      qwUserId:[],
+      myQwCompanyList:[],
+      qwUser:[],
+      user:{
+        open:false,
+        title:"搜索企业"
+      },
+      // 选中数组
+      ids: [],
+
+      //允许注册会员
+      isAllowedAllRegister: [],
+
+      //是否单独注册
+      isNeedRegisterMember: [],
+      synform:{corpId:null},
+      synOpen:false,
+      synNameform:{corpId:null},
+      synNameOpen:false,
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 用户表格数据
+      userList: null,
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      deptOptionsByCompanyId: undefined,
+      // 是否显示弹出层
+      open: false,
+      bindCompanyOpen: false,
+      qwOpen:false,
+      // 部门名称
+      deptName: undefined,
+      // 日期范围
+      dateRange: [],
+      // 状态数据字典
+      statusOptions: [],
+      // 性别状态字典
+      sexOptions: [],
+      // 岗位选项
+      postOptions: [],
+      // 角色选项
+      roleOptions: [],
+      roleBindOptions: [],
+      userTypeOptions:[
+        { "dictLabel": "临时管理员","dictValue": "02"},
+        { "dictLabel": "普通用户","dictValue": "01"}
+      ],
+      qwForm:{
+        id:null,
+        companyUserId:null,
+      },
+      companyUserArea:{
+        open:false,
+        title:"分配区域",
+      },
+      //选择的区域
+      addressId:null,
+
+      citysAreaList:[],
+      // 表单参数
+      form: {},
+      formBindCompany: {},
+
+      bindCompanyUrl:{
+        open:false,
+        title:"绑定/注册销售二维码",
+        name:null,
+        url:null,
+      },
+
+      form1: {},
+      defaultProps: {
+        children: "children",
+        label: "label",
+      },
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/company/CompanyUserAll/importCompanyUser",
+      },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        userName: null,
+        companyId:null,
+        phonenumber: null,
+        status: null,
+        deptId: null,
+        qwStatus:null,
+      },
+      qwStatusOptions:[],
+      registerOpen: false,
+      registerForm: {
+        status: false,
+      },
+      // 表单校验
+      rules: {
+        userName: [
+          { required: true, message: "员工工号不能为空", trigger: "blur" },
+        ],
+        nickName: [
+          { required: true, message: "员工姓名不能为空", trigger: "blur" },
+        ],
+        deptId: [
+          { required: true, message: "归属部门不能为空", trigger: "blur" },
+        ],
+        addressId: [
+          { required: true, message: "销售所属区域不能为空", trigger: "blur" },
+        ],
+        password: [
+          { required: true, message: "员工密码不能为空", trigger: "blur" },
+          {
+            pattern: /^(?=.*[A-Za-z])(?=.*\d)(?=.*[^A-Za-z0-9]).{8,20}$/,
+            message: "密码长度为 8-20 位,必须包含字母、数字和特殊字符",
+            trigger: ["blur", "change"],
+          }
+        ],
+        idCard: [
+          { required: true, message: "身份证号不能为空", trigger: "blur" },
+        ],
+        // email: [
+        //   { required: true, message: "邮箱地址不能为空", trigger: "blur" },
+        //   {
+        //     type: "email",
+        //     message: "'请输入正确的邮箱地址",
+        //     trigger: ["blur", "change"],
+        //   },
+        // ],
+        phonenumber: [
+          { required: true, message: "手机号码不能为空", trigger: "blur" },
+          {
+            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+            message: "请输入正确的手机号码",
+            trigger: "blur",
+          },
+        ],
+      },
+      // 表单校验
+      bindCompanyRules: {
+        companyId: [
+          { required: true, message: "销售公司不能为空", trigger: "blur" },
+        ],
+        deptId: [
+          { required: true, message: "归属部门不能为空", trigger: "blur" },
+        ],
+        addressId: [
+          { required: true, message: "销售所属区域不能为空", trigger: "blur" },
+        ],
+        roleIds: [
+          { required: true, message: "角色不能为空", trigger: "blur" },
+        ],
+        corpId: [
+          { required: true, message: "角色不能为空", trigger: "blur" },
+        ],
+      },
+      // 是否允许注册会员开关
+      allowedAllRegisterOpen: false,
+      allowedAllRegisterForm: {
+        status: true
+      },
+      // 在 data() 中添加
+      batchRoleDialogVisible: false,
+      selectedRoleIds: [],
+      batchRoleForm: {
+        userIds: [],
+        roleIds: []
+      },
+    };
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    },
+  },
+  created() {
+    this.getList();
+    this.getTreeselect();
+    getCompanyList().then(response => {
+      this.companys = response.data;
+    });
+    this.getDicts("sys_normal_disable").then((response) => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("company_user_sex").then((response) => {
+      this.sexOptions = response.data;
+    });
+    this.getDicts("sys_qw_user_status").then(response => {
+          this.qwStatusOptions = response.data;
+    });
+    getConfigByKey("his.login").then(response => {
+      this.form1 =JSON.parse(response.data.configValue);
+    });
+    getCitysAreaList().then(res=>{
+      this.citysAreaList=res.data;
+    })
+    getMyQwCompanyList().then(response => {
+      this.myQwCompanyList = response.data;
+    });
+  },
+  methods: {
+    onDomainBlur() {
+      if (this.form.domain != null) {
+        let value = this.form.domain.trim();
+
+        // 强制只保留第一个 http://
+        const httpCount = (value.match(/http:\/\//g) || []).length;
+        if (httpCount > 1) {
+          value = value.replace(/(http:\/\/)+/, 'http://'); // 只留第一个
+        }
+
+        // 如果不是 http:// 开头,自动补充
+        if (!value.startsWith('http://')) {
+          value = 'http://' + value.replace(/^https?:\/\//, ''); // 去掉其他 http(s):// 再补
+        }
+
+        this.form.domain = value; // 重新赋值,保证输入正确
+
+        // 正则校验最终格式,提醒用户
+        const domainPattern = /^http:\/\/([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/;
+        if (!domainPattern.test(this.form.domain)) {
+          return this.$message.error('请输入正确格式的域名,如:http://xxx.xxx.com');
+        }
+      }
+    },
+
+    // 添加处理 selectUser 关闭的方法
+    handleSelectUserClose() {
+      this.user.open = false
+      // 如果 selectUser 组件有 clearSelection 方法,也可以调用
+      if (this.$refs.selectUser && typeof this.$refs.selectUser.clearSelection === 'function') {
+        this.$refs.selectUser.clearSelection()
+      }
+    },
+
+    // edit G start
+    // 修改 selectQwUser 方法
+    selectQwUser() {
+      this.user.open = true;
+      // 在下次DOM更新后设置已选中的项
+      this.$nextTick(() => {
+        if (this.$refs.selectUser && this.qwUserList.length > 0) {
+          // 将已选中的用户传递给子组件
+          this.$refs.selectUser.setSelectedUsers(this.qwUserList);
+        }
+      });
+    },
+
+    // 修改 bindQwUser 方法
+    bindQwUser(row) {
+      // this.user.open = false; // 暂时注释掉这行,改为在 handleBatchBind 中处理
+      if (!this.qwUserList.some(item => item.id == row.id)) {
+        this.qwUserList.push(row)
+      }
+      if (!this.qwUser.some(item => item == row.id)) {
+        this.qwUser.push(row.id)
+      }
+    },
+
+    // 修改 qwBind 方法
+    qwBind(row) {
+      this.qwUser = [];
+      this.qwUserList = [];
+      this.qwForm.companyUserId = row.userId;
+      getUser(row.userId).then((response) => {
+        if (response.data.qwUserId != null) {
+          // 保存已绑定的企微用户ID列表
+          this.qwUser = ((response.data.qwUserId).split(",").map(Number));
+          getQwUserByIds(this.qwUser).then(res => {
+            this.qwUserList = res.data;
+          });
+        }
+        // 先打开"绑定企微账号"对话框
+        this.qwOpen = true;
+      });
+    },
+
+    // 添加批量角色更新提交方法
+    submitBatchRoles() {
+      // 验证选择的角色
+      if (!this.selectedRoleIds || this.selectedRoleIds.length === 0) {
+        this.$message.warning("请至少选择一个角色");
+        return;
+      }
+
+      // 调用API批量更新用户角色
+      updateBatchUserRoles({ userIds: this.ids, roleIds: this.selectedRoleIds })
+        .then(response => {
+          if (response.code === 200) {
+            this.$message.success("批量修改角色成功");
+            this.batchRoleDialogVisible = false;
+            this.getList(); // 刷新列表
+          }
+        });
+    },
+    // edit G end
+
+    /** 查询用户列表 */
+    getList() {
+      this.loading = true;
+      qwList(this.addDateRange(this.queryParams, this.dateRange)).then(
+        (response) => {
+          this.userList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        }
+      );
+    },
+
+    handleClosegroupUser(list) {
+      const index = this.qwUser.findIndex(t => t === list);
+      if (index !== -1) {
+        this.qwUser.splice(index, 1);
+      }
+    },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then((response) => {
+        this.deptOptions = response.data;
+      });
+    },
+
+    getTreeselectByCompanyId(companyId) {
+      treeselect({companyId}).then((response) => {
+        this.deptOptionsByCompanyId = response.data;
+      });
+    },
+
+    // 筛选节点
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.label.indexOf(value) !== -1;
+    },
+    // 节点单击事件
+    handleNodeClick(data) {
+      this.queryParams.deptId = data.id;
+      this.queryParams.companyId=data.companyId;
+      this.getList();
+    },
+    // 用户状态修改
+    handleStatusChange(row) {
+      let text = row.status === "0" ? "启用" : "停用";
+      this.$confirm(
+        '确认要"' + text + '""' + row.userName + '"用户吗?',
+        "警告",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(function() {
+          return changeUserStatus(row.userId, row.status);
+        })
+        .then(() => {
+          this.msgSuccess(text + "成功");
+        })
+        .catch(function() {
+          row.status = row.status === "0" ? "1" : "0";
+        });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    cancelBind() {
+      this.bindCompanyOpen = false;
+      this.resetBindCompany();
+    },
+
+    submitFormArea(address) {
+      const uIds = this.ids;
+
+      if (address == null) {
+        this.$message.error("请选择地区");
+        return;
+      }
+      updateCompanyUserAreaList({ userIds: uIds, addressId: address }).then(res => {
+        this.companyUserArea.open = false;
+        this.getList();
+        this.msgSuccess("操作成功");
+
+      })
+
+    },
+    cancelArea() {
+      this.companyUserArea.open = false;
+      this.addressId = null;
+    },
+    qwCancel() {
+      this.qwOpen = false;
+      this.qwUserId = null;
+    },
+
+    handerCompanyUserAreaList() {
+      this.companyUserArea.open = true;
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        userId: undefined,
+        deptId: undefined,
+        userName: undefined,
+        nickName: undefined,
+        password: undefined,
+        idCard: undefined,
+        phonenumber: undefined,
+        userType: "01",
+        email: undefined,
+        sex: undefined,
+        status: "0",
+        remark: undefined,
+        domain: null,
+        postIds: [],
+        roleIds: [],
+      };
+      this.resetForm("form");
+    },
+
+    resetBindCompany() {
+      this.formBindCompany = {
+        deptId: null,
+        addressId: null,
+        roleIds: [],
+        companyId: null,
+      };
+      this.resetForm("formBindCompany");
+    },
+
+    /** 搜索按钮操作 */
+    handleQueryCompanyId() {
+      if (this.companyIdOpen.companyId == null) {
+        return this.$message.warning("请选择公司");
+      }
+      this.reset();
+      this.getTreeselectByCompanyId(this.companyIdOpen.companyId);
+      addInfo(this.companyIdOpen.companyId).then((response) => {
+        this.postOptions = response.posts;
+        this.roleOptions = response.roles;
+        this.open = true;
+        this.title = "添加员工";
+        this.form.password = this.form1.loginPassword;
+      });
+    },
+
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.companyIdOpen.open=true;
+    },
+
+    /** 重置按钮操作 */
+    resetQueryCompanyId() {
+      this.companyIdOpen.companyId=null;
+      this.companyIdOpen.open=false;
+    },
+
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.page = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.userId);
+      this.isNeedRegisterMember = selection.map((item) => item.isNeedRegisterMember);
+      this.isAllowedAllRegister = selection.map((item) => item.isAllowedAllRegister);
+      this.single = selection.length != 1;
+      this.multiple = !selection.length;
+    },
+
+
+    handleBindCompanyUserCode() {
+      this.reset();
+      this.getTreeselect();
+
+      this.bindCompanyOpen = true;
+      this.title = "创建 新增/绑定销售 的二维码";
+
+    },
+
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const userId = row.userId || this.ids;
+      getUser(userId).then((response) => {
+        this.getTreeselectByCompanyId(response.data.companyId);
+        setTimeout(() => {
+          this.form = response.data;
+          this.postOptions = response.posts;
+          this.roleOptions = response.roles;
+          this.form.postIds = response.postIds;
+          this.form.roleIds = response.roleIds;
+          this.open = true;
+          this.title = "修改员工";
+          this.form.password = "";
+        }, 200);
+      });
+    },
+    /** 重置密码按钮操作 */
+    handleResetPwd(row) {
+      this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        inputPlaceholder: "8-20 位,包含字母、数字和特殊字符",
+        inputValidator: (value) => {
+          const pattern = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[^A-Za-z0-9]).{8,20}/;
+          const hasChinese = /[\u4e00-\u9fa5]/.test(value);
+          const hasFullWidth = /[!-~]/.test(value);
+
+          if (hasChinese) return '不能包含中文字符';
+          if (hasFullWidth) return '不能包含全角符号,请使用英文输入法';
+          if (!pattern.test(value)) return '密码格式错误:需包含字母、数字和英文特殊字符,长度为 8-20 位';
+
+          return true;
+        }
+      })
+        .then(({ value }) => {
+          resetUserPwd(row.userId, value).then((response) => {
+            if (response.code === 200) {
+              this.msgSuccess("修改成功,新密码是:" + value);
+            }
+          });
+        })
+        .catch(() => {
+        });
+    },
+    /** 提交按钮 */
+    submitForm: function() {
+
+      // this.onDomainBlur();
+
+      // const domainPattern = /^http:\/\/([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/;
+      // if (this.form.domain!=null && !domainPattern.test(this.form.domain)) {
+      //   this.$message.error('请输入正确格式的域名,如:http://xxx.xxx.com');
+      //   return;
+      // }
+
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.userId != undefined) {
+            updateUser(this.form).then((response) => {
+              if (response.code === 200) {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          } else {
+            addUser(this.form).then((response) => {
+              if (response.code === 200) {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              }
+            });
+          }
+        }
+      });
+    },
+
+    downloadImage(imageSrc, fileName) {
+      const link = document.createElement('a');
+      link.href = imageSrc;
+      link.download = fileName || '绑定或新增销售.png';
+      document.body.appendChild(link);
+      link.click();
+      document.body.removeChild(link);
+    },
+
+    formBindCompanyChange(){
+
+
+        if (this.formBindCompany.companyId == null) {
+          return this.$message.warning("请选择公司");
+        }
+
+        this.getTreeselectByCompanyId(this.formBindCompany.companyId);
+
+        addInfo(this.formBindCompany.companyId).then((response) => {
+
+          this.formBindCompany.deptId= null;
+          this.formBindCompany.roleIds=[];
+
+          this.postOptions = response.posts;
+          this.roleBindOptions = response.roles;
+
+
+        });
+
+    },
+
+    submitBingCompanyForm: function() {
+
+      this.$refs["formBindCompany"].validate((valid) => {
+        if (valid) {
+
+          let loadingRock = this.$loading({
+            lock: true,
+            text: '生成二维码中~~请不要刷新页面!!',
+            spinner: 'el-icon-loading',
+            background: 'rgba(0, 0, 0, 0.7)'
+          });
+
+          addCodeUrl(this.formBindCompany).then((response) => {
+            this.bindCompanyOpen = false;
+            this.bindCompanyUrl.url = response.data.url
+            this.bindCompanyUrl.open = true;
+            this.bindCompanyUrl.name = "绑定或新增 销售二维码";
+          }).finally(res => {
+            loadingRock.close();
+          })
+        }
+      });
+    },
+    /**
+     * 同步企业微信员工
+     */
+    synSubmitForm() {
+      this.synOpen = false;
+      this.loading = true;
+      /*this.msgSuccess("");
+
+      let loadingRock = this.$loading({
+        lock: true,
+        text: '同步中.....请等待.....请不要重复点击!!',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });*/
+
+      addQwUser(this.synform.corpId).then(response => {
+        //this.msgSuccess("同步成功");
+        this.msgSuccess("正在同步中...");
+        this.getList();
+        this.synOpen = false;
+      }).finally(() => {
+        this.loading = false;
+        this.synOpen = false;
+        //loadingRock.close();
+      });
+    },
+
+    synNameSubmitForm() {
+      this.synNameOpen = false;
+      this.loading = true;
+
+      addQwUserName(this.synNameform.corpId).then(response => {
+        // this.msgSuccess("同步成功");
+        this.msgSuccess("正在同步中...");
+        this.getList();
+        this.synNameOpen = false;
+      }).finally(() => {
+        this.loading = false;
+        this.synNameOpen = false;
+        //loadingRock.close();
+      });
+    },
+    /**
+     * 同步企业微信部门
+     */
+    qwSyncDept() {
+      syncDept().then(response => {
+        this.msgSuccess("同步成功");
+        this.getList();
+      }).catch(() => {
+        this.msgError("同步失败:" + response.msg);
+      })
+    },
+
+    qwSubmitForm() {
+      let loadingRock = this.$loading({
+        lock: true,
+        text: '绑定中.....同步客户信息中.....',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      this.qwForm.id = (this.qwUser).join(',');
+      bindQwUser(this.qwForm).then(response => {
+        this.msgSuccess("绑定成功");
+        this.qwOpen = false;
+        this.getList();
+        this.qwUserId = null;
+        this.qwUser = [];
+      }).finally(res => {
+        loadingRock.close()
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+
+      const userIds = row.userId || this.ids;
+
+      // 筛选出 userType 为 '00' 的 userId
+      const excludedUserIds = this.userList
+        .filter(user => user.userType == '00')
+        .map(user => user.userId);
+
+      // 从 userIds 中剔除这些 userId
+      const finalUserIds = userIds.filter(userId =>
+        !excludedUserIds.includes(userId)
+      );
+
+      if (finalUserIds.length === 0) {
+        return this.msgInfo("除管理员外无其他的账号,请重新选择");
+      }
+
+      this.$confirm(
+        '是否确认删除员工编号为"' + finalUserIds + '"的数据项?【注意:删除后绑定的企业微信相关信息可能会错乱!!】',
+        "警告",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(function() {
+          return delUser(finalUserIds);
+        })
+        .then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+        .catch(function() {
+        });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm("是否确认导出所有用户数据项?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function() {
+          return exportUser(queryParams);
+        })
+        .then((response) => {
+          this.download(response.msg);
+        })
+        .catch(function() {
+        });
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      importTemplate().then((response) => {
+        this.download(response.msg);
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    generateDomain() {
+      let queryParams;
+      if (this.form.userId) {
+        queryParams = {
+          'userId': this.form.userId,
+        }
+      }
+      generateSubDomain(queryParams).then(response => {
+        this.form.domain = response.data
+      });
+    },
+    /** 设置单独注册会员按钮操作 */
+    handleSetRegister() {
+      this.registerOpen = true;
+
+      if (this.isNeedRegisterMember && this.isNeedRegisterMember.some(item => item === 0)) {
+        this.registerForm.status = false;
+      } else {
+        this.registerForm.status = true;
+      }
+    },
+    /** 提交设置单独注册会员 */
+    submitRegisterForm() {
+      setIsRegisterMember({ status: this.registerForm.status }, this.ids).then(response => {
+        if (response.code === 200) {
+          this.msgSuccess("设置成功");
+          this.registerOpen = false;
+          this.getList();
+        }
+      });
+    },
+
+    /** 开关是否允许所有方式注册会员 */
+    handleAllowedAllRegister() {
+      this.allowedAllRegisterOpen = true;
+      if (this.isAllowedAllRegister && this.isAllowedAllRegister.some(item => item === 0)) {
+        this.allowedAllRegisterForm.status = false;
+      } else {
+        this.allowedAllRegisterForm.status = true;
+      }
+      // this.allowedAllRegisterForm.status = true;
+    },
+    // 提交
+    submitAllowedAllRegisterForm() {
+      isAllowedAllRegister({ status: this.allowedAllRegisterForm.status }, this.ids).then(response => {
+        if (response.code === 200) {
+          this.msgSuccess("操作成功");
+          this.allowedAllRegisterOpen = false;
+          this.getList();
+        }
+      });
+    },
+    /**
+     * 上传文件之前的钩子,参数为上传的文件,若返回 false 或者返回 Promise且被 reject,则停止上传。
+     * @param {File} file - 用户选择的文件对象
+     * @param {Object} row - 当前行的数据对象
+     */
+    beforeImageUpload(file, row) {
+      // 清除之前的错误信息
+      this.$set(row, 'uploadError', '');
+      const isJPG = file.type === 'image/jpeg';
+      const isPNG = file.type === 'image/png';
+      const isGIF = file.type === 'image/gif'; // 根据需要添加更多格式
+      const isValidFormat = isJPG || isPNG || isGIF;
+      const isLt2M = file.size / 1024 / 1024 < 2; // 限制图片大小为 2MB
+      if (!isValidFormat) {
+        const errorMsg = '上传二维码图片只能是 JPG/PNG/GIF 格式!';
+        this.$message.error(errorMsg);
+        this.$set(row, 'uploadError', errorMsg); // 在行内显示错误
+        return false;
+      }
+      if (!isLt2M) {
+        const errorMsg = '上传二维码图片大小不能超过 2MB!';
+        this.$message.error(errorMsg);
+        this.$set(row, 'uploadError', errorMsg); // 在行内显示错误
+        return false;
+      }
+      return true; // 校验通过,允许上传
+    },
+    /**
+     * 自定义上传方法
+     * @param {Object} options - Element UI upload 组件传递的参数,包含 file, onSuccess, onError, onProgress 等
+     * @param {Object} row - 当前行的数据对象
+     */
+    async handleCustomUpload(options, row) {
+
+      const file = options.file;
+      const formData = new FormData();
+      formData.append('file', file);
+
+      formData.append('userId', row.userId)
+
+      this.$set(row, 'uploading', true);
+      this.$set(row, 'uploadError', '');
+      try {
+        const response = await axios.post(this.uploadUrl, formData, {
+          headers: {
+            'Content-Type': 'multipart/form-data',
+          },
+          onUploadProgress: progressEvent => {
+            const percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total);
+            console.log(`上传进度: ${percentCompleted}%`);
+          }
+        });
+        if (response.data && (response.data.url || (response.data.data && response.data.data.url))) {
+          const imageUrl = response.data.url || response.data.data.url;
+          this.$set(row, 'qrCodeWeixin', imageUrl); // 更新行数据中的图片URL
+          this.$message.success('图片上传成功!');
+          options.onSuccess(response.data, file); // 通知el-upload上传成功 (虽然我们自定义了,但调用一下也无妨)
+        } else {
+          const errorMsg = response.data.message || '图片上传失败,服务器未返回有效URL';
+          this.$message.error(errorMsg);
+          this.$set(row, 'uploadError', errorMsg);
+          options.onError(new Error(errorMsg), file); // 通知el-upload上传失败
+        }
+      } catch (error) {
+        console.error('上传失败:', error);
+        let errorMsg = '图片上传失败';
+        if (error.response && error.response.data && error.response.data.message) {
+          errorMsg = error.response.data.message;
+        } else if (error.message) {
+          errorMsg = error.message;
+        }
+        this.$message.error(errorMsg);
+        this.$set(row, 'uploadError', errorMsg);
+        options.onError(error, file); // 通知el-upload上传失败
+      } finally {
+        this.$set(row, 'uploading', false); // 无论成功失败,结束上传状态
+      }
+    },
+    requestUpload() {
+    },
+    beforeUpload() {
+      console.log(file.type)
+      const isPic =
+        file.type === 'image/jpeg' ||
+        file.type === 'image/png' ||
+        file.type === 'image/gif' ||
+        file.type === 'image/jpg' ||
+        file.type === 'audio/mpeg'
+      const isLt2M = file.size / 1024 / 1024 < 2
+      if (!isPic) {
+        this.$message.error('上传图片只能是 JPG、JPEG、PNG、GIF 格式!')
+        return false
+      }
+      if (!isLt2M) {
+        this.$message.error('上传头像图片大小不能超过 2MB!')
+      }
+      return isPic && isLt2M
+    },
+    handleUpdateDoctor(row) {
+      this.doctor.title = "绑定医生"
+      this.doctor.open = true;
+      this.doctorForm.userId = row.userId;
+    },
+    bindCompanyUserDoctorId(row) {
+      console.log(row)
+      this.doctorForm.doctorId = row;
+      bindDoctorId(this.doctorForm).then(res => {
+        if (res.code == 200) {
+          this.$message.success('绑定成功')
+        } else {
+          this.$message.error('绑定失败:', res.msg)
+        }
+        this.getList()
+        this.doctor.open = false;
+      })
+    },
+    handleUnBindUserId(val) {
+      this.$confirm(
+        '确认解绑医生:<span style="color: green;">' + val.nickName + '' +
+        '</span> 的医生?',
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+          dangerouslyUseHTMLString: true // 允许使用 HTML 字符串
+        }
+      ).then(() => {
+        return unBindDoctorId(val.userId);
+      }).then(response => {
+        this.getList();
+        this.msgSuccess("解绑成功");
+      }).finally(res => {
+        this.getList();
+      })
+    },
+  },
+}
+</script>

+ 253 - 0
src/views/company/components/selectQwUser.vue

@@ -0,0 +1,253 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <!-- 现有表单内容保持不变 -->
+      <el-form-item label="企微主体" prop="corpId">
+        <el-select v-model="queryParams.corpId" placeholder="企微主体" size="small" @change="updateCorpId()">
+          <el-option
+            v-for="dict in myQwCompanyList"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="企微账号" prop="qwUserId">
+        <el-input
+          v-model="queryParams.qwUserId"
+          placeholder="请输入企微账号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="企微昵称" prop="qwUserName">
+        <el-input
+          v-model="queryParams.qwUserName"
+          placeholder="请输入企微昵称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </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-table
+      height="500"
+      border
+      v-loading="loading"
+      :data="customerList"
+      ref="customerList"
+      @selection-change="handleSelectionChange"
+    >
+      <!-- 添加多选列 -->
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="企微昵称" align="center" prop="qwUserName" />
+      <el-table-column label="企微账号" align="center" prop="qwUserId" />
+      <el-table-column label="企微所属部门" align="center" prop="departmentName" />
+      <el-table-column label="状态" align="center" prop="status" >
+        <template slot-scope="scope">
+          <dict-tag :options="qwStatusOptions" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="企微主体" align="center" prop="corpName" />
+    </el-table>
+
+    <div style="margin-top: 10px; text-align: right;">
+      <el-button type="primary" @click="handleBatchBind">确定</el-button>
+      <el-button @click="cancelSelect">取消选择</el-button>
+    </div>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import { userList,getMyQwCompanyList } from '@/api/qw/user'
+
+export default {
+  name: "miniCustomer",
+  components: {},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      myQwCompanyList:[],
+      qwStatusOptions:[],
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 员工表格数据
+      customerList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        qwUserId: null,
+        corpId: null,
+        qwUserName: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+      // 多选数据
+      selectedUsers: [],
+      // 已选中的用户ID列表(用于初始化选中状态)
+      preSelectedUserIds: []
+    };
+  },
+  created() {
+    this.getDicts("sys_qw_user_status").then(response => {
+      this.qwStatusOptions = response.data;
+    });
+    getMyQwCompanyList().then(response => {
+      this.myQwCompanyList = response.data;
+      if(this.myQwCompanyList!=null){
+        this.queryParams.corpId=this.myQwCompanyList[0].dictValue
+        this.getList();
+      }
+    });
+  },
+  methods: {
+    updateCorpId(){
+      this.getList();
+    },
+    /** 查询客户列表 */
+    getList() {
+      this.loading = true;
+
+      userList(this.queryParams).then(response => {
+        this.customerList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+
+        // 在数据加载完成后设置已选中项
+        this.$nextTick(() => {
+          this.setPreSelectedItems();
+        });
+      });
+    },
+
+    // 设置预选中的项
+    setPreSelectedItems() {
+      if (this.preSelectedUserIds.length > 0 && this.customerList.length > 0) {
+        // 找到需要预选中的行
+        const selectedRows = this.customerList.filter(row =>
+          this.preSelectedUserIds.includes(row.id)
+        );
+
+        // 设置选中状态
+        this.$nextTick(() => {
+          selectedRows.forEach(row => {
+            this.$refs.customerList.toggleRowSelection(row, true);
+          });
+        });
+      }
+    },
+
+    // 多选处理
+    handleSelectionChange(selection) {
+      this.selectedUsers = selection;
+    },
+
+    // 批量绑定选择
+    handleBatchBind() {
+      if (this.selectedUsers.length === 0) {
+        this.$message.warning("请至少选择一个用户");
+        return;
+      }
+
+      // 发送所有选中的用户数据
+      this.selectedUsers.forEach(user => {
+        this.$emit("bindQwUser", user);
+      });
+
+      // 清空选择
+      this.clearSelection();
+      this.$emit('close'); // 通知父组件关闭对话框
+    },
+
+    // 添加一个新的方法用于清除选择
+    clearSelection() {
+      this.selectedUsers = [];
+      this.preSelectedUserIds = [];
+      if (this.$refs.customerList) {
+        this.$refs.customerList.clearSelection();
+      }
+    },
+
+    // 设置已选中的用户(由父组件调用)
+    setSelectedUsers(users) {
+      this.preSelectedUserIds = users.map(user => user.id);
+      this.selectedUsers = [...users];
+
+      // 如果数据已经加载,直接设置选中状态
+      if (this.customerList.length > 0) {
+        this.setPreSelectedItems();
+      }
+    },
+
+    // 取消选择
+    cancelSelect() {
+      this.$refs.customerList.clearSelection();
+      this.selectedUsers = [];
+    },
+
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+      this.clearSelection(); // 清除选择
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.queryParams.corpId= this.myQwCompanyList[0].dictValue;
+      this.handleQuery();
+    },
+  }
+};
+</script>
+
+<style>
+.el-tag + .el-tag {
+  margin-left: 10px;
+}
+.button-new-tag {
+  margin-left: 10px;
+  height: 32px;
+  line-height: 30px;
+  padding-top: 0;
+  padding-bottom: 0;
+}
+.input-new-tag {
+  width: 90px;
+  margin-left: 10px;
+  vertical-align: bottom;
+}
+.el-dialog__wrapper{
+  z-index: 100000;
+}
+</style>

+ 410 - 102
src/views/components/course/userCourseCatalogDetails.vue

@@ -6,7 +6,7 @@
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="小节名称" prop="title">
         <el-input v-model="queryParams.title" placeholder="请输入小节名称" clearable size="small"
-                  @keyup.enter.native="handleQuery" />
+                  @keyup.enter.native="handleQuery"/>
       </el-form-item>
       <el-form-item label="排序" prop="sorting" clearable size="small">
         <el-select v-model="queryParams.sorting" >
@@ -22,19 +22,23 @@
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
-                   v-hasPermi="['course:userCourseVideo:add']">新增目录</el-button>
+                   v-hasPermi="['course:userCourseVideo:add']">新增目录
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button type="primary" plain :disabled="!ids || ids.length <= 0" size="mini" @click="openUpdates"
-                   v-hasPermi="['course:userCourseVideo:updateTime']">修改时间</el-button>
+                   v-hasPermi="['course:userCourseVideo:updateTime']">修改时间
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button type="primary" plain size="mini" @click="openAdds"
-                   v-hasPermi="['course:userCourseVideo:batchAdd']">批量添加</el-button>
+                   v-hasPermi="['course:userCourseVideo:batchAdd']">批量添加
+        </el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button type="primary" plain size="mini" @click="updateRedPageckeOpen"
-                   v-hasPermi="['course:userCourseVideo:updateRed']">修改红包</el-button>
+                   v-hasPermi="['course:userCourseVideo:updateRed']">修改红包
+        </el-button>
       </el-col>
       <el-col :span="1.5">
   <el-button type="primary" plain size="mini" @click="updateTitleOpen"
@@ -42,15 +46,25 @@
 </el-col>
       <el-col :span="1.5">
         <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
-                   v-hasPermi="['course:userCourseVideo:remove']">删除</el-button>
+                   v-hasPermi="['course:userCourseVideo:remove']">删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button type="warning" plain icon="el-icon-edit" size="mini" @click="handleCourseSort"
+                   v-hasPermi="['course:userCourseVideo:sort']">修改课节排序
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button type="primary" plain icon="el-icon-delete" size="mini" @click="handleSync"
+                   v-hasPermi="['course:userCourseVideo:sync']">同步模板数据
+        </el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
     <el-table border v-loading="loading" :data="userCourseVideoList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="视频ID" align="center" prop="videoId" />
-      <!--      <el-table-column label="轮次" align="center" prop="round" />-->
-      <el-table-column label="小节名称" align="center" show-overflow-tooltip prop="title" />
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="视频ID" align="center" prop="videoId"/>
+      <el-table-column label="小节名称" align="center" show-overflow-tooltip prop="title"/>
       <el-table-column label="视频文件名称" align="center" show-overflow-tooltip prop="fileName">
       </el-table-column>
       <el-table-column label="视频时长" align="center" prop="duration">
@@ -76,57 +90,37 @@
           <el-tag type="danger" v-if="!row.lastJoinTime">无</el-tag>
         </template>
       </el-table-column>
-      <el-table-column label="红包金额" align="center" prop="redPacketMoney" />
-      <el-table-column label="排序" align="center" prop="courseSort" />
-      <el-table-column label="上传时间" align="center" prop="createTime" />
+      <el-table-column label="红包金额" align="center" prop="redPacketMoney"/>
+      <el-table-column label="排序" align="center" prop="courseSort"/>
+      <el-table-column label="上传时间" align="center" prop="createTime"/>
       <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="['course:userCourseVideo:edit']">修改</el-button>
+                     v-hasPermi="['course:userCourseVideo:edit']">修改
+          </el-button>
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleComment(scope.row)"
-                     v-hasPermi="['course:courseWatchComment:list']">查看评论</el-button>
+                     v-hasPermi="['course:courseWatchComment:list']">查看评论
+          </el-button>
           <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
-                     v-hasPermi="['course:userCourseVideo:remove']">删除</el-button>
+                     v-hasPermi="['course:userCourseVideo: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" />
+                @pagination="getList"/>
     <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="110px" v-loading="uploadLoading">
         <el-form-item label="视频标题" prop="title">
-          <el-input v-model="form.title" placeholder="请输入内容" />
+          <el-input v-model="form.title" placeholder="请输入内容"/>
         </el-form-item>
         <el-form-item label="视频描述" prop="description">
-          <el-input v-model="form.description" type="textarea" :rows="2" placeholder="请输入内容" />
+          <el-input v-model="form.description" type="textarea" :rows="2" placeholder="请输入内容"/>
         </el-form-item>
-        <!--        <el-form-item label="轮次" prop="round">-->
-        <!--          <el-input v-model="form.round"  placeholder="请输入内容" />-->
-        <!--        </el-form-item>-->
         <el-form-item label="课程排序" prop="courseSort">
           <el-input-number v-model="form.courseSort" :min="1"></el-input-number>
         </el-form-item>
-        <!--        <el-form-item label="看课时间" prop="timeRange" v-if="isPrivate === 1">-->
-        <!--          <el-time-picker-->
-        <!--            is-range-->
-        <!--            v-model="form.timeRange"-->
-        <!--            range-separator="至"-->
-        <!--            start-placeholder="开始时间"-->
-        <!--            value-format="HH:mm:ss"-->
-        <!--            end-placeholder="结束时间"-->
-        <!--            placeholder="选择时间范围">-->
-        <!--          </el-time-picker>-->
-        <!--        </el-form-item>-->
-        <!--        <el-form-item label="领取红包时间" prop="lastJoinTime" v-if="isPrivate === 1">-->
-        <!--          <el-time-picker-->
-        <!--            v-model="form.lastJoinTime"-->
-        <!--            :selectableRange="form.timeRange"-->
-        <!--            value-format="HH:mm:ss"-->
-        <!--            placeholder="选择时间范围">-->
-        <!--          </el-time-picker>-->
-        <!--          <p style="color: red;margin: 0;font-size: 12px">超过领取红包时间,只允许看课,不允许领取红包</p>-->
-        <!--        </el-form-item>-->
 
         <el-form-item label="视频缩略图" prop="thumbnail">
           <el-upload v-model="form.thumbnail" class="avatar-uploader" :action="uploadUrl" :show-file-list="false"
@@ -148,7 +142,8 @@
                       :line_2.sync="form.lineTwo" :line_3.sync="form.lineThree" :thumbnail.sync="form.thumbnail"
                       :uploadType.sync="form.uploadType" :isTranscode.sync="form.isTranscode"
                       :transcodeFileKey.sync="form.transcodeFileKey" @video-duration="handleVideoDuration"
-                      @change="handleVideoChange" @selectProjects="handleSelectProjects" ref="videoUpload" append-to-body />
+                      @change="handleVideoChange" @selectProjects="handleSelectProjects" ref="videoUpload"
+                      append-to-body/>
 
         <el-form-item label="课题选择" prop="questionBankId">
           <el-button size="small" type="primary" @click="chooseQuestionBank">选取课题</el-button>
@@ -171,20 +166,104 @@
             </el-table-column>
             <el-table-column label="类别" align="center" prop="type">
               <template slot-scope="scope">
-                <dict-tag :options="typeOptions" :value="scope.row.type" />
+                <dict-tag :options="typeOptions" :value="scope.row.type"/>
               </template>
             </el-table-column>
-            <el-table-column label="答案" align="center" prop="answer" />
+            <el-table-column label="答案" align="center" prop="answer"/>
             <el-table-column label="操作" align="center" width="100px" fixed="right">
               <template slot-scope="scope">
                 <el-button size="mini" type="text" icon="el-icon-delete"
-                           @click="handleQuestionBankDelete(scope.row)">删除</el-button>
+                           @click="handleQuestionBankDelete(scope.row)">删除
+                </el-button>
               </template>
             </el-table-column>
           </el-table>
         </el-form-item>
         <el-form-item label="红包金额" prop="redPacketMoney">
           <el-input-number v-model="form.redPacketMoney" :min="0.1" :max="200" :step="0.1"></el-input-number>
+        </el-form-item>
+         <!-- v-if="!!form.randomRedPacketRulesArr" -->
+        <el-form-item label="随机红包金额"  >
+          <template >
+          <div v-for="(rule, index) in form.randomRedPacketRulesArr" :key="index" class="form-row">
+           <el-form-item
+            label="随机红包金额区间"
+            :prop="`randomRedPacketRulesArr.${index}.minAmount`"
+            :rules="[
+              { required: true, message: '请输入最小金额', trigger: 'blur' },
+              { validator: validateMinAmount, trigger: 'blur', index: index }
+            ]"
+            class="form-item-amount"
+          >
+            <el-input
+              v-model.number="rule.minAmount"
+              type="number"
+              :min="0.01"
+              :precision="2"
+              :step="0.01"
+              placeholder="最小金额"
+              size="small"
+              class="amount-input"
+              @input="handleAmountInput(rule, 'minAmount')"
+            ></el-input>
+            <span class="separator">-</span>
+            <el-input
+              v-model.number="rule.maxAmount"
+              type="number"
+              :min="rule.minAmount || 0.01"
+              :precision="2"
+              :step="0.01"
+              placeholder="最大金额"
+              size="small"
+              class="amount-input"
+              @input="handleAmountInput(rule, 'maxAmount')"
+            ></el-input>
+            <span class="suffix">元</span>
+          </el-form-item>
+              <el-form-item
+                label="随机权重"
+                :prop="`randomRedPacketRulesArr.${index}.weight`"
+                :rules="[
+                  { required: true, message: '请输入权重', trigger: 'blur' },
+                  { type: 'integer', message: '权重必须为整数', trigger: 'blur' },
+                ]"
+                class="form-item-weight"
+              >
+                <el-input
+                  v-model.number="rule.weight"
+                  type="number"
+                  :min="1"
+                  placeholder="权重"
+                  size="small"
+                ></el-input>
+              </el-form-item>
+              <el-tooltip class="item" effect="dark" content="权重越高,被随机到的概率越大" placement="top">
+                <i class="el-icon-question"></i>
+              </el-tooltip>
+              <div class="action-buttons">
+                <el-button
+                  icon="el-icon-plus"
+                  size="mini"
+                  type="text"
+                  @click="addRule(index)"
+                  class="add-btn"
+                >
+                  新增
+                </el-button>
+                <el-button
+                  icon="el-icon-delete"
+                  size="mini"
+                  type="text"
+                  @click="deleteRule(index)"
+                  :disabled="form.randomRedPacketRulesArr.length <= 1"
+                  class="delete-btn"
+                >
+                  删除
+                </el-button>
+              </div>
+          </div>
+        </template>
+
         </el-form-item>
         <el-form-item label="是否关联商品">
           <el-radio v-model="form.isProduct" :label=0>否</el-radio>
@@ -199,14 +278,15 @@
         <el-form-item label="商品选择" v-if="form.isProduct === 1">
           <el-button size="small" type="primary" @click="chooseCourseProduct">选取商品</el-button>
           <el-table border width="100%" style="margin-top:5px;" :data="form.courseProducts">
-            <el-table-column label="商品名称" align="center" prop="productName" />
-            <el-table-column label="产品条码" align="center" prop="barCode" />
-            <el-table-column label="商品价格" align="center" prop="productPrice" />
-            <el-table-column label="库存" align="center" prop="stock" />
+            <el-table-column label="商品名称" align="center" prop="productName"/>
+            <el-table-column label="产品条码" align="center" prop="barCode"/>
+            <el-table-column label="商品价格" align="center" prop="productPrice"/>
+            <el-table-column label="库存" align="center" prop="stock"/>
             <el-table-column label="操作" align="center" width="100px" fixed="right">
               <template slot-scope="scope">
                 <el-button size="mini" type="text" icon="el-icon-delete"
-                           @click="handleCourseProductDelete(scope.row)">删除</el-button>
+                           @click="handleCourseProductDelete(scope.row)">删除
+                </el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -218,7 +298,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item v-if="form.isProduct === 1"  label="结束售卖时间" prop="listingStartTime">
+            <el-form-item v-if="form.isProduct === 1" label="结束售卖时间" prop="listingStartTime">
               <el-input-number v-model="form.listingEndTime" :min="0" label="结束售卖时间"></el-input-number>
             </el-form-item>
           </el-col>
@@ -235,7 +315,8 @@
     <el-dialog :title="title" :visible.sync="updateBatchData.open" width="1000px" append-to-body>
       <el-form ref="form" :model="updateBatchData.form" label-width="110px">
         <el-form-item label="看课时间" prop="timeRange">
-          <el-time-picker is-range v-model="updateBatchData.form.timeRange" range-separator="至" start-placeholder="开始时间"
+          <el-time-picker is-range v-model="updateBatchData.form.timeRange" range-separator="至"
+                          start-placeholder="开始时间"
                           value-format="HH:mm:ss" end-placeholder="结束时间" placeholder="选择时间范围">
           </el-time-picker>
         </el-form-item>
@@ -262,19 +343,20 @@
       <el-form :inline="true" :model="addBatchData.queryParams" class="library-search">
         <el-form-item label="素材名称">
           <el-input v-model="addBatchData.queryParams.resourceName" placeholder="请输入素材名称" clearable size="small"
-                    @keyup.enter.native="resourceList" />
+                    @keyup.enter.native="resourceList"/>
         </el-form-item>
         <el-form-item label="类型">
-          <el-select v-model="addBatchData.queryParams.typeId" @change="changeCateType" placeholder="请选择素材类型" clearable
+          <el-select v-model="addBatchData.queryParams.typeId" @change="changeCateType" placeholder="请选择素材类型"
+                     clearable
                      size="small">
             <el-option v-for="item in addBatchData.typeOptions" :key="item.dictValue" :label="item.dictLabel"
-                       :value="item.dictValue" />
+                       :value="item.dictValue"/>
           </el-select>
         </el-form-item>
         <el-form-item label="子类型">
           <el-select v-model="addBatchData.queryParams.typeSubId" placeholder="请选择素材子类型" clearable size="small">
             <el-option v-for="item in addBatchData.typeSubOptions" :key="item.dictValue" :label="item.dictLabel"
-                       :value="item.dictValue" />
+                       :value="item.dictValue"/>
           </el-select>
         </el-form-item>
         <el-form-item>
@@ -285,15 +367,15 @@
       <!-- 视频列表 -->
       <el-table v-loading="addBatchData.loading" :data="addBatchData.list"
                 @selection-change="handVideoleSelectionChange" height="400px">
-        <el-table-column type="selection" width="55" align="center" />
-        <el-table-column label="素材名称" align="center" prop="resourceName" />
-        <el-table-column label="文件名称" align="center" prop="fileName" />
-        <el-table-column label="排序" align="center" prop="sort" />
+        <el-table-column type="selection" width="55" align="center"/>
+        <el-table-column label="素材名称" align="center" prop="resourceName"/>
+        <el-table-column label="文件名称" align="center" prop="fileName"/>
+        <el-table-column label="排序" align="center" prop="sort"/>
         <el-table-column label="缩略图" align="center">
           <template slot-scope="scope">
             <el-popover placement="right" title="" trigger="hover">
-              <img alt="" slot="reference" :src="scope.row.thumbnail" style="width: 80px; height: 50px" />
-              <img alt="" :src="scope.row.thumbnail" style="max-width: 150px;" />
+              <img alt="" slot="reference" :src="scope.row.thumbnail" style="width: 80px; height: 50px"/>
+              <img alt="" :src="scope.row.thumbnail" style="max-width: 150px;"/>
             </el-popover>
           </template>
         </el-table-column>
@@ -307,7 +389,7 @@
       <!-- 分页 -->
       <pagination v-show="addBatchData.total > 0" :total="addBatchData.total"
                   :page.sync="addBatchData.queryParams.pageNum" :limit.sync="addBatchData.queryParams.pageSize"
-                  @pagination="resourceList" />
+                  @pagination="resourceList"/>
 
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="batchVideoSave">确 定</el-button>
@@ -315,7 +397,7 @@
     </el-dialog>
     <el-dialog title="章节红包" :visible.sync="redData.open" width="900px" append-to-body>
       <el-table border v-loading="redData.loading" :data="redData.list" height="600px">
-        <el-table-column label="小节名称" align="center" show-overflow-tooltip prop="title" />
+        <el-table-column label="小节名称" align="center" show-overflow-tooltip prop="title"/>
         <el-table-column label="视频文件名称" align="center" show-overflow-tooltip prop="fileName">
         </el-table-column>
         <el-table-column label="视频时长" align="center" prop="duration">
@@ -325,11 +407,11 @@
         </el-table-column>
         <el-table-column label="红包金额" align="center" prop="redPacketMoney">
           <template slot-scope="scope">
-            <el-input class="el-input" v-model="scope.row.redPacketMoney" />
+            <el-input class="el-input" v-model="scope.row.redPacketMoney"/>
           </template>
         </el-table-column>
-        <el-table-column label="排序" align="center" prop="courseSort" />
-        <el-table-column label="上传时间" align="center" prop="createTime" />
+        <el-table-column label="排序" align="center" prop="courseSort"/>
+        <el-table-column label="上传时间" align="center" prop="createTime"/>
       </el-table>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="batchRedSave">确 定</el-button>
@@ -363,33 +445,64 @@
       </course-watch-comment>
     </el-dialog>
 
+
+    <el-dialog title="修改课节排序" :visible.sync="openVideoSort" style="width: 1600px;" append-to-body>
+      <draggable v-model="userCourseVideoSortList" @end="onDragEndDay" style="padding: 10px">
+        <el-button style="margin: 8px 4px;" v-for="(item, index) in userCourseVideoSortList"
+                   :class="item.newCourseSort != item.courseSort ? 'red':''">第{{
+            item.newCourseSort
+          }}序(原排序第{{ item.courseSort }})
+        </el-button>
+      </draggable>
+      <div style="float: right;margin-top: -20px">
+        <el-button type="primary" @click="saveSorts">保存</el-button>
+      </div>
+    </el-dialog>
+
   </div>
 </template>
 
 <script>
 import {
   addUserCourseVideo,
+  batchSaveVideo,
+  batchUpdateRed,
   delUserCourseVideo,
   getSort,
   getUserCourseVideo,
   getVideoListByCourseId,
+  getVideoListByCourseIdAll,
+  sortCourseVideo,
   updates,
   batchSaveVideo,
   batchUpdateRed,
   batchUpdateTitle,
-  updateUserCourseVideo
+  updateUserCourseVideo,
+  syncTemplate
 } from "@/api/course/userCourseVideo";
 import QuestionBank from "@/views/course/courseQuestionBank/QuestionBank.vue";
 import CourseProduct from "@/views/course/fsCourseProduct/CourseProduct.vue";
 import VideoUpload from "@/components/VideoUpload/index.vue";
-import { listVideoResource } from '@/api/course/videoResource';
-import { getByIds } from '@/api/course/courseQuestionBank'
+import {listVideoResource} from '@/api/course/videoResource';
+import {getByIds} from '@/api/course/courseQuestionBank'
 import CourseWatchComment from "./courseWatchComment.vue";
-import { getCateListByPid, getCatePidList } from '@/api/course/userCourseCategory'
+import {getCateListByPid, getCatePidList} from '@/api/course/userCourseCategory'
+import draggable from 'vuedraggable'
+import { getConfigByKey } from '@/api/system/config'
 
 export default {
   name: "userCourseCatalog",
-  components: { VideoUpload, QuestionBank, CourseWatchComment, CourseProduct,},
+  components: {VideoUpload, QuestionBank, CourseWatchComment, CourseProduct, draggable},
+  watch:{
+    // 深度监听 rules 数组的变化,以更新总权重
+    "form.randomRedPacketRulesArr": {
+      handler(val) {
+        // this.calculateTotalWeight();
+        this.validateRules();
+      },
+      deep: true,
+    },
+  },
   data() {
     return {
       // 缩略图验证相关
@@ -424,9 +537,8 @@ export default {
       isPrivate: null,
       videoUrl: "",
       uploadTypeOptions: [
-        { dictLabel: "线路一", dictValue: 2 },
-
-        { dictLabel: "线路二", dictValue: 3 },
+        {dictLabel: "线路一", dictValue: 2},
+        {dictLabel: "线路二", dictValue: 3},
       ],
       uploadLoading: false,
       courseId: null,
@@ -447,6 +559,7 @@ export default {
       fileId: '',
       courseName: null,
       userCourseVideoList: [],
+      userCourseVideoSortList: [],
       total: 0,
       redData: {
         queryParams: {
@@ -457,8 +570,7 @@ export default {
         list: [],
         open: false,
         loading: true,
-        form: {
-        }
+        form: {}
       },
       titleData: {
       queryParams: {
@@ -483,7 +595,7 @@ export default {
         open: false,
         loading: true,
         form: {},
-        select: [],
+        select: [], // 按用户选择顺序存储视频ID
         total: 0,
         queryParams: {
           pageNum: 1,
@@ -507,9 +619,19 @@ export default {
       single: true,
       // 非多个禁用
       multiple: true,
+      loading3: false,
+      openVideoSort: false,
       // 表单参数
       form: {
-        courseProducts:[]
+        courseProducts: [],
+        randomRedPacketRules:null,
+        randomRedPacketRulesArr:[
+           {
+            minAmount: 0.01,
+            maxAmount: 0.01,
+            weight: 100,
+          }
+        ]
       },
       updateBatchData: {
         open: false,
@@ -518,10 +640,10 @@ export default {
       // 表单校验
       rules: {
         title: [
-          { required: true, message: "小节名称不能为空", trigger: "change" }
+          {required: true, message: "小节名称不能为空", trigger: "change"}
         ],
         courseSort: [
-          { required: true, message: "排序不能为空", trigger: "change" }
+          {required: true, message: "排序不能为空", trigger: "change"}
         ],
 
       },
@@ -532,12 +654,25 @@ export default {
         videoId: null,
         title: ""
       },
+      enableRandomRedPacket:false
     }
   },
   created() {
     this.getDicts("sys_course_temp_type").then(response => {
       this.typeOptions = response.data;
     });
+        getConfigByKey('randomRedpacket:config').then(res=>{
+        let configData = res.data;
+        if(!!configData && !!configData.configValue){
+           let configValue = JSON.parse(configData.configValue);
+           if(!!configValue.enableRandomRedpacket){
+            this.enableRandomRedPacket = configValue.enableRandomRedpacket;
+            console.log("this.enableRandomRedPacket ::" + this.enableRandomRedPacket)
+           }
+        }
+    }).catch(res=>{
+
+    })
   },
   methods: {
     getPickerOptions() {
@@ -575,6 +710,7 @@ export default {
       this.courseProduct.title = '拍商品选择';
     },
 
+
     //选择疗法
     selectPackage(row) {
       const drug = {};
@@ -597,7 +733,7 @@ export default {
 
     },
 
-    courseProductResult(val){
+    courseProductResult(val) {
       this.form.courseProducts = this.form.courseProducts || [];
       for (var i = 0; i < this.form.courseProducts.length; i++) {
         if (this.form.courseProducts[i].id == val.id) {
@@ -652,7 +788,6 @@ export default {
       } else if (this.form.uploadType == 3) {
         this.videoUrl = this.form.lineThree;
       }
-      // console.log("选择的video=======>>>>>>>",this.videoUrl)
     },
     // 视频库课题
     handleSelectProjects(projectIds) {
@@ -661,7 +796,7 @@ export default {
         return
       }
 
-      const params = { ids: projectIds }
+      const params = {ids: projectIds}
       getByIds(params).then(response => {
         if (response.code === 200) {
           response.data.forEach(item => {
@@ -678,7 +813,7 @@ export default {
     },
     formatDuration(seconds) {
       if (seconds === null || seconds === undefined) {
-        return '未上传视频'; // 或者您可以根据具体需求返回其他默认值
+        return '未上传视频';
       }
       const hours = Math.floor(seconds / 3600);
       const minutes = Math.floor((seconds % 3600) / 60);
@@ -697,8 +832,7 @@ export default {
         // 验证缩略图尺寸
         this.validateThumbnailImage(res.url);
         this.$forceUpdate()
-      }
-      else {
+      } else {
         this.msgError(res.msg);
       }
     },
@@ -892,6 +1026,14 @@ export default {
         isFirst: 0,
         listingStartTime: null,
         listingEndTime: null,
+        randomRedPacketRules:null,
+        randomRedPacketRulesArr:[
+          {
+            minAmount: 0.01,
+            maxAmount: 0.01,
+            weight: 100,
+          }
+        ]
       };
       // 重置缩略图验证状态
       this.thumbnailValidation = { show: false, type: 'success', message: '' };
@@ -915,9 +1057,18 @@ export default {
       this.single = selection.length !== 1
       this.multiple = !selection.length
     },
-    // 多选框选中数据
+    // 视频库多选框选中数据(按用户点击顺序记录)
     handVideoleSelectionChange(selection) {
-      this.addBatchData.select = selection.map(item => item.id);
+      // 提取当前选中的所有ID
+      const selectedIds = selection.map(item => item.id);
+      // 处理新增选中项:保留用户点击顺序
+      selectedIds.forEach(id => {
+        if (!this.addBatchData.select.includes(id)) {
+          this.addBatchData.select.push(id);
+        }
+      });
+      // 处理取消选中项:移除已取消的ID
+      this.addBatchData.select = this.addBatchData.select.filter(id => selectedIds.includes(id));
     },
     handleAdd() {
       this.reset();
@@ -940,7 +1091,19 @@ export default {
       this.packageList = [];
       const videoId = row.videoId || this.ids
       getUserCourseVideo(videoId).then(response => {
+        console.log(response);
         this.form = response.data;
+        if(!!this.form.randomRedPacketRules){
+           this.$set(this.form, 'randomRedPacketRulesArr', JSON.parse(this.form.randomRedPacketRules)) ;
+          // this.form.randomRedPacketRulesArr = JSON.parse(this.form.randomRedPacketRules);
+        }else{
+          //处理初始值
+         this.form.randomRedPacketRulesArr = [{
+            minAmount: 0.01,
+            maxAmount: 0.01,
+            weight: 100,
+          }]
+        }
         if (response.data.videoUrl != null && response.data.videoUrl !== '') {
           this.videoUrl = response.data.videoUrl;
         }
@@ -993,20 +1156,13 @@ export default {
             });
             return
           }
-          if (this.form.isProduct != null && this.form.isProduct == 1 && this.form.courseProducts.length < 1) {
+          if (this.form.isProduct != null && this.form.isProduct == 1 && (this.form.courseProducts == null || this.form.courseProducts.length < 1)) {
             this.$message({
               message: '请选择关联商品',
               type: 'warning'
             });
             return
           }
-          // if(this.form.uploadType==null){
-          //   this.$message({
-          //     message: '请选择播放线路!',
-          //     type: 'warning'
-          //   });
-          //   return
-          // }
           if (this.form.questionBankList !== null) {
             this.form.questionBankId = this.form.questionBankList.map(item => item.id).join(',');
           }
@@ -1014,8 +1170,13 @@ export default {
             this.form.packageJson = JSON.stringify(this.packageList);
           }
           if (this.form.courseProducts != null) {
-            this.form.productId = this.form.courseProducts[0].id
+            this.form.productId = this.form.courseProducts.map(item => item.id).join(',');
+          }
+          if(!!this.form.randomRedPacketRulesArr){
+            let rulesJson = JSON.stringify(this.form.randomRedPacketRulesArr);
+            this.form.randomRedPacketRules =  rulesJson;
           }
+
           if (this.form.videoId != null) {
             updateUserCourseVideo(this.form).then(response => {
               this.msgSuccess("修改成功");
@@ -1085,14 +1246,69 @@ export default {
       }).then(() => {
         this.getList();
         this.msgSuccess("删除成功");
-      }).catch(() => { });
+      }).catch(() => {
+      });
+    },
+    /** 同步模板数据*/
+    handleSync() {
+      const courseId = this.courseId;
+      this.$confirm('是否同步课程数据至模板', "确认", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return syncTemplate(courseId);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("同步成功");
+      }).catch(() => {
+      });
+    },
+
+    handleCourseSort() {
+
+      getVideoListByCourseIdAll(this.queryParams.courseId).then(response => {
+
+        response.rows.forEach((item) => item.newCourseSort = item.courseSort);
+        this.userCourseVideoSortList = response.rows.sort((a, b) => a.courseSort - b.courseSort);
+        if (this.userCourseVideoSortList == null || this.userCourseVideoSortList.length == 0) {
+          this.$message.error("暂无课节天数")
+        } else {
+          this.openVideoSort = true;
+        }
+      })
+
+
     },
+
+    onDragEndDay() {
+      this.userCourseVideoSortList.forEach((item, index) => {
+        item.newCourseSort = index + 1;
+      })
+      this.$forceUpdate()
+    },
+
+    saveSorts() {
+      let list = this.userCourseVideoSortList.filter(e => e.courseSort != e.newCourseSort).map(e => {
+        return {courseSort: e.newCourseSort, videoId: e.videoId}
+      })
+      this.loading3 = true;
+      sortCourseVideo(list).then(e => {
+        this.getList();
+      }).finally(() => {
+        this.userCourseVideoSortList = [];
+        this.openVideoSort = false;
+      })
+    },
+
     openAdds() {
       this.addBatchData.open = true;
       this.getRootTypeList();
       this.addBatchData.form = {
         courseId: this.courseId,
       };
+      // 重置选择顺序数组
+      this.addBatchData.select = [];
       this.resourceList();
     },
     getRootTypeList() {
@@ -1126,7 +1342,7 @@ export default {
         });
         return
       }
-      this.addBatchData.form.ids = this.addBatchData.select;
+      this.addBatchData.form.ids = this.addBatchData.select; // 按用户选择顺序提交
       batchSaveVideo(this.addBatchData.form).then(response => {
         this.addBatchData.open = false;
         this.getList();
@@ -1137,7 +1353,15 @@ export default {
       this.redData.loading = true;
       this.redData.queryParams.courseId = this.courseId;
       getVideoListByCourseId(this.redData.queryParams).then(response => {
-        this.redData.list = response.rows;
+        if(!!response.rows && response.rows.length >0){
+          for(let i = 0; i < response.rows.length; i++){
+            if(!!response.rows[i].randomRedPacketRules){
+             this.$set(response.rows[i], 'randomRedPacketRulesArr', JSON.parse(response.rows[i].randomRedPacketRules)) ;
+            }
+          }
+        }
+         this.redData.list = response.rows;
+         console.log(this.redData.list);
         this.redData.loading = false;
       });
     },
@@ -1173,6 +1397,79 @@ export default {
     handleQuestionBankClose() {
       this.questionBank.open = false;
     },
+  // 实时过滤金额输入,只允许两位小数
+  handleAmountInput(rule, field) {
+    let value = rule[field];
+    if (value === null || value === undefined) return;
+
+    // 转换为字符串处理
+    let str = value.toString();
+
+    // 移除除数字和小数点外的所有字符
+    str = str.replace(/[^0-9.]/g, '');
+
+    // 只保留一个小数点
+    const dotIndex = str.indexOf('.');
+    if (dotIndex !== -1) {
+      str = str.substring(0, dotIndex + 1) + str.substring(dotIndex + 1).replace(/\./g, '');
+    }
+
+    // 限制小数点后最多两位
+    if (dotIndex !== -1 && str.length > dotIndex + 3) {
+      str = str.substring(0, dotIndex + 3);
+    }
+
+    // 转换回数字并更新
+    rule[field] = parseFloat(str) || 0;
+  },
+  deleteRule(index) {
+    this.$confirm("确定要删除这个区间吗?", "提示", {
+      confirmButtonText: "确定",
+      cancelButtonText: "取消",
+      type: "warning",
+    }).then(() => {
+      this.form.randomRedPacketRulesArr.splice(index, 1);
+      this.$message({
+        type: "success",
+        message: "删除成功!",
+      });
+    });
+  },
+  addRule(index) {
+    // 在当前行的后面插入一个新行
+    this.form.randomRedPacketRulesArr.splice(index + 1, 0, {
+      minAmount: 0.01,
+      maxAmount: 0.01,
+      weight: 100,
+    });
+  },
+  // 自定义校验规则:确保最大金额大于最小金额
+  validateMinAmount(rule, value, callback) {
+    // debugger;
+    // const maxAmount = this.form29.rules[].maxAmount
+
+    const index = rule.index;
+    const maxAmount = this.form.randomRedPacketRulesArr[index].maxAmount;
+
+    if (value > maxAmount) {
+      callback(new Error("最小金额不能大于最大金额"));
+    } else {
+      callback();
+    }
+  },
+  validateRules() {
+    this.form.randomRedPacketRulesArr.forEach((rule) => {
+      if (rule.minAmount === undefined || rule.minAmount < 0.01) {
+        rule.minAmount = 0.01;
+      }
+      if (rule.maxAmount === undefined || rule.maxAmount < rule.minAmount) {
+        rule.maxAmount = rule.minAmount;
+      }
+      if (rule.weight === undefined || rule.weight < 1) {
+        rule.weight = 1;
+      }
+    });
+  },
   }
 }
 </script>
@@ -1257,4 +1554,15 @@ export default {
   line-height: 150px;
   text-align: center;
 }
+
+
+.red:hover {
+  color: #dbdbdb !important;
+}
+
+.red {
+  background-color: #F56C6C !important;
+  color: #fff !important;
+}
+
 </style>

+ 950 - 263
src/views/components/his/integralOrderDetails.vue

@@ -1,316 +1,1003 @@
 <template>
-    <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
-      <div style="padding: 20px; background-color: #fff;">
-         积分订单详情
+  <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; ">
+    <div style="padding: 20px; background-color: #fff;">
+      积分订单详情
+    </div>
+    <div class="contentx" v-if="item != null">
+      <div class="desct"> 积分订单信息</div>
+      <div class="order-status" v-if="item != null && item.status != 5">
+        <el-steps :active="getStepActive(item.status)" align-center finish-status="success">
+          <el-step title="待支付"></el-step>
+          <el-step title="待发货"></el-step>
+          <el-step title="待收货"></el-step>
+          <el-step title="已完成"></el-step>
+        </el-steps>
       </div>
-<div class="contentx" v-if="item!=null">
-        <div class="desct"> 积分订单信息</div>
-        <div class="order-status" v-if="item!=null && item.status != 5" >
-                  <el-steps  :active="item.status==4?0:item.status" align-center finish-status="success">
-                    <el-step title="待支付"></el-step>
-                    <el-step title="待发货"></el-step>
-                    <el-step title="待收货"></el-step>
-                    <el-step title="已完成"></el-step>
-                  </el-steps>
+      <el-card shadow="never" style="margin-top: 15px">
+        <div class="operate-container" v-if="item != null">
+          <span style="margin-left: 20px" class="color-danger">订单状态:
+            <el-tag prop="status" v-for="(ite, index) in statusOptions" v-if="item.status == ite.dictValue">{{
+              ite.dictLabel }}</el-tag>
+          </span>
+          <div class="operate-button-container" v-if="item.status == 1" v-hasPermi="['his:integralOrder:sendGoods']">
+            <!-- <el-button size="mini" @click="sendVisible=true" >发货</el-button> -->
+            <el-button size="mini" @click="showSend()">发货</el-button>
+          </div>
+          <div class="operate-button-container" v-if="item.deliverySn != null"
+            v-hasPermi="['his:integralOrder:express']">
+            <el-button size="mini" @click="showExpress()">查看物流</el-button>
+          </div>
+
+          <div class="operate-button-container" v-if="item.status!=-1" v-hasPermi="['his:integralOrder:edit']">
+            <el-button size="mini" @click="updateOrder()">修改订单</el-button>
+          </div>
+
+          <div class="operate-button-container" v-if="item.status==2">
+            <el-button size="mini" @click="handleFinishOrder">确认收货</el-button>
+          </div>
+          <div class="operate-button-container" v-if="item.status>1" v-hasPermi="['his:integralOrder:cancel']">
+            <el-button size="mini" @click="applyRefund">申请退款</el-button>
+          </div>
         </div>
-         <el-card shadow="never" style="margin-top: 15px">
-           <div class="operate-container"  v-if="item!=null">
-             <span style="margin-left: 20px" class="color-danger">订单状态:
-                <el-tag prop="status" v-for="(ite, index) in statusOptions"    v-if="item.status==ite.dictValue">{{ite.dictLabel}}</el-tag>
-             </span>
-             <div class="operate-button-container"  v-if="item.status==1" v-hasPermi="['his:integralOrder:sendGoods']">
-                <el-button size="mini" @click="sendVisible=true" >发货</el-button>
-             </div>
-            <div class="operate-button-container"   v-if="item.deliverySn!=null" v-hasPermi="['his:integralOrder:express']">
-              <el-button size="mini" @click="showExpress()" >查看物流</el-button>
-            </div>
+        <div class="desct">
+          基本信息
+        </div>
+        <el-descriptions title="" :column="3" border>
+          <el-descriptions-item label="订单编号"><span v-if="item != null">{{ item.orderCode
+              }}</span></el-descriptions-item>
+          <el-descriptions-item label="会员ID"><span v-if="item != null">{{ item.userId }}</span></el-descriptions-item>
+          <el-descriptions-item label="会员"><span v-if="item.nickName != null">{{ item.nickName }}({{ item.phone
+              }})</span></el-descriptions-item>
+          <el-descriptions-item label="用户名称"><span v-if="item != null">{{ item.userName }}</span></el-descriptions-item>
+          <el-descriptions-item label="用户电话"><span v-if="item != null">{{ item.userPhone }}</span>
+            <el-button icon="el-icon-search" size="mini" @click="handlePhone()" style="margin-left: 20px;" circle
+              v-hasPermi="['his:integralOrder:queryPhone']"></el-button>
+          </el-descriptions-item>
+          <el-descriptions-item label="用户地址"><span v-if="item != null">{{ item.userAddress
+              }}</span></el-descriptions-item>
+          <el-descriptions-item label="支付积分"><span v-if="item != null">{{ item.integral }}</span></el-descriptions-item>
+          <el-descriptions-item label="状态"><span v-if="item != null"> <dict-tag :options="statusOptions"
+                :value="item.status" /></span></el-descriptions-item>
+          <el-descriptions-item label="快递公司编号"><span v-if="item != null">{{ item.deliveryCode
+              }}</span></el-descriptions-item>
+          <el-descriptions-item label="快递名称"><span v-if="item != null">{{ item.deliveryName
+              }}</span></el-descriptions-item>
+          <el-descriptions-item label="快递单号"><span v-if="item != null">{{ item.deliverySn
+              }}</span></el-descriptions-item>
+          <!-- <el-descriptions-item label="物流状态"><span v-if="item != null">{{ item.deliveryType
+              }}</span></el-descriptions-item> -->
+          <el-descriptions-item label="物流状态" ><dict-tag :options="deliveryStatusOptions" :value="item.deliveryStatus"/></el-descriptions-item>
 
-            <div class="operate-button-container"  v-hasPermi="['his:integralOrder:edit']">
-              <el-button size="mini" @click="updateOrder()" >修改订单</el-button>
-            </div>
-           </div>
-           <div class="desct">
-            基本信息
-           </div>
-           <el-descriptions title="" :column="3" border>
-             <el-descriptions-item label="订单编号"><span v-if="item!=null">{{item.orderCode}}</span></el-descriptions-item>
-              <el-descriptions-item label="会员ID"><span v-if="item!=null">{{item.userId}}</span></el-descriptions-item>
-             <el-descriptions-item label="会员"><span v-if="item.nickName!=null">{{item.nickName}}({{item.phone}})</span></el-descriptions-item>
-             <el-descriptions-item label="用户名称"><span v-if="item!=null">{{item.userName}}</span></el-descriptions-item>
-             <el-descriptions-item label="用户电话"><span v-if="item!=null">{{item.userPhone}}</span>
-              <el-button icon="el-icon-search" size="mini" @click="handlePhone()" style="margin-left: 20px;" circle v-hasPermi="['his:integralOrder:queryPhone']"></el-button>
-            </el-descriptions-item>
-              <el-descriptions-item label="用户地址"><span v-if="item!=null">{{item.userAddress}}</span></el-descriptions-item>
-             <el-descriptions-item label="支付积分"><span v-if="item!=null">{{item.integral}}</span></el-descriptions-item>
-             <el-descriptions-item label="状态"><span v-if="item!=null"> <dict-tag :options="statusOptions" :value="item.status"/></span></el-descriptions-item>
-             <el-descriptions-item label="快递公司编号"><span v-if="item!=null">{{item.deliveryCode}}</span></el-descriptions-item>
-             <el-descriptions-item label="快递名称"><span v-if="item!=null">{{item.deliveryName}}</span></el-descriptions-item>
-             <el-descriptions-item label="快递单号"><span v-if="item!=null">{{item.deliverySn}}</span></el-descriptions-item>
-             <el-descriptions-item label="发货时间"><span v-if="item!=null">{{item.deliveryTime}}</span></el-descriptions-item>
-             <el-descriptions-item label="提交时间"><span v-if="item!=null">{{item.createTime}}</span></el-descriptions-item>
-           </el-descriptions>
-         </el-card>
+          <el-descriptions-item label="物流跟踪状态" ><span v-if="item!=null"><dict-tag :options="deliveryTypeOptions" :value="item.deliveryType"/> </span></el-descriptions-item>
+
+          <el-descriptions-item label="发货时间"><span v-if="item != null">{{ item.deliveryTime
+              }}</span></el-descriptions-item>
+          <el-descriptions-item label="提交时间"><span v-if="item != null">{{ item.createTime
+              }}</span></el-descriptions-item>
+        </el-descriptions>
+      </el-card>
 
     </div>
-      <div class="contentx" v-if="item!=null" style="padding-bottom: 70px;">
-       <div class="desct">
-           商品信息
-          </div>
-       <el-table
-              border
-              v-if="prod!=null"
-              :data="prod"
-              size="small"
-              style="margin-top: 20px" >
-              <el-table-column label="商品图片"  align="center">
-                <template slot-scope="scope">
-                  <img :src="scope.row.imgUrl" style="height: 80px">
-                </template>
-              </el-table-column>
-              <el-table-column label="商品名称"  align="center">
-                <template slot-scope="scope">
-                  <p>{{scope.row.goodsName}}</p>
-                </template>
-              </el-table-column>
-              <el-table-column label="积分" align="center">
+    <div class="contentx" v-if="item != null" style="padding-bottom: 70px;">
+      <div class="desct">
+        商品信息
+      </div>
+      <el-table border v-if="prod != null" :data="prod" size="small" style="margin-top: 20px">
+        <el-table-column label="商品图片" align="center">
+          <template slot-scope="scope">
+            <img :src="scope.row.imgUrl" style="height: 80px">
+          </template>
+        </el-table-column>
+        <el-table-column label="商品名称" align="center">
+          <template slot-scope="scope">
+            <p>{{ scope.row.goodsName }}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="积分" align="center">
+          <template slot-scope="scope">
+            <p>¥{{ scope.row.integral }}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="金额" align="center">
+          <template slot-scope="scope">
+            <p>¥{{ scope.row.cash || 0 }}</p>
+          </template>
+        </el-table-column>
+
+      </el-table>
+    </div>
+    
+    <!-- 操作记录 -->
+    <div class="contentx" v-if="item != null" style="padding-bottom: 70px;">
+      <div class="desct">
+        操作记录
+      </div>
+      <el-table :data="orderLogs" border style="width: 100%; margin-top: 20px;" v-loading="logsLoading">
+        <!-- <el-table-column prop="changeType" label="操作类型" align="center" width="120">
+        </el-table-column> -->
+        <el-table-column prop="changeTime" label="操作时间" align="center" width="180">
+          <template slot-scope="scope">
+            {{ parseTime(scope.row.changeTime) }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="changeMessage" label="操作备注" align="center">
+        </el-table-column>
+        <!-- <el-table-column prop="operator" label="操作员" align="center" width="120">
+        </el-table-column> -->
+        
+      </el-table>
+    </div>
+    <el-dialog width="35%" title="发货" :visible.sync="sendVisible" append-to-body @close="sendCancel">
+      <el-form ref="form" :model="form" label-width="120px">
+        <el-form-item label="快递名称" prop="deliveryName">
+          <el-select v-model="selectedExpress" placeholder="请选择快递名称" value-key="name">
+            <el-option v-for="item in expressOption" :key="item.name" :label="item.name" :value="item">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="快递公司编号" prop="deliveryCode">
+          <el-input v-model="form.deliveryCode" placeholder="请输入快递公司编号" disabled />
+
+        </el-form-item>
+
+        <el-form-item label="快递单号" prop="deliverySn">
+          <el-input v-model="form.deliverySn" placeholder="请输入快递单号" />
+        </el-form-item>
+
+        <!-- 代服账号选择表格 -->
+        <!-- <el-form-item label="代服账号选择" prop="selectedAccount" required>
+          <div style="border: 1px solid #e6ebf5; border-radius: 4px; padding: 10px;">
+            <el-table ref="accountTable" :data="tableData" highlight-current-row
+              @current-change="handleAccountSelectionChange" style="width: 100%" size="small" max-height="400">
+
+              <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
+              <el-table-column prop="loginAccount" label="登录账号" align="center" width="120"
+                show-overflow-tooltip></el-table-column>
+              <el-table-column prop="monthlyCard" label="月结账号" align="center" width="120"
+                show-overflow-tooltip></el-table-column>
+              <el-table-column prop="expressProductCode" label="物流产品" align="center" width="120" show-overflow-tooltip>
                 <template slot-scope="scope">
-                  <p>¥{{scope.row.integral}}</p>
+                  <dict-tag :options="expressOptions" :value="scope.row.expressProductCode" />
                 </template>
               </el-table-column>
-              <el-table-column label="金额" align="center">
-               <template slot-scope="scope">
-                 <p>¥{{scope.row.cash || 0}}</p>
-               </template>
-              </el-table-column>
+              <el-table-column prop="senderName" label="寄件人姓名" align="center" width="100"></el-table-column>
+              <el-table-column prop="senderPhone" label="寄件人手机" align="center" width="120"></el-table-column>
+              <el-table-column prop="senderProvince" label="寄件人省" align="center" width="100"
+                show-overflow-tooltip></el-table-column>
+              <el-table-column prop="senderCity" label="寄件人市" align="center" width="100"
+                show-overflow-tooltip></el-table-column>
+              <el-table-column prop="senderDistrict" label="寄件人区" align="center" width="100"
+                show-overflow-tooltip></el-table-column>
+              <el-table-column prop="senderAddress" label="寄件人地址" align="center" min-width="150"
+                show-overflow-tooltip></el-table-column>
 
             </el-table>
-       </div>
-      <el-dialog
-           width="50%"
-           title="发货"
-           :visible.sync="sendVisible"
-           append-to-body @close="sendCancel">
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
-          <el-form-item label="快递公司编号" prop="deliveryCode">
-                    <el-input v-model="form.deliveryCode" placeholder="请输入快递公司编号" />
-                  </el-form-item>
-                  <el-form-item label="快递名称" prop="deliveryName">
-                    <el-input v-model="form.deliveryName" placeholder="请输入快递名称" />
-                  </el-form-item>
-                  <el-form-item label="快递单号" prop="deliverySn">
-                    <el-input v-model="form.deliverySn" placeholder="请输入快递单号" />
-                  </el-form-item>
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-                          <el-button type="primary" @click="sendGoods">确 定</el-button>
-                          <el-button @click="sendCancel">取 消</el-button>
-        </div>
 
-          </el-dialog>
+            
+            <el-pagination small layout="prev, pager, next" :total="total" :page-size="queryParams.pageSize"
+              :current-page="queryParams.pageNum" @current-change="handlePageChange"
+              style="margin-top: 10px; text-align: center;">
+            </el-pagination>
 
-          <el-dialog :title="expressDialog.title" :visible.sync="expressDialog.open" width="600px" append-to-body>
-            <el-table style="margin-top: 20px;width: 100%"
-                      ref="orderHistoryTable"
-                      :data="traces" border>
-              <el-table-column label="操作时间"  width="160" align="center">
-                <template slot-scope="scope">
-                  {{scope.row.AcceptTime}}
-                </template>
-              </el-table-column>
-               <el-table-column label="位置" align="center">
-                <template slot-scope="scope">
-                  {{scope.row.Location}}
-                </template>
-              </el-table-column>
-              <el-table-column label="描述" align="center">
+            <div style="margin-top: 10px; color: #909399; font-size: 12px; text-align: center;">
+              提示:点击表格行选择代服账号
+            </div>
+
+            
+            <div v-if="selectedRow" style="margin-top: 10px; padding: 8px; background: #f5f7fa; border-radius: 4px;">
+              <span style="color: #67C23A;">已选择:</span>
+              <span>{{ selectedRow.loginAccount }} ({{ selectedRow.senderName }})</span>
+            </div>
+          </div>
+        </el-form-item> -->
+
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="sendGoods">确 定</el-button>
+        <el-button @click="sendCancel">取 消</el-button>
+      </div>
+
+    </el-dialog>
+
+    <el-dialog :title="expressDialog.title" :visible.sync="expressDialog.open" width="600px" append-to-body>
+      <div style="margin-bottom: 10px; text-align: right;">
+        <el-button type="primary" size="small" @click="syncExpressInfo" :loading="syncLoading">同步物流信息</el-button>
+      </div>
+      <el-table style="margin-top: 20px;width: 100%" ref="orderHistoryTable" :data="traces" border v-loading="tableLoading">
+        <el-table-column label="操作时间" width="160" align="center">
+          <template slot-scope="scope">
+            {{ scope.row.AcceptTime }}
+          </template>
+        </el-table-column>
+        <el-table-column label="位置" align="center">
+          <template slot-scope="scope">
+            {{ scope.row.Location }}
+          </template>
+        </el-table-column>
+        <el-table-column label="描述" align="center">
+          <template slot-scope="scope">
+            {{ scope.row.AcceptStation }}
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+
+    <el-dialog :title="editOrder.title" :visible.sync="editOrder.open" width="600px" append-to-body>
+      <el-form ref="editForm" :model="editForm" :rules="editRules" label-width="100px">
+        <el-form-item label="订单状态" prop="status">
+          <el-select v-model="editForm.status" placeholder="请选择状态" clearable size="small" filterable>
+            <el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel"
+              :value="dict.dictValue" :disabled="dict.dictValue==4||dict.dictValue==6||dict.dictValue==-1"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="收货地址" required v-if="item.status == 1">
+          <div style="margin-bottom: 10px;">
+            <el-select 
+              v-model="selectedProvince" 
+              placeholder="请选择省" 
+              style="width: 32%; margin-right: 1%"
+              @change="onProvinceChange"
+              clearable
+            >
+              <el-option
+                v-for="item in provinceOptions"
+                :key="item.value"
+                :label="item.label"
+                :value="item"
+              />
+            </el-select>
+            
+            <el-select 
+              v-model="selectedCity" 
+              placeholder="请选择市" 
+              style="width: 32%; margin-right: 1%"
+              @change="onCityChange"
+              :disabled="!selectedProvince"
+              clearable
+            >
+              <el-option
+                v-for="item in cityOptions"
+                :key="item.value"
+                :label="item.label"
+                :value="item"
+              />
+            </el-select>
+            
+            <el-select 
+              v-model="selectedDistrict" 
+              placeholder="请选择区" 
+              style="width: 32%;"
+              @change="onDistrictChange"
+              :disabled="!selectedCity"
+              clearable
+            >
+              <el-option
+                v-for="item in districtOptions"
+                :key="item.value"
+                :label="item.label"
+                :value="item"
+              />
+            </el-select>
+          </div>
+          
+          <el-input 
+            v-model="detailAddress" 
+            placeholder="请输入详细地址(街道、门牌号等)" 
+            style="width: 100%"
+            clearable
+          />
+        </el-form-item>
+
+        <!-- 其他状态显示只读的地址信息 -->
+        <el-form-item label="收货地址" v-else>
+          <el-input 
+            v-model="editForm.userAddress" 
+            placeholder="请输入" 
+            disabled
+          />
+        </el-form-item>
+
+        <!-- 修改:快递信息改为下拉选择 -->
+        <el-form-item label="快递名称" prop="deliveryName">
+          <el-select v-model="editSelectedExpress" placeholder="请选择快递名称" value-key="name" clearable>
+            <el-option v-for="item in expressOption" :key="item.name" :label="item.name" :value="item">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="快递公司编号" prop="deliveryCode">
+          <el-input v-model="editForm.deliveryCode" placeholder="快递公司编号" disabled />
+        </el-form-item>
+        <el-form-item label="快递单号" prop="deliverySn">
+          <el-input v-model="editForm.deliverySn" placeholder="请输入快递单号" />
+        </el-form-item>
+
+        <!-- 代服账号选择表格 - 使用同一个数据源 -->
+        <!-- <el-form-item label="代服账号" prop="loginAccount">
+          <div style="border: 1px solid #e6ebf5; border-radius: 4px; padding: 10px;">
+            <el-table ref="editAccountTable" :data="tableData" highlight-current-row
+              @current-change="handleEditAccountSelectionChange" style="width: 100%" size="small" max-height="300">
+
+              <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
+              <el-table-column prop="loginAccount" label="登录账号" align="center" width="120"
+                show-overflow-tooltip></el-table-column>
+              <el-table-column prop="monthlyCard" label="月结账号" align="center" width="120"
+                show-overflow-tooltip></el-table-column>
+              <el-table-column prop="expressProductCode" label="物流产品" align="center" width="120" show-overflow-tooltip>
                 <template slot-scope="scope">
-                  {{scope.row.AcceptStation}}
+                  <dict-tag :options="expressOptions" :value="scope.row.expressProductCode" />
                 </template>
               </el-table-column>
+              <el-table-column prop="senderName" label="寄件人姓名" align="center" width="100"></el-table-column>
+              <el-table-column prop="senderPhone" label="寄件人手机" align="center" width="120"></el-table-column>
+              <el-table-column prop="senderProvince" label="寄件人省" align="center" width="100"
+                show-overflow-tooltip></el-table-column>
+              <el-table-column prop="senderCity" label="寄件人市" align="center" width="100"
+                show-overflow-tooltip></el-table-column>
+              <el-table-column prop="senderDistrict" label="寄件人区" align="center" width="100"
+                show-overflow-tooltip></el-table-column>
+              <el-table-column prop="senderAddress" label="寄件人地址" align="center" min-width="150"
+                show-overflow-tooltip></el-table-column>
+
             </el-table>
-          </el-dialog>
-
-          <el-dialog :title="editOrder.title" :visible.sync="editOrder.open" width="600px" append-to-body>
-            <el-form ref="editForm" :model="editForm" :rules="editRules" label-width="100px">
-              <el-form-item label="订单状态" prop="status" >
-                <el-select v-model="editForm.status" placeholder="请选择状态" clearable size="small" filterable>
-                    <el-option
-                      v-for="dict in statusOptions "
-                      :key="dict.dictValue"
-                      :label="dict.dictLabel"
-                      :value="dict.dictValue"
-                    />
-                  </el-select>
-                </el-form-item>
-              <el-form-item label="详情地址" prop="userAddress"  >
-                <el-input v-model="editForm.userAddress" placeholder="请输入" />
-              </el-form-item>
-              <el-form-item label="备注" prop="remark"  >
-                <el-input v-model="editForm.remark" placeholder="请输入备注" />
-              </el-form-item>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-              <el-button type="primary" @click="submitEditForm">确 定</el-button>
+
+            <el-pagination small layout="prev, pager, next" :total="total" :page-size="queryParams.pageSize"
+              :current-page="queryParams.pageNum" @current-change="handlePageChange"
+              style="margin-top: 10px; text-align: center;">
+            </el-pagination>
+
+            <div style="margin-top: 10px; color: #909399; font-size: 12px; text-align: center;">
+              提示:点击表格行选择代服账号
             </div>
-          </el-dialog>
-    </div>
+
+            <div v-if="editSelectedRow"
+              style="margin-top: 10px; padding: 8px; background: #f5f7fa; border-radius: 4px;">
+              <span style="color: #67C23A;">已选择:</span>
+              <span>{{ editSelectedRow.loginAccount }} ({{ editSelectedRow.senderName }})</span>
+            </div>
+          </div>
+        </el-form-item> -->
+
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="editForm.remark" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitEditForm">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-import {getExpress, listIntegralOrder, sendgoods,getIntegralOrder, delIntegralOrder, addIntegralOrder, updateIntegralOrder, exportIntegralOrder,getOrderUserPhone } from "@/api/his/integralOrder";
-  export default {
-    name: "integralOrder",
-    data() {
-      return {
-        expressDialog:{
-          title:"物流信息",
-          open:false,
-        },
-        editOrder:{
-          title:"修改订单",
-          open:false,
-        },
-        editForm:{
-          orderId:null,
-          status:null,
-          userAddress:null,
-          remark:"",
-        },
-        editRules:{},
-        item:null,
-        express:null,
-        traces:[],
-        rules:{
-      deliveryCode: [
-        { required: true, message: '请输入快递公司编号', trigger: 'blur' }
-      ],
-      deliveryName: [
-        { required: true, message: '请输入快递名称', trigger: 'blur' }
-      ],
-      deliverySn: [
-        { required: true, message: '请输入快递单号', trigger: 'blur' }
-      ]
+import { getExpress,mandatoryRefunds,getCitys,finishOrder, listIntegralOrder, sendgoods, getIntegralOrder, delIntegralOrder, addIntegralOrder, updateIntegralOrder, exportIntegralOrder, getOrderUserPhone, getOrderLogs } from "@/api/his/integralOrder";
+import { getExpressList } from "@/api/his/express";
+import { listAccount } from "@/api/his/dfAccount";
+export default {
+  name: "integralOrder",
+  data() {
+    return {
+      deliveryStatusOptions:[],
+      selectedExpress: null,
+      expressOption: [],
+      expressDialog: {
+        title: "物流信息",
+        open: false,
+      },
+      editOrder: {
+        title: "修改订单",
+        open: false,
+      },
+      editForm: {
+        orderId: null,
+        status: null,
+        userAddress: null, // 这个字段将存储拼接后的完整地址
+        remark: "",
+        loginAccount: null,
+        // 新增快递相关字段
+        deliveryName: null,
+        deliveryCode: null,
+        deliverySn: null
+      },
+      editRules: {
+        deliveryName: [
+          { required: false, message: '请输入快递名称', trigger: 'blur' }
+        ],
+        deliveryCode: [
+          { required: false, message: '请输入快递公司编号', trigger: 'blur' }
+        ],
+        deliverySn: [
+          { required: false, message: '请输入快递单号', trigger: 'blur' }
+        ]
+      },
+      item: null,
+      express: null,
+      traces: [],
+      rules: {
+        deliveryCode: [
+          { required: true, message: '请输入快递公司编号', trigger: 'blur' }
+        ],
+        deliveryName: [
+          { required: true, message: '请输入快递名称', trigger: 'blur' }
+        ],
+        deliverySn: [
+          { required: true, message: '请输入快递单号', trigger: 'blur' }
+        ],
+        selectedAccount: [  // 添加这一项
+          { required: true, message: '请选择代服账号', trigger: 'change' }
+        ]
+      },
+      sendVisible: false,
+      form: {
+        deliveryCode: null,
+        deliveryName: null,
+        deliverySn: null,
+        orderId: null,
+        loginAccount: null  // 在 form 中也添加这个字段
+      },
+      tableData: [], // 清空模拟数据,改为空数组
+      selectedRow: null,
+      editSelectedRow: null, // 修改订单弹窗选中的行
+      queryParams: { // 查询参数
+        pageNum: 1,
+        pageSize: 10
+      },
+      total: 0, // 总条数,
+      expressOptions: [], // 物流产品字典
+      editSelectedExpress: null,
+      // 地址选择相关数据
+      provinceOptions: [], // 省列表
+      cityOptions: [], // 市列表
+      districtOptions: [], // 区列表
+      selectedProvince: null, // 选中的省
+      selectedCity: null, // 选中的市
+      selectedDistrict: null, // 选中的区
+      detailAddress: '', // 详细地址
+      deliveryTypeOptions:[],
+      // 操作记录相关数据
+      orderLogs: [], // 订单操作记录
+      logsLoading: false, // 操作记录加载状态
+      syncLoading: false, // 同步物流信息按钮加载状态
+      tableLoading: false // 物流信息表格加载状态
+    }
+  },
+  created() {
+    this.getDicts("sys_integral_order_status").then(response => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("df_account_express").then(response => {
+      this.expressOptions = response.data;
+    });
+    this.getDicts("sys_store_order_delivery_status").then(response => {
+          this.deliveryStatusOptions = response.data;
+    });
+    this.getDicts("sys_delivery_type").then(response => {
+              this.deliveryTypeOptions = response.data;
+            });
+  },
+  watch: {
+    selectedExpress(newVal) {
+      console.log('选中的快递:', newVal); // 调试用
+      if (newVal && newVal.name && newVal.code) {
+        this.form.deliveryName = newVal.name;
+        this.form.deliveryCode = newVal.code;
+      } else {
+        this.form.deliveryName = '';
+        this.form.deliveryCode = '';
+      }
     },
-        sendVisible:false,
-        form: {
-          deliveryCode: null,
-          deliveryName:null,
-          deliverySn:null,
-          orderId:null,
+    // 新增:修改订单弹窗的快递选择监听
+    editSelectedExpress(newVal) {
+      console.log('修改订单弹窗选中的快递:', newVal);
+      if (newVal && newVal.name && newVal.code) {
+        this.editForm.deliveryName = newVal.name;
+        this.editForm.deliveryCode = newVal.code;
+      } else {
+        this.editForm.deliveryName = '';
+        this.editForm.deliveryCode = '';
+      }
+    },
+    'editOrder.open': function (newVal) {
+      if (!newVal) {
+        // 修改订单弹窗关闭时清理选择状态
+        this.editSelectedRow = null;
+        if (this.$refs.editAccountTable) {
+          this.$refs.editAccountTable.setCurrentRow();
         }
       }
     },
-    created() {
-      this.getDicts("sys_integral_order_status").then(response => {
-        this.statusOptions = response.data;
-      });
+    'expressDialog.open': function (newVal) {
+      if (!newVal) {
+        // 查看物流弹窗关闭时清理数据
+        this.express = null;
+        this.traces = [];
+      }
     },
-    methods: {
-      handlePhone(){
-        const orderId = this.item.orderId;
-        getOrderUserPhone(orderId).then(response =>{
-            this.item.userPhone = response.userPhone;
-        })
-      },
-      updateOrder(){
-        this.editOrder.open=true;
-        this.editForm.orderId=this.item.orderId;
-        this.editForm.remark=this.item.remark;
-        this.editForm.status = this.item.status.toString();
-        this.editForm.userAddress = this.item.userAddress.toString();
-      },
-     //修改订单状态
-     submitEditForm(){
-        this.$refs["editForm"].validate(valid => {
+  },
+  methods: {
+    getStepActive(status) {
+      const statusMap = {
+        4: 1, // 待支付 -> 激活第1步(显示到待支付)
+        1: 2, // 待发货 -> 激活第2步(显示到待发货)
+        2: 3, // 待收货 -> 激活第3步(显示到待收货)
+        3: 4  // 已完成 -> 激活第4步(全部完成)
+      };
+      return statusMap[status] || 0;
+    },
+    handlePhone() {
+      const orderId = this.item.orderId;
+      getOrderUserPhone(orderId).then(response => {
+        this.item.userPhone = response.userPhone;
+      })
+    },
+    async updateOrder() {
+      this.editOrder.open = true;
+      this.editForm.orderId = this.item.orderId;
+      this.editForm.remark = this.item.remark;
+      this.editForm.status = this.item.status.toString();
+      this.editForm.userAddress = this.item.userAddress.toString();
+      this.editForm.loginAccount = this.item.loginAccount;
+
+      // 设置快递字段的初始值
+      this.editForm.deliveryName = this.item.deliveryName;
+      this.editForm.deliveryCode = this.item.deliveryCode;
+      this.editForm.deliverySn = this.item.deliverySn;
+
+      // 重置选择状态
+      this.editSelectedRow = null;
+      this.editSelectedExpress = null;
+
+      try {
+        // 1. 先确保快递选项数据已加载
+        if (this.expressOption.length === 0) {
+          await getExpressList().then(response => {
+            this.expressOption = response.data;
+          });
+        }
+
+        // 2. 设置选中的快递(在快递数据加载完成后)
+        if (this.item.deliveryName && this.expressOption.length > 0) {
+          const currentExpress = this.expressOption.find(item =>
+            item.name === this.item.deliveryName
+          );
+          if (currentExpress) {
+            this.editSelectedExpress = currentExpress;
+          }
+        }
+
+        // 3. 初始化地址选择器(只在待发货状态时执行)
+        if (this.item.status == 1) {
+          await this.initAddressSelector();
+        }
+
+        // 4. 等待代服账号数据加载完成
+        await this.getAccountList();
+
+        // 5. 在数据都加载完成后尝试选中对应的行
+        if (this.item.loginAccount) {
+          this.$nextTick(() => {
+            this.selectCurrentAccount();
+          });
+        }
+      } catch (error) {
+        console.error('加载数据失败:', error);
+      }
+    },
+    // 初始化地址选择器
+    async initAddressSelector() {
+      // 重置地址选择器
+      this.provinceOptions = [];
+      this.cityOptions = [];
+      this.districtOptions = [];
+      this.selectedProvince = null;
+      this.selectedCity = null;
+      this.selectedDistrict = null;
+      this.detailAddress = '';
+
+      // 只有在待发货状态时才初始化地址选择器
+      if (this.item.status == 1) {
+        // 获取省份数据
+        try {
+          const response = await getCitys(); // 假设getCitys是您导入的方法
+          this.provinceOptions = response.data || [];
+          
+          // 如果现有地址不为空,尝试解析并设置初始值
+          if (this.item.userAddress) {
+            this.parseExistingAddress(this.item.userAddress);
+          }
+        } catch (error) {
+          console.error('获取地址数据失败:', error);
+        }
+      }
+    },
+
+    // 解析现有地址
+    parseExistingAddress(address) {
+      if (!address || this.item.status != 1) return;
+      
+      // 假设地址格式为 "省 市 区 详细地址"
+      const parts = address.split(' ');
+      if (parts.length >= 4) {
+        const provinceName = parts[0];
+        const cityName = parts[1];
+        const districtName = parts[2];
+        this.detailAddress = parts.slice(3).join(' '); // 剩余部分作为详细地址
+        
+        // 设置省份
+        const province = this.provinceOptions.find(p => p.label === provinceName);
+        if (province) {
+          this.selectedProvince = province;
+          this.onProvinceChange(province);
+          
+          // 设置城市
+          const city = province.children?.find(c => c.label === cityName);
+          if (city) {
+            this.selectedCity = city;
+            this.onCityChange(city);
+            
+            // 设置区域
+            const district = city.children?.find(d => d.label === districtName);
+            if (district) {
+              this.selectedDistrict = district;
+            }
+          }
+        }
+      } else {
+        // 如果格式不匹配,将整个地址作为详细地址
+        this.detailAddress = address;
+      }
+    },
+    // 省份选择变化
+    onProvinceChange(province) {
+      this.selectedCity = null;
+      this.selectedDistrict = null;
+      this.cityOptions = province?.children || [];
+      this.districtOptions = [];
+    },
+
+    // 城市选择变化
+    onCityChange(city) {
+      this.selectedDistrict = null;
+      this.districtOptions = city?.children || [];
+    },
+
+    // 区域选择变化
+    onDistrictChange(district) {
+      // 可以在这里处理区域选择后的逻辑
+    },
+    // 选中当前账号(修改订单弹窗使用)
+    selectCurrentAccount() {
+      if (!this.item.loginAccount || !this.tableData || this.tableData.length === 0) {
+        console.log('无法选中账号:数据未就绪');
+        return;
+      }
+
+      const currentAccount = this.tableData.find(item =>
+        item.loginAccount === this.item.loginAccount
+      );
+
+      if (currentAccount) {
+        this.editSelectedRow = currentAccount;
+        this.$nextTick(() => {
+          if (this.$refs.editAccountTable) {
+            this.$refs.editAccountTable.setCurrentRow(currentAccount);
+            console.log('成功选中代服账号:', currentAccount.loginAccount);
+          }
+        });
+      } else {
+        console.log('未找到对应的代服账号:', this.item.loginAccount);
+      }
+    },
+    //修改订单状态
+    submitEditForm() {
+      // 只有在待发货状态(status=1)时才更新地址
+      if (this.item.status == 1) {
+        // 拼接完整地址
+        const province = this.selectedProvince ? this.selectedProvince.label : '';
+        const city = this.selectedCity ? this.selectedCity.label : '';
+        const district = this.selectedDistrict ? this.selectedDistrict.label : '';
+        const detail = this.detailAddress || '';
+        
+        // 使用空格拼接四个字段
+        this.editForm.userAddress = `${province} ${city} ${district} ${detail}`.trim();
+      } else {
+        // 其他状态保持原地址不变
+        this.editForm.userAddress = this.item.userAddress;
+      }
+      
+      this.$refs["editForm"].validate(valid => {
         if (valid) {
           updateIntegralOrder(this.editForm).then(response => {
             if (response.code === 200) {
               this.msgSuccess("操作成功");
               this.editOrder.open = false;
               this.getDetails(this.item.orderId);
-              }
-            });
-          }
-        });
-      },
-      sendCancel(){
-           this.sendVisible = false;
-           this.form={
-             deliveryCode: null,
-             deliveryName:null,
-             deliverySn:null,
-             orderId:null,
-           }
-      },
-      showExpress(){
-        this.expressDialog.open=true;
-        getExpress(this.item.orderId).then(response => {
-            this.express = response.data;
-            if(this.express!=null&&this.express.Traces!=null){
-                this.traces=this.express.Traces
             }
+          });
+        }
+      });
+    },
+    sendCancel() {
+      this.sendVisible = false;
+      this.form = {
+        deliveryCode: null,
+        deliveryName: null,
+        deliverySn: null,
+        orderId: null,
+        loginAccount: null
+      };
+      this.selectedExpress = null;
+      this.selectedRow = null;
+      if (this.$refs.accountTable) {
+        this.$refs.accountTable.setCurrentRow();
+      }
+    },
+    showSend() {
+      // 重置表单和选择状态
+      this.form = {
+        deliveryCode: null,
+        deliveryName: null,
+        deliverySn: null,
+        orderId: null,
+        loginAccount: null
+      };
+      this.selectedExpress = null;
+      this.selectedRow = null;
+
+      // 获取快递公司信息
+      getExpressList().then(response => {
+        this.expressOption = response.data;
+      });
+
+      // 获取代服账号列表
+      this.getAccountList();
+
+      this.sendVisible = true;
+    },
+    showExpress() {
+      this.expressDialog.open = true;
+      this.loadExpressInfo();
+    },
+    // 加载物流信息
+    loadExpressInfo() {
+      this.tableLoading = true;
+      getExpress(this.item.orderId).then(response => {
+        this.express = response.data;
+        if (this.express != null && this.express.Traces != null) {
+          this.traces = this.express.Traces
+        } else {
+          this.traces = [];
+        }
+        this.tableLoading = false;
+      }).catch(error => {
+        this.traces = [];
+        this.tableLoading = false;
+        console.error('获取物流信息失败:', error);
+      });
+    },
+    // 同步物流信息
+    syncExpressInfo() {
+      this.syncLoading = true;
+      this.loadExpressInfo();
+      this.syncLoading = false;
+    },
+    sendGoods() {
+      // 手动验证所有必填字段
+      if (!this.selectedRow) {
+        this.msgError('请选择代服账号');
+        return;
+      }
+
+      if (!this.form.deliveryName || !this.form.deliveryCode) {
+        this.msgError('请选择快递公司');
+        return;
+      }
+
+      if (!this.form.deliverySn) {
+        this.msgError('请输入快递单号');
+        return;
+      }
+
+      // 所有验证通过,直接发送
+      this.form.orderId = this.item.orderId;
+      sendgoods(this.form).then(response => {
+        this.msgSuccess("发货成功");
+        this.sendVisible = false;
+        getIntegralOrder(this.item.orderId).then(response => {
+          this.item = response.data;
+          this.$parent.$parent.getList();
         });
-      },
-          sendGoods(){
-              this.form.orderId=this.item.orderId;
-              sendgoods(this.form).then(response => {
-                    this.msgSuccess("修改成功");
-                    this.sendVisible = false;
-                    getIntegralOrder(this.item.orderId).then(response => {
-                        this.item = response.data;
-                        this.$parent.$parent.getList();
-                    });
-
-                    this.form={
-                    deliveryCode: null,
-                    deliveryName:null,
-                    deliverySn:null,
-                    orderId:null,
-                  }
-              });
-            },
-      getDetails(orderId) {
-        this.item=null;
-        getIntegralOrder(orderId).then(response => {
-            this.item = response.data;
-            this.prod=[JSON.parse(this.item.itemJson)];
+
+        this.form = {
+          deliveryCode: null,
+          deliveryName: null,
+          deliverySn: null,
+          orderId: null,
+          loginAccount: null
+        };
+        this.selectedRow = null;
+      });
+    },
+    getDetails(orderId) {
+      this.item = null;
+      this.orderLogs = []; // 清空操作记录
+      getIntegralOrder(orderId).then(response => {
+        this.item = response.data;
+        this.prod = [JSON.parse(this.item.itemJson)][0];
+        // 获取操作记录
+        this.getOrderLogsData();
+      });
+    },
+    // 代服账号选择变化
+    handleAccountSelectionChange(currentRow, oldRow) {
+      this.selectedRow = currentRow;
+      if (currentRow) {
+        this.form.loginAccount = currentRow.loginAccount;
+      }
+    },
+    // 修改订单弹窗的代服账号选择
+    handleEditAccountSelectionChange(currentRow, oldRow) {
+      this.editSelectedRow = currentRow;
+      if (currentRow) {
+        this.editForm.loginAccount = currentRow.loginAccount;
+      }
+    },
+    // 获取代服账号列表
+    getAccountList() {
+      return new Promise((resolve, reject) => {
+        listAccount(this.queryParams).then(response => {
+          this.tableData = response.rows || response.data || [];
+          this.total = response.total || 0;
+          resolve(this.tableData); // 数据加载完成
+        }).catch(error => {
+          this.tableData = [];
+          reject(error);
         });
-      },
+      });
+    },
+    handlePageChange(page) {
+      this.queryParams.pageNum = page;
+      this.getAccountList();
+    },
+    // 取消订单
+    applyRefund() {
+      this.$confirm('确定要取消该订单吗?取消后订单将无法恢复。', '取消订单确认', {
+        confirmButtonText: '确定取消',
+        cancelButtonText: '再想想',
+        type: 'warning',
+        confirmButtonClass: 'el-button--danger'
+      }).then(() => {
+        this.cancelOrder();
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消操作'
+        });
+      });
+    },
+
+    // 执行取消订单请求
+    cancelOrder() {
+      const orderCode = this.item.orderCode;
+      mandatoryRefunds(orderCode).then(response => {
+        if (response.code === 200) {
+          this.msgSuccess("取消订单成功");
+          // 刷新订单详情
+          this.getDetails(this.item.orderId);
+          // 刷新父组件列表(如果有)
+          if (this.$parent && this.$parent.$parent && this.$parent.$parent.getList) {
+            this.$parent.$parent.getList();
+          }
+        } else {
+          this.msgError(response.msg || "取消订单失败");
+        }
+      }).catch(error => {
+        this.msgError("取消订单失败");
+        console.error('取消订单失败:', error);
+      });
+    },
+    // 完成订单
+    handleFinishOrder() {
+      this.$confirm('确定要完成该订单吗?完成后订单状态将变为已完成。', '完成订单确认', {
+        confirmButtonText: '确定完成',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        // 用户点击确定
+        this.executeFinishOrder();
+      }).catch(() => {
+        // 用户点击取消
+        this.$message({
+          type: 'info',
+          message: '已取消操作'
+        });
+      });
+    },
+    
+    // 执行完成订单请求
+    executeFinishOrder() {
+      const orderCode = this.item.orderCode;
+      console.log("请问请问",orderCode)
+      finishOrder(orderCode).then(response => {
+        if (response.code === 200) {
+          this.msgSuccess("订单完成成功");
+          // 刷新订单详情
+          this.getDetails(this.item.orderId);
+          // 刷新父组件列表(如果有)
+          if (this.$parent && this.$parent.$parent && this.$parent.$parent.getList) {
+            this.$parent.$parent.getList();
+          }
+        } else {
+          this.msgError(response.msg || "订单完成失败");
+        }
+      }).catch(error => {
+        this.msgError("订单完成失败");
+        console.error('完成订单失败:', error);
+      });
+    },
+    // 获取订单操作记录
+    getOrderLogsData() {
+      if (!this.item || !this.item.orderId) {
+        return;
+      }
+      
+      this.logsLoading = true;
+      getOrderLogs(this.item.orderId).then(response => {
+        if (response.code === 200) {
+          // 按照时间升序排列
+          this.orderLogs = response.data.sort((a, b) => {
+            return new Date(a.changeTime) - new Date(b.changeTime);
+          });
+        } else {
+          this.orderLogs = [];
+        }
+        this.logsLoading = false;
+      }).catch(error => {
+        this.orderLogs = [];
+        this.logsLoading = false;
+        console.error('获取操作记录失败:', error);
+      });
     }
   }
+}
 </script>
 <style>
-  .contentx{
-      height: 100%;
-      background-color: #fff;
-      padding: 0px 20px 20px;
+.contentx {
+  height: 100%;
+  background-color: #fff;
+  padding: 0px 20px 20px;
 
 
-      margin: 20px;
-  }
-  .el-descriptions-item__label.is-bordered-label{
-    font-weight: normal;
-  }
-  .el-descriptions-item__content {
-    max-width: 150px;
-    min-width: 100px;
-  }
-  .desct{
-      padding-top: 20px;
-      padding-bottom: 20px;
-      color: #524b4a;
-      font-weight: bold;
-    }
+  margin: 20px;
+}
+
+.el-descriptions-item__label.is-bordered-label {
+  font-weight: normal;
+}
+
+.el-descriptions-item__content {
+  max-width: 150px;
+  min-width: 100px;
+}
+
+.desct {
+  padding-top: 20px;
+  padding-bottom: 20px;
+  color: #524b4a;
+  font-weight: bold;
+}
+
 .operate-container {
   background: #F2F6FC;
   height: 60px;
   margin: -20px -20px 0;
   line-height: 60px;
 }
-.order-content{
+
+.order-content {
   margin: 10px;
 
 }
+
 .operate-button-container {
   float: right;
   margin-right: 20px

+ 2313 - 0
src/views/components/index/statisticsDashboard.vue

@@ -0,0 +1,2313 @@
+<template>
+  <div class="statistics-dashboard">
+    <!-- 数据概览 (Data Overview) -->
+    <el-card class="overview-section" shadow="never">
+      <el-row :gutter="20">
+        <el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16" class="companybox">
+          <img src="@/assets/images/topbg.png" alt="" class="topimg">
+          <img src="@/assets/images/topbg.png" alt="" class="bottomimg">
+          <div class="companyboxtitle">
+            企业数据
+          </div>
+          <div class="companyflex">
+            <div class="topbg companycard cardafter">
+              <div class="card-title1">
+                <img src="@/assets/images/tab_company.png" alt="" class="icon-img">
+                分公司数量
+              </div>
+
+              <div class="card-value highlight1">
+                <count-to :start-val="0" :end-val="dealderCount" :duration="3600"
+                          class="card-panel-num companynumber" />
+              </div>
+            </div>
+            <div class="companycard cardafter">
+              <div class="card-title1">
+                <img src="@/assets/images/salesperson.png" alt="" class="icon-img">
+                销售数量
+              </div>
+              <div class="card-value highlight1">
+                <count-to :start-val="0" :end-val="groupMgrCount" :duration="3600"
+                          class="card-panel-num companynumber" />
+              </div>
+            </div>
+            <div class="companycard cardafter">
+              <div class="card-title1">
+                <img src="@/assets/images/member.png" alt="" class="icon-img">
+                会员数量
+              </div>
+              <div class="card-value highlight1">
+                <count-to :start-val="0" :end-val="memberCount" :duration="3600" class="card-panel-num companynumber" />
+                <span class="highlight-today-add companyadd">+{{todayIncreaseUserNum}}</span>
+              </div>
+
+            </div>
+            <div class="cardafter companycard">
+              <div class="card-title1">
+                <img src="@/assets/images/tab_enterprise.png" alt="" class="icon-img">
+                企微数量
+              </div>
+              <div class="card-value highlight1">
+                <count-to :start-val="0" :end-val="qwMemberNum" :duration="3600" class="card-panel-num companynumber" />
+              </div>
+            </div>
+            <div class="botttombg companycard">
+              <div class="card-title1">
+                <svg-icon icon-class="phone" />
+                pad使用情况
+              </div>
+              <div class="card-value highlight1">
+                <count-to :start-val="0" :end-val="padUsedNum" :duration="3600" class="card-panel-num companynumber" />
+                /
+                <template v-if="typeof padTotalNum === 'number'">
+                  <count-to :start-val="0" :end-val="padTotalNum" :duration="1800" class="card-panel-num companynumber" />
+                </template>
+                <template v-else>
+                  <span class="card-panel-num companynumber">{{ padTotalNum }}</span>
+                </template>
+              </div>
+            </div>
+          </div>
+        </el-col>
+
+
+        <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8" class="propertyboxtitle">
+          <div class="property_title">
+            资产概览
+          </div>
+          <div class="propertyboxflex">
+            <div class="property-card propertyline">
+              <div class="property-title">
+                <i class="el-icon-money"></i>
+                企业资产(元)
+              </div>
+              <div class="card-value highlight">
+                <count-to :start-val="0" :end-val="balance" :duration="3600" class="card-panel-num" />
+              </div>
+            </div>
+            <div class="property-card propertyline">
+              <div class="property-title">
+                <i class="el-icon-money"></i>
+                润天余额(元)
+              </div>
+              <div class="card-value highlight">
+                <count-to :start-val="0" :end-val="runTianBalance" :duration="3600" class="card-panel-num" />
+              </div>
+            </div>
+            <div class="property-card">
+              <div class="property-title">
+                <span>今日消耗 (元)</span>
+              </div>
+              <div class="card-value highlight" style="color: rgba(32, 33, 36, 1);margin-top: 10px;">
+                <count-to :start-val="0" :end-val="todayComsumption" :duration="3600" class="card-panel-num" />
+              </div>
+              <div class="card-compare">
+                较昨日 <span>+1</span>
+              </div>
+            </div>
+          </div>
+
+        </el-col>
+      </el-row>
+
+      <el-row :gutter="20">
+        <el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16">
+          <div class="operatetitle">
+            经营数据
+          </div>
+          <div class="operatetitle-col">
+            <div class="operatetitle-card">
+              <div class="card-title">
+                <i class="el-icon-shopping-cart-full"></i>
+                收款总数
+              </div>
+              <div class="operate-value highlight">
+                <count-to :start-val="0" :end-val="recvTotalNum" :duration="3600" class="card-panel-num" />
+                <div class="yesterdaybox">
+                  较昨日 <span class="highlight-today-add2">+{{recvTodayNum}}</span>
+                </div>
+              </div>
+              <div class="card-badge">
+              </div>
+            </div>
+            <div class="operatetitle-card">
+              <div class="card-title">
+                <i class="el-icon-shopping-cart-full"></i>
+                订单总数
+              </div>
+              <div class="operate-value highlight">
+                <count-to :start-val="0" :end-val="orderTotalNum" :duration="3600" class="card-panel-num" />
+                <div class="yesterdaybox">
+                  较昨日 <span class="highlight-today-add2">+{{todayOrderNum}}</span>
+                </div>
+
+              </div>
+              <div class="card-badge">
+              </div>
+
+            </div>
+            <div class="operatetitle-card">
+              <div class="card-title">
+                平台今日看课人数
+              </div>
+              <div class="operate-value highlight">
+                <count-to :start-val="0" :end-val="todayWatchUserCount" :duration="3600" class="card-panel-num" />
+              </div>
+              <div class="card-sub">
+                <span>配额上限</span>
+                <span class="sub-value">
+                  <count-to :start-val="0" :end-val="todayWatchUserCount" :duration="3600" class="card-panel-num"
+                            style="color: rgba(49, 185, 154, 1);" />
+                  /
+                  <count-to :start-val="0" :end-val="versionLimit" :duration="3600" class="card-panel-num" />
+                </span>
+              </div>
+              <el-progress :percentage="versionLimitPercent" :show-text="false"
+                           color="#409EFF"></el-progress>
+            </div>
+            <div class="operatetitle-card">
+              <div class="card-title">
+                <i class="el-icon-shopping-cart-full"></i>
+                商品总数
+              </div>
+              <div class="operate-value highlight">
+                <count-to :start-val="0" :end-val="goodsTotalNum" :duration="3600" class="card-panel-num" />
+                <div class="yesterdaybox">
+                  较昨日 <span class="highlight-today-add2">+{{todayGoodsNum}}</span>
+                </div>
+
+              </div>
+              <div class="card-badge">
+              </div>
+            </div>
+          </div>
+
+        </el-col>
+
+
+        <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8" style="padding-left: 15px;">
+
+          <div class="internetbox">
+            <div class="internet-cardtop">
+              <div class="cardinnerbox">
+                <div class="cardtopimg">
+                  <img src="@/assets/images/liuliang.png" alt=""><span>剩余流量</span>
+                </div>
+                <div class="cardtopnumber">
+                  <span>{{formatBytes(this.trafficCount)}}</span>
+                </div>
+              </div>
+              <div class="progress">
+                <el-progress :percentage="90" :show-text="false" define-back-color="#000">
+
+                </el-progress>
+              </div>
+              <div class="cardinnerbox2">
+                <div>
+                  今日消耗 <span>{{formatBytes(this.todayTraffic)}}</span>
+                </div>
+                <div>
+                  本月 <span>{{formatBytes(this.thisMonthTraffic)}}</span>
+                </div>
+              </div>
+            </div>
+
+            <div class="internetbox-messge">
+              <div class="internet-card">
+                <img src="@/assets/images/message.png" alt="">
+
+                <span class="internet-title">
+                  短信剩余条数 (条)
+                </span>
+              </div>
+              <div class="internet-number">
+                0
+              </div>
+            </div>
+          </div>
+        </el-col>
+      </el-row>
+    </el-card>
+    <!-- 分析概览 (Analysis Overview) -->
+    <div class="analysis-section" shadow="never">
+      <div slot="header" class="header">
+        <div>分析概览</div>
+        <div class="tab-group">
+          <el-radio-group v-model="queryTime" size="medium" @change="handleAnalysis">
+            <el-radio-button label="今日"></el-radio-button>
+            <el-radio-button label="昨日"></el-radio-button>
+            <el-radio-button label="本周"></el-radio-button>
+            <el-radio-button label="本月"></el-radio-button>
+            <el-radio-button label="上月"></el-radio-button>
+          </el-radio-group>
+        </div>
+        <div class="action-group">
+          <div v-if="this.$store.state.user.medicalMallConfig.statics">
+            <!-- 选择部门 -->
+            <el-select v-model="deptId" placeholder="请选择部门" size="small" @change="handleDeptChange" style="width: 150px">
+              <el-option
+                v-for="company in deptOptions"
+                :key="company.deptId"
+                :label="company.deptName"
+                :value="company.deptId"
+              />
+            </el-select>
+            <!-- 选择销售公司 -->
+            <el-select  v-model="companyId" placeholder="请选择销售公司" size="small" clearable @change="handleCompanyChange" style="width: 180px" >
+              <el-option
+                v-for="company in companyOptions"
+                :key="company.companyId"
+                :label="company.companyName"
+                :value="company.companyId"
+              />
+            </el-select>
+          </div>
+          <el-radio-group v-model="userTypeText" @change="handleUserType">
+            <el-radio-button label="会员"></el-radio-button>
+            <el-radio-button label="企微"></el-radio-button>
+          </el-radio-group>
+
+          <el-dropdown @command="handleAutoRefresh" trigger="click">
+            <el-button size="small" plain>
+              自动刷新
+              <i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item :command="0" :class="{ 'is-active': !autoRefreshInterval }">关闭</el-dropdown-item>
+              <el-dropdown-item :command="5" :class="{ 'is-active': autoRefreshInterval === 5 }">5分钟</el-dropdown-item>
+              <el-dropdown-item :command="10"
+                                :class="{ 'is-active': autoRefreshInterval === 10 }">10分钟</el-dropdown-item>
+              <el-dropdown-item :command="15"
+                                :class="{ 'is-active': autoRefreshInterval === 15 }">15分钟</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+          <el-button size="small" plain icon="el-icon-refresh" type="primary" @click="manualRefresh">手动刷新</el-button>
+        </div>
+      </div>
+    </div>
+    <div>
+      <el-row :gutter="20">
+        <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" style="position: relative">
+          <div class="analysis-card-check" :class="selectedDiv===0?'analysis-card-check-selected color':''"
+               @click="handleToggleDiv(0)">
+            <div class="analysis-card">
+              <img class="card-icon" src="@/assets/images/cishu_views.png"></img>
+              <div class="card-content">
+                <div class="card-row">
+                  <span>观看人数</span>
+                  <span class="highlight">
+                    <count-to :start-val="0" :end-val="watchUserCount" :duration="3600" class="card-panel-num" />
+                  </span>
+                </div>
+                <div class="card-row">
+                  <span>完播人数</span>
+                  <span class="highlight">
+                    <count-to :start-val="0" :end-val="completedUserCount" :duration="3600" class="card-panel-num" />
+                  </span>
+                </div>
+                <div class="card-row">
+                  <span>完播率</span>
+                  <span class="highlight">{{completedRate}}%</span>
+                </div>
+              </div>
+            </div>
+            <div class="analysis-card">
+              <img class="card-icon" src="@/assets/images/number_views.png"></img>
+              <div class="card-content">
+                <div class="card-row">
+                  <span>观看次数</span>
+                  <span class="highlight-red">
+                    <count-to :start-val="0" :end-val="watchCount" :duration="3600" class="card-panel-num" /></span>
+                </div>
+                <div class="card-row">
+                  <span>完播次数</span>
+                  <span class="highlight-red">
+                    <count-to :start-val="0" :end-val="completedCount" :duration="3600" class="card-panel-num" />
+                  </span>
+                </div>
+                <div class="card-row">
+                  <span>视频完播率</span>
+                  <span class="highlight-red">{{watchRate}}%</span>
+                </div>
+              </div>
+            </div>
+          </div>
+        </el-col>
+
+        <el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6" style="position: relative">
+          <div class="analysis-card-check" :class="selectedDiv===1?'analysis-card-check-selected color':''"
+               @click="handleToggleDiv(1)">
+            <div class="analysis-card">
+              <img class="card-icon" src="@/assets/images/renshu_views.png"></img>
+              <div class="card-content">
+                <div class="card-row">
+                  <span>答题人数</span>
+                  <span class="highlight-black">
+                    <count-to :start-val="0" :end-val="answerMemberCount" :duration="3600" class="card-panel-num" />
+                  </span>
+                </div>
+                <div class="card-row">
+                  <span>正确人数</span>
+                  <span class="highlight-black">
+                    <count-to :start-val="0" :end-val="correctUserCount" :duration="3600" class="card-panel-num" />
+                  </span>
+                </div>
+                <div class="card-row">
+                  <span>正确率</span>
+                  <span class="highlight-black">{{correctRate}}%</span>
+                </div>
+              </div>
+            </div>
+          </div>
+        </el-col>
+
+        <el-col :xs="24" :sm="12" :md="6" :lg="6" :xl="6"  style="position: relative">
+          <div class="analysis-card-check" :class="selectedDiv===2?'analysis-card-check-selected color':''"
+               @click="handleToggleDiv(2)">
+            <div class="analysis-card">
+              <img class="card-icon" src="@/assets/images/hongbao_views.png"></img>
+              <div class="card-content">
+                <div class="card-row">
+                  <span>答题红包个数</span>
+                  <span class="highlight-black">
+                    <count-to :start-val="0" :end-val="rewardCount" :duration="3600" class="card-panel-num" />
+                  </span>
+                </div>
+                <div class="card-row">
+                  <span>答题红包金额(元)</span>
+                  <span class="highlight-black">
+                    <count-to :start-val="0" :end-val="rewardMoney" :duration="3600" class="card-panel-num" /></span>
+                </div>
+              </div>
+            </div>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+
+    <!-- 图表区域 (Charts Area) -->
+    <transition name="fade">
+      <el-row :gutter="20" class="charts-section" v-show="selectedDiv===0">
+        <el-col :span="12">
+          <el-card shadow="never">
+            <div slot="header" class="chart-header">
+              <span>会员观看、完播人数趋势图</span>
+              <div class="legend">
+                <div class="legend-item">
+                  <span class="dot viewer-dot"></span>
+                  <span>观看人数</span>
+                </div>
+                <div class="legend-item">
+                  <span class="dot complete-dot"></span>
+                  <span>完播人数</span>
+                </div>
+              </div>
+              <!--              <el-button size="small" plain class="view-more">平台每日统计 <i class="el-icon-arrow-right"></i></el-button>-->
+            </div>
+            <div ref="viewerChart" class="chart-container"></div>
+          </el-card>
+        </el-col>
+
+
+        <el-col :span="12">
+          <el-card shadow="never">
+            <div slot="header" class="chart-header">
+              <span>经销商看客统计</span>
+              <div class="legend">
+                <div class="legend-item">
+                  <span class="dot viewer-dot"></span>
+                  <span>观看人数</span>
+                </div>
+                <div class="legend-item">
+                  <span class="dot complete-dot"></span>
+                  <span>完播人数</span>
+                </div>
+              </div>
+            </div>
+            <div ref="dealerChartNew" class="chart-container"></div>
+          </el-card>
+        </el-col>
+
+        <!--        <el-col :span="12">-->
+        <!--          <el-card shadow="never">-->
+        <!--            <div slot="header" class="chart-header">-->
+        <!--              <span>经销商会员观看TOP10</span>-->
+        <!--              <div class="legend">-->
+        <!--                <el-radio-group v-model="viewerType" size="small" @change="handleDealerChartData">-->
+        <!--                  <el-radio-button label="0">按观看人数</el-radio-button>-->
+        <!--                  <el-radio-button label="1">按完播人数</el-radio-button>-->
+        <!--                </el-radio-group>-->
+        <!--              </div>-->
+        <!--              &lt;!&ndash;              <el-button size="small" plain class="view-more">经销商统计 <i class="el-icon-arrow-right"></i></el-button>&ndash;&gt;-->
+        <!--            </div>-->
+        <!--            <div ref="dealerChart" class="chart-container"></div>-->
+        <!--          </el-card>-->
+        <!--        </el-col>-->
+      </el-row>
+    </transition>
+    <transition name="fade">
+      <el-row :gutter="20" class="charts-section" v-show="selectedDiv===1">
+        <el-card shadow="never">
+          <div slot="header" class="chart-header">
+            <span>课程观看TOP10</span>
+            <div class="legend">
+              <el-radio-group v-model="viewerType" size="small" @change="handleCourseWatchChart">
+                <el-radio-button label="0">按观看人数</el-radio-button>
+                <el-radio-button label="1">按完播人数</el-radio-button>
+                <el-radio-button label="2">按答题人数</el-radio-button>
+                <el-radio-button label="3">按正确人数</el-radio-button>
+              </el-radio-group>
+            </div>
+            <div class="legend">
+              <el-radio-group v-model="delerSort" @change="handleCourseWatchChart">
+                <el-radio label="DESC">前10名</el-radio>
+                <el-radio label="ASC">倒数10名</el-radio>
+              </el-radio-group>
+            </div>
+            <div class="legend">
+              <div class="legend-item">
+                <span class="dot viewer-dot"></span>
+                <span>观看人数</span>
+              </div>
+              <div class="legend-item">
+                <span class="dot complete-dot"></span>
+                <span>完播人数</span>
+              </div>
+              <div class="legend-item">
+                <span class="dot" style="background-color: #E6A23C"></span>
+                <span>答题人数</span>
+              </div>
+              <div class="legend-item">
+                <span class="dot" style="background-color: #F56C6C"></span>
+                <span>正确人数</span>
+              </div>
+            </div>
+            <!--            <el-button size="small" plain class="view-more">经销商统计 <i class="el-icon-arrow-right"></i></el-button>-->
+          </div>
+          <div ref="courseWatchChart" class="chart-container"></div>
+        </el-card>
+      </el-row>
+    </transition>
+
+    <transition name="fade">
+      <el-row :gutter="20" class="charts-section" v-show="selectedDiv===2">
+        <el-col :span="12">
+          <el-card shadow="never">
+            <div slot="header" class="chart-header">
+              <span>答题红包金额TOP10</span>
+              <div class="legend">
+                <el-radio-group v-model="dataType" size="small" @change="handleAnswerRedPackViewerChart">
+                  <el-radio-button label="0">按经销商排行</el-radio-button>
+                  <el-radio-button label="1">按课程排行</el-radio-button>
+                </el-radio-group>
+              </div>
+              <!--              <el-button size="small" plain class="view-more">红包记录 <i class="el-icon-arrow-right"></i></el-button>-->
+            </div>
+            <div ref="answerRedPackViewerChart" class="chart-container"></div>
+          </el-card>
+        </el-col>
+        <el-col :span="12">
+          <el-card shadow="never">
+            <div slot="header" class="chart-header">
+              <span>答题红包金额趋势图</span>
+              <div class="legend">
+                <div class="legend-item">
+                  <span class="dot viewer-dot"></span>
+                  <span>答题红包金额</span>
+                </div>
+              </div>
+              <!--              <el-button size="small" plain class="view-more">红包记录 <i class="el-icon-arrow-right"></i></el-button>-->
+            </div>
+            <div ref="answerRedPackMoneyViewerChart" class="chart-container"></div>
+          </el-card>
+        </el-col>
+      </el-row>
+    </transition>
+    <el-row :gutter="20" class="charts-section">
+      <el-col :span="12">
+        <el-card shadow="never">
+          <div slot="header" class="chart-header">
+            <span>本月订单数</span>
+            <div class="legend">
+              <div class="legend-item">
+                <span class="dot viewer-dot"></span>
+                <span>订单数</span>
+              </div>
+              <div class="legend-item">
+                <span class="dot complete-dot"></span>
+                <span>订单金额</span>
+              </div>
+            </div>
+          </div>
+          <div ref="viewerOrderChart" class="chart-container"></div>
+        </el-card>
+      </el-col>
+      <el-col :span="12">
+        <el-card shadow="never">
+          <div slot="header" class="chart-header">
+            <span>本月收款数</span>
+            <div class="legend">
+              <div class="legend-item">
+                <span class="dot viewer-dot"></span>
+                <span>收款数</span>
+              </div>
+              <div class="legend-item">
+                <span class="dot complete-dot"></span>
+                <span>收款金额</span>
+              </div>
+            </div>
+          </div>
+          <div ref="viewerReceiveChart" class="chart-container"></div>
+        </el-card>
+      </el-col>
+    </el-row>
+    <br/>
+  </div>
+</template>
+
+<script>
+import * as echarts from 'echarts'
+import CountTo from "vue-count-to";
+import {
+  analysisPreview,
+  authorizationInfo,
+  dealerAggregated, deaMemberTopTen, rechargeComsumption, rewardMoneyTopTen, rewardMoneyTrend,
+  smsBalance, thisMonthOrderCount, thisMonthRecvCount, trafficLog,
+  watchCourseTopTen, watchEndPlayTrend,getWatchCourseStatisticsData
+} from "@/api/statistics/statistics";
+import dayjs from 'dayjs';
+import { listDept } from '@/api/system/dept'
+import { listCompany } from '@/api/his/company'
+
+
+const viewCharOption = {
+  tooltip: {
+    trigger: 'axis',
+    axisPointer: {
+      type: 'shadow'
+    }
+  },
+  grid: {
+    left: '3%',
+    right: '4%',
+    bottom: '3%',
+    containLabel: true
+  },
+  xAxis: {
+    type: 'category',
+    data: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23']
+  },
+  yAxis: {
+    type: 'value'
+  },
+  series: [
+    {
+      name: '观看人数',
+      type: 'bar',
+      data: [],
+      itemStyle: {
+        color: '#409EFF'
+      }
+    },
+    {
+      name: '完播人数',
+      type: 'bar',
+      data: [],
+      itemStyle: {
+        color: '#67C23A'
+      }
+    }
+  ]
+}
+
+const dealerOptionNew = {
+  tooltip: {
+    trigger: 'axis',
+    axisPointer: {
+      type: 'shadow'
+    }
+  },
+  grid: {
+    left: '3%',
+    right: '4%',
+    bottom: '3%',
+    containLabel: true
+  },
+  xAxis: {
+    type: 'category',
+    axisLabel: {
+      rotate: 30, // 设置标签倾斜45度
+      // fontSize: 12, // 减小字体大小
+      interval: 0, // 显示所有标签
+      // 可选:限制标签宽度并截断
+      width: 80,
+      overflow: 'truncate',
+      // 可选:设置标签的对齐方式
+      margin: 20,
+      fontWeight: 'bold' // 设置字体加粗
+    }
+  },
+  yAxis: {
+    type: 'value'
+  },
+  series: [
+    {
+      name: '观看人数',
+      type: 'bar',
+      data: [],
+      itemStyle: {
+        color: '#409EFF'
+      }
+    },
+    {
+      name: '完播人数',
+      type: 'bar',
+      data: [],
+      itemStyle: {
+        color: '#67C23A'
+      }
+    }
+  ]
+}
+
+const thisMonthOrderCountOption = {
+  tooltip: {
+    trigger: 'axis',
+    axisPointer: {
+      type: 'shadow'
+    }
+  },
+  grid: {
+    left: '3%',
+    right: '4%',
+    bottom: '3%',
+    containLabel: true
+  },
+  xAxis: {
+    type: 'category',
+    data: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23']
+  },
+  yAxis: {
+    type: 'value'
+  },
+  series: [
+    {
+      name: '订单数',
+      type: 'line',
+      data: [],
+      itemStyle: {
+        color: '#409EFF'
+      }
+    },
+    {
+      name: '订单金额',
+      type: 'line',
+      data: [],
+      itemStyle: {
+        color: '#67C23A'
+      }
+    }
+  ]
+}
+
+const thisMonthRecvCountOption = {
+  tooltip: {
+    trigger: 'axis',
+    axisPointer: {
+      type: 'shadow'
+    }
+  },
+  grid: {
+    left: '3%',
+    right: '4%',
+    bottom: '3%',
+    containLabel: true
+  },
+  xAxis: {
+    type: 'category',
+    data: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23']
+  },
+  yAxis: {
+    type: 'value'
+  },
+  series: [
+    {
+      name: '收款数',
+      type: 'line',
+      data: [],
+      itemStyle: {
+        color: '#409EFF'
+      }
+    },
+    {
+      name: '收款金额',
+      type: 'line',
+      data: [],
+      itemStyle: {
+        color: '#67C23A'
+      }
+    }
+  ]
+}
+const dealerOption = {
+  tooltip: {
+    trigger: 'axis',
+    axisPointer: {
+      type: 'shadow'
+    }
+  },
+  grid: {
+    left: '3%',
+    right: '4%',
+    bottom: '3%',
+    containLabel: true
+  },
+  xAxis: {
+    type: 'value'
+  },
+  yAxis: {
+    type: 'category',
+    data: []
+  },
+  series: [
+    {
+      name: '观看人数',
+      type: 'bar',
+      data: [],
+      itemStyle: {
+        color: '#409EFF'
+      }
+    }
+  ]
+}
+
+const courseWatchOption = {
+  tooltip: {
+    trigger: 'axis',
+    axisPointer: {
+      type: 'shadow'
+    }
+  },
+  grid: {
+    left: '3%',
+    right: '4%',
+    bottom: '8%',
+    top: '3%',
+    containLabel: true
+  },
+  xAxis: {
+    type: 'category',
+    data: [],
+    axisLabel: {
+      interval: 0,
+      rotate: 30,
+      fontSize: 10,
+      width: 100,
+      overflow: 'truncate'
+    }
+  },
+  yAxis: {
+    type: 'value',
+    splitLine: {
+      lineStyle: {
+        type: 'dashed'
+      }
+    }
+  },
+  series: [
+    {
+      name: '观看人数',
+      type: 'bar',
+      data: [],
+      itemStyle: {
+        color: '#409EFF'
+      }
+    },
+    {
+      name: '完播人数',
+      type: 'bar',
+      data: [],
+      itemStyle: {
+        color: '#67C23A'
+      }
+    },
+    {
+      name: '答题人数',
+      type: 'bar',
+      data: [],
+      itemStyle: {
+        color: '#E6A23C'
+      }
+    },
+    {
+      name: '正确人数',
+      type: 'bar',
+      data: [],
+      itemStyle: {
+        color: '#F56C6C'
+      }
+    }
+  ]
+}
+
+const lineChartOption = {
+  tooltip: {
+    trigger: 'axis',
+    axisPointer: {
+      type: 'cross' // 改为 'cross' 更适合折线图
+    }
+  },
+  grid: {
+    left: '3%',
+    right: '4%',
+    bottom: '8%', // 如果x轴标签旋转,可能需要更大的 bottom
+    top: '5%',    // 增加一点顶部空间给可能的 Y 轴名称
+    containLabel: true
+  },
+  xAxis: {
+    type: 'time', // X轴类型改为 'time'
+    // data: [], // 时间轴不需要单独设置 data,数据在 series 中提供
+    axisLabel: {
+      // interval: 0, // 时间轴通常自动处理间隔,可以先移除或注释掉
+      rotate: 30,   // 保留旋转,如果标签可能重叠
+      fontSize: 10,
+      // width: 100, // width 和 overflow 对于时间轴可能行为不同,按需调整
+      // overflow: 'truncate',
+      formatter: null // ECharts 会自动格式化时间,如需特定格式可用 function 或字符串模板
+    }
+  },
+  yAxis: {
+    type: 'value',
+    name: '金额 (元)', // 添加 Y 轴名称
+    nameLocation: 'end', // 名称位置
+    nameTextStyle: {
+      align: 'right',
+      padding: [0, 10, 0, 0] // 调整名称与轴线的距离
+    },
+    splitLine: {
+      lineStyle: {
+        type: 'dashed'
+      }
+    },
+    axisLabel: {
+      formatter: '{value} 元' // 可选:给 Y 轴刻度添加单位
+    }
+  },
+  series: [
+    {
+      name: '答题红包金额',
+      type: 'line', // 系列类型改为 'line'
+      data: [
+      ],
+      itemStyle: { // 控制数据点(标记)的样式
+        color: '#409EFF'
+      },
+      lineStyle: { // 控制线的样式
+        color: '#409EFF'
+      },
+      smooth: false, // 是否平滑曲线,可设为 true
+      symbol: 'circle', // 数据点标记形状,'emptyCircle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none'
+      symbolSize: 4   // 数据点标记大小
+    }
+  ]
+};
+
+
+const redPackageOption = {
+  tooltip: {
+    trigger: 'axis',
+    axisPointer: {
+      type: 'shadow'
+    }
+  },
+  grid: {
+    left: '3%',
+    right: '4%',
+    bottom: '8%',
+    top: '3%',
+    containLabel: true
+  },
+  xAxis: {
+    type: 'category',
+    data: [],
+    axisLabel: {
+      interval: 0,
+      rotate: 30,
+      fontSize: 10,
+      width: 100,
+      overflow: 'truncate'
+    }
+  },
+  yAxis: {
+    type: 'value',
+    splitLine: {
+      lineStyle: {
+        type: 'dashed'
+      }
+    }
+  },
+  series: [
+    {
+      name: '答题红包金额',
+      type: 'bar',
+      data: [],
+      itemStyle: {
+        color: '#409EFF'
+      }
+    }
+  ]
+}
+export default {
+  name: 'StatisticsDashboard',
+  components: {CountTo},
+  data() {
+    return {
+      deptInitOptions:[],
+      deptOptions:[],
+      intiDeptId:this.$store.state.user.user.deptId,
+      deptId:this.$store.state.user.user.deptId,
+      staticParam : {companyId:null,deptId:this.$store.state.user.user.deptId},
+      companyIntiOptions:[],
+      companyOptions:[],
+      companyId:null,
+      percentage: 0,
+      // 预测message
+      remainMessage: '',
+      // 当天使用流量
+      todayTraffic: 0,
+      trafficCount: 0,
+      // 当月使用流量
+      thisMonthTraffic: 0,
+      dataType: '0',
+      delerSort: 'DESC',
+      smsRemainCount: 0,
+      viewerType: '0',
+      viewerChart: null,
+      dealerChartNew: null,
+      userTypeText: process.env.VUE_APP_COURSE_DEFAULT==1?"会员":"企微",
+      userType: process.env.VUE_APP_COURSE_DEFAULT,
+      dealerChart: null,
+      // 分公司数量
+      dealderCount: 0,
+      // 销售数量
+      groupMgrCount: 0,
+      // 会员总数量
+      memberCount: 0,
+      // 企微数量
+      qwMemberNum: 0,
+      // pad使用情况
+      padTotalNum: 0,
+      // pad使用情况
+      padUsedNum: 0,
+      // 正常会员数量
+      normalNum: 0,
+      // 黑名单会员数量
+      blackNum: 0,
+      // 观看人数
+      watchUserCount: 0,
+      // 完播人数
+      completedUserCount: 0,
+      // 完播率
+      completedRate: 0,
+      // 观看次数
+      watchCount:0,
+      // 完播次数
+      completedCount: 0,
+      // 视频完播率
+      watchRate: 0,
+      // 答题人数
+      answerMemberCount: 0,
+      // 正确人数
+      correctUserCount: 0,
+      correctRate: 0.0,
+      // 答题红包个数
+      rewardCount: 0,
+      // 答题红包金额
+      rewardMoney: 0.0,
+      queryTime: '今日',
+      todayWatchUserCount: 0,
+      versionLimit: 0,
+      versionLimitPercent : 0.0,
+      /// 选中的分析概览
+      selectedDiv: 0,
+      filterType: 0,
+      answerRedPackViewerChart: null,
+      answerRedPackMoneyViewerChart: null,
+      todayComsumption: 0,
+      yesterdayComsumption: 0,
+      balance: 0,
+      runTianBalance: 0,
+      autoRefreshInterval: null,
+      // 今日新增用户数
+      todayIncreaseUserNum: 0,
+      // 订单总数
+      orderTotalNum: 0,
+      // 今日新增订单数
+      todayOrderNum: 0,
+      // 收款总数
+      recvTotalNum: 0,
+      // 今日收款总数
+      recvTodayNum: 0,
+      // 商品总数
+      goodsTotalNum: 0,
+      // 今日商品总数
+      todayGoodsNum: 0
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.initViewerChart();
+      this.initDealerChartNew();
+      this.initDealerChart();
+      this.initCourseWatchChart();
+      this.initAnswerRedPackViewerChart();
+      this.initAnswerRedPackMoneyViewerChart();
+      this.initThisMonthOrderChart();
+      this.initThisMonthRecvChart();
+
+
+      // 监听窗口大小变化,重新渲染图表
+      window.addEventListener('resize', () => {
+        this.viewerChart && this.viewerChart.resize()
+        this.dealerChart && this.dealerChart.resize()
+        this.dealerChartNew && this.dealerChartNew.resize()
+      })
+    })
+  },
+  created() {
+    this.refresh();
+    listDept().then(res => {
+      this.deptInitOptions = res.data;
+      listCompany().then(res => {
+        this.companyIntiOptions = res.rows;
+        this.getDeptOptions(this.intiDeptId);
+        this.getCompanyOptions(this.intiDeptId);
+      });
+    });
+  },
+  methods: {
+    getDeptOptions(deptId) {
+      const deptInitOptions = this.deptInitOptions;
+      // 部门本身节点
+      let deptNode = deptInitOptions.filter(item => item.deptId === deptId);
+
+      // 递归查找所有子节点
+      function findChildren(parentId) {
+        //部门的子部门
+        let deptChildren = deptInitOptions.filter(item => item.parentId === parentId);
+        //添加子部门
+        deptChildren.forEach(child => {
+          deptNode.push(child);
+          findChildren(child.deptId); // 递归查找子节点的子节点
+        });
+      }
+
+      // 从目标节点开始查找子节点
+      findChildren(deptId);
+      this.deptOptions = deptNode;
+    },
+    getCompanyOptions(deptId) {
+      this.companyId = null;
+      //修改选择后清空查询参数
+      this.staticParam.companyId = null;
+      this.staticParam.deptId = deptId;
+      const deptInitOptions = this.deptInitOptions;
+      const companyInitOptions = this.companyIntiOptions;
+      // 部门下的公司
+      let companyNode = companyInitOptions.filter(item => item.deptId === deptId);
+
+      // 递归查找所有子节点
+      function findChildren(parentId) {
+        //部门的子部门
+        let deptChildren = deptInitOptions.filter(item => item.parentId === parentId);
+        //添加子部门
+        deptChildren.forEach(child => {
+          //子部门下的销售公司
+          let companyChildren = companyInitOptions.filter(item => item.deptId === child.deptId);
+          companyChildren.forEach(companyChild => {
+            companyNode.push(companyChild);
+          })
+          findChildren(child.deptId); // 递归查找子节点的子节点
+        });
+      }
+
+      // 从目标节点开始查找子节点
+      findChildren(deptId);
+      this.companyOptions = companyNode;
+    },
+    //首页统计选择部门、销售公司
+    handleDeptChange() {
+      this.getCompanyOptions(this.deptId);
+      this.refresh();
+    },
+    handleCompanyChange() {
+      this.staticParam.companyId = this.companyId;
+      this.refresh();
+    },
+    handleUserType() {
+      if (this.userTypeText === '会员') {
+        this.userType = 1
+      } else {
+        this.userType = 2
+      }
+
+      this.refresh()
+    },
+    /**
+     * 计算余额预计可持续的天数
+     * @param {number} balance - 当前账户余额
+     * @param {number} runTianBalance - 润天账户余额
+     * @param {number} todayConsumption - 今日消耗金额
+     * @param {number} yesterdayConsumption - 昨日消耗金额
+     * @return {Object} 包含天数和进度百分比的对象
+     */
+    calculateRemainingDays(balance, todayConsumption, yesterdayConsumption) {
+      // 如果今日和昨日消耗都为0,则无法预测(避免除以0)
+      if (todayConsumption === 0 && yesterdayConsumption === 0) {
+        return {
+          days: Infinity,
+          percentage: 0,
+          message: '暂无消耗数据'
+        };
+      }
+
+      // 计算每日平均消耗量
+      const avgDailyConsumption = (todayConsumption + yesterdayConsumption) / 2;
+
+      // 如果平均消耗为0,则无法预测
+      if (avgDailyConsumption === 0) {
+        return {
+          days: Infinity,
+          percentage: 0,
+          message: '暂无消耗数据'
+        };
+      }
+
+      // 计算剩余天数(向下取整)
+      const remainingDays = Math.floor(balance / avgDailyConsumption);
+
+      // 计算进度条百分比,最大为100
+      // 这里假设100天是满值,可以根据需要调整
+      const maxDays = 100;
+      const percentage = Math.min(100, Math.max(0, Math.round((remainingDays / maxDays) * 100)));
+
+      let message = '';
+      if (remainingDays > 365) {
+        message = '预测余额充足';
+      } else {
+        message = `预测不足${remainingDays}天`;
+      }
+
+      return {
+        days: remainingDays,
+        percentage: 100 - percentage,
+        message: message
+      };
+    },
+    /**
+     * 将字节数转换为合适的单位表示(Byte、KB、MB、GB、TB)
+     * @param {number} bytes - 字节数
+     * @param {number} [decimals=2] - 小数点后保留的位数
+     * @returns {string} 格式化后的字符串,包含数值和单位
+     */
+    formatBytes(bytes, decimals = 2) {
+      const isNegative = bytes < 0;  // 判断是否为负数
+      bytes = Math.abs(bytes);  // 获取绝对值
+
+      if (bytes === 0) return '0 Byte';
+
+      const k = 1024;
+      const sizes = ['Byte', 'KB', 'MB', 'GB', 'TB'];
+
+      // 计算合适的单位级别
+      let i = Math.floor(Math.log(bytes) / Math.log(k));
+
+      // 转换为对应单位的值
+      const value = bytes / Math.pow(k, i);
+
+
+      if(this.deptId !== 1 ||  this.companyId !== null){
+        i += 1;
+      }
+      // 格式化为指定小数位的字符串
+      const result = parseFloat(value.toFixed(decimals)) + ' ' + sizes[Math.min(i, sizes.length - 1)];
+
+      // 如果是负数,返回带负号的值
+      return isNegative ? `-${result}` : result;
+    },
+    // 手动刷新
+    manualRefresh() {
+      this.refresh();
+    },
+    // 处理自动刷新选项
+    handleAutoRefresh(command) {
+      // 清除之前的定时器
+      if (this.timer) {
+        clearInterval(this.timer);
+        this.timer = null;
+      }
+
+      // 设置新的刷新间隔
+      this.autoRefreshInterval = parseInt(command);
+
+      // 如果间隔大于0,设置新的定时器
+      if (this.autoRefreshInterval > 0) {
+        this.timer = setInterval(() => {
+          this.refresh();
+        }, this.autoRefreshInterval * 60 * 1000); // 转换为毫秒
+
+        this.$message.success(`已设置${this.autoRefreshInterval}分钟自动刷新`);
+      } else {
+        this.$message.info('已关闭自动刷新');
+      }
+    },
+    refresh() {
+      rechargeComsumption(this.staticParam).then(res => {
+        console.log(res);
+        if (res.code === 200) {
+          this.balance = res.data.balance;
+          this.runTianBalance = res.data.runTianBalance;
+          this.todayComsumption = res.data.todayComsumption;
+          this.yesterdayComsumption = res.data.yesterdayComsumption;
+          let calculateRemainingDays1 = this.calculateRemainingDays(this.balance, this.todayComsumption, this.yesterdayComsumption);
+          this.percentage = calculateRemainingDays1.percentage;
+          this.remainMessage = calculateRemainingDays1.message;
+        }
+      });
+
+      trafficLog(this.staticParam).then(res => {
+        if (res.code === 200) {
+          this.todayTraffic = res.data.today;
+          this.thisMonthTraffic = res.data.thisMonth;
+          this.trafficCount = res.data.traffic;
+        }
+      })
+
+      dealerAggregated(this.staticParam).then(res => {
+        if (res.code === 200) {
+          this.dealderCount = res.data.dealderCount ?? 0;
+          this.groupMgrCount = res.data.groupMgrCount ?? 0;
+          this.memberCount = res.data.memberCount ?? 0;
+          this.qwMemberNum = res.data.qwMemberNum ?? 0;
+          const totalNum = res.data.padTotalNum;
+          //-1 不限 null 未设置
+          if(totalNum != null && totalNum !== -1 && totalNum > 0){
+            this.padTotalNum = totalNum;
+          }else{
+            this.padTotalNum = '不限';
+          }
+          this.padUsedNum = res.data.padUsedNum ?? 0;
+          this.padInfo = res.data.padInfo;
+          this.normalNum = res.data.normalNum ?? 0;
+          this.blackNum = res.data.blackNum ?? 0;
+          this.todayIncreaseUserNum = res.data.todayIncreaseUserNum ?? 0;
+          this.orderTotalNum = res.data.orderTotalNum ?? 0;
+          this.todayOrderNum = res.data.todayOrderNum ?? 0;
+          this.recvTotalNum = res.data.recvTotalNum ?? 0;
+          this.recvTodayNum = res.data.recvTodayNum ?? 0;
+          this.goodsTotalNum = res.data.goodsTotalNum ?? 0;
+          this.todayGoodsNum = res.data.todayGoodsNum ?? 0;
+        }
+      })
+      let param = this.getParam();
+
+      // 获取当前日期时间
+      const today = dayjs();
+      param.startTime = this.formatDate(today);
+      param.endTime = this.formatDate(today);
+      analysisPreview(param).then(res => {
+        if (res.code === 200) {
+          this.watchUserCount = res.data.watchUserCount;
+          this.completedUserCount = res.data.completedUserCount;
+          this.completedRate = res.data.completedRate;
+          this.watchCount = res.data.watchCount;
+          this.completedCount = res.data.completedCount;
+          this.answerMemberCount = res.data.answerMemberCount;
+          this.correctUserCount = res.data.correctUserCount;
+          this.correctRate = res.data.correctRate;
+          this.rewardCount = res.data.rewardCount;
+          this.rewardMoney = res.data.rewardMoney;
+          this.watchRate = res.data.watchRate;
+        }
+      })
+      smsBalance(this.staticParam).then(res => {
+        if (res.code === 200) {
+          if (res.data == null) {
+            this.smsRemainCount = 0;
+          } else {
+            this.smsRemainCount = res.data;
+          }
+        }
+      })
+      authorizationInfo(this.staticParam).then(res => {
+        if (res.code === 200 && res.data != null) {
+          this.todayWatchUserCount = res.data.todayWatchUserCount;
+          this.versionLimit = res.data.versionLimit;
+          if(this.versionLimit){
+            this.versionLimitPercent = this.todayWatchUserCount/this.versionLimit;
+          }
+        }
+      })
+
+      this.handleCourseWatchChart()
+      this.handleViewChartData()
+      this.handleDealerChartDataNew()
+
+      // 经销商会员观看TOP10
+      this.handleDealerChartData()
+
+      this.handleAnswerRedPackViewerChart()
+
+      this.handleAnswerRedPackMoneyViewerChart()
+
+      this.handleThisMonthRecvCount();
+      this.handleThisMonthOrderCount();
+
+    },
+    /**
+     * 将数字添加千位分隔符
+     * @param {number|string} num - 需要格式化的数字
+     * @return {string} 添加千位分隔符后的字符串
+     */
+    formatNumberWithCommas(num) {
+      if (num === null || num === undefined || isNaN(Number(num))) {
+        return '0';
+      }
+
+      const numStr = String(num);
+
+      // 处理负数
+      const isNegative = numStr.startsWith('-');
+      const absNumStr = isNegative ? numStr.slice(1) : numStr;
+
+      // 分离整数部分和小数部分
+      const parts = absNumStr.split('.');
+      const integerPart = parts[0];
+      const decimalPart = parts.length > 1 ? '.' + parts[1] : '';
+
+      const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
+
+      return (isNegative ? '-' : '') + formattedInteger + decimalPart;
+    },
+    handleToggleDiv(selected) {
+      this.selectedDiv = selected;
+
+      if (selected === 1) {
+        this.$nextTick(() => {
+          if (this.courseWatchChart) {
+            this.courseWatchChart.resize();
+          } else {
+          }
+        });
+      } else if (selected === 0) {
+        this.$nextTick(() => {
+          if (this.viewerChart) this.viewerChart.resize();
+          if (this.dealerChart) this.dealerChart.resize();
+        });
+      } else if (selected === 2) {
+        this.$nextTick(() => {
+          if (this.answerRedPackViewerChart) this.answerRedPackViewerChart.resize();
+          if (this.answerRedPackMoneyViewerChart) this.answerRedPackMoneyViewerChart.resize();
+        });
+      }
+      if (this.selectedDiv === 0) {
+        this.handleViewChartData()
+        this.handleDealerChartData()
+        this.handleDealerChartDataNew()
+      } else if (this.selectedDiv === 1) {
+        this.handleCourseWatchChart()
+      } else if (this.selectedDiv === 2) {
+        this.handleAnswerRedPackViewerChart()
+        this.handleAnswerRedPackMoneyViewerChart()
+      }
+    },
+    formatDate(date) {
+      return dayjs(date).format('YYYY-MM-DD');
+    },
+
+    getParam() {
+      let param = {
+        startTime: '',
+        endTime: '',
+        userType: this.userType,
+        companyId: this.companyId,
+        deptId: this.deptId
+      };
+      // 获取当前日期时间
+      const today = dayjs();
+
+      let type = 0;
+      if (this.queryTime === '今日') {
+        param.startTime = this.formatDate(today);
+        param.endTime = this.formatDate(today);
+        type = 0;
+      } else if (this.queryTime === '昨日') {
+        const yesterday = today.subtract(1, 'day');
+        param.startTime = this.formatDate(yesterday);
+        param.endTime = this.formatDate(yesterday);
+        type = 1;
+      } else if (this.queryTime === '本周') {
+        param.startTime = this.formatDate(today.startOf('week'));
+        param.endTime = this.formatDate(today.endOf('week'));
+        type = 2;
+      } else if (this.queryTime === '本月') {
+        param.startTime = this.formatDate(today.startOf('month'));
+        param.endTime = this.formatDate(today.endOf('month'));
+        type = 3;
+      } else if (this.queryTime === '上月') {
+        const lastMonth = today.subtract(1, 'month');
+        param.startTime = this.formatDate(lastMonth.startOf('month'));
+        param.endTime = this.formatDate(lastMonth.endOf('month'));
+        type = 4;
+      } else {
+        console.warn(`未知的 queryTime: ${this.queryTime}, 默认使用今日`);
+        param.startTime = this.formatDate(today);
+        param.endTime = this.formatDate(today);
+      }
+      param.type = type;
+      param.sort = this.delerSort;
+      return param;
+    },
+    // 分析概览
+    handleAnalysis(e) {
+
+      let param = this.getParam();
+      analysisPreview(param).then(res => {
+        if (res.code === 200) {
+          this.watchUserCount = res.data.watchUserCount;
+          this.completedUserCount = res.data.completedUserCount;
+          this.completedRate = res.data.completedRate;
+          this.watchCount = res.data.watchCount;
+          this.completedCount = res.data.completedCount;
+          this.answerMemberCount = res.data.answerMemberCount;
+          this.correctUserCount = res.data.correctUserCount;
+          this.correctRate = res.data.correctRate;
+          this.rewardCount = res.data.rewardCount;
+          this.rewardMoney = res.data.rewardMoney;
+          this.watchRate = res.data.watchRate;
+        }
+      })
+
+      if (this.selectedDiv === 0) {
+        this.handleViewChartData()
+        this.handleDealerChartData()
+        this.handleDealerChartDataNew()
+      } else if (this.selectedDiv === 1) {
+        this.handleCourseWatchChart()
+      } else if (this.selectedDiv === 2) {
+        this.handleAnswerRedPackViewerChart()
+        this.handleAnswerRedPackMoneyViewerChart()
+      }
+    },
+    handleAnswerRedPackViewerChart() {
+      let param = this.getParam();
+      param = { ...param, statisticalType: this.viewerType, dataType: this.dataType };
+      rewardMoneyTopTen(param).then(res => {
+        if (res.code === 200) {
+          let data = res.data;
+          let companyNameList = data.map(e => e.companyName)
+          let courseNameList = data.map(e => e.courseName)
+          let rewardMoneyList = data.map(e => e.rewardMoney)
+          if (this.dataType === '0') {
+            redPackageOption.xAxis.data = companyNameList;
+          } else {
+            redPackageOption.xAxis.data = courseNameList;
+          }
+          redPackageOption.series[0].data = rewardMoneyList;
+
+          this.answerRedPackViewerChart.setOption(redPackageOption)
+        }
+      })
+    },
+    handleAnswerRedPackMoneyViewerChart() {
+      let param = this.getParam();
+      param = { ...param, statisticalType: this.viewerType, dataType: this.dataType };
+      rewardMoneyTrend(param).then(res => {
+        if (res.code === 200) {
+          let data = res.data;
+          let option = data.map(e => [e.x, e.rewardMoney])
+          lineChartOption.series[0].data = option;
+
+          this.answerRedPackMoneyViewerChart.setOption(lineChartOption)
+        }
+      })
+    },
+    handleCourseWatchChart() {
+      let param = this.getParam();
+      param = { ...param, statisticalType: this.viewerType };
+      watchCourseTopTen(param).then(res => {
+        if (res.code === 200) {
+          let data = res.data;
+          let watchUserCountList = data.map(e => e.watchUserCount);
+          let completedUserCountList = data.map(e => e.completedUserCount);
+          let answerUserCountList = data.map(e => e.answerUserCount);
+          let correctUserCountList = data.map(e => e.correctUserCount);
+          let courseNameList = data.map(e => e.courseName);
+          courseWatchOption.xAxis.data = courseNameList;
+          courseWatchOption.series[0].data = watchUserCountList;
+          courseWatchOption.series[1].data = completedUserCountList;
+          courseWatchOption.series[2].data = answerUserCountList;
+          courseWatchOption.series[3].data = correctUserCountList;
+          this.courseWatchChart.setOption(courseWatchOption)
+        }
+      })
+    },
+    handleDealerChartData() {
+      let param = this.getParam();
+
+      // 经销商会员观看TOP10
+      deaMemberTopTen({ ...param, statisticalType: this.viewerType }).then(res => {
+        if (res.code === 200) {
+          let data = res.data;
+          let companyNameList = data.map(e => e.companyName);
+          let watchUserList = data.map(e => e.watchUserCount);
+          dealerOption.yAxis.data = companyNameList;
+          dealerOption.series[0].data = watchUserList;
+
+          this.dealerChart.setOption(dealerOption)
+        }
+      })
+
+    },
+    handleThisMonthOrderCount() {
+      thisMonthOrderCount(this.staticParam).then(res => {
+        if (res.code === 200) {
+          let dates = res.dates;
+          let orderCount = res.orderCount;
+          let payPrice = res.payPrice;
+
+          thisMonthOrderCountOption.series[0].data = orderCount;
+          thisMonthOrderCountOption.series[1].data = payPrice;
+          thisMonthOrderCountOption.xAxis.data = dates;
+
+          this.thisMonthOrderChart.setOption(thisMonthOrderCountOption)
+        }
+      })
+    },
+    handleThisMonthRecvCount() {
+      thisMonthRecvCount(this.staticParam).then(res => {
+        if (res.code === 200) {
+          let dates = res.dates;
+          let orderCount = res.orderCount;
+          let payMoney = res.payMoney;
+
+          thisMonthRecvCountOption.series[0].data = orderCount;
+          thisMonthRecvCountOption.series[1].data = payMoney;
+          thisMonthRecvCountOption.xAxis.data = dates;
+          this.thisMonthRecvChart.setOption(thisMonthRecvCountOption)
+        }
+      })
+    },
+    handleViewChartData() {
+      let param = this.getParam();
+
+      watchEndPlayTrend({ ...param }).then(res => {
+        if (res.code === 200) {
+          let data = res.data;
+          let watchUserCountList = data.map(e => e.watchUserCount);
+          let completedUserCountList = data.map(e => e.completedUserCount);
+          let xAxis = data.map(e => e.x);
+          viewCharOption.series[0].data = watchUserCountList;
+          viewCharOption.series[1].data = completedUserCountList;
+          viewCharOption.xAxis.data = xAxis;
+
+          this.viewerChart.setOption(viewCharOption);
+        }
+      })
+
+    },
+    handleDealerChartDataNew() {
+      let param = this.getParam();
+
+      getWatchCourseStatisticsData({ ...param }).then(res => {
+        if (res.code === 200) {
+          console.log(res.data);
+          // 根据实际数据结构调整
+          let data = res.data;
+          let watchUserCountList = data.map(e => e.watchCount);     // 观看次数
+          let completedUserCountList = data.map(e => e.finishCount); // 完播次数
+          let xAxis = data.map(e => e.companyName);                 // X轴使用公司名称
+
+          // 更新图表配置
+          dealerOptionNew.series[0].data = watchUserCountList;
+          dealerOptionNew.series[1].data = completedUserCountList;
+          dealerOptionNew.xAxis.data = xAxis;
+
+          this.dealerChartNew.setOption(dealerOptionNew);
+
+        }
+      })
+
+    },
+    initThisMonthOrderChart() {
+      this.thisMonthOrderChart = echarts.init(this.$refs.viewerOrderChart)
+      this.thisMonthOrderChart.setOption(thisMonthOrderCountOption)
+    },
+    initThisMonthRecvChart() {
+
+      this.thisMonthRecvChart = echarts.init(this.$refs.viewerReceiveChart)
+      this.thisMonthRecvChart.setOption(thisMonthOrderCountOption)
+    },
+    initViewerChart() {
+      this.viewerChart = echarts.init(this.$refs.viewerChart)
+      this.viewerChart.setOption(viewCharOption)
+    },
+    initDealerChartNew() {
+      this.dealerChartNew = echarts.init(this.$refs.dealerChartNew)
+      this.dealerChartNew.setOption(dealerOptionNew)
+    },
+    initDealerChart() {
+      this.dealerChart = echarts.init(this.$refs.dealerChart)
+
+      this.dealerChart.setOption(dealerOption)
+    },
+    initCourseWatchChart() {
+      this.courseWatchChart = echarts.init(this.$refs.courseWatchChart)
+
+      this.courseWatchChart.setOption(courseWatchOption)
+    },
+    initAnswerRedPackViewerChart() {
+      this.answerRedPackViewerChart = echarts.init(this.$refs.answerRedPackViewerChart)
+
+      this.answerRedPackViewerChart.setOption(redPackageOption)
+    },
+    initAnswerRedPackMoneyViewerChart() {
+      this.answerRedPackMoneyViewerChart = echarts.init(this.$refs.answerRedPackMoneyViewerChart)
+
+      this.answerRedPackMoneyViewerChart.setOption(lineChartOption)
+    }
+  },
+
+  beforeDestroy() {
+    // 组件销毁时清除定时器
+    if (this.timer) {
+      clearInterval(this.timer);
+      this.timer = null;
+    }
+    // window.removeEventListener('resize', this.resizeHandler)
+    this.viewerChart && this.viewerChart.dispose()
+    this.dealerChart && this.dealerChart.dispose()
+    this.dealerChartNew && this.dealerChartNew.dispose()
+  }
+}
+</script>
+
+<style scoped>
+.highlight-today-add {
+  color: green;
+  font-size: 17px;
+  font-weight: normal;
+}
+
+.highlight-today-add2 {
+  color: rgba(49, 185, 154, 1);
+  font-size: 14px;
+  font-weight: normal;
+  transform: scale(.9);
+}
+
+.action-group .el-button + .el-button,
+.action-group .el-dropdown {
+  margin-left: 10px;
+}
+
+.is-active {
+  color: #409EFF;
+  font-weight: bold;
+}
+
+::v-deep .el-radio-button__inner:hover {
+  color: #409EFF;
+  /* 鼠标悬浮时的文字颜色,可以根据需要调整 */
+}
+
+::v-deep .el-radio-button.is-active .el-radio-button__inner {
+  background-color: #409EFF;
+  /* 选中时的背景色 */
+  border-color: #409EFF;
+  /* 选中时的边框色 */
+  color: #FFFFFF;
+  /* 选中时的文字颜色 (通常是白色) */
+  box-shadow: -1px 0 0 0 #409EFF;
+  /* 处理按钮间的连接缝隙 */
+}
+
+/* 如果需要,也可以修改非选中状态下的聚焦(focus)或悬浮(hover)样式 */
+/* 例如,让非选中按钮悬浮时边框和文字也变蓝 */
+::v-deep .el-radio-button:not(.is-active) .el-radio-button__inner:hover {
+  color: #409EFF;
+  /* border-color: #b3d8ff;  Element UI 默认悬浮边框色,可以按需修改 */
+}
+
+/* 聚焦时的外框,如果需要的话 */
+::v-deep .el-radio-button:focus:not(.is-checked) .el-radio-button__inner {
+  /* border-color: #409EFF; */
+  /* Element UI 默认的 focus 颜色通常关联主题色 */
+  /* box-shadow: 0 0 2px 2px rgba(64, 158, 255, 0.2); */
+  /* 示例 focus 光晕 */
+}
+
+.statistics-dashboard {
+  padding: 20px;
+  background-color: #f5f7fa;
+}
+
+.overview-section,
+.analysis-section {
+  margin-bottom: 20px;
+  border-radius: 4px;
+}
+
+.header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  font-size: 16px;
+  font-weight: 500;
+}
+
+.data-card {
+  background-color: #fff;
+  border-radius: 4px;
+  padding: 15px;
+  height: 120px;
+  display: flex;
+  flex-direction: column;
+  position: relative;
+  transition: background-color 0.3s ease-in-out;
+}
+
+.data-card:hover {
+  border: 1px solid #4592ff;
+  background-color: #e7f1ff;
+}
+
+.card-title {
+  color: #606266;
+  font-size: 14px;
+  margin-bottom: 10px;
+}
+
+.card-title1 {
+  color: white;
+  font-size: 14px;
+  margin-bottom: 10px;
+}
+
+.card-value {
+  font-size: 24px;
+  font-weight: bold;
+  margin-top: 20px;
+}
+
+.highlight {
+  color: #409EFF;
+}
+
+.card-sub {
+  display: flex;
+  justify-content: space-between;
+  font-size: 12px;
+  color: #909399;
+  margin-top: 5px;
+}
+
+.card-desc {
+  font-size: 12px;
+  color: #909399;
+  margin-top: 5px;
+}
+
+.card-badge {
+  position: absolute;
+  top: 15px;
+  right: 15px;
+  background: #f0f9eb;
+  color: #67c23a;
+  padding: 2px 5px;
+  border-radius: 4px;
+}
+
+.cdn-label {
+  background-color: #409EFF;
+  color: white;
+  padding: 2px 5px;
+  border-radius: 4px;
+  margin-right: 5px;
+  font-size: 12px;
+}
+
+.tab-group {
+  display: flex;
+  gap: 10px;
+}
+
+.action-group {
+  display: flex;
+  gap: 10px;
+}
+
+.analysis-card {
+  border-radius: 4px;
+  padding: 20px;
+  display: flex;
+  align-items: center;
+}
+
+.card-icon {
+  width: 50px;
+  height: 50px;
+  background-color: rgba(64, 158, 255, 0.1);
+  border-radius: 8px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 24px;
+  color: #409EFF;
+  margin-right: 20px;
+}
+
+.card-content {
+  display: flex;
+}
+
+.card-row {
+  display: flex;
+  justify-content: center;
+  justify-items: center;
+  flex-direction: column;
+  padding: 10px;
+
+  .highlight {
+    text-align: center;
+    margin-top: 1em;
+
+    font-family: BebasNeue;
+    color: #1677ff;
+    font-size: 21px;
+    line-height: 42px;
+    font-weight: 600;
+    margin-top: 8px;
+  }
+
+  font-size: 15px;
+  color: #000;
+
+}
+
+.charts-section {
+  margin-top: 20px;
+}
+
+.chart-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.view-more {
+  font-size: 12px;
+}
+
+.legend {
+  display: flex;
+  gap: 15px;
+}
+
+.legend-item {
+  display: flex;
+  align-items: center;
+  font-size: 12px;
+}
+
+.dot {
+  width: 10px;
+  height: 10px;
+  border-radius: 50%;
+  margin-right: 5px;
+}
+
+.viewer-dot {
+  background-color: #409EFF;
+}
+
+.complete-dot {
+  background-color: #67C23A;
+}
+
+.chart-container {
+  height: 350px;
+  width: 100%;
+}
+
+.analysis-card-check {
+  display: flex;
+  flex-direction: row;
+  border: 1px solid transparent;
+  background-color: #fff;
+  border-radius: 4px;
+}
+
+.analysis-card-check:hover {
+  cursor: pointer;
+}
+
+.analysis-card-check-selected:after {
+  content: "";
+  display: block;
+  border-width: 15px;
+  position: absolute;
+  bottom: -30px;
+  left: 50%;
+  margin-left: -32px;
+  border-style: solid dashed dashed solid;
+  border-color: #4592FF transparent transparent transparent;
+  font-size: 0;
+  line-height: 0;
+  z-index: 1;
+}
+
+.analysis-card-check-selected:before {
+  content: "";
+  display: block;
+  border-width: 15px;
+  position: absolute;
+  bottom: -30px;
+  left: 50%;
+  margin-left: -32px;
+  border-style: solid dashed dashed solid;
+  border-color: #4592FF transparent transparent transparent;
+  font-size: 0;
+  line-height: 0;
+  z-index: 1;
+}
+
+.analysis-card-check-selected {
+  border: 1px solid #4592FF;
+  background-color: #e7f1ff;
+}
+
+.color {
+  position: relative;
+  border: 1px solid #4592FF;
+  background-color: #e7f1ff;
+}
+
+.color:after {
+  bottom: -27px;
+  border-color: #E7F1FF transparent transparent transparent;
+}
+
+.companybox {
+  color: white;
+  background-color: #006CFF;
+  padding: 10px 10px 40px 10px;
+  box-sizing: border-box;
+  position: relative;
+  border-radius: 6px;
+
+  .topimg {
+    width: 100px;
+    height: 80px;
+    position: absolute;
+    top: 0px;
+    left: 0;
+  }
+
+  .bottomimg {
+    width: 100px;
+    height: 80px;
+    position: absolute;
+    bottom: -10px;
+    right: 0;
+    transform: rotate(180deg);
+  }
+
+  .companyboxtitle {
+    height: 30px;
+    margin-bottom: 20px;
+    font-weight: 600;
+  }
+
+  .companyflex {
+    display: flex;
+    justify-content: space-around;
+  }
+}
+
+
+.companynumber {
+  color: white;
+}
+
+.companycard {
+
+  width: 25%;
+}
+
+.companyadd {
+  color: white;
+}
+
+.cardafter {
+  position: relative;
+
+}
+
+.cardafter::after {
+  content: "";
+  height: 60px;
+  border-right: 1px solid rgba(255, 255, 255, 0.20);
+  position: absolute;
+  right: 30px;
+  top: 0px;
+}
+
+.highlight1 {
+  margin-top: 10px;
+  margin-left: 20px;
+}
+
+
+.propertyboxtitle {
+  background-image: url(~@/assets/images/zcgl_bg.png);
+  height: 100px;
+}
+
+.propertyboxflex {
+  display: flex;
+  background-color: white;
+  justify-content: space-between;
+}
+
+.property-card {
+  width: 48%;
+  border-radius: 4px;
+  padding: 15px;
+  height: 100px;
+  display: flex;
+  flex-direction: column;
+  position: relative;
+  transition: background-color 0.3s ease-in-out;
+
+}
+
+.property_title {
+  height: 40px;
+  line-height: 40px;
+  color: rgba(32, 33, 36, 1);
+  box-sizing: border-box;
+  padding-left: 10px;
+  font-weight: 600;
+}
+
+.card-compare {
+  margin-top: 5px;
+  font-size: 14px;
+  color: rgba(92, 95, 102, 1);
+
+  span {
+    font-size: 13px;
+    transform: scale(.8);
+    color: rgba(49, 185, 154, 1);
+  }
+}
+
+.propertyline {
+  position: relative;
+}
+
+.propertyline::after {
+  position: absolute;
+  content: "";
+  height: 80px;
+  border-right: 1px solid rgba(237, 239, 242, 1);
+  right: 0;
+}
+
+.operatetitle {
+  font-weight: 600;
+  height: 50px;
+  line-height: 50px;
+}
+
+.operatetitle-col {
+  display: flex;
+  justify-content: space-between;
+  padding-bottom: 20px;
+  padding-right: 5px;
+
+  .operatetitle-card {
+    width: 24%;
+    border: 1px solid transparent;
+    background-color: rgba(245, 247, 250, 1);
+    border-radius: 4px;
+    padding: 15px;
+    display: flex;
+    flex-direction: column;
+    position: relative;
+    transition: background-color 0.3s ease-in-out;
+
+    .operate-value {
+      font-size: 24px;
+      font-weight: bold;
+    }
+  }
+}
+
+.yesterdaybox {
+  font-size: 14px;
+  color: rgba(92, 95, 102, 1);
+  font-weight: 200;
+  margin-top: 10px;
+}
+
+.internetbox {
+  background: linear-gradient(to right, rgba(255, 99, 0, 1), rgba(255, 159, 1, 1));
+  border-radius: 6px;
+  padding: 2px 5px 15px 5px;
+  width: 100%;
+
+  .internet-cardtop {
+    background-color: white;
+    border-radius: 3px;
+    margin-top: 5px;
+    justify-content: space-between;
+    padding: 15px;
+    box-sizing: border-box;
+    color: rgba(32, 33, 36, 1);
+
+    .cardinnerbox {
+      display: flex;
+      justify-content: space-between;
+
+      .cardtopimg {
+        display: flex;
+        align-items: center;
+        font-size: 15px;
+
+        img {
+          height: 18px;
+          width: 18px;
+        }
+      }
+
+      .cardtopnumber {
+        font-size: 25px;
+        color: rgba(32, 33, 36, 1);
+        font-weight: bold;
+      }
+
+    }
+
+    .cardinnerbox2 {
+      display: flex;
+      justify-content: space-between;
+      font-size: 14px;
+      color: rgba(92, 95, 102, 1);
+
+
+    }
+
+  }
+
+  .internetbox-messge {
+    color: white;
+    display: flex;
+    justify-content: space-between;
+    padding: 15px 10px 10px 10px;
+
+    .internet-card {
+      display: flex;
+      font-size: 14px;
+      align-items: center;
+
+      img {
+        height: 18px;
+        width: 18px;
+      }
+
+      span {
+        padding-left: 5px;
+      }
+    }
+
+    .internet-number {
+      font-size: 25px;
+
+    }
+  }
+
+  .internetbox {
+    display: flex;
+    color: white;
+
+    .internet-card {
+      width: 100%;
+      display: flex;
+      color: white;
+
+    }
+  }
+
+  .internet-title {
+    font-size: 14px;
+  }
+
+}
+
+.company {
+  background-color: #006CFF;
+}
+
+.highlight-red {
+  text-align: center;
+  margin-top: 1em;
+  font-family: BebasNeue;
+  color: rgba(255, 82, 82, 1);
+  font-size: 21px;
+  line-height: 42px;
+  font-weight: 600;
+  margin-top: 8px;
+}
+
+.highlight-black {
+  text-align: center;
+  margin-top: 1em;
+  font-family: BebasNeue;
+  color: rgba(32, 33, 36, 1);
+  font-size: 21px;
+  line-height: 42px;
+  font-weight: 600;
+  margin-top: 8px;
+
+}
+
+.operatetitle-card:hover {
+  border: 1px solid #4592ff;
+  background-color: #e7f1ff;
+}
+
+.icon-img {
+  height: 14px;
+  width: 14px;
+}
+
+.progress {
+  transform: rotate(180deg);
+  margin-top: 20px;
+}
+
+.progress ::v-deep .el-progress-bar__outer {
+  background-color: rgba(247, 152, 11, 0.2);
+}
+
+::v-deep .el-progress {
+
+  .el-progress-bar {
+    .el-progress-bar__inner {
+      background: linear-gradient(to right, #FF6300, #FF9F01)
+    }
+  }
+}
+</style>

+ 72 - 0
src/views/components/index/welcomePage.vue

@@ -0,0 +1,72 @@
+<template>
+  <div class="app-container welcome-container">
+    <div class="welcome-content">
+      <div class="time-display">{{ currentTime }}</div>
+      <div class="system-name">{{ systemName }}</div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'Welcome',
+  data() {
+    return {
+      currentTime: '',
+      systemName: process.env.VUE_APP_TITLE,
+      timer: null
+    }
+  },
+  mounted() {
+    this.updateTime()
+    this.timer = setInterval(this.updateTime, 1000)
+  },
+  beforeDestroy() {
+    if (this.timer) {
+      clearInterval(this.timer)
+    }
+  },
+  methods: {
+    updateTime() {
+      const now = new Date()
+      this.currentTime = now.toLocaleString('zh-CN', {
+        year: 'numeric',
+        month: '2-digit',
+        day: '2-digit',
+        hour: '2-digit',
+        minute: '2-digit',
+        second: '2-digit',
+        weekday: 'long'
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+.welcome-container {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: calc(100vh - 84px); /* 减去头部和padding的高度 */
+  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+}
+
+.welcome-content {
+  text-align: center;
+  color: white;
+}
+
+.time-display {
+  font-size: 36px;
+  font-weight: 300;
+  margin-bottom: 20px;
+  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
+}
+
+.system-name {
+  font-size: 48px;
+  font-weight: bold;
+  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
+}
+</style>

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików