index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937
  1. <template>
  2. <div class="base-container">
  3. <fnHeader></fnHeader>
  4. <div class="top-bg"></div>
  5. <div class="top">
  6. <!-- <div class="back btn" @click="goBack">
  7. <img class="icon" src="@/assets/images/common/back-icon.png" alt="" />
  8. <span>返回</span>
  9. </div> -->
  10. <el-select
  11. v-model="locationVal"
  12. filterable
  13. remote
  14. effect="dark"
  15. reserve-keyword
  16. placeholder="搜索地区"
  17. :remote-method="remoteMethod"
  18. :loading="loading"
  19. @change="handleSearchRes"
  20. class="v-select"
  21. >
  22. <template #prefix>
  23. <el-icon class="el-input__icon"><search /></el-icon>
  24. </template>
  25. <el-option
  26. v-for="(item, index) in locationOptions.list"
  27. :key="index"
  28. :label="item.title"
  29. :value="item.point"
  30. >
  31. <span>{{ item.title }}</span>
  32. <span class="sub-title"
  33. >{{ item.province }}{{ item.city }}{{ item.district }}</span
  34. >
  35. </el-option>
  36. </el-select>
  37. <div class="search">
  38. <div class="add btn" @click="handleAdd">
  39. <el-icon><Plus /></el-icon>
  40. <span>创建</span>
  41. </div>
  42. <div class="upload btn" @click="handleExport">
  43. <img class="icon" src="@/assets/images/common/back-icon.png" alt="" />
  44. <span>导出</span>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="content">
  49. <el-form
  50. :inline="true"
  51. :model="formInlineSearch"
  52. class="search-form"
  53. ref="formInlineRef"
  54. >
  55. <el-form-item label="农场地址">
  56. <el-input
  57. v-model="formInlineSearch.address"
  58. placeholder="请输入农场地址"
  59. clearable
  60. />
  61. </el-form-item>
  62. <el-form-item label="农场名称">
  63. <el-input
  64. v-model="formInlineSearch.farmName"
  65. placeholder="请输入农场名称"
  66. clearable
  67. />
  68. </el-form-item>
  69. <el-form-item label="作物物种">
  70. <el-input
  71. v-model="formInlineSearch.speciesTypeName"
  72. placeholder="请输入作物物种"
  73. clearable
  74. />
  75. </el-form-item>
  76. <el-form-item label="客户姓名">
  77. <el-input
  78. v-model="formInlineSearch.masterName"
  79. placeholder="请输入客户姓名"
  80. clearable
  81. />
  82. </el-form-item>
  83. <el-form-item label="联系电话">
  84. <el-input
  85. v-model="formInlineSearch.masterTel"
  86. placeholder="请输入联系电话"
  87. clearable
  88. />
  89. </el-form-item>
  90. <div class="button">
  91. <el-button class="btn" type="primary" @click="onSearch"
  92. >查询</el-button
  93. >
  94. <el-button class="btn reset" @click="onRest">重置</el-button>
  95. </div>
  96. </el-form>
  97. <div class="box">
  98. <div class="map-box" :class="{ 'cursor-pointer': mouseStyle }">
  99. <div ref="mapRef" class="map"></div>
  100. </div>
  101. <div class="tool-group">
  102. <!-- <div class="btn" @click="handleCancel" v-show="isEdit&&mapData.point">
  103. <img
  104. class="icon"
  105. src="@/assets/images/common/back-black-icon.png"
  106. alt=""
  107. />
  108. <span>撤销</span>
  109. </div> -->
  110. <!-- <div class="btn" @click="handleDeletePoint">
  111. <el-icon size="15"><CloseBold /></el-icon>
  112. <span>删除点</span>
  113. </div> -->
  114. <div
  115. class="btn delete"
  116. @click="handleDelete"
  117. v-show="mapData.selectPointArr.length > 0"
  118. >
  119. <el-icon size="15" color="#fff"><CloseBold /></el-icon>
  120. <span>删除地块</span>
  121. </div>
  122. </div>
  123. <div class="edit-popup" v-show="isEdit">
  124. <div class="edit-title">
  125. <div class="name">
  126. <img src="@/assets/images/common/chart-icon.png" alt="" />
  127. <span>地块属性</span>
  128. </div>
  129. <div class="btn-group">
  130. <div v-show="disabledForm" class="edit" @click="handleEdit">
  131. 编辑
  132. </div>
  133. <div
  134. v-show="mapData.selectPointArr.length > 0"
  135. class="edit ml"
  136. :class="{'disabled-button':!disabledForm}"
  137. @click="handlePrint"
  138. >
  139. 打印
  140. </div>
  141. </div>
  142. </div>
  143. <div class="edit-cont">
  144. <el-form
  145. :inline="true"
  146. ref="ruleFormRef"
  147. :disabled="disabledForm"
  148. :model="formInline"
  149. :rules="rules"
  150. label-position="top"
  151. class="form-inline"
  152. >
  153. <el-form-item label="农场地址" prop="address">
  154. <el-input
  155. v-model="formInline.address"
  156. placeholder="请输入农场地址"
  157. clearable
  158. />
  159. </el-form-item>
  160. <el-form-item label="农场名称" prop="farmName">
  161. <el-input
  162. v-model="formInline.farmName"
  163. placeholder="请输入农场名称"
  164. clearable
  165. />
  166. </el-form-item>
  167. <el-form-item label="创建时间">
  168. <el-input v-model="formInline.createDate" clearable disabled />
  169. </el-form-item>
  170. <el-form-item label="农场面积">
  171. <el-input v-model="formInline.mu" disabled clearable />
  172. </el-form-item>
  173. <el-form-item label="作物物种" prop="speciesTypeName">
  174. <el-input
  175. v-model="formInline.speciesTypeName"
  176. placeholder="请输入作物物种"
  177. clearable
  178. />
  179. </el-form-item>
  180. <el-form-item label="客户姓名" prop="masterName">
  181. <el-input
  182. v-model="formInline.masterName"
  183. placeholder="请输入姓名"
  184. clearable
  185. />
  186. </el-form-item>
  187. <el-form-item label="联系电话" prop="masterTel">
  188. <el-input
  189. v-model="formInline.masterTel"
  190. placeholder="请输入联系电话"
  191. clearable
  192. />
  193. </el-form-item>
  194. </el-form>
  195. <div class="list-box" v-show="pointList.length > 0">
  196. <span>边界点经纬度</span>
  197. <div class="list-cont">
  198. <div
  199. class="list-item"
  200. v-for="(item, index) in pointList"
  201. :key="index"
  202. >
  203. <span>A{{ index + 1 }}</span>
  204. <div class="item-box">北纬{{ item[1] }}</div>
  205. <div class="item-box">东经{{ item[0] }}</div>
  206. </div>
  207. </div>
  208. </div>
  209. </div>
  210. <div class="edit-footer">
  211. <div @click="onCancel" class="btn cancel">取消</div>
  212. <div @click="onSubmit" class="btn save">保存</div>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. </div>
  218. <!-- 导出弹窗 -->
  219. <el-dialog
  220. v-model="dialogVisible"
  221. width="82%"
  222. center
  223. :show-close="false"
  224. modal-class="dialog-dark"
  225. >
  226. <div>
  227. <el-table :data="gridData" border max-height="600" class="table-dark">
  228. <el-table-column
  229. property="farmName"
  230. label="农场名称"
  231. show-overflow-tooltip
  232. />
  233. <el-table-column
  234. property="address"
  235. label="农场地址"
  236. width="230"
  237. show-overflow-tooltip
  238. />
  239. <el-table-column property="createDate" label="创建时间" width="170" />
  240. <el-table-column property="mu" label="农场面积">
  241. <template #default="scope">
  242. <span>{{ scope.row.mu }}亩</span>
  243. </template>
  244. </el-table-column>
  245. <el-table-column property="speciesTypeName" label="作物物种" />
  246. <el-table-column property="masterName" label="客户姓名" />
  247. <el-table-column property="masterTel" label="联系电话" />
  248. <el-table-column
  249. property="points"
  250. label="边界点经纬度"
  251. width="480"
  252. show-overflow-tooltip
  253. />
  254. </el-table>
  255. </div>
  256. <template #footer>
  257. <div class="dialog-footer">
  258. <el-button class="btn" @click="dialogVisible = false">取消</el-button>
  259. <el-button class="btn" type="primary" @click="handleDowload">
  260. 下载
  261. </el-button>
  262. </div>
  263. </template>
  264. </el-dialog>
  265. <Pdf
  266. :title="formInline.id + ''"
  267. :showDialog="pdfShow"
  268. @closeDialog="pdfShow = false"
  269. v-if="formInline.id && pdfShow"
  270. :rowId="formInline.id"
  271. ></Pdf>
  272. </template>
  273. <script setup>
  274. import { onMounted, ref, reactive, watchEffect, watch } from "vue";
  275. import fnHeader from "@/components/fnHeader.vue";
  276. import AuthenticMap from "./authenticMap";
  277. import { mapData } from "./authenticMap";
  278. import { useRouter } from "vue-router";
  279. import { ElMessage, ElMessageBox } from "element-plus";
  280. import { dateFormat } from "@/utils/date_util";
  281. import { exportExcel, parseMultiPolygon } from "@/utils/index";
  282. import Pdf from "./Pdf";
  283. const pdfShow = ref(false);
  284. const mouseStyle = ref(1);
  285. const router = useRouter();
  286. let authenticMap = new AuthenticMap();
  287. const mapRef = ref();
  288. const userInfo = JSON.parse(sessionStorage.getItem("userinfo"));
  289. const location = ref(userInfo.location);
  290. onMounted(() => {
  291. authenticMap.initMap(location.value, mapRef.value);
  292. getList();
  293. });
  294. // 获取地块列表
  295. const plotList = ref([]);
  296. const getList = (callback) => {
  297. authenticMap.clearLayer();
  298. return VE_API.authentic.getList(formInlineSearch).then(({ code, data }) => {
  299. plotList.value = data || [];
  300. const geom = [];
  301. data.forEach((item) => {
  302. geom.push({ featureWkt: item.geom, ...item });
  303. });
  304. authenticMap.setAreaGeometry(geom);
  305. authenticMap.addPoint(data);
  306. callback && callback(geom);
  307. });
  308. };
  309. // 搜索
  310. const locationVal = ref("");
  311. const loading = ref(false);
  312. const MAP_KEY = "CZLBZ-LJICQ-R4A5J-BN62X-YXCRJ-GNBUT";
  313. const handleSearchRes = (v) => {
  314. authenticMap.setMapCenter(v);
  315. onRest();
  316. };
  317. const locationOptions = reactive({
  318. list: [],
  319. });
  320. const remoteMethod = async (keyword) => {
  321. if (keyword) {
  322. locationOptions.list = [];
  323. loading.value = true;
  324. const params = {
  325. key: MAP_KEY,
  326. keyword,
  327. // location: location.value,
  328. location: "22.574540836684672,113.1093017627431",
  329. };
  330. await VE_API.old_mini_map
  331. .getCtiyList({ word: keyword })
  332. .then(({ data }) => {
  333. if (data && data.length) {
  334. data.forEach((item) => {
  335. item.point = item.location.lat + "," + item.location.lng;
  336. locationOptions.list.push(item);
  337. });
  338. }
  339. });
  340. VE_API.old_mini_map.search(params).then(({ data }) => {
  341. loading.value = false;
  342. data.forEach((item) => {
  343. item.point = item.location.lat + "," + item.location.lng;
  344. locationOptions.list.push(item);
  345. });
  346. });
  347. } else {
  348. locationOptions.list = [];
  349. }
  350. };
  351. const validatePhoneNumber = (rule, value, callback) => {
  352. const phoneRegex = /^[1][3-9]\d{9}$/;
  353. if (!value) {
  354. callback(new Error("请输入联系电话"));
  355. } else if (!phoneRegex.test(value)) {
  356. callback(new Error("手机号码格式不正确"));
  357. } else {
  358. callback();
  359. }
  360. };
  361. const rules = {
  362. address: [{ required: true, message: "请输入农场地址", trigger: "change" }],
  363. farmName: [{ required: true, message: "请输入农场名称", trigger: "change" }],
  364. speciesTypeName: [
  365. { required: true, message: "请输入作物物种", trigger: "change" },
  366. ],
  367. masterName: [{ required: true, message: "请输入姓名", trigger: "change" }],
  368. masterTel: [
  369. { required: true, validator: validatePhoneNumber, trigger: "change" },
  370. ],
  371. };
  372. const ruleFormRef = ref(null);
  373. const initForm = {
  374. id: "",
  375. address: "",
  376. farmName: "",
  377. createDate: "",
  378. mu: "",
  379. speciesTypeName: "",
  380. masterName: "",
  381. masterTel: "",
  382. geom: "",
  383. };
  384. const formInline = reactive({
  385. ...initForm,
  386. });
  387. const disabledForm = ref(false);
  388. // 筛选
  389. const formInlineRef = ref(null);
  390. const formInlineSearch = reactive({
  391. ...initForm,
  392. });
  393. const onSearch = () => {
  394. authenticMap.search(formInlineSearch);
  395. };
  396. const onRest = () => {
  397. Object.assign(formInlineSearch, initForm);
  398. isUpdata.value = false;
  399. onCancel();
  400. };
  401. const isEdit = ref(false);
  402. // 编辑
  403. const handleEdit = () => {
  404. disabledForm.value = false;
  405. mapData.disabledForm = false
  406. authenticMap.startModify();
  407. };
  408. // 取消
  409. const isUpdata = ref(true);
  410. const onCancel = () => {
  411. isEdit.value = false;
  412. if (isUpdata.value) {
  413. authenticMap.cancelDraw();
  414. } else {
  415. getList((geoms) => {
  416. authenticMap.allUnSelect();
  417. });
  418. }
  419. authenticMap.setPoint("point");
  420. authenticMap.clearMapData("isEdit", false, formInline.id);
  421. authenticMap.endDraw();
  422. };
  423. // 保存
  424. const onSubmit = () => {
  425. if (!ruleFormRef.value) return;
  426. ruleFormRef.value.validate((valid, fields) => {
  427. if (valid) {
  428. formInline.mu = formInline.mu.split('亩')[0]
  429. VE_API.authentic.saveData(formInline).then((res) => {
  430. isUpdata.value = false;
  431. disabledForm.value = true;
  432. mapData.disabledForm = true;
  433. const point = mapData.curPointData;
  434. authenticMap.endDraw();
  435. getList().then(() => {
  436. isRefresh.value = false;
  437. isEdit.value = false;
  438. authenticMap.allUnSelect()
  439. authenticMap.clearMapData()
  440. // authenticMap.getSelectPointArr(
  441. // point.id || plotList.value[plotList.value.length - 1].id
  442. // );
  443. });
  444. });
  445. }
  446. });
  447. };
  448. // 打印
  449. const handlePrint = () => {
  450. pdfShow.value = true;
  451. };
  452. // 返回
  453. const goBack = () => {
  454. router.go(-1);
  455. };
  456. function updateFormInline(newData, name) {
  457. Object.assign(formInline, newData);
  458. }
  459. // 删除地块
  460. const handleDelete = () => {
  461. if (!mapData.curPointData.id) return ElMessage("请选择地块");
  462. const id = mapData.selectPointArr.map((item) => item.values_.id);
  463. ElMessageBox.confirm("您确定删除该地块吗?", "提示", {
  464. confirmButtonText: "确认",
  465. cancelButtonText: "取消",
  466. type: "warning",
  467. })
  468. .then(() => {
  469. VE_API.authentic.deleteData(id).then((res) => {
  470. isUpdata.value = false;
  471. onCancel();
  472. });
  473. })
  474. .catch(() => {});
  475. };
  476. // 创建
  477. const isRefresh = ref(true);
  478. const handleAdd = () => {
  479. isRefresh.value = false;
  480. isEdit.value = false;
  481. if (isUpdata.value) {
  482. authenticMap.cancelDraw();
  483. authenticMap.allUnSelect();
  484. } else {
  485. getList();
  486. isUpdata.value = true;
  487. }
  488. updateFormInline({ ...initForm });
  489. ruleFormRef.value.resetFields();
  490. pointList.value = [];
  491. authenticMap.clearMapData("curPointData", {});
  492. authenticMap.clearMapData("isEdit", false);
  493. authenticMap.setPoint("point");
  494. authenticMap.startDraw();
  495. };
  496. // 删除点
  497. const handleDeletePoint = () => {
  498. authenticMap.removePoint();
  499. };
  500. // 撤销
  501. const handleCancel = () => {
  502. authenticMap.undoLastDraw();
  503. // authenticMap.cancelDraw()
  504. };
  505. // 导出
  506. const gridData = ref([]);
  507. const dialogVisible = ref(false);
  508. const handleExport = () => {
  509. if (mapData.selectPointArr.length < 1) return ElMessage("请选择地块");
  510. const ids = mapData.selectPointArr.map((item) => item.values_.id);
  511. VE_API.authentic.exportData(ids).then(({ data }) => {
  512. gridData.value = data.map((item) => {
  513. return {
  514. ...item,
  515. createDate: dateFormat(
  516. new Date(item.createDate),
  517. "YYYY-mm-dd HH:MM:SS"
  518. ),
  519. };
  520. });
  521. dialogVisible.value = true;
  522. });
  523. };
  524. // 下载
  525. const handleDowload = () => {
  526. const fieldLabels = [
  527. "农场名称",
  528. "农场地址",
  529. "创建时间",
  530. "农场面积",
  531. "作物物种",
  532. "客户姓名",
  533. "联系电话",
  534. "边界点经纬度",
  535. ];
  536. const fieldKeys = [
  537. "farmName",
  538. "address",
  539. "createDate",
  540. "mu",
  541. "speciesTypeName",
  542. "masterName",
  543. "masterTel",
  544. "points",
  545. ];
  546. const fileName = "农场数据" + dateFormat(new Date(), "YYYY-mm");
  547. exportExcel(gridData.value, fieldLabels, fieldKeys, fileName);
  548. };
  549. const pointList = ref([]);
  550. // 获取编辑回显数据
  551. const getDetailsData = (id) => {
  552. VE_API.authentic.getDetails({ id }).then(({ data }) => {
  553. isEdit.value = true;
  554. disabledForm.value = true;
  555. mapData.disabledForm = true
  556. data.createDate = dateFormat(
  557. new Date(data.createDate),
  558. "YYYY-mm-dd HH:MM:SS"
  559. );
  560. updateFormInline({ ...data });
  561. formInline.mu = data.mu||0 + "亩";
  562. // 经纬度列表
  563. let arr = JSON.parse(data.points);
  564. // 删除最后数组最后一项闭合数据
  565. arr.pop();
  566. pointList.value = arr;
  567. });
  568. };
  569. // 添加经纬度列表
  570. const updatePointList = () => {
  571. const { geometryArr, area } = authenticMap.getAreaGeometry();
  572. const lastItem = geometryArr[geometryArr.length - 1];
  573. formInline.geom = lastItem.featureWkt;
  574. formInline.mu = area + "亩";
  575. let result = parseMultiPolygon(lastItem.featureWkt);
  576. result.pop();
  577. pointList.value = result;
  578. };
  579. watchEffect(() => {
  580. if (mapData.isEditArea) {
  581. isUpdata.value = false;
  582. updatePointList();
  583. }
  584. });
  585. watch(
  586. () => mapData.isEdit,
  587. (newVale, oldValue) => {
  588. if (newVale && mapData.selectPointArr.length < 2 && !isRefresh.value) {
  589. isEdit.value = true;
  590. disabledForm.value = false;
  591. mapData.disabledForm = false
  592. isUpdata.value = true;
  593. // isRefresh.value = false;
  594. formInline.createDate = dateFormat(new Date(), "YYYY-mm-dd HH:MM:SS");
  595. updatePointList();
  596. authenticMap.startModify();
  597. }
  598. }
  599. );
  600. watch(
  601. () => mapData.selectPointArr,
  602. (newVale, oldValue) => {
  603. if (mapData.selectPointArr.length === 1) {
  604. const obj = mapData.selectPointArr[0];
  605. const id = obj.values_.id
  606. getDetailsData(id);
  607. mapData.curPointData = obj.values_
  608. } else {
  609. if (isRefresh.value) {
  610. isEdit.value = false;
  611. authenticMap.endDraw();
  612. isRefresh.value = true;
  613. }
  614. if(mapData.selectPointArr.length === 0 || mapData.selectPointArr.length > 1){
  615. isEdit.value = false;
  616. }
  617. }
  618. }
  619. );
  620. </script>
  621. <style lang="scss" scoped>
  622. .base-container {
  623. width: 100%;
  624. height: 100vh;
  625. color: #fff;
  626. box-sizing: border-box;
  627. z-index: 1;
  628. position: relative;
  629. .top-bg {
  630. position: absolute;
  631. top: 0;
  632. width: 100%;
  633. height: 74px;
  634. background: #101010;
  635. z-index: -1;
  636. }
  637. .btn {
  638. display: flex;
  639. align-items: center;
  640. padding: 6px 16px;
  641. border-radius: 4px;
  642. cursor: pointer;
  643. .icon {
  644. width: 13px;
  645. height: 13px;
  646. }
  647. span {
  648. margin-left: 10px;
  649. }
  650. }
  651. .disabled-button{
  652. pointer-events: none;
  653. opacity: 0.5;
  654. cursor: not-allowed;
  655. }
  656. .top {
  657. display: flex;
  658. justify-content: space-between;
  659. // justify-content: flex-end;
  660. width: 100%;
  661. height: 40px;
  662. background: #101010;
  663. padding: 17px 20px 0 20px;
  664. box-sizing: border-box;
  665. display: flex;
  666. align-items: center;
  667. .back {
  668. border: 1px solid rgba(255, 255, 255, 0.4);
  669. }
  670. .v-select {
  671. width: 300px;
  672. ::v-deep {
  673. .el-select__wrapper {
  674. background: #101010;
  675. box-shadow: none;
  676. border: 1px solid rgba(255, 255, 255, 0.7);
  677. .el-select__input {
  678. color: #fff;
  679. }
  680. }
  681. }
  682. }
  683. .search {
  684. display: flex;
  685. align-items: center;
  686. justify-content: flex-end;
  687. width: 60%;
  688. .input-with-select {
  689. margin-left: 25px;
  690. }
  691. .upload {
  692. background: #2199f8;
  693. margin-left: 25px;
  694. }
  695. .add {
  696. background: #fff;
  697. color: #000;
  698. margin-left: 25px;
  699. }
  700. }
  701. }
  702. .content {
  703. width: 100%;
  704. height: calc(100% - 74px - 40px);
  705. box-sizing: border-box;
  706. background: #101010;
  707. padding: 13px 20px 20px 20px;
  708. .search-form {
  709. height: 40px;
  710. margin: 5px 0;
  711. display: flex;
  712. // justify-content: flex-end;
  713. justify-content: space-between;
  714. ::v-deep {
  715. .el-form-item__label {
  716. color: #fff;
  717. }
  718. .el-form-item__content {
  719. width: 190px;
  720. }
  721. .el-input__wrapper {
  722. background: #101010;
  723. box-shadow: none;
  724. border: 1px solid rgba(255, 255, 255, 0.7);
  725. .el-input__inner {
  726. color: #fff;
  727. }
  728. }
  729. }
  730. .button {
  731. display: flex;
  732. .btn {
  733. width: 84px;
  734. &.reset {
  735. margin-left: 25px;
  736. }
  737. }
  738. }
  739. }
  740. .box {
  741. border: 1px solid rgba(255, 255, 255, 0.4);
  742. border-radius: 8px;
  743. padding: 20px;
  744. box-sizing: border-box;
  745. background: #232323;
  746. width: 100%;
  747. height: calc(100% - 50px);
  748. position: relative;
  749. .map-box {
  750. width: 100%;
  751. height: 100%;
  752. border-radius: 4px;
  753. border: 1px solid rgba(255, 255, 255, 0.4);
  754. .map {
  755. width: 100%;
  756. height: 100%;
  757. }
  758. }
  759. .tool-group {
  760. position: absolute;
  761. display: flex;
  762. right: calc(500px + 36px);
  763. top: 42px;
  764. .btn {
  765. background: #fff;
  766. color: #000;
  767. margin-right: 10px;
  768. }
  769. .delete {
  770. background: #e45c5c;
  771. color: #fff;
  772. }
  773. }
  774. .edit-popup {
  775. width: 500px;
  776. height: calc(100% - 53px - 20px);
  777. position: absolute;
  778. top: 36px;
  779. right: 36px;
  780. border: 1px solid rgba(255, 255, 255, 0.4);
  781. border-radius: 8px;
  782. background: #232323;
  783. .edit-title {
  784. padding: 0 10px;
  785. background: rgba(68, 68, 68, 0.4);
  786. border-bottom: 1px solid rgba(68, 68, 68, 0.4);
  787. display: flex;
  788. align-items: center;
  789. justify-content: space-between;
  790. .btn-group {
  791. display: flex;
  792. .ml {
  793. margin-left: 20px;
  794. }
  795. }
  796. .name {
  797. display: flex;
  798. padding: 12px 0px;
  799. align-items: center;
  800. }
  801. span {
  802. margin-left: 8px;
  803. font-size: 18px;
  804. font-family: "SOURCEHANTIFINE";
  805. }
  806. .edit {
  807. color: #2199f8;
  808. padding: 6px 20px;
  809. border: 1px solid #2199f8;
  810. border-radius: 4px;
  811. cursor: pointer;
  812. }
  813. }
  814. .edit-cont {
  815. padding: 16px;
  816. width: calc(100% - 32px);
  817. height: calc(100% - 64px - 84px);
  818. .form-inline {
  819. height: 320px;
  820. ::v-deep {
  821. .el-input {
  822. width: 200px;
  823. --el-input-placeholder-color: #666666;
  824. }
  825. .el-form-item__label {
  826. color: #bbbbbb;
  827. }
  828. .el-input__wrapper {
  829. background: #232323;
  830. border: 1px solid #444444;
  831. box-shadow: none;
  832. .el-input__inner {
  833. color: #fff;
  834. }
  835. }
  836. }
  837. }
  838. .list-box {
  839. width: 100%;
  840. height: calc(100% - 320px);
  841. span {
  842. color: #bbbbbb;
  843. }
  844. .list-cont {
  845. width: 100%;
  846. height: calc(100% - 20px);
  847. border-radius: 4px;
  848. margin-top: 5px;
  849. background: rgba(68, 68, 68, 0.4);
  850. padding: 12px 16px;
  851. box-sizing: border-box;
  852. overflow-y: auto;
  853. .list-item {
  854. width: 100%;
  855. margin-bottom: 8px;
  856. display: flex;
  857. align-items: center;
  858. .item-box {
  859. padding: 8px;
  860. border: 1px solid #444444;
  861. border-radius: 4px;
  862. margin-left: 10px;
  863. }
  864. }
  865. }
  866. }
  867. }
  868. .edit-footer {
  869. width: 100%;
  870. height: 64px;
  871. display: flex;
  872. align-items: center;
  873. justify-content: flex-end;
  874. box-sizing: border-box;
  875. padding: 12px 16px;
  876. border-top: 1px solid rgba(68, 68, 68, 0.4);
  877. background: rgba(68, 68, 68, 0.4);
  878. .btn {
  879. padding: 10px 35px;
  880. }
  881. .cancel {
  882. border: 1px solid rgba(255, 255, 255, 0.4);
  883. margin-right: 16px;
  884. }
  885. .save {
  886. background: #2199f8;
  887. }
  888. }
  889. }
  890. }
  891. }
  892. }
  893. .dialog-footer {
  894. .btn {
  895. width: 200px;
  896. height: 40px;
  897. }
  898. }
  899. </style>