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. :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. Object.assign(formInlineSearch, initForm);
  417. getList((geoms) => {
  418. authenticMap.allUnSelect();
  419. });
  420. }
  421. authenticMap.setPoint("point");
  422. authenticMap.clearMapData("isEdit", false, formInline.id);
  423. authenticMap.endDraw();
  424. };
  425. // 保存
  426. const onSubmit = () => {
  427. if (!ruleFormRef.value) return;
  428. ruleFormRef.value.validate((valid, fields) => {
  429. if (valid) {
  430. formInline.mu = formInline.mu.split('亩')[0]
  431. VE_API.authentic.saveData(formInline).then((res) => {
  432. isUpdata.value = false;
  433. disabledForm.value = true;
  434. mapData.disabledForm = true;
  435. Object.assign(formInlineSearch, initForm);
  436. authenticMap.endDraw();
  437. getList().then(() => {
  438. isRefresh.value = false;
  439. isEdit.value = false;
  440. authenticMap.allUnSelect()
  441. authenticMap.clearMapData()
  442. // authenticMap.getSelectPointArr(
  443. // point.id || plotList.value[plotList.value.length - 1].id
  444. // );
  445. });
  446. });
  447. }
  448. });
  449. };
  450. // 打印
  451. const handlePrint = () => {
  452. pdfShow.value = true;
  453. };
  454. // 返回
  455. const goBack = () => {
  456. router.go(-1);
  457. };
  458. function updateFormInline(newData, name) {
  459. Object.assign(formInline, newData);
  460. }
  461. // 删除地块
  462. const handleDelete = () => {
  463. const id = mapData.selectPointArr.map((item) => item.values_.id);
  464. if (id.length<0) return ElMessage("请选择地块");
  465. ElMessageBox.confirm("您确定删除该地块吗?", "提示", {
  466. confirmButtonText: "确认",
  467. cancelButtonText: "取消",
  468. type: "warning",
  469. })
  470. .then(() => {
  471. VE_API.authentic.deleteData(id).then((res) => {
  472. isUpdata.value = false;
  473. onCancel();
  474. });
  475. })
  476. .catch(() => {});
  477. };
  478. // 创建
  479. const isRefresh = ref(true);
  480. const handleAdd = () => {
  481. isRefresh.value = false;
  482. isEdit.value = false;
  483. if (isUpdata.value) {
  484. authenticMap.cancelDraw();
  485. authenticMap.allUnSelect();
  486. } else {
  487. getList();
  488. isUpdata.value = true;
  489. }
  490. updateFormInline({ ...initForm });
  491. ruleFormRef.value.resetFields();
  492. pointList.value = [];
  493. authenticMap.clearMapData("curPointData", {});
  494. authenticMap.clearMapData("isEdit", false);
  495. authenticMap.setPoint("point");
  496. authenticMap.startDraw();
  497. };
  498. // 删除点
  499. const handleDeletePoint = () => {
  500. authenticMap.removePoint();
  501. };
  502. // 撤销
  503. const handleCancel = () => {
  504. authenticMap.undoLastDraw();
  505. // authenticMap.cancelDraw()
  506. };
  507. // 导出
  508. const gridData = ref([]);
  509. const dialogVisible = ref(false);
  510. const handleExport = () => {
  511. if (mapData.selectPointArr.length < 1) return ElMessage("请选择地块");
  512. const ids = mapData.selectPointArr.map((item) => item.values_.id);
  513. VE_API.authentic.exportData(ids).then(({ data }) => {
  514. gridData.value = data.map((item) => {
  515. return {
  516. ...item,
  517. createDate: dateFormat(
  518. new Date(item.createDate),
  519. "YYYY-mm-dd HH:MM:SS"
  520. ),
  521. };
  522. });
  523. dialogVisible.value = true;
  524. });
  525. };
  526. // 下载
  527. const handleDowload = () => {
  528. const fieldLabels = [
  529. "农场名称",
  530. "农场地址",
  531. "创建时间",
  532. "农场面积",
  533. "作物物种",
  534. "客户姓名",
  535. "联系电话",
  536. "边界点经纬度",
  537. ];
  538. const fieldKeys = [
  539. "farmName",
  540. "address",
  541. "createDate",
  542. "mu",
  543. "speciesTypeName",
  544. "masterName",
  545. "masterTel",
  546. "points",
  547. ];
  548. const fileName = "农场数据" + dateFormat(new Date(), "YYYY-mm-dd HH:MM");
  549. exportExcel(gridData.value, fieldLabels, fieldKeys, fileName);
  550. };
  551. const pointList = ref([]);
  552. // 获取编辑回显数据
  553. const getDetailsData = (id) => {
  554. VE_API.authentic.getDetails({ id }).then(({ data }) => {
  555. isEdit.value = true;
  556. disabledForm.value = true;
  557. mapData.disabledForm = true
  558. data.createDate = dateFormat(
  559. new Date(data.createDate),
  560. "YYYY-mm-dd HH:MM:SS"
  561. );
  562. updateFormInline({ ...data });
  563. formInline.mu = data.mu + "亩";
  564. // 经纬度列表
  565. let arr = JSON.parse(data.points);
  566. // 删除最后数组最后一项闭合数据
  567. arr.pop();
  568. pointList.value = arr;
  569. });
  570. };
  571. // 添加经纬度列表
  572. const updatePointList = (type) => {
  573. const { geometryArr, area } = authenticMap.getAreaGeometry(type);
  574. const lastItem = geometryArr[geometryArr.length - 1];
  575. formInline.geom = lastItem.featureWkt;
  576. formInline.mu = area + "亩";
  577. let result = parseMultiPolygon(lastItem.featureWkt);
  578. result.pop();
  579. pointList.value = result;
  580. };
  581. watchEffect(() => {
  582. if (mapData.isEditArea) {
  583. isUpdata.value = false;
  584. updatePointList('edit');
  585. }
  586. });
  587. watch(
  588. () => mapData.isEdit,
  589. (newVale, oldValue) => {
  590. if (newVale && mapData.selectPointArr.length < 2 && !isRefresh.value) {
  591. isEdit.value = true;
  592. disabledForm.value = false;
  593. mapData.disabledForm = false
  594. isUpdata.value = true;
  595. // isRefresh.value = false;
  596. formInline.createDate = dateFormat(new Date(), "YYYY-mm-dd HH:MM:SS");
  597. updatePointList('add');
  598. authenticMap.startModify();
  599. }
  600. }
  601. );
  602. watch(
  603. () => mapData.selectPointArr,
  604. (newVale, oldValue) => {
  605. if (mapData.selectPointArr.length === 1) {
  606. const obj = mapData.selectPointArr[0];
  607. const id = obj.values_.id
  608. getDetailsData(id);
  609. mapData.curPointData = obj.values_
  610. } else {
  611. if (isRefresh.value) {
  612. isEdit.value = false;
  613. authenticMap.endDraw();
  614. isRefresh.value = true;
  615. }
  616. if(mapData.selectPointArr.length === 0 || mapData.selectPointArr.length > 1){
  617. isEdit.value = false;
  618. }
  619. }
  620. }
  621. );
  622. </script>
  623. <style lang="scss" scoped>
  624. .base-container {
  625. width: 100%;
  626. height: 100vh;
  627. color: #fff;
  628. box-sizing: border-box;
  629. z-index: 1;
  630. position: relative;
  631. .top-bg {
  632. position: absolute;
  633. top: 0;
  634. width: 100%;
  635. height: 74px;
  636. background: #101010;
  637. z-index: -1;
  638. }
  639. .btn {
  640. display: flex;
  641. align-items: center;
  642. padding: 6px 16px;
  643. border-radius: 4px;
  644. cursor: pointer;
  645. .icon {
  646. width: 13px;
  647. height: 13px;
  648. }
  649. span {
  650. margin-left: 10px;
  651. }
  652. }
  653. .disabled-button{
  654. pointer-events: none;
  655. opacity: 0.5;
  656. cursor: not-allowed;
  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>