index.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <template>
  2. <div class="menu-content">
  3. <div class="content-header">
  4. <i class="icon-uva" />
  5. <div class="box">
  6. <div class="gradient-text title">省政务领域无人机</div>
  7. </div>
  8. </div>
  9. <div class="flex-box">
  10. <RegionalSelect @confirm="handleRegionalChange" />
  11. </div>
  12. <div class="flex-box" style="align-items: center; margin-top: 40px">
  13. <el-input v-model="queryParams.keyword" class="custom-input" placeholder="请输入" @confirm="initData" />
  14. <div class="common-btn-primary2" style="margin-left: 20px" @onclick="initData" >搜索</div>
  15. </div>
  16. <div class="flex-box" style="margin-top: 40px; margin-bottom: 40px; position: relative">
  17. <div class="flex-title1">
  18. <div class="gradient-text">无人机标签</div>
  19. </div>
  20. <div class="flex-right" @click="showTagContent = true">
  21. <div class="flex-text1">展开</div>
  22. <i class="icon1" />
  23. </div>
  24. <DroneTags v-model="showTagContent" @confirm="handleDroneTagsConfirm" />
  25. </div>
  26. <div class="flex-box tr" style="margin-bottom: 0">
  27. <div class="flex-title2">
  28. 无人机状态
  29. <i class="icon-info" />
  30. <div class="flex-content">
  31. <el-checkbox-group v-model="queryParams.status_list" class="custom-checkbox-group" @change="handleStatusChange" >
  32. <el-checkbox v-for="item in drone_status" :key="item.value" :label="item.label" :value="item.value" />
  33. </el-checkbox-group>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="custom-table">
  38. <div class="table-content">
  39. <div v-for="(item, index) in droneResourcesData.listData" :key="index" class="tr" @click="handleItem(item.id)">
  40. <div class="td">{{ item.drone_name }}</div>
  41. <div class="td" style="width: 150px; flex: unset; text-align: center">{{item.status_text}}</div>
  42. </div>
  43. </div>
  44. </div>
  45. <DroneDetail v-if="showDetail" v-model="showDetail" :id="detailId" />
  46. </div>
  47. </template>
  48. <script setup lang="ts" name="UAV">
  49. import { getDroneResourcesList, getRoughTimeStatusList } from '@/api/globalMap/UAV';
  50. import DroneTags from '@/views/globalMap/RightMenu/UAV/DroneTags.vue';
  51. import RegionalSelect from '@/views/globalMap/RightMenu/UAV/RegionalSelect.vue';
  52. import DroneDetail from '@/views/globalMap/RightMenu/UAV/DroneDetail.vue';
  53. const { proxy } = getCurrentInstance() as ComponentInternalInstance;
  54. const { drone_status } = toRefs<any>(proxy?.useDict('drone_status'));
  55. // 请求参数
  56. const queryParams = reactive({
  57. area: '',
  58. keyword: '',
  59. time: '',
  60. mode: '',
  61. type: '',
  62. status_list: ['1', '2']
  63. });
  64. let showDetail = ref(false);
  65. let detailId = ref('');
  66. let showTagContent = ref(false);
  67. // 返回数据
  68. const droneResourcesData = reactive({
  69. showDroneStatus: false,
  70. listData: []
  71. });
  72. // 无人机区域变化
  73. const handleRegionalChange = (id) => {
  74. // console.log('handleRegionalChange:', id);
  75. queryParams.area = id;
  76. initData();
  77. };
  78. // 无人机标签变化
  79. const handleDroneTagsConfirm = (data) => {
  80. queryParams.time = data.timeData;
  81. queryParams.mode = data.modeData.toString();
  82. queryParams.type = data.typeData.toString();
  83. console.log('handleDroneTagsConfirm:', queryParams);
  84. initData();
  85. };
  86. const handleStatusChange = (data) => {
  87. queryParams.status_list = data;
  88. initData();
  89. };
  90. // 获取数据
  91. const initData = async () => {
  92. const params = {...queryParams, status: queryParams.status_list.join(",")};
  93. delete params['status_list'];
  94. console.log(params);
  95. getRoughTimeStatusList(params).then((res) => {
  96. droneResourcesData.listData = res.data.list;
  97. });
  98. /*
  99. getDroneResourcesList({ area: '', drone_type: '' }).then((res) => {
  100. droneResourcesData.listData = res.data.list;
  101. });
  102. */
  103. };
  104. // 详情
  105. const handleItem = (id: string) => {
  106. detailId.value = id;
  107. showDetail.value = true;
  108. };
  109. initData();
  110. </script>
  111. <style lang="scss" scoped>
  112. .menu-content {
  113. width: 1438px;
  114. height: 2124px;
  115. background: url('@/assets/images/map/rightMenu/uva/content.png') no-repeat;
  116. padding: 200px 50px 20px 50px;
  117. font-size: 36px;
  118. position: relative;
  119. color: #000000;
  120. .content-header {
  121. position: absolute;
  122. top: 30px;
  123. left: 50px;
  124. display: flex;
  125. align-items: center;
  126. .icon-uva {
  127. width: 144px;
  128. height: 162px;
  129. background: url('@/assets/images/map/rightMenu/uva/uva.png') no-repeat;
  130. background-size: 100% 100%;
  131. }
  132. .box {
  133. width: 795px;
  134. height: 95px;
  135. background: url('@/assets/images/map/rightMenu/uva/textBox.png') no-repeat left bottom;
  136. background-size: 100% 81px;
  137. padding-left: 80px;
  138. .title {
  139. font-size: 60px;
  140. }
  141. }
  142. }
  143. }
  144. .flex-box {
  145. display: flex;
  146. justify-content: space-between;
  147. width: 100%;
  148. color: #fff;
  149. font-size: 38px;
  150. margin: 20px 0;
  151. .custom-select {
  152. width: 100%;
  153. }
  154. .flex-right {
  155. display: flex;
  156. align-items: center;
  157. cursor: pointer;
  158. .flex-text1 {
  159. margin-right: 10px;
  160. }
  161. }
  162. .icon1 {
  163. display: inline-block;
  164. width: 27px;
  165. height: 16px;
  166. background: url('@/assets/images/map/rightMenu/uva/down.png') no-repeat;
  167. background-size: 100% 100%;
  168. cursor: pointer;
  169. }
  170. .flex-title1 {
  171. width: 372px;
  172. height: 60px;
  173. background: url('@/assets/images/map/rightMenu/titleBox2.png') no-repeat left bottom;
  174. background-size: 100% 54px;
  175. padding-left: 75px;
  176. .gradient-text {
  177. font-size: 44px;
  178. font-weight: normal;
  179. }
  180. }
  181. .flex-title2 {
  182. color: #a7cbda;
  183. font-size: 38px;
  184. display: flex;
  185. align-items: center;
  186. .icon-info {
  187. width: 27px;
  188. height: 27px;
  189. background: url('@/assets/images/map/rightMenu/uva/info.png') no-repeat;
  190. background-size: 100% 100%;
  191. cursor: pointer;
  192. margin-left: 10px;
  193. }
  194. .flex-content {
  195. margin-left: 20px;
  196. :deep(.el-checkbox) {
  197. .el-checkbox__inner {
  198. width: 42px;
  199. height: 42px;
  200. background-color: transparent;
  201. border: 4px solid #86a2c2 !important;
  202. }
  203. .el-checkbox__label {
  204. font-size: 38px;
  205. color: #a7cbda;
  206. }
  207. }
  208. :deep(.el-checkbox.is-checked) {
  209. .el-checkbox__inner {
  210. background-color: #0063f7;
  211. border: 4px solid #0063f7 !important;
  212. &::after {
  213. border-width: 4px;
  214. width: 12px;
  215. height: 25px;
  216. top: -2px;
  217. left: 10px;
  218. border-color: #081c3f;
  219. }
  220. }
  221. }
  222. }
  223. }
  224. }
  225. .tr {
  226. width: 100%;
  227. height: 94px;
  228. background: url('@/assets/images/map/rightMenu/uva/tr.png') no-repeat;
  229. background-size: 100% 100%;
  230. padding: 0 30px;
  231. }
  232. .custom-table {
  233. width: 100%;
  234. .table-content {
  235. height: 1430px;
  236. overflow-y: auto;
  237. overflow-x: hidden;
  238. }
  239. .tr {
  240. width: 100%;
  241. height: auto;
  242. min-height: 78px;
  243. background: url('@/assets/images/map/rightMenu/uva/td.png') no-repeat;
  244. background-size: 100% 100%;
  245. display: flex;
  246. padding: 10px 20px;
  247. margin-top: 10px;
  248. &:hover {
  249. background: url('@/assets/images/map/rightMenu/td_checked.png') no-repeat;
  250. background-size: 100% 100%;
  251. }
  252. }
  253. .td {
  254. flex: 1;
  255. color: #edfaff;
  256. font-size: 38px;
  257. cursor: pointer;
  258. }
  259. .td-text {
  260. /* 设置字体透明 */
  261. color: transparent;
  262. /* 使用 -webkit-background-clip 属性将背景剪裁至文本形状 */
  263. -webkit-background-clip: text;
  264. /* 非Webkit内核浏览器需要使用标准前缀 */
  265. background-clip: text;
  266. font-family: 'YouSheBiaoTiHei';
  267. /* 设置线性渐变,从红色渐变到蓝色 */
  268. background-image: linear-gradient(to bottom, #ffffff 50%, #3075d3 100%);
  269. font-size: 48px;
  270. }
  271. .text-green {
  272. background-image: linear-gradient(to bottom, #ffffff 50%, #40c75f 100%);
  273. }
  274. .text-danger {
  275. background-image: linear-gradient(to bottom, #ffffff 50%, #ff2f3c 100%);
  276. }
  277. }
  278. .gradient-text2 {
  279. color: transparent !important;
  280. }
  281. </style>