maintain.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. <!-- -->
  2. <template>
  3. <div class="maintainbox">
  4. <div class="maintainbox_search">
  5. <el-input
  6. v-model="monitorname"
  7. placeholder="请输入监测点名称"
  8. size="mini"
  9. ></el-input>
  10. <el-button type="info" @click="search" size="mini">搜索</el-button>
  11. <el-button
  12. type="info"
  13. size="mini"
  14. @click="(addtraptf = true), (addtitle = '新增监测点')"
  15. >添加监测点</el-button
  16. >
  17. <el-button type="info" size="mini" @click="downloadtf = true"
  18. >导入监测点</el-button
  19. >
  20. </div>
  21. <el-card class="box-card" style="margin-top: 15px">
  22. <div class="cbdboxs_table" v-loading="loading">
  23. <el-table :data="tableData" style="width: 100%" :stripe="true" :height="48*13">
  24. <el-table-column prop="index" label="序号"> </el-table-column>
  25. <el-table-column
  26. prop="point_name"
  27. label="监测点名称"
  28. ></el-table-column>
  29. <el-table-column prop="lng" label="经度">
  30. <template slot-scope="scope">
  31. <span>{{ ToDegrees(scope.row.lng, "lng") }}</span>
  32. </template>
  33. </el-table-column>
  34. <el-table-column prop="lat" label="纬度">
  35. <template slot-scope="scope">
  36. <span>{{ ToDegrees(scope.row.lat, "lat") }}</span>
  37. </template>
  38. </el-table-column>
  39. <el-table-column prop="messages" label="简介"></el-table-column>
  40. <el-table-column label="操作" width="300">
  41. <template slot-scope="scope">
  42. <span
  43. style="color: #409eff; margin-right: 5px;cursor: pointer;"
  44. @click="alter(scope.row)"
  45. >编辑</span
  46. >
  47. <span
  48. style="color: #409eff; margin-right: 5px;cursor: pointer;"
  49. @click="deletemain(scope.row)"
  50. >删除</span
  51. >
  52. </template>
  53. </el-table-column>
  54. </el-table>
  55. </div>
  56. <el-pagination
  57. background
  58. layout="prev, pager, next,jumper"
  59. :total="total"
  60. :page-size="20"
  61. @current-change="pageChange"
  62. :current-page="page"
  63. >
  64. </el-pagination>
  65. </el-card>
  66. <el-dialog
  67. :title="addtitle"
  68. :visible.sync="addtraptf"
  69. width="580px"
  70. @close="resetForm('ruleForm')"
  71. :close-on-click-modal="false"
  72. >
  73. <div>
  74. <el-form
  75. :model="ruleForm"
  76. :rules="rules"
  77. ref="ruleForm"
  78. label-width="100px"
  79. class="demo-ruleForm"
  80. >
  81. <el-form-item label="监测点名称" prop="point_name">
  82. <el-input v-model="ruleForm.point_name"></el-input>
  83. </el-form-item>
  84. <div class="addtrapbox">
  85. <el-form-item label="所在经度" prop="lng">
  86. <el-input v-model="ruleForm.lng"></el-input>
  87. <p style="height: 24px; padding-left: 16px">
  88. {{ ToDegrees(ruleForm.lng, "lng") }}
  89. </p>
  90. </el-form-item>
  91. <el-form-item label="所在纬度" prop="lat">
  92. <el-input v-model="ruleForm.lat"></el-input>
  93. <p style="height: 24px; padding-left: 16px">
  94. {{ ToDegrees(ruleForm.lat, "lat") }}
  95. </p>
  96. </el-form-item>
  97. </div>
  98. <div class="buttonbox">
  99. <el-button type="info" size="mini" @click="dingwei"
  100. >地图选点</el-button
  101. >
  102. </div>
  103. <el-form-item label="监测点描述" prop="messages">
  104. <el-input type="textarea" v-model="ruleForm.messages"></el-input>
  105. </el-form-item>
  106. </el-form>
  107. </div>
  108. <span slot="footer" class="dialog-footer">
  109. <el-button @click="resetForm('ruleForm')" size="mini">取 消</el-button>
  110. <el-button type="primary" @click="submitForm('ruleForm')" size="mini"
  111. :disabled="releaseTF"
  112. >{{ releaseTF ? "发布中..." : "确 定" }}</el-button
  113. >
  114. </span>
  115. </el-dialog>
  116. <el-dialog
  117. class="map_dialog"
  118. title="地图选点"
  119. :visible.sync="addLocationDialogVisible"
  120. width="820px"
  121. @closed="addLocationDialogClosed"
  122. :close-on-click-modal="false"
  123. >
  124. <el-form
  125. :inline="true"
  126. :model="locationForm"
  127. class="demo-form-inline"
  128. size="mini"
  129. >
  130. <el-form-item label="经度">
  131. <el-input clearable v-model="locationForm.lng"></el-input>
  132. </el-form-item>
  133. <el-form-item label="纬度">
  134. <el-input clearable v-model="locationForm.lat"></el-input>
  135. </el-form-item>
  136. <el-form-item>
  137. <el-button type="primary" size="mini" @click="locationSearch"
  138. >定位</el-button
  139. >
  140. </el-form-item>
  141. <el-form-item label="">
  142. <el-input
  143. placeholder="请输入地区检索"
  144. v-model="addr"
  145. clearable
  146. @change="addrChange()"
  147. ></el-input>
  148. </el-form-item>
  149. </el-form>
  150. <div class="amap-demo" id="mapContainer2" style="height: 400px"></div>
  151. <span slot="footer" class="dialog-footer">
  152. <el-button @click="addLocationDialogVisible = false" size="mini"
  153. >取 消</el-button
  154. >
  155. <el-button type="primary" @click="addLocationSubm" size="mini"
  156. >确 定</el-button
  157. >
  158. </span>
  159. </el-dialog>
  160. <el-dialog title="导入监测点" :visible.sync="downloadtf" width="500px" :close-on-click-modal="false">
  161. <div class="downloadbox">
  162. <div class="downloadbox_item">
  163. <p class="title">导入监测点</p>
  164. <!-- <el-input placeholder="请输入内容" v-model="input1">
  165. <template slot="prepend">Http://</template>
  166. </el-input> -->
  167. <el-upload
  168. action=""
  169. :auto-upload="false"
  170. accept=".xlsx, .xls"
  171. :show-file-list="false"
  172. :on-change="handle"
  173. >
  174. <el-button type="success" size="mini">点击上传</el-button>
  175. </el-upload>
  176. <el-input
  177. v-model="downloadinput"
  178. placeholder="请输入内容"
  179. :disabled="true"
  180. size="mini"
  181. ></el-input>
  182. </div>
  183. <p class="tishi">
  184. <span>注:请先下模板,在模板中填入数据上传</span
  185. ><span @click="download">下载模板</span>
  186. </p>
  187. </div>
  188. <!-- <span slot="footer" class="dialog-footer">
  189. <el-button @click="downloadtf = false">取 消</el-button>
  190. <el-button type="primary" @click="downloadtf = false">确 定</el-button>
  191. </span> -->
  192. </el-dialog>
  193. </div>
  194. </template>
  195. <script>
  196. //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  197. export default {
  198. //import引入的组件需要注入到对象中才能使用
  199. components: {},
  200. data() {
  201. var checklnglat = (rule, value, callback) => {
  202. if (isNaN(value)) {
  203. callback(new Error("请输入数字"));
  204. } else {
  205. callback();
  206. }
  207. };
  208. //这里存放数据
  209. return {
  210. monitorname: "", //搜索 监测点名称
  211. addtraptf: false, //添加框
  212. loading: false, //加载框
  213. page: 1, //页码
  214. total: 10, //数据总条数,
  215. tableData: [],
  216. ruleForm: {
  217. point_name: "",
  218. lng: "",
  219. lat: "",
  220. messages: "",
  221. },
  222. rules: {
  223. point_name: [
  224. { required: true, message: "请输入诱捕器名称", trigger: "blur" },
  225. ],
  226. lng: [
  227. { required: true, message: "请输入经度", trigger: "blur" },
  228. // { validator: checklnglat, trigger: "blur" },
  229. ],
  230. lat: [
  231. { required: true, message: "请输入纬度", trigger: "blur" },
  232. // { validator: checklnglat, trigger: "blur" },
  233. ],
  234. // messages: [
  235. // { required: true, message: "请输入监测点描述", trigger: "blur" },
  236. // ],
  237. },
  238. addtitle: "新增监测点",
  239. point_id: "",
  240. //地图属性
  241. addLocationDialogVisible: false,
  242. locationForm: {
  243. lng: "",
  244. lat: "",
  245. },
  246. addr: "", //搜索栏地址
  247. address: "", //地图上标签地址
  248. center: [114.05, 22.55],
  249. releaseTF:false,
  250. downloadinput:"",
  251. downloadtf:false
  252. };
  253. },
  254. //监听属性 类似于data概念
  255. computed: {},
  256. //监控data中的数据变化
  257. watch: {},
  258. //方法集合
  259. methods: {
  260. getmaintainlist() {
  261. this.loading = true;
  262. this.$axios({
  263. method: "POST",
  264. url: "/api/api_gateway?method=monitor_manage.maintain.checkpoint_list",
  265. data: this.qs.stringify({
  266. page_item: 20,
  267. page: this.page,
  268. point_name: this.monitorname, // 非必传(string) 诱剂名称 搜索项
  269. }),
  270. }).then((res) => {
  271. this.loading = false;
  272. console.log(res.data.data);
  273. this.total = res.data.data.total_item;
  274. this.tableData = res.data.data.page_list;
  275. for (var i = 0; i < this.tableData.length; i++) {
  276. this.tableData[i]["index"] = i + 1;
  277. }
  278. });
  279. },
  280. search() {
  281. this.getmaintainlist();
  282. },
  283. pageChange(e) {
  284. //当页码更改时
  285. // console.log(e)
  286. this.page = e;
  287. this.getmaintainlist();
  288. },
  289. submitForm(formName) {
  290. console.log(this.ruleForm);
  291. this.$refs[formName].validate((valid) => {
  292. if (valid) {
  293. if (this.addtitle == "新增监测点") {
  294. this.releaseTF = true
  295. this.$axios({
  296. method: "POST",
  297. url: "/api/api_gateway?method=monitor_manage.maintain.checkpoint_add",
  298. data: this.qs.stringify({
  299. point_name: this.ruleForm.point_name, // 非必传(num) 诱捕器id 修改项
  300. lat: this.ToDigital(this.ruleForm.lat), // 必传(string) 纬度
  301. lng: this.ToDigital(this.ruleForm.lng), // 必传(string) 经度
  302. messages: this.ruleForm.messages,
  303. }),
  304. }).then((res) => {
  305. console.log(res);
  306. if (res.data.data) {
  307. if (document.getElementsByClassName("el-message").length == 0) {
  308. this.$message({
  309. showClose: true,
  310. message: "添加成功!",
  311. type: "success",
  312. });
  313. }
  314. this.addtraptf = false;
  315. this.getmaintainlist();
  316. } else {
  317. if (document.getElementsByClassName("el-message").length == 0) {
  318. this.$message({
  319. showClose: true,
  320. message: "添加失败" + res.data.message,
  321. type: "warning",
  322. });
  323. }
  324. }
  325. this.releaseTF = false
  326. });
  327. } else if (this.addtitle == "修改监测点") {
  328. this.releaseTF = true
  329. this.$axios({
  330. method: "POST",
  331. url: "/api/api_gateway?method=monitor_manage.maintain.checkpoint_modify",
  332. data: this.qs.stringify({
  333. point_id: this.point_id,
  334. point_name: this.ruleForm.point_name, // 非必传(num) 诱捕器id 修改项
  335. lat: this.ToDigital(this.ruleForm.lat), // 必传(string) 纬度
  336. lng: this.ToDigital(this.ruleForm.lng), // 必传(string) 经度
  337. messages: this.ruleForm.messages,
  338. }),
  339. }).then((res) => {
  340. console.log(res);
  341. if (res.data.data) {
  342. if (document.getElementsByClassName("el-message").length == 0) {
  343. this.$message({
  344. showClose: true,
  345. message: "修改成功!",
  346. type: "success",
  347. });
  348. }
  349. this.addtraptf = false;
  350. this.getmaintainlist();
  351. } else {
  352. if (document.getElementsByClassName("el-message").length == 0) {
  353. this.$message({
  354. showClose: true,
  355. message: "修改失败" + res.data.message,
  356. type: "warning",
  357. });
  358. }
  359. }
  360. this.releaseTF = false
  361. });
  362. }
  363. } else {
  364. if (document.getElementsByClassName("el-message").length == 0) {
  365. this.$message({
  366. message: "请将信息填写完全",
  367. type: "warning",
  368. });
  369. }
  370. return false;
  371. }
  372. });
  373. },
  374. resetForm(formName) {
  375. this.addtraptf = false;
  376. this.$refs[formName].resetFields();
  377. for (var key in this.ruleForm) {
  378. this.ruleForm[key] = "";
  379. }
  380. },
  381. alter(data) {
  382. console.log(data);
  383. this.ruleForm.point_name = data.point_name;
  384. this.ruleForm.lng = data.lng;
  385. this.ruleForm.lat = data.lat;
  386. this.ruleForm.messages = data.messages;
  387. this.addtitle = "修改监测点";
  388. this.addtraptf = true;
  389. this.point_id = data.point_id;
  390. },
  391. deletemain(data) {
  392. var str = "您确定删除编号为<" + data.point_name + ">的监测点吗?";
  393. this.$confirm(str, "删除监测点", {
  394. confirmButtonText: "确定",
  395. cancelButtonText: "取消",
  396. closeOnClickModal: false,
  397. })
  398. .then(() => {
  399. this.$axios({
  400. method: "POST",
  401. url: "/api/api_gateway?method=monitor_manage.maintain.checkpoint_delete",
  402. data: this.qs.stringify({
  403. point_id: data.point_id,
  404. }),
  405. }).then((res) => {
  406. console.log(res);
  407. if (res.data.data) {
  408. if (document.getElementsByClassName("el-message").length == 0) {
  409. this.$message({
  410. showClose: true,
  411. message: "删除成功!",
  412. type: "success",
  413. });
  414. }
  415. this.getmaintainlist();
  416. } else {
  417. if (document.getElementsByClassName("el-message").length == 0) {
  418. this.$message({
  419. showClose: true,
  420. message: "删除失败," + res.data.message,
  421. type: "warning",
  422. });
  423. }
  424. }
  425. });
  426. })
  427. .catch(() => {
  428. if (document.getElementsByClassName("el-message").length == 0) {
  429. this.$message({
  430. type: "info",
  431. message: "已取消删除",
  432. });
  433. }
  434. });
  435. },
  436. init() {
  437. // console.log(document.getElementById("mapContainer2"));
  438. var map = new AMap.Map("mapContainer2", {
  439. center: this.center,
  440. resizeEnable: true,
  441. zoom: 10,
  442. lang: "en",
  443. });
  444. AMap.plugin(["AMap.ToolBar", "AMap.Geocoder"], () => {
  445. map.addControl(new AMap.ToolBar());
  446. this.geocoder = new AMap.Geocoder({
  447. city: "全国",
  448. radius: 1000,
  449. });
  450. });
  451. setTimeout(() => {
  452. var marker = new AMap.Marker({
  453. position: this.center,
  454. });
  455. console.log(this.center);
  456. marker.setMap(map);
  457. }, 1000);
  458. this.map = map;
  459. this.testevent();
  460. },
  461. addrChange() {
  462. //位置搜索
  463. var marker = new AMap.Marker();
  464. this.geocoder.getLocation(this.addr, (status, result) => {
  465. if (status === "complete" && result.geocodes.length) {
  466. var lnglat = result.geocodes[0].location;
  467. marker.setPosition(lnglat);
  468. this.map.add(marker);
  469. this.map.setFitView(marker);
  470. this.locationForm = {
  471. lat: lnglat.lat,
  472. lng: lnglat.lng,
  473. };
  474. } else {
  475. if (document.getElementsByClassName("el-message").length == 0) {
  476. this.$message.error("根据地址查询位置失败");
  477. }
  478. }
  479. });
  480. },
  481. // 地图点击事件
  482. testevent() {
  483. this.map.on("click", (ev) => {
  484. var lnglat = [ev.lnglat.lng, ev.lnglat.lat];
  485. this.locationForm = { lng: lnglat[0], lat: lnglat[1] };
  486. this.map.clearMap();
  487. var marker = new AMap.Marker({
  488. position: lnglat,
  489. });
  490. marker.setMap(this.map);
  491. this.getAddress(lnglat);
  492. setTimeout(() => {
  493. new AMap.InfoWindow({
  494. content: "<h5>" + "当前选中地址" + "</h5>" + this.address,
  495. offset: new AMap.Pixel(0, -32),
  496. }).open(this.map, lnglat);
  497. }, 100);
  498. });
  499. },
  500. getAddress(lnglat) {
  501. AMap.plugin("AMap.Geocoder", () => {
  502. this.geocoder.getAddress(lnglat, (status, result) => {
  503. if (status === "complete" && result.info === "OK") {
  504. this.address = result.regeocode.formattedAddress;
  505. }
  506. });
  507. });
  508. },
  509. addLocationSubm() {
  510. //点击确定
  511. this.ruleForm.lng = this.locationForm.lng;
  512. this.ruleForm.lat = this.locationForm.lat;
  513. this.addLocationDialogVisible = false;
  514. },
  515. addLocationDialogClosed() {
  516. //弹框关闭时
  517. // this.locationForm = { lat: "", lng: "" };
  518. this.center = [114.05, 22.55];
  519. this.map = null;
  520. },
  521. locationSearch() {
  522. if (this.locationForm.lat && this.locationForm.lng) {
  523. let lnglat = [this.locationForm.lng, this.locationForm.lat];
  524. var marker = new AMap.Marker({
  525. position: lnglat,
  526. });
  527. marker.setMap(this.map);
  528. } else {
  529. if (document.getElementsByClassName("el-message").length == 0) {
  530. this.$message.warning("请输入经纬度!");
  531. }
  532. // return fasle;
  533. }
  534. },
  535. dingwei(data) {
  536. if (this.ruleForm.lng != "" && this.ruleForm.lng != 0) {
  537. if (isNaN(this.ruleForm.lng)) {
  538. this.center[0] = this.ToDigital(this.ruleForm.lng);
  539. } else {
  540. this.center[0] = this.ruleForm.lng;
  541. }
  542. }
  543. if (this.ruleForm.lat != "" && this.ruleForm.lat != 0) {
  544. if (isNaN(this.ruleForm.lat)) {
  545. this.center[1] = this.ToDigital(this.ruleForm.lat);
  546. } else {
  547. this.center[1] = this.ruleForm.lat;
  548. }
  549. }
  550. console.log(this.center)
  551. this.addLocationDialogVisible = true;
  552. setTimeout(() => {
  553. // console.log(this.center);
  554. this.init();
  555. }, 500);
  556. },
  557. //度转度°分′秒″
  558. ToDegrees(val, type) {
  559. if (typeof val == "undefined" || val == "" || isNaN(val)) {
  560. return val;
  561. }
  562. val = val.toString()
  563. var A = "";
  564. if (type == "lng") {
  565. A = val > 0 ? "E" : "W";
  566. } else if (type == "lat") {
  567. A = val > 0 ? "N" : "S";
  568. }
  569. var i = val.indexOf(".");
  570. var strDu = i < 0 ? val : val.substring(0, i); //获取度
  571. var strFen = 0;
  572. var strMiao = 0;
  573. if (i > 0) {
  574. var strFen = "0" + val.substring(i);
  575. strFen = strFen * 60 + "";
  576. i = strFen.indexOf(".");
  577. if (i > 0) {
  578. strMiao = "0" + strFen.substring(i);
  579. strFen = strFen.substring(0, i); //获取分
  580. strMiao = strMiao * 60 + "";
  581. i = strMiao.indexOf(".");
  582. strMiao = strMiao.substring(0, i + 4); //取到小数点后面三位
  583. strMiao = parseFloat(strMiao).toFixed(2); //精确小数点后面两位
  584. }
  585. }
  586. console.log(strDu, strFen, strMiao);
  587. return strDu + "°" + strFen + "′" + strMiao + "″" + A;
  588. },
  589. //度°分′秒″转度
  590. ToDigital(lnglat) {
  591. if (!isNaN(lnglat)) {
  592. return lnglat;
  593. }
  594. console.log(lnglat);
  595. var strDu, strFen, strMiao;
  596. var duindex = lnglat.indexOf("°"); //字符度的下标
  597. var fenindex = lnglat.indexOf("′"); //字符分的下标
  598. var miaoindex = lnglat.indexOf("″"); //字符秒的下标
  599. strDu = lnglat.slice(0, duindex);
  600. strFen = lnglat.slice(duindex + 1, fenindex);
  601. strMiao = lnglat.slice(fenindex + 1, miaoindex);
  602. // len = len > 6 || typeof len == "undefined" ? 6 : len; //精确到小数点后最多六位
  603. strDu =
  604. typeof strDu == "undefined" || strDu == "" ? 0 : parseFloat(strDu);
  605. strFen =
  606. typeof strFen == "undefined" || strFen == ""
  607. ? 0
  608. : parseFloat(strFen) / 60;
  609. strMiao =
  610. typeof strMiao == "undefined" || strMiao == ""
  611. ? 0
  612. : parseFloat(strMiao) / 3600;
  613. var digital = strDu + strFen + strMiao;
  614. if (digital == 0) {
  615. return "";
  616. } else {
  617. return digital.toFixed(6);
  618. }
  619. },
  620. handle(ev) {
  621. this.downloadinput = ev.name;
  622. var datas = new FormData();
  623. datas.append("username", localStorage.getItem("username"));
  624. datas.append("file", ev.raw);
  625. this.$axios({
  626. method: "POST",
  627. url: "/api/monitor_point_export",
  628. data: datas,
  629. responseType: "blob",
  630. }).then((res) => {
  631. console.log(res);
  632. this.downloadFile(res, "allot_result.xls");
  633. });
  634. },
  635. download() {
  636. //下载模板
  637. console.log(22222)
  638. window.location.href =
  639. // this.$deriveData +
  640. "http://192.168.1.17:12345/api/monitor_point_export";
  641. },
  642. downloadFile(res, name) {
  643. let link = document.createElement("a");
  644. link.href = window.URL.createObjectURL(new Blob([res.data]));
  645. link.target = "_blank";
  646. //文件名和格式
  647. link.download = name;
  648. document.body.appendChild(link);
  649. link.click();
  650. document.body.removeChild(link);
  651. },
  652. },
  653. beforeCreate() {}, //生命周期 - 创建之前
  654. //生命周期 - 创建完成(可以访问当前this实例)
  655. created() {},
  656. beforeMount() {}, //生命周期 - 挂载之前
  657. //生命周期 - 挂载完成(可以访问DOM元素)
  658. mounted() {
  659. this.getmaintainlist();
  660. },
  661. beforeUpdate() {}, //生命周期 - 更新之前
  662. updated() {}, //生命周期 - 更新之后
  663. beforeDestroy() {}, //生命周期 - 销毁之前
  664. destroyed() {}, //生命周期 - 销毁完成
  665. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  666. };
  667. </script>
  668. <style lang="less" scoped>
  669. .maintainbox_search {
  670. display: flex;
  671. /deep/.el-input {
  672. width: 220px;
  673. margin-right: 15px;
  674. }
  675. }
  676. .addtrapbox {
  677. display: flex;
  678. }
  679. .buttonbox {
  680. margin-bottom: 23px;
  681. padding-left: 100px;
  682. }
  683. /deep/.el-button--info {
  684. background-color: #409eff;
  685. border-color: #409eff;
  686. }
  687. .downloadbox {
  688. .downloadbox_item {
  689. display: flex;
  690. .title {
  691. width: 100px;
  692. line-height: 28px;
  693. }
  694. .el-input {
  695. width: 250px;
  696. margin-left: 15px;
  697. }
  698. }
  699. .tishi {
  700. padding-left: 100px;
  701. margin-top: 15px;
  702. display: flex;
  703. justify-content: space-between;
  704. color: #409eff;
  705. span:last-child {
  706. cursor: pointer;
  707. }
  708. }
  709. }
  710. // 文本域样式更改
  711. /deep/.el-textarea__inner {
  712. font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
  713. }
  714. </style>