PeopleCd.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <template>
  2. <CommonPanel title="出动人员" class="people-cd" :img-url="CarImage">
  3. <div class="input-box">
  4. <el-input></el-input>
  5. </div>
  6. <el-scrollbar class="tree-scroll-box">
  7. <el-tree
  8. :data="leftServiceList"
  9. ref="treeTabSecondRef"
  10. show-checkbox
  11. node-key="id"
  12. :default-expanded-keys="['10000225', '10000186']"
  13. :default-expand-all="false"
  14. :renderContent="renderContent"
  15. :check-on-click-node="false"
  16. :props="defaultProps"
  17. @check="handleCheck"
  18. >
  19. <!-- @node-click="handleNodeClick"-->
  20. <!-- @checkChange="handleCheckChange"-->
  21. </el-tree>
  22. </el-scrollbar>
  23. <div class="line-box"></div>
  24. <div class="button-box">
  25. <div class="button-item"><span class="content">语音会议</span></div>
  26. <div class="button-item" @click="handleMultiPersonVideoCall"><span class="content">视频会商</span></div>
  27. <div class="button-item" @click="handleMultiPersonVideoCall"><span class="content">视频会商</span></div>
  28. </div>
  29. </CommonPanel>
  30. </template>
  31. <script setup>
  32. import { ref, watch, onMounted, onBeforeUnmount } from 'vue'
  33. import CommonPanel from "../../common/CommonPanel.vue";
  34. import CarImage from "../../../../../assets/img/people-icon.png";
  35. import { handleCdryPoint } from "@/utils/map/baseMethod.js";
  36. const emit = defineEmits(['handleVideoCallClick'])
  37. const leftServiceList = [
  38. {
  39. name: "上海市疾病预防控制中心",
  40. id: "上海市疾病预防控制中心",
  41. children: [
  42. {
  43. name: "张三(18600000000)",
  44. id: "张三(18600000000)",
  45. },
  46. {
  47. name: "张三(18600000001)",
  48. id: "张三(18600000001)",
  49. },
  50. ],
  51. },
  52. {
  53. name: "长宁区疾控预防控制中心",
  54. id: "长宁区疾控预防控制中心",
  55. children: [
  56. {
  57. name: "张利峰(18600000000)",
  58. id: "张利峰(18600000000)",
  59. },
  60. {
  61. name: "张利峰(18600000001)",
  62. id: "张利峰(18600000001)",
  63. },
  64. ],
  65. },
  66. ];
  67. const serviceKey = "name";
  68. const renderContent = (h, { node, data, store }) => {
  69. if (data.children == null || data.children.length === 0) {
  70. return h("div", { class: "custom-tree-node custom-tree-node-div" }, [
  71. h(
  72. "span",
  73. { class: "node-label ch-label", title: data[serviceKey] },
  74. data[serviceKey]
  75. ),
  76. h("div", { class: "imgbox" }, [
  77. h("div", { class: "img1", onClick: (event) => handleVoiceCallClick(event, data) }, ""),
  78. h("div", { class: "img2", onClick: (event) => handleSoundClick(event, data) }, ""),
  79. h("div", { class: "img3", onClick: (event) => handleVideoCallClick(event, data) }, ""),
  80. ]),
  81. ]);
  82. }
  83. let className = "custom-tree-node";
  84. return h("div", { class: className }, [
  85. h("span", { class: "node-label" }, [data[serviceKey]]),
  86. ]);
  87. };
  88. const handleNodeClick = (item) => {
  89. console.log(item);
  90. };
  91. const handleCheckChange = (item) => {
  92. console.log(item);
  93. };
  94. const handleCheck = (item) => {
  95. console.log(item);
  96. if(item.children){
  97. return
  98. }
  99. handleCdryPoint(true)
  100. };
  101. // 单人视频
  102. function handleVideoCallClick(event, data) {
  103. emit('handleVideoCallClick',data)
  104. }
  105. // 多人视频通话
  106. function handleMultiPersonVideoCall() {
  107. emit('handleVideoCallClick')
  108. }
  109. onBeforeUnmount(() => {
  110. handleCdryPoint(false)
  111. })
  112. </script>
  113. <style lang="scss" scoped>
  114. .people-cd {
  115. position: fixed;
  116. top: 160px;
  117. right: 860px;
  118. .input-box {
  119. padding: 15px 21px;
  120. :deep(.el-input__wrapper) {
  121. width: 360px;
  122. height: 33px;
  123. background: rgba(0, 20, 59, 0.5);
  124. border-radius: 6px 6px 6px 6px;
  125. border: 1px solid rgba(111, 229, 255, 0.3);
  126. box-shadow: none;
  127. }
  128. }
  129. .tree-scroll-box {
  130. height: calc(100% - 145px);
  131. padding: 0 21px;
  132. :deep(.el-tree) {
  133. background-color: transparent !important;
  134. height: calc(100% - 50px);
  135. .el-tree-node__expand-icon {
  136. box-sizing: content-box;
  137. color: #a2eeff;
  138. }
  139. .el-tree-node__content {
  140. background-color: transparent !important;
  141. margin-bottom: 3px;
  142. }
  143. .el-checkbox__input {
  144. .el-checkbox__inner {
  145. width: 16px;
  146. height: 16px;
  147. background: rgba(0, 20, 59, 0.5);
  148. border-radius: 3px 3px 3px 3px;
  149. border: 1px solid rgba(111, 229, 255, 0.5);
  150. }
  151. }
  152. .is-checked {
  153. .ch-label {
  154. color: #7bffff;
  155. }
  156. }
  157. }
  158. }
  159. .line-box {
  160. margin: 10px 0;
  161. width: 100%;
  162. height: 4px;
  163. background-image: url("../../../../../assets/img/image-bottom.png");
  164. background-size: 100% 100%;
  165. }
  166. .button-box {
  167. display: flex;
  168. justify-content: center;
  169. align-items: center;
  170. gap: 15px;
  171. .button-item {
  172. padding: 10px 30px;
  173. background-image: url("../../../../../assets/img/Frame 1321314705.png");
  174. background-size: 100% 100%;
  175. .content {
  176. font-family: YouSheBiaoTiHei;
  177. font-weight: 400;
  178. font-size: 20px;
  179. color: #e0e5fa;
  180. line-height: 23px;
  181. text-shadow: 0px 0px 7px rgba(75, 122, 229, 0.24),
  182. 0px 2px 8px rgba(5, 28, 55, 0.42);
  183. text-align: center;
  184. font-style: normal;
  185. text-transform: none;
  186. background: linear-gradient(to top, #149eff 15%, #effcfe 49%);
  187. -webkit-background-clip: text;
  188. -webkit-text-fill-color: transparent;
  189. }
  190. }
  191. }
  192. }
  193. </style>
  194. <style>
  195. .node-label {
  196. font-family: Alibaba PuHuiTi;
  197. font-weight: normal;
  198. font-size: 14px;
  199. color: #ffffff;
  200. line-height: 24px;
  201. text-align: left;
  202. font-style: normal;
  203. text-transform: none;
  204. }
  205. .custom-tree-node-div {
  206. display: flex;
  207. justify-content: space-between;
  208. width: 100%;
  209. .imgbox {
  210. display: flex;
  211. .img1 {
  212. width: 23px;
  213. height: 20px;
  214. background-image: url("../../../../../assets/img/phone-icon.png");
  215. background-size: 100% 100%;
  216. cursor: pointer;
  217. }
  218. .img2 {
  219. width: 23px;
  220. height: 20px;
  221. background-image: url("../../../../../assets/img/shengyin-icon.png");
  222. background-size: 100% 100%;
  223. margin-left: 5px;
  224. cursor: pointer;
  225. }
  226. .img3 {
  227. width: 23px;
  228. height: 20px;
  229. background-image: url("../../../../../assets/img/video-icon.png");
  230. background-size: 100% 100%;
  231. margin-left: 5px;
  232. cursor: pointer;
  233. }
  234. }
  235. }
  236. </style>