index.vue 25 KB

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