index.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828
  1. <template>
  2. <div class="base-container">
  3. <fnHeader :hideSwitch="true" :hideShadow="true" showDate></fnHeader>
  4. <div class="content">
  5. <div class="left">
  6. <div class="btn" @click="goBack">
  7. <img src="@/assets/images/common/back-icon.png" alt="" />
  8. 返回
  9. </div>
  10. <chart-box class="left-cont" :name="isAdd ? '新增农事' : '编辑农事'" color="yellow">
  11. <template #title-right>
  12. <steps v-if="isAdd" :active="active"></steps>
  13. </template>
  14. <div class="box">
  15. <div class="box-item" v-if="active === 0">
  16. <div class="box-title">
  17. <div>
  18. 选择农事类型
  19. <span>(可多选)</span>
  20. </div>
  21. </div>
  22. <div class="list">
  23. <div
  24. class="list-item"
  25. @click="handleItem(item, index)"
  26. :class="{ active: item.active }"
  27. v-for="(item, index) in checkData"
  28. :key="index"
  29. >
  30. {{ item.name }}
  31. <el-icon size="25" color="#FFD489" v-show="item.active"
  32. ><CircleCheckFilled
  33. /></el-icon>
  34. <div v-show="!item.active" class="round"></div>
  35. </div>
  36. </div>
  37. </div>
  38. <template v-else>
  39. <el-form class="box-form" ref="formRef" :model="dynamicValidateForm" :rules="rules">
  40. <div class="box-item">
  41. <div class="box-title">基本信息</div>
  42. <el-form-item label="农事名称" prop="name">
  43. <el-input v-model="dynamicValidateForm.name" />
  44. </el-form-item>
  45. <el-form-item label="触发条件" prop="conditionRate">
  46. <el-input v-model="dynamicValidateForm.conditionRate" />
  47. </el-form-item>
  48. <el-form-item label="执行时间" prop="executeDate">
  49. <el-date-picker
  50. class="item-input"
  51. style="width: 100%"
  52. value-format="YYYY-MM-DD"
  53. v-model="dynamicValidateForm.executeDate"
  54. type="date"
  55. :clearable="false"
  56. placeholder="选择日期"
  57. />
  58. </el-form-item>
  59. </div>
  60. <div class="usage-mode box-form">
  61. <el-form-item label="执行分区" prop="regionId">
  62. <div class="mode-select">
  63. <el-select
  64. v-model="dynamicValidateForm.regionId"
  65. placeholder="请选择"
  66. style="width: 100%"
  67. @change="changeRegion"
  68. >
  69. <el-option v-for="(area, index) in areaList" :key="index" :label="area.name" :value="area.id">
  70. </el-option>
  71. </el-select>
  72. </div>
  73. </el-form-item>
  74. <el-form-item label="服务亩数" prop="regionId">
  75. <div class="mode-select">
  76. {{ dynamicValidateForm.area }}亩
  77. </div>
  78. </el-form-item>
  79. </div>
  80. <div class="usage-mode box-form">
  81. <el-form-item label="施用方式" prop="usageMode">
  82. <div class="mode-select">
  83. <el-select
  84. v-model="dynamicValidateForm.usageMode"
  85. placeholder="请选择"
  86. prop="usageMode"
  87. style="width: 100%"
  88. >
  89. <el-option
  90. v-for="(usage, uId) in allUsageModeList"
  91. :key="uId"
  92. :label="usage"
  93. :value="usage"
  94. />
  95. </el-select>
  96. </div>
  97. </el-form-item>
  98. </div>
  99. </el-form>
  100. <div
  101. class="box-item"
  102. v-for="(item, index) in dynamicValidateForm.prescriptionList"
  103. :key="index"
  104. >
  105. <div class="box-title border-none">
  106. {{ item.name }}处方
  107. <div class="add-text" @click="handleAdd(index)">
  108. <el-icon class="icon"><Plus /></el-icon>
  109. 添加药物
  110. </div>
  111. </div>
  112. <div
  113. class="box-item-children"
  114. v-for="(ele, idx) in item.pesticideFertilizerList"
  115. :key="idx + 'id'"
  116. >
  117. <div class="index">{{ idx < 10 ? "0" + (idx + 1) : idx + 1 }}</div>
  118. <custom-table
  119. @updateTableData="updateTableData"
  120. :pIndex="index"
  121. :cIndex="idx"
  122. :key="index + '-' + idx"
  123. :pesticideFertilizerList="ele"
  124. :hasFly="dynamicValidateForm.usageMode === '叶面施'"
  125. ></custom-table>
  126. <div class="box-textarea">
  127. <el-input
  128. class="textarea"
  129. v-model="ele.remark"
  130. :rows="1"
  131. type="textarea"
  132. placeholder="用药注意事项备注"
  133. />
  134. </div>
  135. <div class="btn-group">
  136. <div class="delete" @click="handleDelete(index, idx)">删除</div>
  137. <div @click="resetItem(index, idx)">重置</div>
  138. </div>
  139. </div>
  140. </div>
  141. <div class="box-item">
  142. <el-input
  143. class="textarea"
  144. v-model="textarea"
  145. type="textarea"
  146. placeholder="用药注意事项备注"
  147. />
  148. </div>
  149. </template>
  150. </div>
  151. <div class="footer">
  152. <!-- <el-button class="btn" type="danger" plain @click="remove()">删除</el-button> -->
  153. <div class="button" @click="handleOk">{{ active === 0 ? "确定" : (isAdd ? "新增农事" : "下发农事") }}</div>
  154. </div>
  155. </chart-box>
  156. </div>
  157. <div class="right">
  158. <div class="map-header">
  159. <div class="title">
  160. <img src="@/assets/images/common/area-icon.png" alt="" />
  161. 执行农事区域
  162. </div>
  163. <div class="check-btn"><el-checkbox v-model="checkedArea" @change="handleArea" label="全选" size="large" /></div>
  164. </div>
  165. <div ref="mapRef" class="map">
  166. <div class="map-bg map-btn">查看巡园照片</div>
  167. <div class="map-bg map-legend">
  168. <div class="legend-item legend-title">
  169. <el-checkbox v-model="showMapLegend" @change="handleLegend" label="状态图例" size="large" />
  170. </div>
  171. <div class="item">
  172. <img src="@/assets/images/map/status/status-zc.png" alt="" />
  173. 正常
  174. </div>
  175. <div class="item">
  176. <img src="@/assets/images/map/status/status-szyc.png" alt="" />
  177. 生长异常
  178. </div>
  179. <div class="item">
  180. <img src="@/assets/images/map/status/status-bh.png" alt="" />
  181. 病害异常
  182. </div>
  183. <div class="item">
  184. <img src="@/assets/images/map/status/status-ch.png" alt="" />
  185. 虫害异常
  186. </div>
  187. </div>
  188. </div>
  189. </div>
  190. </div>
  191. </div>
  192. </template>
  193. <script setup>
  194. import { onMounted, ref, reactive } from "vue";
  195. import { ElMessage } from "element-plus";
  196. import fnHeader from "@/components/fnHeader.vue";
  197. import steps from "./components/steps.vue";
  198. import customTable from "./components/table.vue";
  199. import FarmMap from "./farmMap";
  200. import { deepClone } from "@/common/commonFun";
  201. import chartBox from "@/components/chartBox.vue";
  202. import { useRouter, useRoute } from "vue-router";
  203. import { useStore } from "vuex";
  204. import eventBus from "@/api/eventBus";
  205. let store = useStore();
  206. let farmMap = new FarmMap();
  207. const active = ref(0);
  208. const checkData = ref([
  209. { value: 1, name: "生长异常", active: true, children: [{ index: 1 }] },
  210. { value: 3, name: "病虫异常", active: false, children: [{ index: 1 }] },
  211. { value: 2, name: "营养农事", active: false, children: [{ index: 1 }] },
  212. ]);
  213. const handleItem = (item, index) => {
  214. checkData.value[index].active = !checkData.value[index].active;
  215. // const curIndex = checkValue.value.indexOf(item.value)
  216. // if(curIndex===-1){
  217. // checkValue.value.push(item.value)
  218. // }else{
  219. // checkValue.value.splice(curIndex,1)
  220. // checkList.value[index].active = false
  221. // }
  222. };
  223. const router = useRouter();
  224. const route = useRoute();
  225. const mapRef = ref();
  226. const farmId = sessionStorage.getItem("farmId");
  227. // 所选蓝色分区的面积
  228. const getArea = (val) => {
  229. dynamicValidateForm.area = val.toFixed(2);
  230. };
  231. // 是否为新增
  232. const isAdd = ref(true);
  233. const libId = route.query?.libId
  234. onMounted(() => {
  235. dynamicValidateForm.regionId = Number(sessionStorage.getItem("regionId"));
  236. farmMap.initMap("POINT(113.61448114737868 23.585550924763083)", mapRef.value);
  237. isAdd.value = route.query?.isAdd;
  238. if (!isAdd.value) {
  239. active.value = 1
  240. getList()
  241. }
  242. getAreaList();
  243. // farmMap.initData(farmId, dynamicValidateForm.regionId)
  244. });
  245. eventBus.off("editNsMap:areaVal", getArea)
  246. eventBus.on("editNsMap:areaVal", getArea)
  247. // 农场分区列表
  248. const areaList = ref([]);
  249. const orderIdVal = ref("");
  250. const workItemData = ref({});
  251. const getAreaList = (callback) => {
  252. VE_API.area.list({ farmId }).then(({ data, code }) => {
  253. areaList.value = data;
  254. // if (isAdd.value) {
  255. // regionId.value = data && data.length && data[0].id
  256. // } else {
  257. // regionId.value = workItemData.value.regionId
  258. // }
  259. if (isAdd.value) {
  260. changeRegion(dynamicValidateForm.regionId);
  261. }
  262. callback && callback();
  263. });
  264. };
  265. function getList() {
  266. VE_API.farm.fetchFarmWorkList({ farmId, libId }).then(({data}) => {
  267. workItemData.value = data[0]
  268. Object.assign(dynamicValidateForm, workItemData.value)
  269. dynamicValidateForm.name = workItemData.value.farmWorkName
  270. dynamicValidateForm.conditionRate = workItemData.value.condition
  271. console.log('workItemData.value', dynamicValidateForm);
  272. farmMap.initData(workItemData.value.farmId, workItemData.value.regionId)
  273. farmMap.getBlueRegion({gardenId: workItemData.value.farmId, regionId: workItemData.value.regionId}, (e) => {
  274. checkedArea.value = workItemData.value.executeBlueZones.length === e
  275. farmMap.setBlueRegion(workItemData.value.executeBlueZones)
  276. });
  277. })
  278. }
  279. const farmObj = ref();
  280. const serviceRegion = ref("");
  281. const getFarmObj = () => {
  282. VE_API.farm.fetchFarmDetail({ id: farmId }).then(({ data }) => {
  283. farmObj.value = data;
  284. if (serviceRegion.value === "") {
  285. serviceRegion.value = data.district + data.address + data.name;
  286. }
  287. });
  288. };
  289. // 切换分区
  290. const checkedArea = ref(false);
  291. const changeRegion = (e) => {
  292. dynamicValidateForm.area = 0;
  293. checkedArea.value = false;
  294. farmMap.initData(farmId, dynamicValidateForm.regionId)
  295. farmMap.getBlueRegion({ gardenId: farmId, regionId: e });
  296. };
  297. const handleArea = (e) => {
  298. farmMap.toggleAllArea(e)
  299. }
  300. // 地图图例
  301. const showMapLegend = ref(true);
  302. const handleLegend = (e) => {
  303. farmMap.toggleLegend(e);
  304. };
  305. const goBack = () => {
  306. router.go(-1);
  307. };
  308. //确定/下发农事
  309. const handleOk = () => {
  310. if (active.value) {
  311. formRef.value.validate((valid) => {
  312. if (valid) {
  313. console.log("123", dynamicValidateForm);
  314. submitForm();
  315. // const res = tableData.value.getItem
  316. // console.log('res', res);
  317. }
  318. });
  319. } else {
  320. active.value = 1;
  321. const arr = checkData.value.filter((item) => item.active);
  322. // boxList.value = deepClone(arr);
  323. dynamicValidateForm.prescriptionList = arr.map((item) => ({
  324. name: item.name,
  325. active: item.active,
  326. pesticideFertilizerList: [
  327. {
  328. key: 1,
  329. typeName: "",
  330. muUsage: "",
  331. muUsage2: "",
  332. ratio: "",
  333. ratio2: "",
  334. remark: "",
  335. },
  336. ],
  337. }));
  338. }
  339. };
  340. async function submitForm() {
  341. const executeBlueZones = farmMap.getSelectedBlueRegion();
  342. if (!executeBlueZones || !executeBlueZones.length) {
  343. ElMessage({
  344. message: "请选择执行区域",
  345. type: "warning",
  346. });
  347. return false;
  348. }
  349. let data = {
  350. ...dynamicValidateForm,
  351. executeBlueZones,
  352. remark: textarea.value,
  353. farmId,
  354. };
  355. console.log('dddd', data);
  356. let res = null;
  357. if (isAdd.value) {
  358. data.farmWorkType = 1;
  359. // data.name = name.value;
  360. // data.condition = condition.value;
  361. // 新增农事
  362. res = await VE_API.farm.saveFarmWork(data);
  363. } else {
  364. data = {...data, orderStatus: 1,}
  365. res = await VE_API.farm.confirm(data);
  366. }
  367. if (res?.code == 0) {
  368. ElMessage({
  369. message: "保存成功",
  370. type: "success",
  371. });
  372. router.go(-1);
  373. }
  374. }
  375. // 表单
  376. const formRef = ref();
  377. const allUsageModeList = ["叶面施", "根部施"];
  378. let dynamicValidateForm = reactive({
  379. name: "",
  380. conditionRate: "",
  381. executeDate: "",
  382. usageMode: "",
  383. regionId: "",
  384. prescriptionList: [
  385. {
  386. name: "",
  387. pesticideFertilizerList: [
  388. {
  389. key: 1,
  390. typeName: "",
  391. muUsage: "",
  392. muUsage2: "",
  393. ratio: "",
  394. ratio2: "",
  395. remark: "",
  396. },
  397. ],
  398. },
  399. ],
  400. });
  401. const rules = {
  402. name: [
  403. {
  404. required: true,
  405. message: "请输入农事名称",
  406. trigger: "blur",
  407. },
  408. ],
  409. conditionRate: [
  410. {
  411. required: true,
  412. message: "请输入触发条件",
  413. trigger: "blur",
  414. },
  415. ],
  416. executeDate: [
  417. {
  418. required: true,
  419. message: "请选择执行时间",
  420. trigger: "blur",
  421. },
  422. ],
  423. usageMode: [
  424. {
  425. required: true,
  426. message: "请选择施用方式",
  427. trigger: "change",
  428. },
  429. ],
  430. regionId: [
  431. {
  432. required: true,
  433. message: "请选择执行区域",
  434. trigger: "change",
  435. },
  436. ],
  437. };
  438. const textarea = ref("");
  439. // 添加
  440. const handleAdd = (index) => {
  441. dynamicValidateForm.prescriptionList[index].pesticideFertilizerList.push({
  442. index: 1,
  443. name: "",
  444. pesticideFertilizerList: [
  445. {
  446. key: 1,
  447. typeName: "",
  448. muUsage: "",
  449. muUsage2: "",
  450. ratio: "",
  451. ratio2: "",
  452. remark: "",
  453. },
  454. ],
  455. });
  456. };
  457. // 删除
  458. const handleDelete = (index, childIndex) => {
  459. // if (boxList.value[index].children.length === 1) return ElMessage.warning("最少保留一个处方");
  460. dynamicValidateForm.prescriptionList[index].pesticideFertilizerList.splice(childIndex, 1);
  461. };
  462. // 重置
  463. function resetItem(index, childIndex) {
  464. dynamicValidateForm.prescriptionList[index].pesticideFertilizerList[childIndex] = {
  465. key: 1,
  466. pesticideFertilizerId: "",
  467. typeName: "",
  468. muUsage: "",
  469. muUsage2: "",
  470. ratio: "",
  471. ratio2: "",
  472. remark: "",
  473. };
  474. }
  475. function updateTableData(pIndex, cIndex, tableData) {
  476. dynamicValidateForm.prescriptionList[pIndex].pesticideFertilizerList[cIndex] = {
  477. ...tableData,
  478. };
  479. }
  480. </script>
  481. <style lang="scss" scoped>
  482. .base-container {
  483. width: 100%;
  484. height: 100vh;
  485. color: #fff;
  486. position: relative;
  487. box-sizing: border-box;
  488. z-index: 1;
  489. background: #000;
  490. .content {
  491. width: 100%;
  492. height: calc(100% - 74px);
  493. display: flex;
  494. justify-content: space-between;
  495. box-sizing: border-box;
  496. padding: 20px;
  497. .left {
  498. width: 473px;
  499. height: 100%;
  500. box-sizing: border-box;
  501. .btn {
  502. display: flex;
  503. align-items: center;
  504. justify-content: center;
  505. border: 1px solid rgba(255, 255, 255, 0.78);
  506. border-radius: 4px;
  507. padding: 9px;
  508. margin-bottom: 13px;
  509. width: 104px;
  510. cursor: pointer;
  511. img {
  512. width: 14px;
  513. margin-right: 5px;
  514. }
  515. }
  516. .left-cont {
  517. width: 100%;
  518. height: calc(100% - 48px - 4px);
  519. .box {
  520. width: 100%;
  521. height: calc(100% - 58px);
  522. padding: 16px 12px;
  523. box-sizing: border-box;
  524. overflow-y: auto;
  525. .box-item {
  526. background: rgba(255, 255, 255, 0.04);
  527. border: 1px solid #444444;
  528. border-radius: 8px;
  529. padding: 16px 12px 8px 12px;
  530. box-sizing: border-box;
  531. width: 100%;
  532. .box-title {
  533. font-size: 20px;
  534. border-bottom: 1px solid #333333;
  535. padding: 0 0 12px 13px;
  536. margin-bottom: 21px;
  537. position: relative;
  538. display: flex;
  539. justify-content: space-between;
  540. &.border-none {
  541. border: none;
  542. padding-bottom: 0;
  543. }
  544. &::before {
  545. content: "";
  546. position: absolute;
  547. left: 0;
  548. top: 6px;
  549. width: 3px;
  550. height: 16px;
  551. background: #fff;
  552. border-radius: 11px;
  553. }
  554. span {
  555. font-size: 14px;
  556. color: #9f9f9f;
  557. }
  558. .add-text {
  559. font-size: 16px;
  560. color: #ffd489;
  561. display: flex;
  562. align-items: center;
  563. cursor: pointer;
  564. .icon {
  565. margin-right: 3px;
  566. }
  567. }
  568. }
  569. .list {
  570. .list-item {
  571. background: rgba(255, 255, 255, 0.05);
  572. border-radius: 8px;
  573. font-size: 18px;
  574. padding: 16px;
  575. display: flex;
  576. align-items: center;
  577. justify-content: space-between;
  578. border: 1px solid transparent;
  579. cursor: pointer;
  580. &.active {
  581. border-color: #ffd489;
  582. background: rgba(255, 212, 137, 0.05);
  583. }
  584. .round {
  585. border: 1px solid #cecece;
  586. border-radius: 50%;
  587. width: 20px;
  588. height: 20px;
  589. }
  590. }
  591. .list-item + .list-item {
  592. margin-top: 16px;
  593. }
  594. }
  595. .box-item-children {
  596. border: 1px solid #444444;
  597. border-radius: 8px;
  598. padding: 9px;
  599. box-sizing: border-box;
  600. position: relative;
  601. .index {
  602. position: absolute;
  603. top: 0;
  604. left: 0;
  605. background: #ffd489;
  606. border-radius: 4px 0 4px 0;
  607. font-size: 12px;
  608. color: #1d1d1d;
  609. padding: 0 7px;
  610. }
  611. .box-textarea {
  612. border-radius: 4px;
  613. padding: 10px;
  614. background: rgba(255, 255, 255, 0.05);
  615. margin: 16px 0 20px 0;
  616. }
  617. .btn-group {
  618. display: flex;
  619. div {
  620. background: rgba(255, 212, 137, 0.05);
  621. border-radius: 4px;
  622. border: 1px solid #ffd489;
  623. padding: 6px;
  624. flex: 1;
  625. color: #ffd489;
  626. text-align: center;
  627. cursor: pointer;
  628. }
  629. .delete {
  630. background: rgba(249, 152, 81, 0.05);
  631. border: 1px solid #f99851;
  632. color: #f99851;
  633. margin-right: 12px;
  634. }
  635. }
  636. }
  637. .box-item-children + .box-item-children {
  638. margin-top: 12px;
  639. }
  640. .textarea {
  641. ::v-deep {
  642. .el-textarea__inner {
  643. background: transparent;
  644. box-shadow: none;
  645. color: #fff;
  646. padding: 0;
  647. }
  648. }
  649. }
  650. }
  651. .box-item + .box-item {
  652. margin-top: 16px;
  653. }
  654. }
  655. // 编辑处方
  656. .box-form {
  657. ::v-deep {
  658. .el-form-item {
  659. width: 100%;
  660. }
  661. .el-form-item__label {
  662. font-size: 16px;
  663. color: #9f9f9f;
  664. }
  665. .el-input__wrapper {
  666. background: transparent;
  667. box-shadow: 0 0 0 1px #9f9f9f;
  668. .el-input__inner {
  669. color: #fff;
  670. }
  671. }
  672. }
  673. }
  674. .usage-mode {
  675. // display: flex;
  676. // align-items: center;
  677. color: #9f9f9f;
  678. padding: 16px 21px 0px 12px;
  679. border: 1px solid #363636;
  680. background: rgba(255, 255, 255, 0.04);
  681. border-radius: 8px;
  682. font-size: 16px;
  683. margin: 16px 0;
  684. width: 100%;
  685. box-sizing: border-box;
  686. .usage-title {
  687. padding-right: 20px;
  688. }
  689. .mode-select {
  690. flex: 1;
  691. }
  692. ::v-deep {
  693. .el-select__wrapper {
  694. background: transparent;
  695. box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  696. }
  697. .el-select__placeholder,
  698. .el-select__caret {
  699. // color: #ffd489;
  700. color: #fff;
  701. }
  702. }
  703. }
  704. .footer {
  705. width: 100%;
  706. height: 58px;
  707. border-top: 0.5px solid #555555;
  708. background: rgba(255, 255, 255, 0.04);
  709. display: flex;
  710. justify-content: flex-end;
  711. align-items: center;
  712. .button {
  713. font-size: 16px;
  714. padding: 8px 58px;
  715. background: #ffd489;
  716. border-radius: 4px;
  717. color: #000;
  718. margin-right: 12px;
  719. cursor: pointer;
  720. }
  721. }
  722. }
  723. }
  724. .right {
  725. width: calc(100% - 473px - 18px);
  726. margin-left: 18px;
  727. height: 100%;
  728. background: #191919;
  729. border: 0.6px solid #444444;
  730. padding: 20px;
  731. box-sizing: border-box;
  732. border-radius: 8px;
  733. .map-header {
  734. display: flex;
  735. justify-content: space-between;
  736. .title {
  737. font-size: 22px;
  738. display: flex;
  739. align-items: flex-end;
  740. font-family: "PangMenZhengDao";
  741. margin-bottom: 16px;
  742. img {
  743. margin-right: 8px;
  744. }
  745. }
  746. .check-btn {
  747. ::v-deep {
  748. .el-checkbox {
  749. color: #fff;
  750. font-size: 20px;
  751. }
  752. }
  753. }
  754. }
  755. .map {
  756. width: 100%;
  757. clip-path: inset(0px round 4px);
  758. height: calc(100% - 31px - 16px);
  759. position: relative;
  760. .map-bg {
  761. position: absolute;
  762. z-index: 2;
  763. background: rgba(0, 0, 0, 0.6);
  764. border-radius: 18px;
  765. padding: 7px 16px;
  766. right: 20px;
  767. }
  768. .map-btn {
  769. top: 19px;
  770. cursor: pointer;
  771. }
  772. .map-legend {
  773. bottom: 21px;
  774. .item {
  775. display: flex;
  776. align-items: center;
  777. font-size: 14px;
  778. img {
  779. width: 16px;
  780. margin-right: 6px;
  781. }
  782. }
  783. .legend-title {
  784. border-bottom: 1px solid rgba(102, 102, 102, 0.35);
  785. }
  786. .item + .item {
  787. padding-top: 10px
  788. }
  789. }
  790. }
  791. }
  792. }
  793. }
  794. </style>