RightLegend.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <template>
  2. <div class="right-legend">
  3. <template v-for="(item, index) in riskLevelList" :key="index">
  4. <div class="legend-item">
  5. <div class="icon-box icon-box-fill">
  6. <img :src="item.img" />
  7. </div>
  8. <div class="text-box">{{ item.name }}</div>
  9. <div
  10. class="switch-box"
  11. :class="{ switchOpen: item.value }"
  12. @click="handleRiskLevel(item)"
  13. ></div>
  14. </div>
  15. </template>
  16. <div class="line-box"></div>
  17. <template v-for="(item, index) in deviceList" :key="index">
  18. <div class="legend-item" @click="handleDeviceLevel(item)">
  19. <div class="icon-box">
  20. <img :src="item.img" />
  21. </div>
  22. <div class="text-box">{{ item.name }}</div>
  23. <div class="switch-box" :class="{ switchOpen: item.value }"></div>
  24. </div>
  25. </template>
  26. <div class="line-box"></div>
  27. <template v-for="(item, index) in institutionList" :key="index">
  28. <div class="legend-item" @click="handleInstitutionLevel(item)">
  29. <div class="icon-box">
  30. <img :src="item.img" />
  31. </div>
  32. <div class="text-box">{{ item.name }}</div>
  33. <div class="switch-box" :class="{ switchOpen: item.value }"></div>
  34. </div>
  35. </template>
  36. <div class="line-box"></div>
  37. <div class="legend-item">
  38. <div class="icon-box">
  39. <img src="../../../../assets/img/Component 240(6).png" />
  40. </div>
  41. <el-select
  42. class="legend-select"
  43. placeholder="请选择病种"
  44. popper-class="custom-select"
  45. ></el-select>
  46. </div>
  47. <div class="legend-item">
  48. <div class="icon-box">
  49. <img src="../../../../assets/img/Component 240(7).png" />
  50. </div>
  51. <el-select
  52. class="legend-select"
  53. placeholder="请选择"
  54. popper-class="custom-select"
  55. ></el-select>
  56. </div>
  57. <div class="legend-item">
  58. <div class="icon-box">
  59. <img src="../../../../assets/img/Component 240(8).png" />
  60. </div>
  61. <el-select
  62. class="legend-select"
  63. popper-class="custom-select"
  64. placeholder="请选择"
  65. ></el-select>
  66. </div>
  67. <template v-if="commonStore.activeIndex == 1">
  68. <div class="line-box"></div>
  69. <div class="legend-item">
  70. <div class="text-box">病例热点</div>
  71. <div
  72. class="switch-box"
  73. :class="{ switchOpen: bingliSwitch }"
  74. @click="handleBingli()"
  75. ></div>
  76. </div>
  77. <div class="legend-item">
  78. <div class="text-box">视频会商</div>
  79. <div
  80. class="switch-box"
  81. :class="{ switchOpen: videoSwitch }"
  82. @click="handleVideo()"
  83. ></div>
  84. </div>
  85. </template>
  86. <div class="legend-item">
  87. <div class="text-box">时间轴</div>
  88. <div
  89. class="switch-box"
  90. :class="{ switchOpen: rightPanelStore.timerSwitchStatus }"
  91. @click="handleTimerSwitch"
  92. ></div>
  93. </div>
  94. </div>
  95. </template>
  96. <script setup>
  97. import { ref } from "vue";
  98. import { useCommonStore } from "@/store/common.js";
  99. import { useRightPanelStore } from "../../../../store/rightPanel";
  100. const commonStore = useCommonStore();
  101. const rightPanelStore = useRightPanelStore();
  102. const bingliSwitch = ref(true);
  103. const videoSwitch = ref(true);
  104. const handleBingli = () => {
  105. bingliSwitch.value = !bingliSwitch.value;
  106. };
  107. const handleTimerSwitch = () => {
  108. rightPanelStore.timerSwitchStatus = !rightPanelStore.timerSwitchStatus;
  109. };
  110. const handleVideo = () => {
  111. videoSwitch.value = !videoSwitch.value;
  112. };
  113. //风险等级
  114. const riskLevelList = ref([
  115. {
  116. name: "A级风险",
  117. img: new URL("../../../../assets/img/pinpoint.png", import.meta.url).href,
  118. value: true,
  119. },
  120. {
  121. name: "B级风险",
  122. img: new URL("../../../../assets/img/pinpoint(1).png", import.meta.url)
  123. .href,
  124. value: true,
  125. },
  126. {
  127. name: "C级风险",
  128. img: new URL("../../../../assets/img/pinpoint(2).png", import.meta.url)
  129. .href,
  130. value: true,
  131. },
  132. {
  133. name: "D级风险",
  134. img: new URL("../../../../assets/img/pinpoint(3).png", import.meta.url)
  135. .href,
  136. value: true,
  137. },
  138. ]);
  139. //应急
  140. const deviceList = ref([
  141. {
  142. name: "应急人员",
  143. img: new URL("../../../../assets/img/Component 240.png", import.meta.url)
  144. .href,
  145. value: true,
  146. },
  147. {
  148. name: "应急车辆",
  149. img: new URL("../../../../assets/img/Component 240(1).png", import.meta.url)
  150. .href,
  151. value: true,
  152. },
  153. {
  154. name: "物资装备",
  155. img: new URL("../../../../assets/img/Component 240(2).png", import.meta.url)
  156. .href,
  157. value: true,
  158. },
  159. ]);
  160. //机构
  161. const institutionList = ref([
  162. {
  163. name: "学校",
  164. img: new URL("../../../../assets/img/Component 240(3).png", import.meta.url)
  165. .href,
  166. value: true,
  167. },
  168. {
  169. name: "养老机构",
  170. img: new URL("../../../../assets/img/Component 240(4).png", import.meta.url)
  171. .href,
  172. value: true,
  173. },
  174. {
  175. name: "托幼机构",
  176. img: new URL("../../../../assets/img/Component 240(5).png", import.meta.url)
  177. .href,
  178. value: true,
  179. },
  180. {
  181. name: "医院",
  182. img: new URL("../../../../assets/img/history-icon.png", import.meta.url)
  183. .href,
  184. value: true,
  185. },
  186. {
  187. name: "海关",
  188. img: new URL("../../../../assets/img/haiguan-icon.png", import.meta.url)
  189. .href,
  190. value: true,
  191. },
  192. ]);
  193. const handleRiskLevel = (item) => {
  194. item.value = !item.value;
  195. };
  196. const handleDeviceLevel = (item) => {
  197. item.value = !item.value;
  198. };
  199. const handleInstitutionLevel = (item) => {
  200. item.value = !item.value;
  201. };
  202. </script>
  203. <style lang="scss">
  204. .right-legend {
  205. padding: 15px 20px;
  206. width: 217px;
  207. // height: 750px;
  208. background-image: url("../../../../assets/img/撒点弹窗.png");
  209. background-size: 100% 100%;
  210. z-index: 99;
  211. .legend-item {
  212. display: flex;
  213. align-items: center;
  214. margin: 11px 0;
  215. .icon-box {
  216. width: 28px;
  217. height: 28px;
  218. img {
  219. width: 100%;
  220. height: 100%;
  221. }
  222. }
  223. .icon-box-fill {
  224. width: 25px;
  225. height: 28px;
  226. }
  227. .text-box {
  228. width: 80px;
  229. font-family: Alibaba PuHuiTi;
  230. font-weight: normal;
  231. font-size: 18px;
  232. line-height: 24px;
  233. text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  234. text-align: left;
  235. font-style: normal;
  236. text-transform: none;
  237. background: linear-gradient(to bottom, #ffffff 0%, #88eaff 100%);
  238. -webkit-background-clip: text;
  239. -webkit-text-fill-color: transparent;
  240. margin: 0 15px;
  241. }
  242. .switch-box {
  243. width: 47px;
  244. height: 26px;
  245. background-image: url("../../../../assets/img/Component 15(2).png");
  246. background-size: 100% 100%;
  247. cursor: pointer;
  248. }
  249. .switchOpen {
  250. background-image: url("../../../../assets/img/Component 14.png");
  251. }
  252. .legend-select {
  253. width: 146px;
  254. height: 28px;
  255. margin-left: 15px;
  256. // box-shadow: inset 0px 5px 8px 0px rgba(69, 210, 255, 0.8);
  257. border-radius: 4px 4px 4px 4px;
  258. border: 1px solid #45d2ff;
  259. border-bottom: 1px solid #45d2ff;
  260. border-image: linear-gradient(
  261. 174deg,
  262. rgba(154, 249, 255, 1),
  263. rgba(111, 246, 255, 0.3)
  264. )
  265. 1 1;
  266. .el-select__wrapper {
  267. background-color: transparent !important;
  268. box-shadow: none;
  269. color: #45d2ff !important;
  270. min-height: unset;
  271. line-height: unset;
  272. }
  273. .el-select__placeholder {
  274. color: #45d2ff !important;
  275. }
  276. }
  277. }
  278. .line-box {
  279. background-image: url("../../../../assets/img/Line 550.png");
  280. height: 2px;
  281. background-size: 100% 100%;
  282. }
  283. }
  284. </style>