浏览代码

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

caoliqin 4 天之前
父节点
当前提交
4261658ca0
共有 100 个文件被更改,包括 6695 次插入834 次删除
  1. 18 11
      .env.development
  2. 40 0
      .env.prod-bnkc
  3. 40 0
      .env.prod-drk
  4. 47 0
      .env.prod-fcky
  5. 3 0
      .env.prod-hcl
  6. 3 0
      .env.prod-hdt
  7. 3 0
      .env.prod-hzyy
  8. 3 0
      .env.prod-jnmy
  9. 3 0
      .env.prod-jzzx
  10. 40 0
      .env.prod-lmjy
  11. 3 0
      .env.prod-myhk
  12. 40 0
      .env.prod-qdtst
  13. 40 0
      .env.prod-sft
  14. 3 0
      .env.prod-sxjz
  15. 3 0
      .env.prod-test
  16. 39 0
      .env.prod-whhm
  17. 40 0
      .env.prod-xfk
  18. 3 0
      .env.prod-yzt
  19. 39 0
      .env.prod-zsjk
  20. 9 0
      package.json
  21. 9 1
      src/api/ad/adSite.js
  22. 53 0
      src/api/company/companyBindUser.js
  23. 68 0
      src/api/company/companyDomain.js
  24. 61 0
      src/api/company/companyDomainBind.js
  25. 11 1
      src/api/company/companyMenu.js
  26. 18 0
      src/api/company/companyUser.js
  27. 9 1
      src/api/course/userCourse.js
  28. 7 0
      src/api/course/userCoursePeriod.js
  29. 31 0
      src/api/his/storeOrder.js
  30. 53 0
      src/api/qw/externalContact.js
  31. 9 0
      src/api/qw/qwUser.js
  32. 115 0
      src/api/system/employeeStats.js
  33. 二进制
      src/assets/images/cishu_views.png
  34. 二进制
      src/assets/images/code.png
  35. 二进制
      src/assets/images/eyeoff.png
  36. 二进制
      src/assets/images/eyeopen.png
  37. 二进制
      src/assets/images/hongbao_views.png
  38. 二进制
      src/assets/images/liuliang.png
  39. 二进制
      src/assets/images/login_bg.png
  40. 二进制
      src/assets/images/login_left.png
  41. 二进制
      src/assets/images/management_end_left_img.png
  42. 二进制
      src/assets/images/member.png
  43. 二进制
      src/assets/images/message.png
  44. 二进制
      src/assets/images/number_views.png
  45. 二进制
      src/assets/images/pass.png
  46. 二进制
      src/assets/images/renshu_views.png
  47. 二进制
      src/assets/images/salesperson.png
  48. 二进制
      src/assets/images/tab_company.png
  49. 二进制
      src/assets/images/tab_enterprise.png
  50. 二进制
      src/assets/images/topbg.png
  51. 二进制
      src/assets/images/user.png
  52. 二进制
      src/assets/images/yunlian_logo.png
  53. 二进制
      src/assets/images/zcgl_bg.png
  54. 二进制
      src/assets/logo/bnkc.png
  55. 二进制
      src/assets/logo/drk.png
  56. 二进制
      src/assets/logo/fcky.png
  57. 二进制
      src/assets/logo/lm.png
  58. 二进制
      src/assets/logo/qdtst.jpg
  59. 二进制
      src/assets/logo/sft.png
  60. 二进制
      src/assets/logo/whhm.png
  61. 二进制
      src/assets/logo/xfk.png
  62. 二进制
      src/assets/logo/zsjk.png
  63. 109 109
      src/assets/styles/common.scss
  64. 5 5
      src/assets/styles/element-ui.scss
  65. 2 2
      src/assets/styles/variables.scss
  66. 7 7
      src/components/ImageUpload/index.vue
  67. 8 8
      src/components/Material/index.vue
  68. 101 0
      src/components/PaginationMore/index.vue
  69. 1074 0
      src/components/TreeSelect/dateRange.vue
  70. 1049 0
      src/components/TreeSelect/index.vue
  71. 104 50
      src/components/VideoUpload/index.vue
  72. 71 44
      src/layout/components/Sidebar/index.vue
  73. 1 1
      src/store/modules/settings.js
  74. 329 0
      src/views/company/companyBindUser/index.vue
  75. 785 0
      src/views/company/companyDomain/index.vue
  76. 675 0
      src/views/company/companyDomainBind/index.vue
  77. 55 8
      src/views/components/course/userCourseCatalogDetails.vue
  78. 1 1
      src/views/components/his/followMsgDetails.vue
  79. 8 1
      src/views/components/his/inquiryOrderReportDetails.vue
  80. 7 1
      src/views/components/his/msgDetails.vue
  81. 9 1
      src/views/components/his/testReportDetails.vue
  82. 7 1
      src/views/components/his/userDetails.vue
  83. 11 10
      src/views/components/his/userPatietDetails.vue
  84. 32 4
      src/views/course/courseQuestionBank/QuestionBank.vue
  85. 2 40
      src/views/course/courseWatchLog/index.vue
  86. 46 1
      src/views/course/userCourse/index.vue
  87. 23 6
      src/views/course/userCoursePeriod/batchRedPacket.vue
  88. 449 299
      src/views/course/userCoursePeriod/index.vue
  89. 25 15
      src/views/course/userCoursePeriod/redPacket.vue
  90. 10 1
      src/views/course/videoResource/index.vue
  91. 1 1
      src/views/crm/components/customerStoreOrderList.vue
  92. 70 11
      src/views/his/company/index.vue
  93. 3 3
      src/views/his/coupon/index.vue
  94. 17 12
      src/views/his/doctor/type1.vue
  95. 11 7
      src/views/his/doctor/type2.vue
  96. 64 2
      src/views/his/integralOrder/index.vue
  97. 8 8
      src/views/his/package/index.vue
  98. 2 1
      src/views/his/patient/index.vue
  99. 426 155
      src/views/his/storeOrder/order1.vue
  100. 225 5
      src/views/his/user/index.vue

+ 18 - 11
.env.development

@@ -1,15 +1,15 @@
 # 页面标题
-VUE_APP_TITLE =木易华康互联网医院管理系统
+VUE_APP_TITLE =小访客管理系统
 # 首页菜单标题
-VUE_APP_TITLE_INDEX =木易华康互联网医院
+VUE_APP_TITLE_INDEX =小访客
 # 公司名称
-VUE_APP_COMPANY_NAME =福州市木易华康医药有限公司
+VUE_APP_COMPANY_NAME =西安小访客网络科技有限公司
 # ICP备案号
-VUE_APP_ICP_RECORD =闽ICP备2020016609号-3
+VUE_APP_ICP_RECORD =陕ICP备2025066365号-3
 # ICP网站访问地址
 VUE_APP_ICP_URL =https://beian.miit.gov.cn
 # 网站LOG
-VUE_APP_LOG_URL =@/assets/logo/myhk.png
+VUE_APP_LOG_URL =@/assets/logo/xfk.png
 # 存储桶配置
 VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
 # 存储桶配置
@@ -17,21 +17,28 @@ VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
 # 存储桶配置
 VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
 # 存储桶配置
-VUE_APP_OBS_BUCKET = myhk-hw079058881
+VUE_APP_OBS_BUCKET = xfk-hw079058881
 # 存储桶配置
-VUE_APP_COS_BUCKET = myhk-1323137866
+VUE_APP_COS_BUCKET = xfk-1323137866
 # 存储桶配置
 VUE_APP_COS_REGION = ap-chongqing
 # 线路一地址
-VUE_APP_VIDEO_LINE_1 = https://myhktcpv.ylrzcloud.com
+VUE_APP_VIDEO_LINE_1 = https://xfktcpv.ylrzcloud.com
 # 线路二地址
-VUE_APP_VIDEO_LINE_2 = https://myhkobs.ylrztop.com
+VUE_APP_VIDEO_LINE_2 = https://xfkobs.ylrztop.com
 
 # 开发环境配置
-ENV = 'development'
+ENV = 'production'
 
 # FS管理系统/开发环境
-VUE_APP_BASE_API = '/dev-api'
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
+# 患者信息
+VUE_APP_PATIENT_INFO = '客户信息'
+# 添加病人
+VUE_APP_ADD_PATIENT = '添加信息'

+ 40 - 0
.env.prod-bnkc

@@ -0,0 +1,40 @@
+# 页面标题
+VUE_APP_TITLE =百年康成互联网医院管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =百年康成互联网医院
+# 公司名称
+VUE_APP_COMPANY_NAME =北京百年康成信息科技有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =京ICP备2024053040号-5
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/bnkc.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 = bnkc-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = bnkc-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://bnkctcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://bnkcobs.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-drk

@@ -0,0 +1,40 @@
+# 页面标题
+VUE_APP_TITLE =德瑞康互联网医院管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =德瑞康互联网医院
+# 公司名称
+VUE_APP_COMPANY_NAME =青岛德瑞康医疗管理有限公司市北德瑞康中医医院
+# ICP备案号
+VUE_APP_ICP_RECORD =鲁ICP备2024135071号-3
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/drk.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 = drk-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = drk-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://drktcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://drkobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'production'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 47 - 0
.env.prod-fcky

@@ -0,0 +1,47 @@
+# 页面标题
+VUE_APP_TITLE =CRM客户管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =CRM客户管理系统
+# 公司名称
+VUE_APP_COMPANY_NAME =蜂巢快药(北京)医药连锁有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =京ICP备2025120013号
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/fcky.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 = fcky-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = fcky-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://fckytcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://fckyobs.ylrztop.com
+# 默认看课模式 1会员 2企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 开发环境配置
+ENV = 'development'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true
+
+# 患者信息
+VUE_APP_PATIENT_INFO = '客户信息'
+# 添加病人
+VUE_APP_ADD_PATIENT = '添加信息'

+ 3 - 0
.env.prod-hcl

@@ -33,5 +33,8 @@ ENV = 'development'
 # FS管理系统/开发环境
 VUE_APP_BASE_API = '/prod-api'
 
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 3 - 0
.env.prod-hdt

@@ -33,5 +33,8 @@ ENV = 'development'
 # FS管理系统/开发环境
 VUE_APP_BASE_API = '/prod-api'
 
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 3 - 0
.env.prod-hzyy

@@ -33,5 +33,8 @@ ENV = 'development'
 # FS管理系统/开发环境
 VUE_APP_BASE_API = '/prod-api'
 
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 3 - 0
.env.prod-jnmy

@@ -33,5 +33,8 @@ ENV = 'development'
 # FS管理系统/开发环境
 VUE_APP_BASE_API = '/prod-api'
 
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 3 - 0
.env.prod-jzzx

@@ -33,5 +33,8 @@ ENV = 'development'
 # FS管理系统/开发环境
 VUE_APP_BASE_API = '/prod-api'
 
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 40 - 0
.env.prod-lmjy

@@ -0,0 +1,40 @@
+# 页面标题
+VUE_APP_TITLE =良苗教育管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =良苗教育
+# 公司名称
+VUE_APP_COMPANY_NAME =重庆良苗教育咨询有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =渝ICP备2025055647号-1
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/lm.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 = lmjy-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = lm-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://lmjytcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://lmjyobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'development'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 3 - 0
.env.prod-myhk

@@ -33,5 +33,8 @@ ENV = 'production'
 # FS管理系统/开发环境
 VUE_APP_BASE_API = '/prod-api'
 
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 40 - 0
.env.prod-qdtst

@@ -0,0 +1,40 @@
+# 页面标题
+VUE_APP_TITLE =同顺堂医药管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =同顺堂
+# 公司名称
+VUE_APP_COMPANY_NAME =青岛同顺堂医药有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =鲁ICP备2023028746号
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/qdtst.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 = qdtst-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = qdtst-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://qdtsttcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://qdtstobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'development'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 40 - 0
.env.prod-sft

@@ -0,0 +1,40 @@
+# 页面标题
+VUE_APP_TITLE =四福堂互联网医院管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =四福堂
+# 公司名称
+VUE_APP_COMPANY_NAME =重庆佰达昌科技有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =渝ICP备2025059148号
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/sft.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 = sft-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = sft-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://sfttcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://sftobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'development'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 3 - 0
.env.prod-sxjz

@@ -33,5 +33,8 @@ ENV = 'development'
 # 今正互联网医院管理系统/开发环境
 VUE_APP_BASE_API = '/prod-api'
 
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 3 - 0
.env.prod-test

@@ -31,5 +31,8 @@ ENV = 'development'
 # FS管理系统/开发环境
 VUE_APP_BASE_API = '/prod-api'
 
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 39 - 0
.env.prod-whhm

@@ -0,0 +1,39 @@
+# 页面标题
+VUE_APP_TITLE =惠名互联网医院管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =惠名互联网医院
+# 公司名称
+VUE_APP_COMPANY_NAME =武汉惠名大药房有限责任公司
+# ICP备案号
+VUE_APP_ICP_RECORD =
+# ICP网站访问地址
+VUE_APP_ICP_URL =
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/whhm.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 = whhm-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = whhm-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://whhmtcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://whhmobs.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-xfk

@@ -0,0 +1,40 @@
+# 页面标题
+VUE_APP_TITLE =协和魔丽管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =协和魔丽
+# 公司名称
+VUE_APP_COMPANY_NAME =西安协和魔丽网络科技有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =陕ICP备2025066365号-3
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/xfk.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 = xfk-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = xfk-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://xfktcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://xfkobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'development'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 3 - 0
.env.prod-yzt

@@ -33,5 +33,8 @@ ENV = 'development'
 # FS管理系统/开发环境
 VUE_APP_BASE_API = '/prod-api'
 
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 39 - 0
.env.prod-zsjk

@@ -0,0 +1,39 @@
+# 页面标题
+VUE_APP_TITLE =中食健康互联网医院管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =中食健康
+# 公司名称
+VUE_APP_COMPANY_NAME =中食健康(北京)科技有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =京ICP备2024062307号
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/zsjk.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 = zsjk-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = zsjk-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://zsjktcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://zsjkobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'production'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 9 - 0
package.json

@@ -13,9 +13,18 @@
     "build:prod-hcl": "vue-cli-service build --mode prod-hcl",
     "build:prod-myhk": "vue-cli-service build --mode prod-myhk",
     "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-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",
+    "build:prod-sft": "vue-cli-service build --mode prod-sft",
+    "build:prod-zsjk": "vue-cli-service build --mode prod-zsjk",
+    "build:prod-lmjy": "vue-cli-service build --mode prod-lmjy",
+    "build:prod-bnkc": "vue-cli-service build --mode prod-bnkc",
+    "build:prod-whhm": "vue-cli-service build --mode prod-whhm",
+    "build:prod-drk": "vue-cli-service build --mode prod-drk",
+    "build:prod-qdtst": "vue-cli-service build --mode prod-qdtst",
     "build:stage": "vue-cli-service build --mode staging",
     "preview": "node build/index.js --preview",
     "lint": "eslint --ext .js,.vue src"

+ 9 - 1
src/api/ad/adSite.js

@@ -50,4 +50,12 @@ export function exportAdSite(query) {
     method: 'get',
     params: query
   })
-}
+}
+// 导出站点管理
+export function listAll(query) {
+  return request({
+    url: '/ad/adSite/listAll',
+    method: 'get',
+    params: query
+  })
+}

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

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询企业域名分配中间表列表
+export function listCompanyBindUser(query) {
+  return request({
+    url: '/company/companyBindUser/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询企业域名分配中间表详细
+export function getCompanyBindUser(id) {
+  return request({
+    url: '/company/companyBindUser/' + id,
+    method: 'get'
+  })
+}
+
+// 新增企业域名分配中间表
+export function addCompanyBindUser(data) {
+  return request({
+    url: '/company/companyBindUser',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改企业域名分配中间表
+export function updateCompanyBindUser(data) {
+  return request({
+    url: '/company/companyBindUser',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除企业域名分配中间表
+export function delCompanyBindUser(id) {
+  return request({
+    url: '/company/companyBindUser/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出企业域名分配中间表
+export function exportCompanyBindUser(query) {
+  return request({
+    url: '/company/companyBindUser/export',
+    method: 'get',
+    params: query
+  })
+}

+ 68 - 0
src/api/company/companyDomain.js

@@ -0,0 +1,68 @@
+import request from '@/utils/request'
+
+// 查询域名管路列表
+export function listCompanyDomain(query) {
+  return request({
+    url: '/company/companyDomain/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询域名管路详细
+export function getCompanyDomain(id) {
+  return request({
+    url: '/company/companyDomain/' + id,
+    method: 'get'
+  })
+}
+
+// 新增域名管路
+export function addCompanyDomain(data) {
+  return request({
+    url: '/company/companyDomain',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改域名管路
+export function updateCompanyDomain(data) {
+  return request({
+    url: '/company/companyDomain',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除域名管路
+export function delCompanyDomain(id) {
+  return request({
+    url: '/company/companyDomain/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出域名管路
+export function exportCompanyDomain(query) {
+  return request({
+    url: '/company/companyDomain/export',
+    method: 'get',
+    params: query
+  })
+}
+
+export function domainBatchBinding(data){
+  return request({
+    url: '/company/companyDomain/domainBatchBinding',
+    method: 'post',
+    data: data
+  })
+}
+
+export function exportTemplate(){
+  return request({
+    url: '/company/companyDomain/exportTemplate',
+    method: 'get',
+  })
+}

+ 61 - 0
src/api/company/companyDomainBind.js

@@ -0,0 +1,61 @@
+import request from '@/utils/request'
+
+// 查询域名绑定销售公司列表
+export function listCompanyDomainBind(query) {
+  return request({
+    url: '/company/companyDomainBind/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询域名绑定销售公司详细
+export function getCompanyDomainBind(id) {
+  return request({
+    url: '/company/companyDomainBind/' + id,
+    method: 'get'
+  })
+}
+
+// 新增域名绑定销售公司
+export function addCompanyDomainBind(data) {
+  return request({
+    url: '/company/companyDomainBind',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改域名绑定销售公司
+export function updateCompanyDomainBind(data) {
+  return request({
+    url: '/company/companyDomainBind',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除域名绑定销售公司
+export function delCompanyDomainBind(id) {
+  return request({
+    url: '/company/companyDomainBind/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出域名绑定销售公司
+export function exportCompanyDomainBind(query) {
+  return request({
+    url: '/company/companyDomainBind/export',
+    method: 'get',
+    params: query
+  })
+}
+
+export function domainBatchBinding(data){
+  return request({
+    url: '/company/companyDomainBind/domainBatchBinding',
+    method: 'post',
+    data: data
+  })
+}

+ 11 - 1
src/api/company/companyMenu.js

@@ -50,4 +50,14 @@ export function exportCompanyMenu(query) {
     method: 'get',
     params: query
   })
-}
+}
+
+
+
+// 查询菜单下拉树结构
+export function treeselect() {
+  return request({
+    url: '/company/companyMenu/treeselect',
+    method: 'get'
+  })
+}

+ 18 - 0
src/api/company/companyUser.js

@@ -102,3 +102,21 @@ export function getCompanyUserListLikeName(query){
     params: query
   })
 }
+//更换会员归属销售
+export function changeCompanyUser(data, params) {
+  return request({
+    url: '/company/companyUser/changeCompanyUser',
+    method: 'post',
+    data: data,
+    params: params
+  })
+}
+
+// 查询企业员工信息列表
+export function getCompanyUserListPage(query) {
+  return request({
+    url: '/company/companyUser/getCompanyUserListPage',
+    method: 'get',
+    params: query
+  })
+}

+ 9 - 1
src/api/course/userCourse.js

@@ -43,6 +43,14 @@ export function delUserCourse(courseId) {
   })
 }
 
+// 复制课程
+export function copyUserCourse(courseId) {
+  return request({
+    url: '/course/userCourse/copy/' + courseId,
+    method: 'get'
+  })
+}
+
 // 导出课程
 export function exportUserCourse(query) {
   return request({
@@ -79,4 +87,4 @@ export function pullOff(courseIds) {
     url: '/course/userCourse/pullOff/' + courseIds,
     method: 'post'
   })
-}
+}

+ 7 - 0
src/api/course/userCoursePeriod.js

@@ -174,3 +174,10 @@ export function closePeriod(query) {
     params: query
   })
 }
+// 删除会员营期课程
+export function delPeriodDay(periodId) {
+  return request({
+    url: '/course/period/day/' + periodId,
+    method: 'delete'
+  })
+}

+ 31 - 0
src/api/his/storeOrder.js

@@ -234,3 +234,34 @@ export function exportOrder2(query) {
   })
 }
 
+export function queryErpPhone(query) {
+  return request({
+    url: '/his/storeOrder/queryErpPhone',
+    method: 'get',
+    params: query
+  })
+}
+
+export function saveErpPhone(data) {
+  return request({
+    url: '/his/storeOrder/saveErpPhone',
+    method: 'post',
+    data: data
+  })
+}
+
+export function editErpPhone(data) {
+  return request({
+    url: '/his/storeOrder/editErpPhone',
+    method: 'post',
+    data: data
+  })
+}
+
+export function batchCreateErpOrder(data) {
+  return request({
+    url: '/his/storeOrder/batchCreateErpOrder',
+    method: 'post',
+    data: data
+  })
+}

+ 53 - 0
src/api/qw/externalContact.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询企业微信客户列表
+export function listExternalContact(query) {
+  return request({
+    url: '/qw/externalContact/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询企业微信客户详细
+export function getExternalContact(id) {
+  return request({
+    url: '/qw/externalContact/' + id,
+    method: 'get'
+  })
+}
+
+// 新增企业微信客户
+export function addExternalContact(data) {
+  return request({
+    url: '/qw/externalContact',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改企业微信客户
+export function updateExternalContact(data) {
+  return request({
+    url: '/qw/externalContact',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除企业微信客户
+export function delExternalContact(id) {
+  return request({
+    url: '/qw/externalContact/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出企业微信客户
+export function exportExternalContact(query) {
+  return request({
+    url: '/qw/externalContact/export',
+    method: 'get',
+    params: query
+  })
+}

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

@@ -7,3 +7,12 @@ export function getQwUserAll() {
     method: 'get'
   })
 }
+
+//查询企业信息
+export function  getQwUserInfo(query) {
+  return request({
+    url: '/qw/user/getQwUserInfo',
+    method: 'get',
+    params: query
+  })
+}

+ 115 - 0
src/api/system/employeeStats.js

@@ -0,0 +1,115 @@
+import request from '@/utils/request'
+
+// 查询员工完成统计列表
+export function listEmployeeStats(query) {
+  return request({
+    url: '/stats/seller/pageList',
+    method: 'post',
+    data: query
+  })
+}
+
+export function listInlineList(query) {
+  return request({
+    url: '/stats/inline/pageList',
+    method: 'post',
+    data: query
+  })
+}
+
+export function exportInlineList(param){
+  return request({
+    url: '/stats/inline/export',
+    method: 'post',
+    data: param
+  })
+}
+export function exportSellerData(param){
+  return request({
+    url: '/stats/seller/export',
+    method: 'post',
+    data: param
+  })
+}
+
+export function listPeriodList(query) {
+  return request({
+    url: '/stats/period/pageList',
+    method: 'post',
+    data: query
+  })
+}
+
+export function exportPeriodData(query){
+  return request({
+    url: '/stats/period/export',
+    method: 'post',
+    data: query
+  })
+}
+
+export function exportTodayData(query) {
+  return request({
+    url: '/stats/everyDay/export',
+    method: 'post',
+    data: query
+  })
+}
+
+export function listTodayList(query) {
+  return request({
+    url: '/stats/everyDay/pageList',
+    method: 'post',
+    data: query
+  })
+}
+
+// 查询员工完成统计详细
+export function getEmployeeStats(id) {
+  return request({
+    url: '/system/employeeStats/' + id,
+    method: 'get'
+  })
+}
+
+// 获取员工列表
+export function getEmployeeList() {
+  return request({
+    url: '/system/employee/list',
+    method: 'get'
+  })
+}
+
+// 获取频道列表
+export function getChannelList() {
+  return request({
+    url: '/system/channel/list',
+    method: 'get'
+  })
+}
+
+// 导出员工完成统计
+export function exportEmployeeStats(query) {
+  return request({
+    url: '/system/employeeStats/export',
+    method: 'post',
+    data: query
+  })
+}
+
+// 获取SOP任务数据
+export function getSOPTaskData(param){
+  return request({
+    url: '/stats/sopTaskData',
+    method: 'post',
+    data: param
+  })
+}
+
+// 获取部门数据
+export function getDeptData(param){
+  return request({
+    url: '/stats/getDeptData',
+    method: 'get'
+  })
+}

二进制
src/assets/images/cishu_views.png


二进制
src/assets/images/code.png


二进制
src/assets/images/eyeoff.png


二进制
src/assets/images/eyeopen.png


二进制
src/assets/images/hongbao_views.png


二进制
src/assets/images/liuliang.png


二进制
src/assets/images/login_bg.png


二进制
src/assets/images/login_left.png


二进制
src/assets/images/management_end_left_img.png


二进制
src/assets/images/member.png


二进制
src/assets/images/message.png


二进制
src/assets/images/number_views.png


二进制
src/assets/images/pass.png


二进制
src/assets/images/renshu_views.png


二进制
src/assets/images/salesperson.png


二进制
src/assets/images/tab_company.png


二进制
src/assets/images/tab_enterprise.png


二进制
src/assets/images/topbg.png


二进制
src/assets/images/user.png


二进制
src/assets/images/yunlian_logo.png


二进制
src/assets/images/zcgl_bg.png


二进制
src/assets/logo/bnkc.png


二进制
src/assets/logo/drk.png


二进制
src/assets/logo/fcky.png


二进制
src/assets/logo/lm.png


二进制
src/assets/logo/qdtst.jpg


二进制
src/assets/logo/sft.png


二进制
src/assets/logo/whhm.png


二进制
src/assets/logo/xfk.png


二进制
src/assets/logo/zsjk.png


+ 109 - 109
src/assets/styles/common.scss

@@ -1,121 +1,121 @@
- /**
- * 通用css样式布局处理
- */
+/**
+* 通用css样式布局处理
+*/
 
- /** 基础通用 **/
+/** 基础通用 **/
 .pt5 {
-	padding-top: 5px;
+  padding-top: 5px;
 }
 .pr5 {
-	padding-right: 5px;
+  padding-right: 5px;
 }
 .pb5 {
-	padding-bottom: 5px;
+  padding-bottom: 5px;
 }
 .mt5 {
-	margin-top: 5px;
+  margin-top: 5px;
 }
 .mr5 {
-	margin-right: 5px;
+  margin-right: 5px;
 }
 .mb5 {
-	margin-bottom: 5px;
+  margin-bottom: 5px;
 }
 .mb8 {
-	margin-bottom: 8px;
+  margin-bottom: 8px;
 }
 .ml5 {
-	margin-left: 5px;
+  margin-left: 5px;
 }
 .mt10 {
-	margin-top: 10px;
+  margin-top: 10px;
 }
 .mr10 {
-	margin-right: 10px;
+  margin-right: 10px;
 }
 .mb10 {
-	margin-bottom: 10px;
+  margin-bottom: 10px;
 }
 .ml0 {
-	margin-left: 10px;
+  margin-left: 10px;
 }
 .mt20 {
-	margin-top: 20px;
+  margin-top: 20px;
 }
 .mr20 {
-	margin-right: 20px;
+  margin-right: 20px;
 }
 .mb20 {
-	margin-bottom: 20px;
+  margin-bottom: 20px;
 }
 .m20 {
-	margin-left: 20px;
+  margin-left: 20px;
 }
 
 .h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
-	font-family: inherit;
-	font-weight: 500;
-	line-height: 1.1;
-	color: inherit;
+  font-family: inherit;
+  font-weight: 500;
+  line-height: 1.1;
+  color: inherit;
 }
 
 .el-dialog:not(.is-fullscreen) {
-	margin-top: 6vh !important;
+  margin-top: 6vh !important;
 }
 
 .el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body {
-    overflow: auto;
-	overflow-x: hidden;
-	max-height: 70vh;
-	padding: 10px 20px 0;
+  overflow: auto;
+  overflow-x: hidden;
+  max-height: 70vh;
+  padding: 10px 20px 0;
 }
 
 .el-table {
-	.el-table__header-wrapper, .el-table__fixed-header-wrapper {
-		th {
-			word-break: break-word;
-			background-color: #f8f8f9;
-			color: #515a6e;
-			height: 40px;
-			font-size: 13px;
-		}
-	}
-	.el-table__body-wrapper {
-		.el-button [class*="el-icon-"] + span {
-			margin-left: 1px;
-		}
-	}
+  .el-table__header-wrapper, .el-table__fixed-header-wrapper {
+    th {
+      word-break: break-word;
+      background-color: #f8f8f9;
+      color: #515a6e;
+      height: 40px;
+      font-size: 13px;
+    }
+  }
+  .el-table__body-wrapper {
+    .el-button [class*="el-icon-"] + span {
+      margin-left: 1px;
+    }
+  }
 }
 
 /** 表单布局 **/
 .form-header {
-    font-size:15px;
-	color:#6379bb;
-	border-bottom:1px solid #ddd;
-	margin:8px 10px 25px 10px;
-	padding-bottom:5px
+  font-size:15px;
+  color:#6379bb;
+  border-bottom:1px solid #ddd;
+  margin:8px 10px 25px 10px;
+  padding-bottom:5px
 }
 
 /** 表格布局 **/
 .pagination-container {
-	position: relative;
-	height: 25px;
-	margin-bottom: 10px;
-	margin-top: 15px;
-	padding: 10px 20px !important;
+  position: relative;
+  height: 25px;
+  margin-bottom: 10px;
+  margin-top: 15px;
+  padding: 10px 20px !important;
 }
 
 /* tree border */
 .tree-border {
-    margin-top: 5px;
-    border: 1px solid #e5e6e7;
-    background: #FFFFFF none;
-    border-radius:4px;
+  margin-top: 5px;
+  border: 1px solid #e5e6e7;
+  background: #FFFFFF none;
+  border-radius:4px;
 }
 
 .pagination-container .el-pagination {
-	right: 0;
-	position: absolute;
+  right: 0;
+  position: absolute;
 }
 
 @media ( max-width : 768px) {
@@ -128,64 +128,64 @@
 }
 
 .el-table .fixed-width .el-button--mini {
-	padding-left: 0;
-	padding-right: 0;
-	width: inherit;
+  padding-left: 0;
+  padding-right: 0;
+  width: inherit;
 }
 
 /** 表格更多操作下拉样式 */
 .el-table .el-dropdown-link {
-	cursor: pointer;
-	color: #409EFF;
-	margin-left: 5px;
+  cursor: pointer;
+  color: #409EFF;
+  margin-left: 5px;
 }
 
 .el-table .el-dropdown, .el-icon-arrow-down {
-	font-size: 12px;
+  font-size: 12px;
 }
 
 .el-tree-node__content > .el-checkbox {
-	margin-right: 8px;
+  margin-right: 8px;
 }
 
 .list-group-striped > .list-group-item {
-	border-left: 0;
-	border-right: 0;
-	border-radius: 0;
-	padding-left: 0;
-	padding-right: 0;
+  border-left: 0;
+  border-right: 0;
+  border-radius: 0;
+  padding-left: 0;
+  padding-right: 0;
 }
 
 .list-group {
-	padding-left: 0px;
-	list-style: none;
+  padding-left: 0px;
+  list-style: none;
 }
 
 .list-group-item {
-	border-bottom: 1px solid #e7eaec;
-	border-top: 1px solid #e7eaec;
-	margin-bottom: -1px;
-	padding: 11px 0px;
-	font-size: 13px;
+  border-bottom: 1px solid #e7eaec;
+  border-top: 1px solid #e7eaec;
+  margin-bottom: -1px;
+  padding: 11px 0px;
+  font-size: 13px;
 }
 
 .pull-right {
-	float: right !important;
+  float: right !important;
 }
 
 .el-card__header {
-	padding: 14px 15px 7px;
-	min-height: 40px;
+  padding: 14px 15px 7px;
+  min-height: 40px;
 }
 
 .el-card__body {
-	padding: 15px 20px 20px 20px;
+  padding: 15px 20px 20px 20px;
 }
 
 .card-box {
-	padding-right: 15px;
-	padding-left: 15px;
-	margin-bottom: 10px;
+  padding-right: 15px;
+  padding-left: 15px;
+  margin-bottom: 10px;
 }
 
 /* button color */
@@ -211,62 +211,62 @@
 
 /* text color */
 .text-navy {
-	color: #1ab394;
+  color: #1ab394;
 }
 
 .text-primary {
-	color: inherit;
+  color: inherit;
 }
 
 .text-success {
-	color: #1c84c6;
+  color: #1c84c6;
 }
 
 .text-info {
-	color: #23c6c8;
+  color: #23c6c8;
 }
 
 .text-warning {
-	color: #f8ac59;
+  color: #f8ac59;
 }
 
 .text-danger {
-	color: #ed5565;
+  color: #ed5565;
 }
 
 .text-muted {
-	color: #888888;
+  color: #888888;
 }
 
 /* image */
 .img-circle {
-	border-radius: 50%;
+  border-radius: 50%;
 }
 
 .img-lg {
-	width: 120px;
-	height: 120px;
+  width: 120px;
+  height: 120px;
 }
 
 .avatar-upload-preview {
-	position: absolute;
-	top: 50%;
-	transform: translate(50%, -50%);
-	width: 200px;
-	height: 200px;
-	border-radius: 50%;
-	box-shadow: 0 0 4px #ccc;
-	overflow: hidden;
+  position: absolute;
+  top: 50%;
+  transform: translate(50%, -50%);
+  width: 200px;
+  height: 200px;
+  border-radius: 50%;
+  box-shadow: 0 0 4px #ccc;
+  overflow: hidden;
 }
 
 /* 拖拽列样式 */
 .sortable-ghost{
-	opacity: .8;
-	color: #fff!important;
-	background: #42b983!important;
+  opacity: .8;
+  color: #fff!important;
+  background: #42b983!important;
 }
 
 .top-right-btn {
-	position: relative;
-	float: right;
+  position: relative;
+  float: right;
 }

+ 5 - 5
src/assets/styles/element-ui.scss

@@ -84,9 +84,9 @@
 }
 
 .el-menu--collapse
-  > div
-  > .el-submenu
-  > .el-submenu__title
-  .el-submenu__icon-arrow {
+> div
+> .el-submenu
+> .el-submenu__title
+.el-submenu__icon-arrow {
   display: none;
-}
+}

+ 2 - 2
src/assets/styles/variables.scss

@@ -1,6 +1,6 @@
 // base color
 $blue:#324157;
-$light-blue:#3A71A8;
+$light-blue: #3a71a8;
 $red:#C03639;
 $pink: #E65D6E;
 $green: #30B08F;
@@ -11,7 +11,7 @@ $panGreen: #30B08F;
 // 默认菜单主题风格
 $base-menu-color:#bfcbd9;
 $base-menu-color-active:#f4f4f5;
-$base-menu-background:#304156;
+$base-menu-background: #304156;
 $base-logo-title-color: #ffffff;
 
 $base-menu-light-color:rgba(0,0,0,.70);

+ 7 - 7
src/components/ImageUpload/index.vue

@@ -165,8 +165,8 @@ export default {
           // 文件大于1MB时进行压缩
           this.compressImage(file).then((compressedFile) => {
             loadingInstance.close();
-            if (compressedFile.size / 1024 > 500) {
-              this.$message.error('图片压缩后仍大于500KB');
+            if (compressedFile.size / 1024 > 1000) {
+              this.$message.error('图片压缩后仍大于1000KB');
               reject();
             } else {
               // this.$message.success(`图片压缩成功,最终质量为: ${this.finalQuality.toFixed(2)}`);
@@ -195,7 +195,7 @@ export default {
       //     return false;
       //   }
       // }
-      
+
     },
     compressImage(file) {
       return new Promise((resolve, reject) => {
@@ -215,16 +215,16 @@ export default {
 
             let quality = 1; // 初始压缩质量
             let dataURL = canvas.toDataURL('image/jpeg', quality);
-            
+
             // 逐步压缩,直到图片大小小于500KB并且压缩质量不再降低
             while (dataURL.length / 1024 > 500 && quality > 0.1) {
               quality -= 0.01;
               dataURL = canvas.toDataURL('image/jpeg', quality);
             }
             this.finalQuality = quality; // 存储最终的压缩质量
-            
-            if (dataURL.length / 1024 > 500) {
-              reject(new Error('压缩后图片仍然大于500KB'));
+
+            if (dataURL.length / 1024 > 1000) {
+              reject(new Error('压缩后图片仍然大于1000KB'));
               return;
             }
 

+ 8 - 8
src/components/Material/index.vue

@@ -357,8 +357,8 @@ export default {
         return false
       }
       return new Promise((resolve, reject) => {
-        if (file.size / 1024 / 1024 > 3) {
-          this.$message.error('上传的图片不能超过3MB');
+        if (file.size / 1024 / 1024 > 6) {
+          this.$message.error('上传的图片不能超过6MB');
           reject();
           return;
         }
@@ -367,8 +367,8 @@ export default {
           // 文件大于1MB时进行压缩
           this.compressImage(file).then((compressedFile) => {
             loadingInstance.close();
-            if (compressedFile.size / 1024 > 500) {
-              this.$message.error('图片压缩后仍大于500KB');
+            if (compressedFile.size / 1024 > 1000) {
+              this.$message.error('图片压缩后仍大于1M');
               reject();
             } else {
               // this.$message.success(`图片压缩成功,最终质量为: ${this.finalQuality.toFixed(2)}`);
@@ -409,16 +409,16 @@ export default {
 
             let quality = 1; // 初始压缩质量
             let dataURL = canvas.toDataURL('image/jpeg', quality);
-            
+
             // 逐步压缩,直到图片大小小于500KB并且压缩质量不再降低
             while (dataURL.length / 1024 > 500 && quality > 0.1) {
               quality -= 0.01;
               dataURL = canvas.toDataURL('image/jpeg', quality);
             }
             this.finalQuality = quality; // 存储最终的压缩质量
-            
-            if (dataURL.length / 1024 > 500) {
-              reject(new Error('压缩后图片仍然大于500KB'));
+
+            if (dataURL.length / 1024 > 1000) {
+              reject(new Error('压缩后图片仍然大于1000KB'));
               return;
             }
 

+ 101 - 0
src/components/PaginationMore/index.vue

@@ -0,0 +1,101 @@
+<template>
+  <div :class="{'hidden':hidden}" class="pagination-container">
+    <el-pagination
+      :background="background"
+      :current-page.sync="currentPage"
+      :page-size.sync="pageSize"
+      :layout="layout"
+      :page-sizes="pageSizes"
+      :total="total"
+      v-bind="$attrs"
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+    />
+  </div>
+</template>
+
+<script>
+import { scrollTo } from '@/utils/scroll-to'
+
+export default {
+  name: 'PaginationMore',
+  props: {
+    total: {
+      required: true,
+      type: Number
+    },
+    page: {
+      type: Number,
+      default: 1
+    },
+    limit: {
+      type: Number,
+      default: 20
+    },
+    pageSizes: {
+      type: Array,
+      default() {
+        return [5,10, 20, 30, 50,100,200,300,500]
+      }
+    },
+    layout: {
+      type: String,
+      default: 'total, sizes, prev, pager, next, jumper'
+    },
+    background: {
+      type: Boolean,
+      default: true
+    },
+    autoScroll: {
+      type: Boolean,
+      default: true
+    },
+    hidden: {
+      type: Boolean,
+      default: false
+    }
+  },
+  computed: {
+    currentPage: {
+      get() {
+        return this.page
+      },
+      set(val) {
+        this.$emit('update:page', val)
+      }
+    },
+    pageSize: {
+      get() {
+        return this.limit
+      },
+      set(val) {
+        this.$emit('update:limit', val)
+      }
+    }
+  },
+  methods: {
+    handleSizeChange(val) {
+      this.$emit('pagination', { page: this.currentPage, limit: val })
+      if (this.autoScroll) {
+        scrollTo(0, 800)
+      }
+    },
+    handleCurrentChange(val) {
+      this.$emit('pagination', { page: val, limit: this.pageSize })
+      if (this.autoScroll) {
+        scrollTo(0, 800)
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+.pagination-container {
+  background: #fff;
+  padding: 32px 16px;
+}
+.pagination-container.hidden {
+  display: none;
+}
+</style>

+ 1074 - 0
src/components/TreeSelect/dateRange.vue

@@ -0,0 +1,1074 @@
+<template>
+  <div class="task-select-tree" :style="{ width: componentWidth }">
+    <el-popover
+      ref="popover"
+      placement="bottom-start"
+      :width="popoverComputedWidth"
+      trigger="click"
+      v-model="popoverVisible"
+      popper-class="task-select-tree-popper"
+      :disabled="disabled"
+      @show="onPopoverShow"
+    >
+      <div class="popover-content-wrapper">
+        <el-date-picker v-model="dateRange"
+                        size="small"
+                        style="width: 220px"
+                        value-format="yyyy-MM-dd"
+                        type="daterange"
+                        range-separator="-"
+                        start-placeholder="营期开始日期"
+                        end-placeholder="营期结束日期"
+        @change="dateRangeChange"/>
+        &nbsp;<button type="primary" @click="dateRangeChange(dateRange)">查询</button>
+        <br/>
+        <br/>
+        <el-input
+          v-if="filterable"
+          placeholder="输入关键字过滤"
+          v-model="filterText"
+          size="mini"
+          clearable
+          class="filter-input"
+          @input="handleFilterDebounced"
+        >
+        </el-input>
+
+        <div class="tree-container" :style="{ height: treeHeight + 'px' }">
+          <div
+            ref="virtualList"
+            class="virtual-tree-list"
+            @scroll="handleScroll"
+            :style="{ height: treeHeight + 'px', overflow: 'auto' }"
+          >
+            <div
+              class="virtual-content"
+              :style="{
+                height: totalHeight + 'px',
+                position: 'relative',
+                paddingTop: offsetY + 'px'
+              }"
+            >
+              <div
+                v-for="(item, index) in visibleItems"
+                :key="`${item.key}-${item.level}-${index}`"
+                :style="{
+                  height: itemHeight + 'px',
+                  paddingLeft: (item.level * indentSize) + 'px',
+                  display: 'flex',
+                  alignItems: 'center',
+                  position: 'relative'
+                }"
+                :class="[
+                  'virtual-tree-node',
+                  {
+                    'is-leaf': item.isLeaf,
+                    'is-checked': checkedKeysSet.has(item.key) && (item.isLeaf || parentSelectable || !checkStrictly),
+                    'is-disabled': item.nodeDisabled || checkboxDisabled(item) // Combined disabled state for row styling
+                  }
+                ]"
+                @click="handleNodeClick(item)"
+              >
+                <div class="node-expand-container">
+                  <i
+                    v-if="!item.isLeaf"
+                    :class="[
+                      'node-expand-icon',
+                      item.expanded ? 'el-icon-caret-bottom' : 'el-icon-caret-right'
+                    ]"
+                    @click.stop="toggleNodeExpand(item)"
+                  ></i>
+                  <span v-else class="node-expand-placeholder"></span>
+                </div>
+
+                <el-checkbox
+                  :value="checkedKeysSet.has(item.key)"
+                  :disabled="checkboxDisabled(item)"
+                  @change="handleCheckboxChange(item, $event)"
+                  @click.stop
+                  class="node-checkbox"
+                ></el-checkbox>
+
+                <span class="node-label" :title="item.label">{{ item.label }}</span>
+
+                <span v-if="item.isLeaf && showNodeDetail" class="node-detail-text">
+                  (ID: {{ item.originalData.qwUserId || item.originalData.id }}{{ item.originalData.taskExecDate ? ' ' + item.originalData.taskExecDate : '' }})
+                </span>
+              </div>
+            </div>
+          </div>
+        </div>
+
+        <div class="popover-footer">
+          <span class="selected-count">已选择: {{ displaySelectedCount }}</span>
+          <el-button size="mini" @click="handleClearInPopover">清空</el-button>
+          <el-button size="mini" type="primary" @click="handleSelectAllToggle">{{ isCurrentSelectionAll ? '取消全选' : '全选' }}</el-button>
+          <el-button type="primary" size="mini" @click="handleConfirm">确定</el-button>
+        </div>
+      </div>
+
+      <div
+        slot="reference"
+        :class="['select-trigger-wrapper', { 'is-disabled': disabled, 'is-active': popoverVisible }]"
+        @mouseenter="inputHovering = true"
+        @mouseleave="inputHovering = false"
+      >
+        <div class="tags-or-value-container">
+          <template v-if="multiple && displaySelectedNodes.length > 0">
+            <el-tag
+              v-for="node in displaySelectedNodes"
+              :key="node.key"
+              type="info"
+              size="small"
+              closable
+              :disable-transitions="true"
+              @close.stop="removeTag(node)"
+              class="trigger-tag"
+            >
+              {{ node.label }}
+            </el-tag>
+            <el-tag
+              v-if="displaySelectedCount > maxDisplayTags && displaySelectedNodes.length === maxDisplayTags"
+              type="info"
+              size="small"
+              class="trigger-tag"
+            >
+              + {{ displaySelectedCount - maxDisplayTags }}
+            </el-tag>
+          </template>
+          <span v-else-if="!multiple && displaySelectedCount > 0" class="single-value-display">
+            {{ singleSelectedLabel }}
+          </span>
+          <span v-else class="placeholder-text">{{ placeholder }}</span>
+        </div>
+
+        <span class="icons-container">
+          <i
+            v-if="showClearIcon"
+            class="el-icon-circle-close clear-icon"
+            @click.stop="handleClearOnTrigger"
+          ></i>
+          <i :class="['el-icon-arrow-up', 'arrow-icon', { 'is-reverse': !popoverVisible }]"></i>
+        </span>
+      </div>
+    </el-popover>
+  </div>
+</template>
+
+<script>
+// 防抖函数
+function debounce(func, wait) {
+  let timeout;
+  return function executedFunction(...args) {
+    const later = () => {
+      clearTimeout(timeout);
+      func(...args);
+    };
+    clearTimeout(timeout);
+    timeout = setTimeout(later, wait);
+  };
+}
+
+export default {
+  name: 'OptimizedSelectTree',
+  props: {
+    value: {
+      type: Array,
+      default: () => []
+    },
+    rawData: {
+      type: Array,
+      required: true
+    },
+    placeholder: {
+      type: String,
+      default: '请选择'
+    },
+    multiple: {
+      type: Boolean,
+      default: false
+    },
+    disabled: { // Global disabled for the component
+      type: Boolean,
+      default: false
+    },
+    checkStrictly: {
+      type: Boolean,
+      default: false // Important for parent-child linkage
+    },
+    filterable: {
+      type: Boolean,
+      default: true
+    },
+    dateRange: {
+      type: Array,
+      default: null
+    },
+    maxDisplayTags: {
+      type: Number,
+      default: 2
+    },
+    componentWidth: {
+      type: String,
+      default: '100%'
+    },
+    popoverWidth: {
+      type: [String, Number],
+      default: 'auto'
+    },
+    treeProps: {
+      type: Object,
+      default: () => ({
+        children: 'children',
+        label: 'label',
+        isLeaf: 'isLeaf',
+        disabled: 'disabled' // Key for disabled state in rawData
+      })
+    },
+    nodeKey: {
+      type: String,
+      default: 'id'
+    },
+    defaultExpandAll: {
+      type: Boolean,
+      default: false
+    },
+    showNodeDetail: {
+      type: Boolean,
+      default: true
+    },
+    treeHeight: {
+      type: Number,
+      default: 280
+    },
+    returnLeafOnly: {
+      // This prop's effect on output is now overridden.
+      // It might still be used by consumers for other logic if they rely on its original meaning.
+      type: Boolean,
+      default: true
+    },
+    parentSelectable: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      popoverVisible: false,
+      filterText: '',
+      inputHovering: false,
+      triggerElRect: null,
+      itemHeight: 36,
+      indentSize: 24,
+      startIndex: 0,
+      endIndex: 0,
+      scrollTop: 0,
+      visibleItemCount: 0,
+      flattenedNodes: [],
+      nodeMap: new Map(),
+      checkedKeysSet: new Set(),
+      expandedKeysSet: new Set(),
+      updateTimer: null
+    };
+  },
+  computed: {
+    targetLeafNodes() {
+      if (this.filterText.trim()) {
+        return this.currentResultLeafNodes;
+      }
+      return this.allSelectableLeafNodes;
+    },
+
+    isCurrentSelectionAll() {
+      const nodes = this.targetLeafNodes;
+      if (nodes.length === 0) return false;
+      return nodes.every(node => this.checkedKeysSet.has(node.key));
+    },
+    popoverComputedWidth() {
+      if (this.popoverWidth === 'auto') {
+        return this.triggerElRect ? this.triggerElRect.width : 300;
+      }
+      return parseInt(this.popoverWidth, 10);
+    },
+    totalHeight() {
+      return this.visibleNodes.length * this.itemHeight;
+    },
+    offsetY() {
+      return this.startIndex * this.itemHeight;
+    },
+    visibleNodes() {
+      let nodes = this.flattenedNodes;
+      if (this.filterText.trim()) {
+        nodes = this.applyFilter(this.flattenedNodes);
+      }
+
+      const visible = [];
+      for (const node of nodes) {
+        if (this.isNodeCurrentlyVisible(node)) {
+          visible.push(node);
+        }
+      }
+      return visible;
+    },
+    visibleItems() {
+      const items = this.visibleNodes.slice(this.startIndex, this.endIndex);
+      return items.map(node => ({
+        ...node,
+        expanded: this.expandedKeysSet.has(node.key)
+      }));
+    },
+    // Actual count of selected leaf items
+    displaySelectedCount() {
+      let leafCount = 0;
+      this.checkedKeysSet.forEach(key => {
+        const node = this.nodeMap.get(key);
+        if (node && node.isLeaf) {
+          leafCount++;
+        }
+      });
+      return leafCount;
+    },
+    displaySelectedNodes() {
+      if (!this.multiple) return [];
+      const resultNodes = [];
+      Array.from(this.checkedKeysSet)
+        .map(key => this.nodeMap.get(key))
+        .filter(Boolean)
+        .forEach(node => {
+          // Always display tags for leaf nodes that are selected.
+          if (node.isLeaf) {
+            resultNodes.push(node);
+          }
+        });
+      return resultNodes.slice(0, this.maxDisplayTags);
+    },
+    singleSelectedLabel() {
+      if (this.multiple || this.value.length === 0) return '';
+      // 'value' prop should only contain leaf keys due to emitChange modification.
+      // For single select, value should have at most one key.
+      const selectedKey = String(this.value[0]);
+      const node = this.nodeMap.get(selectedKey);
+      // We expect 'value' to contain a leaf key.
+      return node ? node.label : '';
+    },
+    showClearIcon() {
+      return (
+        !this.disabled &&
+        this.inputHovering &&
+        this.displaySelectedCount > 0 && // Based on leaf count now
+        !this.multiple
+      );
+    },
+    // 计算当前搜索结果中的所有叶子节点
+    currentResultLeafNodes() {
+      return this.visibleNodes.filter(node => node.isLeaf && !this.checkboxDisabled(node));
+    },
+    // 判断当前搜索结果是否全部选中
+    isAllCurrentResultsSelected() {
+      const leafNodes = this.currentResultLeafNodes;
+      if (leafNodes.length === 0) return false;
+      return leafNodes.every(node => this.checkedKeysSet.has(node.key));
+    }, // 新增:计算所有可选叶子节点
+    allSelectableLeafNodes() {
+      return this.flattenedNodes.filter(node => node.isLeaf && !this.checkboxDisabled(node));
+    },
+
+    // 新增:判断是否所有数据都被选中
+    isAllDataSelected() {
+      const allLeafNodes = this.allSelectableLeafNodes;
+      if (allLeafNodes.length === 0) return false;
+      return allLeafNodes.every(node => this.checkedKeysSet.has(node.key));
+    }
+  },
+  watch: {
+    rawData: {
+      handler(newData) {
+        this.processRawData(newData);
+        this.syncCheckedKeysFromValue();
+      },
+      immediate: true
+    },
+    value: {
+      handler() {
+        this.syncCheckedKeysFromValue();
+      },
+      deep: true,
+    },
+    filterText: {
+      handler() {
+        this.resetScroll();
+      }
+    },
+    popoverVisible(isVisible) {
+      if (isVisible) {
+        this.$nextTick(() => {
+          this.calculateVisibleRange();
+        });
+      }
+    }
+  },
+  created() {
+    this.handleFilterDebounced = debounce(this.filterTextChange, 300);
+    this.visibleItemCount = Math.ceil(this.treeHeight / this.itemHeight) + 5;
+  },
+  methods: {
+    dateRangeChange(e){
+      this.$emit("dateRangeChange",e)
+    },
+    filterTextChange() {
+      this.resetScroll();
+    },
+    processRawData(data) {
+      if (!Array.isArray(data)) {
+        this.flattenedNodes = [];
+        this.nodeMap.clear();
+        return;
+      }
+
+      const flattened = [];
+      const nodeMap = new Map();
+      const expandedKeys = new Set();
+
+      const processNode = (node, level = 0, parentKey = null) => {
+        const children = node[this.treeProps.children] || [];
+        const hasChildren = children.length > 0;
+        const key = node[this.nodeKey];
+
+        if (key === undefined || key === null) {
+          console.warn('Node lacks a unique key:', node);
+          return;
+        }
+        const strKey = String(key);
+
+        let label = node[this.treeProps.label];
+        if (typeof label !== 'string' || label.trim() === '') {
+          label = node.name || node.title || node.text || `Node-${strKey}`;
+        }
+
+        const nodeDisabledByData = !!node[this.treeProps.disabled];
+
+        const processedNode = {
+          key: strKey,
+          label: String(label).trim(),
+          level,
+          isLeaf: !hasChildren,
+          nodeDisabled: nodeDisabledByData,
+          parentKey: parentKey ? String(parentKey) : null,
+          childrenKeys: hasChildren ? children.map(child => String(child[this.nodeKey])).filter(k => k !== undefined && k !== null) : [],
+          originalData: node,
+          hasChildren
+        };
+
+        flattened.push(processedNode);
+        nodeMap.set(processedNode.key, processedNode);
+
+        if (this.defaultExpandAll && hasChildren && !nodeDisabledByData) {
+          expandedKeys.add(processedNode.key);
+        }
+
+        if (hasChildren) {
+          children.forEach(child => processNode(child, level + 1, strKey));
+        }
+      };
+
+      data.forEach(node => processNode(node));
+
+      this.flattenedNodes = flattened;
+      this.nodeMap = nodeMap;
+      this.expandedKeysSet = new Set(expandedKeys);
+    },
+
+    isNodeCurrentlyVisible(node, currentExpandedSet = this.expandedKeysSet) {
+      if (node.level === 0) return true;
+      let current = node;
+      while (current.parentKey) {
+        const parent = this.nodeMap.get(current.parentKey);
+        if (!parent || !currentExpandedSet.has(parent.key)) {
+          return false;
+        }
+        current = parent;
+      }
+      return true;
+    },
+
+    applyFilter(nodesToFilter) {
+      const searchText = this.filterText.toLowerCase().trim();
+      if (!searchText) return nodesToFilter;
+
+      const matchedNodeKeys = new Set();
+      const newExpandedKeys = new Set(this.expandedKeysSet);
+
+      nodesToFilter.forEach(node => {
+        if (node.label.toLowerCase().includes(searchText)) {
+          matchedNodeKeys.add(node.key);
+          let parentKey = node.parentKey;
+          while (parentKey) {
+            const parentNode = this.nodeMap.get(parentKey);
+            if (parentNode) {
+              newExpandedKeys.add(parentKey);
+              parentKey = parentNode.parentKey;
+            } else {
+              break;
+            }
+          }
+        }
+      });
+
+      const filteredResult = nodesToFilter.filter(node => {
+        return this.hasMatchInSubtreeOrSelf(node, searchText);
+      });
+
+      this.expandedKeysSet = newExpandedKeys;
+      return filteredResult;
+    },
+    hasMatchInSubtreeOrSelf(node, searchText) {
+      if (node.label.toLowerCase().includes(searchText)) {
+        return true;
+      }
+      if (!node.isLeaf) {
+        for (const childKey of node.childrenKeys) {
+          const childNode = this.nodeMap.get(childKey);
+          if (childNode && this.hasMatchInSubtreeOrSelf(childNode, searchText)) {
+            return true;
+          }
+        }
+      }
+      return false;
+    },
+    checkboxDisabled(item) {
+      if (item.nodeDisabled) return true;
+      if (this.checkStrictly && !item.isLeaf && !this.parentSelectable) {
+        return true;
+      }
+      return false;
+    },
+
+    calculateVisibleRange() {
+      const containerHeight = this.treeHeight;
+      const totalItems = this.visibleNodes.length;
+
+      const newStartIndex = Math.floor(this.scrollTop / this.itemHeight);
+      const visibleCountInViewport = Math.ceil(containerHeight / this.itemHeight);
+
+      const buffer = 5;
+      this.startIndex = Math.max(0, newStartIndex - buffer);
+      this.endIndex = Math.min(totalItems, newStartIndex + visibleCountInViewport + buffer);
+    },
+    handleScroll(e) {
+      const newScrollTop = e.target.scrollTop;
+      if (newScrollTop !== this.scrollTop) {
+        this.scrollTop = newScrollTop;
+        if (!this.scrollRAF) {
+          this.scrollRAF = requestAnimationFrame(() => {
+            this.calculateVisibleRange();
+            this.scrollRAF = null;
+          });
+        }
+      }
+    },
+    resetScroll() {
+      this.scrollTop = 0;
+      if (this.$refs.virtualList) {
+        this.$refs.virtualList.scrollTop = 0;
+      }
+      this.$nextTick(() => {
+        this.calculateVisibleRange();
+      });
+    },
+    toggleNodeExpand(node) {
+      if (node.isLeaf || node.nodeDisabled) return;
+      const key = node.key;
+      if (this.expandedKeysSet.has(key)) {
+        this.expandedKeysSet.delete(key);
+      } else {
+        this.expandedKeysSet.add(key);
+      }
+      this.expandedKeysSet = new Set(this.expandedKeysSet);
+      this.$nextTick(() => this.calculateVisibleRange());
+    },
+    handleNodeClick(node) {
+      if (node.nodeDisabled) return;
+
+      if (!node.isLeaf && !this.parentSelectable) {
+        this.toggleNodeExpand(node);
+        return;
+      }
+      if (!node.isLeaf) {
+        this.toggleNodeExpand(node);
+        return;
+      }
+
+      if (!this.checkboxDisabled(node)) {
+        const isCurrentlyChecked = this.checkedKeysSet.has(node.key);
+        this.handleCheckboxChange(node, !isCurrentlyChecked);
+      }
+    },
+    handleCheckboxChange(node, checked) {
+      if (this.checkboxDisabled(node)) return;
+
+      const newCheckedKeys = new Set(this.checkedKeysSet);
+      const canNodeItselfBeInSet = node.isLeaf || this.parentSelectable || !this.checkStrictly;
+
+      if (checked) {
+        if (!this.multiple) {
+          newCheckedKeys.clear();
+        }
+        if (canNodeItselfBeInSet) {
+          newCheckedKeys.add(node.key);
+        }
+        if (!this.checkStrictly) {
+          this.selectAllChildren(node, newCheckedKeys);
+          this.checkParentSelection(node, newCheckedKeys);
+        }
+      } else {
+        if (canNodeItselfBeInSet) {
+          newCheckedKeys.delete(node.key);
+        }
+        if (!this.checkStrictly) {
+          this.unselectAllChildren(node, newCheckedKeys);
+          this.uncheckParentSelection(node, newCheckedKeys);
+        }
+      }
+      this.checkedKeysSet = newCheckedKeys;
+      this.emitChange();
+    },
+    selectAllChildren(node, checkedKeys) {
+      if (node.childrenKeys && node.childrenKeys.length > 0) {
+        node.childrenKeys.forEach(childKey => {
+          const childNode = this.nodeMap.get(childKey);
+          if (childNode && !childNode.nodeDisabled) {
+            const canChildBeInSet = childNode.isLeaf || this.parentSelectable || !this.checkStrictly;
+            if(canChildBeInSet){
+              checkedKeys.add(childKey);
+            }
+            if (!childNode.isLeaf) {
+              this.selectAllChildren(childNode, checkedKeys);
+            }
+          }
+        });
+      }
+    },
+    unselectAllChildren(node, checkedKeys) {
+      if (node.childrenKeys && node.childrenKeys.length > 0) {
+        node.childrenKeys.forEach(childKey => {
+          const childNode = this.nodeMap.get(childKey);
+          if (childNode) {
+            const canChildBeInSet = childNode.isLeaf || this.parentSelectable || !this.checkStrictly;
+            if(canChildBeInSet){
+              checkedKeys.delete(childKey);
+            }
+            if (!childNode.isLeaf) {
+              this.unselectAllChildren(childNode, checkedKeys);
+            }
+          }
+        });
+      }
+    },
+    checkParentSelection(node, checkedKeys) {
+      if (!node.parentKey || this.checkStrictly) return;
+
+      const parentNode = this.nodeMap.get(node.parentKey);
+      if (parentNode && !parentNode.nodeDisabled && (this.parentSelectable || !this.checkStrictly)) {
+        const allChildrenChecked = parentNode.childrenKeys.every(childKey => {
+          const child = this.nodeMap.get(childKey);
+          return !child || child.nodeDisabled || checkedKeys.has(childKey);
+        });
+
+        if (allChildrenChecked) {
+          checkedKeys.add(parentNode.key);
+          this.checkParentSelection(parentNode, checkedKeys);
+        }
+      }
+    },
+    uncheckParentSelection(node, checkedKeys) {
+      if (!node.parentKey || this.checkStrictly) return;
+      const parentNode = this.nodeMap.get(node.parentKey);
+      if (parentNode && (this.parentSelectable || !this.checkStrictly)) {
+        if (checkedKeys.has(parentNode.key)) {
+          checkedKeys.delete(parentNode.key);
+          this.uncheckParentSelection(parentNode, checkedKeys);
+        }
+      }
+    },
+    emitChange() {
+      let finalKeys = [];
+      const currentInternalCheckedKeys = Array.from(this.checkedKeysSet);
+
+      // ALWAYS return only leaf nodes in the emitted value.
+      currentInternalCheckedKeys.forEach(key => {
+        const node = this.nodeMap.get(key);
+        if (node && node.isLeaf) {
+          finalKeys.push(key);
+        }
+      });
+
+      finalKeys = [...new Set(finalKeys)]; // Deduplicate
+      const finalNodes = finalKeys.map(k => this.nodeMap.get(k)).filter(Boolean);
+
+      this.$emit('input', finalKeys);
+      this.$emit('change', finalKeys, finalNodes);
+    },
+    syncCheckedKeysFromValue() {
+      const newCheckedKeys = new Set();
+      if (Array.isArray(this.value)) {
+        this.value.forEach(key => {
+          const strKey = String(key);
+          const node = this.nodeMap.get(strKey);
+          if (node) {
+            newCheckedKeys.add(strKey);
+            if (!node.isLeaf && !this.checkStrictly) {
+              this.selectAllChildren(node, newCheckedKeys);
+              this.checkParentSelection(node, newCheckedKeys);
+            } else if (node.isLeaf && !this.checkStrictly) {
+              this.checkParentSelection(node, newCheckedKeys);
+            }
+          }
+        });
+      }
+      this.checkedKeysSet = newCheckedKeys;
+
+      if(this.popoverVisible) {
+        this.$nextTick(() => this.calculateVisibleRange());
+      }
+    },
+    handleConfirm() {
+      this.emitChange();
+      this.popoverVisible = false;
+    },
+    handleClearInPopover() {
+      this.checkedKeysSet.clear();
+      this.emitChange();
+    },
+    handleClearOnTrigger() {
+      if (this.disabled) return;
+      this.checkedKeysSet.clear();
+      this.emitChange();
+      this.popoverVisible = false;
+    },
+    // 新增:处理全选/取消全选功能
+    handleSelectAllToggle() {
+      if (this.disabled) return;
+
+      const leafNodes = this.targetLeafNodes;
+      if (leafNodes.length === 0) return;
+
+      // 根据当前状态决定是全选还是取消全选
+      const shouldSelect = !this.isCurrentSelectionAll;
+
+      if (!this.multiple && shouldSelect) {
+        // 单选模式下,只选择第一个叶子节点
+        const firstLeaf = leafNodes[0];
+        if (firstLeaf) {
+          this.handleCheckboxChange(firstLeaf, true);
+        }
+        return;
+      }
+
+      const newCheckedKeys = new Set(this.checkedKeysSet);
+
+      leafNodes.forEach(node => {
+        if (this.checkboxDisabled(node)) return;
+
+        if (!this.checkStrictly) {
+          // 如果不是严格模式,需要处理父子节点关系
+          this.handleCheckboxChange(node, shouldSelect);
+        } else {
+          // 严格模式下直接添加或删除
+          if (shouldSelect) {
+            newCheckedKeys.add(node.key);
+          } else {
+            newCheckedKeys.delete(node.key);
+          }
+        }
+      });
+
+      if (this.checkStrictly) {
+        this.checkedKeysSet = newCheckedKeys;
+        this.emitChange();
+      }
+    },
+
+    // 新增:处理下拉菜单选择事件
+    handleSelectAllCommand(command) {
+      this.handleSelectAllToggle(command);
+    },
+    removeTag(nodeToRemove) {
+      if (this.disabled || this.checkboxDisabled(nodeToRemove)) return;
+      // nodeToRemove here will be a leaf node because displaySelectedNodes only gives leaf nodes
+      this.handleCheckboxChange(nodeToRemove, false);
+    },
+    onPopoverShow() {
+      if (this.$refs.popover && this.$refs.popover.$refs.reference) {
+        this.triggerElRect = this.$refs.popover.$refs.reference.getBoundingClientRect();
+      }
+      this.$nextTick(() => {
+        this.resetScroll();
+        if (this.filterable && this.$refs.popover && this.$refs.popover.$el) {
+          const inputEl = this.$refs.popover.$el.querySelector('.filter-input input');
+          if (inputEl) inputEl.focus();
+        }
+      });
+    }
+  },
+  beforeDestroy() {
+    if (this.updateTimer) clearTimeout(this.updateTimer);
+    if (this.scrollRAF) cancelAnimationFrame(this.scrollRAF);
+  }
+};
+</script>
+
+<style scoped>
+.task-select-tree {
+  display: inline-block;
+  position: relative;
+  font-size: 14px;
+}
+
+.select-trigger-wrapper {
+  background-color: #fff;
+  border-radius: 4px;
+  border: 1px solid #dcdfe6;
+  box-sizing: border-box;
+  color: #606266;
+  display: flex;
+  align-items: center;
+  min-height: 32px; /* Element UI default input height */
+  padding: 0 30px 0 10px;
+  position: relative;
+  transition: border-color .2s cubic-bezier(.645,.045,.355,1);
+  width: 100%;
+  cursor: pointer;
+  overflow: hidden; /* To contain tags */
+}
+
+.select-trigger-wrapper.is-disabled {
+  background-color: #f5f7fa;
+  border-color: #e4e7ed;
+  color: #c0c4cc;
+  cursor: not-allowed;
+}
+
+.select-trigger-wrapper:hover:not(.is-disabled) {
+  border-color: #c0c4cc;
+}
+
+.select-trigger-wrapper.is-active:not(.is-disabled) {
+  border-color: #409eff;
+}
+
+.tags-or-value-container {
+  flex-grow: 1;
+  display: flex;
+  flex-wrap: wrap; /* Allow tags to wrap */
+  gap: 4px; /* Space between tags */
+  align-items: center;
+  overflow: hidden; /* Hide overflowed tags/text */
+  padding: 2px 0; /* Minimal padding for tags */
+  min-height: 28px; /* Ensure container has some height */
+}
+
+
+.single-value-display,
+.placeholder-text {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  line-height: 28px; /* Align with tags/input field */
+}
+
+.single-value-display {
+  color: #606266;
+}
+
+.placeholder-text {
+  color: #c0c4cc;
+}
+
+.icons-container {
+  position: absolute;
+  right: 8px;
+  top: 50%;
+  transform: translateY(-50%);
+  display: flex;
+  align-items: center;
+  color: #c0c4cc;
+  height: 100%;
+}
+
+.clear-icon {
+  cursor: pointer;
+  margin-right: 5px;
+  display: none; /* Hidden by default */
+  font-size: 14px;
+}
+
+.select-trigger-wrapper:hover .clear-icon {
+  display: inline-block; /* Show on hover */
+}
+.select-trigger-wrapper.is-disabled .clear-icon {
+  display: none !important; /* Never show if component is disabled */
+}
+
+
+.arrow-icon {
+  transition: transform .3s;
+  font-size: 14px;
+}
+
+.arrow-icon.is-reverse {
+  transform: rotate(180deg);
+}
+
+.tree-container {
+  border: 1px solid #ebeef5;
+  border-radius: 4px;
+  background-color: #fff;
+  margin-top: 8px; /* If filter input is present */
+}
+
+.virtual-tree-list {
+  position: relative; /* For absolute positioning of virtual-content if needed */
+}
+
+.virtual-content {
+  width: 100%; /* Ensure full width */
+}
+
+.virtual-tree-node {
+  box-sizing: border-box;
+  cursor: pointer;
+  user-select: none;
+  border-bottom: 1px solid #f5f7fa; /* Lighter border */
+  transition: background-color 0.2s;
+  min-height: 36px; /* Ensure consistency with itemHeight */
+}
+.virtual-tree-node:last-child {
+  border-bottom: none;
+}
+
+.virtual-tree-node:hover:not(.is-disabled) {
+  background-color: #f5f7fa;
+}
+
+.virtual-tree-node.is-checked:not(.is-disabled) {
+  /* color: #409eff; */
+}
+.virtual-tree-node.is-checked .node-label {
+  /* font-weight: bold; */
+}
+
+
+.virtual-tree-node.is-disabled {
+  color: #c0c4cc;
+  cursor: not-allowed;
+  background-color: #f5f7fa;
+}
+.virtual-tree-node.is-disabled .node-label {
+  color: #c0c4cc;
+}
+
+
+.node-expand-container {
+  width: 20px;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-shrink: 0;
+}
+
+.node-expand-icon {
+  cursor: pointer;
+  color: #c0c4cc;
+  transition: transform 0.2s, color 0.2s;
+  font-size: 12px;
+}
+
+.node-expand-icon:hover {
+  color: #409eff;
+}
+
+.node-expand-placeholder {
+  width: 12px;
+  height: 12px;
+  display: block;
+}
+
+
+.node-checkbox {
+  margin: 0 8px 0 4px;
+  flex-shrink: 0;
+}
+
+.node-label {
+  flex: 1;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  line-height: 1.4;
+  font-weight: normal;
+  padding-right: 5px;
+}
+
+.node-detail-text {
+  font-size: 12px;
+  color: #909399;
+  margin-left: 8px;
+  flex-shrink: 0;
+  white-space: nowrap;
+}
+
+.popover-content-wrapper {
+  max-width: 100%;
+}
+
+.popover-footer {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding-top: 10px;
+  border-top: 1px solid #ebeef5;
+  margin-top: 10px;
+}
+
+.selected-count {
+  font-size: 12px;
+  color: #909399;
+}
+
+.filter-input {
+  margin-bottom: 8px;
+}
+
+.trigger-tag {
+  margin: 1px 0;
+  max-width: 150px;
+}
+
+.trigger-tag >>> .el-tag__content {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+</style>
+
+<style>
+/* Global styles for popper, if needed */
+.task-select-tree-popper.el-popover {
+  padding: 12px;
+}
+
+.task-select-tree-popper .el-checkbox__input.is-disabled .el-checkbox__inner {
+  background-color: #edf2fc;
+  border-color: #dcdfe6;
+  cursor: not-allowed;
+}
+
+.task-select-tree-popper .el-checkbox__input.is-checked .el-checkbox__inner {
+  background-color: #409eff;
+  border-color: #409eff;
+}
+.task-select-tree-popper .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
+  background-color: #f2f6fc;
+  border-color: #dcdfe6;
+}
+</style>

+ 1049 - 0
src/components/TreeSelect/index.vue

@@ -0,0 +1,1049 @@
+<template>
+  <div class="task-select-tree" :style="{ width: componentWidth }">
+    <el-popover
+      ref="popover"
+      placement="bottom-start"
+      :width="popoverComputedWidth"
+      trigger="click"
+      v-model="popoverVisible"
+      popper-class="task-select-tree-popper"
+      :disabled="disabled"
+      @show="onPopoverShow"
+    >
+      <div class="popover-content-wrapper">
+        <el-input
+          v-if="filterable"
+          placeholder="输入关键字过滤"
+          v-model="filterText"
+          size="mini"
+          clearable
+          class="filter-input"
+          @input="handleFilterDebounced"
+        >
+        </el-input>
+
+        <div class="tree-container" :style="{ height: treeHeight + 'px' }">
+          <div
+            ref="virtualList"
+            class="virtual-tree-list"
+            @scroll="handleScroll"
+            :style="{ height: treeHeight + 'px', overflow: 'auto' }"
+          >
+            <div
+              class="virtual-content"
+              :style="{
+                height: totalHeight + 'px',
+                position: 'relative',
+                paddingTop: offsetY + 'px'
+              }"
+            >
+              <div
+                v-for="(item, index) in visibleItems"
+                :key="`${item.key}-${item.level}-${index}`"
+                :style="{
+                  height: itemHeight + 'px',
+                  paddingLeft: (item.level * indentSize) + 'px',
+                  display: 'flex',
+                  alignItems: 'center',
+                  position: 'relative'
+                }"
+                :class="[
+                  'virtual-tree-node',
+                  {
+                    'is-leaf': item.isLeaf,
+                    'is-checked': checkedKeysSet.has(item.key) && (item.isLeaf || parentSelectable || !checkStrictly),
+                    'is-disabled': item.nodeDisabled || checkboxDisabled(item) // Combined disabled state for row styling
+                  }
+                ]"
+                @click="handleNodeClick(item)"
+              >
+                <div class="node-expand-container">
+                  <i
+                    v-if="!item.isLeaf"
+                    :class="[
+                      'node-expand-icon',
+                      item.expanded ? 'el-icon-caret-bottom' : 'el-icon-caret-right'
+                    ]"
+                    @click.stop="toggleNodeExpand(item)"
+                  ></i>
+                  <span v-else class="node-expand-placeholder"></span>
+                </div>
+
+                <el-checkbox
+                  :value="checkedKeysSet.has(item.key)"
+                  :disabled="checkboxDisabled(item)"
+                  @change="handleCheckboxChange(item, $event)"
+                  @click.stop
+                  class="node-checkbox"
+                ></el-checkbox>
+
+                <span class="node-label" :title="item.label">{{ item.label }}</span>
+
+                <span v-if="item.isLeaf && showNodeDetail" class="node-detail-text">
+                  (ID: {{ item.originalData.qwUserId || item.originalData.id }}{{ item.originalData.taskExecDate ? ' ' + item.originalData.taskExecDate : '' }})
+                </span>
+              </div>
+            </div>
+          </div>
+        </div>
+
+        <div class="popover-footer">
+          <span class="selected-count">已选择: {{ displaySelectedCount }}</span>
+          <el-button size="mini" @click="handleClearInPopover">清空</el-button>
+          <el-button
+            size="mini"
+            :type="isAllCurrentResultsSelected ? 'warning' : 'info'"
+            @click="handleSelectAllToggle"
+          >
+            {{ isAllCurrentResultsSelected ? '取消全选' : '全选' }}
+          </el-button>
+          <el-button type="primary" size="mini" @click="handleConfirm">确定</el-button>
+        </div>
+      </div>
+
+      <div
+        slot="reference"
+        :class="['select-trigger-wrapper', { 'is-disabled': disabled, 'is-active': popoverVisible }]"
+        @mouseenter="inputHovering = true"
+        @mouseleave="inputHovering = false"
+      >
+        <div class="tags-or-value-container">
+          <template v-if="multiple && displaySelectedNodes.length > 0">
+            <el-tag
+              v-for="node in displaySelectedNodes"
+              :key="node.key"
+              type="info"
+              size="small"
+              closable
+              :disable-transitions="true"
+              @close.stop="removeTag(node)"
+              class="trigger-tag"
+            >
+              {{ node.label }}
+            </el-tag>
+            <el-tag
+              v-if="displaySelectedCount > maxDisplayTags && displaySelectedNodes.length === maxDisplayTags"
+              type="info"
+              size="small"
+              class="trigger-tag"
+            >
+              + {{ displaySelectedCount - maxDisplayTags }}
+            </el-tag>
+          </template>
+          <span v-else-if="!multiple && displaySelectedCount > 0" class="single-value-display">
+            {{ singleSelectedLabel }}
+          </span>
+          <span v-else class="placeholder-text">{{ placeholder }}</span>
+        </div>
+
+        <span class="icons-container">
+          <i
+            v-if="showClearIcon"
+            class="el-icon-circle-close clear-icon"
+            @click.stop="handleClearOnTrigger"
+          ></i>
+          <i :class="['el-icon-arrow-up', 'arrow-icon', { 'is-reverse': !popoverVisible }]"></i>
+        </span>
+      </div>
+    </el-popover>
+  </div>
+</template>
+
+<script>
+// 防抖函数
+function debounce(func, wait) {
+  let timeout;
+  return function executedFunction(...args) {
+    const later = () => {
+      clearTimeout(timeout);
+      func(...args);
+    };
+    clearTimeout(timeout);
+    timeout = setTimeout(later, wait);
+  };
+}
+
+export default {
+  name: 'OptimizedSelectTree',
+  props: {
+    value: {
+      type: Array,
+      default: () => []
+    },
+    rawData: {
+      type: Array,
+      required: true
+    },
+    placeholder: {
+      type: String,
+      default: '请选择'
+    },
+    multiple: {
+      type: Boolean,
+      default: false
+    },
+    disabled: { // Global disabled for the component
+      type: Boolean,
+      default: false
+    },
+    checkStrictly: {
+      type: Boolean,
+      default: false // Important for parent-child linkage
+    },
+    filterable: {
+      type: Boolean,
+      default: true
+    },
+    maxDisplayTags: {
+      type: Number,
+      default: 2
+    },
+    componentWidth: {
+      type: String,
+      default: '100%'
+    },
+    popoverWidth: {
+      type: [String, Number],
+      default: 'auto'
+    },
+    treeProps: {
+      type: Object,
+      default: () => ({
+        children: 'children',
+        label: 'label',
+        isLeaf: 'isLeaf',
+        disabled: 'disabled' // Key for disabled state in rawData
+      })
+    },
+    nodeKey: {
+      type: String,
+      default: 'id'
+    },
+    defaultExpandAll: {
+      type: Boolean,
+      default: false
+    },
+    showNodeDetail: {
+      type: Boolean,
+      default: true
+    },
+    treeHeight: {
+      type: Number,
+      default: 280
+    },
+    returnLeafOnly: {
+      // This prop's effect on output is now overridden.
+      // It might still be used by consumers for other logic if they rely on its original meaning.
+      type: Boolean,
+      default: true
+    },
+    parentSelectable: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      popoverVisible: false,
+      filterText: '',
+      inputHovering: false,
+      triggerElRect: null,
+      itemHeight: 36,
+      indentSize: 24,
+      startIndex: 0,
+      endIndex: 0,
+      scrollTop: 0,
+      visibleItemCount: 0,
+      flattenedNodes: [],
+      nodeMap: new Map(),
+      checkedKeysSet: new Set(),
+      expandedKeysSet: new Set(),
+      updateTimer: null
+    };
+  },
+  computed: {
+    popoverComputedWidth() {
+      if (this.popoverWidth === 'auto') {
+        return this.triggerElRect ? this.triggerElRect.width : 300;
+      }
+      return parseInt(this.popoverWidth, 10);
+    },
+    totalHeight() {
+      return this.visibleNodes.length * this.itemHeight;
+    },
+    offsetY() {
+      return this.startIndex * this.itemHeight;
+    },
+    visibleNodes() {
+      let nodes = this.flattenedNodes;
+      if (this.filterText.trim()) {
+        nodes = this.applyFilter(this.flattenedNodes);
+      }
+
+      const visible = [];
+      for (const node of nodes) {
+        if (this.isNodeCurrentlyVisible(node)) {
+          visible.push(node);
+        }
+      }
+      return visible;
+    },
+    visibleItems() {
+      const items = this.visibleNodes.slice(this.startIndex, this.endIndex);
+      return items.map(node => ({
+        ...node,
+        expanded: this.expandedKeysSet.has(node.key)
+      }));
+    },
+    // Actual count of selected leaf items
+    displaySelectedCount() {
+      let leafCount = 0;
+      this.checkedKeysSet.forEach(key => {
+        const node = this.nodeMap.get(key);
+        if (node && node.isLeaf) {
+          leafCount++;
+        }
+      });
+      return leafCount;
+    },
+    displaySelectedNodes() {
+      if (!this.multiple) return [];
+      const resultNodes = [];
+      Array.from(this.checkedKeysSet)
+        .map(key => this.nodeMap.get(key))
+        .filter(Boolean)
+        .forEach(node => {
+          // Always display tags for leaf nodes that are selected.
+          if (node.isLeaf) {
+            resultNodes.push(node);
+          }
+        });
+      return resultNodes.slice(0, this.maxDisplayTags);
+    },
+    singleSelectedLabel() {
+      if (this.multiple || this.value.length === 0) return '';
+      // 'value' prop should only contain leaf keys due to emitChange modification.
+      // For single select, value should have at most one key.
+      const selectedKey = String(this.value[0]);
+      const node = this.nodeMap.get(selectedKey);
+      // We expect 'value' to contain a leaf key.
+      return node ? node.label : '';
+    },
+    showClearIcon() {
+      return (
+        !this.disabled &&
+        this.inputHovering &&
+        this.displaySelectedCount > 0 && // Based on leaf count now
+        !this.multiple
+      );
+    },
+    // 计算当前搜索结果中的所有叶子节点
+    currentResultLeafNodes() {
+      return this.visibleNodes.filter(node => node.isLeaf && !this.checkboxDisabled(node));
+    },
+    // 判断当前搜索结果是否全部选中
+    isAllCurrentResultsSelected() {
+      const leafNodes = this.currentResultLeafNodes;
+      if (leafNodes.length === 0) return false;
+      return leafNodes.every(node => this.checkedKeysSet.has(node.key));
+    }
+  },
+  watch: {
+    rawData: {
+      handler(newData) {
+        this.processRawData(newData);
+        this.syncCheckedKeysFromValue();
+      },
+      immediate: true
+    },
+    value: {
+      handler() {
+        this.syncCheckedKeysFromValue();
+      },
+      deep: true,
+    },
+    filterText: {
+      handler() {
+        this.resetScroll();
+      }
+    },
+    popoverVisible(isVisible) {
+      if (isVisible) {
+        this.$nextTick(() => {
+          this.calculateVisibleRange();
+        });
+      }
+    }
+  },
+  created() {
+    this.handleFilterDebounced = debounce(this.filterTextChange, 300);
+    this.visibleItemCount = Math.ceil(this.treeHeight / this.itemHeight) + 5;
+  },
+  methods: {
+    filterTextChange() {
+      this.resetScroll();
+    },
+    processRawData(data) {
+      if (!Array.isArray(data)) {
+        this.flattenedNodes = [];
+        this.nodeMap.clear();
+        return;
+      }
+
+      const flattened = [];
+      const nodeMap = new Map();
+      const expandedKeys = new Set();
+
+      const processNode = (node, level = 0, parentKey = null) => {
+        const children = node[this.treeProps.children] || [];
+        const hasChildren = children.length > 0;
+        const key = node[this.nodeKey];
+
+        if (key === undefined || key === null) {
+          console.warn('Node lacks a unique key:', node);
+          return;
+        }
+        const strKey = String(key);
+
+        let label = node[this.treeProps.label];
+        if (typeof label !== 'string' || label.trim() === '') {
+          label = node.name || node.title || node.text || `Node-${strKey}`;
+        }
+
+        const nodeDisabledByData = !!node[this.treeProps.disabled];
+
+        const processedNode = {
+          key: strKey,
+          label: String(label).trim(),
+          level,
+          isLeaf: !hasChildren,
+          nodeDisabled: nodeDisabledByData,
+          parentKey: parentKey ? String(parentKey) : null,
+          childrenKeys: hasChildren ? children.map(child => String(child[this.nodeKey])).filter(k => k !== undefined && k !== null) : [],
+          originalData: node,
+          hasChildren
+        };
+
+        flattened.push(processedNode);
+        nodeMap.set(processedNode.key, processedNode);
+
+        if (this.defaultExpandAll && hasChildren && !nodeDisabledByData) {
+          expandedKeys.add(processedNode.key);
+        }
+
+        if (hasChildren) {
+          children.forEach(child => processNode(child, level + 1, strKey));
+        }
+      };
+
+      data.forEach(node => processNode(node));
+
+      this.flattenedNodes = flattened;
+      this.nodeMap = nodeMap;
+      this.expandedKeysSet = new Set(expandedKeys);
+    },
+
+    isNodeCurrentlyVisible(node, currentExpandedSet = this.expandedKeysSet) {
+      if (node.level === 0) return true;
+      let current = node;
+      while (current.parentKey) {
+        const parent = this.nodeMap.get(current.parentKey);
+        if (!parent || !currentExpandedSet.has(parent.key)) {
+          return false;
+        }
+        current = parent;
+      }
+      return true;
+    },
+
+    applyFilter(nodesToFilter) {
+      const searchText = this.filterText.toLowerCase().trim();
+      if (!searchText) return nodesToFilter;
+
+      const matchedNodeKeys = new Set();
+      const newExpandedKeys = new Set(this.expandedKeysSet);
+
+      nodesToFilter.forEach(node => {
+        if (node.label.toLowerCase().includes(searchText)) {
+          matchedNodeKeys.add(node.key);
+          let parentKey = node.parentKey;
+          while (parentKey) {
+            const parentNode = this.nodeMap.get(parentKey);
+            if (parentNode) {
+              newExpandedKeys.add(parentKey);
+              parentKey = parentNode.parentKey;
+            } else {
+              break;
+            }
+          }
+        }
+      });
+
+      const filteredResult = nodesToFilter.filter(node => {
+        return this.hasMatchInSubtreeOrSelf(node, searchText);
+      });
+
+      this.expandedKeysSet = newExpandedKeys;
+      return filteredResult;
+    },
+    hasMatchInSubtreeOrSelf(node, searchText) {
+      if (node.label.toLowerCase().includes(searchText)) {
+        return true;
+      }
+      if (!node.isLeaf) {
+        for (const childKey of node.childrenKeys) {
+          const childNode = this.nodeMap.get(childKey);
+          if (childNode && this.hasMatchInSubtreeOrSelf(childNode, searchText)) {
+            return true;
+          }
+        }
+      }
+      return false;
+    },
+    checkboxDisabled(item) {
+      if (item.nodeDisabled) return true;
+      if (this.checkStrictly && !item.isLeaf && !this.parentSelectable) {
+        return true;
+      }
+      return false;
+    },
+
+    calculateVisibleRange() {
+      const containerHeight = this.treeHeight;
+      const totalItems = this.visibleNodes.length;
+
+      const newStartIndex = Math.floor(this.scrollTop / this.itemHeight);
+      const visibleCountInViewport = Math.ceil(containerHeight / this.itemHeight);
+
+      const buffer = 5;
+      this.startIndex = Math.max(0, newStartIndex - buffer);
+      this.endIndex = Math.min(totalItems, newStartIndex + visibleCountInViewport + buffer);
+    },
+    handleScroll(e) {
+      const newScrollTop = e.target.scrollTop;
+      if (newScrollTop !== this.scrollTop) {
+        this.scrollTop = newScrollTop;
+        if (!this.scrollRAF) {
+          this.scrollRAF = requestAnimationFrame(() => {
+            this.calculateVisibleRange();
+            this.scrollRAF = null;
+          });
+        }
+      }
+    },
+    resetScroll() {
+      this.scrollTop = 0;
+      if (this.$refs.virtualList) {
+        this.$refs.virtualList.scrollTop = 0;
+      }
+      this.$nextTick(() => {
+        this.calculateVisibleRange();
+      });
+    },
+    toggleNodeExpand(node) {
+      if (node.isLeaf || node.nodeDisabled) return;
+      const key = node.key;
+      if (this.expandedKeysSet.has(key)) {
+        this.expandedKeysSet.delete(key);
+      } else {
+        this.expandedKeysSet.add(key);
+      }
+      this.expandedKeysSet = new Set(this.expandedKeysSet);
+      this.$nextTick(() => this.calculateVisibleRange());
+    },
+    handleNodeClick(node) {
+      if (node.nodeDisabled) return;
+
+      if (!node.isLeaf && !this.parentSelectable) {
+        this.toggleNodeExpand(node);
+        return;
+      }
+      if (!node.isLeaf) {
+        this.toggleNodeExpand(node);
+        return;
+      }
+
+      if (!this.checkboxDisabled(node)) {
+        const isCurrentlyChecked = this.checkedKeysSet.has(node.key);
+        this.handleCheckboxChange(node, !isCurrentlyChecked);
+      }
+    },
+    handleCheckboxChange(node, checked) {
+      if (this.checkboxDisabled(node)) return;
+
+      const newCheckedKeys = new Set(this.checkedKeysSet);
+      const canNodeItselfBeInSet = node.isLeaf || this.parentSelectable || !this.checkStrictly;
+
+      if (checked) {
+        if (!this.multiple) {
+          newCheckedKeys.clear();
+        }
+        if (canNodeItselfBeInSet) {
+          newCheckedKeys.add(node.key);
+        }
+        if (!this.checkStrictly) {
+          this.selectAllChildren(node, newCheckedKeys);
+          this.checkParentSelection(node, newCheckedKeys);
+        }
+      } else {
+        if (canNodeItselfBeInSet) {
+          newCheckedKeys.delete(node.key);
+        }
+        if (!this.checkStrictly) {
+          this.unselectAllChildren(node, newCheckedKeys);
+          this.uncheckParentSelection(node, newCheckedKeys);
+        }
+      }
+      this.checkedKeysSet = newCheckedKeys;
+      this.emitChange();
+    },
+    selectAllChildren(node, checkedKeys) {
+      if (node.childrenKeys && node.childrenKeys.length > 0) {
+        node.childrenKeys.forEach(childKey => {
+          const childNode = this.nodeMap.get(childKey);
+          if (childNode && !childNode.nodeDisabled) {
+            const canChildBeInSet = childNode.isLeaf || this.parentSelectable || !this.checkStrictly;
+            if(canChildBeInSet){
+              checkedKeys.add(childKey);
+            }
+            if (!childNode.isLeaf) {
+              this.selectAllChildren(childNode, checkedKeys);
+            }
+          }
+        });
+      }
+    },
+    unselectAllChildren(node, checkedKeys) {
+      if (node.childrenKeys && node.childrenKeys.length > 0) {
+        node.childrenKeys.forEach(childKey => {
+          const childNode = this.nodeMap.get(childKey);
+          if (childNode) {
+            const canChildBeInSet = childNode.isLeaf || this.parentSelectable || !this.checkStrictly;
+            if(canChildBeInSet){
+              checkedKeys.delete(childKey);
+            }
+            if (!childNode.isLeaf) {
+              this.unselectAllChildren(childNode, checkedKeys);
+            }
+          }
+        });
+      }
+    },
+    checkParentSelection(node, checkedKeys) {
+      if (!node.parentKey || this.checkStrictly) return;
+
+      const parentNode = this.nodeMap.get(node.parentKey);
+      if (parentNode && !parentNode.nodeDisabled && (this.parentSelectable || !this.checkStrictly)) {
+        const allChildrenChecked = parentNode.childrenKeys.every(childKey => {
+          const child = this.nodeMap.get(childKey);
+          return !child || child.nodeDisabled || checkedKeys.has(childKey);
+        });
+
+        if (allChildrenChecked) {
+          checkedKeys.add(parentNode.key);
+          this.checkParentSelection(parentNode, checkedKeys);
+        }
+      }
+    },
+    uncheckParentSelection(node, checkedKeys) {
+      if (!node.parentKey || this.checkStrictly) return;
+      const parentNode = this.nodeMap.get(node.parentKey);
+      if (parentNode && (this.parentSelectable || !this.checkStrictly)) {
+        if (checkedKeys.has(parentNode.key)) {
+          checkedKeys.delete(parentNode.key);
+          this.uncheckParentSelection(parentNode, checkedKeys);
+        }
+      }
+    },
+    emitChange() {
+      let finalKeys = [];
+      const currentInternalCheckedKeys = Array.from(this.checkedKeysSet);
+
+      // ALWAYS return only leaf nodes in the emitted value.
+      currentInternalCheckedKeys.forEach(key => {
+        const node = this.nodeMap.get(key);
+        if (node && node.isLeaf) {
+          finalKeys.push(key);
+        }
+      });
+
+      finalKeys = [...new Set(finalKeys)]; // Deduplicate
+      const finalNodes = finalKeys.map(k => this.nodeMap.get(k)).filter(Boolean);
+
+      this.$emit('input', finalKeys);
+      this.$emit('change', finalKeys, finalNodes);
+    },
+    syncCheckedKeysFromValue() {
+      const newCheckedKeys = new Set();
+      if (Array.isArray(this.value)) {
+        this.value.forEach(key => {
+          const strKey = String(key);
+          const node = this.nodeMap.get(strKey);
+          if (node) {
+            // Value should ideally contain leaf keys if controlled by this component.
+            // If an external value has a parent key, handle it for internal consistency.
+            newCheckedKeys.add(strKey);
+            if (!node.isLeaf && !this.checkStrictly) {
+              this.selectAllChildren(node, newCheckedKeys);
+              this.checkParentSelection(node, newCheckedKeys);
+            } else if (node.isLeaf && !this.checkStrictly) {
+              // If a leaf is added from value, ensure its parent's state is updated
+              this.checkParentSelection(node, newCheckedKeys);
+            }
+          }
+        });
+      }
+      this.checkedKeysSet = newCheckedKeys;
+
+      if(this.popoverVisible) {
+        this.$nextTick(() => this.calculateVisibleRange());
+      }
+    },
+    handleConfirm() {
+      this.emitChange(); // emitChange now handles filtering for leaf nodes
+      this.popoverVisible = false;
+    },
+    handleClearInPopover() {
+      this.checkedKeysSet.clear();
+      this.emitChange();
+    },
+    handleClearOnTrigger() {
+      if (this.disabled) return;
+      this.checkedKeysSet.clear();
+      this.emitChange();
+      this.popoverVisible = false;
+    },
+    // 新增:处理全选/取消全选功能
+    handleSelectAllToggle() {
+      if (this.disabled) return;
+
+      const leafNodes = this.currentResultLeafNodes;
+      if (leafNodes.length === 0) return;
+
+      const newCheckedKeys = new Set(this.checkedKeysSet);
+
+      if (this.isAllCurrentResultsSelected) {
+        // 取消全选:移除当前搜索结果中的所有叶子节点
+        leafNodes.forEach(node => {
+          if (!this.checkStrictly) {
+            // 如果不是严格模式,需要处理父子节点关系
+            this.handleCheckboxChange(node, false);
+          } else {
+            // 严格模式下直接移除
+            newCheckedKeys.delete(node.key);
+          }
+        });
+
+        if (this.checkStrictly) {
+          this.checkedKeysSet = newCheckedKeys;
+          this.emitChange();
+        }
+      } else {
+        // 全选:选择当前搜索结果中的所有叶子节点
+        if (!this.multiple) {
+          // 单选模式下,只选择第一个叶子节点
+          const firstLeaf = leafNodes[0];
+          if (firstLeaf) {
+            this.handleCheckboxChange(firstLeaf, true);
+          }
+        } else {
+          // 多选模式下,选择所有叶子节点
+          leafNodes.forEach(node => {
+            if (!this.checkStrictly) {
+              // 如果不是严格模式,需要处理父子节点关系
+              if (!this.checkedKeysSet.has(node.key)) {
+                this.handleCheckboxChange(node, true);
+              }
+            } else {
+              // 严格模式下直接添加
+              newCheckedKeys.add(node.key);
+            }
+          });
+
+          if (this.checkStrictly) {
+            this.checkedKeysSet = newCheckedKeys;
+            this.emitChange();
+          }
+        }
+      }
+    },
+    removeTag(nodeToRemove) {
+      if (this.disabled || this.checkboxDisabled(nodeToRemove)) return;
+      // nodeToRemove here will be a leaf node because displaySelectedNodes only gives leaf nodes
+      this.handleCheckboxChange(nodeToRemove, false);
+    },
+    onPopoverShow() {
+      if (this.$refs.popover && this.$refs.popover.$refs.reference) {
+        this.triggerElRect = this.$refs.popover.$refs.reference.getBoundingClientRect();
+      }
+      this.$nextTick(() => {
+        this.resetScroll();
+        if (this.filterable && this.$refs.popover && this.$refs.popover.$el) {
+          const inputEl = this.$refs.popover.$el.querySelector('.filter-input input');
+          if (inputEl) inputEl.focus();
+        }
+      });
+    }
+  },
+  beforeDestroy() {
+    if (this.updateTimer) clearTimeout(this.updateTimer);
+    if (this.scrollRAF) cancelAnimationFrame(this.scrollRAF);
+  }
+};
+</script>
+
+<style scoped>
+.task-select-tree {
+  display: inline-block;
+  position: relative;
+  font-size: 14px;
+}
+
+.select-trigger-wrapper {
+  background-color: #fff;
+  border-radius: 4px;
+  border: 1px solid #dcdfe6;
+  box-sizing: border-box;
+  color: #606266;
+  display: flex;
+  align-items: center;
+  min-height: 32px; /* Element UI default input height */
+  padding: 0 30px 0 10px;
+  position: relative;
+  transition: border-color .2s cubic-bezier(.645,.045,.355,1);
+  width: 100%;
+  cursor: pointer;
+  overflow: hidden; /* To contain tags */
+}
+
+.select-trigger-wrapper.is-disabled {
+  background-color: #f5f7fa;
+  border-color: #e4e7ed;
+  color: #c0c4cc;
+  cursor: not-allowed;
+}
+
+.select-trigger-wrapper:hover:not(.is-disabled) {
+  border-color: #c0c4cc;
+}
+
+.select-trigger-wrapper.is-active:not(.is-disabled) {
+  border-color: #409eff;
+}
+
+.tags-or-value-container {
+  flex-grow: 1;
+  display: flex;
+  flex-wrap: wrap; /* Allow tags to wrap */
+  gap: 4px; /* Space between tags */
+  align-items: center;
+  overflow: hidden; /* Hide overflowed tags/text */
+  padding: 2px 0; /* Minimal padding for tags */
+  min-height: 28px; /* Ensure container has some height */
+}
+
+
+.single-value-display,
+.placeholder-text {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  line-height: 28px; /* Align with tags/input field */
+}
+
+.single-value-display {
+  color: #606266;
+}
+
+.placeholder-text {
+  color: #c0c4cc;
+}
+
+.icons-container {
+  position: absolute;
+  right: 8px;
+  top: 50%;
+  transform: translateY(-50%);
+  display: flex;
+  align-items: center;
+  color: #c0c4cc;
+  height: 100%;
+}
+
+.clear-icon {
+  cursor: pointer;
+  margin-right: 5px;
+  display: none; /* Hidden by default */
+  font-size: 14px;
+}
+
+.select-trigger-wrapper:hover .clear-icon {
+  display: inline-block; /* Show on hover */
+}
+.select-trigger-wrapper.is-disabled .clear-icon {
+  display: none !important; /* Never show if component is disabled */
+}
+
+
+.arrow-icon {
+  transition: transform .3s;
+  font-size: 14px;
+}
+
+.arrow-icon.is-reverse {
+  transform: rotate(180deg);
+}
+
+.tree-container {
+  border: 1px solid #ebeef5;
+  border-radius: 4px;
+  background-color: #fff;
+  margin-top: 8px; /* If filter input is present */
+}
+
+.virtual-tree-list {
+  position: relative; /* For absolute positioning of virtual-content if needed */
+}
+
+.virtual-content {
+  width: 100%; /* Ensure full width */
+}
+
+.virtual-tree-node {
+  box-sizing: border-box;
+  cursor: pointer;
+  user-select: none;
+  border-bottom: 1px solid #f5f7fa; /* Lighter border */
+  transition: background-color 0.2s;
+  min-height: 36px; /* Ensure consistency with itemHeight */
+}
+.virtual-tree-node:last-child {
+  border-bottom: none;
+}
+
+.virtual-tree-node:hover:not(.is-disabled) {
+  background-color: #f5f7fa;
+}
+
+.virtual-tree-node.is-checked:not(.is-disabled) {
+  /* color: #409eff; */
+}
+.virtual-tree-node.is-checked .node-label {
+  /* font-weight: bold; */
+}
+
+
+.virtual-tree-node.is-disabled {
+  color: #c0c4cc;
+  cursor: not-allowed;
+  background-color: #f5f7fa;
+}
+.virtual-tree-node.is-disabled .node-label {
+  color: #c0c4cc;
+}
+
+
+.node-expand-container {
+  width: 20px;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-shrink: 0;
+}
+
+.node-expand-icon {
+  cursor: pointer;
+  color: #c0c4cc;
+  transition: transform 0.2s, color 0.2s;
+  font-size: 12px;
+}
+
+.node-expand-icon:hover {
+  color: #409eff;
+}
+
+.node-expand-placeholder {
+  width: 12px;
+  height: 12px;
+  display: block;
+}
+
+
+.node-checkbox {
+  margin: 0 8px 0 4px;
+  flex-shrink: 0;
+}
+
+.node-label {
+  flex: 1;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  line-height: 1.4;
+  font-weight: normal;
+  padding-right: 5px;
+}
+
+.node-detail-text {
+  font-size: 12px;
+  color: #909399;
+  margin-left: 8px;
+  flex-shrink: 0;
+  white-space: nowrap;
+}
+
+.popover-content-wrapper {
+  max-width: 100%;
+}
+
+.popover-footer {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding-top: 10px;
+  border-top: 1px solid #ebeef5;
+  margin-top: 10px;
+}
+
+.selected-count {
+  font-size: 12px;
+  color: #909399;
+}
+
+.filter-input {
+  margin-bottom: 8px;
+}
+
+.trigger-tag {
+  margin: 1px 0;
+  max-width: 150px;
+}
+
+.trigger-tag >>> .el-tag__content {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+</style>
+
+<style>
+/* Global styles for popper, if needed */
+.task-select-tree-popper.el-popover {
+  padding: 12px;
+}
+
+.task-select-tree-popper .el-checkbox__input.is-disabled .el-checkbox__inner {
+  background-color: #edf2fc;
+  border-color: #dcdfe6;
+  cursor: not-allowed;
+}
+
+.task-select-tree-popper .el-checkbox__input.is-checked .el-checkbox__inner {
+  background-color: #409eff;
+  border-color: #409eff;
+}
+.task-select-tree-popper .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
+  background-color: #f2f6fc;
+  border-color: #dcdfe6;
+}
+</style>

+ 104 - 50
src/components/VideoUpload/index.vue

@@ -2,49 +2,49 @@
   <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>
+<!--        <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>
+          <el-button v-if="showControl" size="small" type="success" @click="openVideoLibrary">视频库选取</el-button>
           <!-- 线路一 -->
-          <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="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>
+<!--          &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="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="视频播放">
@@ -54,13 +54,13 @@
       <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>
+<!--    <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>-->
+<!--        &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>
@@ -75,6 +75,26 @@
             @keyup.enter.native="handleLibraryQuery"
           />
         </el-form-item>
+        <el-form-item label="类型">
+          <el-select v-model="libraryQueryParams.typeId" @change="changeCateType" placeholder="请选择素材类型" clearable size="small">
+            <el-option
+              v-for="item in typeOptions"
+              :key="item.dictValue"
+              :label="item.dictLabel"
+              :value="item.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="子类型">
+          <el-select v-model="libraryQueryParams.typeSubId" placeholder="请选择素材子类型" clearable size="small">
+            <el-option
+              v-for="item in typeSubOptions"
+              :key="item.dictValue"
+              :label="item.dictLabel"
+              :value="item.dictValue"
+            />
+          </el-select>
+        </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>
@@ -129,6 +149,7 @@ import { uploadObject } from "@/utils/cos.js";
 import { uploadToOBS } from "@/utils/obs.js";
 import Pagination from "@/components/Pagination";
 import { listVideoResource } from '@/api/course/videoResource';
+import { getCateListByPid, getCatePidList } from '@/api/course/userCourseCategory'
 
 export default {
   components: {
@@ -179,6 +200,14 @@ export default {
       type: Number,
       default: 0,
     },
+    isTranscode: {
+      type: Number,
+      default: null,
+    },
+    transcodeFileKey: {
+      type: String,
+      default: "",
+    },
 
     // 使用一个变量控制显示,默认为true显示所有控制项
     showControl: {
@@ -211,10 +240,15 @@ export default {
       libraryList: [],
       selectedVideo: null,
       libraryQueryParams: {
+        isTranscode:1,
         pageNum: 1,
         pageSize: 10,
-        resourceName: null
-      }
+        resourceName: null,
+        typeId: null,
+        typeSubId: null,
+      },
+      typeOptions: [],
+      typeSubOptions: []
     };
   },
   watch: {
@@ -230,9 +264,25 @@ export default {
     // 打开视频库对话框
     openVideoLibrary() {
       this.libraryOpen = true;
+      this.getRootTypeList()
       this.selectedVideo = null;
       this.getLibraryList();
     },
+    getRootTypeList() {
+      getCatePidList().then(response => {
+        this.typeOptions = response.data
+      });
+    },
+    async changeCateType(val) {
+      this.libraryQueryParams.typeSubId = null
+      this.typeSubOptions = []
+      if (!val) {
+        return
+      }
+      await getCateListByPid(val).then(response => {
+        this.typeSubOptions = response.data
+      })
+    },
     handleChange(file, fileList) {
       this.fileList = fileList;
       this.getVideoDuration(file.raw);
@@ -351,7 +401,9 @@ export default {
       this.libraryQueryParams = {
         pageNum: 1,
         pageSize: 10,
-        resourceName: null
+        resourceName: null,
+        typeId: null,
+        typeSubId: null
       };
       this.handleLibraryQuery();
     },
@@ -385,6 +437,8 @@ export default {
       this.$emit("update:fileKey", this.selectedVideo.fileKey);
       this.$emit("update:uploadType", this.selectedVideo.uploadType);
       this.$emit("video-duration", this.selectedVideo.duration);
+      this.$emit("update:isTranscode", this.selectedVideo.isTranscode);
+      this.$emit("update:transcodeFileKey", this.selectedVideo.transcodeFileKey);
 
       // 设置预览URL
       this.$emit("update:videoUrl", this.selectedVideo.videoUrl);

+ 71 - 44
src/layout/components/Sidebar/index.vue

@@ -1,26 +1,27 @@
 <template>
-    <div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
-        <logo v-if="showLogo" :collapse="isCollapse" />
-        <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
-            <el-menu
-                :default-active="activeMenu"
-                :collapse="isCollapse"
-                :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
-                :text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
-                :unique-opened="true"
-                :active-text-color="settings.theme"
-                :collapse-transition="false"
-                mode="vertical"
-            >
-                <sidebar-item
-                    v-for="(route, index) in sidebarRouters"
-                    :key="route.path  + index"
-                    :item="route"
-                    :base-path="route.path"
-                />
-            </el-menu>
-        </el-scrollbar>
-    </div>
+  <div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
+    <logo v-if="showLogo" :collapse="isCollapse" />
+    <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
+      <el-menu
+        :default-active="activeMenu"
+        :collapse="isCollapse"
+        :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
+        :text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
+        :unique-opened="true"
+        :active-text-color="settings.theme"
+        :collapse-transition="false"
+        mode="vertical"
+        class="custom-menu"
+      >
+        <sidebar-item
+          v-for="(route, index) in sidebarRouters"
+          :key="route.path  + index"
+          :item="route"
+          :base-path="route.path"
+        />
+      </el-menu>
+    </el-scrollbar>
+  </div>
 </template>
 
 <script>
@@ -30,28 +31,54 @@ import SidebarItem from "./SidebarItem";
 import variables from "@/assets/styles/variables.scss";
 
 export default {
-    components: { SidebarItem, Logo },
-    computed: {
-        ...mapState(["settings"]),
-        ...mapGetters(["sidebarRouters", "sidebar"]),
-        activeMenu() {
-            const route = this.$route;
-            const { meta, path } = route;
-            // if set path, the sidebar will highlight the path you set
-            if (meta.activeMenu) {
-                return meta.activeMenu;
-            }
-            return path;
-        },
-        showLogo() {
-            return this.$store.state.settings.sidebarLogo;
-        },
-        variables() {
-            return variables;
-        },
-        isCollapse() {
-            return !this.sidebar.opened;
-        }
+  components: { SidebarItem, Logo },
+  computed: {
+    ...mapState(["settings"]),
+    ...mapGetters(["sidebarRouters", "sidebar"]),
+    activeMenu() {
+      const route = this.$route;
+      const { meta, path } = route;
+      // if set path, the sidebar will highlight the path you set
+      if (meta.activeMenu) {
+        return meta.activeMenu;
+      }
+      return path;
+    },
+    showLogo() {
+      return this.$store.state.settings.sidebarLogo;
+    },
+    variables() {
+      return variables;
+    },
+    isCollapse() {
+      return !this.sidebar.opened;
     }
+  }
 };
 </script>
+<style lang="scss" scoped>
+
+
+.custom-menu ::v-deep .el-menu-item{
+  width: 90%;
+  margin: auto;
+}
+//.custom-menu ::v-deep .el-menu-item:hover{
+//  background: linear-gradient(270deg, rgba(29, 141, 245, 0.2) 0%, rgba(29, 141, 245, 0.2) 100%)!important;
+//  width: 90%;
+//  margin: auto;
+//  border-radius: 6px;
+//}
+.custom-menu ::v-deep .el-menu-item.is-active {
+  //background-color: #006CFF!important;
+  color: #F2B680 !important;
+  width: 90%;
+  margin: auto;
+  border-radius: 6px;
+}
+//.custom-menu ::v-deep .el-menu-item.is-active{
+//  background: linear-gradient(270deg, #006CFF 0%, #006CFF 100%)!important;
+//
+//}
+
+</style>

+ 1 - 1
src/store/modules/settings.js

@@ -5,7 +5,7 @@ const { sideTheme, showSettings, topNav, tagsView, fixedHeader, sidebarLogo, dyn
 const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || ''
 const state = {
   title: '',
-  theme: storageSetting.theme || '#409EFF',
+  theme: storageSetting.theme || '#006CFF',
   sideTheme: storageSetting.sideTheme || sideTheme,
   showSettings: showSettings,
   topNav:  storageSetting.topNav === undefined ? topNav : storageSetting.topNav,

+ 329 - 0
src/views/company/companyBindUser/index.vue

@@ -0,0 +1,329 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="域名" prop="domain">
+        <el-input
+          v-model="queryParams.domain"
+          placeholder="请输入域名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="分配人员" prop="userName">
+        <el-input
+          v-model="queryParams.userName"
+          placeholder="请输入分配人员"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="手机号" prop="phonenumber">
+        <el-input
+          v-model="queryParams.phonenumber"
+          placeholder="请输入手机号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="primary"-->
+<!--          plain-->
+<!--          icon="el-icon-plus"-->
+<!--          size="mini"-->
+<!--          @click="handleAdd"-->
+<!--          v-hasPermi="['company:companyBindUser:add']"-->
+<!--        >新增</el-button>-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="success"-->
+<!--          plain-->
+<!--          icon="el-icon-edit"-->
+<!--          size="mini"-->
+<!--          :disabled="single"-->
+<!--          @click="handleUpdate"-->
+<!--          v-hasPermi="['company:companyBindUser:edit']"-->
+<!--        >修改</el-button>-->
+<!--      </el-col>-->
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-connection"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['company:companyBindUser:remove']"
+        >解除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['company:companyBindUser:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table border v-loading="loading" :data="companyBindUserList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="编码" align="center" prop="id" />
+      <el-table-column label="分配域名" align="center" prop="domain" />
+      <el-table-column label="分配人员" align="center" prop="userName" />
+      <el-table-column label="手机号" align="center" prop="phonenumber" />
+      <el-table-column label="分配时间" align="center" prop="createTime" v-slot="{row}">
+        <template>
+          {{ formatDate(row.createTime) }}
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+<!--          <el-button-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            icon="el-icon-edit"-->
+<!--            @click="handleUpdate(scope.row)"-->
+<!--            v-hasPermi="['company:companyBindUser:edit']"-->
+<!--          >修改</el-button>-->
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-connection"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['company:companyBindUser:remove']"
+          >解除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改企业域名分配中间表对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" v-dialog-drag-height="20" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="企业销售id" prop="companyUserId">
+          <el-input v-model="form.companyUserId" placeholder="请输入企业销售id" />
+        </el-form-item>
+        <el-form-item label="中间表id" prop="bindId">
+          <el-input v-model="form.bindId" placeholder="请输入中间表id" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listCompanyBindUser, getCompanyBindUser, delCompanyBindUser, addCompanyBindUser, updateCompanyBindUser, exportCompanyBindUser } from "@/api/company/companyBindUser";
+
+export default {
+  name: "CompanyBindUser",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 企业域名分配中间表表格数据
+      companyBindUserList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        companyUserId: null,
+        bindId: null,
+        domain:null,
+        userName: null,
+        phonenumber: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        companyUserId: [
+          { required: true, message: "企业销售id不能为空", trigger: "blur" }
+        ],
+        bindId: [
+          { required: true, message: "中间表id不能为空", trigger: "blur" }
+        ],
+        createTime: [
+          { required: true, message: "创建时间不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    formatDate(timestamp) {
+      if (!timestamp) return ''
+
+      const date = new Date(timestamp)
+
+      // 自定义日期格式(年-月-日 时:分:秒)
+      const year = date.getFullYear()
+      const month = String(date.getMonth() + 1).padStart(2, '0')
+      const day = String(date.getDate()).padStart(2, '0')
+      const hours = String(date.getHours()).padStart(2, '0')
+      const minutes = String(date.getMinutes()).padStart(2, '0')
+      const seconds = String(date.getSeconds()).padStart(2, '0')
+
+      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
+    },
+    /** 查询企业域名分配中间表列表 */
+    getList() {
+      this.loading = true;
+      listCompanyBindUser(this.queryParams).then(response => {
+        this.companyBindUserList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        companyUserId: null,
+        bindId: null,
+        createTime: null,
+        createBy: null,
+        updateBy: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加企业域名分配中间表";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getCompanyBindUser(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改企业域名分配中间表";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateCompanyBindUser(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addCompanyBindUser(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除企业域名分配中间表编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delCompanyBindUser(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        //触发父组件方法
+        this.$emit('bind-value')
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有企业域名分配中间表数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportCompanyBindUser(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    },
+    //父级触发接口
+    childMethod(domainId) {
+      this.queryParams.bindId = domainId
+      this.getList()
+    }
+  }
+};
+</script>

+ 785 - 0
src/views/company/companyDomain/index.vue

@@ -0,0 +1,785 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="域名" prop="domain">
+        <el-input
+          v-model="queryParams.domain"
+          placeholder="请输入域名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
+          <el-option
+            v-for="item in statusOptions"
+            :key="item.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['company:companyDomain:add']"
+        >新增
+        </el-button>
+      </el-col>
+      <!--      <el-col :span="1.5">-->
+      <!--        <el-button-->
+      <!--          type="success"-->
+      <!--          plain-->
+      <!--          icon="el-icon-edit"-->
+      <!--          size="mini"-->
+      <!--          :disabled="single"-->
+      <!--          @click="handleUpdate"-->
+      <!--          v-hasPermi="['company:companyDomain:edit']"-->
+      <!--        >修改</el-button>-->
+      <!--      </el-col>-->
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['company:companyDomain:remove']"
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['company:companyDomain:export']"
+        >导出
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+        >导入
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-paperclip"
+          size="mini"
+          @click="handleBindingOpen"
+          v-hasPermi="['company:companyDomain:edit']"
+        >批量绑定
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table border v-loading="loading" :data="companyDomainList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="编号" align="center" prop="id"/>
+      <el-table-column label="域名" align="center" prop="domain"/>
+      <el-table-column label="域名绑定企业数量" align="center" prop="bindNum" v-slot="{row}">
+        <el-button
+          type="text"
+          @click="onTableBindNumberClick(row)"
+        >{{ row.bindNum }}
+        </el-button>
+      </el-table-column>
+      <el-table-column label="状态" align="center" prop="status">
+        <template v-slot="scope">
+          <el-tag prop="status" v-for="(item, index) in statusOptions" :key="item.dictValue"
+                  :type="scope.row.status==1?'success':'danger'"
+                  v-if="scope.row.status==item.dictValue"
+          >{{ item.dictLabel }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <!-- 模板同上 -->
+      <el-table-column label="创建时间" align="center" prop="createTime">
+        <template v-slot="{ row }">
+          {{ formatDate(row.createTime) }}
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remark"/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template v-slot="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['company:companyDomain:edit']"
+          >修改
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['company:companyDomain:remove']"
+          >删除
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改域名管路对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="600px" center append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="域名" prop="domain">
+          <el-input v-model="form.domain" placeholder="请输入域名"/>
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
+        </el-form-item>
+        <el-form-item label="状态">
+          <el-radio-group v-model="form.status">
+            <el-radio
+              v-for="item in statusOptions"
+              :key="item.dictValue"
+              :label="item.dictValue"
+            >{{ item.dictLabel }}
+            </el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 批量绑定弹窗 -->
+    <el-dialog title="批量绑定域名" :visible.sync="bindingOpen" width="60%" :before-close="handleClose">
+      <el-scrollbar style="height: 692px;">
+        <h3>选择绑定域名:</h3>
+        <el-divider></el-divider>
+        <el-form :model="dialog.domain.queryParams" ref="dialogQueryForm" :inline="true" v-show="showSearch"
+                 label-width="68px"
+        >
+          <el-form-item label="域名" prop="domain">
+            <el-input
+              v-model="dialog.domain.queryParams.domain"
+              placeholder="请输入域名"
+              clearable
+              size="small"
+              @keyup.enter.native="handleDialogQuery"
+            />
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">搜索</el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="resetDialogQuery">重置</el-button>
+          </el-form-item>
+        </el-form>
+        <el-table border v-loading="dialog.domain.loading" :data="dialog.domain.companyDomainList"
+                  @selection-change="handleDialogSelectionChange"
+        >
+          <el-table-column type="selection" width="55" align="center"/>
+          <el-table-column label="编号" align="center" prop="id"/>
+          <el-table-column label="域名" align="center" prop="domain"/>
+          <el-table-column label="创建时间" align="center" prop="createTime" v-slot="{row}">
+            <template>
+              {{ formatDate(row.createTime) }}
+            </template>
+          </el-table-column>
+          <el-table-column label="备注" align="center" prop="remark"/>
+        </el-table>
+        <el-row :span="24">
+          <el-col :span="3">
+            <span style="margin-top: 100px">已选中绑定域名:{{ dialog.domain.ids.length }}条</span>
+          </el-col>
+          <el-col :span="20">
+            <pagination
+              v-show="dialog.domain.total>0"
+              :total="dialog.domain.total"
+              :page.sync="dialog.domain.queryParams.pageNum"
+              :limit.sync="dialog.domain.queryParams.pageSize"
+              @pagination="getDialogList"
+            />
+          </el-col>
+        </el-row>
+        <el-divider></el-divider>
+        <h3>选择绑定销售公司:</h3>
+        <el-divider></el-divider>
+        <el-form :model="dialog.company.queryParams" ref="companyQueryForm" :inline="true" label-width="68px">
+          <el-form-item label="公司名称" prop="companyName">
+            <el-input
+              style="width: 220px"
+              v-model="dialog.company.queryParams.companyName"
+              placeholder="请输入企业名称"
+              clearable
+              size="small"
+              @keyup.enter.native="companyResetQuery"
+            />
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" icon="el-icon-search" size="mini" @click="companyHandleDialogQuery">搜索
+            </el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="companyResetQuery">重置</el-button>
+          </el-form-item>
+        </el-form>
+        <el-table border v-loading="dialog.company.loading" :data="dialog.company.companyList"
+                  @selection-change="handleCompanySelectionChange"
+        >
+          <el-table-column type="selection" width="55" align="center"/>
+          <el-table-column label="公司名称" align="center" prop="companyName"/>
+          <el-table-column label="类型" align="center" prop="companyType">
+            <template slot-scope="scope">
+              <el-tag prop="companyType" v-for="(item, index) in typeOptions" :key="item.dictLabel"
+                      v-if="scope.row.companyType==item.dictValue"
+              >{{ item.dictLabel }}
+              </el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column label="创建时间" align="center" prop="createTime">
+          </el-table-column>
+        </el-table>
+        <el-row :span="24">
+          <el-col :span="3">
+            <span style="margin-top: 100px">已选中绑定公司:{{ dialog.company.ids.length }}条</span>
+          </el-col>
+          <el-col :span="20">
+            <pagination
+              v-show="dialog.company.total>0"
+              :total="dialog.company.total"
+              :page.sync="dialog.company.queryParams.pageNum"
+              :limit.sync="dialog.company.queryParams.pageSize"
+              @pagination="getCompanyList()"
+            />
+          </el-col>
+        </el-row>
+        <el-divider></el-divider>
+        <el-row>
+          <el-col :span="10" :offset="10">
+            <el-button @click="centerDialogVisible">取 消</el-button>
+            <el-button type="primary" @click="bindSubmission">确 定</el-button>
+          </el-col>
+        </el-row>
+      </el-scrollbar>
+    </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"
+        :on-error="handleUploadError"
+        :before-upload="beforeUpload"
+        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>
+          <div class="el-upload__tip" slot="tip">
+            只能上传.xlsx或.xls文件,且不超过5MB
+          </div>
+          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
+                   @click="exportTemplate"
+          >下载模板
+          </el-link>
+        </div>
+      </el-upload>
+    </el-dialog>
+
+    <!--    企业绑定详情弹窗-->
+    <el-dialog title="域名绑定 - 企业详情弹窗" :visible.sync="bindingDetailsOpen" width="80%"
+               :before-close="handleClose"
+    >
+      <h3>域名 <b class="domainFont">{{ domainName }}</b> 下绑定的企业信息:</h3>
+      <el-scrollbar style="height: 692px;">
+        <el-divider></el-divider>
+        <childDomainBind ref="domainBindRef" @bind-value="getList()" :isPageCall="false"></childDomainBind>
+      </el-scrollbar>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  listCompanyDomain,
+  getCompanyDomain,
+  delCompanyDomain,
+  addCompanyDomain,
+  updateCompanyDomain,
+  exportCompanyDomain,
+  domainBatchBinding,
+  exportTemplate
+} from '@/api/company/companyDomain'
+import { listCompany } from '@/api/company/company'
+import { getToken } from '@/utils/auth'
+import domainBind from '@/views/company/companyDomainBind/index.vue'
+
+export default {
+  name: 'CompanyDomain',
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 域名管路表格数据
+      companyDomainList: [],
+      // 弹出层标题
+      title: '',
+      // 是否显示弹出层
+      open: false,
+      statusOptions: [],
+      //详情弹窗变量
+      bindingDetailsOpen: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        domain: null,
+        status: null
+      },
+      //上传
+      upload: {
+        // 是否显示弹出层
+        open: false,
+        // 弹出层标题
+        title: '',
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: 'Bearer ' + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + '/company/companyDomain/importDomainData'
+      },
+      //绑定弹窗显示变量
+      bindingOpen: false,
+      // 表单参数
+      form: {
+        status: ''
+      },
+      typeOptions: [],
+      // 表单校验
+      rules: {
+        domain: [
+          { required: true, message: '域名不能为空', trigger: 'blur' }
+        ],
+        createTime: [
+          { required: true, message: '创建时间不能为空', trigger: 'blur' }
+        ]
+      },
+      //弹窗变量
+      dialog: {
+        domain: {
+          // 查询参数
+          queryParams: {
+            pageNum: 1,
+            pageSize: 10,
+            domain: null,
+            status: 1
+          },
+          // 遮罩层
+          loading: true,
+          // 域名管路表格数据
+          companyDomainList: [],
+          // 总条数
+          total: 0,
+          //选中数组
+          ids: []
+        },
+        company: {
+          queryParams: {
+            pageNum: 1,
+            pageSize: 10,
+            companyName: null,
+            companyMobile: null,
+            companyAddress: null,
+            status: null,
+            startTime: null,
+            endTime: null,
+            money: null,
+            times: null,
+            voiceApiId: null
+          },
+          // 遮罩层
+          loading: true,
+          // 企业数据
+          companyList: [],
+          // 总条数
+          total: 0,
+          //选中数组
+          ids: []
+        }
+      },
+      //弹窗名称
+      domainName: null,
+      //临时存域名ids
+      domainTemporaryIds: [],
+      //临时存公司ids
+      companyTemporaryIds: []
+    }
+  },
+  components: {
+    'childDomainBind': domainBind
+  },
+  created() {
+    this.getList()
+
+    //字典状态查询
+    this.getDicts('sys_company_status').then((response) => {
+      this.statusOptions = response.data
+    })
+
+    //企业类型
+    this.getDicts('sys_company_type').then((response) => {
+      this.typeOptions = response.data
+    })
+  },
+  methods: {
+    formatDate(timestamp) {
+      if (!timestamp) return ''
+
+      const date = new Date(timestamp)
+
+      // 自定义日期格式(年-月-日 时:分:秒)
+      const year = date.getFullYear()
+      const month = String(date.getMonth() + 1).padStart(2, '0')
+      const day = String(date.getDate()).padStart(2, '0')
+      const hours = String(date.getHours()).padStart(2, '0')
+      const minutes = String(date.getMinutes()).padStart(2, '0')
+      const seconds = String(date.getSeconds()).padStart(2, '0')
+
+      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
+    },
+    /** 查询域名管路列表 */
+    getList() {
+      this.loading = true
+      listCompanyDomain(this.queryParams).then(response => {
+        this.companyDomainList = response.rows
+        this.total = response.total
+        this.loading = false
+      })
+    },
+    /** 查询域名管路列表 */
+    getDialogList() {
+      this.dialog.domain.loading = true
+      listCompanyDomain(this.dialog.domain.queryParams).then(response => {
+        this.dialog.domain.companyDomainList = response.rows
+        this.dialog.domain.total = response.total
+        this.dialog.domain.loading = false
+      })
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false
+      this.reset()
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        domain: null,
+        remark: null,
+        createTime: null,
+        updateTime: null,
+        status: 0,
+        createBy: null,
+        updateBy: null
+      }
+      this.resetForm('form')
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1
+      this.getList()
+    },
+    /** 弹窗搜索按钮操作 */
+    handleDialogQuery() {
+      this.dialog.domain.queryParams.pageNum = 1
+      this.getDialogList()
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm('queryForm')
+      this.handleQuery()
+    },
+    /** 重置按钮操作 */
+    resetDialogQuery() {
+      this.resetForm('dialogQueryForm')
+      this.handleDialogQuery()
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    // 多选框选中数据
+    handleDialogSelectionChange(selection) {
+      this.dialog.domain.ids = selection.map(item => item.id)
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset()
+      this.open = true
+      this.title = '添加域名管路'
+      this.form.status = '1'
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset()
+      const id = row.id || this.ids
+      getCompanyDomain(id).then(response => {
+        this.form = response.data
+        this.form.status = response.data.status === 1 ? '1' : '0'
+        this.open = true
+        this.title = '修改域名管路'
+      })
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs['form'].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateCompanyDomain(this.form).then(response => {
+              this.msgSuccess('修改成功')
+              this.open = false
+              this.getList()
+            })
+          } else {
+            addCompanyDomain(this.form).then(response => {
+              this.msgSuccess('新增成功')
+              this.open = false
+              this.getList()
+            })
+          }
+        }
+      })
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids
+      this.$confirm('是否确认删除域名管路编号为"' + ids + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delCompanyDomain(ids)
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('删除成功')
+      }).catch(() => {
+      })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams
+      this.$confirm('是否确认导出所有域名管路数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.exportLoading = true
+        return exportCompanyDomain(queryParams)
+      }).then(response => {
+        this.download(response.msg)
+        this.exportLoading = false
+      }).catch(() => {
+      })
+    },
+    //处理绑定
+    handleBindingOpen() {
+      this.bindingOpen = !this.bindingOpen
+      this.getDialogList()
+      this.getCompanyList()
+    },
+    //企业重置方法
+    companyResetQuery() {
+      this.$refs['companyQueryForm'].resetFields()
+      this.companyHandleDialogQuery()
+    },
+    companyHandleDialogQuery() {
+      this.dialog.company.queryParams.pageNum = 1
+      this.getCompanyList()
+    },
+    /** 查询企业列表 */
+    getCompanyList() {
+      this.dialog.company.loading = true
+      listCompany(this.dialog.company.queryParams).then(response => {
+        this.dialog.company.companyList = response.rows
+        this.dialog.company.total = response.total
+        this.dialog.company.loading = false
+      })
+    },
+    // 多选框选中数据
+    handleCompanySelectionChange(selection) {
+      this.dialog.company.ids = selection.map(item => item.companyId)
+    },
+    //绑定提交
+    bindSubmission() {
+      if (this.dialog.domain.ids.length === 0) {
+        return this.$message.warning({
+          message: '绑定失败,请选择绑定域名!',
+          duration: 2000
+        })
+      }
+      if (this.dialog.company.ids.length === 0) {
+        return this.$message.warning({
+          message: '绑定失败,请选择绑定公司!',
+          duration: 2000
+        })
+      }
+      this.domainBatchBinding()
+      this.centerDialogVisible()
+    },
+    centerDialogVisible() {
+      this.bindingOpen = false
+      //清空数组
+      this.dialog.domain.ids = []
+      this.dialog.domain.queryParams.domain = null
+      this.dialog.company.ids = []
+      this.dialog.company.queryParams.companyName = null
+    },
+    handleClose(done) {
+      this.$confirm('确认关闭?')
+        .then(_ => {
+          done()
+        })
+        .catch(_ => {
+        })
+    },
+    //批量绑定
+    domainBatchBinding() {
+      let param = {
+        domainIds: this.dialog.domain.ids,
+        companyIds: this.dialog.company.ids
+      }
+      domainBatchBinding(param).then(response => {
+        this.getList()
+        this.msgSuccess(response.msg)
+      })
+    },
+    //导入按钮操作
+    handleImport() {
+      this.upload.title = '导入'
+      this.upload.open = true
+    },
+    // 文件上传前校验
+    beforeUpload(file) {
+      // 校验文件类型
+      const isValidType = ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+        'application/vnd.ms-excel'].includes(file.type)
+
+      // 校验文件扩展名
+      const fileExtension = file.name.split('.').pop().toLowerCase()
+      const isValidExtension = ['xlsx', 'xls'].includes(fileExtension)
+
+      // 校验文件大小 (5MB = 5 * 1024 * 1024 字节)
+      const isValidSize = file.size <= 5 * 1024 * 1024
+
+      if (!isValidType || !isValidExtension) {
+        this.$message.error('请上传Excel文件 (.xlsx 或 .xls)')
+        return false
+      }
+
+      if (!isValidSize) {
+        this.$message.error('文件大小不能超过5MB')
+        return false
+      }
+
+      return true
+    },
+    // 文件上传中处理
+    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()
+    },
+    // 上传失败处理
+    handleUploadError(error, file, fileList) {
+      this.upload.isUploading = false
+      this.upload.message = '上传失败,请重试'
+      this.upload.type = 'error'
+
+      // 处理上传失败后的逻辑
+      console.error('上传失败:', error)
+    },
+    //下载模板
+    exportTemplate() {
+      exportTemplate().then(response => {
+        this.download(response.msg)
+      })
+    },
+    //表单触发方法
+    onTableBindNumberClick(row) {
+      this.domainName = row.domain
+      this.bindingDetailsOpen = true
+      //激活子接口
+      this.$nextTick(() => {
+        this.$refs.domainBindRef.childMethod(row.id)
+      })
+    }
+  }
+}
+</script>
+<style scoped>
+::v-deep .el-radio {
+  margin-right: 24px !important; /* 使用 !important 提高优先级 */
+}
+
+.domainFont {
+  color: #ff0000;
+}
+</style>

+ 675 - 0
src/views/company/companyDomainBind/index.vue

@@ -0,0 +1,675 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="公司名称" prop="companyName">
+        <el-input
+          v-model="queryParams.companyName"
+          placeholder="请输入销售公司名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="域名" prop="domain">
+        <el-input
+          v-model="queryParams.domain"
+          placeholder="请输入域名名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <!--      <el-col :span="1.5">-->
+      <!--        <el-button-->
+      <!--          type="primary"-->
+      <!--          plain-->
+      <!--          icon="el-icon-plus"-->
+      <!--          size="mini"-->
+      <!--          @click="handleAdd"-->
+      <!--          v-hasPermi="['company:companyDomainBind:add']"-->
+      <!--        >新增-->
+      <!--        </el-button>-->
+      <!--      </el-col>-->
+      <!--      <el-col :span="1.5">-->
+      <!--        <el-button-->
+      <!--          type="success"-->
+      <!--          plain-->
+      <!--          icon="el-icon-edit"-->
+      <!--          size="mini"-->
+      <!--          :disabled="single"-->
+      <!--          @click="handleUpdate"-->
+      <!--          v-hasPermi="['company:companyDomainBind:edit']"-->
+      <!--        >修改-->
+      <!--        </el-button>-->
+      <!--      </el-col>-->
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-connection"
+          size="mini"
+          :disabled="multiple"
+          v-show="!checkDisplay"
+          @click="handleDelete"
+          v-hasPermi="['company:companyDomainBind:remove']"
+        >解绑
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          v-show="checkDisplay"
+          @click="handleExport"
+          v-hasPermi="['company:companyDomainBind:export']"
+        >导出
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-paperclip"
+          size="mini"
+          @click="handleBindingOpen"
+        >批量分配销售
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table border v-loading="loading" :data="companyDomainBindList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="编码" align="center" prop="id"/>
+      <el-table-column label="销售公司编号" align="center" prop="companyId"/>
+      <el-table-column label="销售公司名称" align="center" prop="companyName"/>
+      <el-table-column label="绑定域名编号" v-if="checkDisplay" align="center" prop="domainId"/>
+      <el-table-column label="绑定域名" v-if="checkDisplay" align="center" prop="domain"/>
+      <el-table-column label="分配数量" align="center" prop="allocationNum" v-slot="{row}">
+        <el-button
+          type="text"
+          @click="onTableBindNumberClick(row)"
+        >{{ row.allocationNum }}
+        </el-button>
+      </el-table-column>
+      <el-table-column label="绑定时间" align="center" prop="createTime" v-slot="{row}">
+        <template>
+          {{ formatDate(row.createTime) }}
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="!checkDisplay">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-connection"
+            v-show="!checkDisplay"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['company:companyDomainBind:remove']"
+          >解绑
+          </el-button>
+          <!--          <el-button-->
+          <!--            size="mini"-->
+          <!--            type="text"-->
+          <!--            icon="el-icon-edit"-->
+          <!--            @click="handleUpdate(scope.row)"-->
+          <!--            v-hasPermi="['company:companyDomainBind:edit']"-->
+          <!--          >修改-->
+          <!--          </el-button>-->
+          <!--          <el-button-->
+          <!--            size="mini"-->
+          <!--            type="text"-->
+          <!--            icon="el-icon-delete"-->
+          <!--            @click="handleDelete(scope.row)"-->
+          <!--            v-hasPermi="['company:companyDomainBind:remove']"-->
+          <!--          >删除-->
+          <!--          </el-button>-->
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改域名绑定销售公司对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="销售公司ID" prop="companyId">
+          <el-input v-model="form.companyId" placeholder="请输入销售公司ID"/>
+        </el-form-item>
+        <el-form-item label="销售公司名称" prop="companyName">
+          <el-input v-model="form.companyName" placeholder="请输入销售公司名称"/>
+        </el-form-item>
+        <el-form-item label="绑定域名ID" prop="domainId">
+          <el-input v-model="form.domainId" placeholder="请输入绑定域名ID"/>
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
+        </el-form-item>
+        <el-form-item label="状态">
+          <el-radio-group v-model="form.status">
+            <el-radio label="1">请选择字典生成</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 批量绑定弹窗 -->
+    <el-dialog title="批量分配域名" :visible.sync="bindingOpen" width="60%" :before-close="handleClose">
+      <el-scrollbar style="height: 692px;">
+        <h3>选择分配域名:</h3>
+        <el-divider></el-divider>
+<!--        <el-form :model="dialog.company.queryParams" ref="companyQueryForm" :inline="true" label-width="68px">-->
+<!--          <el-form-item label="公司名称" prop="companyName">-->
+<!--            <el-input-->
+<!--              v-model="dialog.company.queryParams.companyName"-->
+<!--              placeholder="请输入销售公司名称"-->
+<!--              clearable-->
+<!--              size="small"-->
+<!--              @keyup.enter.native="handleQuery"-->
+<!--            />-->
+<!--          </el-form-item>-->
+<!--          <el-form-item label="域名" prop="domain">-->
+<!--            <el-input-->
+<!--              v-model="dialog.company.queryParams.domain"-->
+<!--              placeholder="请输入域名名称"-->
+<!--              clearable-->
+<!--              size="small"-->
+<!--              @keyup.enter.native="handleQuery"-->
+<!--            />-->
+<!--          </el-form-item>-->
+<!--          <el-form-item>-->
+<!--            <el-button type="primary" icon="el-icon-search" size="mini" @click="companyHandleDialogQuery">搜索-->
+<!--            </el-button>-->
+<!--            <el-button icon="el-icon-refresh" size="mini" @click="companyResetQuery">重置</el-button>-->
+<!--          </el-form-item>-->
+<!--        </el-form>-->
+        <el-row :span="24">
+          <el-col :span="24">
+            <span>选择域名:</span>
+            <el-select v-model="dialog.company.domainId" filterable placeholder="请选择" @change="domainChange">
+              <el-option
+                v-for="item in dialog.company.companyList"
+                :key="item.id"
+                :label="item.domain"
+                :value="item.id">
+              </el-option>
+            </el-select>
+          </el-col>
+        </el-row>
+        <el-divider></el-divider>
+        <h3>选择分配销售人员:</h3>
+        <el-divider></el-divider>
+        <el-form :model="dialog.companyUser.queryParams" ref="dialogQueryForm" :inline="true" v-show="showSearch"
+                 label-width="68px"
+        >
+          <el-form-item label="用户账号" prop="domain">
+            <el-input
+              v-model="dialog.companyUser.queryParams.userName"
+              placeholder="请输入用户账号"
+              clearable
+              size="small"
+              @keyup.enter.native="handleDialogQuery"
+            />
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">搜索</el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="resetDialogQuery">重置</el-button>
+          </el-form-item>
+        </el-form>
+        <el-table border v-loading="dialog.companyUser.loading" :data="dialog.companyUser.companyDomainList"
+                  @selection-change="handleDialogSelectionChange"
+        >
+          <el-table-column type="selection" width="55" align="center"/>
+          <el-table-column label="用户ID" align="center" prop="userId"/>
+          <el-table-column label="用户账号" align="center" prop="userName"/>
+          <el-table-column label="手机号码" align="center" prop="phonenumber"/>
+        </el-table>
+        <el-row :span="24">
+          <el-col :span="3">
+            <span style="margin-top: 100px">已选中绑定域名:{{ dialog.companyUser.ids.length }}条</span>
+          </el-col>
+          <el-col :span="20">
+            <pagination
+              v-show="dialog.companyUser.total>0"
+              :total="dialog.companyUser.total"
+              :page.sync="dialog.companyUser.queryParams.pageNum"
+              :limit.sync="dialog.companyUser.queryParams.pageSize"
+              @pagination="getDialogList"
+            />
+          </el-col>
+        </el-row>
+        <el-divider></el-divider>
+        <el-row>
+          <el-col :span="10" :offset="10">
+            <el-button @click="centerDialogVisible">取 消</el-button>
+            <el-button type="primary" @click="bindSubmission">确 定</el-button>
+          </el-col>
+        </el-row>
+      </el-scrollbar>
+    </el-dialog>
+
+    <!--    企业绑定详情弹窗-->
+    <el-dialog title="域名分配 - 人员详情弹窗" :visible.sync="bindingDetailsOpen" width="80%"
+               :before-close="handleClose"
+    >
+      <h3>域名 <b class="domainFont">{{ domainName }}</b> 下分配的人员信息:</h3>
+      <el-scrollbar style="height: 692px;">
+        <el-divider></el-divider>
+        <childCompanyBindUser ref="domainBindUserRef" @bind-value="getList"></childCompanyBindUser>
+      </el-scrollbar>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  listCompanyDomainBind,
+  getCompanyDomainBind,
+  delCompanyDomainBind,
+  addCompanyDomainBind,
+  updateCompanyDomainBind,
+  exportCompanyDomainBind,
+  domainBatchBinding
+} from '@/api/company/companyDomainBind'
+import { getCompanyUserListPage } from '@/api/company/companyUser'
+import companyBindUser from '@/views/company/companyBindUser/index.vue'
+
+export default {
+  name: 'CompanyDomainBind',
+  components: { 'childCompanyBindUser': companyBindUser },
+  props: {
+    isPageCall: {
+      type: Boolean,
+      default: true
+    }
+  },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 域名绑定销售公司表格数据
+      companyDomainBindList: [],
+      // 弹出层标题
+      title: '',
+      // 是否显示弹出层
+      open: false,
+      //检查显示
+      checkDisplay: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        companyId: null,
+        companyName: null,
+        domainId: null,
+        domain: null,
+        status: null
+      },
+      //绑定弹窗显示变量
+      bindingOpen: false,
+      //弹窗变量
+      dialog: {
+        companyUser: {
+          // 查询参数
+          queryParams: {
+            pageNum: 1,
+            pageSize: 10,
+            domain: null,
+            status: null,
+            userName: null
+          },
+          // 遮罩层
+          loading: true,
+          // 域名管路表格数据
+          companyDomainList: [],
+          // 总条数
+          total: 0,
+          //选中数组
+          ids: []
+        },
+        company: {
+          queryParams: {
+            pageNum: 1,
+            pageSize: 10,
+            companyName: null,
+            companyMobile: null,
+            companyAddress: null,
+            status: null,
+            startTime: null,
+            endTime: null,
+            money: null,
+            times: null,
+            voiceApiId: null
+          },
+          // 遮罩层
+          loading: true,
+          // 企业数据
+          companyList: [],
+          // 总条数
+          total: 0,
+          //选中数组
+          ids: [],
+          domainId:null,
+        }
+      },
+      bindingDetailsOpen: false,
+      //弹窗名称
+      domainName: null,
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        companyId: [
+          { required: true, message: '销售公司ID不能为空', trigger: 'blur' }
+        ],
+        companyName: [
+          { required: true, message: '销售公司名称不能为空', trigger: 'blur' }
+        ],
+        domainId: [
+          { required: true, message: '绑定域名ID不能为空', trigger: 'blur' }
+        ],
+        createTime: [
+          { required: true, message: '创建时间不能为空', trigger: 'blur' }
+        ]
+      }
+    }
+  },
+  created() {
+    if (this.isPageCall) {
+      this.getList()
+      this.checkDisplay = true
+    }
+  },
+  methods: {
+    domainChange(){
+      if(this.dialog.company.domainId){
+        this.dialog.company.ids.push(this.dialog.company.domainId);
+      }
+    },
+    //判断勾选
+    selectable(row, index) {
+      return this.displayBoolean;
+    },
+    handleClose(done) {
+      this.$confirm('确认关闭?')
+        .then(_ => {
+          done()
+        })
+        .catch(_ => {
+        })
+    },
+    formatDate(timestamp) {
+      if (!timestamp) return ''
+
+      const date = new Date(timestamp)
+
+      // 自定义日期格式(年-月-日 时:分:秒)
+      const year = date.getFullYear()
+      const month = String(date.getMonth() + 1).padStart(2, '0')
+      const day = String(date.getDate()).padStart(2, '0')
+      const hours = String(date.getHours()).padStart(2, '0')
+      const minutes = String(date.getMinutes()).padStart(2, '0')
+      const seconds = String(date.getSeconds()).padStart(2, '0')
+
+      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
+    },
+    /** 查询域名绑定销售公司列表 */
+    getList() {
+      this.loading = true
+      listCompanyDomainBind(this.queryParams).then(response => {
+        this.companyDomainBindList = response.rows
+        this.total = response.total
+        this.loading = false
+      })
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false
+      this.reset()
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        companyId: null,
+        companyName: null,
+        domainId: null,
+        remark: null,
+        createTime: null,
+        updateTime: null,
+        status: 0,
+        createBy: null,
+        updateBy: null
+      }
+      this.resetForm('form')
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1
+      this.getList()
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm('queryForm')
+      this.handleQuery()
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset()
+      this.open = true
+      this.title = '添加域名绑定销售公司'
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset()
+      const id = row.id || this.ids
+      getCompanyDomainBind(id).then(response => {
+        this.form = response.data
+        this.open = true
+        this.title = '修改域名绑定销售公司'
+      })
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs['form'].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateCompanyDomainBind(this.form).then(response => {
+              this.msgSuccess('修改成功')
+              this.open = false
+              this.getList()
+            })
+          } else {
+            addCompanyDomainBind(this.form).then(response => {
+              this.msgSuccess('新增成功')
+              this.open = false
+              this.getList()
+            })
+          }
+        }
+      })
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids
+      this.$confirm('是否确认解绑当前编号为"' + ids + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delCompanyDomainBind(ids)
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('删除成功')
+        //触发父组件方法
+        this.$emit('bind-value')
+      }).catch(() => {
+      })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams
+      this.$confirm('是否确认导出所有域名绑定销售公司数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.exportLoading = true
+        return exportCompanyDomainBind(queryParams)
+      }).then(response => {
+        this.download(response.msg)
+        this.exportLoading = false
+      }).catch(() => {
+      })
+    },
+    //父级触发接口
+    childMethod(domainId) {
+      this.queryParams.domainId = domainId
+      this.getList()
+    },
+    /** 弹窗搜索按钮操作 */
+    handleDialogQuery() {
+      this.dialog.companyUser.queryParams.pageNum = 1
+      this.getDialogList()
+    },
+    //企业重置方法
+    companyResetQuery() {
+      this.$refs['companyQueryForm'].resetFields()
+      this.companyHandleDialogQuery()
+    },
+    /** 重置按钮操作 */
+    resetDialogQuery() {
+      this.resetForm('dialogQueryForm')
+      this.handleDialogQuery()
+    },
+    // 多选框选中数据
+    handleDialogSelectionChange(selection) {
+      this.dialog.companyUser.ids = selection.map(item => item.userId)
+    },
+    /** 查询域名管路列表 */
+    getDialogList() {
+      this.dialog.companyUser.loading = true
+      getCompanyUserListPage(this.dialog.companyUser.queryParams).then(response => {
+        this.dialog.companyUser.companyDomainList = response.rows
+        this.dialog.companyUser.total = response.total
+        this.dialog.companyUser.loading = false
+      })
+    },
+    companyHandleDialogQuery() {
+      this.dialog.company.queryParams.pageNum = 1
+      this.getCompanyList()
+    },
+    // 多选框选中数据
+    handleCompanySelectionChange(selection) {
+      this.dialog.company.ids = selection.map(item => item.id)
+      this.displayBoolean = this.dialog.company.ids.length <= 0;
+    },
+    /** 查询企业列表 */
+    getCompanyList() {
+      this.dialog.company.loading = true
+      listCompanyDomainBind(this.dialog.company.queryParams).then(response => {
+        this.dialog.company.companyList = response.rows
+        this.dialog.company.total = response.total
+        this.dialog.company.loading = false
+      })
+    },
+    centerDialogVisible() {
+      this.bindingOpen = false
+      //清空数组
+      this.dialog.companyUser.ids = []
+      this.dialog.companyUser.queryParams.domain = null
+      this.dialog.company.ids = []
+      this.dialog.company.queryParams.companyName = null
+      this.dialog.company.domainId = null;
+    },
+    //绑定提交
+    bindSubmission() {
+      if (this.dialog.companyUser.ids.length === 0) {
+        return this.$message.warning({
+          message: '绑定失败,请选择分配人员!',
+          duration: 2000
+        })
+      }
+      if (this.dialog.company.ids.length === 0) {
+        return this.$message.warning({
+          message: '绑定失败,请选择分配域名!',
+          duration: 2000
+        })
+      }
+      this.domainBatchBinding()
+      this.centerDialogVisible()
+    },
+    //处理绑定
+    handleBindingOpen() {
+      this.bindingOpen = !this.bindingOpen
+      this.dialog.company.queryParams.pageNum=null;
+      this.dialog.company.queryParams.pageSize=null;
+      this.getDialogList()
+      this.getCompanyList()
+    },
+    //批量绑定
+    domainBatchBinding() {
+      let param = {
+        companyUserIds: this.dialog.companyUser.ids,
+        companyIds: this.dialog.company.ids
+      }
+      domainBatchBinding(param).then(response => {
+        this.getList()
+        this.msgSuccess(response.msg)
+      })
+    },
+    //表单触发方法
+    onTableBindNumberClick(row) {
+      this.domainName = row.domain
+      this.bindingDetailsOpen = true
+      //激活子接口
+      this.$nextTick(() => {
+        this.$refs.domainBindUserRef.childMethod(row.id)
+      })
+    }
+  }
+}
+</script>
+<style>
+.domainFont {
+  color: #ff0000;
+}
+</style>

+ 55 - 8
src/views/components/course/userCourseCatalogDetails.vue

@@ -196,6 +196,8 @@
           :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"
@@ -286,6 +288,26 @@
             @keyup.enter.native="resourceList"
           />
         </el-form-item>
+        <el-form-item label="类型">
+          <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"
+            />
+          </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"
+            />
+          </el-select>
+        </el-form-item>
         <el-form-item>
           <el-button type="primary" icon="el-icon-search" size="mini" @click="resourceList">搜索</el-button>
         </el-form-item>
@@ -296,6 +318,7 @@
         <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
@@ -379,6 +402,7 @@ import VideoUpload from "@/components/VideoUpload/index.vue";
 import { listVideoResource } from '@/api/course/videoResource';
 import { getByIds } from '@/api/course/courseQuestionBank'
 import CourseWatchComment from "./courseWatchComment.vue";
+import { getCateListByPid, getCatePidList } from '@/api/course/userCourseCategory'
 
 export default {
   name: "userCourseCatalog",
@@ -451,7 +475,12 @@ export default {
         queryParams: {
           pageNum: 1,
           pageSize: 10,
+          resourceName: null,
+          typeId: null,
+          typeSubId: null
         },
+        typeOptions: [],
+        typeSubOptions: []
       },
       // 显示搜索条件
       showSearch: true,
@@ -568,7 +597,7 @@ export default {
     handleQuestionBankDelete(row){
       this.form.questionBankList.splice(this.form.questionBankList.findIndex(item => item.id === row.id), 1)
     },
-    handleVideoChange(){
+       handleVideoChange(){
       if(this.form.uploadType==1){
         this.videoUrl = this.form.lineOne;
       }else if(this.form.uploadType==2){
@@ -689,6 +718,8 @@ export default {
         questionBankId:null,
         questionBankList:[],
         redPacketMoney:0,
+        isTranscode:0,
+        transcodeFileKey:null
       };
       this.videoURL = '';
       this.progress=0;
@@ -778,13 +809,13 @@ export default {
             });
             return
           }
-          if(this.form.uploadType==null){
-            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(',');
           }
@@ -840,11 +871,27 @@ export default {
     },
     openAdds(){
       this.addBatchData.open = true;
+      this.getRootTypeList();
       this.addBatchData.form = {
         courseId: this.courseId,
       };
       this.resourceList();
     },
+    getRootTypeList() {
+      getCatePidList().then(response => {
+        this.addBatchData.typeOptions = response.data
+      });
+    },
+    async changeCateType(val) {
+      this.addBatchData.queryParams.typeSubId = null
+      this.addBatchData.typeSubOptions = []
+      if (!val) {
+        return
+      }
+      await getCateListByPid(val).then(response => {
+        this.addBatchData.typeSubOptions = response.data
+      })
+    },
     resourceList(){
       this.addBatchData.loading = true;
       listVideoResource(this.addBatchData.queryParams).then(response => {

+ 1 - 1
src/views/components/his/followMsgDetails.vue

@@ -173,7 +173,7 @@
         <el-descriptions-item label="问诊备注"><span v-if="reportItem!=null">{{reportItem.companyUserRemark}}</span></el-descriptions-item>
       </el-descriptions>
       <div class="desct">
-        患者信息
+        ${process.env.VUE_APP_VIDEO_LINE_1}
       </div>
       <el-descriptions :column="3" border  >
         <el-descriptions-item label="患者姓名" ><span v-if="reportItem.patientJson!=null">{{JSON.parse(reportItem.patientJson).patientName}}</span></el-descriptions-item>

+ 8 - 1
src/views/components/his/inquiryOrderReportDetails.vue

@@ -27,7 +27,13 @@
         </el-descriptions>
   </div>
   <div class="contentx" v-if="item!=null">
-        <div class="desct" > 患者信息</div>
+        <div class="desct" > 
+          <span v-if="patientInfo">
+            {{ patientInfo }}
+          </span>
+          <span v-else>
+            患者信息
+          </span></div>
         <el-descriptions title="" :column="3" border>
           <el-descriptions-item label="患者姓名" ><span v-if="item!=null">{{JSON.parse(item.patientJson).patientName}}</span></el-descriptions-item>
           <el-descriptions-item label="患者年龄" ><span v-if="item!=null">{{JSON.parse(item.patientJson).age}}</span></el-descriptions-item>
@@ -88,6 +94,7 @@ import { listBySearch } from "@/api/his/inquiryDisease";
     props:["data"],
     data() {
       return {
+        patientInfo: process.env.VUE_APP_PATIENT_INFO,
         diseaseParams:{
           diseaseId:null,
           diseaseName:null

+ 7 - 1
src/views/components/his/msgDetails.vue

@@ -173,7 +173,12 @@
         <el-descriptions-item label="问诊备注"><span v-if="reportItem!=null">{{reportItem.companyUserRemark}}</span></el-descriptions-item>
       </el-descriptions>
       <div class="desct">
-        患者信息
+        <span v-if="patientInfo">
+            {{ patientInfo }}
+          </span>
+          <span v-else>
+            患者信息
+          </span>
       </div>
       <el-descriptions :column="3" border  >
        <el-descriptions-item label="患者姓名" ><span v-if="reportItem.patientJson!=null">{{JSON.parse(reportItem.patientJson).patientName}}</span></el-descriptions-item>
@@ -263,6 +268,7 @@ import {getPrescribe,getDrugInfo} from "@/api/his/prescribe";
     name: "MsgList",
     data() {
       return {
+        patientInfo: process.env.VUE_APP_PATIENT_INFO,
         usageJson:{},
         prescribeItem:{},
         statusDrugReportOptions:[],

+ 9 - 1
src/views/components/his/testReportDetails.vue

@@ -17,7 +17,14 @@
         </el-descriptions>
   </div>
   <div class="contentx" v-if="patientJson!=null">
-        <div class="desct" > 患者信息</div>
+        <div class="desct" > 
+          <span v-if="patientInfo">
+            {{ patientInfo }}
+          </span>
+          <span v-else>
+            患者信息
+          </span>
+        </div>
         <el-descriptions title="" :column="3" border >
             <el-descriptions-item label="患者名称"><span >{{patientJson.name}}</span></el-descriptions-item>
             <el-descriptions-item label="患者性别">
@@ -48,6 +55,7 @@ import { listTestReport, getTestReport, delTestReport, addTestReport, updateTest
     props:["data"],
     data() {
       return {
+        patientInfo: process.env.VUE_APP_PATIENT_INFO,
         item:null,
         formJson:null,
         conditioningPlanJson:null,

+ 7 - 1
src/views/components/his/userDetails.vue

@@ -101,7 +101,12 @@
 
   <div class="contentx" v-if="item!=null">
         <div class="desct">
-          患者信息
+          <span v-if="patientInfo">
+            {{ patientInfo }}
+          </span>
+          <span v-else>
+            患者信息
+          </span>
         </div>
     <userPatietDetails  ref="userPatietDetail" />
 
@@ -145,6 +150,7 @@ import userAddDetails from "../his/userAddDetails.vue";
      components: { userStorerDetails ,userInquiryOrderDetails,userPatietDetails,userAddDetails},
     data() {
       return {
+        patientInfo: process.env.VUE_APP_PATIENT_INFO,
         addr:[],
         patient:[],
         userOptions: [],

+ 11 - 10
src/views/components/his/userPatietDetails.vue

@@ -176,6 +176,7 @@ export default {
   name: "Patient",
   data() {
     return {
+      addPatientInfo: process.env.VUE_APP_ADD_PATIENT,
       show:{
          title:"患者详情",
          open:false,
@@ -235,20 +236,20 @@ export default {
         patientName: [
           { required: true, message: "名称不能为空", trigger: "blur" }
         ],
-        idCard: [
-          { required: true, message: "身份证号不能为空", trigger: "blur" },
+        // idCard: [
+        //   { required: true, message: "身份证号不能为空", trigger: "blur" },
 
-        ],
+        // ],
         sex: [
           { required: true, message: "性别不能为空", trigger: "blur" }
 
         ],
-        birthday: [
-          { required: true, message: "生日不能为空", trigger: "blur" }
-        ],
-        mobile:[
-          { required: true, message: "手机号不能为空", trigger: "blur" },
-        ],
+        // birthday: [
+        //   { required: true, message: "生日不能为空", trigger: "blur" }
+        // ],
+        // mobile:[
+        //   { required: true, message: "手机号不能为空", trigger: "blur" },
+        // ],
         status: [
           { required: true, message: "状态不能为空", trigger: "blur" }
         ],
@@ -355,7 +356,7 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加病人";
+      this.title = this.addPatientInfo||"添加病人";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {

+ 32 - 4
src/views/course/courseQuestionBank/QuestionBank.vue

@@ -30,15 +30,25 @@
         </el-select>
       </el-form-item>
 		<el-form-item label="题目类别" prop="questionType">
-	    <el-select v-model="queryParams.questionType" placeholder="请选择类别" clearable size="small">
+	    <el-select v-model="queryParams.questionType" placeholder="请选择类别" @change="changeCateType" clearable size="small">
 	      <el-option
-	        v-for="dict in questionTypeOptions"
+	        v-for="dict in questionRootTypeOptions"
 	        :key="dict.dictValue"
 	        :label="dict.dictLabel"
 	        :value="dict.dictValue"
 	      />
 	    </el-select>
 	  </el-form-item>
+      <el-form-item label="题目子类别" prop="questionSubType" label-width="100px">
+        <el-select v-model="queryParams.questionSubType" ref="typeSelect" placeholder="请选择子类别" clearable size="small">
+          <el-option
+            v-for="item in questionSubTypeOptions"
+            :key="item.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          />
+        </el-select>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -188,6 +198,7 @@
 
 <script>
 import { listCourseQuestionBank, getCourseQuestionBank, delCourseQuestionBank, addCourseQuestionBank, updateCourseQuestionBank, exportCourseQuestionBank } from "@/api/course/courseQuestionBank";
+import { getCateListByPid, getCatePidList, listUserCourseCategory } from '@/api/course/userCourseCategory'
 
 export default {
   name: "CourseQuestionBank",
@@ -230,6 +241,8 @@ export default {
       // 题库表格数据
       courseQuestionBankList: [],
 	  questionTypeOptions: [],
+      questionRootTypeOptions: [],
+      questionSubTypeOptions: [],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
@@ -244,6 +257,7 @@ export default {
         status: null,
         question: null,
 		questionType: null,
+        questionSubType: null,
         answer: null,
       },
       // 表单参数
@@ -270,13 +284,27 @@ export default {
 	this.getDicts("sys_course_question_type").then(response => {
 	  this.questionTypeOptions = response.data;
 	});
-
+    this.getCategoryType()
   },
   methods: {
     getOptionLabel(index) {
       return this.alphabet[index];
     },
-
+    getCategoryType() {
+      getCatePidList().then(response => {
+        this.questionRootTypeOptions = response.data
+      });
+    },
+    changeCateType(val) {
+      this.questionSubTypeOptions = []
+      this.queryParams.questionSubType = null
+      if (!val) {
+        return
+      }
+      getCateListByPid(val).then(response => {
+        this.questionSubTypeOptions = response.data
+      })
+    },
     //选择此课
     chooseQuestion(val){
       this.$emit('questionBankResult',val)

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

@@ -1,31 +1,6 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
-      <el-form-item label="用户" prop="userId">
-        <el-select v-model="queryParams.userId" remote placeholder="用户名/手机号" filterable clearable  style="width: 100%;"
-                   @keyup.enter.native="handleQuery"
-                   :remote-method="remoteGetFsUserList"
-                   @clear="handleClear"
-                   :loading="queryUserLoading"
-        >
-          <el-option
-            v-for="dict in fsUserList"
-            :key="`${dict.nickname} - ${dict.phone}`"
-            :label="`${dict.nickname} - ${dict.phone}`"
-            :value="dict.userId">
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="所属销售" prop="companyUserName">
-        <el-select v-model="queryParams.companyUserId" remote placeholder="请选择" filterable clearable  style="width: 100%;" @keyup.enter.native="handleQuery">
-          <el-option
-            v-for="dict in companyUserList"
-            :key="`${dict.nickName} - ${dict.userName}`"
-            :label="`${dict.nickName} - ${dict.userName}`"
-            :value="dict.userId">
-          </el-option>
-        </el-select>
-      </el-form-item>
       <el-form-item label="课程" prop="courseId">
         <el-select filterable  v-model="queryParams.courseId" placeholder="请选择课程"  clearable size="small" @change="courseChange(queryParams.courseId)">
           <el-option
@@ -68,16 +43,7 @@
                         range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="updateChange"></el-date-picker>
       </el-form-item>
 
-      <el-form-item label="类型" prop="type">
-        <el-select filterable  v-model="sourceTypeModel" placeholder="请选择小节"  clearable size="small">
-          <el-option
-            v-for="dict in userSourceTypeOptions"
-            :key="dict.dictValue"
-            :label="dict.dictLabel"
-            :value="dict.dictValue"
-          />
-        </el-select>
-      </el-form-item>
+
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -235,11 +201,7 @@ export default {
     this.getDicts("sys_course_watch_log_type").then(response => {
       this.logTypeOptions = response.data;
     });
-    getUserList().then(res=>{
-      if(res.code === 200) {
-        this.companyUserList = res.data
-      }
-    })
+
 
     this.getDicts('user_source_type').then(response => {
       this.userSourceTypeOptions = response.data;

+ 46 - 1
src/views/course/userCourse/index.vue

@@ -31,6 +31,16 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="关联的公司" prop="companyIds">
+        <el-select v-model="queryParams.companyIdsList" multiple placeholder="请选择公司" filterable clearable style="width: 90%;">
+          <el-option
+            v-for="dict in companyOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
       <el-form-item label="课堂类型" prop="isPrivate" style="display: none">
         <el-select v-model="queryParams.isPrivate" placeholder="请选择" clearable size="small">
           <el-option
@@ -135,6 +145,14 @@
             v-hasPermi="['course:userCourse:edit']"
           >修改
           </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleCopy(scope.row)"
+            v-hasPermi="['course:userCourse:copy']"
+          >复制
+          </el-button>
           <el-button
             size="mini"
             type="text"
@@ -202,6 +220,13 @@
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="排序" prop="sort">
+                          <el-input-number v-model="form.sort"  :min="0"  label="排序"></el-input-number>
+            </el-form-item>
+          </el-col>
+        </el-row>
         <el-row>
           <el-col :span="24">
             <el-form-item label="课堂简介" prop="description">
@@ -209,6 +234,9 @@
             </el-form-item>
           </el-col>
         </el-row>
+        <el-form-item label="排序" prop="sort">
+          <el-input-number v-model="form.sort"  :min="0" label="请输入排序"></el-input-number>
+        </el-form-item>
         <el-form-item label="课程封面" prop="imgUrl">
           <ImageUpload v-model="form.imgUrl" type="image" :num="10" :width="150" :height="150"/>
         </el-form-item>
@@ -246,6 +274,7 @@ import {
   updateUserCourse,
   exportUserCourse,
   updateIsShow,
+  copyUserCourse,
   putOn,
   pullOff
 } from "@/api/course/userCourse";
@@ -331,7 +360,8 @@ export default {
         hotRanking: null,
         integral: null,
         price: null,
-        isPrivate: 1
+        isPrivate: 1,
+        companyIdsList:[],
       },
       // 表单参数
       form: {},
@@ -627,6 +657,21 @@ export default {
         }
       });
     },
+    /** 复制按钮操作 */
+    handleCopy(row) {
+      const courseId = row.courseId;
+      this.$confirm('是否确认复制课程编号为"' + courseId + '"的数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return copyUserCourse(courseId);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("复制成功");
+      }).catch(() => {
+      });
+    },
     /** 删除按钮操作 */
     handleDelete(row) {
       const courseIds = row.courseId || this.ids;

+ 23 - 6
src/views/course/userCoursePeriod/batchRedPacket.vue

@@ -1,9 +1,10 @@
 <template>
   <el-dialog
     title="批量设置红包"
-    :visible.sync="visible"
+    :visible.sync="dialogVisible"
     width="800px"
     append-to-body
+    @close="handleClose"
   >
     <el-table
       v-loading="loading"
@@ -23,14 +24,15 @@
         align="center"
       />
       <el-table-column
-        label="金额"
+        label="金额(0.1-0.3元)"
         align="center"
         width="200"
       >
         <template slot-scope="scope">
           <el-input-number
             v-model="scope.row.amount"
-            :min="0.01"
+            :min="0.1"
+            :max="0.3"
             :precision="2"
             :step="0.01"
             size="small"
@@ -65,14 +67,22 @@ export default {
   data() {
     return {
       loading: false,
-      tableData: []
+      tableData: [],
+      dialogVisible: false
     }
   },
   watch: {
     visible(val) {
+      this.dialogVisible = val;
       if (val) {
         this.initTableData()
       }
+    },
+    dialogVisible(val) {
+      if (!val) {
+        // 当弹窗关闭时,通知父组件
+        this.$emit('update:visible', false);
+      }
     }
   },
   methods: {
@@ -80,11 +90,18 @@ export default {
     initTableData() {
       this.tableData = this.selectedData.map(item => ({
         ...item,
-        amount: 0.01
+        amount: 0.1
       }))
     },
     // 保存
     handleSave() {
+      // 验证金额范围
+      const invalidItems = this.tableData.filter(item => item.amount < 0.1 || item.amount > 0.3);
+      if (invalidItems.length > 0) {
+        this.$message.error('红包金额需要在0.1元至0.3元之间');
+        return;
+      }
+
       this.$confirm(`是否确定?确定后营期下的所有公司红包金额都将设置成对应值`, '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -113,7 +130,7 @@ export default {
     },
     // 关闭
     handleClose() {
-      this.$emit('update:visible', false)
+      this.dialogVisible = false;
     }
   }
 }

文件差异内容过多而无法显示
+ 449 - 299
src/views/course/userCoursePeriod/index.vue


+ 25 - 15
src/views/course/userCoursePeriod/redPacket.vue

@@ -27,11 +27,12 @@
         <el-table-column label="课程" prop="courseName" align="center" />
         <el-table-column label="小节" prop="videoName" align="center" />
         <el-table-column label="营期日期" prop="dayDate" align="center"/>
-        <el-table-column label="红包金额" width="200px" align="center">
+        <el-table-column label="红包金额(0.0-0.3元)" width="200px" align="center">
           <template slot-scope="scope">
             <el-input-number
               v-model="scope.row.amount"
-              :min="0"
+              :min="0.0"
+              :max="0.3"
               :precision="2"
               :step="0.01"
               size="small"
@@ -51,7 +52,7 @@
 </template>
 
 <script>
-import { getPeriodCompanyList, getDays, batchSaveRedPacket, getPeriodRedPacketList } from "@/api/course/userCoursePeriod";
+import { getPeriodCompanyList, batchSaveRedPacket, getPeriodRedPacketList } from "@/api/course/userCoursePeriod";
 import redPacket from "@/views/course/userCoursePeriod/redPacket.vue";
 
 export default {
@@ -128,29 +129,38 @@ export default {
         periodId: this.periodId,
         companyId: this.currentCompany.companyId
       }).then(response => {
+        console.log("-----------",JSON.stringify(response.data))  
         this.redPacketList = (response.data || []).map(item => ({
           ...item,
-          amount: item.amount || 0
+          // amount: item.amount || 0.1
+          amount:item.amount ?? 0.1
         }));
       });
     },
     // 保存红包金额
     handleSave() {
-      const saveData = this.redPacketList
-        .filter(item => item.amount > 0)
-        .map(item => ({
-          companyId: this.currentCompany.companyId,
-          redPacketMoney: item.amount,
-          videoId: item.videoId,
-          periodId: this.periodId,
-          dataType: 2
-        }));
-
-      if (saveData.length === 0) {
+      // 筛选出有金额的项目
+      const validAmountItems = this.redPacketList.filter(item => item.amount >= 0);
+      if (validAmountItems.length === 0) {
         this.$message.warning('请至少设置一个红包金额');
         return;
       }
 
+      // 验证金额范围
+      const invalidItems = validAmountItems.filter(item => item.amount < 0.0 || item.amount > 0.3);
+      if (invalidItems.length > 0) {
+        this.$message.error('红包金额需要在0.0元至0.3元之间');
+        return;
+      }
+
+      const saveData = validAmountItems.map(item => ({
+        companyId: this.currentCompany.companyId,
+        redPacketMoney: item.amount,
+        videoId: item.videoId,
+        periodId: this.periodId,
+        dataType: 2
+      }));
+
       batchSaveRedPacket(saveData).then(response => {
         if (response.code === 200) {
           this.$message.success('保存成功');

+ 10 - 1
src/views/course/videoResource/index.vue

@@ -88,6 +88,7 @@
             </el-table-column>
       <el-table-column label="素材名称" align="center" :show-overflow-tooltip="true" prop="resourceName"/>
       <el-table-column label="文件名称" align="center" :show-overflow-tooltip="true" prop="fileName"/>
+      <el-table-column label="排序" align="center" prop="sort" />
       <el-table-column label="分类" align="center">
         <template slot-scope="scope">
           <span v-if="scope.row.typeId">{{ getTypeName(scope.row.typeId) }}</span>
@@ -213,6 +214,10 @@
           </el-select>
         </el-form-item>
 
+        <el-form-item label="排序" prop="sort">
+          <el-input-number v-model="form.sort"  :min="0" label="请输入排序"></el-input-number>
+        </el-form-item>
+
         <el-form-item label="关联题目" prop="projectIds">
           <el-select
             ref="customSelect"
@@ -700,7 +705,8 @@ export default {
         videoUrl: null,
         typeId: null,
         typeSubId: null,
-        projectIds: []
+        projectIds: [],
+        sort: null
       },
       // 表单校验
       rules: {
@@ -716,6 +722,9 @@ export default {
         typeSubId: [
           { required: true, message: "请选择子分类", trigger: "change" }
         ],
+        sort: [
+          { required: true, message: '排序不能为空', trigger: 'blur' }
+        ],
         videoUrl: [
           { required: true, message: "请上传视频", trigger: "change" }
         ]

+ 1 - 1
src/views/crm/components/customerStoreOrderList.vue

@@ -154,7 +154,7 @@ import productOrder from "../../components/his/storeProductDetails.vue";
                 }, 500);
             },
             getData(customerId){
-                this.queryParams.userCouponId=customerId;
+                this.queryParams.customerId=customerId;
                 this.queryParams.pageNum=1;
                 this.getList();
             },

+ 70 - 11
src/views/his/company/index.vue

@@ -109,7 +109,7 @@
       <el-table-column label="到期时间" align="center" prop="limitTime" width="180" />
       <el-table-column label="创建时间" align="center" prop="createTime" width="180" />
       <el-table-column label="更新时间" align="center" prop="updateTime" width="180" />
-      <el-table-column label="主机重启时间" align="center" prop="restartTime" width="180" />
+<!--      <el-table-column label="主机重启时间" align="center" prop="restartTime" width="180" />-->
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200px">
         <template slot-scope="scope">
           <el-button
@@ -272,12 +272,42 @@
             placeholder="选择到期时间">
           </el-date-picker>
         </el-form-item>
-      <el-form-item label="主机重启时间" prop="restartTime" >
-        <el-time-select style="width: 150px;" placeholder="主机重启时间(不填默认1点10分)" v-model="form.restartTime" :picker-options="{
-                              start: '00:00',
-                              step: '00:05',
-                              end: '24:00'
-                            }"></el-time-select>
+<!--      <el-form-item label="主机重启时间" prop="restartTime" >-->
+<!--        <el-time-select style="width: 150px;" placeholder="主机重启时间(不填默认1点10分)" v-model="form.restartTime" :picker-options="{-->
+<!--                              start: '00:00',-->
+<!--                              step: '00:05',-->
+<!--                              end: '24:00'-->
+<!--                            }"></el-time-select>-->
+<!--      </el-form-item>-->
+        <el-form-item label="服务号点播配置" prop="courseMaAppId">
+          <el-select
+            v-model="form.courseMaAppId"
+            placeholder="请选择服务号"
+            clearable
+            size="small"
+          >
+            <el-option
+              v-for="item in maAppList"
+              :key="item.appId"
+              :label="item.appName"
+              :value="item.appId"
+            />
+          </el-select>
+        </el-form-item>
+      <el-form-item label="小程序点播配置" prop="courseMiniAppId">
+        <el-select
+          v-model="form.courseMiniAppId"
+          placeholder="请选择小程序"
+          clearable
+          size="small"
+        >
+          <el-option
+            v-for="item in miniAppList"
+            :key="item.appId"
+            :label="item.appName"
+            :value="item.appId"
+          />
+        </el-select>
       </el-form-item>
          <el-form-item label="备注" prop="remark">
           <el-input v-model="form.remark" type="textarea"  :rows="2" placeholder="请输入备注" />
@@ -345,6 +375,7 @@ import {docList} from "@/api/his/doctor";
 import {getVoiceApiList } from "@/api/company/companyVoiceApi";
 import {getCitysArea} from "../../../api/company/company";
 import {cateList} from "@/api/his/packageCate";
+import { getConfigByKey } from '@/api/system/config'
 export default {
   name: "Company",
   data() {
@@ -403,6 +434,8 @@ export default {
       // 表单参数
       form: {
         restartTime: '13:10',
+        courseMaAppId: null,
+        courseMiniAppId: null,
       },
       // 表单校验
      rules: {
@@ -450,9 +483,9 @@ export default {
        // followDoctorIds: [
        //   { required: true, message: "不能为空", trigger: "blur" }
        // ],
-       packageCateIds: [
-          { required: true, message: "套餐包分类不能为空", trigger: "blur" }
-        ],
+       // packageCateIds: [
+       //    { required: true, message: "套餐包分类不能为空", trigger: "blur" }
+       //  ],
      },
      // 表单校验
      deductRules: {
@@ -469,6 +502,8 @@ export default {
        open:false,
        title:"后台扣款"
      },
+      maAppList: [],
+      miniAppList: [],
     };
   },
   created() {
@@ -572,7 +607,9 @@ export default {
         remark: null,
         linkName: null,
         limitUserCount: null,
-        isDel: null
+        isDel: null,
+        courseMaAppId: null,
+        courseMiniAppId: null,
       };
       this.resetForm("form");
     },
@@ -613,6 +650,7 @@ export default {
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
+      this.getAppList()
       this.open = true;
 	  this.doctorIds=[]
       this.title = "添加公司";
@@ -620,6 +658,7 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
+      this.getAppList()
 	  this.doctorIds=[]
       const companyId = row.companyId || this.ids
       getCompany(companyId).then(response => {
@@ -643,6 +682,26 @@ export default {
         }
       });
     },
+    getAppList() {
+      this.maAppList = []
+      this.miniAppList = []
+      const key = "courseMa.config"
+      getConfigByKey(key).then(response => {
+        const {code,data} = response
+        if (code === 200) {
+          let value = data?.configValue
+          if (value) {
+            const appList = JSON.parse(value);
+            this.maAppList = appList.filter(v => v.type === '2').map(v => {
+              return { appId: v.appid, appName: v.name }
+            })
+            this.miniAppList = appList.filter(v => v.type === '1').map(v => {
+              return { appId: v.appid, appName: v.name }
+            })
+          }
+        }
+      })
+    },
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate(valid => {

+ 3 - 3
src/views/his/coupon/index.vue

@@ -13,8 +13,8 @@
        <el-form-item label="有效期" prop="limitTime">
                  <el-date-picker v-model="limitTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="change"></el-date-picker>
        </el-form-item>
-      <el-form-item label="类型" prop="couponType">
-        <el-select v-model="queryParams.couponType" placeholder="请选择类型" clearable size="small">
+      <el-form-item label="类型" prop="couponType">
+        <el-select v-model="queryParams.couponType" placeholder="请选择类型" clearable size="small">
           <el-option
             v-for="dict in couponTypeOptions"
             :key="dict.dictValue"
@@ -346,7 +346,7 @@ export default {
           { required: true, message: "有效期不能为空", trigger: "blur" }
         ],
         couponType: [
-          { required: true, message: "类型不能为空", trigger: "blur" }
+          { required: true, message: "类型不能为空", trigger: "blur" }
         ],
       }
     };

+ 17 - 12
src/views/his/doctor/type1.vue

@@ -315,7 +315,7 @@
         <el-row>
               <el-col :span="12">
                 <el-form-item label="科室" prop="deptId">
-                <el-select v-model="form.deptId" placeholder="请选择所属科室">
+                <el-select v-model="form.deptId"  placeholder="请选择所属科室">
                       <el-option
                           v-for="dict in depList"
                           :key="dict.dictValue"
@@ -950,9 +950,9 @@ export default {
       this.sexOptions = response.data;
     });
     this.getdeplist();
-	listStore().then(response => {
-	  this.storeOPtions = response.rows;
-	});
+    listStore().then(response => {
+      this.storeOPtions = response.rows;
+    });
     this.getHospitaldeplist();
     getAllFollowDoctorList().then(response => {
 
@@ -1298,9 +1298,9 @@ export default {
         if(this.form.packageIds!=null){
            this.form.packageIds= ((this.form.packageIds).split(",")).map(Number)
         }
-		if(this.form.storeIds!=null){
-		   this.form.storeIds= ((this.form.storeIds).split(",")).map(Number)
-		}
+        if(this.form.storeIds!=null){
+          this.form.storeIds= ((this.form.storeIds).split(",")).map(Number)
+        }
         if(this.form.isSelf!=null){
           this.form.isSelf = String(this.form.isSelf)
         }
@@ -1316,7 +1316,10 @@ export default {
         if(this.form.isPrescribeDoctor!=null){
           this.form.isPrescribeDoctor = String(this.form.isPrescribeDoctor)
         }
-        this.form.cityIds=((this.form.cityIds).split(",")).map(Number)
+        if(this.form.cityIds){
+          this.form.cityIds=((this.form.cityIds).split(",")).map(Number)
+        }
+        
         if(this.form.prescribeDoctorName!=null){
               this.doctorName.name=this.form.prescribeDoctorName;
               this.getlistdocuser();
@@ -1366,15 +1369,17 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
+      if(this.form.isPrescribeDoctor!=null){
+          this.form.isPrescribeDoctor = String(this.form.isPrescribeDoctor)
+        }
       this.$refs["form"].validate(valid => {
         if (valid) {
           if(this.form.packageIds!=null){
             this.form.packageIds=(this.form.packageIds).toString()
           }
-		  if(this.form.storeIds!=null){
-		    this.form.storeIds=(this.form.storeIds).toString()
-		  }
-	
+          if(this.form.storeIds!=null){
+            this.form.storeIds=(this.form.storeIds).toString()
+          }
           this.form.cityIds=(this.form.cityIds).toString()
           if (this.form.doctorId != null) {
             this.form.doctorType=1;

+ 11 - 7
src/views/his/doctor/type2.vue

@@ -546,13 +546,14 @@ export default {
       depList:[],
       userName: {name:"1"},
       userList:[],
-      auditTypeOptions:[{
-          dictValue: '1',
-          dictLabel: '西药'
-        }, {
-          dictValue: '2',
-          dictLabel: '中药'
-        }],
+      // auditTypeOptions:[{
+      //     dictValue: '1',
+      //     dictLabel: '西药'
+      //   }, {
+      //     dictValue: '2',
+      //     dictLabel: '中药'
+      //   }],
+      auditTypeOptions:[],
       //医院列表
       hospitalList:[],
       // 遮罩层
@@ -710,6 +711,9 @@ export default {
     this.getDicts("sys_store_order_type").then(response => {
       this.StoreOrderType = response.data;
     });
+    this.getDicts("sys_product_type").then(response => {
+      this.auditTypeOptions = response.data;
+    });
 
 
     this.getdeplist();

+ 64 - 2
src/views/his/integralOrder/index.vue

@@ -52,7 +52,36 @@
        <el-form-item label="提交时间" prop="createTime">
                  <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="change"></el-date-picker>
               </el-form-item>
-
+      <el-form-item label="销售公司" prop="companyId">
+        <el-select v-model="queryParams.companyId" placeholder="销售公司"  size="small" @change="getAllUserlist(queryParams.companyId)" clearable>
+          <el-option
+            v-for="dict in qwCompanyList"
+            :key="dict.companyId"
+            :label="dict.companyName"
+            :value="dict.companyId"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="销售账号" prop="userId">
+        <el-select v-model="queryParams.companyUserId" placeholder="销售账号"  size="small" clearable>
+          <el-option
+            v-for="dict in companyUserNameList"
+            :key="dict.userId"
+            :label="dict.userName"
+            :value="dict.userId"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="企微微信" prop="companyUserName">
+        <el-select v-model="queryParams.qwUserId" placeholder="企微微信"  size="small" clearable>
+          <el-option
+            v-for="dict in qwUserList"
+            :key="dict.id"
+            :label="dict.qwUserName"
+            :value="dict.id"
+          />
+        </el-select>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -105,6 +134,9 @@
       <el-table-column label="快递单号" align="center" prop="deliverySn" />
       <el-table-column label="发货时间" align="center" prop="deliveryTime" width="180"/>
       <el-table-column label="提交时间" align="center" prop="createTime" width="180"/>
+      <el-table-column label="销售公司ID" align="center" prop="companyId" width="180"/>
+      <el-table-column label="销售ID" align="center" prop="companyUserId" width="180"/>
+      <el-table-column label="企业微信ID" align="center" prop="qwUserId" width="180"/>
       <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip/>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
         <template slot-scope="scope">
@@ -226,6 +258,10 @@
 import {importTemplate, listIntegralOrder,importExpressTemplate, getIntegralOrder, delIntegralOrder, addIntegralOrder, updateIntegralOrder, exportIntegralOrder } from "@/api/his/integralOrder";
 import integralOrderDetails from '../../components/his/integralOrderDetails.vue';
 import { getToken } from "@/utils/auth";
+import {getCompanyList} from "@/api/company/company";
+import {getAllUserlist} from "@/api/company/companyUser";
+import {getQwUserInfo} from "@/api/qw/qwUser";
+
 export default {
   name: "IntegralOrder",
   components: { integralOrderDetails },
@@ -284,8 +320,14 @@ export default {
         createTime: null,
         sTime:null,
         eTime:null,
+        companyUserId:null,
+        qwUserId:null,
+        companyId:null,
       },
        createTime:null,
+      qwCompanyList:[],
+      companyUserNameList:[],
+      qwUserList:[],
       // 表单参数
       form: {},
       // 表单校验
@@ -304,6 +346,12 @@ export default {
     this.getDicts("sys_integral_order_status").then(response => {
       this.statusOptions = response.data;
     });
+
+
+    //获取企业
+    getCompanyList().then(response => {
+      this.qwCompanyList = response.data;
+    });
   },
   methods: {
     change(){
@@ -381,7 +429,6 @@ export default {
         remark: null,
         sTime:null,
         eTime:null,
-        createTime:null,
       };
       this.resetForm("form");
     },
@@ -396,6 +443,9 @@ export default {
       this.createTime=null;
       this.queryParams.sTime=null;
       this.queryParams.eTime=null;
+      this.queryParams.qwUserId=null;
+      this.queryParams.companyId=null;
+      this.queryParams.companyUserId=null;
       this.handleQuery();
 
     },
@@ -477,6 +527,18 @@ export default {
           this.download(response.msg);
           this.exportLoading = false;
         }).catch(() => {});
+    },
+    //选择企业后触发
+    getAllUserlist(companyId){
+      if(companyId){
+        getAllUserlist({companyId}).then(response => {
+          this.companyUserNameList=response.data;
+        });
+        //企业微信
+        getQwUserInfo({companyId}).then(response => {
+          this.qwUserList=response.data;
+        })
+      }
     }
   }
 };

+ 8 - 8
src/views/his/package/index.vue

@@ -147,16 +147,16 @@
 
     <el-table height="600" v-loading="loading" border :data="packageList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="ID" align="center" prop="packageId" />
+      <el-table-column label="ID" align="center" prop="packageId" width="100px"/>
       <el-table-column label="套餐包名称" align="center" prop="packageName" />
       <el-table-column label="别名" align="center" prop="secondName" />
-      <el-table-column label="排序" align="center" prop="sort" />
-      <el-table-column label="状态" align="center" prop="status">
+      <el-table-column label="排序" align="center" prop="sort" width="50px"/>
+      <el-table-column label="状态" align="center" prop="status" width="65px">
         <template slot-scope="scope">
           <dict-tag :options="statusOptions" :value="scope.row.status"/>
         </template>
       </el-table-column>
-      <el-table-column label="类型" align="center" prop="packageType">
+      <el-table-column label="类型" align="center" prop="packageType" width="70px">
         <template slot-scope="scope">
           <dict-tag :options="packageTypeOptions" :value="scope.row.packageType"/>
         </template>
@@ -166,14 +166,14 @@
           <dict-tag :options="packageSubTypeOptions" :value="scope.row.packageSubType"/>
         </template>
       </el-table-column>
-      <el-table-column label="是否展示" align="center" prop="isShow">
+      <el-table-column label="是否展示" align="center" prop="isShow" width="75px">
         <template slot-scope="scope">
           <dict-tag :options="orOptions" :value="scope.row.isShow"/>
         </template>
       </el-table-column>
-      <el-table-column label="创建时间" align="center" prop="createTime"/>
-      <el-table-column label="更改时间" align="center" prop="updateTime"/>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150px">
+      <el-table-column label="创建时间" align="center" prop="createTime" width="180px"/>
+      <el-table-column label="更改时间" align="center" prop="updateTime" width="180px"/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180px">
         <template slot-scope="scope">
           <el-button
             size="mini"

+ 2 - 1
src/views/his/patient/index.vue

@@ -262,6 +262,7 @@ export default {
   components: {patientDetails},
   data() {
     return {
+      addPatientInfo: process.env.VUE_APP_ADD_PATIENT,
       show:{
               title:"患者详情",
               open:false,
@@ -431,7 +432,7 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加病人";
+      this.title = this.addPatientInfo||"添加病人";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {

+ 426 - 155
src/views/his/storeOrder/order1.vue

@@ -235,16 +235,16 @@
               />
         </el-select>
       </el-form-item>
-	<el-form-item label="订单来源" prop="source">
-	  <el-select v-model="queryParams.source" placeholder="请选择是否支付" clearable size="small">
-	    <el-option
-	      v-for="dict in sourceOptions"
-	      :key="dict.dictValue"
-	      :label="dict.dictLabel"
-	      :value="dict.dictValue"
-	    />
-	  </el-select>
-	</el-form-item>
+      <el-form-item label="订单来源" prop="source">
+        <el-select v-model="queryParams.source" placeholder="请选择是否支付" clearable size="small">
+          <el-option
+            v-for="dict in sourceOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
 
       <el-form-item label="下单时间" prop="createTime">
             <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeTime"></el-date-picker>
@@ -265,123 +265,162 @@
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
-    </el-form>
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          :loading="exportLoading"
-          @click="handleExport"
-          v-hasPermi="['his:storeOrder:export']"
-        >财务导出</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          :loading="exportLoading"
-          @click="handleOrderExport"
-          v-hasPermi="['store:storeOrder:export']"
-        >导出订单</el-button>
+      </el-form>
+      <el-row :gutter="10" class="mb8">
+        <el-col :span="1.5">
+          <el-button
+            type="warning"
+            plain
+            icon="el-icon-download"
+            size="mini"
+            :loading="exportLoading"
+            @click="handleExport"
+            v-hasPermi="['his:storeOrder:export']"
+          >财务导出</el-button>
         </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="info"
-          plain
-          icon="el-icon-upload2"
-          size="mini"
-          @click="handleImport"
-          v-hasPermi="['his:storeOrder:exportDeliver']"
-        >导入发货</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="info"
-          plain
-          icon="el-icon-upload2"
-          size="mini"
-          @click="handleImportExpress"
-          v-hasPermi="['store:storeOrder:importExpress']"
-        >导入银行回单</el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-    <el-tabs type="card" v-model="actName" @tab-click="handleClickX">
-      <el-tab-pane label="全部订单" name="10"></el-tab-pane>
-      <el-tab-pane v-for="(item,index) in orderOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
-    </el-tabs>
-    <el-table height="500" v-loading="loading" border :data="orderList" @selection-change="handleSelectionChange" >
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="处方单编号" align="center" prop="prescribeCode" width="180px"/>
-      <el-table-column label="药品订单号" align="center" prop="orderCode" width="180px"/>
-      <el-table-column label="所属公司" align="center" prop="companyName" />
-      <el-table-column label="员工" align="center" prop="companyUserName" />
-      <el-table-column label="店铺名称" align="center" prop="storeName" />
-      <el-table-column label="就诊人" align="center" prop="patientName" />
-      <el-table-column label="收货人" align="center" prop="userName" />
-      <el-table-column label="套餐名称" align="center" prop="packageName" />
-      <el-table-column label="套餐别名" align="center" prop="packageSecondName" width="100px"/>
-      <el-table-column label="应收金额" align="center" prop="payPrice" />
-      <el-table-column label="实收金额" align="center" prop="payMoney" />
-      <el-table-column label="支付方式" align="center" prop="payType" >
-       <template slot-scope="scope">
-              <dict-tag :options="PayOptions" :value="scope.row.payType"/>
-         </template>
-       </el-table-column>
-        <el-table-column label="下单时间" align="center" prop="createTime" width="180" />
-        <el-table-column label="支付时间" align="center" prop="payTime" width="180" />
-        <el-table-column label="订单状态" align="center" prop="status" >
-          <template slot-scope="scope">
-                <dict-tag :options="orderOptions" :value="scope.row.status"/>
-           </template>
-        </el-table-column>
-		<el-table-column label="订单来源" align="center" prop="source" >
-		  <template slot-scope="scope">
-		     <dict-tag :options="sourceOptions" :value="scope.row.source"/>
-		  </template>
-		</el-table-column>
-     <el-table-column label="物流状态" align="center" prop="deliveryStatus" >
-       <template slot-scope="scope">
-             <dict-tag :options="deliveryStatusOptions" :value="scope.row.deliveryStatus"/>
-        </template>
-     </el-table-column>
-	 <el-table-column label="结算状态" align="center" prop="deliveryPayStatus" >
-      <template slot-scope="scope">
-            <dict-tag :options="deliveryPayStatusOptions" :value="scope.row.deliveryPayStatus"/>
-       </template>
-      </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="100px">
-      <template slot-scope="scope">
+        <el-col :span="1.5">
+          <el-button
+            type="warning"
+            plain
+            icon="el-icon-download"
+            size="mini"
+            :loading="exportLoading"
+            @click="handleOrderExport"
+            v-hasPermi="['store:storeOrder:export']"
+          >导出订单</el-button>
+          </el-col>
+        <el-col :span="1.5">
           <el-button
+            type="info"
+            plain
+            icon="el-icon-upload2"
+            size="mini"
+            @click="handleImport"
+            v-hasPermi="['his:storeOrder:exportDeliver']"
+          >导入发货</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button
+            type="info"
+            plain
+            icon="el-icon-upload2"
+            size="mini"
+            @click="handleImportExpress"
+            v-hasPermi="['store:storeOrder:importExpress']"
+          >导入银行回单</el-button>
+        </el-col>
+        <el-col :span="1.5" v-if="orderStatus == 5"> <!--待推送erp-->
+          <el-tooltip content="默认erp推送手机号" placement="top">
+            <el-button
+              type="warning"
+              plain
+              icon="el-icon-phone"
+              size="mini"
+              @click="handleErpPhone"
+              v-hasPermi="['store:storeOrder:erpphone']"
+            >推送手机号码</el-button>
+          </el-tooltip>
+        </el-col>
+        <el-col :span="1.5" v-if="orderStatus == 5">
+          <el-tooltip content="批量设置erp推送手机号" placement="top">
+            <el-button
+              type="warning"
+              plain
+              icon="el-icon-phone"
               size="mini"
-              type="text"
-              @click="handledetails(scope.row)"
-            >查看
-            </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-drawer
-        :with-header="false"
-        size="75%"
-         :title="show.title" :visible.sync="show.open">
-     <storeOrderDetails  ref="Details" />
-   </el-drawer>
-  <!-- 用户导入对话框 -->
+              :disabled="multiple"
+              @click="setErpPhone"
+              v-hasPermi="['his:storeOrder:createErpOrder']"
+            >设置推送手机</el-button>
+          </el-tooltip>
+        </el-col>
+        <el-col :span="1.5" v-if="orderStatus == 5">
+          <el-tooltip content="批量推送erp" placement="top">
+            <el-button
+              type="warning"
+              plain
+              icon="el-icon-s-cooperation"
+              size="mini"
+              :disabled="multiple"
+              @click="createErpOrder"
+              v-hasPermi="['his:storeOrder:createErpOrder']"
+            >创建erp</el-button>
+          </el-tooltip>
+        </el-col>
+        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      </el-row>
+      <el-tabs type="card" v-model="actName" @tab-click="handleClickX">
+        <el-tab-pane label="全部订单" name="10"></el-tab-pane>
+        <el-tab-pane v-for="(item,index) in orderOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
+      </el-tabs>
+      <el-table height="500" v-loading="loading" border :data="orderList" @selection-change="handleSelectionChange" >
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="处方单编号" align="center" prop="prescribeCode" width="180px"/>
+        <el-table-column label="药品订单号" align="center" prop="orderCode" width="180px"/>
+        <el-table-column label="所属公司" align="center" prop="companyName" />
+        <el-table-column label="员工" align="center" prop="companyUserName" />
+        <el-table-column label="店铺名称" align="center" prop="storeName" />
+        <el-table-column label="就诊人" align="center" prop="patientName" />
+        <el-table-column label="收货人" align="center" prop="userName" />
+        <el-table-column label="套餐名称" align="center" prop="packageName" />
+        <el-table-column label="套餐别名" align="center" prop="packageSecondName" width="100px"/>
+        <el-table-column label="应收金额" align="center" prop="payPrice" />
+        <el-table-column label="实收金额" align="center" prop="payMoney" />
+        <el-table-column label="支付方式" align="center" prop="payType" >
+        <template slot-scope="scope">
+                <dict-tag :options="PayOptions" :value="scope.row.payType"/>
+          </template>
+        </el-table-column>
+          <el-table-column label="下单时间" align="center" prop="createTime" width="180" />
+          <el-table-column label="支付时间" align="center" prop="payTime" width="180" />
+          <el-table-column label="订单状态" align="center" prop="status" >
+            <template slot-scope="scope">
+                  <dict-tag :options="orderOptions" :value="scope.row.status"/>
+            </template>
+          </el-table-column>
+        <el-table-column label="订单来源" align="center" prop="source" >
+          <template slot-scope="scope">
+            <dict-tag :options="sourceOptions" :value="scope.row.source"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="物流状态" align="center" prop="deliveryStatus" >
+          <template slot-scope="scope">
+                <dict-tag :options="deliveryStatusOptions" :value="scope.row.deliveryStatus"/>
+            </template>
+        </el-table-column>
+        <el-table-column label="结算状态" align="center" prop="deliveryPayStatus" >
+          <template slot-scope="scope">
+                <dict-tag :options="deliveryPayStatusOptions" :value="scope.row.deliveryPayStatus"/>
+          </template>
+        </el-table-column>
+        <el-table-column label="ERP电话" align="center" prop="erpPhone" v-if="orderStatus == 5"/>
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
+          <template slot-scope="scope">
+              <el-button
+                  size="mini"
+                  type="text"
+                  @click="handledetails(scope.row)"
+                >查看
+                </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-drawer
+            :with-header="false"
+            size="75%"
+            :title="show.title" :visible.sync="show.open">
+        <storeOrderDetails  ref="Details" />
+      </el-drawer>
+      <!-- 用户导入对话框 -->
 
-  <el-dialog :title="importExpress.title" :visible.sync="importExpress.open" width="400px" append-to-body>
+      <el-dialog :title="importExpress.title" :visible.sync="importExpress.open" width="400px" append-to-body>
         <el-upload
           ref="importExpress"
           :limit="1"
@@ -398,7 +437,7 @@
           <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
           <div class="el-upload__tip text-center" slot="tip">
             <div class="el-upload__tip" slot="tip">
-         <!--     <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的数据 -->
+        <!--     <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的数据 -->
             </div>
             <span>仅允许导入xls、xlsx格式文件。</span>
             <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplateExpress">下载模板</el-link>
@@ -410,41 +449,104 @@
         </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">
+      <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>
-          <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-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="erpPhone.title" :visible.sync="erpPhone.open" width="600px" append-to-body>
+      <div style="margin-bottom: 20px;">
+        <el-button type="primary" size="small" @click="handleAddPhone">新增手机号</el-button>
+      </div>
+      <el-table :data="phoneList" border style="width: 100%">
+        <el-table-column prop="phone" label="手机号" align="center">
+          <template slot-scope="scope">
+            <el-input 
+              v-if="scope.row.editing" 
+              v-model="scope.row.phone" 
+              placeholder="请输入手机号"
+              @blur="validatePhone(scope.row)"
+              @keyup.enter.native="handleSavePhone(scope.$index)"
+            />
+            <span v-else>{{ scope.row.phone }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" width="300">
+          <template slot-scope="scope">
+            <el-button 
+              v-if="scope.row.editing" 
+              type="success" 
+              size="mini" 
+              @click="handleSavePhone(scope.$index)"
+            >保存</el-button>
+            <el-button 
+              v-if="scope.row.editing" 
+              type="info" 
+              size="mini" 
+              @click="handleCancelEdit(scope.$index)"
+            >取消</el-button>
+            <el-button 
+              v-if="!scope.row.editing" 
+              type="primary" 
+              size="mini" 
+              @click="handleEditPhone(scope.$index)"
+            >修改</el-button>
+            <el-button 
+              type="danger" 
+              size="mini" 
+              @click="handleDeletePhone(scope.$index)"
+            >删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="handleSavePhoneList">确 定</el-button>
+        <el-button @click="handleCancelPhoneDialog">取 消</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :title="erpPhone.title" :visible.sync="setPhoneOpen" width="600px" append-to-body>
+      <el-select v-model="erpPhoneValue" placeholder="请选择">
+        <el-option
+          v-for="item in phoneList"
+          :key="item.phone"
+          :label="item.phone"
+          :value="item.phone">
+        </el-option>
+      </el-select>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitErpPhone">确 定</el-button>
+        <el-button @click="handleCancelErpPhone">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { listOrder, getOrder, delOrder, addOrder,importExpressTemplate, updateOrder, exportOrder,importTemplate,exportOrder2 } from "@/api/his/storeOrder";
+import { listOrder, getOrder, delOrder, addOrder,importExpressTemplate, updateOrder, exportOrder,importTemplate,exportOrder2,queryErpPhone,saveErpPhone,editErpPhone,batchCreateErpOrder } from "@/api/his/storeOrder";
 import storeOrderDetails from '../../components/his/storeOrderDetails.vue';
 import { getToken } from "@/utils/auth";
 import {listStore} from "@/api/his/storeProduct";
@@ -463,6 +565,15 @@ export default {
   },
   data() {
     return {
+      erpPhoneValue:null,
+      setPhoneOpen:false,
+      erpPhone:{
+        open:false,
+        title:"设置推送手机号"
+      },
+      phoneList: [], // 手机号列表
+      originalPhoneList: [], // 原始手机号列表,用于取消时恢复
+      orderStatus:null,
       scheduleOptions:[],
       companys:[],
       deptOptions:[],
@@ -673,6 +784,165 @@ export default {
 
   },
   methods: {
+    createErpOrder(){
+      this.$confirm('确认创建erp?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        batchCreateErpOrder(this.ids).then(response=>{
+          if(response.code == 200){
+            this.$message.success('创建成功');
+            this.getList();
+          }
+        })
+        
+      });
+    },
+    handleCancelErpPhone(){
+      this.erpPhoneValue = null;
+      this.setPhoneOpen = false;
+    },
+    submitErpPhone(){
+      const param = {orderIds:this.ids,erpPhone:this.erpPhoneValue};
+      editErpPhone(param).then(response=>{
+        this.msgSuccess("修改成功");
+        this.setPhoneOpen = false;
+        this.getList();
+      })
+    },
+    setErpPhone(){
+      this.getErpPhoneList();
+      this.setPhoneOpen = true;
+    },
+    // 设置推送手机相关方法
+    handleErpPhone(){
+      //查询配置手机号
+      this.getErpPhoneList();
+      this.erpPhone.open = true
+    },
+    getErpPhoneList(){
+      queryErpPhone().then(response =>{
+        if(response.data && response.data != null && response.data.length >0){
+          const phones = response.data.filter(phone => phone.trim());
+          this.phoneList = phones.map(phone => ({
+            phone: phone.trim(),
+            editing: false,
+            originalPhone: phone.trim()
+          }));
+        }
+        
+        // 保存原始数据用于取消操作
+        this.originalPhoneList = this.phoneList;
+      });
+    },
+    // 新增手机号
+    handleAddPhone() {
+      this.phoneList.push({
+        phone: '',
+        editing: true,
+        originalPhone: '',
+        isNew: true
+      });
+    },
+    // 编辑手机号
+    handleEditPhone(index) {
+      this.$set(this.phoneList[index], 'editing', true);
+      this.$set(this.phoneList[index], 'originalPhone', this.phoneList[index].phone);
+    },
+    // 保存手机号
+    handleSavePhone(index) {
+      const phone = this.phoneList[index].phone.trim();
+      if (!phone) {
+        this.$message.error('手机号不能为空');
+        return;
+      }
+      if (!this.validatePhoneFormat(phone)) {
+        this.$message.error('请输入正确的手机号格式');
+        return;
+      }
+      // 检查是否重复
+      const duplicateIndex = this.phoneList.findIndex((item, idx) => 
+        idx !== index && item.phone === phone
+      );
+      if (duplicateIndex !== -1) {
+        this.$message.error('手机号已存在');
+        return;
+      }
+      this.$set(this.phoneList[index], 'editing', false);
+      this.$set(this.phoneList[index], 'isNew', false);
+    },
+    // 取消编辑
+    handleCancelEdit(index) {
+      if (this.phoneList[index].isNew) {
+        // 如果是新增的,直接删除
+        this.phoneList.splice(index, 1);
+      } else {
+        // 如果是编辑的,恢复原值
+        this.$set(this.phoneList[index], 'phone', this.phoneList[index].originalPhone);
+        this.$set(this.phoneList[index], 'editing', false);
+      }
+    },
+    // 删除手机号
+    handleDeletePhone(index) {
+      this.$confirm('确认删除该手机号?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.phoneList.splice(index, 1);
+        this.$message.success('删除成功');
+      });
+    },
+    // 验证手机号格式
+    validatePhoneFormat(phone) {
+      const phoneRegex = /^1[3-9]\d{9}$/;
+      return phoneRegex.test(phone);
+    },
+    // 验证手机号
+    validatePhone(row) {
+      if (row.phone && !this.validatePhoneFormat(row.phone)) {
+        this.$message.error('请输入正确的手机号格式');
+      }
+    },
+    // 保存手机号列表
+    handleSavePhoneList() {
+      // 检查是否有正在编辑的项
+      const editingItem = this.phoneList.find(item => item.editing);
+      if (editingItem) {
+        this.$message.error('请先保存正在编辑的手机号');
+        return;
+      }
+      
+      // 检查是否有空的手机号
+      const emptyPhone = this.phoneList.find(item => !item.phone.trim());
+      if (emptyPhone) {
+        this.$message.error('存在空的手机号,请删除或填写完整');
+        return;
+      }
+      
+      // 构造手机号列表
+      const phoneList = this.phoneList.map(item => item.phone);
+      
+      // 调用保存接口
+      saveErpPhone(phoneList).then(response => {
+        if (response.code === 200) {
+          this.$message.success('保存成功');
+          this.erpPhone.open = false;
+        } else {
+          this.$message.error(response.msg || '保存失败');
+        }
+      }).catch(() => {
+        this.$message.error('保存失败');
+      });
+    },
+    // 取消手机号对话框
+    handleCancelPhoneDialog() {
+      // 恢复原始数据
+      this.phoneList = JSON.parse(JSON.stringify(this.originalPhoneList));
+      this.erpPhone.open = false;
+    },
+    
     handleImportExpress() {
           this.importExpress.title = "导入";
           this.importExpress.open = true;
@@ -843,6 +1113,7 @@ export default {
       this.getList();
     },
    handleClickX(tab, event) {
+    this.orderStatus = tab.name;
     if(tab.name=="10"){
       this.queryParams.status=null;
     }else{
@@ -1114,4 +1385,4 @@ export default {
     },
   }
 };
-</script>
+</script>

+ 225 - 5
src/views/his/user/index.vue

@@ -1,6 +1,40 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="所属公司" prop="companyName">
+        <el-select
+          v-model="queryCompanyId"
+          placeholder="请选择所属公司"
+          clearable
+          filterable 
+          size="small"
+          @change="handleQueryCompanyChange"
+        >
+          <el-option
+            v-for="item in companyQueryOptions"
+            :key="item.companyId"
+            :label="item.companyName"
+            :value="item.companyId">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="所属销售" prop="companyUserId">
+        
+        <el-select
+          v-model="queryCompanyUserId"
+          placeholder="请选择所属销售"
+          clearable
+          filterable 
+          size="small"
+        >
+          <el-option
+            v-for="item in companyQueryUserOptions"
+            :key="item.userId"
+            :label="item.nickName"
+            :value="item.userId">
+          </el-option>
+        </el-select>
+      </el-form-item>    
       <el-form-item label="会员ID" prop="userId">
         <el-input
           v-model="queryParams.userId"
@@ -66,16 +100,28 @@
                  />
         </el-select>
       </el-form-item>
-       <el-form-item label="注册时间" prop="createTime">
-                 <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="change"></el-date-picker>
-              </el-form-item>
+      <el-form-item label="注册时间" prop="createTime">
+                <el-date-picker v-model="createTime" size="small" style="width: 230px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="change"></el-date-picker>
+      </el-form-item>
+          
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
+      
     </el-form>
 
     <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-user"
+          size="mini"
+          @click="handleChangeCompanyUser"
+          :disabled="multiple"
+          v-hasPermi="['company:companyUser:change']"
+        >更换会员归属</el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -110,7 +156,8 @@
               <dict-tag :options="userOptions" :value="scope.row.status"/>
          </template>
       </el-table-column>
-
+      <el-table-column label="所属公司" align="center" prop="companyName" />
+      <el-table-column label="所属销售" align="center" prop="companyUserNickName" />
       <el-table-column label="上级昵称" align="center" prop="tuiName" />
       <el-table-column label="app来源" align="center" prop="source" />
       <el-table-column label="登陆设备" align="center" prop="loginDevice" />
@@ -186,18 +233,73 @@
          <userDetails  ref="userDetails" />
        </el-drawer>
 
-
+    <!-- 更换会员归属对话框 -->
+    <el-dialog title="更换会员归属" :visible.sync="changeCompanyUserOpen" width="500px" append-to-body>
+      <el-form ref="changeCompanyUserForm" :model="changeCompanyUserForm" :rules="changeCompanyUserRules" label-width="100px">
+        <el-form-item label="选择公司" prop="companyId">
+          <el-select v-model="changeCompanyUserForm.companyId" placeholder="请选择公司" style="width: 100%" @change="handleCompanyChange">
+            <el-option
+              v-for="item in companyOptions"
+              :key="item.companyId"
+              :label="item.companyName"
+              :value="item.companyId"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="选择销售" prop="companyUserId">
+          <el-select v-model="changeCompanyUserForm.companyUserId" placeholder="请选择销售" style="width: 100%" @change="handleCompanyUserChange">
+            <el-option
+              v-for="item in companyUserOptions"
+              :key="item.userId"
+              :label="item.nickName + '_' + item.userName"
+              :value="item.userId"
+            />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitChangeCompanyUserForm">确 定</el-button>
+        <el-button @click="cancelChangeCompanyUser">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import { listUser, getUser, delUser, addUser, updateUser, exportUser } from "@/api/his/user";
+import { getCompanyUserList, changeCompanyUser, getCompanyList } from '@/api/company/companyUser';
 import userDetails from '../../components/his/userDetails.vue';
+
 export default {
   name: "User",
   components: {userDetails},
   data() {
     return {
+      companyQueryOptions:[],
+      companyQueryUserOptions:[],
+      queryCompanyId:null,
+      queryCompanyUserId:null,
+      companyName: null,
+      companyUserNickName: null,
+      // 更换会员归属表单校验
+      changeCompanyUserRules: {
+        companyId: [
+          { required: true, message: '请选择公司', trigger: 'change' }
+        ],
+        companyUserId: [
+          { required: true, message: '请选择销售', trigger: 'change' }
+        ]
+      },
+      companyOptions: [],
+      companyUserOptions: [],
+      // 更换会员归属对话框
+      changeCompanyUserOpen: false,
+      // 更换会员归属表单
+      changeCompanyUserForm: {
+        companyId: null,
+        companyUserId: null,
+        userIds: []
+      },
       show:{
               title:"用户详情",
               open:false,
@@ -274,8 +376,20 @@ export default {
     this.getDicts("sys_company_or").then(response => {
       this.orOptions = response.data;
     });
+    getCompanyList().then(response => {
+        if (response.code === 200) {
+          this.companyQueryOptions = response.data;
+        }});
   },
   methods: {
+    /** 销售选择变化 */
+    handleCompanyUserChange(userId) {
+      if (!this.changeCompanyUserForm.companyId) {
+        this.$message.warning('请先选择公司');
+        this.changeCompanyUserForm.companyUserId = null;
+        return;
+      }
+    },
     change(){
           if(this.createTime!=null){
             this.queryParams.sTime=this.createTime[0];
@@ -291,6 +405,46 @@ export default {
                  this.$refs.userDetails.getDetails(row.userId);
             }, 1);
      },
+     handleQueryCompanyChange(companyId){
+      // 清空已选择的销售
+      this.queryCompanyUserId = null;
+      // 根据公司ID获取对应的销售列表
+      if (companyId) {
+        getCompanyUserList({ companyId: companyId }).then(response => {
+          if (response.code === 200) {
+            this.companyQueryUserOptions = response.data;
+          } else {
+            this.$message.error(response.msg || '获取销售列表失败');
+            this.companyQueryUserOptions = [];
+          }
+        }).catch(() => {
+          this.$message.error('获取销售列表失败');
+          this.companyQueryUserOptions = [];
+        });
+      } else {
+        this.companyQueryUserOptions = [];
+      }
+     },
+    handleCompanyChange(companyId) {
+      // 清空已选择的销售
+      this.changeCompanyUserForm.companyUserId = null;
+      // 根据公司ID获取对应的销售列表
+      if (companyId) {
+        getCompanyUserList({ companyId: companyId }).then(response => {
+          if (response.code === 200) {
+            this.companyUserOptions = response.data;
+          } else {
+            this.$message.error(response.msg || '获取销售列表失败');
+            this.companyUserOptions = [];
+          }
+        }).catch(() => {
+          this.$message.error('获取销售列表失败');
+          this.companyUserOptions = [];
+        });
+      } else {
+        this.companyUserOptions = [];
+      }
+    },
     /** 查询用户列表 */
     getList() {
       this.loading = true;
@@ -333,6 +487,8 @@ export default {
     /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.pageNum = 1;
+      this.queryParams.companyId = this.queryCompanyId;
+      this.queryParams.companyUserId = this.queryCompanyUserId;
       this.getList();
     },
     /** 重置按钮操作 */
@@ -341,6 +497,10 @@ export default {
        this.createTime=null;
       this.queryParams.sTime=null;
       this.queryParams.eTime=null;
+      this.queryParams.companyName = null;
+      this.queryParams.companyUserNickName = null;
+      this.queryParams.companyId = null;
+      this.queryParams.companyUserId = null;
       this.handleQuery();
     },
     // 多选框选中数据
@@ -414,6 +574,66 @@ export default {
           this.download(response.msg);
           this.exportLoading = false;
         }).catch(() => {});
+    },
+    /** 更换会员归属按钮操作 */
+    handleChangeCompanyUser() {
+      // 获取公司下拉列表
+      getCompanyList().then(response => {
+        if (response.code === 200) {
+          this.companyOptions = response.data;
+          // 重置表单和销售列表
+          this.resetCompanyUserForm();
+          this.companyUserOptions = [];
+          this.changeCompanyUserOpen = true;
+        } else {
+          this.$message.error(response.msg || '获取公司列表失败');
+        }
+      }).catch(() => {
+        this.$message.error('获取公司列表失败');
+      });
+    },
+
+    /** 取消更换会员归属 */
+    cancelChangeCompanyUser() {
+      this.changeCompanyUserOpen = false;
+      this.resetCompanyUserForm();
+    },
+    /** 重置更换会员归属表单 */
+    resetCompanyUserForm() {
+      this.changeCompanyUserForm = {
+        companyId: null,
+        companyUserId: null,
+        userIds: []
+      };
+      this.resetForm("changeCompanyUserForm");
+    },
+    /** 提交更换会员归属 */
+    submitChangeCompanyUserForm() {
+      this.$refs["changeCompanyUserForm"].validate(valid => {
+        if (valid) {
+          // 调用更换会员归属接口
+          // 检查companyId是否已设置
+          if (!this.changeCompanyUserForm.companyId) {
+            this.$message.error('请选择公司');
+            return;
+          }
+
+          changeCompanyUser(this.ids, {
+            companyUserId: this.changeCompanyUserForm.companyUserId,
+            companyId: this.changeCompanyUserForm.companyId
+          }).then(response => {
+            if (response.code === 200) {
+              this.msgSuccess("操作成功");
+              this.changeCompanyUserOpen = false;
+              this.getList();
+            } else {
+              this.$message.error(response.msg || '操作失败');
+            }
+          }).catch(() => {
+            this.$message.error('操作失败');
+          });
+        }
+      });
     }
   }
 };

部分文件因为文件数量过多而无法显示