draught.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  1. <template>
  2. <div class="global-variable">
  3. <div class="condition">
  4. <el-form :inline="true" :model="formInline" class="demo-form-inline">
  5. <el-form-item label="风机名称:">
  6. <el-input v-model="formInline.engineName" placeholder="请输入风机名称" size="small"></el-input>
  7. </el-form-item>
  8. <el-form-item label="选择日期:" size="small">
  9. <el-date-picker v-model="formInline.timeQuantum" type="daterange" range-separator="至" start-placeholder="开始日期"
  10. end-placeholder="结束日期" @change="onDateChange">
  11. </el-date-picker>
  12. </el-form-item>
  13. <el-form-item>
  14. <el-button type="primary" @click="onSubmit" size="small">查询</el-button>
  15. <el-button @click="reset" size="small">重置</el-button>
  16. </el-form-item>
  17. </el-form>
  18. </div>
  19. <div class="list-page">
  20. <div class="newly">
  21. <el-button @click="upfile" size="small">导入</el-button>
  22. <el-button type="primary" @click="newnuedialog" size="small">新增</el-button>
  23. </div>
  24. <el-table class="center-align-table" :data="tableData" border :cell-style="rowStyle">
  25. <el-table-column align="center" fixed prop="engineCode" label="系统编号">
  26. <template slot-scope="scope">
  27. <el-button @click="particulars(scope.row)" type="text" size="small">{{ scope.row.engineCode }}</el-button>
  28. </template>
  29. </el-table-column>
  30. <el-table-column prop="engineName" align="center" label="风机名称">
  31. </el-table-column>
  32. <el-table-column prop="fieldName" align="center" label="关联风场">
  33. </el-table-column>
  34. <el-table-column prop="longitude" align="center" label="经度" width="100">
  35. </el-table-column>
  36. <el-table-column prop="latitude" align="center" label="纬度" width="100">
  37. </el-table-column>
  38. <el-table-column prop="elevationHeight" align="center" label="海拔高度/米" width="100">
  39. </el-table-column>
  40. <el-table-column prop="sightcing" align="center" label="是否标杆" width="100">
  41. <template slot-scope="{ row }">
  42. {{ row.sightcing == 1 ? '是' : '否' }}
  43. </template>
  44. </el-table-column>
  45. <el-table-column prop="state" align="center" label="状态" width="100">
  46. <template slot-scope="{ row }">
  47. {{ row.state == 1 ? '启用' : '停用' }}
  48. </template>
  49. </el-table-column>
  50. <el-table-column prop="createTime" align="center" label="创建时间">
  51. </el-table-column>
  52. <el-table-column prop="transition" align="center" fixed="right" label="操作" width="200">
  53. <template slot-scope="scope">
  54. <el-button @click="compile(scope.row)" type="text" size="small">编辑</el-button>
  55. <el-button v-if="scope.row.state == 0" @click="start(scope.row, 1)" type="text" size="small">启用</el-button>
  56. <el-button v-else style="color: #666" @click="start(scope.row, 0)" type="text" size="small">停用</el-button>
  57. <el-button style="color: #f00" @click="deleted(scope.row)" type="text" size="small">删除</el-button>
  58. </template>
  59. </el-table-column>
  60. </el-table>
  61. <div class="pagination-container">
  62. <el-pagination @current-change="handleCurrentChange" :current-page.sync="formInline.pageNum"
  63. layout="total, prev, pager, next" :page-size="formInline.pageSize" :total="formInline.totalSize">
  64. </el-pagination>
  65. </div>
  66. </div>
  67. <!-- 弹出层 -->
  68. <!-- 导入 -->
  69. <el-dialog title="导入文件" :visible.sync="tolead" width="400px">
  70. <el-alert title="请点击模板下载文件附件" type="success" :closable="false">
  71. </el-alert>
  72. <p class="model-center" @click="download">模板下载</p>
  73. <div class="UPcondition">
  74. <p>所属风场:</p>
  75. <el-select v-model="subordinate" placeholder="请选择" value-key="fieldCode">
  76. <el-option v-for="item in subordinatedata" :key="item.fieldCode" :label="item.fieldName"
  77. :value="item.fieldCode">
  78. </el-option>
  79. </el-select>
  80. </div>
  81. <el-upload class="upload-demo" :file-list="fileList" drag action :multiple="false" :before-upload="beforeUpload"
  82. :limit="1" :auto-upload="false" :on-change="handleOnChange" accept=".xlsx">
  83. <i class="el-icon-upload"></i>
  84. <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
  85. <div class="el-upload__tip" slot="tip">
  86. 只能上传xlsx文件,且不超过5MB
  87. </div>
  88. </el-upload>
  89. <span slot="footer" class="dialog-footer">
  90. <el-button @click="tolead = false" size="small">取 消</el-button>
  91. <el-button type="primary" @click="UPsubmit" size="small">提交</el-button>
  92. </span>
  93. </el-dialog>
  94. <!-- 新增 -->
  95. <el-dialog :title="title" :visible.sync="nuedialog" width="1000px">
  96. <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
  97. <div class="form-row">
  98. <el-form-item label="风机名称:" prop="engineName">
  99. <el-input v-model="ruleForm.engineName" size="small"></el-input>
  100. </el-form-item>
  101. <el-form-item label="关联风场:" prop="fieldCode">
  102. <el-select v-model="ruleForm.fieldCode" filterable placeholder="请选择" size="small">
  103. <el-option v-for="item in fieldCodeOptions" :key="item.fieldCode" :label="item.fieldName"
  104. :value="item.fieldCode">
  105. </el-option>
  106. </el-select>
  107. </el-form-item>
  108. </div>
  109. <div class="form-row">
  110. <el-form-item label="机型编号:" prop="millTypeCode">
  111. <el-select v-model="ruleForm.millTypeCode" placeholder="请选择" size="small">
  112. <el-option v-for="item in millTypeCodeOptions" :key="item.millTypeCode" :label="item.machineTypeCode"
  113. :value="item.millTypeCode">
  114. </el-option>
  115. </el-select>
  116. </el-form-item>
  117. <el-form-item label="额定容量:" prop="ratedCapacity">
  118. <el-input v-model="ruleForm.ratedCapacity" size="small"></el-input>
  119. </el-form-item>
  120. </div>
  121. <div class="form-row">
  122. <el-form-item label="海拔高度:" prop="elevationHeight">
  123. <el-input v-model="ruleForm.elevationHeight" size="small"></el-input>
  124. </el-form-item>
  125. <el-form-item label="经度:" prop="longitude">
  126. <el-input v-model="ruleForm.longitude" size="small"></el-input>
  127. </el-form-item>
  128. </div>
  129. <div class="form-row">
  130. <el-form-item label="纬度:" prop="latitude">
  131. <el-input v-model="ruleForm.latitude" size="small"></el-input>
  132. </el-form-item>
  133. <el-form-item label="轮廓高度:" prop="hubHeight">
  134. <el-input v-model="ruleForm.hubHeight" size="small"></el-input>
  135. </el-form-item>
  136. </div>
  137. <div class="form-row">
  138. <el-form-item label="是否标杆:" prop="sightcing">
  139. <el-select v-model="ruleForm.sightcing" placeholder="请选择" size="small">
  140. <el-option v-for="item in sightcingOptions" :key="item.value" :label="item.label" :value="item.value">
  141. </el-option>
  142. </el-select>
  143. </el-form-item>
  144. <el-form-item label="额定风速:" prop="rated_wind_speed">
  145. <el-input v-model="ruleForm.rated_wind_speed" size="small"></el-input>
  146. </el-form-item>
  147. </div>
  148. <div class="form-row">
  149. <el-form-item label="切入风速:" prop="ratedCutInWindspeed">
  150. <el-input v-model="ruleForm.ratedCutInWindspeed" size="small"></el-input>
  151. </el-form-item>
  152. <el-form-item label="切出风速:" prop="ratedCutOutWindspeed">
  153. <el-input v-model="ruleForm.ratedCutOutWindspeed" size="small"></el-input>
  154. </el-form-item>
  155. </div>
  156. </el-form>
  157. <div class="form-buttons">
  158. <el-button type="primary" @click="submitForm('ruleForm')">确定</el-button>
  159. <el-button @click="resetForm('ruleForm')">取消</el-button>
  160. </div>
  161. </el-dialog>
  162. <!-- 风机详情 -->
  163. <el-dialog title="风机详情" :visible.sync="unusualdialog" width="800px">
  164. <div class="general">
  165. <div class="condition">
  166. <p>关联风场:</p>
  167. <span>{{ particularsdata.fieldCode }}</span>
  168. </div>
  169. <div class="condition">
  170. <p>风机名称:</p>
  171. <span>{{ particularsdata.engineCode }}</span>
  172. </div>
  173. <div class="condition">
  174. <p>风机名称:</p>
  175. <span>{{ particularsdata.engineName }}</span>
  176. </div>
  177. <div class="condition">
  178. <p>机型编号:</p>
  179. <span>{{ particularsdata.millTypeCode }}</span>
  180. </div>
  181. <div class="condition">
  182. <p>额定容量:</p>
  183. <span>{{ particularsdata.ratedCapacity }}</span> <span>(MW)</span>
  184. </div>
  185. <div class="condition">
  186. <p>海拔高度:</p>
  187. <span>{{ particularsdata.elevationHeight }}</span> <span>(米)</span>
  188. </div>
  189. <div class="condition">
  190. <p>经度:</p>
  191. <span>{{ particularsdata.longitude }}</span>
  192. </div>
  193. <div class="condition">
  194. <p>纬度:</p>
  195. <span>{{ particularsdata.latitude }}</span>
  196. </div>
  197. <div class="condition">
  198. <p>额定风速:</p>
  199. <span>{{ particularsdata.rated_wind_speed }}</span><span>(m/s)</span>
  200. </div>
  201. <div class="condition">
  202. <p>切入风速:</p>
  203. <span>{{ particularsdata.ratedCutInWindspeed }}</span><span>(m/s)</span>
  204. </div>
  205. <div class="condition">
  206. <p>切出风速:</p>
  207. <span>{{ particularsdata.ratedCutOutWindspeed }}</span><span>(m/s)</span>
  208. </div>
  209. <div class="condition">
  210. <p>轮廓高度:</p>
  211. <span>{{ particularsdata.hubHeight }}</span> <span>(米)</span>
  212. </div>
  213. <div class="condition">
  214. <p>是否标杆:</p>
  215. <span>{{ particularsdata.sightcing == 1 ? '是' : '否' }}</span>
  216. </div>
  217. <div class="condition">
  218. <p>状态:</p>
  219. <span>{{ particularsdata.state == 1 ? '启用' : '停用' }}</span>
  220. </div>
  221. </div>
  222. </el-dialog>
  223. </div>
  224. </template>
  225. <script>
  226. import {
  227. createWindEngineGroup,
  228. delWindEngineGroup,
  229. getWindEngineGroup,
  230. getWindEngineMillList,
  231. getWindFieldNames,
  232. updateStateWindEngineGroup,
  233. updateWindEngineGroup,
  234. windEngineGrouPage,
  235. getAllTemplate,
  236. windEngineGroupImportData
  237. } from '@/api/ledger.js'
  238. export default {
  239. data() {
  240. return {
  241. formInline: {
  242. fieldCode: '',
  243. timeQuantum: [],
  244. pageNum: 1,
  245. pageSize: 10,
  246. totalSize: 0
  247. },
  248. startDate: '',
  249. endDate: '',
  250. tableData: [],
  251. particularsdata: [],
  252. ruleForm: {
  253. fieldCode: '',
  254. engineName: '',
  255. airdensity: '',
  256. millTypeCode: '',
  257. ratedCapacity: '',
  258. elevationHeight: '',
  259. longitude: '',
  260. latitude: '',
  261. hubHeight: '',
  262. sightcing: '',
  263. rated_wind_speed: '',
  264. ratedCutInWindspeed: '',
  265. ratedCutOutWindspeed: ''
  266. },
  267. fieldCodeOptions: [],
  268. millTypeCodeOptions: [],
  269. sightcingOptions: [
  270. {
  271. value: 1,
  272. label: '是'
  273. },
  274. {
  275. value: 2,
  276. label: '否'
  277. }
  278. ],
  279. rules: {
  280. fieldCode: [
  281. { required: true, message: '请选择关联风场', trigger: 'change' }
  282. ],
  283. engineName: [
  284. { required: true, message: '请输入风机名称', trigger: 'blur' }
  285. ],
  286. millTypeCode: [
  287. { required: true, message: '请输入机型编号', trigger: 'blur' }
  288. ],
  289. ratedCapacity: [
  290. { required: true, message: '请输入额定容量', trigger: 'blur' },
  291. { validator: this.validateNumber, trigger: 'blur' }
  292. ],
  293. elevationHeight: [
  294. { required: true, message: '请输入海拔高度', trigger: 'blur' },
  295. { validator: this.validateNumber, trigger: 'blur' }
  296. ],
  297. longitude: [
  298. { required: true, message: '请输入经度', trigger: 'blur' },
  299. { validator: this.validateNumber, trigger: 'blur' }
  300. ],
  301. latitude: [
  302. { required: true, message: '请输入纬度', trigger: 'blur' },
  303. { validator: this.validateNumber, trigger: 'blur' }
  304. ],
  305. hubHeight: [
  306. { required: true, message: '请输入轮廓高度', trigger: 'blur' },
  307. { validator: this.validateNumber, trigger: 'blur' }
  308. ],
  309. sightcing: [
  310. { required: true, message: '请选择是否标杆', trigger: 'change' }
  311. ]
  312. },
  313. subordinatedata: [],
  314. subordinate: "",
  315. AllTemplateurl: "",
  316. // 新增信息
  317. engineName: '',
  318. airdensity: '',
  319. fieldCode: '',
  320. millTypeCode: '',
  321. sheng: '',
  322. shengOptions: [],
  323. shi: '',
  324. shiOptions: [],
  325. elevationHeight: '',
  326. latitude: '',
  327. sightcing: '',
  328. fileList: [
  329. ],
  330. globalFileList: [],
  331. nuedialog: false,
  332. unusualdialog: false,
  333. tolead: false,
  334. isEdit: false,
  335. title: ''
  336. }
  337. },
  338. created() {
  339. this.onSubmit()
  340. this.windsite()
  341. this.relevancy()
  342. this.getAllTemplate()
  343. },
  344. methods: {
  345. rowStyle() {
  346. return 'text-align:center'
  347. },
  348. onDateChange(date) {
  349. if (Array.isArray(date)) {
  350. this.startDate = this.$formatDate(date[0])
  351. this.endDate = this.$formatDate(date[1])
  352. if (this.endDate < this.startDate) {
  353. this.endDate = this.startDate
  354. }
  355. } else {
  356. this.startDate = null
  357. this.endDate = null
  358. }
  359. },
  360. //获取模板
  361. getAllTemplate() {
  362. getAllTemplate().then((res) => {
  363. this.AllTemplateurl = res.data.draught
  364. })
  365. },
  366. // 下载模板
  367. download() {
  368. if (this.AllTemplateurl) {
  369. const link = document.createElement('a')
  370. link.href = this.AllTemplateurl
  371. link.download = '' // 可以设置默认下载文件名
  372. link.target = '_blank' // 新窗口打开
  373. document.body.appendChild(link)
  374. link.click()
  375. document.body.removeChild(link)
  376. } else {
  377. console.error('URL is not set')
  378. }
  379. },
  380. // 数字验证
  381. validateNumber(rule, value, callback) {
  382. const numberRegex = /^\d{1,4}(\.\d{1,2})?$/ // 匹配不超过四位数且小数点后不超过二位数的数字
  383. if (!value) {
  384. callback(new Error('该项不能为空'))
  385. } else if (!numberRegex.test(value)) {
  386. callback(
  387. new Error('该项必须为不超过四位数且小数点后不超过三位数的数字')
  388. )
  389. } else {
  390. callback()
  391. }
  392. },
  393. // 查询
  394. onSubmit() {
  395. let paramsData = {
  396. engineName: this.formInline.engineName || undefined,
  397. beginTime: this.startDate || undefined,
  398. endTime: this.endDate || undefined,
  399. pageNum: 1,
  400. pageSize: 10
  401. }
  402. windEngineGrouPage(paramsData).then((res) => {
  403. this.tableData = res.data.list
  404. this.formInline.totalSize = res.data.totalSize
  405. })
  406. },
  407. // 停用
  408. start(row, type) {
  409. let objectval = {
  410. engineCode: row.engineCode,
  411. state: type === 0 ? 0 : 1
  412. }
  413. updateStateWindEngineGroup(objectval).then((res) => {
  414. this.$message({
  415. message: '状态已更新成功',
  416. type: 'success'
  417. })
  418. // this.$message(`${type === 1 ? '状态已更新成功' : '状态已更新成功'}`);
  419. row.state = type === 1 ? 0 : 1
  420. this.onSubmit()
  421. })
  422. },
  423. //详情
  424. particulars(row) {
  425. this.unusualdialog = true
  426. getWindEngineGroup({ engineCode: row.engineCode }).then((res) => {
  427. this.particularsdata = res.data
  428. })
  429. },
  430. // 确认
  431. submitForm(formName) {
  432. this.$refs[formName].validate((valid) => {
  433. const objData = {
  434. fieldCode: this.ruleForm.fieldCode,
  435. engineName: this.ruleForm.engineName,
  436. // airdensity: this.ruleForm.airdensity,
  437. millTypeCode: this.ruleForm.millTypeCode,
  438. ratedCapacity: this.ruleForm.ratedCapacity,
  439. elevationHeight: this.ruleForm.elevationHeight,
  440. longitude: this.ruleForm.longitude,
  441. latitude: this.ruleForm.latitude,
  442. hubHeight: this.ruleForm.hubHeight,
  443. sightcing: this.ruleForm.sightcing,
  444. rated_wind_speed: this.ruleForm.rated_wind_speed,
  445. ratedCutInWindspeed: this.ruleForm.ratedCutInWindspeed,
  446. ratedCutOutWindspeed: this.ruleForm.ratedCutOutWindspeed
  447. }
  448. // fieldCode
  449. if (valid) {
  450. const API = this.isEdit
  451. ? updateWindEngineGroup(objData)
  452. : createWindEngineGroup(objData)
  453. API.then((res) => {
  454. this.nuedialog = false
  455. this.onSubmit()
  456. })
  457. } else {
  458. console.log('表单验证失败')
  459. return false
  460. }
  461. })
  462. },
  463. // 取消
  464. resetForm(formName) {
  465. this.$refs[formName].resetFields()
  466. this.nuedialog = false
  467. },
  468. // 获取风场
  469. windsite() {
  470. debugger
  471. getWindFieldNames().then((res) => {
  472. this.fieldCodeOptions = res.data
  473. this.subordinatedata = res.data
  474. })
  475. },
  476. // 获取机型
  477. async relevancy() {
  478. try {
  479. const res = await getWindEngineMillList()
  480. this.millTypeCodeOptions = res.data
  481. } catch (error) {
  482. console.error('Error fetching wind engine mill list:', error)
  483. }
  484. },
  485. //分页数据切换
  486. handleCurrentChange(val) {
  487. this.formInline.pageNum = val
  488. this.onSubmit()
  489. },
  490. // 重置
  491. reset() { },
  492. //导入提交
  493. UPsubmit() {
  494. console.log(this.globalFileList)
  495. let filedata = {
  496. fieldCode: this.subordinate,
  497. file: this.globalFileList
  498. }
  499. windEngineGroupImportData(filedata).then((res) => {
  500. console.log(res)
  501. this.uploadingPOP = false
  502. this.$message.success('上传成功')
  503. })
  504. console.log(filedata);
  505. // this.tolead = false
  506. },
  507. // 新增
  508. newly() {
  509. this.nuedialog = false
  510. },
  511. // 编辑
  512. compile(row) {
  513. getWindEngineGroup({ engineCode: row.engineCode }).then((res) => {
  514. const item = JSON.parse(JSON.stringify(res.data))
  515. this.detail = item
  516. Object.keys(this.ruleForm).forEach((key) => {
  517. this.ruleForm[key] = item[key]
  518. })
  519. })
  520. this.nuedialog = true
  521. this.title = '编辑'
  522. this.isEdit = true
  523. },
  524. // 删除
  525. deleted(row) {
  526. console.log(row, 'row')
  527. if (row.state == '1') {
  528. this.$message({
  529. type: 'error',
  530. message: '该项处于启用状态,无法删除!'
  531. })
  532. return
  533. }
  534. this.$confirm('此操作将永久删除该文件,是否继续?', '提示', {
  535. confirmButtonText: '确定',
  536. cancelButtonText: '取消',
  537. type: 'warning'
  538. })
  539. .then(() => {
  540. delWindEngineGroup({ engineCode: row.engineCode }).then((res) => {
  541. this.onSubmit()
  542. // 执行删除操作
  543. this.$message({
  544. type: 'success',
  545. message: '删除成功!'
  546. })
  547. })
  548. })
  549. .catch(() => {
  550. // 取消删除
  551. this.$message({
  552. type: 'info',
  553. message: '已取消删除'
  554. })
  555. })
  556. },
  557. // 导入
  558. upfile() {
  559. this.tolead = true
  560. },
  561. // 新增
  562. newnuedialog() {
  563. this.nuedialog = true
  564. this.title = '新增'
  565. },
  566. // 附件验证
  567. beforeUpload(fileList) {
  568. const isXLSX =
  569. fileList.type ===
  570. 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  571. if (!isXLSX) {
  572. this.$message.error('只能上传xlsx文件')
  573. }
  574. const isLt5MB = fileList.size / 1024 / 1024 < 5
  575. if (!isLt5MB) {
  576. this.$message.error('文件大小不能超过5MB')
  577. }
  578. console.log(fileList, 'fileList')
  579. return isXLSX && isLt5MB
  580. },
  581. handleOnChange(fileList) {
  582. console.log(fileList)
  583. this.globalFileList = fileList.raw
  584. }
  585. }
  586. }
  587. </script>
  588. <style lang="scss" scoped>
  589. .general {
  590. display: flex;
  591. flex-wrap: wrap;
  592. .condition {
  593. width: 50%;
  594. display: flex;
  595. p {
  596. width: 100px;
  597. text-align: right;
  598. line-height: 40px;
  599. margin-right: 10px;
  600. }
  601. span {
  602. line-height: 40px;
  603. }
  604. .el-select {
  605. width: 260px;
  606. }
  607. .el-input {
  608. width: 260px;
  609. }
  610. }
  611. }
  612. .UPcondition {
  613. display: flex;
  614. margin-bottom: 10px;
  615. p {
  616. width: 74px;
  617. text-align: right;
  618. line-height: 40px;
  619. }
  620. .el-select {
  621. width: 260px;
  622. }
  623. .el-input {
  624. width: 260px;
  625. }
  626. }
  627. .attachment {
  628. display: flex;
  629. padding-top: 10px;
  630. p {
  631. margin-right: 20px;
  632. color: #409eff;
  633. }
  634. }
  635. .model-center {
  636. color: #666;
  637. line-height: 40px;
  638. height: 40px;
  639. font-size: 14px;
  640. }
  641. .demo-ruleForm {
  642. .el-select {
  643. width: 260px;
  644. }
  645. .el-input {
  646. width: 260px;
  647. }
  648. .el-form-item {
  649. margin-bottom: 20px;
  650. }
  651. .form-row {
  652. display: flex;
  653. justify-content: space-between;
  654. }
  655. .el-form-item {
  656. width: 48%;
  657. }
  658. }
  659. .form-buttons {
  660. display: flex;
  661. justify-content: center;
  662. width: 100%;
  663. margin-top: 20px;
  664. /* optional: adds some space above the buttons */
  665. }
  666. .model-center {
  667. color: #409eff;
  668. cursor: pointer;
  669. line-height: 40px;
  670. height: 40px;
  671. font-size: 14px;
  672. }
  673. </style>