index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943
  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(true)" 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 = (isCancel) => {
  410. isEdit.value = false;
  411. if (isUpdata.value || isCancel) {
  412. authenticMap.cancelDraw();
  413. } else {
  414. // authenticMap.cancelDraw();
  415. getList((geoms) => {
  416. // const geometriesWkt = []
  417. // for(let item of geoms){
  418. // geometriesWkt.push(item.featureWkt)
  419. // }
  420. // authenticMap.fit(geometriesWkt)
  421. authenticMap.allUnSelect();
  422. });
  423. }
  424. authenticMap.setPoint("point");
  425. authenticMap.clearMapData("isEdit", false, formInline.id);
  426. authenticMap.endDraw();
  427. };
  428. // 保存
  429. const onSubmit = () => {
  430. if (!ruleFormRef.value) return;
  431. ruleFormRef.value.validate((valid, fields) => {
  432. if (valid) {
  433. VE_API.authentic.saveData(formInline).then((res) => {
  434. isUpdata.value = false;
  435. disabledForm.value = true;
  436. mapData.disabledForm = true;
  437. const point = mapData.curPointData;
  438. authenticMap.endDraw();
  439. getList().then(() => {
  440. isRefresh.value = false;
  441. isEdit.value = false;
  442. authenticMap.allUnSelect()
  443. authenticMap.clearMapData()
  444. // authenticMap.getSelectPointArr(
  445. // point.id || plotList.value[plotList.value.length - 1].id
  446. // );
  447. });
  448. });
  449. }
  450. });
  451. };
  452. // 打印
  453. const handlePrint = () => {
  454. pdfShow.value = true;
  455. };
  456. // 返回
  457. const goBack = () => {
  458. router.go(-1);
  459. };
  460. function updateFormInline(newData, name) {
  461. Object.assign(formInline, newData);
  462. }
  463. // 删除地块
  464. const handleDelete = () => {
  465. if (!mapData.curPointData.id) return ElMessage("请选择地块");
  466. const id = mapData.selectPointArr.map((item) => item.values_.id);
  467. ElMessageBox.confirm("您确定删除该地块吗?", "提示", {
  468. confirmButtonText: "确认",
  469. cancelButtonText: "取消",
  470. type: "warning",
  471. })
  472. .then(() => {
  473. VE_API.authentic.deleteData(id).then((res) => {
  474. isUpdata.value = false;
  475. onCancel();
  476. });
  477. })
  478. .catch(() => {});
  479. };
  480. // 创建
  481. const isRefresh = ref(true);
  482. const handleAdd = () => {
  483. isRefresh.value = false;
  484. isEdit.value = false;
  485. if (isUpdata.value) {
  486. authenticMap.cancelDraw();
  487. authenticMap.allUnSelect();
  488. } else {
  489. getList();
  490. isUpdata.value = true;
  491. }
  492. updateFormInline({ ...initForm });
  493. ruleFormRef.value.resetFields();
  494. pointList.value = [];
  495. authenticMap.clearMapData("curPointData", {});
  496. authenticMap.clearMapData("isEdit", false);
  497. authenticMap.setPoint("point");
  498. authenticMap.startDraw();
  499. };
  500. // 删除点
  501. const handleDeletePoint = () => {
  502. authenticMap.removePoint();
  503. };
  504. // 撤销
  505. const handleCancel = () => {
  506. authenticMap.undoLastDraw();
  507. // authenticMap.cancelDraw()
  508. };
  509. // 导出
  510. const gridData = ref([]);
  511. const dialogVisible = ref(false);
  512. const handleExport = () => {
  513. if (mapData.selectPointArr.length < 1) return ElMessage("请选择地块");
  514. const ids = mapData.selectPointArr.map((item) => item.values_.id);
  515. VE_API.authentic.exportData(ids).then(({ data }) => {
  516. gridData.value = data.map((item) => {
  517. return {
  518. ...item,
  519. createDate: dateFormat(
  520. new Date(item.createDate),
  521. "YYYY-mm-dd HH:MM:SS"
  522. ),
  523. };
  524. });
  525. dialogVisible.value = true;
  526. });
  527. };
  528. // 下载
  529. const handleDowload = () => {
  530. const fieldLabels = [
  531. "农场名称",
  532. "农场地址",
  533. "创建时间",
  534. "农场面积",
  535. "作物物种",
  536. "客户姓名",
  537. "联系电话",
  538. "边界点经纬度",
  539. ];
  540. const fieldKeys = [
  541. "farmName",
  542. "address",
  543. "createDate",
  544. "mu",
  545. "speciesTypeName",
  546. "masterName",
  547. "masterTel",
  548. "points",
  549. ];
  550. const fileName = "农场数据" + dateFormat(new Date(), "YYYY-mm-dd");
  551. exportExcel(gridData.value, fieldLabels, fieldKeys, fileName);
  552. };
  553. const pointList = ref([]);
  554. // 获取编辑回显数据
  555. const getDetailsData = (id) => {
  556. VE_API.authentic.getDetails({ id }).then(({ data }) => {
  557. isEdit.value = true;
  558. disabledForm.value = true;
  559. mapData.disabledForm = true
  560. data.createDate = dateFormat(
  561. new Date(data.createDate),
  562. "YYYY-mm-dd HH:MM:SS"
  563. );
  564. updateFormInline({ ...data });
  565. formInline.area = data.mu.toFixed(2) + "亩";
  566. // 经纬度列表
  567. let arr = JSON.parse(data.points);
  568. // 删除最后数组最后一项闭合数据
  569. arr.pop();
  570. pointList.value = arr;
  571. });
  572. };
  573. // 添加经纬度列表
  574. const updatePointList = () => {
  575. const { geometryArr, area } = authenticMap.getAreaGeometry();
  576. const lastItem = geometryArr[geometryArr.length - 1];
  577. formInline.geom = lastItem.featureWkt;
  578. formInline.area = area + "亩";
  579. let result = parseMultiPolygon(lastItem.featureWkt);
  580. result.pop();
  581. pointList.value = result;
  582. };
  583. watchEffect(() => {
  584. // isRefresh.value = true
  585. // if (mapData.isEdit && mapData.selectPointArr.length < 2&& isRefresh.value) {
  586. // isEdit.value = true;
  587. // disabledForm.value = false;
  588. // isUpdata.value = true;
  589. // formInline.createDate = dateFormat(new Date(), "YYYY-mm-dd HH:MM:SS");
  590. // updatePointList();
  591. // authenticMap.startModify();
  592. // }
  593. if (mapData.isEditArea) {
  594. isUpdata.value = false;
  595. updatePointList();
  596. }
  597. });
  598. watch(
  599. () => mapData.isEdit,
  600. (newVale, oldValue) => {
  601. if (newVale && mapData.selectPointArr.length < 2 && !isRefresh.value) {
  602. isEdit.value = true;
  603. disabledForm.value = false;
  604. mapData.disabledForm = false
  605. isUpdata.value = true;
  606. // isRefresh.value = false;
  607. formInline.createDate = dateFormat(new Date(), "YYYY-mm-dd HH:MM:SS");
  608. updatePointList();
  609. authenticMap.startModify();
  610. }
  611. }
  612. );
  613. watch(
  614. () => mapData.selectPointArr,
  615. (newVale, oldValue) => {
  616. if (mapData.selectPointArr.length === 1) {
  617. const id = mapData.selectPointArr.map((item) => item.values_.id);
  618. getDetailsData(id[0]);
  619. } else {
  620. if (isRefresh.value) {
  621. isEdit.value = false;
  622. authenticMap.endDraw();
  623. isRefresh.value = true;
  624. }
  625. if(mapData.selectPointArr.length === 0){
  626. isEdit.value = false;
  627. }
  628. }
  629. }
  630. );
  631. </script>
  632. <style lang="scss" scoped>
  633. .base-container {
  634. width: 100%;
  635. height: 100vh;
  636. color: #fff;
  637. box-sizing: border-box;
  638. z-index: 1;
  639. position: relative;
  640. .top-bg {
  641. position: absolute;
  642. top: 0;
  643. width: 100%;
  644. height: 74px;
  645. background: #101010;
  646. z-index: -1;
  647. }
  648. .btn {
  649. display: flex;
  650. align-items: center;
  651. padding: 6px 16px;
  652. border-radius: 4px;
  653. cursor: pointer;
  654. .icon {
  655. width: 13px;
  656. height: 13px;
  657. }
  658. span {
  659. margin-left: 10px;
  660. }
  661. }
  662. .top {
  663. display: flex;
  664. justify-content: space-between;
  665. // justify-content: flex-end;
  666. width: 100%;
  667. height: 40px;
  668. background: #101010;
  669. padding: 17px 20px 0 20px;
  670. box-sizing: border-box;
  671. display: flex;
  672. align-items: center;
  673. .back {
  674. border: 1px solid rgba(255, 255, 255, 0.4);
  675. }
  676. .v-select {
  677. width: 300px;
  678. ::v-deep {
  679. .el-select__wrapper {
  680. background: #101010;
  681. box-shadow: none;
  682. border: 1px solid rgba(255, 255, 255, 0.7);
  683. .el-select__input {
  684. color: #fff;
  685. }
  686. }
  687. }
  688. }
  689. .search {
  690. display: flex;
  691. align-items: center;
  692. justify-content: flex-end;
  693. width: 60%;
  694. .input-with-select {
  695. margin-left: 25px;
  696. }
  697. .upload {
  698. background: #2199f8;
  699. margin-left: 25px;
  700. }
  701. .add {
  702. background: #fff;
  703. color: #000;
  704. margin-left: 25px;
  705. }
  706. }
  707. }
  708. .content {
  709. width: 100%;
  710. height: calc(100% - 74px - 40px);
  711. box-sizing: border-box;
  712. background: #101010;
  713. padding: 13px 20px 20px 20px;
  714. .search-form {
  715. height: 40px;
  716. margin: 5px 0;
  717. display: flex;
  718. // justify-content: flex-end;
  719. justify-content: space-between;
  720. ::v-deep {
  721. .el-form-item__label {
  722. color: #fff;
  723. }
  724. .el-form-item__content {
  725. width: 190px;
  726. }
  727. .el-input__wrapper {
  728. background: #101010;
  729. box-shadow: none;
  730. border: 1px solid rgba(255, 255, 255, 0.7);
  731. .el-input__inner {
  732. color: #fff;
  733. }
  734. }
  735. }
  736. .button {
  737. display: flex;
  738. .btn {
  739. width: 84px;
  740. &.reset {
  741. margin-left: 25px;
  742. }
  743. }
  744. }
  745. }
  746. .box {
  747. border: 1px solid rgba(255, 255, 255, 0.4);
  748. border-radius: 8px;
  749. padding: 20px;
  750. box-sizing: border-box;
  751. background: #232323;
  752. width: 100%;
  753. height: calc(100% - 50px);
  754. position: relative;
  755. .map-box {
  756. width: 100%;
  757. height: 100%;
  758. border-radius: 4px;
  759. border: 1px solid rgba(255, 255, 255, 0.4);
  760. .map {
  761. width: 100%;
  762. height: 100%;
  763. }
  764. }
  765. .tool-group {
  766. position: absolute;
  767. display: flex;
  768. right: calc(500px + 36px);
  769. top: 42px;
  770. .btn {
  771. background: #fff;
  772. color: #000;
  773. margin-right: 10px;
  774. }
  775. .delete {
  776. background: #e45c5c;
  777. color: #fff;
  778. }
  779. }
  780. .edit-popup {
  781. width: 500px;
  782. height: calc(100% - 53px - 20px);
  783. position: absolute;
  784. top: 36px;
  785. right: 36px;
  786. border: 1px solid rgba(255, 255, 255, 0.4);
  787. border-radius: 8px;
  788. background: #232323;
  789. .edit-title {
  790. padding: 0 10px;
  791. background: rgba(68, 68, 68, 0.4);
  792. border-bottom: 1px solid rgba(68, 68, 68, 0.4);
  793. display: flex;
  794. align-items: center;
  795. justify-content: space-between;
  796. .btn-group {
  797. display: flex;
  798. .ml {
  799. margin-left: 20px;
  800. }
  801. }
  802. .name {
  803. display: flex;
  804. padding: 12px 0px;
  805. align-items: center;
  806. }
  807. span {
  808. margin-left: 8px;
  809. font-size: 18px;
  810. font-family: "SOURCEHANTIFINE";
  811. }
  812. .edit {
  813. color: #2199f8;
  814. padding: 6px 20px;
  815. border: 1px solid #2199f8;
  816. border-radius: 4px;
  817. cursor: pointer;
  818. }
  819. }
  820. .edit-cont {
  821. padding: 16px;
  822. width: calc(100% - 32px);
  823. height: calc(100% - 64px - 84px);
  824. .form-inline {
  825. height: 320px;
  826. ::v-deep {
  827. .el-input {
  828. width: 200px;
  829. --el-input-placeholder-color: #666666;
  830. }
  831. .el-form-item__label {
  832. color: #bbbbbb;
  833. }
  834. .el-input__wrapper {
  835. background: #232323;
  836. border: 1px solid #444444;
  837. box-shadow: none;
  838. .el-input__inner {
  839. color: #fff;
  840. }
  841. }
  842. }
  843. }
  844. .list-box {
  845. width: 100%;
  846. height: calc(100% - 320px);
  847. span {
  848. color: #bbbbbb;
  849. }
  850. .list-cont {
  851. width: 100%;
  852. height: calc(100% - 20px);
  853. border-radius: 4px;
  854. margin-top: 5px;
  855. background: rgba(68, 68, 68, 0.4);
  856. padding: 12px 16px;
  857. box-sizing: border-box;
  858. overflow-y: auto;
  859. .list-item {
  860. width: 100%;
  861. margin-bottom: 8px;
  862. display: flex;
  863. align-items: center;
  864. .item-box {
  865. padding: 8px;
  866. border: 1px solid #444444;
  867. border-radius: 4px;
  868. margin-left: 10px;
  869. }
  870. }
  871. }
  872. }
  873. }
  874. .edit-footer {
  875. width: 100%;
  876. height: 64px;
  877. display: flex;
  878. align-items: center;
  879. justify-content: flex-end;
  880. box-sizing: border-box;
  881. padding: 12px 16px;
  882. border-top: 1px solid rgba(68, 68, 68, 0.4);
  883. background: rgba(68, 68, 68, 0.4);
  884. .btn {
  885. padding: 10px 35px;
  886. }
  887. .cancel {
  888. border: 1px solid rgba(255, 255, 255, 0.4);
  889. margin-right: 16px;
  890. }
  891. .save {
  892. background: #2199f8;
  893. }
  894. }
  895. }
  896. }
  897. }
  898. }
  899. .dialog-footer {
  900. .btn {
  901. width: 200px;
  902. height: 40px;
  903. }
  904. }
  905. </style>