index.vue 25 KB

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