add-or-update.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  1. <template>
  2. <div class="addEdit-block">
  3. <el-form
  4. class="add-update-preview"
  5. ref="ruleForm"
  6. :model="ruleForm"
  7. :rules="rules"
  8. label-width="180px"
  9. >
  10. <template >
  11. <el-form-item class="date" v-if="type!='info'" label="日期" prop="recordDate" >
  12. <el-date-picker
  13. format="yyyy 年 MM 月 dd 日"
  14. value-format="yyyy-MM-dd"
  15. v-model="ruleForm.recordDate"
  16. type="date"
  17. :readonly="ro.recordDate"
  18. placeholder="日期"
  19. ></el-date-picker>
  20. </el-form-item>
  21. <el-form-item class="input" v-else-if="ruleForm.recordDate" label="日期" prop="date" >
  22. <el-input v-model="ruleForm.recordDate" placeholder="日期" readonly></el-input>
  23. </el-form-item>
  24. <el-form-item class="input" v-if="type!='info'" label="地区" prop="regionId" >
  25. <el-select
  26. style="width: 100%"
  27. v-model="ruleForm.regionId"
  28. placeholder="请选择县旗"
  29. :disabled="type == 'view'"
  30. >
  31. <el-option
  32. v-for="item in regionList"
  33. :key="item.value"
  34. :label="item.label"
  35. :value="item.value"
  36. />
  37. </el-select>
  38. <!-- <el-input v-model="ruleForm.region" placeholder="地区" clearable :readonly="ro.region"></el-input> -->
  39. </el-form-item>
  40. <el-form-item v-else class="input" label="地区" prop="region" >
  41. <el-input v-model="ruleForm.region" placeholder="地区" readonly></el-input>
  42. </el-form-item>
  43. <el-form-item class="input" v-if="type!='info'" label="变电站" prop="substation" >
  44. <el-input v-model="ruleForm.substation" placeholder="变电站" :disabled="ro.substation"></el-input>
  45. </el-form-item>
  46. <el-form-item v-else class="input" label="变电站" prop="substation" >
  47. <el-input v-model="ruleForm.substation" placeholder="变电站" readonly></el-input>
  48. </el-form-item>
  49. <el-form-item class="input" v-if="type!='info'" label="电压等级" prop="voltageLevel" >
  50. <el-input-number v-model="ruleForm.voltageLevel" placeholder="电压等级" :disabled="ro.voltageLevel"></el-input-number>
  51. </el-form-item>
  52. <el-form-item v-else class="input" label="电压等级" prop="voltageLevel" >
  53. <el-input v-model="ruleForm.voltageLevel" placeholder="电压等级" readonly></el-input>
  54. </el-form-item>
  55. <el-form-item class="input" v-if="type!='info'" label="主变台数" prop="mainNum" >
  56. <el-input-number v-model="ruleForm.mainNum" placeholder="主变台数" :disabled="ro.mainNum"></el-input-number>
  57. </el-form-item>
  58. <el-form-item v-else class="input" label="主变台数" prop="mainNum" >
  59. <el-input v-model="ruleForm.mainNum" placeholder="主变台数" readonly></el-input>
  60. </el-form-item>
  61. <el-form-item class="input" v-if="type!='info'" label="主变容量(MVA)" prop="capacity" >
  62. <el-input-number v-model="ruleForm.capacity" placeholder="主变容量(MVA)" :disabled="ro.capacity"></el-input-number>
  63. </el-form-item>
  64. <el-form-item v-else class="input" label="主变容量(MVA)" prop="capacity" >
  65. <el-input v-model="ruleForm.capacity" placeholder="主变容量(MVA)" readonly></el-input>
  66. </el-form-item>
  67. <el-form-item class="input" v-if="type!='info'" label="最大负荷(MW)" prop="peakLoad" >
  68. <el-input-number v-model="ruleForm.peakLoad" placeholder="最大负荷(MW)" clearable :readonly="ro.peakLoad"></el-input-number>
  69. </el-form-item>
  70. <el-form-item v-else class="input" label="最大负荷(MW)" prop="peakLoad" >
  71. <el-input v-model="ruleForm.peakLoad" placeholder="最大负荷(MW)" readonly></el-input>
  72. </el-form-item>
  73. <el-form-item class="input" v-if="type!='info'" label="负荷率负荷率(%)" prop="loadRate" >
  74. <el-input-number v-model="ruleForm.loadRate" placeholder="负荷率" :disabled="ro.loadRate"></el-input-number>
  75. </el-form-item>
  76. <el-form-item v-else class="input" label="负荷率(%)" prop="loadRate" >
  77. <el-input v-model="ruleForm.loadRate" placeholder="负荷率" readonly></el-input>
  78. </el-form-item>
  79. </template>
  80. <el-form-item class="btn">
  81. <el-button class="btn3" v-if="type!='info'" type="success" @click="onSubmit">
  82. <span class="icon iconfont icon-xihuan"></span>
  83. 提交
  84. </el-button>
  85. <el-button class="btn4" v-if="type!='info'" type="success" @click="back()">
  86. <span class="icon iconfont icon-xihuan"></span>
  87. 取消
  88. </el-button>
  89. <el-button class="btn5" v-if="type=='info'" type="success" @click="back()">
  90. <span class="icon iconfont icon-xihuan"></span>
  91. 返回
  92. </el-button>
  93. </el-form-item>
  94. </el-form>
  95. </div>
  96. </template>
  97. <script>
  98. import {
  99. isNumber,
  100. isIntNumer,
  101. } from "@/utils/validate";
  102. export default {
  103. data() {
  104. var validateNumber = (rule, value, callback) => {
  105. if(!value){
  106. callback();
  107. } else if (!isNumber(value)) {
  108. callback(new Error("请输入数字"));
  109. } else {
  110. callback();
  111. }
  112. };
  113. var validateIntNumber = (rule, value, callback) => {
  114. if(!value){
  115. callback();
  116. } else if (!isIntNumer(value)) {
  117. callback(new Error("请输入整数"));
  118. } else {
  119. callback();
  120. }
  121. };
  122. return {
  123. id: '',
  124. type: '',
  125. regionList: [],
  126. ro:{
  127. recordDate : false,
  128. region : false,
  129. substation : false,
  130. airpressure : false,
  131. voltageLevel : false,
  132. mainNum : false,
  133. capacity : false,
  134. peakLoad : false,
  135. loadRate : false,
  136. },
  137. ruleForm: {
  138. recordDate: '',
  139. region: '',
  140. substation: '',
  141. voltageLevel: '',
  142. mainNum: '',
  143. capacity: '',
  144. peakLoad: '',
  145. loadRate: '',
  146. },
  147. rules: {
  148. recordDate: [
  149. ],
  150. region: [
  151. ],
  152. substation: [
  153. ],
  154. voltageLevel: [
  155. { validator: validateNumber, trigger: 'blur' },
  156. ],
  157. mainNum: [
  158. { validator: validateNumber, trigger: 'blur' },
  159. ],
  160. capacity: [
  161. { validator: validateNumber, trigger: 'blur' },
  162. ],
  163. peakLoad: [
  164. { validator: validateNumber, trigger: 'blur' },
  165. ],
  166. loadRate: [
  167. ],
  168. latitude: [
  169. ],
  170. longitude: [
  171. ],
  172. altitude: [
  173. { validator: validateNumber, trigger: 'blur' },
  174. ],
  175. terraintype: [
  176. ],
  177. },
  178. };
  179. },
  180. props: ["parent"],
  181. computed: {
  182. },
  183. components: {
  184. },
  185. created() {
  186. this.getRegionList();
  187. },
  188. methods: {
  189. // 下载
  190. download(file){
  191. window.open(`${file}`)
  192. },
  193. // 获取公司列表
  194. async getRegionList() {
  195. this.regionList = [];
  196. const { data } = await this.$http({
  197. url: `/company/lists`,
  198. method: 'get',
  199. params: {
  200. cityId: this.ruleForm.cityId,
  201. },
  202. });
  203. if (data && data.code === 0) {
  204. this.regionList = data.data.map(item => ({
  205. label: item.compName,
  206. value: item.id,
  207. }));
  208. }
  209. },
  210. // 初始化
  211. init(id,type) {
  212. if (id) {
  213. this.id = id;
  214. this.type = type;
  215. }
  216. if(this.type=='info'||this.type=='else'||this.type=='msg'){
  217. this.info(id);
  218. }else if(this.type=='logistics'){
  219. for(let x in this.ro) {
  220. this.ro[x] = true
  221. }
  222. this.logistics=false;
  223. this.info(id);
  224. }else if(this.type=='cross'){
  225. var obj = this.$storage.getObj('crossObj');
  226. for (var o in obj){
  227. if(o=='recordDate'){
  228. this.ruleForm.recordDate = obj[o];
  229. this.ro.recordDate = true;
  230. continue;
  231. }
  232. if(o=='region'){
  233. this.ruleForm.region = obj[o];
  234. this.ro.region = true;
  235. continue;
  236. }
  237. if(o=='substation'){
  238. this.ruleForm.substation = obj[o];
  239. this.ro.substation = true;
  240. continue;
  241. }
  242. if(o=='voltageLevel'){
  243. this.ruleForm.voltageLevel = obj[o];
  244. this.ro.voltageLevel = true;
  245. continue;
  246. }
  247. if(o=='mainNum'){
  248. this.ruleForm.mainNum = obj[o];
  249. this.ro.mainNum = true;
  250. continue;
  251. }
  252. if(o=='capacity'){
  253. this.ruleForm.capacity = obj[o];
  254. this.ro.capacity = true;
  255. continue;
  256. }
  257. if(o=='peakLoad'){
  258. this.ruleForm.peakLoad = obj[o];
  259. this.ro.peakLoad = true;
  260. continue;
  261. }
  262. if(o=='loadRate'){
  263. this.ruleForm.loadRate = obj[o];
  264. this.ro.loadRate = true;
  265. continue;
  266. }
  267. }
  268. }
  269. // 获取用户信息
  270. this.$http({
  271. url: `${this.$storage.get('sessionTable')}/session`,
  272. method: "get"
  273. }).then(({ data }) => {
  274. if (data && data.code === 0) {
  275. var json = data.data;
  276. } else {
  277. this.$message.error(data.msg);
  278. }
  279. });
  280. },
  281. // 多级联动参数
  282. info(id) {
  283. this.$http({
  284. url: `voltageLoad/info/${id}`,
  285. method: "get"
  286. }).then(({ data }) => {
  287. if (data && data.code === 0) {
  288. this.ruleForm = data.data;
  289. //解决前台上传图片后台不显示的问题
  290. let reg=new RegExp('../../../upload','g')//g代表全部
  291. } else {
  292. this.$message.error(data.msg);
  293. }
  294. });
  295. },
  296. // 提交
  297. async onSubmit() {
  298. var objcross = this.$storage.getObj('crossObj');
  299. if(!this.ruleForm.id) {
  300. delete this.ruleForm.userid
  301. }
  302. await this.$refs["ruleForm"].validate(async valid => {
  303. if (valid) {
  304. if(this.type=='cross'){
  305. var statusColumnName = this.$storage.get('statusColumnName');
  306. var statusColumnValue = this.$storage.get('statusColumnValue');
  307. if(statusColumnName!='') {
  308. var obj = this.$storage.getObj('crossObj');
  309. if(statusColumnName && !statusColumnName.startsWith("[")) {
  310. for (var o in obj){
  311. if(o==statusColumnName){
  312. obj[o] = statusColumnValue;
  313. }
  314. }
  315. var table = this.$storage.get('crossTable');
  316. await this.$http({
  317. url: `${table}/update`,
  318. method: "post",
  319. data: obj
  320. }).then(({ data }) => {});
  321. }
  322. }
  323. }
  324. await this.$http({
  325. url: `voltageLoad/${!this.ruleForm.id ? "save" : "update"}`,
  326. method: "post",
  327. data: this.ruleForm
  328. }).then(async ({ data }) => {
  329. if (data && data.code === 0) {
  330. this.$message({
  331. message: "操作成功",
  332. type: "success",
  333. duration: 1500,
  334. onClose: () => {
  335. this.parent.showFlag = true;
  336. this.parent.addOrUpdateFlag = false;
  337. this.parent.rainfalldataCrossAddOrUpdateFlag = false;
  338. this.parent.search();
  339. this.parent.contentStyleChange();
  340. }
  341. });
  342. } else {
  343. this.$message.error(data.msg);
  344. }
  345. });
  346. }
  347. });
  348. },
  349. // 获取uuid
  350. getUUID () {
  351. return new Date().getTime();
  352. },
  353. // 返回
  354. back() {
  355. this.parent.showFlag = true;
  356. this.parent.addOrUpdateFlag = false;
  357. this.parent.rainfalldataCrossAddOrUpdateFlag = false;
  358. this.parent.contentStyleChange();
  359. },
  360. }
  361. };
  362. </script>
  363. <style lang="scss" scoped>
  364. .addEdit-block {
  365. padding: 30px;
  366. background: none;
  367. width: 100%;
  368. }
  369. .add-update-preview {
  370. border-radius: 10px;
  371. padding: 40px 25% 40px 18%;
  372. background: #ffffff;
  373. border-color: #eee;
  374. border-width: 1px;
  375. border-style: solid;
  376. }
  377. .amap-wrapper {
  378. width: 100%;
  379. height: 500px;
  380. }
  381. .search-box {
  382. position: absolute;
  383. }
  384. .el-date-editor.el-input {
  385. width: auto;
  386. }
  387. .add-update-preview ::v-deep .el-form-item {
  388. border: 0px solid #eee;
  389. padding: 0;
  390. margin: 0 0 22px 0;
  391. display: inline-block;
  392. width: 100%;
  393. }
  394. .add-update-preview .el-form-item ::v-deep .el-form-item__label {
  395. padding: 0 10px 0 0;
  396. color: #6e6e6e;
  397. font-weight: 500;
  398. width: 180px;
  399. font-size: 15px;
  400. line-height: 40px;
  401. text-align: right;
  402. }
  403. .add-update-preview .el-form-item ::v-deep .el-form-item__content {
  404. margin-left: 180px;
  405. }
  406. .add-update-preview .el-form-item span.text {
  407. padding: 0 10px;
  408. color: #333;
  409. background: none;
  410. font-weight: 500;
  411. display: inline-block;
  412. font-size: 15px;
  413. line-height: 40px;
  414. min-width: 50%;
  415. }
  416. .add-update-preview .el-input {
  417. width: 100%;
  418. }
  419. .add-update-preview .el-input ::v-deep .el-input__inner {
  420. border: 1px solid #E8E8E8;
  421. border-radius: 0px;
  422. padding: 0 12px;
  423. color: #666;
  424. background: #fff;
  425. width: 100%;
  426. font-size: 15px;
  427. min-width: 50%;
  428. height: 40px;
  429. }
  430. .add-update-preview .el-input ::v-deep .el-input__inner[readonly="readonly"] {
  431. border: 0px solid #ccc;
  432. cursor: not-allowed;
  433. border-radius: 0px;
  434. padding: 0 12px;
  435. color: #666;
  436. background: none;
  437. width: auto;
  438. font-size: 15px;
  439. height: 40px;
  440. }
  441. .add-update-preview .el-input-number {
  442. text-align: left;
  443. width: 100%;
  444. }
  445. .add-update-preview .el-input-number ::v-deep .el-input__inner {
  446. text-align: left;
  447. border: 1px solid #E8E8E8;
  448. border-radius: 0px;
  449. padding: 0 12px;
  450. color: #666;
  451. background: #fff;
  452. width: 100%;
  453. font-size: 15px;
  454. min-width: 50%;
  455. height: 40px;
  456. }
  457. .add-update-preview .el-input-number ::v-deep .is-disabled .el-input__inner {
  458. text-align: left;
  459. border: 0px solid #ccc;
  460. cursor: not-allowed;
  461. border-radius: 0px;
  462. padding: 0 12px;
  463. color: #666;
  464. background: none;
  465. width: auto;
  466. font-size: 15px;
  467. height: 40px;
  468. }
  469. .add-update-preview .el-input-number ::v-deep .el-input-number__decrease {
  470. display: none;
  471. }
  472. .add-update-preview .el-input-number ::v-deep .el-input-number__increase {
  473. display: none;
  474. }
  475. .add-update-preview .el-select {
  476. width: 100%;
  477. }
  478. .add-update-preview .el-select ::v-deep .el-input__inner {
  479. border: 1px solid #E8E8E8;
  480. border-radius: 0px;
  481. padding: 0 10px;
  482. color: #666;
  483. background: #fff;
  484. width: 100%;
  485. font-size: 15px;
  486. height: 40px;
  487. }
  488. .add-update-preview .el-select ::v-deep .is-disabled .el-input__inner {
  489. border: 0;
  490. cursor: not-allowed;
  491. border-radius: 4px;
  492. padding: 0 10px;
  493. color: #666;
  494. background: none;
  495. width: auto;
  496. font-size: 15px;
  497. height: 34px;
  498. }
  499. .add-update-preview .el-date-editor {
  500. width: 100%;
  501. }
  502. .add-update-preview .el-date-editor ::v-deep .el-input__inner {
  503. border: 1px solid #E8E8E8;
  504. border-radius: 0px;
  505. padding: 0 10px 0 30px;
  506. color: #666;
  507. background: #fff;
  508. width: 100%;
  509. font-size: 15px;
  510. height: 40px;
  511. }
  512. .add-update-preview .el-date-editor ::v-deep .el-input__inner[readonly="readonly"] {
  513. border: 0;
  514. cursor: not-allowed;
  515. border-radius: 0px;
  516. padding: 0 10px 0 30px;
  517. color: #666;
  518. background: none;
  519. width: auto;
  520. font-size: 15px;
  521. height: 40px;
  522. }
  523. .add-update-preview .viewBtn {
  524. border: 1px solid #E8E8E8;
  525. cursor: pointer;
  526. border-radius: 0px;
  527. padding: 0 15px;
  528. margin: 0 20px 0 0;
  529. color: #666;
  530. background: #fff;
  531. width: auto;
  532. font-size: 15px;
  533. line-height: 34px;
  534. height: 34px;
  535. .iconfont {
  536. margin: 0 2px;
  537. color: #666;
  538. font-size: 16px;
  539. height: 34px;
  540. }
  541. }
  542. .add-update-preview .viewBtn:hover {
  543. opacity: 0.8;
  544. }
  545. .add-update-preview .downBtn {
  546. border: 1px solid #E8E8E8;
  547. cursor: pointer;
  548. border-radius: 0px;
  549. padding: 0 15px;
  550. margin: 0 20px 0 0;
  551. color: #666;
  552. background: #fff;
  553. width: auto;
  554. font-size: 15px;
  555. line-height: 34px;
  556. height: 34px;
  557. .iconfont {
  558. margin: 0 2px;
  559. color: #666;
  560. font-size: 16px;
  561. height: 34px;
  562. }
  563. }
  564. .add-update-preview .downBtn:hover {
  565. opacity: 0.8;
  566. }
  567. .add-update-preview .unBtn {
  568. border: 0;
  569. cursor: not-allowed;
  570. border-radius: 4px;
  571. padding: 0 0px;
  572. margin: 0 20px 0 0;
  573. outline: none;
  574. color: #999;
  575. background: none;
  576. width: auto;
  577. font-size: 15px;
  578. line-height: 40px;
  579. height: 40px;
  580. .iconfont {
  581. margin: 0 2px;
  582. color: #fff;
  583. display: none;
  584. font-size: 14px;
  585. height: 34px;
  586. }
  587. }
  588. .add-update-preview .unBtn:hover {
  589. opacity: 0.8;
  590. }
  591. .add-update-preview ::v-deep .el-upload--picture-card {
  592. background: transparent;
  593. border: 0;
  594. border-radius: 0;
  595. width: auto;
  596. height: auto;
  597. line-height: initial;
  598. vertical-align: middle;
  599. }
  600. .add-update-preview ::v-deep .upload .upload-img {
  601. border: 1px solid #E8E8E8;
  602. cursor: pointer;
  603. border-radius: 0px;
  604. color: #666;
  605. background: #fff;
  606. width: 90px;
  607. font-size: 24px;
  608. line-height: 60px;
  609. text-align: center;
  610. height: 60px;
  611. }
  612. .add-update-preview ::v-deep .el-upload-list .el-upload-list__item {
  613. border: 1px solid #E8E8E8;
  614. cursor: pointer;
  615. border-radius: 0px;
  616. color: #666;
  617. background: #fff;
  618. width: 90px;
  619. font-size: 24px;
  620. line-height: 60px;
  621. text-align: center;
  622. height: 60px;
  623. }
  624. .add-update-preview ::v-deep .el-upload .el-icon-plus {
  625. border: 1px solid #E8E8E8;
  626. cursor: pointer;
  627. border-radius: 0px;
  628. color: #666;
  629. background: #fff;
  630. width: 90px;
  631. font-size: 24px;
  632. line-height: 60px;
  633. text-align: center;
  634. height: 60px;
  635. }
  636. .add-update-preview ::v-deep .el-upload__tip {
  637. color: #666;
  638. font-size: 15px;
  639. }
  640. .add-update-preview .el-textarea ::v-deep .el-textarea__inner {
  641. border: 1px solid #E8E8E8;
  642. border-radius: 0px;
  643. padding: 12px;
  644. color: #666;
  645. background: #fff;
  646. width: 100%;
  647. font-size: 15px;
  648. min-height: 150px;
  649. height: auto;
  650. }
  651. .add-update-preview .el-textarea ::v-deep .el-textarea__inner[readonly="readonly"] {
  652. border: 0;
  653. cursor: not-allowed;
  654. border-radius: 0px;
  655. padding: 12px;
  656. color: #666;
  657. background: none;
  658. width: auto;
  659. font-size: 15px;
  660. min-width: 400px;
  661. height: auto;
  662. }
  663. .add-update-preview .el-form-item.btn {
  664. padding: 0;
  665. margin: 20px 0 0;
  666. .btn1 {
  667. border: 0px solid #ccc;
  668. cursor: pointer;
  669. border-radius: 6px;
  670. padding: 0 10px;
  671. margin: 0 10px 0 0;
  672. color: #fff;
  673. background: #0356bb;
  674. width: auto;
  675. font-size: 16px;
  676. min-width: 110px;
  677. height: 40px;
  678. .iconfont {
  679. margin: 0 2px;
  680. color: #fff;
  681. display: none;
  682. font-size: 14px;
  683. height: 40px;
  684. }
  685. }
  686. .btn1:hover {
  687. opacity: 0.8;
  688. }
  689. .btn2 {
  690. border: 0px solid #ccc;
  691. cursor: pointer;
  692. border-radius: 6px;
  693. padding: 0 10px;
  694. margin: 0 10px 0 0;
  695. color: #fff;
  696. background: #39c9ee;
  697. width: auto;
  698. font-size: 16px;
  699. min-width: 110px;
  700. height: 40px;
  701. .iconfont {
  702. margin: 0 2px;
  703. color: #fff;
  704. display: none;
  705. font-size: 14px;
  706. height: 34px;
  707. }
  708. }
  709. .btn2:hover {
  710. opacity: 0.8;
  711. }
  712. .btn3 {
  713. border: 0px solid #ccc;
  714. cursor: pointer;
  715. border-radius: 6px;
  716. padding: 0 10px;
  717. margin: 0 10px 0 0;
  718. color: #fff;
  719. background: #6ea0dc;
  720. width: auto;
  721. font-size: 16px;
  722. min-width: 110px;
  723. height: 40px;
  724. .iconfont {
  725. margin: 0 2px;
  726. color: #fff;
  727. display: none;
  728. font-size: 14px;
  729. height: 40px;
  730. }
  731. }
  732. .btn3:hover {
  733. opacity: 0.8;
  734. }
  735. .btn4 {
  736. border: 0px solid #ccc;
  737. cursor: pointer;
  738. border-radius: 6px;
  739. padding: 0 10px;
  740. margin: 0 10px 0 0;
  741. color: #fff;
  742. background: #4abcff;
  743. width: auto;
  744. font-size: 16px;
  745. min-width: 110px;
  746. height: 40px;
  747. .iconfont {
  748. margin: 0 2px;
  749. color: #fff;
  750. display: none;
  751. font-size: 14px;
  752. height: 40px;
  753. }
  754. }
  755. .btn4:hover {
  756. opacity: 0.8;
  757. }
  758. .btn5 {
  759. border: 0px solid #ccc;
  760. cursor: pointer;
  761. border-radius: 6px;
  762. padding: 0 10px;
  763. margin: 0 10px 0 0;
  764. color: #fff;
  765. background: #0977fd;
  766. width: auto;
  767. font-size: 16px;
  768. min-width: 110px;
  769. height: 40px;
  770. .iconfont {
  771. margin: 0 2px;
  772. color: #fff;
  773. display: none;
  774. font-size: 14px;
  775. height: 40px;
  776. }
  777. }
  778. .btn5:hover {
  779. opacity: 0.8;
  780. }
  781. }
  782. </style>