index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817
  1. <template>
  2. <div class="airportInfoDetails">
  3. <Minheader :is-auth="true" :is-statuser="true" powerData="new_airport_button" @addForm="addForm">
  4. <template #header>
  5. <div class="status flex-wrap">
  6. <div class="manageTitle">机场信息维护</div>
  7. </div>
  8. </template>
  9. </Minheader>
  10. <div class="airportInfo-content">
  11. <el-row :gutter="24">
  12. <el-col :span="6" style="background: #fff">
  13. <div class="tree_left">
  14. <el-scrollbar style="height: 100%">
  15. <div class="corporate">{{ company }}</div>
  16. <el-tree :data="data" :props="defaultProps" accordion @node-click="handleNodeClick">
  17. </el-tree>
  18. </el-scrollbar>
  19. </div>
  20. </el-col>
  21. <el-col :span="18">
  22. <div class="app-containers">
  23. <DataTable :btnGroupWidth="btnGroupWidth" :tableHeader="tableCols" :tableData="tableData" :tableBtnGroup="tableBtnGroup" :tableProperty="{ rowKey: 'ID' }" @btnClick="btnClick" />
  24. </div>
  25. </el-col>
  26. </el-row>
  27. </div>
  28. <Dialog width="600px" :flag="flag" :type="type" :msgTitle="msgTitle" :delName="tableForm.airportName" @resetForm="resetForm" @delRest="delRest" @submitForm="submitForm" @delRemove="delRemove">
  29. <div class="diacont">
  30. <el-form :model="tableForm" :rules="formRules" ref="airportInfoForm">
  31. <el-row :gutter="24">
  32. <el-col :span="12">
  33. <el-form-item label="中文全称" size="default" prop="airportName" :rules="formRules.isNotNull">
  34. <el-input v-model="tableForm.airportName" placeholder="请输入机场名称" />
  35. </el-form-item>
  36. </el-col>
  37. <el-col :span="12">
  38. <el-form-item label="中文简称" size="default" prop="abbreviation" :rules="formRules.isNotNull">
  39. <el-input v-model="tableForm.abbreviation" placeholder="请输入中文简称" />
  40. </el-form-item>
  41. </el-col>
  42. <el-col :span="12">
  43. <el-form-item label="英文简称" size="default">
  44. <el-input v-model="tableForm.englishAbbreviation" placeholder="请输入英文简称" />
  45. </el-form-item>
  46. </el-col>
  47. <el-col :span="12">
  48. <el-form-item label="英文全称" size="default">
  49. <el-input v-model="tableForm.fullName" placeholder="请输入英文全称" />
  50. </el-form-item>
  51. </el-col>
  52. <el-col :span="12">
  53. <el-form-item label="三字码" size="default" prop="IATACode" :rules="formRules.isNotNull">
  54. <el-input v-model="tableForm.IATACode" placeholder="请输入三字码" />
  55. </el-form-item>
  56. </el-col>
  57. <el-col :span="12">
  58. <el-form-item label="四字码" size="default" prop="ICAOCode" :rules="formRules.isNotNull">
  59. <el-input v-model="tableForm.ICAOCode" placeholder="请输入四字码" />
  60. </el-form-item>
  61. </el-col>
  62. <el-col :span="12">
  63. <el-form-item label="时区" size="default" prop="airportTimeZone" :rules="formRules.isNotNull">
  64. <!-- <el-input v-model="tableForm.china" /> -->
  65. <el-select style="width: 100%" v-model="tableForm.airportTimeZone" class="input-shadow" filterable default-first-option clearable placeholder="请选择时区">
  66. <el-option v-for="item in tableOptionser" :key="item.v ? item.v : item.planDepartureApt" :label="item.k ? item.k : item.planDepartureApt" :value="item.v ? item.v : item.planDepartureApt">
  67. </el-option>
  68. </el-select>
  69. </el-form-item>
  70. </el-col>
  71. <el-col :span="12">
  72. <el-form-item label="公司名称" size="default" prop="companyName" :rules="formRules.isNotNull">
  73. <el-input disabled v-model="tableForm.companyName" placeholder="请输入公司名称" />
  74. </el-form-item>
  75. </el-col>
  76. <el-col :span="24">
  77. <el-form-item label="备注" size="default">
  78. <el-input type="textarea" v-model="tableForm.remarks" placeholder="请输入备注" />
  79. </el-form-item>
  80. </el-col>
  81. </el-row>
  82. </el-form>
  83. </div>
  84. </Dialog>
  85. </div>
  86. </template>
  87. <script setup lang="ts">
  88. import DataTable from "@/components/tableTemp/index.vue";
  89. import Dialog from "@/components/dialog/index.vue";
  90. import { translateDataToTreeAll } from "@/utils/validate";
  91. import { Query, GeneralDataReception } from "@/api/webApi";
  92. import { ElMessage } from "element-plus";
  93. import Cookies from "js-cookie";
  94. const formRules = useElement().formRules;
  95. const router = useRouter();
  96. const tableBtnGroup = ref<any>([
  97. {
  98. name: "编辑",
  99. className: "editBtn",
  100. param: 2,
  101. is: "airport_editor_button",
  102. },
  103. {
  104. name: "区域设置",
  105. className: "editBtn",
  106. param: 4,
  107. is: "terminal_setting_page",
  108. },
  109. {
  110. name: "删除",
  111. className: "delBtn",
  112. param: 3,
  113. is: "airport_deletion_button",
  114. },
  115. ]); //单独的编辑
  116. const page = ref<number>(0); //分页参数
  117. const dataContent = ref<object>({});
  118. const noMore = ref<boolean>(false);
  119. const rowTitle = ref<string>("");
  120. const tableCols = ref<any>([]); //表头数据
  121. const serviceId = ref<any>("");
  122. const tableObj = ref({}); //增删改数据缓存
  123. const defaultProps = ref({
  124. children: "children",
  125. label: "companyName",
  126. });
  127. const companyID = ref(""); //机场id
  128. const btnGroupWidth = ref<string>("");
  129. const flag = ref<boolean>(false); //弹窗开关
  130. const type = ref<string>(""); //判断是否删除
  131. const msgTitle = ref<string>("新增机场信息维护"); //弹窗标题
  132. const tableOptionser = ref<any>([
  133. {
  134. k: "UTC",
  135. v: "1",
  136. },
  137. {
  138. k: "UTC+1",
  139. v: "+1",
  140. },
  141. {
  142. k: "UTC+2",
  143. v: "+2",
  144. },
  145. {
  146. k: "UTC+3",
  147. v: "+3",
  148. },
  149. {
  150. k: "UTC+4",
  151. v: "+4",
  152. },
  153. {
  154. k: "UTC+5",
  155. v: "+5",
  156. },
  157. {
  158. k: "UTC+6",
  159. v: "+6",
  160. },
  161. {
  162. k: "UTC+7",
  163. v: "+7",
  164. },
  165. {
  166. k: "UTC+8",
  167. v: "+8",
  168. },
  169. {
  170. k: "UTC+9",
  171. v: "+9",
  172. },
  173. {
  174. k: "UTC+10",
  175. v: "+10",
  176. },
  177. {
  178. k: "UTC+11",
  179. v: "+11",
  180. },
  181. {
  182. k: "UTC-1",
  183. v: "-1",
  184. },
  185. {
  186. k: "UTC-2",
  187. v: "-2",
  188. },
  189. {
  190. k: "UTC-3",
  191. v: "-3",
  192. },
  193. {
  194. k: "UTC-4",
  195. v: "-4",
  196. },
  197. {
  198. k: "UTC-5",
  199. v: "-5",
  200. },
  201. {
  202. k: "UTC-6",
  203. v: "-6",
  204. },
  205. {
  206. k: "UTC-7",
  207. v: "-7",
  208. },
  209. {
  210. k: "UTC-8",
  211. v: "-8",
  212. },
  213. {
  214. k: "UTC-9",
  215. v: "-9",
  216. },
  217. {
  218. k: "UTC-10",
  219. v: "-10",
  220. },
  221. {
  222. k: "UTC-11",
  223. v: "-11",
  224. },
  225. ]); //弹窗下拉
  226. const tableColsCopys = reactive<Object>({}); //弹窗
  227. const tableForm = reactive<any>({
  228. airportID: "",
  229. airportName: "",
  230. IATACode: "",
  231. ICAOCode: "",
  232. abbreviation: "",
  233. englishAbbreviation: "",
  234. fullName: "",
  235. companyID: "",
  236. airportTimeZone: "",
  237. companyName: "",
  238. remarks: "",
  239. event: "",
  240. }); //弹窗内容
  241. const tableColumnProperty = reactive({
  242. width: "120px",
  243. fixed: "",
  244. sortable: false,
  245. showOverflowTooltip: false,
  246. align: "center",
  247. headerAlign: "",
  248. }); //弹窗内容
  249. //列表
  250. const tableData = ref<any>([]);
  251. //表头
  252. const state = reactive({
  253. list: [
  254. { label: "名称", key: "name" },
  255. { label: "三字码", key: "china" },
  256. { label: "四字码", key: "englin" },
  257. { label: "中文简称", key: "two" },
  258. { label: "英文简称", key: "three" },
  259. { label: "全称", key: "text" },
  260. { label: "时区", key: "text1" },
  261. { label: "公司名称", key: "text2" },
  262. ],
  263. listLoading: true,
  264. });
  265. const company = ref("所属公司");
  266. const data = ref([]);
  267. //新增
  268. const addForm = () => {
  269. msgTitle.value = "新增机场信息维护";
  270. flag.value = true;
  271. type.value = "";
  272. tableForm.event = 1;
  273. tableForm.companyID = companyID;
  274. };
  275. //取消
  276. const resetForm = () => {
  277. airportInfoForm.value?.resetFields();
  278. flag.value = false;
  279. // tableForm.airportID = "";
  280. // tableForm.airportName = "";
  281. // tableForm.IATACode = "";
  282. // tableForm.ICAOCode = "";
  283. // tableForm.abbreviation = "";
  284. // tableForm.englishAbbreviation = "";
  285. // tableForm.fullName = "";
  286. // tableForm.companyID = "";
  287. // tableForm.airportTimeZone = "";
  288. // tableForm.companyName = "";
  289. // tableForm.event = "";
  290. // tableForm.remarks = "";
  291. };
  292. //编辑
  293. const editDialog = (data) => {
  294. msgTitle.value = "编辑机场信息维护";
  295. flag.value = true;
  296. type.value = "";
  297. tableForm.name = data.name;
  298. tableForm.china = data.china;
  299. tableForm.englin = data.englin;
  300. tableForm.two = data.two;
  301. tableForm.three = data.three;
  302. tableForm.text = data.text;
  303. tableForm.text1 = data.text1;
  304. tableForm.text2 = data.text2;
  305. };
  306. //删除
  307. const eleDialog = () => {
  308. msgTitle.value = "删除机场信息维护";
  309. flag.value = true;
  310. type.value = "del";
  311. };
  312. //删除取消
  313. const delRest = () => {
  314. flag.value = false;
  315. };
  316. //区域跳转
  317. const aloneDialog = () => {
  318. router.push({ path: "/BasicsData/airportInfoChild" });
  319. };
  320. //编辑-删除
  321. const btnClick = (row, index, param) => {
  322. if (param === 2) {
  323. msgTitle.value = "编辑机场信息维护";
  324. flag.value = true;
  325. type.value = "";
  326. tableForm.airportID = index.airportID;
  327. tableForm.airportName = index.airportName;
  328. tableForm.IATACode = index.IATACode;
  329. tableForm.ICAOCode = index.ICAOCode;
  330. tableForm.abbreviation = index.abbreviation;
  331. tableForm.englishAbbreviation = index.englishAbbreviation;
  332. tableForm.fullName = index.fullName;
  333. tableForm.companyID = index.companyID;
  334. tableForm.airportTimeZone = index.airportTimeZone;
  335. tableForm.companyName = index.companyName;
  336. tableForm.event = index.event;
  337. tableForm.remarks = index.remarks;
  338. } else if (param === 3) {
  339. msgTitle.value = "删除机场信息维护";
  340. flag.value = true;
  341. type.value = "del";
  342. tableForm.event = 3;
  343. tableForm.airportID = index.airportID;
  344. tableForm.airportName = index.airportName;
  345. tableForm.IATACode = index.IATACode;
  346. tableForm.ICAOCode = index.ICAOCode;
  347. tableForm.abbreviation = index.abbreviation;
  348. tableForm.englishAbbreviation = index.englishAbbreviation;
  349. tableForm.fullName = index.fullName;
  350. tableForm.companyID = index.companyID;
  351. tableForm.airportTimeZone = index.airportTimeZone;
  352. tableForm.companyName = index.companyName;
  353. tableForm.event = index.event;
  354. } else if (param === 4) {
  355. Cookies.set("IATACode", index.IATACode);
  356. Cookies.set("abbreviation", index.abbreviation);
  357. router.push({
  358. path: "/BasicsData/airportInfoChild",
  359. query: {
  360. IATACode: index.IATACode,
  361. abbreviation: index.abbreviation,
  362. },
  363. });
  364. }
  365. };
  366. //点击树事件
  367. const handleNodeClick = (data) => {
  368. // console.log(data);
  369. company.value = data.companyName;
  370. tableForm.companyName = data.companyName;
  371. companyID.value = data.companyID;
  372. tableData.value = [];
  373. page.value = 0;
  374. getQuery();
  375. };
  376. //获取表格数据
  377. const getQuery = async () => {
  378. try {
  379. const { code, returnData } = await Query({
  380. id: DATACONTENT_ID.airportTableId,
  381. needPage: ++page.value,
  382. dataContent: [JSON.stringify(companyID.value)],
  383. });
  384. if (code === "0") {
  385. if (returnData.listValues.length === 0) {
  386. page.value--;
  387. noMore.value = true;
  388. }
  389. const titleColumn = returnData.columnSet.find(
  390. (item) => item.needShow === 1
  391. );
  392. if (titleColumn) {
  393. rowTitle.value = titleColumn.columnName;
  394. }
  395. tableData.value.push(...returnData.listValues);
  396. if (returnData.columnSet) {
  397. btnGroupWidth.value = "300px";
  398. } else {
  399. btnGroupWidth.value = "";
  400. }
  401. tableCols.value = returnData.columnSet;
  402. tableCols.value.forEach((element) => {
  403. element.label = element.columnLabel;
  404. element.key = element.columnName;
  405. // if (element.columnName === "queryTemplate") {
  406. // element.width = "300px";
  407. // }
  408. });
  409. serviceId.value = returnData.submitID;
  410. } else {
  411. page.value--;
  412. }
  413. } catch (error) {
  414. page.value--;
  415. }
  416. };
  417. //公司列表
  418. const getAirlines = async () => {
  419. try {
  420. const res = await Query({
  421. id: DATACONTENT_ID.airportTreeId,
  422. dataContent: [],
  423. });
  424. if (res.code === "0") {
  425. let arr: any = [];
  426. arr = translateDataToTreeAll(
  427. res.returnData.listValues,
  428. "parentID",
  429. "companyID"
  430. );
  431. data.value = arr;
  432. companyID.value = data.value[0].companyID;
  433. company.value = data.value[0].companyName;
  434. tableForm.companyName = data.value[0].companyName;
  435. getQuery();
  436. // if (!company.length) {
  437. // company.value = arr[0].companyID;
  438. // company.value = arr[0].companyName;
  439. // }
  440. } else {
  441. // this.$message.error(res.message ?? "失败");
  442. }
  443. } catch (error) {
  444. // this.$message.error("失败");
  445. }
  446. };
  447. //确认提交
  448. const airportInfoForm: any = ref(null);
  449. const submitForm = () => {
  450. airportInfoForm.value.validate((valid: any) => {
  451. if (valid) {
  452. generalDataReception(tableForm);
  453. } else {
  454. return false;
  455. }
  456. });
  457. };
  458. const resetTable = () => {
  459. page.value = 0;
  460. noMore.value = false;
  461. tableData.value = [];
  462. };
  463. //新增-编辑-删除
  464. const generalDataReception = async (data) => {
  465. try {
  466. data = {
  467. ...data,
  468. };
  469. const { code } = await GeneralDataReception({
  470. serviceId: serviceId.value,
  471. dataContent: JSON.stringify(data),
  472. });
  473. if (code == 0) {
  474. ElMessage.success(`操作成功`);
  475. // this.$message.success("操作成功");
  476. resetTable();
  477. getQuery();
  478. resetForm();
  479. flag.value = false;
  480. // rmFlag.value = false;
  481. tableObj.value = {};
  482. // this.$router.go(0);
  483. } else {
  484. ElMessage.error(`操作失败`);
  485. // this.$message.error("操作失败");
  486. // this.flag = false;
  487. // this.rmFlag = false;
  488. tableObj.value = {};
  489. resetForm();
  490. }
  491. } catch (error) {
  492. flag.value = false;
  493. // rmFlag.value = false;
  494. tableObj.value = {};
  495. resetForm();
  496. }
  497. };
  498. const delRemove = () => {
  499. tableForm.event = 3;
  500. generalDataReception(tableForm);
  501. };
  502. getAirlines();
  503. </script>
  504. <style lang="scss" scoped>
  505. ::v-deep .el-form-item__label {
  506. width: 80px;
  507. }
  508. .airportInfoDetails {
  509. .airportInfoDetails-head {
  510. padding: 32px 40px 0px 32px;
  511. background: #ffffff;
  512. box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
  513. border-radius: 4px;
  514. .airportInfoDetails-head-content {
  515. margin-top: 30px;
  516. .el-input {
  517. min-width: 240px;
  518. }
  519. .el-form--inline .el-form-item {
  520. margin-bottom: 24px;
  521. margin-right: 50px;
  522. }
  523. }
  524. }
  525. .corporate {
  526. margin-top: 24px;
  527. margin-left: 24px;
  528. margin-bottom: 23px;
  529. font-size: 16px;
  530. font-family: Microsoft YaHei;
  531. font-weight: bold;
  532. color: #101116;
  533. }
  534. .log {
  535. width: 26px;
  536. height: 26px;
  537. background: #eb2f3b;
  538. border-radius: 50%;
  539. margin-right: 15px;
  540. background: url("../../../../assets/index/ic_close_hint.png") no-repeat;
  541. background-size: 100% 100%;
  542. }
  543. .airportInfoDialog {
  544. ::v-deep .el-form-item__content {
  545. margin-left: 120px !important;
  546. }
  547. ::v-deep .el-form-item__label {
  548. width: 120px !important;
  549. }
  550. ::v-deep .el-form-item {
  551. margin-bottom: 20px;
  552. }
  553. }
  554. .airportInfo-content {
  555. margin-top: 30px;
  556. img {
  557. margin: 0 auto;
  558. margin-top: 10%;
  559. display: -webkit-box;
  560. -webkit-box-pack: center;
  561. -webkit-box-align: center;
  562. -webkit-box-orient: vertical;
  563. text-align: center;
  564. }
  565. .grid-content {
  566. padding: 24px;
  567. margin-bottom: 24px;
  568. height: 144px;
  569. .edit_log {
  570. position: relative;
  571. // top: -2px;
  572. }
  573. .icon {
  574. cursor: pointer;
  575. }
  576. .desc {
  577. margin-top: 60px;
  578. font-size: 14px;
  579. font-family: Microsoft YaHei;
  580. font-weight: 400;
  581. color: #afb4bf;
  582. overflow: hidden;
  583. text-overflow: ellipsis;
  584. white-space: nowrap;
  585. }
  586. }
  587. }
  588. ::v-deep .el-input__suffix {
  589. right: 30px;
  590. }
  591. ::v-deep .el-input__inner {
  592. height: 32px;
  593. border-radius: 2px;
  594. }
  595. .flxdes {
  596. padding: 10px 0px 10px 20px;
  597. font-size: 16px;
  598. font-family: Microsoft YaHei;
  599. font-weight: bold;
  600. height: 36px;
  601. background: #eb2f3b;
  602. color: #ffffff;
  603. margin-bottom: 46px;
  604. width: 100%;
  605. }
  606. .airportInfoDetails-content {
  607. height: 60vh;
  608. overflow-x: hidden;
  609. overflow-y: auto;
  610. padding: 32px 0x 0 0;
  611. // background: #ffffff;
  612. // box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
  613. border-radius: 4px;
  614. // margin-top: 24px;
  615. .terminal-info {
  616. margin-top: 20px;
  617. margin-bottom: 20px;
  618. .terminal-info-add {
  619. width: 216px;
  620. height: 120px;
  621. background: #f5f7fa;
  622. border: 1px dashed #d7dae3;
  623. border-radius: 8px;
  624. display: flex;
  625. justify-content: center;
  626. align-items: center;
  627. cursor: pointer;
  628. .icon {
  629. font-size: 31px;
  630. color: #d7dae3;
  631. }
  632. }
  633. .terminal-info-team {
  634. .terminal-info-list {
  635. width: 216px;
  636. height: 120px;
  637. margin-bottom: 24px;
  638. background: #f5f7fa;
  639. box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
  640. border-radius: 8px;
  641. padding: 24px;
  642. position: relative;
  643. margin-right: 24px;
  644. cursor: pointer;
  645. .name {
  646. font-size: 18px;
  647. font-family: Microsoft YaHei;
  648. font-weight: bold;
  649. color: #303133;
  650. white-space: nowrap;
  651. overflow: hidden;
  652. text-overflow: ellipsis;
  653. }
  654. .edit {
  655. margin-top: 32px;
  656. .round {
  657. display: inline-block;
  658. width: 28px;
  659. height: 28px;
  660. background: #6e82a7;
  661. border-radius: 50%;
  662. line-height: 28px;
  663. text-align: center;
  664. box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
  665. display: flex;
  666. align-items: center;
  667. justify-content: center;
  668. position: absolute;
  669. right: 0;
  670. i {
  671. color: #fff;
  672. }
  673. }
  674. }
  675. .close {
  676. width: 24px;
  677. height: 24px;
  678. background: #000000;
  679. opacity: 0.8;
  680. border-radius: 50%;
  681. position: absolute;
  682. right: -12px;
  683. line-height: 24px;
  684. text-align: center;
  685. top: -12px;
  686. i {
  687. color: #fff;
  688. }
  689. }
  690. &:last-child {
  691. margin-right: 0;
  692. }
  693. }
  694. .active {
  695. border: 2px solid #9ebbf7;
  696. .name {
  697. color: #fff;
  698. }
  699. .edit {
  700. .round {
  701. background: #fff;
  702. i {
  703. color: #6e82a7;
  704. }
  705. }
  706. }
  707. }
  708. }
  709. }
  710. .locationBox {
  711. // padding: 0 0 0 32px;
  712. // background: #ffffff;
  713. margin-top: 30px;
  714. }
  715. .LBox {
  716. display: flex;
  717. flex-wrap: wrap;
  718. width: 100%;
  719. margin-top: 40px;
  720. margin-bottom: 20px;
  721. }
  722. .lbox-add {
  723. width: 100%;
  724. height: 144px;
  725. background: #f5f7fa;
  726. border: 1px dashed #9ebbf7;
  727. border-radius: 8px;
  728. display: flex;
  729. justify-content: center;
  730. align-items: center;
  731. cursor: pointer;
  732. .icon {
  733. font-size: 31px;
  734. color: #9ebbf7;
  735. }
  736. }
  737. .forBox {
  738. width: 230px;
  739. height: 120px;
  740. margin-bottom: 24px;
  741. background: #f5f7fa;
  742. box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
  743. border-radius: 8px;
  744. padding: 24px;
  745. position: relative;
  746. margin-right: 24px;
  747. cursor: pointer;
  748. .name {
  749. font-size: 18px;
  750. font-family: Microsoft YaHei;
  751. font-weight: bold;
  752. color: #303133;
  753. white-space: nowrap;
  754. overflow: hidden;
  755. text-overflow: ellipsis;
  756. }
  757. .edit {
  758. margin-top: 32px;
  759. .round {
  760. display: inline-block;
  761. width: 28px;
  762. height: 28px;
  763. // background: #f5f7fa;
  764. border-radius: 50%;
  765. line-height: 28px;
  766. text-align: center;
  767. // box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
  768. display: flex;
  769. align-items: center;
  770. justify-content: center;
  771. position: absolute;
  772. right: 20px;
  773. i {
  774. color: #fff;
  775. }
  776. }
  777. }
  778. .close {
  779. width: 24px;
  780. height: 24px;
  781. background: #000000;
  782. opacity: 0.8;
  783. border-radius: 50%;
  784. position: absolute;
  785. right: -12px;
  786. line-height: 24px;
  787. text-align: center;
  788. top: -12px;
  789. i {
  790. color: #fff;
  791. }
  792. }
  793. &:last-child {
  794. margin-right: 0;
  795. }
  796. }
  797. .active {
  798. // background: #6e82a7;
  799. border: 2px solid #9ebbf7;
  800. .name {
  801. // color: #fff;
  802. }
  803. .edit {
  804. .round {
  805. background: #fff;
  806. i {
  807. color: #6e82a7;
  808. }
  809. }
  810. }
  811. }
  812. }
  813. }
  814. </style>