Просмотр исходного кода

'feat:主题修改,新增左侧快捷入口,区分月报功能'

韩洋 11 месяцев назад
Родитель
Сommit
54695ed8ed
100 измененных файлов с 1316 добавлено и 1435 удалено
  1. BIN
      src/assets/bg/bg-blue_1.png
  2. 8 0
      src/assets/bg/bg-blue_1.svg
  3. BIN
      src/assets/bg/bg-blue_2.png
  4. 13 0
      src/assets/bg/bg-blue_2.svg
  5. BIN
      src/assets/bg/bg-green-1.png
  6. 35 0
      src/assets/bg/bg-green-1.svg
  7. 0 0
      src/assets/chat-aside/chat-new-btn_b.svg
  8. 0 0
      src/assets/chat-aside/chat-new-btn_c.svg
  9. 39 0
      src/assets/chat-aside/empty_a.svg
  10. 39 0
      src/assets/chat-aside/empty_b.svg
  11. 39 0
      src/assets/chat-aside/empty_c.svg
  12. BIN
      src/assets/chat-input/submit_disabled.png
  13. BIN
      src/assets/chat-input/submit_disabled_b.png
  14. BIN
      src/assets/chat-input/submit_disabled_c.png
  15. BIN
      src/assets/chat-input/submit_normal.png
  16. BIN
      src/assets/chat-input/submit_normal_b.png
  17. BIN
      src/assets/chat-input/submit_normal_c.png
  18. BIN
      src/assets/chat-input/submit_stop.png
  19. BIN
      src/assets/chat-input/submit_stop_b.png
  20. BIN
      src/assets/chat-input/submit_stop_c.png
  21. 25 0
      src/assets/chat-input/toggle_up_down_a.svg
  22. BIN
      src/assets/chat-input/toggle_up_down_b.png
  23. BIN
      src/assets/chat-input/toggle_up_down_c.png
  24. 12 0
      src/assets/chat-report/rule_b.svg
  25. 12 0
      src/assets/chat-report/rule_c.svg
  26. 13 0
      src/assets/chat-report/table_b.svg
  27. 13 0
      src/assets/chat-report/table_c.svg
  28. 12 0
      src/assets/chat-tips/icon_question_a.svg
  29. 12 0
      src/assets/chat-tips/icon_question_b.svg
  30. 12 0
      src/assets/chat-tips/icon_question_c.svg
  31. BIN
      src/assets/chat-user/agent-bg.png
  32. BIN
      src/assets/chat-user/icon-more.png
  33. BIN
      src/assets/chat-user/user_a.png
  34. BIN
      src/assets/chat-user/user_b.png
  35. BIN
      src/assets/chat-user/user_c.png
  36. 0 0
      src/assets/chat-znws/icon_recommend_b.svg
  37. 0 0
      src/assets/chat-znws/icon_recommend_c.svg
  38. BIN
      src/assets/icon-robot/icon_blue_b-1.png
  39. BIN
      src/assets/icon-robot/icon_blue_b-2.png
  40. BIN
      src/assets/icon-robot/icon_blue_b-3.png
  41. BIN
      src/assets/icon-robot/icon_blue_b-4.png
  42. BIN
      src/assets/icon-robot/icon_blue_b-5.png
  43. BIN
      src/assets/icon-robot/icon_blue_b-6.png
  44. BIN
      src/assets/icon-robot/icon_blue_b-7.png
  45. BIN
      src/assets/icon-robot/icon_blue_b-8.png
  46. BIN
      src/assets/icon-robot/icon_blue_b-9.png
  47. BIN
      src/assets/icon-robot/icon_blue_c-1.png
  48. BIN
      src/assets/icon-robot/icon_blue_c-2.png
  49. BIN
      src/assets/icon-robot/icon_blue_c-3.png
  50. BIN
      src/assets/icon-robot/icon_blue_c-4.png
  51. BIN
      src/assets/icon-robot/icon_blue_c-5.png
  52. BIN
      src/assets/icon-robot/icon_blue_c-6.png
  53. BIN
      src/assets/icon-robot/icon_blue_c-7.png
  54. BIN
      src/assets/icon-robot/icon_blue_c-8.png
  55. BIN
      src/assets/icon-robot/icon_blue_c-9.png
  56. BIN
      src/assets/icon-robot/icon_green_a-1.png
  57. BIN
      src/assets/icon-robot/icon_green_a-2.png
  58. BIN
      src/assets/icon-robot/icon_green_a-3.png
  59. BIN
      src/assets/icon-robot/icon_green_a-4.png
  60. BIN
      src/assets/icon-robot/icon_green_a-5.png
  61. BIN
      src/assets/icon-robot/icon_green_a-6.png
  62. BIN
      src/assets/icon-robot/icon_green_a-7.png
  63. BIN
      src/assets/icon-robot/icon_green_a-8.png
  64. BIN
      src/assets/icon-robot/icon_green_a-9.png
  65. 39 0
      src/base/store/use-agent-used.js
  66. 18 0
      src/base/store/use-btn-auth.js
  67. 2 1
      src/base/store/use-theme.js
  68. 3 1
      src/base/theme.js
  69. 1 0
      src/base/theme/theme-dark.css
  70. 12 0
      src/base/theme/theme-green.css
  71. 10 10
      src/base/theme/theme-light.css
  72. 11 0
      src/base/theme/theme-party.css
  73. 0 315
      src/chat-item/Answer.vue
  74. 0 142
      src/chat-item/DialogActions.vue
  75. 0 101
      src/chat-item/DialogContent.vue
  76. 0 137
      src/chat-item/DialogReportContent.vue
  77. 0 48
      src/chat-item/Question.vue
  78. 0 77
      src/chat-item/Reference.vue
  79. 0 90
      src/chat-item/RobotIcons.vue
  80. 4 4
      src/components/DeleteModal.vue
  81. 27 0
      src/font.css
  82. 5 47
      src/modules/agent/AgentList.vue
  83. 15 16
      src/modules/chat-item/Answer.vue
  84. 3 3
      src/modules/chat-item/DialogBgclMerge.vue
  85. 6 9
      src/modules/chat-item/DialogContent.vue
  86. 14 4
      src/modules/chat-item/DialogMergeTable.vue
  87. 14 16
      src/modules/chat-item/ReportFile.vue
  88. 39 30
      src/modules/chat-item/RobotIcons.vue
  89. 23 19
      src/modules/chat-item/RuleAction.vue
  90. 100 66
      src/modules/chat-item/rule-action/RuleModel.vue
  91. 283 211
      src/modules/chat-item/rule-action/RuleTable.vue
  92. 14 11
      src/modules/chat-menu/ChatHistory.vue
  93. 36 22
      src/modules/chat-menu/ChatNew.vue
  94. 49 0
      src/modules/chat-menu/Empty.vue
  95. 11 12
      src/modules/chat-menu/HistoryEditModal.vue
  96. 233 0
      src/modules/chat-user/RecommendAgent.vue
  97. 10 9
      src/modules/chat-user/RouteItem.vue
  98. 18 25
      src/modules/chat-user/Tools.vue
  99. 17 0
      src/modules/chat-user/useAgentUsed.js
  100. 15 9
      src/modules/chat_files/AttachDetailTable.vue

BIN
src/assets/bg/bg-blue_1.png


Разница между файлами не показана из-за своего большого размера
+ 8 - 0
src/assets/bg/bg-blue_1.svg


BIN
src/assets/bg/bg-blue_2.png


Разница между файлами не показана из-за своего большого размера
+ 13 - 0
src/assets/bg/bg-blue_2.svg


BIN
src/assets/bg/bg-green-1.png


+ 35 - 0
src/assets/bg/bg-green-1.svg

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="2054px" height="1098px" viewBox="0 0 2054 1098" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>对话-背景</title>
+    <defs>
+        <linearGradient x1="100%" y1="50.9900598%" x2="1.86980988%" y2="45.0809788%" id="linearGradient-1">
+            <stop stop-color="#C2DFDF" offset="0%"></stop>
+            <stop stop-color="#83B4B3" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="0%" y1="20.244898%" x2="33.5815418%" y2="52.3111465%" id="linearGradient-2">
+            <stop stop-color="#0A817E" offset="0%"></stop>
+            <stop stop-color="#0A817E" stop-opacity="0" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="20.9166618%" y1="44.8595118%" x2="0%" y2="59.7869605%" id="linearGradient-3">
+            <stop stop-color="#5BD8C3" stop-opacity="0" offset="0%"></stop>
+            <stop stop-color="#5BD8C3" offset="64.0197327%"></stop>
+            <stop stop-color="#0A817E" offset="100%"></stop>
+        </linearGradient>
+        <filter x="-20.0%" y="-45.2%" width="140.0%" height="190.4%" filterUnits="objectBoundingBox" id="filter-4">
+            <feGaussianBlur stdDeviation="44" in="SourceGraphic"></feGaussianBlur>
+        </filter>
+        <filter x="-41.8%" y="-41.8%" width="183.6%" height="183.6%" filterUnits="objectBoundingBox" id="filter-5">
+            <feGaussianBlur stdDeviation="50" in="SourceGraphic"></feGaussianBlur>
+        </filter>
+    </defs>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="方案一#0A817E" transform="translate(134.000000, -114.000000)">
+            <g id="对话-背景" transform="translate(0.000000, 114.000000)">
+                <rect id="矩形" fill="url(#linearGradient-1)" x="0" y="0" width="1920" height="966"></rect>
+                <rect id="矩形" fill="url(#linearGradient-2)" x="0" y="0" width="385" height="297"></rect>
+                <rect id="矩形" fill="url(#linearGradient-3)" opacity="0.6" filter="url(#filter-4)" x="0" y="674" width="660" height="292"></rect>
+                <circle id="椭圆形" fill="#5BD8C3" filter="url(#filter-5)" cx="195.5" cy="494.5" r="179.5"></circle>
+            </g>
+        </g>
+    </g>
+</svg>

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
src/assets/chat-aside/chat-new-btn_b.svg


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
src/assets/chat-aside/chat-new-btn_c.svg


+ 39 - 0
src/assets/chat-aside/empty_a.svg

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="92px" height="92px" viewBox="0 0 92 92" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>暂无数据</title>
+    <defs>
+        <linearGradient x1="97.0204635%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
+            <stop stop-color="#53A6A4" offset="0%"></stop>
+            <stop stop-color="#B5D9D8" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-2">
+            <stop stop-color="#B5D9D8" offset="0%"></stop>
+            <stop stop-color="#53A6A4" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-3">
+            <stop stop-color="#228D8A" offset="0%"></stop>
+            <stop stop-color="#B5D9D8" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="0%" y1="52.2704874%" x2="100%" y2="47.7295126%" id="linearGradient-4">
+            <stop stop-color="#CEE6E5" offset="0%"></stop>
+            <stop stop-color="#9DCDCB" offset="100%"></stop>
+        </linearGradient>
+    </defs>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="桌面版" transform="translate(-217.000000, -366.000000)">
+            <g id="暂无数据" transform="translate(217.000000, 366.000000)">
+                <circle id="椭圆形" fill="#E6F2F2" cx="46" cy="46" r="46"></circle>
+                <path d="M81.6428237,57.0897808 C84.6412103,57.0299269 85.279533,61.193973 83.5577917,69.581919 L72.4791474,66.1063585 C72.1922724,62.3422938 72.5610635,59.9562554 73.5855207,58.9482431 C75.1222066,57.4362246 77.1452437,57.1795615 81.6428237,57.0897808 Z" id="路径-47" fill="url(#linearGradient-1)"></path>
+                <path d="M61.4544853,87.9491679 C66.5741672,87.9582684 70.2490545,85.2785017 72.4791474,79.9098678 C74.7349988,74.4792236 74.329868,68.8276737 75.4574042,62.7616716 C76.1657473,58.9508757 78.2275538,57.0602454 81.6428237,57.0897808 L51.6959697,57.0897808 C47.6099358,67.2323394 46.3686881,74.8390351 47.9722266,79.9098678 C49.5757652,84.9807005 54.0698514,87.6604672 61.4544853,87.9491679 Z" id="路径-46" fill="url(#linearGradient-2)"></path>
+                <path d="M21.7475772,17.8686119 C21.7047356,25.7699756 21.169735,31.4162032 20.1425754,34.8072948 C15.6682735,49.5788722 9.73640336,60.7828636 10.328143,69.6676376 C10.9009981,78.2688652 16.0976488,84.0150045 25.9180952,86.9060555 C51.6099286,87.6012908 63.455392,87.9489085 61.4544853,87.9489085 C58.4531254,87.9489085 55.0247733,84.7992641 56.7288764,77.065288 C60.6144808,59.4306901 72.4791474,42.8667189 72.4791474,29.0449039 C72.4791474,21.5940426 70.0154034,17.8686119 65.0879154,17.8686119 L21.7475772,17.8686119 Z" id="路径-45" fill="url(#linearGradient-3)"></path>
+                <path d="M12.6406078,29.0449039 L58.9254861,29.0449039 C59.319387,25.361473 59.9007207,22.8226333 60.669487,21.4283848 C61.4382534,20.0341364 62.9110628,18.8475454 65.0879154,17.8686119 L21.7475772,17.8686119 C19.3352315,18.1582714 17.5553665,19.00715 16.4079823,20.4152475 C15.2605981,21.823345 14.0048066,24.6998971 12.6406078,29.0449039 Z" id="路径-44" fill="url(#linearGradient-4)"></path>
+                <rect id="矩形" fill="#B5D9D8" x="38" y="38" width="23" height="5"></rect>
+                <rect id="矩形备份-6" fill="#CEE6E5" x="31" y="51" width="25" height="5"></rect>
+                <rect id="矩形备份-7" fill="#E6F2F2" x="28" y="64" width="25" height="6"></rect>
+                <circle id="椭圆形" fill="#B5D9D8" cx="29.5" cy="39.5" r="3.5"></circle>
+                <circle id="椭圆形备份-2" fill="#CEE6E5" cx="24" cy="53" r="4"></circle>
+                <circle id="椭圆形备份-3" fill="#E6F2F2" cx="20.5" cy="67.5" r="4.5"></circle>
+            </g>
+        </g>
+    </g>
+</svg>

+ 39 - 0
src/assets/chat-aside/empty_b.svg

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="92px" height="92px" viewBox="0 0 92 92" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>暂无数据</title>
+    <defs>
+        <linearGradient x1="97.0204635%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
+            <stop stop-color="#5F96B3" offset="0%"></stop>
+            <stop stop-color="#B9D1DF" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-2">
+            <stop stop-color="#B8D0DC" offset="0%"></stop>
+            <stop stop-color="#5F96B3" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-3">
+            <stop stop-color="#276F96" offset="0%"></stop>
+            <stop stop-color="#B5CEDC" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="0%" y1="52.2704874%" x2="100%" y2="47.7295126%" id="linearGradient-4">
+            <stop stop-color="#CFDFE7" offset="0%"></stop>
+            <stop stop-color="#A3C1D1" offset="100%"></stop>
+        </linearGradient>
+    </defs>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="桌面版备份-2" transform="translate(-217.000000, -366.000000)">
+            <g id="暂无数据" transform="translate(217.000000, 366.000000)">
+                <circle id="椭圆形" fill="#F0F5F8" cx="46" cy="46" r="46"></circle>
+                <path d="M81.6428237,57.0897808 C84.6412103,57.0299269 85.279533,61.193973 83.5577917,69.581919 L72.4791474,66.1063585 C72.1922724,62.3422938 72.5610635,59.9562554 73.5855207,58.9482431 C75.1222066,57.4362246 77.1452437,57.1795615 81.6428237,57.0897808 Z" id="路径-47" fill="url(#linearGradient-1)"></path>
+                <path d="M61.4544853,87.9491679 C66.5741672,87.9582684 70.2490545,85.2785017 72.4791474,79.9098678 C74.7349988,74.4792236 74.329868,68.8276737 75.4574042,62.7616716 C76.1657473,58.9508757 78.2275538,57.0602454 81.6428237,57.0897808 L51.6959697,57.0897808 C47.6099358,67.2323394 46.3686881,74.8390351 47.9722266,79.9098678 C49.5757652,84.9807005 54.0698514,87.6604672 61.4544853,87.9491679 Z" id="路径-46" fill="url(#linearGradient-2)"></path>
+                <path d="M21.7475772,17.8686119 C21.7047356,25.7699756 21.169735,31.4162032 20.1425754,34.8072948 C15.6682735,49.5788722 9.73640336,60.7828636 10.328143,69.6676376 C10.9009981,78.2688652 16.0976488,84.0150045 25.9180952,86.9060555 C51.6099286,87.6012908 63.455392,87.9489085 61.4544853,87.9489085 C58.4531254,87.9489085 55.0247733,84.7992641 56.7288764,77.065288 C60.6144808,59.4306901 72.4791474,42.8667189 72.4791474,29.0449039 C72.4791474,21.5940426 70.0154034,17.8686119 65.0879154,17.8686119 L21.7475772,17.8686119 Z" id="路径-45" fill="url(#linearGradient-3)"></path>
+                <path d="M12.6406078,29.0449039 L58.9254861,29.0449039 C59.319387,25.361473 59.9007207,22.8226333 60.669487,21.4283848 C61.4382534,20.0341364 62.9110628,18.8475454 65.0879154,17.8686119 L21.7475772,17.8686119 C19.3352315,18.1582714 17.5553665,19.00715 16.4079823,20.4152475 C15.2605981,21.823345 14.0048066,24.6998971 12.6406078,29.0449039 Z" id="路径-44" fill="url(#linearGradient-4)"></path>
+                <rect id="矩形" fill="#B6CCD8" x="38" y="38" width="23" height="5"></rect>
+                <rect id="矩形备份-6" fill="#CBDBE3" x="31" y="51" width="25" height="5"></rect>
+                <rect id="矩形备份-7" fill="#F0F5F8" x="28" y="64" width="25" height="6"></rect>
+                <circle id="椭圆形" fill="#B6CCD8" cx="29.5" cy="39.5" r="3.5"></circle>
+                <circle id="椭圆形备份-2" fill="#CBDBE3" cx="24" cy="53" r="4"></circle>
+                <circle id="椭圆形备份-3" fill="#F0F5F8" cx="20.5" cy="67.5" r="4.5"></circle>
+            </g>
+        </g>
+    </g>
+</svg>

+ 39 - 0
src/assets/chat-aside/empty_c.svg

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="92px" height="92px" viewBox="0 0 92 92" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>暂无数据</title>
+    <defs>
+        <linearGradient x1="97.0204635%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
+            <stop stop-color="#5573A9" offset="0%"></stop>
+            <stop stop-color="#B9C6DF" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-2">
+            <stop stop-color="#B5C2D9" offset="0%"></stop>
+            <stop stop-color="#5676AE" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-3">
+            <stop stop-color="#224B93" offset="0%"></stop>
+            <stop stop-color="#B8C5DB" offset="100%"></stop>
+        </linearGradient>
+        <linearGradient x1="0%" y1="52.2704874%" x2="100%" y2="47.7295126%" id="linearGradient-4">
+            <stop stop-color="#CDD6E7" offset="0%"></stop>
+            <stop stop-color="#A1B2CF" offset="100%"></stop>
+        </linearGradient>
+    </defs>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="桌面版备份" transform="translate(-217.000000, -366.000000)">
+            <g id="暂无数据" transform="translate(217.000000, 366.000000)">
+                <circle id="椭圆形" fill="#EBF0F8" cx="46" cy="46" r="46"></circle>
+                <path d="M81.6428237,57.0897808 C84.6412103,57.0299269 85.279533,61.193973 83.5577917,69.581919 L72.4791474,66.1063585 C72.1922724,62.3422938 72.5610635,59.9562554 73.5855207,58.9482431 C75.1222066,57.4362246 77.1452437,57.1795615 81.6428237,57.0897808 Z" id="路径-47" fill="url(#linearGradient-1)"></path>
+                <path d="M61.4544853,87.9491679 C66.5741672,87.9582684 70.2490545,85.2785017 72.4791474,79.9098678 C74.7349988,74.4792236 74.329868,68.8276737 75.4574042,62.7616716 C76.1657473,58.9508757 78.2275538,57.0602454 81.6428237,57.0897808 L51.6959697,57.0897808 C47.6099358,67.2323394 46.3686881,74.8390351 47.9722266,79.9098678 C49.5757652,84.9807005 54.0698514,87.6604672 61.4544853,87.9491679 Z" id="路径-46" fill="url(#linearGradient-2)"></path>
+                <path d="M21.7475772,17.8686119 C21.7047356,25.7699756 21.169735,31.4162032 20.1425754,34.8072948 C15.6682735,49.5788722 9.73640336,60.7828636 10.328143,69.6676376 C10.9009981,78.2688652 16.0976488,84.0150045 25.9180952,86.9060555 C51.6099286,87.6012908 63.455392,87.9489085 61.4544853,87.9489085 C58.4531254,87.9489085 55.0247733,84.7992641 56.7288764,77.065288 C60.6144808,59.4306901 72.4791474,42.8667189 72.4791474,29.0449039 C72.4791474,21.5940426 70.0154034,17.8686119 65.0879154,17.8686119 L21.7475772,17.8686119 Z" id="路径-45" fill="url(#linearGradient-3)"></path>
+                <path d="M12.6406078,29.0449039 L58.9254861,29.0449039 C59.319387,25.361473 59.9007207,22.8226333 60.669487,21.4283848 C61.4382534,20.0341364 62.9110628,18.8475454 65.0879154,17.8686119 L21.7475772,17.8686119 C19.3352315,18.1582714 17.5553665,19.00715 16.4079823,20.4152475 C15.2605981,21.823345 14.0048066,24.6998971 12.6406078,29.0449039 Z" id="路径-44" fill="url(#linearGradient-4)"></path>
+                <rect id="矩形" fill="#B8C4DB" x="38" y="38" width="23" height="5"></rect>
+                <rect id="矩形备份-6" fill="#D3DCEB" x="31" y="51" width="25" height="5"></rect>
+                <rect id="矩形备份-7" fill="#ECEFF6" x="28" y="64" width="25" height="6"></rect>
+                <circle id="椭圆形" fill="#B8C4DB" cx="29.5" cy="39.5" r="3.5"></circle>
+                <circle id="椭圆形备份-2" fill="#D3DCEB" cx="24" cy="53" r="4"></circle>
+                <circle id="椭圆形备份-3" fill="#ECEFF6" cx="20.5" cy="67.5" r="4.5"></circle>
+            </g>
+        </g>
+    </g>
+</svg>

BIN
src/assets/chat-input/submit_disabled.png


BIN
src/assets/chat-input/submit_disabled_b.png


BIN
src/assets/chat-input/submit_disabled_c.png


BIN
src/assets/chat-input/submit_normal.png


BIN
src/assets/chat-input/submit_normal_b.png


BIN
src/assets/chat-input/submit_normal_c.png


BIN
src/assets/chat-input/submit_stop.png


BIN
src/assets/chat-input/submit_stop_b.png


BIN
src/assets/chat-input/submit_stop_c.png


+ 25 - 0
src/assets/chat-input/toggle_up_down_a.svg

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="126px" height="126px" viewBox="0 0 126 126" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>下滑- icon</title>
+    <defs>
+        <circle id="path-1" cx="33" cy="33" r="33"></circle>
+        <filter x="-75.8%" y="-60.6%" width="251.5%" height="251.5%" filterUnits="objectBoundingBox" id="filter-2">
+            <feOffset dx="0" dy="10" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
+            <feGaussianBlur stdDeviation="15" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
+            <feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
+            <feColorMatrix values="0 0 0 0 0.0509803922   0 0 0 0 0.505882353   0 0 0 0 0.494117647  0 0 0 0.3 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
+        </filter>
+    </defs>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="方案一#0A817E" transform="translate(-1112.000000, -734.000000)">
+            <g id="下滑--icon" transform="translate(1142.000000, 754.000000)">
+                <g id="椭圆形">
+                    <use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
+                    <circle stroke="#CFE6E5" stroke-width="2" stroke-linejoin="square" fill="#FFFFFF" fill-rule="evenodd" cx="33" cy="33" r="32"></circle>
+                </g>
+                <line x1="33" y1="43" x2="33" y2="21" id="路径-20" stroke="#0A817E" stroke-width="3" stroke-linecap="round" transform="translate(33.000000, 32.000000) scale(1, -1) translate(-33.000000, -32.000000) "></line>
+                <polyline id="路径-21" stroke="#0A817E" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" transform="translate(33.000000, 40.500000) scale(1, -1) translate(-33.000000, -40.500000) " points="23 45 33 36 43 45"></polyline>
+            </g>
+        </g>
+    </g>
+</svg>

BIN
src/assets/chat-input/toggle_up_down_b.png


BIN
src/assets/chat-input/toggle_up_down_c.png


+ 12 - 0
src/assets/chat-report/rule_b.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>调研报告- icon</title>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="规格配置" transform="translate(-551.000000, -968.000000)">
+            <g id="调研报告--icon" transform="translate(551.000000, 968.000000)">
+                <rect id="矩形" x="0" y="0" width="24" height="24"></rect>
+                <path d="M13.9573593,3.2 C14.7530088,3.2 15.5160705,3.51607052 16.0786797,4.07867966 L19.1213203,7.12132034 C19.6839295,7.68392948 20,8.44699122 20,9.24264069 L20,17.8 C20,19.4568542 18.6568542,20.8 17,20.8 L7,20.8 C5.34314575,20.8 4,19.4568542 4,17.8 L4,6.2 C4,4.54314575 5.34314575,3.2 7,3.2 L13.9573593,3.2 Z M7.8,12 C7.3581722,12 7,12.3581722 7,12.8 C7,13.2418278 7.3581722,13.6 7.8,13.6 C8.2418278,13.6 8.6,13.2418278 8.6,12.8 C8.6,12.3581722 8.2418278,12 7.8,12 Z M16.2,12.05 L10.8,12.05 L10.6982294,12.0568466 C10.3321539,12.106509 10.05,12.4203042 10.05,12.8 C10.05,13.1796958 10.3321539,13.493491 10.6982294,13.5431534 L10.8,13.55 L16.2,13.55 L16.3017706,13.5431534 C16.6678461,13.493491 16.95,13.1796958 16.95,12.8 C16.95,12.3857864 16.6142136,12.05 16.2,12.05 Z M7.8,8 C7.3581722,8 7,8.3581722 7,8.8 C7,9.2418278 7.3581722,9.6 7.8,9.6 C8.2418278,9.6 8.6,9.2418278 8.6,8.8 C8.6,8.3581722 8.2418278,8 7.8,8 Z M14,8.05 L10.8,8.05 L10.6982294,8.05684662 C10.3321539,8.10650904 10.05,8.42030423 10.05,8.8 C10.05,9.17969577 10.3321539,9.49349096 10.6982294,9.54315338 L10.8,9.55 L14,9.55 L14.1017706,9.54315338 C14.4678461,9.49349096 14.75,9.17969577 14.75,8.8 C14.75,8.38578644 14.4142136,8.05 14,8.05 Z" id="形状结合" fill="#03547f"></path>
+            </g>
+        </g>
+    </g>
+</svg>

+ 12 - 0
src/assets/chat-report/rule_c.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>调研报告- icon</title>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="规格配置" transform="translate(-551.000000, -968.000000)">
+            <g id="调研报告--icon" transform="translate(551.000000, 968.000000)">
+                <rect id="矩形" x="0" y="0" width="24" height="24"></rect>
+                <path d="M13.9573593,3.2 C14.7530088,3.2 15.5160705,3.51607052 16.0786797,4.07867966 L19.1213203,7.12132034 C19.6839295,7.68392948 20,8.44699122 20,9.24264069 L20,17.8 C20,19.4568542 18.6568542,20.8 17,20.8 L7,20.8 C5.34314575,20.8 4,19.4568542 4,17.8 L4,6.2 C4,4.54314575 5.34314575,3.2 7,3.2 L13.9573593,3.2 Z M7.8,12 C7.3581722,12 7,12.3581722 7,12.8 C7,13.2418278 7.3581722,13.6 7.8,13.6 C8.2418278,13.6 8.6,13.2418278 8.6,12.8 C8.6,12.3581722 8.2418278,12 7.8,12 Z M16.2,12.05 L10.8,12.05 L10.6982294,12.0568466 C10.3321539,12.106509 10.05,12.4203042 10.05,12.8 C10.05,13.1796958 10.3321539,13.493491 10.6982294,13.5431534 L10.8,13.55 L16.2,13.55 L16.3017706,13.5431534 C16.6678461,13.493491 16.95,13.1796958 16.95,12.8 C16.95,12.3857864 16.6142136,12.05 16.2,12.05 Z M7.8,8 C7.3581722,8 7,8.3581722 7,8.8 C7,9.2418278 7.3581722,9.6 7.8,9.6 C8.2418278,9.6 8.6,9.2418278 8.6,8.8 C8.6,8.3581722 8.2418278,8 7.8,8 Z M14,8.05 L10.8,8.05 L10.6982294,8.05684662 C10.3321539,8.10650904 10.05,8.42030423 10.05,8.8 C10.05,9.17969577 10.3321539,9.49349096 10.6982294,9.54315338 L10.8,9.55 L14,9.55 L14.1017706,9.54315338 C14.4678461,9.49349096 14.75,9.17969577 14.75,8.8 C14.75,8.38578644 14.4142136,8.05 14,8.05 Z" id="形状结合" fill="#4977c8"></path>
+            </g>
+        </g>
+    </g>
+</svg>

+ 13 - 0
src/assets/chat-report/table_b.svg

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>数据管理- icon</title>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="规格配置" transform="translate(-701.000000, -968.000000)">
+            <g id="数据管理--icon" transform="translate(701.000000, 968.000000)">
+                <rect id="矩形" x="0" y="0" width="24" height="24"></rect>
+                <path d="M17,3.2 C18.6568542,3.2 20,4.54314575 20,6.2 L20,14.0750366 C20,15.7318908 18.6568542,17.0750366 17,17.0750366 L7,17.0750366 C5.34314575,17.0750366 4,15.7318908 4,14.0750366 L4,6.2 C4,4.54314575 5.34314575,3.2 7,3.2 L17,3.2 Z M8,9.05 C7.58578644,9.05 7.25,9.38578644 7.25,9.8 L7.25,9.8 L7.25,13 L7.25684662,13.1017706 C7.30650904,13.4678461 7.62030423,13.75 8,13.75 C8.41421356,13.75 8.75,13.4142136 8.75,13 L8.75,13 L8.75,9.8 L8.74315338,9.69822944 C8.69349096,9.33215388 8.37969577,9.05 8,9.05 Z M12,5.85 C11.5857864,5.85 11.25,6.18578644 11.25,6.6 L11.25,6.6 L11.25,13 L11.2568466,13.1017706 C11.306509,13.4678461 11.6203042,13.75 12,13.75 C12.4142136,13.75 12.75,13.4142136 12.75,13 L12.75,13 L12.75,6.6 L12.7431534,6.49822944 C12.693491,6.13215388 12.3796958,5.85 12,5.85 Z M16,7.85 C15.5857864,7.85 15.25,8.18578644 15.25,8.6 L15.25,8.6 L15.25,13 L15.2568466,13.1017706 C15.306509,13.4678461 15.6203042,13.75 16,13.75 C16.4142136,13.75 16.75,13.4142136 16.75,13 L16.75,13 L16.75,8.6 L16.7431534,8.49822944 C16.693491,8.13215388 16.3796958,7.85 16,7.85 Z" id="形状结合" fill="#03547f"></path>
+                <line x1="6" y1="19" x2="18" y2="19" id="路径-10" stroke="#03547f" stroke-width="2" stroke-linecap="round"></line>
+            </g>
+        </g>
+    </g>
+</svg>

+ 13 - 0
src/assets/chat-report/table_c.svg

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>数据管理- icon</title>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="规格配置" transform="translate(-701.000000, -968.000000)">
+            <g id="数据管理--icon" transform="translate(701.000000, 968.000000)">
+                <rect id="矩形" x="0" y="0" width="24" height="24"></rect>
+                <path d="M17,3.2 C18.6568542,3.2 20,4.54314575 20,6.2 L20,14.0750366 C20,15.7318908 18.6568542,17.0750366 17,17.0750366 L7,17.0750366 C5.34314575,17.0750366 4,15.7318908 4,14.0750366 L4,6.2 C4,4.54314575 5.34314575,3.2 7,3.2 L17,3.2 Z M8,9.05 C7.58578644,9.05 7.25,9.38578644 7.25,9.8 L7.25,9.8 L7.25,13 L7.25684662,13.1017706 C7.30650904,13.4678461 7.62030423,13.75 8,13.75 C8.41421356,13.75 8.75,13.4142136 8.75,13 L8.75,13 L8.75,9.8 L8.74315338,9.69822944 C8.69349096,9.33215388 8.37969577,9.05 8,9.05 Z M12,5.85 C11.5857864,5.85 11.25,6.18578644 11.25,6.6 L11.25,6.6 L11.25,13 L11.2568466,13.1017706 C11.306509,13.4678461 11.6203042,13.75 12,13.75 C12.4142136,13.75 12.75,13.4142136 12.75,13 L12.75,13 L12.75,6.6 L12.7431534,6.49822944 C12.693491,6.13215388 12.3796958,5.85 12,5.85 Z M16,7.85 C15.5857864,7.85 15.25,8.18578644 15.25,8.6 L15.25,8.6 L15.25,13 L15.2568466,13.1017706 C15.306509,13.4678461 15.6203042,13.75 16,13.75 C16.4142136,13.75 16.75,13.4142136 16.75,13 L16.75,13 L16.75,8.6 L16.7431534,8.49822944 C16.693491,8.13215388 16.3796958,7.85 16,7.85 Z" id="形状结合" fill="#4977c8"></path>
+                <line x1="6" y1="19" x2="18" y2="19" id="路径-10" stroke="#4977c8" stroke-width="2" stroke-linecap="round"></line>
+            </g>
+        </g>
+    </g>
+</svg>

+ 12 - 0
src/assets/chat-tips/icon_question_a.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>话题- icon备份</title>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="报告自动生成" transform="translate(-551.000000, -752.000000)">
+            <g id="话题--icon备份" transform="translate(551.000000, 752.000000)">
+                <rect id="矩形" x="0" y="0" width="24" height="24"></rect>
+                <path d="M12,3 C16.9705627,3 21,7.02943725 21,12 L21,18 C21,19.6568542 19.6568542,21 18,21 L12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 Z M15.3508301,7.54174805 L13.9138184,7.54833984 L13.3535156,9.87524414 L11.6726074,9.87524414 L12.2526855,7.54174805 L10.8156738,7.54833984 L10.2553711,9.87524414 L7.83618164,9.87524414 L7.83618164,11.0354004 L9.97851562,11.0354004 L9.49731445,12.9997559 L7.83618164,12.9997559 L7.83618164,14.1599121 L9.22045898,14.1599121 L8.54150391,16.9416504 L9.92578125,16.9416504 L10.6113281,14.1599121 L12.3186035,14.1599121 L11.6396484,16.9416504 L13.0239258,16.9416504 L13.7160645,14.1599121 L16.5241699,14.1599121 L16.5241699,12.9997559 L13.9995117,12.9997559 L14.4873047,11.0354004 L16.5241699,11.0354004 L16.5241699,9.87524414 L14.770752,9.87524414 L15.3508301,7.54174805 Z M13.0766602,11.0354004 L12.595459,12.9997559 L10.9013672,12.9997559 L11.3891602,11.0354004 L13.0766602,11.0354004 Z" id="形状结合" fill="#0A817E"></path>
+            </g>
+        </g>
+    </g>
+</svg>

+ 12 - 0
src/assets/chat-tips/icon_question_b.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>话题- icon备份</title>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="报告自动生成" transform="translate(-551.000000, -752.000000)">
+            <g id="话题--icon备份" transform="translate(551.000000, 752.000000)">
+                <rect id="矩形" x="0" y="0" width="24" height="24"></rect>
+                <path d="M12,3 C16.9705627,3 21,7.02943725 21,12 L21,18 C21,19.6568542 19.6568542,21 18,21 L12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 Z M15.3508301,7.54174805 L13.9138184,7.54833984 L13.3535156,9.87524414 L11.6726074,9.87524414 L12.2526855,7.54174805 L10.8156738,7.54833984 L10.2553711,9.87524414 L7.83618164,9.87524414 L7.83618164,11.0354004 L9.97851562,11.0354004 L9.49731445,12.9997559 L7.83618164,12.9997559 L7.83618164,14.1599121 L9.22045898,14.1599121 L8.54150391,16.9416504 L9.92578125,16.9416504 L10.6113281,14.1599121 L12.3186035,14.1599121 L11.6396484,16.9416504 L13.0239258,16.9416504 L13.7160645,14.1599121 L16.5241699,14.1599121 L16.5241699,12.9997559 L13.9995117,12.9997559 L14.4873047,11.0354004 L16.5241699,11.0354004 L16.5241699,9.87524414 L14.770752,9.87524414 L15.3508301,7.54174805 Z M13.0766602,11.0354004 L12.595459,12.9997559 L10.9013672,12.9997559 L11.3891602,11.0354004 L13.0766602,11.0354004 Z" id="形状结合" fill="#03547f"></path>
+            </g>
+        </g>
+    </g>
+</svg>

+ 12 - 0
src/assets/chat-tips/icon_question_c.svg

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>话题- icon备份</title>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="报告自动生成" transform="translate(-551.000000, -752.000000)">
+            <g id="话题--icon备份" transform="translate(551.000000, 752.000000)">
+                <rect id="矩形" x="0" y="0" width="24" height="24"></rect>
+                <path d="M12,3 C16.9705627,3 21,7.02943725 21,12 L21,18 C21,19.6568542 19.6568542,21 18,21 L12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 Z M15.3508301,7.54174805 L13.9138184,7.54833984 L13.3535156,9.87524414 L11.6726074,9.87524414 L12.2526855,7.54174805 L10.8156738,7.54833984 L10.2553711,9.87524414 L7.83618164,9.87524414 L7.83618164,11.0354004 L9.97851562,11.0354004 L9.49731445,12.9997559 L7.83618164,12.9997559 L7.83618164,14.1599121 L9.22045898,14.1599121 L8.54150391,16.9416504 L9.92578125,16.9416504 L10.6113281,14.1599121 L12.3186035,14.1599121 L11.6396484,16.9416504 L13.0239258,16.9416504 L13.7160645,14.1599121 L16.5241699,14.1599121 L16.5241699,12.9997559 L13.9995117,12.9997559 L14.4873047,11.0354004 L16.5241699,11.0354004 L16.5241699,9.87524414 L14.770752,9.87524414 L15.3508301,7.54174805 Z M13.0766602,11.0354004 L12.595459,12.9997559 L10.9013672,12.9997559 L11.3891602,11.0354004 L13.0766602,11.0354004 Z" id="形状结合" fill="#4977c8"></path>
+            </g>
+        </g>
+    </g>
+</svg>

BIN
src/assets/chat-user/agent-bg.png


BIN
src/assets/chat-user/icon-more.png


BIN
src/assets/chat-user/user_a.png


BIN
src/assets/chat-user/user_b.png


BIN
src/assets/chat-user/user_c.png


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
src/assets/chat-znws/icon_recommend_b.svg


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
src/assets/chat-znws/icon_recommend_c.svg


BIN
src/assets/icon-robot/icon_blue_b-1.png


BIN
src/assets/icon-robot/icon_blue_b-2.png


BIN
src/assets/icon-robot/icon_blue_b-3.png


BIN
src/assets/icon-robot/icon_blue_b-4.png


BIN
src/assets/icon-robot/icon_blue_b-5.png


BIN
src/assets/icon-robot/icon_blue_b-6.png


BIN
src/assets/icon-robot/icon_blue_b-7.png


BIN
src/assets/icon-robot/icon_blue_b-8.png


BIN
src/assets/icon-robot/icon_blue_b-9.png


BIN
src/assets/icon-robot/icon_blue_c-1.png


BIN
src/assets/icon-robot/icon_blue_c-2.png


BIN
src/assets/icon-robot/icon_blue_c-3.png


BIN
src/assets/icon-robot/icon_blue_c-4.png


BIN
src/assets/icon-robot/icon_blue_c-5.png


BIN
src/assets/icon-robot/icon_blue_c-6.png


BIN
src/assets/icon-robot/icon_blue_c-7.png


BIN
src/assets/icon-robot/icon_blue_c-8.png


BIN
src/assets/icon-robot/icon_blue_c-9.png


BIN
src/assets/icon-robot/icon_green_a-1.png


BIN
src/assets/icon-robot/icon_green_a-2.png


BIN
src/assets/icon-robot/icon_green_a-3.png


BIN
src/assets/icon-robot/icon_green_a-4.png


BIN
src/assets/icon-robot/icon_green_a-5.png


BIN
src/assets/icon-robot/icon_green_a-6.png


BIN
src/assets/icon-robot/icon_green_a-7.png


BIN
src/assets/icon-robot/icon_green_a-8.png


BIN
src/assets/icon-robot/icon_green_a-9.png


+ 39 - 0
src/base/store/use-agent-used.js

@@ -0,0 +1,39 @@
+import { defineStore } from 'pinia';
+
+
+/**
+ * 使用过的智能体
+ */
+export const useAgentUsedStore = defineStore('agent_used', {
+  state: () => {
+    return {
+      agent_used: JSON.parse(sessionStorage.getItem('agent_used')) || [],
+    };
+  },
+  actions: {
+    updateAgentUsed(id) {
+      const idx = this.agent_used.findIndex(it => it.id === id)
+      if (idx != -1) {
+        this.agent_used.splice(idx, 1)
+      }
+      this.agent_used.push({ id })
+      console.log(this.agent_used, 11111)
+      updateAgentUsedList(id)
+    },
+  },
+
+});
+
+const updateAgentUsedList = (id) => {
+  let agent_used = [];
+  const json_agent_used = sessionStorage.getItem('agent_used');
+  if (json_agent_used) {
+    agent_used = JSON.parse(json_agent_used);
+    const idx = agent_used.findIndex((item) => item.id == id);
+    if (idx !== -1) {
+      agent_used.splice(idx, 1);
+    }
+  }
+  agent_used.push({ id });
+  sessionStorage.setItem('agent_used', JSON.stringify(agent_used));
+};

+ 18 - 0
src/base/store/use-btn-auth.js

@@ -0,0 +1,18 @@
+import { defineStore } from 'pinia';
+
+
+/**
+ * 使用过的智能体
+ */
+export const useBtnAuthStore = defineStore('btn_auth', {
+  state: () => {
+    return {
+      btn_auth_obj: JSON.parse(sessionStorage.getItem('btn_auth')) || {}
+    };
+  },
+  actions: {
+    updateBtnAuthObj(obj) {
+      this.btn_auth_obj = { ...obj }
+    }
+  }
+});

+ 2 - 1
src/base/store/use-theme.js

@@ -8,7 +8,8 @@ import { THEME_LIGHT, THEME_DARK, THEME_GREEN, THEME_PARTY } from '../variables'
 export const useThemeStore = defineStore('theme', {
   state: () => {
     return {
-      value: THEME_GREEN
+      // value: THEME_GREEN
+      value: THEME_PARTY
     };
   },
   actions: {

+ 3 - 1
src/base/theme.js

@@ -92,6 +92,7 @@ export const setThemeParty = () => {
   document.body.setAttribute(ATRR_NAME, THEME_PARTY);
 
   localST_Theme.setItem(THEME_PARTY);
+  console.dir(document.body)
 
   const theme = useThemeStore();
   theme.updateTheme(THEME_PARTY);
@@ -128,7 +129,7 @@ export const getCurrentTheme = () => {
  */
 export function initTheme() {
   const cur_theme = getCurrentTheme();
-
+  console.log(cur_theme, 99)
   if (!cur_theme) {
     setThemeLight();
   }
@@ -143,6 +144,7 @@ export function initTheme() {
 
   if (cur_theme === THEME_PARTY) {
     setThemeParty();
+    console.log(1111)
   }
 
   if (cur_theme === THEME_GREEN) {

+ 1 - 0
src/base/theme/theme-dark.css

@@ -6,6 +6,7 @@ body {
 html body[dmx-theme='dark'] {
   --bg-body: #f2f5f9;
   --primary-default: #0a817e;
+  
 }
 body[arco-theme='party'] {
   --color-white: #ffffff;

+ 12 - 0
src/base/theme/theme-green.css

@@ -10,6 +10,18 @@ html body[dmx-theme='green'] {
   --bg-body: #f2f5f9;
   /* --primary-default: #4977c8; */
   --primary-default: #0a817e;
+  --bg-title:#E8F3F3;
+  --tip-bg-start: #E6F2F2;
+  --tip-bg-end:rgba(230,242,242,0);
+  --question_bg:rgba(10,129,126,0.1);
+  --agent_hover:rgba(10, 129, 126,0.5);
+  --textarea-input-border:#c7eceb;
+  --alert-top-bg:#e6f2f2;
+  --table-th-bg:#E6F2F2;
+  --loading-title-bg:rgba(10, 129, 126,0.06);
+
+  --arcoblue-6: 10.129.126;
+
 }
 
 /*

+ 10 - 10
src/base/theme/theme-light.css

@@ -1,15 +1,15 @@
 html body[dmx-theme='light'] {
   --bg-body: #f2f5f9;
   --primary-default: #4977c8;
+  --bg-title:#EBF0F8;
+  --tip-bg-start: #EBF0F8;
+  --tip-bg-end:rgba(235,240,248,0) ;
+  --question_bg: rgba(59,107,191,0.1);
+  --agent_hover:rgba(73, 119, 200,0.5);
+  --textarea-input-border:#C4D2EB;
+  --alert-top-bg:#EBF0F8;
+  --table-th-bg:#EBF0F8;
+  --loading-title-bg:rgba(73, 119, 200,0.06);
 
-    /* --primary-1: #0a817e;
-  --primary-2:  #0a817e;
-  --primary-3:  #0a817e;
-  --primary-4:  #0a817e;
-  --primary-5:  #0a817e;
-  --primary-6:  #0a817e;
-  --primary-7:  #0a817e;
-  --primary-8:  #0a817e;
-  --primary-9:  #0a817e;
-  --primary-10: #0a817e; */
+  --arcoblue-6: 73,119,200;
 }

+ 11 - 0
src/base/theme/theme-party.css

@@ -8,6 +8,17 @@ body {
 html body[dmx-theme='party'] {
   --bg-body: #f2f5f9;
   --primary-default: #03547f;
+  --bg-title: #E5EDF2;
+  --tip-bg-start: #ECF3F6;
+  --tip-bg-end: rgba(236,243,246,0) ;
+  --question_bg:rgba(3,84,127,0.1);
+  --agent_hover:rgba(3, 84, 127,0.5);
+  --textarea-input-border:#CEE7F4;
+  --alert-top-bg:##EBF2F7 ;
+  --table-th-bg:#EBF2F7;
+  --loading-title-bg:rgba(3, 84, 127,0.06);
+
+  --arcoblue-6:3,84,127;
 }
 
 /*

+ 0 - 315
src/chat-item/Answer.vue

@@ -1,315 +0,0 @@
-<template>
-  <div class="dialog_answer">
-    <div class="answer-item">
-      <div class="answer-item-icon">
-        <img :src="getIcon(target_agent_icon)" alt="" class="img-icon" />
-        <a-tooltip content="编辑">
-          <icon-edit class="edit-icon" @click="handleEditIcon" />
-        </a-tooltip>
-      </div>
-      <div class="answer-item-content" v-if="!report_content">
-        <!-- {{ dialog.question }} -->
-        <DialogContent id="refference_parent" :content="answer_html" :type="dialog.client_custom_item_type"
-          :is_loading="is_content_loading">
-          <!-- <HomeChart v-if="has_echarts"></HomeChart> -->
-          <DialogActions v-if="answer_status == 2" class="answer-actions-btns" :type="type" @copy="handleAnswerCopy" />
-        </DialogContent>
-
-        <!-- 引用数据 -->
-        <Reference v-if="answer_status == 2 && !has_echarts" ref="refference" :full_refference="full_refference">
-        </Reference>
-        <!-- {{ (has_chunks, answer_status) }} -->
-        <!-- 对话已经结束,并且有引用数据 -->
-      </div>
-      <div class="answer-item-content" v-else>
-        <DialogReportContent :is_loading="is_content_loading" :result_list="report_content">
-          <DialogActions v-if="answer_status == 2" class="answer-actions-btns" :type="type" @copy="handleReportCopy"
-            @edit="handleReportEdit" />
-        </DialogReportContent>
-        <!-- 报告文件 -->
-        <!-- <ReportFile v-if="has_Report" :file="report_file"></ReportFile> -->
-      </div>
-    </div>
-  </div>
-  <RobotIcons v-if="showModal" :showModal="showModal" @close="handleClose" @update="handleUpdate"
-    :target_agent_icon="target_agent_icon"></RobotIcons>
-</template>
-
-<script setup>
-import { ref, computed, onMounted } from 'vue';
-import { useRoute, useRouter } from 'vue-router';
-import { Message } from '@arco-design/web-vue';
-import DialogContent from './DialogContent.vue';
-import DialogReportContent from './DialogReportContent.vue'
-import DialogActions from './DialogActions.vue';
-import HomeChart from '../chat_echart/HomeChart.vue';
-import ReportFile from '../chat_files/ReportFile.vue';
-import RobotIcons from './RobotIcons.vue';
-import copyText from '../../3rd-libs/clipboard';
-import formatAnwserString from '../conversation-dialog/format-anwser-string';
-// import RefferenceFileBlocks from '../answer-refference/RefferenceFileBlocks.vue';
-import Reference from './Reference.vue';
-import { useThemeStore } from '../../base/store/use-theme';
-import Light_ICON from '../../assets/light_robot.png';
-import Green_ICON from '../../assets/green_robot.png';
-import party_ICON from '../../assets/party_robot.png';
-import robot_icon from '../../assets/robot.svg'
-import { getIcon } from '../common/use-icon-map'
-
-const route = useRoute()
-const router = useRouter()
-
-
-const props = defineProps({
-  dialog: {
-    type: Object,
-    default: ''
-  },
-  type: {
-    type: String,
-    default: 'znwd'
-  },
-  target_agent_icon: {
-    type: String,
-    default: 'icon_1'
-  }
-});
-const emit = defineEmits(['update'])
-
-const themeStore = useThemeStore();
-
-const refference = ref(null);
-
-
-const showModal = ref(false)
-
-
-// const icon = computed(() => {
-//   const theme = themeStore.value;
-//   return robot_icon
-//   // if (theme === 'light') {
-//   //   return Light_ICON;
-//   // } else if (theme === 'green') {
-//   //   return Green_ICON;
-//   // } else {
-//   //   return party_ICON;
-//   // }
-// });
-
-const report_content = computed(() => {
-  console.log(props.dialog)
-  const result_list = props.dialog.result_list
-  // console.log(result_list)
-  // if (result_list) {
-  //   result_list.forEach(item => {
-  //     if (typeof item === 'string') {
-  //       console.log(111111111111111)
-  //       item = formatAnwserString(item)
-  //     }
-  //   })
-
-  // }
-  return result_list
-})
-
-const answer_html = computed(() => {
-  const answer = props.dialog?.answer;
-
-  let answer_string = formatAnwserString(answer);
-
-  // let answer_string = answer ? marked.parse(answer) : '暂无回答';
-  return answer_string;
-});
-
-const answer_status = computed(() => {
-  return props.dialog.client_custom_chat_status;
-});
-/**
- * 内容是否正在加载中
- */
-const is_content_loading = computed(() => {
-  // console.log(props.dialog);
-  return answer_status.value === 0;
-});
-/**
- * 展示图标
- * */
-const has_echarts = computed(() => {
-  return answer_status.value == 2 && props.dialog.has_echarts
-})
-/**
- * 展示文档
- * */
-const has_Report = computed(() => {
-  return answer_status.value == 2 && props.dialog.report_files && props.dialog.report_files.file_name
-})
-/**
- * 报告内容
- * */
-
-const report_file = computed(() => {
-  return props.dialog.report_files
-})
-
-/**
- * 完整引用数据
- */
-const full_refference = computed(() => {
-  if (!props.dialog) {
-    return [];
-  }
-
-  const answer = props.dialog;
-  if (!answer.client_custom_linked_refference_full_content) {
-    return [];
-  }
-  const refference = JSON.parse(answer.client_custom_linked_refference_full_content);
-  if (Object.keys(refference).length === 0) {
-    return [];
-  }
-
-  return refference;
-});
-// const full_refference = computed(() => {
-//   if (!props.answer) {
-//     return null;
-//   }
-
-//   const answer = props.answer;
-//   console.log(props.answer);
-
-//   if (!answer.client_custom_linked_refference_full_content) {
-//     return null;
-//   }
-
-//   if (Object.keys(answer.client_custom_linked_refference_full_content).length === 0) {
-//     return null;
-//   } else {
-//     for (let key in answer.client_custom_linked_refference_full_content) {
-//       if (answer.client_custom_linked_refference_full_content[key].length === -0) {
-//         return null;
-//       }
-//     }
-//   }
-//   console.log(answer.client_custom_linked_refference_full_content);
-//   return answer.client_custom_linked_refference_full_content;
-// });
-/**
- * 是否显示引用效果
- */
-const has_refference = computed(() => {
-  if (!full_refference.value) {
-    return false;
-  }
-
-  return true;
-});
-/**
- * 是否有参考文档
- * */
-// const has_chunks = computed(() => {
-//   console.log(props.dialog, 999);
-//   const chunks = props.dialog.chunks;
-//   console.log(chunks);
-
-//   if (chunks && chunks.length) {
-//     return true;
-//   } else {
-//     return false;
-//   }
-// });
-
-const handleAnswerCopy = () => {
-  const answer = props.dialog?.answer_origin;
-  copyText(answer);
-  Message.success('复制成功');
-};
-const handleReportCopy = () => {
-  const result_list = props.dialog.result_list
-  const copy_text = result_list.filter(item => typeof item == 'string').join("")
-  copyText(copy_text);
-  Message.success('复制成功');
-}
-const handleEditIcon = () => {
-  showModal.value = true
-}
-
-const handleClose = () => {
-  showModal.value = false
-}
-const handleUpdate = (icon) => {
-  emit('update', icon)
-  showModal.value = false
-}
-
-const handleReportEdit = () => {
-  router.push({
-    path: '/report'
-  })
-}
-
-const showRefferenceDetails = (refIndex) => {
-  if (refference.value && refIndex) {
-    const item = full_refference.value?.find((item) => item.id == refIndex);
-    if (item) {
-      refference.value.toDetail(item);
-    }
-
-  }
-};
-
-onMounted(() => {
-  const refference_parent = document.getElementById('refference_parent');
-  // console.log(refference_parent, 999)
-  if (refference_parent) {
-    refference_parent.addEventListener('click', (e) => {
-      // console.log(e.target.classList, 999)
-      if (e.target.classList.contains('client-formated-markdown-doc-refference-flag')) {
-        const refIndex = e.target.getAttribute('data-ref-index');
-        // console.log(refIndex, 1111)
-        showRefferenceDetails(refIndex);
-      }
-    });
-  }
-});
-</script>
-<style scoped lang="css">
-.dialog_answer {
-  width: calc(100%);
-  height: auto;
-}
-
-.answer-item {
-  display: flex;
-  /* justify-content: flex-end; */
-  align-items: flex-start;
-}
-
-.answer-item-content {
-  max-width: calc(100% - 62px - 62px);
-}
-
-.answer-item-icon {
-  position: relative;
-}
-
-.answer-item-icon .edit-icon {
-  position: absolute;
-  right: 0;
-  bottom: 0;
-  visibility: hidden;
-  cursor: pointer;
-}
-
-.answer-item-icon:hover .edit-icon {
-  visibility: visible;
-}
-
-.answer-item-icon img {
-  margin-right: 22px;
-  border-radius: 50%;
-  width: 40px;
-  /* height: 30px; */
-  flex-shrink: 0;
-}
-</style>

+ 0 - 142
src/chat-item/DialogActions.vue

@@ -1,142 +0,0 @@
-<template>
-  <div class="dialog-actions-container">
-    <div class="dialog-action-part dialog-action-left">
-      <div class="action-btn-item">
-        <a-tooltip content="复制" position="top">
-          <icon-copy size="18" @click="handleCopy" />
-        </a-tooltip>
-      </div>
-      <div class="action-btn-item" v-if="show_edit">
-        <a-tooltip content="编辑" position="top">
-          <icon-edit size="18" @click="handleEdit" />
-        </a-tooltip>
-      </div>
-      <!-- <div class="action-btn-item">
-        <a-tooltip :content="$t('conversation.download')" position="top" v-if="isEnableBtn('download')">
-          <icon-download size="18" @click="handleDownload" />
-        </a-tooltip>
-      </div> -->
-
-      <!-- <div class="action-btn-item" @click="handleShare">分享</div> -->
-    </div>
-
-    <div class="dialog-action-part dialog-action-right">
-      <div class="action-btn-item"></div>
-
-      <!-- <div class="action-btn-item" @click="handleLike">
-        <svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
-          <use xlink:href="#mshd-vote-up"></use>
-        </svg>
-      </div>
-      <div class="action-btn-item" @click="handleHate">
-        <svg width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="">
-          <use xlink:href="#mshd-vote-down"></use>
-        </svg>
-      </div> -->
-    </div>
-  </div>
-</template>
-
-<script setup>
-import { ref, computed } from 'vue';
-import { isElectron } from '../../utils/env'
-
-const props = defineProps({
-  /**
-   * 可用的操作按钮
-   */
-  // action_list: Array
-  type: {
-    type: String,
-    default: 'znwd'
-  }
-});
-
-const emit = defineEmits(['copy']);
-
-/**
- * 编辑按钮只有报告生成有,现在默认为true 方便调试后面
- * */
-const show_edit = computed(() => {
-  if (isElectron()) {
-    return false
-  }
-  if (props.type === 'bgsc') {
-    return false
-  } else {
-    return false
-  }
-})
-
-/**
- * 复制内容
- */
-const handleCopy = () => {
-  emit('copy');
-};
-/**
- * 编辑
- * */
-const handleEdit = () => {
-  emit('edit');
-}
-/**
- * 重试
- */
-const handleRetry = () => {
-  emit('retry');
-};
-// 编辑
-// const handleEdit = () => {
-//   emit('edit');
-// };
-// 下载
-const handleDownload = () => {
-  emit('download');
-};
-
-/**
- * 分享
- */
-const handleShare = () => {
-  emit('share');
-};
-/**
- * 点赞
- */
-const handleLike = () => { };
-/**
- * 踩
- */
-const handleHate = () => { };
-</script>
-
-<style lang="css" scoped>
-.dialog-actions-container {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-
-  /* height: 26px; */
-}
-
-.dialog-action-part {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-}
-
-.action-btn-item {
-  cursor: pointer;
-}
-
-.dialog-action-left .action-btn-item {
-  /* margin-left: 5px; */
-  margin-right: 10px;
-}
-
-.dialog-action-right .action-btn-item {
-  margin-left: 10px;
-  /* margin-right: 5px; */
-}
-</style>

+ 0 - 101
src/chat-item/DialogContent.vue

@@ -1,101 +0,0 @@
-<template>
-  <div class="dialog-chat-answer-content" :style="content_style">
-    <div v-if="is_loading" class="loading"><a-spin></a-spin> <span>正在思考中...</span></div>
-    <div v-if="content.length !== 0 && !is_loading" v-html="content" class="answer-content-text" />
-    <slot></slot>
-  </div>
-</template>
-
-<script setup>
-import { computed, onMounted } from 'vue';
-
-// 接收markdown数据,进行一些转换
-const props = defineProps({
-  /**
-   * 内容类型
-   */
-  type: String,
-  /**
-   * 文本内容
-   */
-  content: String,
-  /**
-   * 状态值
-   */
-  is_loading: Boolean
-});
-
-const content_style = computed(() => {
-  if (props.type === 'q') {
-    return {
-      background: 'rgba(10, 129, 126, 0.1)',
-      color: '#2C2C2C',
-      fontWeight: 600
-    };
-  }
-});
-const content_list = computed(() => {
-
-})
-onMounted(() => { });
-</script>
-
-<style lang="css" scoped>
-.dialog-chat-answer-content {
-  position: relative;
-  background-color: var(--color-bg-1);
-  color: var(--color-text-1);
-  border-radius: 12px;
-
-  padding-top: 15px;
-  padding-bottom: 15px;
-  padding-left: 30px;
-  padding-right: 30px;
-}
-
-.dialog-chat-answer-content code {
-  overflow-x: auto;
-}
-
-.answer-content-text {
-  line-height: 24px;
-}
-
-
-.loading {
-  display: flex;
-  align-items: center;
-  gap: 10px;
-}
-</style>
-<style>
-.answer-content-text table {
-  border-collapse: collapse;
-}
-
-.answer-content-text table,
-.answer-content-text th,
-.answer-content-text td {
-  border: 1px solid rgb(184, 179, 179);
-}
-
-.answer-content-text th,
-.answer-content-text td {
-  padding: 8px;
-  text-align: left;
-}
-
-.refferences {
-  background: rgb(238, 243, 254);
-  border: 1px solid rgb(255, 255, 255);
-  box-shadow: rgba(29, 48, 91, 0.2) 0px 1px 1px 0px;
-
-  padding: 2px 6px;
-  cursor: pointer;
-}
-
-.refferences:hover {
-  background-color: var(--primary-default);
-  color: #fff;
-}
-</style>

+ 0 - 137
src/chat-item/DialogReportContent.vue

@@ -1,137 +0,0 @@
-<template>
-  <div class="dialog-chat-answer-content" :style="content_style">
-    <div v-if="is_loading" class="loading"><a-spin></a-spin> <span>正在思考中...</span></div>
-    <div class="answer-content-text answer-content-report" v-for="(item, index) in result_list" :key="index">
-      <div class="answer-content" v-if="typeof item === 'string'" v-html="renderHtml(item)"></div>
-      <HomeChart v-if="typeof item === 'object'" :data="item"></HomeChart>
-    </div>
-    <slot></slot>
-  </div>
-  <!-- <div v-html="html_1"></div> -->
-</template>
-
-<script setup>
-import { computed, onMounted } from 'vue';
-import HomeChart from '../chat_echart/HomeChart.vue';
-import marked from '../../3rd-libs/marked';
-// 接收markdown数据,进行一些转换
-const props = defineProps({
-  /**
-   * 内容类型
-   */
-  type: String,
-  /**
-   * 文本内容数组
-   */
-  result_list: Array,
-  /**
-   * 状态值
-   */
-  is_loading: Boolean
-});
-
-const content_style = computed(() => {
-  if (props.type === 'q') {
-    return {
-      background: 'var(--primary-default)',
-      color: '#fff'
-    };
-  }
-});
-// const html_1 = computed(()=>{
-//   const demo = 
-// "\n  \n  ## 五、配电自动化应用建设情况\n  上周全省FA有效覆盖率60.04%,其中较高的单位有:攀枝花(77.17%),遂宁(76.22%),自贡(75.79%);较低的单位有:内江(45.78%),甘孜(32.47%),岷江(0.0%)。\n\n 上周全省全自动FA覆盖率,其中较高的单位有:雅安(51.42%),成都(29.32%),眉山(17.18%);较低的单位有:遂宁(0.0%),天府(0.0%),岷江(0.0%)。\n上周全省遥控使用率31.50%,其中较高的单位有:遂宁(95.65%),广安(92.86%),眉山(86.52%);较低的单位有:德阳(0%),甘孜(0.0%),岷江(0%)。 \n上周全省FA动作正确率51.86%,其中较高的单位有:攀枝花(76.56%),自贡(70.0%),泸州(69.33%);较低的单位有:乐山(20.83%),德阳(0%),岷江(0%)。\n  \n "
-//   console.log(marked.parse(demo),5555555555)
-// return marked.parse(demo)
-
- 
-// })
-const renderHtml = (item) => {
-  let renderContent = marked.parse(item)
-  renderContent = renderContent.replace(/^ {2}/gm,'&nbsp;&nbsp;&nbsp;&nbsp;')
-  renderContent = renderContent.replace(/<p>(.*?)<\/p>/gs,(match,content) => {
-    return `<p class="indented" style="text-indent: 2em;">${content}</p>`
-    // return `<p>${content}</p>`
-  }).replace(/<br\s*\/?>([^<]*)/g,(match,content) => {
-    if(content.trim() === '') return match
-    return `<br/><span style="display:inline-block;text-indent:2em;">${content}</span>`
-  })
-  renderContent = renderContent.replace(/<pre><code>/gs,'<p style="text-indent: 2em;">').replace(/<\/code><\/pre>/gs,'</p>')
-  return renderContent
-}
-onMounted(() => { });
-</script>
-
-<style lang="css" scoped>
-.dialog-chat-answer-content {
-  position: relative;
-  background-color: var(--color-bg-1);
-  color: var(--color-text-1);
-  border-radius: 12px;
-
-  padding-top: 15px;
-  padding-bottom: 15px;
-  padding-left: 30px;
-  padding-right: 30px;
-}
-
-.answer-content-report .answer-content * p{
-  text-indent: 2em !important;
-}
- .answer-content * p{
-  text-indent: 2em !important;
-}
-p {
-   text-indent: 2em !important;
-}
-.dialog-chat-answer-content code {
-  overflow-x: auto;
-}
-
-.answer-content-text {
-  line-height: 24px;
-}
-
-
-.loading {
-  display: flex;
-  align-items: center;
-  gap: 10px;
-}
-</style>
-<style>
-.answer-content-text table {
-  border-collapse: collapse;
-}
-
-.answer-content-text table,
-.answer-content-text th,
-.answer-content-text td {
-  border: 1px solid rgb(184, 179, 179);
-}
-
-.answer-content-text th,
-.answer-content-text td {
-  padding: 8px;
-  text-align: left;
-}
-
-.refferences {
-  background: rgb(238, 243, 254);
-  border: 1px solid rgb(255, 255, 255);
-  box-shadow: rgba(29, 48, 91, 0.2) 0px 1px 1px 0px;
-
-  padding: 2px 6px;
-  cursor: pointer;
-}
-
-.refferences:hover {
-  background-color: var(--primary-default);
-  color: #fff;
-}
-
-.indented br + *{
-  display: inline-block;
-  text-indent: 2em;
-}
-</style>

+ 0 - 48
src/chat-item/Question.vue

@@ -1,48 +0,0 @@
-<template>
-  <div class="dialog_question">
-    <div class="question-item">
-      <div class="question-item-content">
-        <!-- {{ dialog.question }} -->
-        <DialogContent :content="dialog.question" :type="dialog.client_custom_item_type"></DialogContent>
-      </div>
-      <div class="question-item-icon">
-        <img src="../../assets/user.png" alt="" />
-      </div>
-    </div>
-  </div>
-</template>
-
-<script setup>
-import DialogContent from './DialogContent.vue';
-const props = defineProps({
-  dialog: {
-    type: Object,
-    default: ''
-  }
-});
-</script>
-<style scoped lang="css">
-.dialog_question {
-  width: calc(100%);
-  height: auto;
-}
-
-.question-item {
-  display: flex;
-  justify-content: flex-end;
-  align-items: flex-start;
-}
-
-.question-item-content {
-  max-width: calc(100% - 62px - 62px);
-}
-
-.question-item-icon img {
-  margin-left: 22px;
-  border-radius: 50%;
-  width: 40px;
-  height: 40px;
-  flex-shrink: 0;
-  visibility: hidden;
-}
-</style>

+ 0 - 77
src/chat-item/Reference.vue

@@ -1,77 +0,0 @@
-<template>
-  <div class="reference" v-if="props.full_refference.length">
-    <div class="reference-title">来源</div>
-    <div class="reference-list">
-      <div class="reference-item" v-for="item in props.full_refference" :key="item.id" @click="toDetail(item)">
-        <span class="reference-item-index">{{ item.id }}</span>
-        <span class="reference-item-name">{{ item.document_name }}</span>
-      </div>
-    </div>
-  </div>
-  <RefferenceDoc v-if="show_refference" :show_refference="show_refference" :doc_detail="doc_detail"
-    @close="handleClose"></RefferenceDoc>
-</template>
-<script setup>
-import { ref } from 'vue';
-import RefferenceDoc from '../answer-refference/RefferenceDoc.vue';
-const props = defineProps({
-  full_refference: {
-    type: Array,
-    default: () => []
-  }
-});
-const show_refference = ref(false);
-const doc_detail = ref({});
-
-const toDetail = (item) => {
-  show_refference.value = true;
-  doc_detail.value = item;
-};
-
-const handleClose = () => {
-  show_refference.value = false;
-  doc_detail.value = [];
-};
-defineExpose({
-  toDetail
-});
-</script>
-
-<style lang='css' scoped>
-.reference {
-  margin-top: 20px;
-  font-size: 14px;
-}
-
-.reference-title {
-  font-weight: 600;
-}
-
-.reference-list {
-  margin-top: 14px;
-  display: flex;
-  flex-direction: column;
-  gap: 14px;
-  color: var(--color-text-1);
-}
-
-.reference-item {
-  cursor: pointer;
-}
-
-.reference-item:hover {
-  color: var(--primary-default);
-}
-
-.reference-item-index {
-  font-size: 10px;
-  padding: 2px 5px;
-  margin-right: 14px;
-  background-color: var(--primary-default);
-  color: #fff;
-}
-
-.reference-item-name {
-  line-height: 1.5;
-}
-</style>

+ 0 - 90
src/chat-item/RobotIcons.vue

@@ -1,90 +0,0 @@
-<template>
-  <a-modal v-model:visible="visible" @cancel="handleCancel">
-    <template #title>
-      替换智能体图标
-    </template>
-    <div class="body">
-      <div class="icon-item" v-for="(item, index) in icon_list" :key="index">
-        <img class="icon" :class="[target_icon === item ? 'icon_active' : '']" :src="getIcon(item)" alt=""
-          @click="handleClick(item)">
-      </div>
-    </div>
-    <template #footer>
-      <a-button type="info" style="border: none;" @click="handleCancel">取消</a-button>
-      <a-button class="update_btn" @click="handleOk">确定</a-button>
-    </template>
-  </a-modal>
-</template>
-
-<script setup>
-import { ref, computed, onMounted } from 'vue'
-import { icon_map, getIcon } from '../common/use-icon-map'
-const props = defineProps({
-  showModal: Boolean,
-  target_agent_icon: String
-})
-
-const emit = defineEmits(['close', 'update'])
-
-const target_icon = ref('icon_1')
-
-const icon_list = ref([
-  'icon_1', 'icon_2', 'icon_4', 'icon_5', 'icon_6', 'icon_7', 'icon_8', 'icon_9', 'icon_10',
-  'icon_11', 'icon_12', 'icon_13', 'icon_14', 'icon_15', 'icon_16', 'icon_17', 'icon_18'
-])
-const visible = computed(() => {
-  return props.showModal
-})
-
-const handleClick = (item) => {
-  target_icon.value = item
-}
-
-const handleCancel = () => {
-  emit('close')
-}
-const handleOk = () => {
-  emit('update', target_icon.value)
-}
-
-onMounted(() => {
-  target_icon.value = props.target_agent_icon
-})
-</script>
-<style scoped lang="css">
-.body {
-  padding: 20px;
-  padding-left: 50px;
-  display: grid;
-  grid-template-columns: repeat(4, 1fr);
-  align-content: center;
-  gap: 10px 10px;
-}
-
-.icon-item {
-  /* border: 1px solid #111; */
-}
-
-.icon {
-  width: 50px;
-  padding: 5px;
-  border: 1px dashed transparent;
-  border-radius: 5px;
-  cursor: pointer;
-}
-
-.icon_active {
-  border-color: #0a817e;
-}
-
-.update_btn {
-  background-color: #0a817e;
-  color: #fff;
-}
-
-.update_btn:hover {
-  background-color: #0a817e;
-  color: #fff;
-  opacity: 0.8;
-}
-</style>

+ 4 - 4
src/components/DeleteModal.vue

@@ -7,7 +7,7 @@
       </div>
     </template>
     <template #footer>
-      <a-button type="info" style="border: none;" @click="handleCancel">取消</a-button>
+      <a-button type="info" style="border: none" @click="handleCancel">取消</a-button>
       <a-button class="update_btn" @click="handleOk">确定</a-button>
     </template>
   </a-modal>
@@ -34,12 +34,12 @@ const handleCancel = () => {
 
 <style scoped>
 .update_btn {
-  background-color: #0a817e;
+  background-color: var(--primary-default);
   color: #fff;
 }
 
 .update_btn:hover {
-  background-color: #0a817e;
+  background-color: var(--primary-default);
   color: #fff;
   opacity: 0.8;
 }
@@ -65,7 +65,7 @@ const handleCancel = () => {
   align-items: center;
 }
 
-.arco-modal-delete-simple .title-box>span {
+.arco-modal-delete-simple .title-box > span {
   font-weight: 500;
   margin-left: 8px;
 }

+ 27 - 0
src/font.css

@@ -9,3 +9,30 @@
 body {
   font-family: 'PingFang', 'PingFang TC', 'Helvetica Neue', Arial, sans-serif !important;
 }
+
+.title_color{
+  color:var(--primary-default);
+}
+
+.btn_primary{
+  background-color:var(--primary-default)
+}
+
+.bg_title {
+  background-color:var(--bg-title)
+}
+.title_active{
+  color:var(--primary-default);
+}
+
+.tip_input_bg{
+  background: linear-gradient( 83deg,var(--tip-bg-start) 0%,var(--tip-bg-end) 100%);
+}
+
+.question_input_bg {
+  background:var(--question_bg);
+}
+
+.th-bg {
+  background:var(--table-th-bg);
+}

+ 5 - 47
src/modules/agent/AgentList.vue

@@ -20,6 +20,8 @@ import icon_2 from '../../assets/agent/agent_icon_2.svg';
 import icon_3 from '../../assets/agent/agent_icon_3.svg';
 import icon_4 from '../../assets/agent/agent_icon_4.svg';
 
+// import { updateAgentUsedList } from '../chat-user/useAgentUsed';
+
 // import { getAgentIcons, updateAgentIcons } from '../conversation-dialog/api-dialog'
 // import { getUserName } from '../../utils/get-user-name'
 
@@ -88,63 +90,19 @@ const changeAgent = (id) => {
       }
     });
     emit('toConversation');
+    // updateAgentUsedList(id);
   } else {
     Message.warning('开发中,敬请期待');
     return;
   }
-
-  // router.push({
-  //   path: '/conversation',
-  //     id: id,
-  //   }
-  // })
-  // emit('toConversation')
 };
 
-// const getAgentIconsFun = async () => {
-//   const username = await getUserName()
-//   const res = await getAgentIcons({ username })
-//   // console.log(res)
-//   if (!Object.keys(res.data.user_icon).length) {
-//     await updateAgentIconsFun({
-//       username,
-//       user_icon: 'icon_1',
-//       icon_type: '01',
-//       icon_id: ''
-//     })
-//     await updateAgentIconsFun({
-//       username,
-//       user_icon: 'icon_4',
-//       icon_type: '02',
-//       icon_id: ''
-//     })
-//     await updateAgentIconsFun({
-//       username,
-//       user_icon: 'icon_5',
-//       icon_type: '03',
-//       icon_id: ''
-//     })
-
-//   } else {
-//     // console.log(res.data.user_icon)
-//     agent_list.value.forEach(item => {
-//       item.icon = res.data.user_icon[item.idx].user_icon
-//       // console.log(item)
-//     })
-//   }
-// }
-// const updateAgentIconsFun = async ({ username, user_icon, icon_type, icon_id }) => {
-//   const res = await updateAgentIcons({ username, user_icon, icon_type, icon_id })
-//   // console.log(res)
-//   if (res.code / 1 === 200) {
-//     // await getAgentIconsFun()
-//   }
-// }
 onMounted(() => {
   // getAgentIconsFun()
   console.log(props.auth);
 });
 </script>
+
 <style scoped lang="css">
 .intell-list {
   display: grid;
@@ -171,7 +129,7 @@ onMounted(() => {
 }
 
 .intell-item:hover {
-  border: 1px solid rgba(10, 129, 126, 0.5);
+  border: 1px solid var(--agent_hover);
 }
 
 .item-icon {

+ 15 - 16
src/modules/chat-item/Answer.vue

@@ -3,7 +3,7 @@
     <div class="answer-item">
       <div class="answer-item-icon">
         <a-dropdown @select="handleSelect" trigger="hover">
-          <img :src="getIcon(target_agent_icon)" alt="" class="img-icon" />
+          <img :src="target_icon" alt="" class="img-icon" />
           <template #content>
             <a-doption value="1">切换头像</a-doption>
           </template>
@@ -138,10 +138,7 @@ import formatAnwserString from '../conversation-dialog/format-anwser-string';
 // import RefferenceFileBlocks from '../answer-refference/RefferenceFileBlocks.vue';
 import Reference from './Reference.vue';
 import { useThemeStore } from '../../base/store/use-theme';
-import Light_ICON from '../../assets/light_robot.png';
-import Green_ICON from '../../assets/green_robot.png';
-import party_ICON from '../../assets/party_robot.png';
-import robot_icon from '../../assets/robot.svg';
+import { THEME_LIGHT, THEME_DARK, THEME_GREEN, THEME_PARTY } from '../../base/variables';
 import { getIcon } from '../common/use-icon-map';
 import { downloadReport, downloadExcel } from '../conversation-dialog/api-dialog';
 import { getMergeExcel, getCheckedErrorList } from '../table-dialog/api-dialog';
@@ -175,17 +172,18 @@ const showModal = ref(false);
 const is_download_loading = ref(false);
 const is_download_loading_excel = ref(false);
 
-// const icon = computed(() => {
-//   const theme = themeStore.value;
-//   return robot_icon
-//   // if (theme === 'light') {
-//   //   return Light_ICON;
-//   // } else if (theme === 'green') {
-//   //   return Green_ICON;
-//   // } else {
-//   //   return party_ICON;
-//   // }
-// });
+const target_icon = computed(() => {
+  if (themeStore.value == THEME_GREEN) {
+    return getIcon(props.target_agent_icon, 'a');
+  } else if (themeStore.value == THEME_PARTY) {
+    return getIcon(props.target_agent_icon, 'b');
+  } else if (themeStore.value == THEME_LIGHT) {
+    return getIcon(props.target_agent_icon, 'c');
+  } else {
+    return getIcon(props.target_agent_icon, 'a');
+  }
+});
+console.log(themeStore.value, THEME_PARTY, props.target_agent_icon, 909);
 
 const report_content = computed(() => {
   // console.log(props.dialog)
@@ -472,6 +470,7 @@ const toDownloadExcel = () => {
     downloadExcel({ record_id })
       .then((res) => {
         const url = URL.createObjectURL(res.data);
+        console.log(url);
         const link = document.createElement('a');
         link.href = url;
         link.download = props.dialog.report_excels.file_name;

+ 3 - 3
src/modules/chat-item/DialogBgclMerge.vue

@@ -104,12 +104,12 @@ onMounted(() => {});
   justify-content: space-between;
   gap: 30px;
   height: 42px;
-  background: rgba(10, 129, 126, 0.06);
+  background: var(--loading-title-bg);
   border-radius: 10px;
   font-family: SourceHanSansCN, SourceHanSansCN;
   font-weight: 500;
   font-size: 16px;
-  color: #0a817e;
+  color: var(--primary-default);
   padding: 0 20px;
   cursor: pointer;
 }
@@ -147,7 +147,7 @@ onMounted(() => {});
 }
 .loading-table .title {
   font-size: 16px;
-  color: #0a817e;
+  color: var(--primary-default);
 }
 </style>
 <style>

+ 6 - 9
src/modules/chat-item/DialogContent.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="dialog-chat-answer-content" :style="content_style">
+  <div class="dialog-chat-answer-content" :style="content_style" :class="[type === 'q' ? 'question_input_bg' : '']">
     <div v-if="is_loading" class="loading"><a-spin></a-spin> <span>正在思考中...</span></div>
     <DialogThinkContent v-if="is_think && deep_answer" :deep_loading="deep_loading" :deep_answer="deep_answer">
     </DialogThinkContent>
@@ -43,22 +43,20 @@ const props = defineProps({
 const content_style = computed(() => {
   if (props.type === 'q') {
     return {
-      background: 'rgba(10, 129, 126, 0.1)',
+      // background: 'rgba(10, 129, 126, 0.1)',
       color: '#2C2C2C',
       fontWeight: 500
     };
   }
 });
-const content_list = computed(() => {
-
-})
-onMounted(() => { });
+const content_list = computed(() => {});
+onMounted(() => {});
 </script>
 
 <style lang="css" scoped>
 .dialog-chat-answer-content {
   position: relative;
-  background-color: var(--color-bg-1);
+  /* background-color: var(--color-bg-1); */
   color: var(--color-text-1);
   border-radius: 12px;
 
@@ -76,7 +74,6 @@ onMounted(() => { });
   line-height: 24px;
 }
 
-
 .loading {
   display: flex;
   align-items: center;
@@ -100,7 +97,7 @@ onMounted(() => { });
   text-align: left;
 }
 
-.answer-content-text .katex-display>.katex {
+.answer-content-text .katex-display > .katex {
   white-space: pre-wrap !important;
 }
 

+ 14 - 4
src/modules/chat-item/DialogMergeTable.vue

@@ -1,10 +1,20 @@
 <template>
   <div class="merge_table">
-    <a-table :data="is_change_page ? target_table_data : table_data" :loading="is_loading" :pagination="false"
-      :bordered="false">
+    <a-table
+      :data="is_change_page ? target_table_data : table_data"
+      :loading="is_loading"
+      :pagination="false"
+      :bordered="false"
+    >
       <template #columns>
-        <a-table-column v-for="item in table_column" :key="item.dataIndex" :title="item.title"
-          :data-index="item.dataIndex" :header-cell-style="{ backgroundColor: '#E6F2F2' }" :width="item.width">
+        <a-table-column
+          v-for="item in table_column"
+          :key="item.dataIndex"
+          :title="item.title"
+          :data-index="item.dataIndex"
+          :header-cell-style="{ backgroundColor: 'var(--table-th-bg)' }"
+          :width="item.width"
+        >
           <template #cell="{ record }">
             {{ record[item.dataIndex] }}
           </template>

+ 14 - 16
src/modules/chat-item/ReportFile.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="report-file">
-    <img class="icon" :src="DOCX" alt="">
+    <img class="icon" :src="DOCX" alt="" />
     <div class="info">
       <a-tooltip :content="file.title">
         <div class="title">{{ ellipsisMiddle(file.title) }}</div>
@@ -14,19 +14,17 @@
 </template>
 
 <script setup>
-import { ref, computed } from 'vue'
-import DOCX from '../../assets/chat-report/excel-icon.svg'
+import { ref, computed } from 'vue';
+import DOCX from '../../assets/chat-report/excel-icon.svg';
 
 const props = defineProps({
-  file: Object,
+  file: Object
+});
 
-})
-
-
-const emit = defineEmits(['toDownload', 'removeFile'])
+const emit = defineEmits(['toDownload', 'removeFile']);
 
 function ellipsisMiddle(str) {
-  console.log(str, 1111)
+  console.log(str, 1111);
   if (str.length <= 11) {
     return str; // 不超过 11 个字符直接返回
   }
@@ -38,9 +36,9 @@ function ellipsisMiddle(str) {
 }
 const remove = (file) => {
   // 正在上传文件不允许删除
-  if (file.status / 1 === 1) return
-  emit('removeFile')
-}
+  if (file.status / 1 === 1) return;
+  emit('removeFile');
+};
 </script>
 
 <style scoped lang="css">
@@ -54,7 +52,7 @@ const remove = (file) => {
   display: flex;
   gap: 10px;
   border-radius: 10px;
-  border: 1px solid #E5E5E5;
+  border: 1px solid #e5e5e5;
 }
 
 .icon {
@@ -79,15 +77,15 @@ const remove = (file) => {
   font-family: SourceHanSansCN, SourceHanSansCN;
   font-weight: 400;
   font-size: 14px;
-  color: #B0BEBD;
+  color: #b0bebd;
 }
 
 .error_status {
-  color: #D63030;
+  color: #d63030;
 }
 
 .ing_status {
-  color: #0A817E
+  color: var(--primary-default);
 }
 
 .close {

+ 39 - 30
src/modules/chat-item/RobotIcons.vue

@@ -1,55 +1,64 @@
 <template>
   <a-modal v-model:visible="visible" @cancel="handleCancel" :modalClass="'customClass'">
-    <template #title>
-      替换智能体图标
-    </template>
+    <template #title> 替换智能体图标 </template>
     <div class="body">
       <div class="icon-item" v-for="(item, index) in icon_list" :key="index">
-        <img class="icon" :class="[target_icon === item ? 'icon_active' : '']" :src="getIcon(item)" alt=""
-          @click="handleClick(item)">
+        <img
+          class="icon"
+          :class="[target_icon === item ? 'icon_active' : '']"
+          :src="getIcon(item, theme_map[themeStore.value])"
+          alt=""
+          @click="handleClick(item)"
+        />
       </div>
     </div>
     <template #footer>
-      <a-button type="info" class="btn" style="border: none;" @click="handleCancel">取消</a-button>
+      <a-button type="info" class="btn" style="border: none" @click="handleCancel">取消</a-button>
       <a-button class="update_btn btn" @click="handleOk">确定</a-button>
     </template>
   </a-modal>
 </template>
 
 <script setup>
-import { ref, computed, onMounted } from 'vue'
-import { icon_map, getIcon } from '../common/use-icon-map'
+import { ref, computed, onMounted } from 'vue';
+import { getIcon } from '../common/use-icon-map';
+import { THEME_LIGHT, THEME_DARK, THEME_GREEN, THEME_PARTY } from '../../base/variables';
+import { useThemeStore } from '../../base/store/use-theme';
 const props = defineProps({
   showModal: Boolean,
   target_agent_icon: String
-})
+});
+
+const emit = defineEmits(['close', 'update']);
 
-const emit = defineEmits(['close', 'update'])
+const themeStore = useThemeStore();
 
-const target_icon = ref('icon_1')
+const target_icon = ref('icon_1');
 
-const icon_list = ref([
-  'icon_1', 'icon_2', 'icon_4', 'icon_5', 'icon_6', 'icon_7', 'icon_8', 'icon_9', 'icon_10',
-  'icon_11', 'icon_12', 'icon_13', 'icon_14', 'icon_15', 'icon_16', 'icon_17', 'icon_18'
-])
+const icon_list = ref(['icon_1', 'icon_2', 'icon_3', 'icon_4', 'icon_5', 'icon_6', 'icon_7', 'icon_8', 'icon_9']);
 const visible = computed(() => {
-  return props.showModal
-})
+  return props.showModal;
+});
+const theme_map = {
+  green: 'a',
+  light: 'c',
+  party: 'b'
+};
 
 const handleClick = (item) => {
-  target_icon.value = item
-}
+  target_icon.value = item;
+};
 
 const handleCancel = () => {
-  emit('close')
-}
+  emit('close');
+};
 const handleOk = () => {
-  emit('update', target_icon.value)
-}
+  emit('update', target_icon.value);
+};
 
 onMounted(() => {
-  target_icon.value = props.target_agent_icon
-})
+  target_icon.value = props.target_agent_icon;
+});
 </script>
 <style scoped lang="css">
 .body {
@@ -74,17 +83,17 @@ onMounted(() => {
 }
 
 .icon_active {
-  border-color: #0A817E;
+  border-color: var(--primary-default);
 }
 
 .update_btn {
-  background-color: #0a817e;
+  background-color: var(--primary-default);
   color: #fff;
 }
 
 .update_btn:hover {
-  border-color: #0A817E;
-  background-color: #0a817e;
+  border-color: var(--primary-default);
+  background-color: var(--primary-default);
   color: #fff;
   opacity: 0.8;
 }
@@ -105,7 +114,7 @@ onMounted(() => {
 .customClass .arco-modal-header {
   border: none;
   height: 60px;
-  background: linear-gradient(180deg, #E6f2f2 0%, #FFFFFF 100%);
+  background: linear-gradient(180deg, var(--alert-top-bg) 0%, #ffffff 100%);
   box-shadow: 0px 0px 20px 0px rgba(0, 50, 49, 0.1);
 }
 

+ 23 - 19
src/modules/chat-item/RuleAction.vue

@@ -1,38 +1,42 @@
 <template>
   <div class="rule-action">
     <div class="btn" :class="props.disabled ? 'btn-disabled' : ''" @click="toConfigRule">规则配置</div>
-    <RuleModal v-if="show_modal" :event_id="props.event_id" :showModel="show_modal" @close="handleClose"
-      @merge="toMerge"></RuleModal>
+    <RuleModal
+      v-if="show_modal"
+      :event_id="props.event_id"
+      :showModel="show_modal"
+      @close="handleClose"
+      @merge="toMerge"
+    ></RuleModal>
   </div>
-
 </template>
 
 <script setup>
-import { ref } from 'vue'
-import { getTableRules } from '../table-dialog/api-dialog'
-import RuleModal from './rule-action/RuleModel.vue'
+import { ref } from 'vue';
+import { getTableRules } from '../table-dialog/api-dialog';
+import RuleModal from './rule-action/RuleModel.vue';
 
 const props = defineProps({
   event_id: String,
   disabled: Boolean
-})
+});
 
-const emit = defineEmits(['merge'])
-const show_modal = ref(false)
+const emit = defineEmits(['merge']);
+const show_modal = ref(false);
 
 const toConfigRule = async () => {
-  console.log(props.disabled, 99090)
-  if (props.disabled) return
-  show_modal.value = true
-}
+  console.log(props.disabled, 99090);
+  if (props.disabled) return;
+  show_modal.value = true;
+};
 const toMerge = (data) => {
-  emit('merge', data)
-  show_modal.value = false
-}
+  emit('merge', data);
+  show_modal.value = false;
+};
 
 const handleClose = () => {
-  show_modal.value = false
-}
+  show_modal.value = false;
+};
 </script>
 <style scoped lang="css">
 .btn {
@@ -45,7 +49,7 @@ const handleClose = () => {
   align-items: center;
   justify-content: center;
   /* font-size: 16px; */
-  background: #0A817E;
+  background: var(--primary-default);
   color: #fff;
   cursor: pointer;
   margin-top: 20px;

+ 100 - 66
src/modules/chat-item/rule-action/RuleModel.vue

@@ -1,28 +1,60 @@
 <template>
-  <a-modal v-model:visible="visible" width="80%" top="15vh" :align-center="false" :mask-closable="false"
-    title-align="start" :footer="false" :modalClass="'customSettingClass'" @cancel="handleCancel">
+  <a-modal
+    v-model:visible="visible"
+    width="80%"
+    top="15vh"
+    :align-center="false"
+    :mask-closable="false"
+    title-align="start"
+    :footer="false"
+    :modalClass="'customSettingClass'"
+    @cancel="handleCancel"
+  >
     <template #title>
       <div class="header">
         <div>表格校验配置</div>
-        <img v-if="show_add_rule" class="icon" src="../../../assets/chat-report/add.svg" alt=""
-          @click="handleAddTableItem">
+        <img
+          v-if="show_add_rule"
+          class="icon"
+          src="../../../assets/chat-report/add.svg"
+          alt=""
+          @click="handleAddTableItem"
+        />
       </div>
     </template>
     <div class="body">
-      <RuleTable ref="ruleTableRef" :table_list="rule_list" :title_list="title_list" :event_id="event_id"
-        :sheet_name="target_sheet_name" :is_loading="rule_list_loading" @updateList="toUpdateList">
+      <RuleTable
+        ref="ruleTableRef"
+        :table_list="rule_list"
+        :title_list="title_list"
+        :event_id="event_id"
+        :sheet_name="target_sheet_name"
+        :is_loading="rule_list_loading"
+        @updateList="toUpdateList"
+      >
       </RuleTable>
     </div>
     <div class="footer">
       <!-- <a-button class="save-btn">保存</a-button> -->
       <div class="tags">
-        <div class="tag-item" :class="target_sheet_index == index ? 'tag-item-active' : ''"
-          v-for="(item, index) in excel_title_list" :key="item.sheet_name" @click="handleChangeFn(index)">{{
-            item.sheet_name }}</div>
+        <div
+          class="tag-item"
+          :class="target_sheet_index == index ? 'tag-item-active' : ''"
+          v-for="(item, index) in excel_title_list"
+          :key="item.sheet_name"
+          @click="handleChangeFn(index)"
+        >
+          {{ item.sheet_name }}
+        </div>
       </div>
       <div class="merge_btn">
-        <a-button class="save-btn" :class="[is_merge_disabled ? 'save-btn-disabled' : '']" :disabled="is_merge_disabled"
-          @click="toMerge">确认合并</a-button>
+        <a-button
+          class="save-btn"
+          :class="[is_merge_disabled ? 'save-btn-disabled' : '']"
+          :disabled="is_merge_disabled"
+          @click="toMerge"
+          >确认合并</a-button
+        >
       </div>
     </div>
   </a-modal>
@@ -32,7 +64,12 @@
 import { Message } from '@arco-design/web-vue';
 import { ref, computed, onMounted } from 'vue';
 import RuleTable from './RuleTable.vue';
-import { getTableRules, getTableRuleTitleList, mergeTableData, getCheckedErrorList } from '../../table-dialog/api-dialog';
+import {
+  getTableRules,
+  getTableRuleTitleList,
+  mergeTableData,
+  getCheckedErrorList
+} from '../../table-dialog/api-dialog';
 
 const props = defineProps({
   showModel: Boolean,
@@ -41,40 +78,39 @@ const props = defineProps({
 
 const emit = defineEmits(['close', 'merge']);
 
-const excel_list = ref([
-])
-const excel_title_list = ref([])
-const target_sheet_index = ref(0)
+const excel_list = ref([]);
+const excel_title_list = ref([]);
+const target_sheet_index = ref(0);
 // const rule_list = ref([])
-const rule_list_loading = ref(false)
-const ruleTableRef = ref(null)
+const rule_list_loading = ref(false);
+const ruleTableRef = ref(null);
 
 const show_add_rule = computed(() => {
   // return
-  return !rule_list.value.length && !rule_list_loading.value
-})
+  return !rule_list.value.length && !rule_list_loading.value;
+});
 
 const rule_list = computed(() => {
-  return excel_list.value[target_sheet_index.value]?.data || []
-})
+  return excel_list.value[target_sheet_index.value]?.data || [];
+});
 const title_list = computed(() => {
-  return excel_title_list.value[target_sheet_index.value]?.data || []
-})
+  return excel_title_list.value[target_sheet_index.value]?.data || [];
+});
 const event_id = computed(() => {
-  return props.event_id
-})
+  return props.event_id;
+});
 
 const target_sheet_name = computed(() => {
-  return excel_title_list.value[target_sheet_index.value]?.sheet_name
-})
+  return excel_title_list.value[target_sheet_index.value]?.sheet_name;
+});
 
 const is_merge_disabled = computed(() => {
   // return !excel_list.value.length || !excel_title_list.value.length
-  return rule_list_loading.value
-})
+  return rule_list_loading.value;
+});
 
 const toMerge = async () => {
-  emit('merge', { event_id: event_id.value })
+  emit('merge', { event_id: event_id.value });
   // const res = await mergeTableDataFun()
   // if (res.code / 1 == 200) {
   //   const data = {
@@ -84,78 +120,75 @@ const toMerge = async () => {
   //   await getCheckedErrorListFun(data)
 
   // }
-
-}
+};
 
 const handleCancel = () => {
-  emit('close')
-}
+  emit('close');
+};
 
 const handleChangeFn = (idx) => {
-  target_sheet_index.value = idx
-}
+  target_sheet_index.value = idx;
+};
 
 const visible = computed(() => {
   return props.showModel;
 });
 
 const toUpdateList = async () => {
-  await getCommonRulesFunc()
-}
+  await getCommonRulesFunc();
+};
 const getCommonRulesFunc = async (loading = true) => {
   // const event_id = sessionStorage.getItem('event_id')
   try {
     if (loading) {
-      rule_list_loading.value = true
+      rule_list_loading.value = true;
     }
-    const res = await getTableRules({ event_id: event_id.value })
+    const res = await getTableRules({ event_id: event_id.value });
     if (res.code / 1 === 200) {
-      excel_list.value = res.data.rows || []
+      excel_list.value = res.data.rows || [];
       if (res.data.rows.length) {
-        target_sheet_index.value = 0
+        target_sheet_index.value = 0;
       }
     }
   } catch (e) {
-    console.log(e)
-    rule_list.value = []
+    console.log(e);
+    rule_list.value = [];
   } finally {
-    rule_list_loading.value = false
+    rule_list_loading.value = false;
   }
-}
+};
 const getTableRuleTitleListFunc = async () => {
-  rule_list_loading.value = true
+  rule_list_loading.value = true;
   const res = await getTableRuleTitleList({
     event_id: event_id.value
-  })
+  });
   if (res.code / 1 === 200) {
-    excel_title_list.value = res.data.rows || []
+    excel_title_list.value = res.data.rows || [];
     if (excel_title_list.value.length) {
-      excel_title_list.value.forEach(item => {
-        item.data = item.data.map(it => {
+      excel_title_list.value.forEach((item) => {
+        item.data = item.data.map((it) => {
           return {
             ...it,
             all_title: it.col_name + '-' + it.title
-          }
-        })
-      })
+          };
+        });
+      });
     }
   }
-}
+};
 
 const handleAddTableItem = () => {
   if (ruleTableRef.value) {
-    ruleTableRef.value.addRule()
+    ruleTableRef.value.addRule();
   }
-}
-
+};
 
 onMounted(async () => {
-  await getTableRuleTitleListFunc()
-  await getCommonRulesFunc()
-})
+  await getTableRuleTitleListFunc();
+  await getCommonRulesFunc();
+});
 
 // [{ id: 1, name: 'xxx', rule_data: { type: 1, is_must: true, check_repeat: true }, rule_type: 'string', title: 'xxx' }, { id: 1, name: 'xxx', rule_data: { type: 1, is_must: true, check_repeat: true }, rule_type: 'string', title: 'xxx' }, { id: 3, name: 'xxx', rule_data: { type: 4, is_must: true, check_repeat: true }, rule_type: 'string', title: 'xxx' }]
-
 </script>
 <style scoped lang="css">
 .header {
@@ -198,14 +231,14 @@ onMounted(async () => {
 .footer .tags .tag-item-active {
   font-family: Source Han Sans;
   font-size: 16px;
-  color: #0A817E;
+  color: var(--primary-default);
   font-weight: 600;
 }
 
 .footer .save-btn {
   width: 120px;
   height: 48px;
-  background: #0A817E;
+  background: var(--primary-default);
   border-radius: 24px;
   color: #fff;
 }
@@ -224,7 +257,8 @@ onMounted(async () => {
 }
 </style>
 <style>
-.customSettingClass {}
+.customSettingClass {
+}
 
 .customSettingClass .arco-modal-header {
   border: none;

+ 283 - 211
src/modules/chat-item/rule-action/RuleTable.vue

@@ -2,22 +2,43 @@
   <a-table :data="table_data" :pagination="false" :bordered="false" :scroll="scroll" :loading="is_loading">
     <!-- <a-table :data="table_data" :pagination="false" :bordered="false" :scroll="scroll" :loading="is_loading"> -->
     <template #columns>
-      <a-table-column v-for="item in columns" :key="item.dataIndex" :title="item.title" :data-index="item.dataIndex"
-        :header-cell-style="{ backgroundColor: '#E6F2F2' }" align="center" :width="item.width">
+      <a-table-column
+        v-for="item in columns"
+        :key="item.dataIndex"
+        :title="item.title"
+        :data-index="item.dataIndex"
+        :header-cell-style="{ backgroundColor: 'var(--table-th-bg)' }"
+        align="center"
+        :width="item.width"
+      >
         <template #cell="{ record, column, rowIndex }">
           <div class="column" v-if="item.dataIndex === 'title'">
             <!-- <a-input v-model="table_data[rowIndex].title" :disabled="table_data[rowIndex].disabled"
               @change="inputChange(rowIndex)" :style="{ width: '150px' }" placeholder="列名" /> -->
-            <a-select v-model="table_data[rowIndex].shown_title" @change="selectChangeTitle(rowIndex)"
-              :disabled="table_data[rowIndex].disabled" :style="{ width: '150px' }" placeholder="数据类型">
-              <a-option v-for="item in sheet_title_list" :key="item.title" :value="item.all_title"
-                :disabled="item.disabled">{{ item.all_title
-                }}</a-option>
+            <a-select
+              v-model="table_data[rowIndex].shown_title"
+              @change="selectChangeTitle(rowIndex)"
+              :disabled="table_data[rowIndex].disabled"
+              :style="{ width: '150px' }"
+              placeholder="数据类型"
+            >
+              <a-option
+                v-for="item in sheet_title_list"
+                :key="item.title"
+                :value="item.all_title"
+                :disabled="item.disabled"
+                >{{ item.all_title }}</a-option
+              >
             </a-select>
           </div>
           <div class="column" v-if="item.dataIndex === 'rule_type'">
-            <a-select v-model="table_data[rowIndex].rule_type" @change="selectChange(rowIndex)"
-              :disabled="table_data[rowIndex].disabled" :style="{ width: '150px' }" placeholder="数据类型">
+            <a-select
+              v-model="table_data[rowIndex].rule_type"
+              @change="selectChange(rowIndex)"
+              :disabled="table_data[rowIndex].disabled"
+              :style="{ width: '150px' }"
+              placeholder="数据类型"
+            >
               <a-option v-for="item in data_types" :key="item.label" :value="item.value">{{ item.label }}</a-option>
             </a-select>
           </div>
@@ -25,45 +46,89 @@
             <a-tooltip :content="table_data[rowIndex].rule_text">
               <div class="rule_range">{{ table_data[rowIndex].rule_text }}</div>
             </a-tooltip>
-            <a-trigger ref="triggerRefs" :popup-visible="table_data[rowIndex].show_trigger"
-              @popup-visible-change="(val) => handleVisibleChange(val, rowIndex)" trigger="click"
-              :unmount-on-close="false" :popup-translate="[-180, 20]" scroll-to-close>
-              <img class="icon" src="../../../assets/chat_excel/expond.svg" alt="">
+            <a-trigger
+              ref="triggerRefs"
+              :popup-visible="table_data[rowIndex].show_trigger"
+              @popup-visible-change="(val) => handleVisibleChange(val, rowIndex)"
+              trigger="click"
+              :unmount-on-close="false"
+              :popup-translate="[-180, 20]"
+              scroll-to-close
+            >
+              <img class="icon" src="../../../assets/chat_excel/expond.svg" alt="" />
               <template #content>
                 <div class="demo-basic">
-                  <RuleConfig v-if="table_data[rowIndex].show_trigger" :type="table_data[rowIndex].rule_type"
-                    :index="rowIndex" :rules="table_data[rowIndex].rule_data" @closeConfig="closeRuleConfig"
-                    @saveConfig="saveRuleConfig">
+                  <RuleConfig
+                    v-if="table_data[rowIndex].show_trigger"
+                    :type="table_data[rowIndex].rule_type"
+                    :index="rowIndex"
+                    :rules="table_data[rowIndex].rule_data"
+                    @closeConfig="closeRuleConfig"
+                    @saveConfig="saveRuleConfig"
+                  >
                   </RuleConfig>
                 </div>
               </template>
             </a-trigger>
           </div>
           <div class="column" v-if="item.dataIndex === 'repeat'">
-            <a-switch v-model="table_data[rowIndex].rule_data.repeat" :checked-value="1" :unchecked-value="2"
-              :disabled="table_data[rowIndex].disabled" checked-color="#0A817E"
-              @change="switchRepeatChange(rowIndex)" />
+            <a-switch
+              v-model="table_data[rowIndex].rule_data.repeat"
+              :checked-value="1"
+              :unchecked-value="2"
+              :disabled="table_data[rowIndex].disabled"
+              checked-color="#0A817E"
+              @change="switchRepeatChange(rowIndex)"
+            />
           </div>
           <div class="column" v-if="item.dataIndex === 'required'">
-            <a-switch v-model="table_data[rowIndex].rule_data.required" :checked-value="1" :unchecked-value="2"
-              :disabled="table_data[rowIndex].disabled" checked-color="#0A817E"
-              @change="switchRequiredChange(rowIndex)" />
+            <a-switch
+              v-model="table_data[rowIndex].rule_data.required"
+              :checked-value="1"
+              :unchecked-value="2"
+              :disabled="table_data[rowIndex].disabled"
+              checked-color="#0A817E"
+              @change="switchRequiredChange(rowIndex)"
+            />
           </div>
           <div class="operate" v-if="item.dataIndex === 'operate'">
-            <a-popconfirm content-class="my_custom_popconfirm" content="确认删除该条数据?" type="warning"
-              @ok="toRemoveRule(rowIndex)">
-              <img class="icon" src="../../../assets/chat-report/reduce.svg" v-if="!table_data[rowIndex].is_edit"
-                alt="">
+            <a-popconfirm
+              content-class="my_custom_popconfirm"
+              content="确认删除该条数据?"
+              type="warning"
+              @ok="toRemoveRule(rowIndex)"
+            >
+              <img
+                class="icon"
+                src="../../../assets/chat-report/reduce.svg"
+                v-if="!table_data[rowIndex].is_edit"
+                alt=""
+              />
             </a-popconfirm>
 
-            <img class="icon" :class="table_data.length > 1 ? 'icon_add' : 'icon_add_only'"
+            <img
+              class="icon"
+              :class="table_data.length > 1 ? 'icon_add' : 'icon_add_only'"
               src="../../../assets/chat-report/add.svg"
-              v-if="!table_data[rowIndex].is_edit && rowIndex == table_data.length - 1" alt="" @click=addRule(rowIndex)>
-            <img class="icon" :class="table_data.length > 1 ? 'icon_add' : 'icon_add_only'"
-              src="../../../assets/chat_excel/close.svg" v-if="table_data[rowIndex].is_edit" alt=""
-              @click=unsaveRule(rowIndex)>
-            <img class="icon" src="../../../assets/chat_excel/changed.svg" v-if="table_data[rowIndex].is_edit" alt=""
-              @click=saveRule(rowIndex)>
+              v-if="!table_data[rowIndex].is_edit && rowIndex == table_data.length - 1"
+              alt=""
+              @click="addRule(rowIndex)"
+            />
+            <img
+              class="icon"
+              :class="table_data.length > 1 ? 'icon_add' : 'icon_add_only'"
+              src="../../../assets/chat_excel/close.svg"
+              v-if="table_data[rowIndex].is_edit"
+              alt=""
+              @click="unsaveRule(rowIndex)"
+            />
+            <img
+              class="icon"
+              src="../../../assets/chat_excel/changed.svg"
+              v-if="table_data[rowIndex].is_edit"
+              alt=""
+              @click="saveRule(rowIndex)"
+            />
           </div>
         </template>
       </a-table-column>
@@ -72,13 +137,13 @@
 </template>
 
 <script setup>
-import { reactive, ref, computed, watch } from 'vue'
+import { reactive, ref, computed, watch } from 'vue';
 import RuleConfig from './rule-setting/RuleConfig.vue';
 import { deleteTableRules, addTableRules, editTableRules } from '../../table-dialog/api-dialog';
 import { Message } from '@arco-design/web-vue';
 import { getUserId } from '../../../utils/get-user-id';
 import { getRuleText } from './use-rule-format';
-import { funcDebounce } from '../../../utils/utils'
+import { funcDebounce } from '../../../utils/utils';
 
 const props = defineProps({
   table_list: Array,
@@ -86,9 +151,9 @@ const props = defineProps({
   is_loading: Boolean,
   event_id: String,
   sheet_name: String
-})
+});
 
-const emit = defineEmits(['updateList'])
+const emit = defineEmits(['updateList']);
 
 const scroll = {
   x: '100%',
@@ -110,24 +175,24 @@ const columns = [
     title: '校验规则',
     dataIndex: 'data_range',
     slotName: 'data_range',
-    width: 400  // 增加校验规则列的宽度
+    width: 400 // 增加校验规则列的宽度
   },
   {
     title: '重复值校验',
-    dataIndex: 'repeat',
+    dataIndex: 'repeat'
   },
   {
     title: '是否必填',
     dataIndex: 'required',
-    slotName: 'required',
+    slotName: 'required'
   },
   {
     title: '操作',
-    dataIndex: 'operate',
-  },
-]
+    dataIndex: 'operate'
+  }
+];
 
-const table_data = reactive([])
+const table_data = reactive([]);
 
 const data_types = [
   {
@@ -149,32 +214,31 @@ const data_types = [
   {
     label: '百分比',
     value: 'percentage'
-  },
-]
+  }
+];
 
 const sheet_title_list = computed(() => {
-  const list_all = props.title_list
-  const table_data_title_list = table_data.map(item => item.title)
-  list_all.forEach(item => {
+  const list_all = props.title_list;
+  const table_data_title_list = table_data.map((item) => item.title);
+  list_all.forEach((item) => {
     if (table_data_title_list.includes(item.title)) {
-      item.disabled = true
+      item.disabled = true;
     } else {
-      item.disabled = false
+      item.disabled = false;
     }
-  })
-  return list_all
-})
-
-const triggerRefs = ref(null)
+  });
+  return list_all;
+});
 
+const triggerRefs = ref(null);
 
 const addRule = () => {
-  if (table_data.some(item => item.is_edit)) return
-  table_data.forEach(item => {
-    item.show_trigger = false
-    item.is_edit = false
-    item.disabled = true
-  })
+  if (table_data.some((item) => item.is_edit)) return;
+  table_data.forEach((item) => {
+    item.show_trigger = false;
+    item.is_edit = false;
+    item.disabled = true;
+  });
 
   table_data.push({
     title: '',
@@ -188,198 +252,209 @@ const addRule = () => {
     disabled: false,
     is_edit: true,
     rule_text: ''
-  })
-}
-const toRemoveRule = funcDebounce(async (idx) => {
-  await removeRule(idx)
-}, 500, true)
+  });
+};
+const toRemoveRule = funcDebounce(
+  async (idx) => {
+    await removeRule(idx);
+  },
+  500,
+  true
+);
 const removeRule = async (idx) => {
-  if (table_data[idx].disabled) return
-  table_data[idx].disabled = true
-  const res = await deleteCommonRulesFunc({ table_rule_id: table_data[idx].id, event_id: props.event_id, sheet_name: props.sheet_name })
+  if (table_data[idx].disabled) return;
+  table_data[idx].disabled = true;
+  const res = await deleteCommonRulesFunc({
+    table_rule_id: table_data[idx].id,
+    event_id: props.event_id,
+    sheet_name: props.sheet_name
+  });
   if (res.code / 1 == 200) {
     table_data.splice(idx, 1);
   } else {
-    table_data[idx].disabled = false
-    Message.error('删除失败')
+    table_data[idx].disabled = false;
+    Message.error('删除失败');
   }
-
-}
-const saveRule = funcDebounce(async (idx) => {
-  if (table_data[idx].disabled) return
-  table_data[idx].disabled = true
-  const user_id = await getUserId()
-  const data = table_data[idx]
-
-  if (table_data[idx].shown_title.split('-').length > 1) {
-    table_data[idx].title = table_data[idx].shown_title.split('-')[1]
-  }
-  if (!data.title.trim()) {
-    return Message.error('列名必填')
-  }
-  // 编辑
-  if (data.id) {
-    const params_data = {
-      title: data.title,
-      rule_type: data.rule_type,
-      rule_data: data.rule_data,
-      user_id,
-      event_id: props.event_id,
-      sheet_name: props.sheet_name,
-      table_rule_id: data.id,
-      col_idx: data.col_idx,
-    }
-    const res = await editCommonRulesFunc(params_data)
-    if (res.code / 1 === 200) {
-      Message.success('编辑成功')
-      emit('updateList')
-      table_data.forEach(item => {
-        item.is_edit = false
-        item.disabled = false
-      })
-    } else {
-      Message.error(res.msg)
+};
+const saveRule = funcDebounce(
+  async (idx) => {
+    if (table_data[idx].disabled) return;
+    table_data[idx].disabled = true;
+    const user_id = await getUserId();
+    const data = table_data[idx];
+
+    if (table_data[idx].shown_title.split('-').length > 1) {
+      table_data[idx].title = table_data[idx].shown_title.split('-')[1];
     }
-
-  } else {
-    // 新增
-    const params_data = {
-      title: data.title,
-      rule_type: data.rule_type,
-      rule_data: data.rule_data,
-      user_id,
-      event_id: props.event_id,
-      sheet_name: props.sheet_name,
-      col_idx: data.col_idx
+    if (!data.title.trim()) {
+      return Message.error('列名必填');
     }
-    const res = await addCommonRulesFunc(params_data)
-    if (res.code / 1 === 200) {
-      Message.success('新增成功')
-      emit('updateList')
-      table_data.forEach(item => {
-        item.is_edit = false
-        item.disabled = false
-      })
+    // 编辑
+    if (data.id) {
+      const params_data = {
+        title: data.title,
+        rule_type: data.rule_type,
+        rule_data: data.rule_data,
+        user_id,
+        event_id: props.event_id,
+        sheet_name: props.sheet_name,
+        table_rule_id: data.id,
+        col_idx: data.col_idx
+      };
+      const res = await editCommonRulesFunc(params_data);
+      if (res.code / 1 === 200) {
+        Message.success('编辑成功');
+        emit('updateList');
+        table_data.forEach((item) => {
+          item.is_edit = false;
+          item.disabled = false;
+        });
+      } else {
+        Message.error(res.msg);
+      }
     } else {
-      Message.error(res.msg)
+      // 新增
+      const params_data = {
+        title: data.title,
+        rule_type: data.rule_type,
+        rule_data: data.rule_data,
+        user_id,
+        event_id: props.event_id,
+        sheet_name: props.sheet_name,
+        col_idx: data.col_idx
+      };
+      const res = await addCommonRulesFunc(params_data);
+      if (res.code / 1 === 200) {
+        Message.success('新增成功');
+        emit('updateList');
+        table_data.forEach((item) => {
+          item.is_edit = false;
+          item.disabled = false;
+        });
+      } else {
+        Message.error(res.msg);
+      }
     }
-  }
-}, 500, true)
+  },
+  500,
+  true
+);
 const unsaveRule = (idx) => {
-
   if (table_data[idx].id) {
-    const origin_data = table_data[idx].origin_data
-    table_data[idx] = { ...origin_data, origin_data }
-    table_data.forEach(item => {
-      item.disabled = false
-      item.is_edit = false
-    })
+    const origin_data = table_data[idx].origin_data;
+    table_data[idx] = { ...origin_data, origin_data };
+    table_data.forEach((item) => {
+      item.disabled = false;
+      item.is_edit = false;
+    });
   } else {
-    table_data.splice(table_data.length - 1, 1)
-    table_data.forEach(item => {
-      item.disabled = false
-      item.is_edit = false
-    })
+    table_data.splice(table_data.length - 1, 1);
+    table_data.forEach((item) => {
+      item.disabled = false;
+      item.is_edit = false;
+    });
   }
-}
+};
 
 const saveRuleConfig = (data) => {
-  const { idx, rule_data } = data
+  const { idx, rule_data } = data;
   table_data[idx].rule_data = {
     // ...table_data[idx].rule_data,
     repeat: table_data[idx].rule_data.repeat,
     required: table_data[idx].rule_data.required,
     ...rule_data
-  }
-  table_data[idx].rule_text = getRuleText(idx, table_data)
+  };
+  table_data[idx].rule_text = getRuleText(idx, table_data);
   // 所有数据都是禁用状态
-  commonFunToChangeStatus(idx)
-  table_data[idx].show_trigger = false
-}
+  commonFunToChangeStatus(idx);
+  table_data[idx].show_trigger = false;
+};
 
 const closeRuleConfig = (index) => {
-  table_data[index].show_trigger = false
-}
+  table_data[index].show_trigger = false;
+};
 
 const selectChangeTitle = (idx) => {
-  commonFunToChangeStatus(idx)
-  const col_name = table_data[idx].shown_title.split('-')[0]
+  commonFunToChangeStatus(idx);
+  const col_name = table_data[idx].shown_title.split('-')[0];
   if (col_name) {
-    table_data[idx].col_idx = props.title_list.find(item => item.col_name == col_name).col_idx
+    table_data[idx].col_idx = props.title_list.find((item) => item.col_name == col_name).col_idx;
   }
-}
+};
 
 const selectChange = (idx) => {
-  commonFunToChangeStatus(idx)
+  commonFunToChangeStatus(idx);
   table_data[idx].rule_data = {
     repeat: table_data[idx].rule_data.repeat,
-    required: table_data[idx].rule_data.required,
-  }
-
-}
+    required: table_data[idx].rule_data.required
+  };
+};
 
 const switchRepeatChange = (idx) => {
-  commonFunToChangeStatus(idx)
-}
+  commonFunToChangeStatus(idx);
+};
 
 const switchRequiredChange = (idx) => {
-  commonFunToChangeStatus(idx)
-}
+  commonFunToChangeStatus(idx);
+};
 
 const handleVisibleChange = (value, idx) => {
-  if (table_data[idx].disabled) return
-  table_data[idx].show_trigger = value
-}
+  if (table_data[idx].disabled) return;
+  table_data[idx].show_trigger = value;
+};
 
 const commonFunToChangeStatus = (idx) => {
-  table_data.forEach(item => {
-    item.disabled = true
-  })
+  table_data.forEach((item) => {
+    item.disabled = true;
+  });
   // 当前行处于编辑状态且不禁用
-  table_data[idx].is_edit = true
-  table_data[idx].disabled = false
-}
+  table_data[idx].is_edit = true;
+  table_data[idx].disabled = false;
+};
 // 新增
 const addCommonRulesFunc = async (data) => {
-  const res = await addTableRules(data)
-  return res
-}
+  const res = await addTableRules(data);
+  return res;
+};
 // 编辑
 const editCommonRulesFunc = async (data) => {
-  const res = await editTableRules(data)
-  return res
-}
+  const res = await editTableRules(data);
+  return res;
+};
 // 删除
 const deleteCommonRulesFunc = async (data) => {
-  const res = await deleteTableRules(data)
-  return res
-}
+  const res = await deleteTableRules(data);
+  return res;
+};
 
-watch(() => props.table_list, (newList) => {
-  const list = newList.map((item, index) => {
-    return {
-      ...item,
-      show_trigger: false,
-      is_edit: false,
-      disabled: false,
-      rule_text: getRuleText(index, newList)
-    }
-  })
-  table_data.length = 0
-  // Object.assign(table_data, list)
-  Object.assign(table_data, JSON.parse(JSON.stringify(list)))
-  // 保留一份原始数据,用于取消修改用
-  table_data.forEach(item => {
-    item.origin_data = JSON.parse(JSON.stringify(item))
-    item.shown_title = props.title_list.find(it => it.col_idx === item.col_idx).col_name + '-' + item.title
-  })
-}, {
-  deep: true
-})
+watch(
+  () => props.table_list,
+  (newList) => {
+    const list = newList.map((item, index) => {
+      return {
+        ...item,
+        show_trigger: false,
+        is_edit: false,
+        disabled: false,
+        rule_text: getRuleText(index, newList)
+      };
+    });
+    table_data.length = 0;
+    // Object.assign(table_data, list)
+    Object.assign(table_data, JSON.parse(JSON.stringify(list)));
+    // 保留一份原始数据,用于取消修改用
+    table_data.forEach((item) => {
+      item.origin_data = JSON.parse(JSON.stringify(item));
+      item.shown_title = props.title_list.find((it) => it.col_idx === item.col_idx).col_name + '-' + item.title;
+    });
+  },
+  {
+    deep: true
+  }
+);
 defineExpose({
   addRule
-})
-
+});
 </script>
 <style scoped lang="css">
 .column {
@@ -393,13 +468,12 @@ defineExpose({
 .column_range {
   position: relative;
   box-sizing: border-box;
-  border: 1px solid #BFBFBF;
+  border: 1px solid #bfbfbf;
   width: 400px;
   height: 40px;
   border-radius: 8px;
   padding: 0 40px 0px 20px;
   justify-content: flex-start;
-
 }
 
 .rule_range {
@@ -426,7 +500,6 @@ defineExpose({
 
 .operate {
   position: relative;
-
 }
 
 .operate .icon {
@@ -454,14 +527,13 @@ defineExpose({
 .my_custom_popconfirm .arco-btn-primary,
 .arco-btn-primary[type='button'],
 .arco-btn-primary[type='submit'] {
-  background-color: #0a817e;
+  background-color: var(--primary-default);
 }
 
-
 .my_custom_popconfirm .arco-btn-primary:hover,
 .arco-btn-primary[type='button']:hover,
 .arco-btn-primary[type='submit']:hover {
-  background-color: #0a817e;
+  background-color: var(--primary-default);
   opacity: 0.6;
 }
 </style>

+ 14 - 11
src/modules/chat-menu/ChatHistory.vue

@@ -8,7 +8,7 @@
       <div class="group">
         <div class="group-name" v-if="today_list && today_list.length">今天</div>
         <div class="chat-nav-item" v-for="item in today_list" :key="item.id" @click="toItemDetail(item)">
-          <div class="nav-item-title" :class="[item.is_active ? 'chat-nav-item-active' : '']">
+          <div class="nav-item-title" :class="[item.is_active ? 'chat-nav-item-active title_active' : '']">
             <div class="item-name">{{ item.title }}</div>
             <a-dropdown @select="(value) => handleSelect(value, item)">
               <icon-more-vertical :size="20" class="more_icon" @click.stop />
@@ -34,7 +34,7 @@
       <div class="group">
         <div class="group-name" v-if="yesterday_list && yesterday_list.length">昨天</div>
         <div class="chat-nav-item" v-for="item in yesterday_list" :key="item.id" @click="toItemDetail(item)">
-          <div class="nav-item-title" :class="[item.is_active ? 'chat-nav-item-active' : '']">
+          <div class="nav-item-title" :class="[item.is_active ? 'chat-nav-item-active title_active' : '']">
             <div class="item-name">{{ item.title }}</div>
             <a-dropdown @select="(value) => handleSelect(value, item)">
               <icon-more-vertical :size="20" class="more_icon" @click.stop />
@@ -60,7 +60,7 @@
       <div class="group">
         <div class="group-name" v-if="oneWeek_list && oneWeek_list.length">近一周</div>
         <div class="chat-nav-item" v-for="item in oneWeek_list" :key="item.id" @click="toItemDetail(item)">
-          <div class="nav-item-title" :class="[item.is_active ? 'chat-nav-item-active' : '']">
+          <div class="nav-item-title" :class="[item.is_active ? 'chat-nav-item-active title_active' : '']">
             <div class="item-name">{{ item.title }}</div>
             <a-dropdown @select="(value) => handleSelect(value, item)">
               <icon-more-vertical :size="20" class="more_icon" @click.stop />
@@ -86,7 +86,7 @@
       <div class="group">
         <div class="group-name" v-if="last30Days_list && last30Days_list.length">最近30天</div>
         <div class="chat-nav-item" v-for="item in last30Days_list" :key="item.id" @click="toItemDetail(item)">
-          <div class="nav-item-title" :class="[item.is_active ? 'chat-nav-item-active' : '']">
+          <div class="nav-item-title" :class="[item.is_active ? 'chat-nav-item-active title_active' : '']">
             <div class="item-name">{{ item.title }}</div>
             <a-dropdown @select="(value) => handleSelect(value, item)">
               <icon-more-vertical :size="20" class="more_icon" @click.stop />
@@ -112,7 +112,7 @@
       <div class="group">
         <div class="group-name" v-if="last6Months_list && last6Months_list.length">最近半年</div>
         <div class="chat-nav-item" v-for="item in last6Months_list" :key="item.id" @click="toItemDetail(item)">
-          <div class="nav-item-title" :class="[item.is_active ? 'chat-nav-item-active' : '']">
+          <div class="nav-item-title" :class="[item.is_active ? 'chat-nav-item-active title_active' : '']">
             <div class="item-name">{{ item.title }}</div>
             <a-dropdown @select="(value) => handleSelect(value, item)">
               <icon-more-vertical :size="20" class="more_icon" @click.stop />
@@ -138,7 +138,7 @@
       <div class="group">
         <div class="group-name" v-if="moreThan6Months_list && moreThan6Months_list.length">半年前</div>
         <div class="chat-nav-item" v-for="item in moreThan6Months_list" :key="item.id" @click="toItemDetail(item)">
-          <div class="nav-item-title" :class="[item.is_active ? 'chat-nav-item-active' : '']">
+          <div class="nav-item-title" :class="[item.is_active ? 'chat-nav-item-active title_active' : '']">
             <div class="item-name">{{ item.title }}</div>
             <a-dropdown @select="(value) => handleSelect(value, item)">
               <icon-more-vertical :size="20" class="more_icon" @click.stop />
@@ -168,7 +168,8 @@
       <div class="chat-nav-list nomore" v-if="query_complete">
         <span>没有更多了~</span>
       </div>
-      <a-empty style="margin-top: 50px" v-if="!history_list.length && !is_loading" />
+      <Empty v-if="!history_list.length && !is_loading"></Empty>
+      <!-- <a-empty /> -->
     </div>
   </div>
   <DeleteModal :visible="showDelete" @ok="handleDeleteOk" @cancel="handleDeleteCancel"></DeleteModal>
@@ -192,7 +193,7 @@ import { groupHistoryByTime } from './use-history';
 import { deleteHistoryItem, updateHistoryItem } from '../conversation-dialog/api-dialog';
 import DeleteModal from '../../components/DeleteModal.vue';
 import HistoryEditModal from './HistoryEditModal.vue';
-import { Message } from '@arco-design/web-vue';
+import Empty from './Empty.vue';
 
 const props = defineProps({
   is_electron: Boolean,
@@ -333,7 +334,8 @@ const toItemDetail = (item) => {
   router.push({
     path: `/conversation/${item.conversation_id}`,
     query: {
-      id: props.chat_type
+      id: props.chat_type,
+      date: item.update_time || item.create_time
     }
   });
 };
@@ -483,11 +485,12 @@ onUnmounted(() => {
 .chat-nav-item:hover {
   border-radius: 10px;
 
-  background: #e8f3f3;
+  /* background: #e8f3f3; */
+  background: var(--bg-title);
 }
 
 .chat-nav-item-active {
-  color: #0a817e;
+  /* color: #0a817e; */
   font-weight: 600;
 }
 

+ 36 - 22
src/modules/chat-menu/ChatNew.vue

@@ -1,42 +1,56 @@
 <template>
   <div class="chat-nav">
-    <div class="nav-btn" @click="handleClick" v-if="is_fold">
-      <img class="icon" :src="chat_new_icon" alt="">
+    <div class="nav-btn bg_title" @click="handleClick" v-if="is_fold">
+      <img class="icon" :src="chat_new_icon" alt="" />
       <span>创建对话</span>
     </div>
 
     <a-tooltip position="right" :content="is_fold ? '收起' : '展开'">
-      <img v-if="is_fold" class="fold-icon" :src="fold_icon" alt="" @click="toFold">
-      <img v-else class="fold-icon un_fold" :src="unfold_icon" alt="" @click="toUnFold">
+      <img v-if="is_fold" class="fold-icon" :src="fold_icon" alt="" @click="toFold" />
+      <img v-else class="fold-icon un_fold" :src="unfold_icon" alt="" @click="toUnFold" />
     </a-tooltip>
-
-
-
   </div>
 </template>
 
 <script setup>
-import { ref } from 'vue'
-import chat_new_icon from '../../assets/chat-aside/chat-new-btn.svg'
-import fold_icon from '../../assets/chat-aside/chat-history-fold.svg'
-import unfold_icon from '../../assets/chat-aside/chat-history-unfold.svg'
+import { ref, computed } from 'vue';
+import chat_new_icon_a from '../../assets/chat-aside/chat-new-btn.svg';
+import chat_new_icon_b from '../../assets/chat-aside/chat-new-btn_b.svg';
+import chat_new_icon_c from '../../assets/chat-aside/chat-new-btn_c.svg';
+import fold_icon from '../../assets/chat-aside/chat-history-fold.svg';
+import unfold_icon from '../../assets/chat-aside/chat-history-unfold.svg';
+
+import { useThemeStore } from '../../base/store/use-theme';
+import { THEME_LIGHT, THEME_DARK, THEME_GREEN, THEME_PARTY } from '../../base/variables';
+
+const themeStore = useThemeStore();
 
 const props = defineProps({
   is_fold: Boolean
-})
+});
 
-const emit = defineEmits(['fold', 'unFold', 'newChat'])
+const emit = defineEmits(['fold', 'unFold', 'newChat']);
 
+const chat_new_icon = computed(() => {
+  if (themeStore.value == THEME_GREEN) {
+    return chat_new_icon_a;
+  } else if (themeStore.value == THEME_PARTY) {
+    return chat_new_icon_b;
+  } else if (themeStore.value == THEME_LIGHT) {
+    return chat_new_icon_c;
+  } else {
+    return chat_new_icon_a;
+  }
+});
 const toFold = () => {
-  emit('fold')
-}
+  emit('fold');
+};
 const toUnFold = () => {
-  emit('unFold')
-}
+  emit('unFold');
+};
 const handleClick = () => {
-  emit('newChat')
-}
-
+  emit('newChat');
+};
 </script>
 <style scoped lang="css">
 .chat-nav {
@@ -54,10 +68,10 @@ const handleClick = () => {
   justify-content: center;
   gap: 10px;
   border-radius: 29px;
-  background: #E8F3F3;
+  /* background: #e8f3f3; */
   cursor: pointer;
   /* padding: 12px 67px; */
-  color: #181D1D;
+  color: #181d1d;
   font-weight: 600;
   font-size: 16px;
 }

+ 49 - 0
src/modules/chat-menu/Empty.vue

@@ -0,0 +1,49 @@
+<template>
+  <div class="empty">
+    <img class="icon" :src="empty_icon" alt="" />
+    <div class="title">暂无内容</div>
+  </div>
+</template>
+
+<script setup >
+import { computed } from 'vue';
+import empty_a from '../../assets/chat-aside/empty_a.svg';
+import empty_b from '../../assets/chat-aside/empty_b.svg';
+import empty_c from '../../assets/chat-aside/empty_c.svg';
+
+import { useThemeStore } from '../../base/store/use-theme';
+import { THEME_LIGHT, THEME_DARK, THEME_GREEN, THEME_PARTY } from '../../base/variables';
+
+const themeStore = useThemeStore();
+
+const empty_icon = computed(() => {
+  if (themeStore.value == THEME_GREEN) {
+    return empty_a;
+  } else if (themeStore.value == THEME_PARTY) {
+    return empty_b;
+  } else if (themeStore.value == THEME_LIGHT) {
+    return empty_c;
+  } else {
+    return empty_a;
+  }
+});
+</script>
+<style scoped lang="css">
+.empty {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  gap: 10px;
+  margin-top: 150px;
+}
+.empty .icon {
+  width: 60px;
+}
+.empty .title {
+  font-family: SourceHanSansCN, SourceHanSansCN;
+  font-weight: 400;
+  font-size: 16px;
+  color: #b5bdc2;
+}
+</style>

+ 11 - 12
src/modules/chat-menu/HistoryEditModal.vue

@@ -11,7 +11,7 @@
       <a-input ref="inputRef" v-model="editData.title" placeholder="请输入标题名称"></a-input>
     </div>
     <template #footer>
-      <a-button type="info" style="border: none;" @click="handleCancel">取消</a-button>
+      <a-button type="info" style="border: none" @click="handleCancel">取消</a-button>
       <a-button class="update_btn" @click="handleOk" :loading="is_loading">确定</a-button>
     </template>
   </a-modal>
@@ -31,8 +31,8 @@ const emit = defineEmits(['ok', 'cancel']);
 
 const editData = ref({
   title: ''
-})
-const inputRef = ref(null)
+});
+const inputRef = ref(null);
 
 const handleOk = () => {
   emit('ok', editData.value);
@@ -43,11 +43,11 @@ const handleCancel = () => {
 };
 
 onMounted(() => {
-  editData.value = props.editItemData
+  editData.value = props.editItemData;
   nextTick(() => {
-    inputRef.value.focus()
-  })
-})
+    inputRef.value.focus();
+  });
+});
 </script>
 
 <style scoped>
@@ -59,7 +59,6 @@ onMounted(() => {
   padding: 12px;
   font-size: 18px;
   font-weight: bolder;
-
 }
 
 .title-box .icon {
@@ -90,12 +89,12 @@ onMounted(() => {
 }
 
 .update_btn {
-  background-color: #0a817e;
+  background-color: var(--primary-default);
   color: #fff;
 }
 
 .update_btn:hover {
-  background-color: #0a817e;
+  background-color: var(--primary-default);
   color: #fff;
   opacity: 0.8;
 }
@@ -103,7 +102,7 @@ onMounted(() => {
 .arco-btn-secondary.arco-btn-loading,
 .arco-btn-secondary[type='button'].arco-btn-loading,
 .arco-btn-secondary[type='submit'].arco-btn-loading {
-  background-color: #0a817e;
+  background-color: var(--primary-default);
   color: #fff;
   opacity: 0.8;
 }
@@ -128,7 +127,7 @@ onMounted(() => {
   align-items: center;
 }
 
-.arco-modal-delete-simple .title-box>span {
+.arco-modal-delete-simple .title-box > span {
   font-weight: 500;
   margin-left: 8px;
 }

+ 233 - 0
src/modules/chat-user/RecommendAgent.vue

@@ -0,0 +1,233 @@
+<template>
+  <div class="recommend-agent">
+    <div class="line"></div>
+    <div class="agent-list">
+      <div class="agent-list-item" v-for="item in agent_list" :key="item.id" @click="toAgentChart(item)">
+        <template v-if="item.hasPermiss">
+          <img class="bg_icon" :class="[target_agent === item.id ? 'agent_active' : '']" :src="agent_icon" alt="" />
+          <a-tooltip :content="item.name" position="right">
+            <!-- <img class="icon" :src="getIcon(item.icon, theme_map[themeStore.value])" alt="" /> -->
+            <img class="icon" :src="item.icon" alt="" />
+          </a-tooltip>
+        </template>
+      </div>
+      <a-popover position="rb" trigger="hover" :content-class="'my_popover'">
+        <div class="agent-list-item agent-list-item-more" v-if="show_more">
+          <img class="bg_icon" :src="agent_icon" alt="" />
+          <img class="icon_more" :src="icon_more" alt="" />
+        </div>
+        <template #content>
+          <div class="used_list">
+            <div class="used_list_item" v-for="item in used_list" :key="item.id" @click="toAgentChart(item)">
+              <img class="icon" :src="item.icon" alt="" />
+              <div class="title">{{ item.title }}</div>
+            </div>
+          </div>
+        </template>
+      </a-popover>
+    </div>
+
+    <div class="line"></div>
+  </div>
+</template>
+
+<script setup>
+import { ref, onMounted, onUnmounted, watch, computed } from 'vue';
+
+import agent_icon from '../../assets/chat-user/agent-bg.png';
+import icon_more from '../../assets/chat-user/icon-more.png';
+import icon_1 from '../../assets/chat-user/user_a.png';
+import agent_icon_1 from '../../assets/agent/agent_icon_1.svg';
+import agent_icon_2 from '../../assets/agent/agent_icon_2.svg';
+import agent_icon_3 from '../../assets/agent/agent_icon_3.svg';
+import agent_icon_4 from '../../assets/agent/agent_icon_4.svg';
+
+import { useAgentUsedStore } from '../../base/store/use-agent-used';
+import { useBtnAuthStore } from '../../base/store/use-btn-auth';
+import { useThemeStore } from '../../base/store/use-theme';
+import { getIcon } from '../common/use-icon-map';
+
+import { useRouter, useRoute } from 'vue-router';
+// import { updateAgentUsedList } from './useAgentUsed';
+
+const agentUsedStore = useAgentUsedStore();
+const btnAuthStore = useBtnAuthStore();
+const themeStore = useThemeStore();
+console.log(themeStore);
+
+const show_more = computed(() => {
+  return agentUsedStore.agent_used.length;
+});
+const show_znwd = computed(() => {
+  return btnAuthStore.btn_auth_obj.znwd;
+});
+const show_bgsc = computed(() => {
+  return btnAuthStore.btn_auth_obj.bgsc;
+});
+const show_znws = computed(() => {
+  return btnAuthStore.btn_auth_obj.znws;
+});
+
+const router = useRouter();
+const route = useRoute();
+
+const target_agent = ref('');
+
+const agent_list = computed(() => {
+  return [
+    {
+      id: 'znwd',
+      name: '智库问答',
+      icon: agent_icon_1,
+      hasPermiss: show_znwd.value
+    },
+    {
+      id: 'bgsc',
+      name: '报告自动生成',
+      icon: agent_icon_2,
+      hasPermiss: show_bgsc.value
+    },
+    {
+      id: 'znws',
+      name: '智能问数',
+      icon: agent_icon_3,
+      hasPermiss: show_znws.value
+    }
+  ];
+});
+
+const agent_map = {
+  znwd: '智库问答',
+  bgsc: '报告自动生成',
+  znws: '智能问数',
+  bgcl: '智能报表'
+};
+
+const theme_map = {
+  green: 'a',
+  light: 'c',
+  party: 'b'
+};
+const agent_icon_map = {
+  znwd: agent_icon_1,
+  bgsc: agent_icon_2,
+  znws: agent_icon_3,
+  bgcl: agent_icon_4
+};
+const used_list = computed(() => {
+  const list = agentUsedStore.agent_used;
+  return list.map((item) => {
+    return {
+      ...item,
+      title: agent_map[item.id],
+      icon: agent_icon_map[item.id]
+    };
+  });
+});
+
+const toAgentChart = (item) => {
+  target_agent.value = item.id;
+  console.log(target_agent.value, item.id);
+  router.push({
+    path: '/conversation',
+    query: {
+      id: item.id,
+      time: Date.now()
+    }
+  });
+  // updateAgentUsedList(item.id);
+};
+
+watch(
+  () => route.query.id,
+  () => {
+    if (route.query.id) {
+      target_agent.value = route.query.id;
+    } else if (route.path === 'conversation') {
+      target_agent.value = 'znwd';
+    } else {
+      target_agent.value = '';
+    }
+  }
+);
+onMounted(() => {
+  if (route.query.id) {
+    target_agent.value = route.query.id;
+  } else if (route.path === 'conversation') {
+    target_agent.value = 'znwd';
+  } else {
+    target_agent.value = '';
+  }
+});
+</script>
+
+<style lang="css">
+.recommend-agent {
+  padding: 15px;
+}
+.line {
+  width: 100%;
+  height: 1px;
+  background-color: #b6d9d8;
+}
+.agent-list {
+  display: flex;
+  flex-direction: column;
+  /* align-items: center; */
+  justify-content: center;
+  gap: 10px;
+  margin: 10px 0;
+}
+.agent-list-item {
+  position: relative;
+}
+.agent-list-item:hover .bg_icon {
+  visibility: visible;
+}
+
+.agent-list-item .bg_icon {
+  visibility: hidden;
+}
+.agent-list-item .agent_active {
+  visibility: visible;
+}
+.agent-list-item .icon {
+  position: absolute;
+  left: 10px;
+  top: 12px;
+  width: 30px;
+}
+.agent-list-item-more {
+  display: flex;
+  justify-content: center;
+}
+.agent-list-item-more .bg_icon {
+  width: 30px;
+}
+.agent-list-item-more .icon_more {
+  position: absolute;
+  left: 18px;
+  top: 14px;
+}
+.used_list {
+  display: flex;
+  flex-direction: column;
+  gap: 10px;
+  width: 120px;
+  min-height: fit-content;
+  max-height: 200px;
+}
+.used_list .used_list_item {
+  display: flex;
+  flex-direction: row;
+  gap: 10px;
+  align-items: center;
+}
+.used_list_item .icon {
+  width: 20px;
+}
+.used_list_item:hover {
+  color: var(--primary-default);
+  cursor: pointer;
+}
+</style>

+ 10 - 9
src/modules/chat-user/RouteItem.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="route-item" @click="handleClick">
     <div class="route-icon">
-      <img class="icon-bg" :class="[data.is_active ? '' : 'icon-bg-hidden']" :src="data.bg_icon" alt="">
-      <img class="icon" :src="data.is_active ? data.active_icon : data.icon" alt="">
+      <img class="icon-bg" :class="[data.is_active ? '' : 'icon-bg-hidden']" :src="data.bg_icon" alt="" />
+      <img class="icon" :src="data.is_active ? data.active_icon : data.icon" alt="" />
     </div>
     <!-- <div v-else class="route-icon">
       <img class="icon-bg-hidden" :src="data.bg_icon" alt="">
@@ -17,13 +17,12 @@
 <script setup>
 const props = defineProps({
   data: Object
-
-})
-const emit = defineEmits(['toChange'])
+});
+const emit = defineEmits(['toChange']);
 
 const handleClick = () => {
-  emit('toChange', props.data.title)
-}
+  emit('toChange', props.data.title);
+};
 </script>
 <style scoped>
 .route-item {
@@ -46,13 +45,15 @@ const handleClick = () => {
 }
 
 .route-title {
-  color: #A9D0CD;
+  color: #fff;
+  opacity: 0.5;
+  /* color: #A9D0CD; */
   /* font-size: 18px; */
   line-height: 26px;
 }
 
 .route-title-active {
-  color: #FFFFFF;
+  color: #ffffff;
   /* font-size: 18px; */
   line-height: 26px;
 }

+ 18 - 25
src/modules/chat-user/Tools.vue

@@ -2,19 +2,16 @@
   <!-- <div class="chat-tools"> -->
   <div class="tools-btn" @click="toDownload" v-if="!isElectron()">
     <a-popover position="right">
-      <img :src="Desk" alt="">
-      <template #content>
-        下载桌面端应用
-      </template>
+      <img :src="Desk" alt="" />
+      <template #content> 下载桌面端应用 </template>
     </a-popover>
   </div>
   <a-popover position="rb" trigger="hover" :content-class="'my_popover'">
     <div class="tools-btn">
-      <img :src="Phone" alt="">
+      <img :src="Phone" alt="" />
     </div>
     <template #content>
       <div class="box-qrcode">
-
         <!-- <a-tabs default-active-key="1" v-model="active_code">
           <a-tab-pane key="1" title="Android版">
             <img class="link-icon" src="../../assets/android_link.svg" alt="">
@@ -24,17 +21,15 @@
           </a-tab-pane>
         </a-tabs> -->
         <div class="qrcode">
-          <div class="title">Android版</div>
-          <img class="link-icon" src="../../assets/android_link.png" alt="">
+          <div class="title bg_title">Android版</div>
+          <img class="link-icon" src="../../assets/android_link.png" alt="" />
         </div>
         <div class="qrcode">
-          <div class="title">iOS版</div>
-          <img class="link-icon" src="../../assets/ios_link.png" alt="">
+          <div class="title bg_title">iOS版</div>
+          <img class="link-icon" src="../../assets/ios_link.png" alt="" />
         </div>
-
-
       </div>
-      <div style="text-align: center;">扫码安装i国网 App</div>
+      <div style="text-align: center">扫码安装i国网 App</div>
     </template>
   </a-popover>
 
@@ -42,22 +37,20 @@
 </template>
 
 <script setup>
-import { ref, computed } from 'vue'
-import Desk from '../../assets/chat-user/icon-desk.svg'
-import Phone from '../../assets/chat-user/icon-phone.svg'
-import { isElectron } from '../../utils/env'
+import { ref, computed } from 'vue';
+import Desk from '../../assets/chat-user/icon-desk.svg';
+import Phone from '../../assets/chat-user/icon-phone.svg';
+import { isElectron } from '../../utils/env';
 
-const active_code = ref('1')
+const active_code = ref('1');
 
 const toDownload = () => {
-  if (import.meta.env.MODE === "production") {
-    window.open('/pdwyzz/ai-znwd/dist/desk/智库问答助手 Setup 1.0.0.exe', '_blank')
+  if (import.meta.env.MODE === 'production') {
+    window.open('/pdwyzz/ai-znwd/dist/desk/智库问答助手 Setup 1.0.0.exe', '_blank');
   } else {
-    window.open('/desk/智库问答助手 Setup 1.0.0.exe', '_blank')
+    window.open('/desk/智库问答助手 Setup 1.0.0.exe', '_blank');
   }
-
-}
-
+};
 </script>
 <style scoped lang="css">
 .tools-btn {
@@ -91,7 +84,7 @@ const toDownload = () => {
 }
 
 .qrcode .title {
-  background: #E8F3F3;
+  /* background: #e8f3f3; */
   border-radius: 16px;
   width: 120px;
   height: 32px;

+ 17 - 0
src/modules/chat-user/useAgentUsed.js

@@ -0,0 +1,17 @@
+/**
+ * 记录智能体使用的表,最新使用的放在最下边
+ * 维护到sessionStorage中
+ * */
+export const updateAgentUsedList = (id) => {
+  let agent_used = [];
+  const json_agent_used = sessionStorage.getItem('agent_used');
+  if (json_agent_used) {
+    agent_used = JSON.parse(json_agent_used);
+    const idx = agent_used.findIndex((item) => item.id == id);
+    if (idx !== -1) {
+      agent_used.splice(idx, 1);
+    }
+  }
+  agent_used.push({ id });
+  sessionStorage.setItem('agent_used', JSON.stringify(agent_used));
+};

+ 15 - 9
src/modules/chat_files/AttachDetailTable.vue

@@ -1,17 +1,26 @@
 <template>
   <a-table :data="table_data" :pagination="false" :bordered="false" :scroll="scroll">
     <template #columns>
-      <a-table-column title="序号" :header-cell-style="{ backgroundColor: '#E6F2F2' }" width="80" align="center">
+      <a-table-column
+        title="序号"
+        :header-cell-style="{ backgroundColor: 'var(--table-th-bg)' }"
+        width="80"
+        align="center"
+      >
         <template #cell="{ record }">
           {{ record.key }}
         </template>
       </a-table-column>
-      <a-table-column v-for="item in table_column" :key="item.dataIndex" :title="item.title"
-        :data-index="item.dataIndex" :header-cell-style="{ backgroundColor: '#E6F2F2' }">
+      <a-table-column
+        v-for="item in table_column"
+        :key="item.dataIndex"
+        :title="item.title"
+        :data-index="item.dataIndex"
+        :header-cell-style="{ backgroundColor: 'var(--table-th-bg)' }"
+      >
         <template #cell="{ record }">
           {{ record[item.dataIndex] }}
         </template>
-
       </a-table-column>
     </template>
   </a-table>
@@ -20,13 +29,12 @@
 </template>
 
 <script setup>
-import { reactive, ref, computed } from 'vue'
+import { reactive, ref, computed } from 'vue';
 
 const props = defineProps({
   table_column: Array,
   table_data: Array
-
-})
+});
 // const summary_data = computed(() => {
 //   if
 // })
@@ -35,8 +43,6 @@ const scroll = {
   x: '100%',
   y: '60vh'
 };
-
-
 </script>
 <style scoped lang="css">
 .column .icon {

Некоторые файлы не были показаны из-за большого количества измененных файлов