powerStandardIndex.vue 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  1. <template>
  2. <!-- 动力标准指标制定 -->
  3. <div class="powerStandardIndex">
  4. <div class="box">
  5. <div class="box-top">
  6. <el-form
  7. style="overflow: hidden;"
  8. :style="filterForm.show ? null : { height: '0px' }"
  9. size="mini"
  10. label-width="85px"
  11. >
  12. <el-row>
  13. <el-col :span="6">
  14. <el-form-item label="监测部门">
  15. <el-select
  16. filterable clearable
  17. v-model="filterForm.data.detectiondepartment"
  18. placeholder=""
  19. style="width: 100%;"
  20. >
  21. <el-option
  22. v-for="item of nameObj.detectiondepartment.arr"
  23. :key="item.id"
  24. :value="item.id"
  25. :label="item.name"
  26. ></el-option>
  27. </el-select>
  28. </el-form-item>
  29. </el-col>
  30. <el-col :span="6">
  31. <el-form-item label="系统名称">
  32. <el-select
  33. filterable clearable
  34. v-model="filterForm.data.systemname"
  35. placeholder=""
  36. style="width: 100%;"
  37. >
  38. <el-option
  39. v-for="item of nameObj.systemname.arr"
  40. :key="item.id"
  41. :value="item.id"
  42. :label="item.name"
  43. ></el-option>
  44. </el-select>
  45. </el-form-item>
  46. </el-col>
  47. <el-col :span="6">
  48. <el-form-item label="制定年度">
  49. <el-date-picker
  50. type="year"
  51. v-model="filterForm.data.creatyear"
  52. placeholder=""
  53. style="width: 100%;"
  54. format="yyyy"
  55. value-format="yyyy"
  56. ></el-date-picker>
  57. </el-form-item>
  58. </el-col>
  59. <el-col :span="6">
  60. <el-form-item label="监测点名称">
  61. <el-select
  62. filterable clearable
  63. v-model="filterForm.data.powermonitorname"
  64. placeholder=""
  65. style="width: 100%;"
  66. >
  67. <el-option
  68. v-for="item of nameObj.powermonitorname.arr"
  69. :key="item.id"
  70. :value="item.id"
  71. :label="item.name"
  72. ></el-option>
  73. </el-select>
  74. </el-form-item>
  75. </el-col>
  76. </el-row>
  77. <el-row>
  78. <el-col :span="6">
  79. <el-form-item label="监测项目名称">
  80. <el-select
  81. filterable clearable
  82. v-model="filterForm.data.itemname"
  83. placeholder=""
  84. style="width: 100%;"
  85. >
  86. <el-option
  87. v-for="item of nameObj.itemname.arr"
  88. :key="item.id"
  89. :value="item.id"
  90. :label="item.name"
  91. ></el-option>
  92. </el-select>
  93. </el-form-item>
  94. </el-col>
  95. </el-row>
  96. </el-form>
  97. <div class="box-top-gjl">
  98. <!-- <el-button
  99. class="button"
  100. type="primary"
  101. size="mini"
  102. icon="el-icon-plus"
  103. v-privilege="activeMenu + 'ADD'"
  104. @click="but_add"
  105. >新增</el-button> -->
  106. <div style="float:right; text-align: right;">
  107. <el-button
  108. class="button"
  109. type="primary"
  110. size="mini"
  111. icon="el-icon-search"
  112. v-privilege="activeMenu + 'QUERY'"
  113. @click="getTableData(1)"
  114. >查询</el-button>
  115. <el-button
  116. class="button"
  117. type="primary"
  118. size="mini"
  119. icon="el-icon-refresh"
  120. v-privilege="activeMenu + 'QUERY'"
  121. @click="tableDataCancel();"
  122. >重置</el-button>
  123. <el-button
  124. size="mini"
  125. :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
  126. :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
  127. @click="filterForm.show = !filterForm.show;
  128. $nextTick(() => {
  129. singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 45;
  130. }
  131. );"
  132. >{{ filterForm.show ? '收起' : '展开' }}</el-button>
  133. </div>
  134. </div>
  135. </div>
  136. <div class="box-bottom">
  137. <el-table
  138. stripe
  139. id="singleTable"
  140. ref="singleTable"
  141. :data="tableData"
  142. v-loading="tableLoading"
  143. style="width: 100%;"
  144. :height="singleTableHeight"
  145. border
  146. size="mini"
  147. highlight-current-row
  148. >
  149. <el-table-column
  150. sortable
  151. :sort-by="function(row, index) { return sortFoo(row, index, 'detectiondepartment') }"
  152. prop="detectiondepartment"
  153. label="监测部门"
  154. min-width="100px"
  155. :show-overflow-tooltip="true"
  156. >
  157. <template slot-scope="scope">
  158. <span>{{ nameObj.detectiondepartment.obj[scope.row.detectiondepartment] ? nameObj.detectiondepartment.obj[scope.row.detectiondepartment] : scope.row.detectiondepartment }}</span>
  159. </template>
  160. </el-table-column>
  161. <el-table-column
  162. sortable
  163. prop="systemname"
  164. label="系统名称"
  165. min-width="100px"
  166. :show-overflow-tooltip="true"
  167. ></el-table-column>
  168. <el-table-column
  169. sortable
  170. prop="powermonitorname"
  171. label="监测点名称"
  172. min-width="100px"
  173. :show-overflow-tooltip="true"
  174. ></el-table-column>
  175. <el-table-column
  176. sortable
  177. prop="itemname"
  178. label="监测项目名称"
  179. min-width="100px"
  180. :show-overflow-tooltip="true"
  181. ></el-table-column>
  182. <el-table-column
  183. sortable
  184. prop="upperlimit"
  185. label="标准指标上限"
  186. min-width="100px"
  187. :show-overflow-tooltip="true"
  188. ></el-table-column>
  189. <el-table-column
  190. sortable
  191. prop="lowerlimit"
  192. label="标准指标下限"
  193. min-width="100px"
  194. :show-overflow-tooltip="true"
  195. ></el-table-column>
  196. <el-table-column
  197. sortable
  198. prop="creatyear"
  199. label="制定年度"
  200. min-width="100px"
  201. :show-overflow-tooltip="true"
  202. ></el-table-column>
  203. <el-table-column
  204. class-name="gn-TableDownloadExcel-none"
  205. label="操作"
  206. align="center"
  207. width="75px"
  208. fixed="right"
  209. >
  210. <template slot-scope="scope">
  211. <div>
  212. <el-button
  213. type="primary"
  214. size="mini"
  215. v-privilege="activeMenu + 'PUT'"
  216. @click="but_edit(scope.row)"
  217. >修改</el-button>
  218. <!-- <el-button
  219. type="danger"
  220. size="mini"
  221. v-privilege="activeMenu + 'DELETE'"
  222. @click="but_del(scope.row)"
  223. >删除</el-button> -->
  224. </div>
  225. </template>
  226. </el-table-column>
  227. </el-table>
  228. <el-pagination
  229. layout="total, sizes, prev, pager, next, jumper"
  230. :total="total"
  231. :page-sizes="[10, 20, 50, 100, 500, 1000]"
  232. :page-size="pageSize"
  233. :current-page.sync="pageNum"
  234. @size-change="tableSizeChange"
  235. @current-change="getTableData()"
  236. style="text-align: right;margin-top: 10px;"
  237. ></el-pagination>
  238. </div>
  239. </div>
  240. <el-dialog
  241. :title="'信息 - ' + (dialog.editorBox.type === 'add' ? '新增' : '修改')"
  242. :visible.sync="dialog.editorBox.show"
  243. width="600px"
  244. :close-on-click-modal="false"
  245. :show-close="!loading"
  246. >
  247. <div>
  248. <el-form
  249. ref="dialog_form"
  250. :model="dialog.editorBox.form.data"
  251. :rules="dialog.editorBox.form.rules"
  252. size="mini"
  253. label-width="90px"
  254. >
  255. <el-row>
  256. <el-col :span="12">
  257. <el-form-item
  258. label="监测部门"
  259. prop="detectiondepartment"
  260. >
  261. <el-select
  262. filterable clearable
  263. style="width: 100%;"
  264. v-model="dialog.editorBox.form.data.detectiondepartment"
  265. >
  266. <el-option
  267. v-for="item of nameObj.detectiondepartment.arr"
  268. :key="item.id"
  269. :value="item.id"
  270. :label="item.name"
  271. ></el-option>
  272. </el-select>
  273. </el-form-item>
  274. </el-col>
  275. <el-col :span="12">
  276. <el-form-item
  277. label="系统名称"
  278. prop="systemname"
  279. >
  280. <el-select
  281. style="width: 100%;"
  282. v-model="dialog.editorBox.form.data.systemname"
  283. >
  284. <el-option
  285. v-for="item of nameObj.systemname.arr"
  286. :key="item.id"
  287. :value="item.id"
  288. :label="item.name"
  289. ></el-option>
  290. </el-select>
  291. </el-form-item>
  292. </el-col>
  293. </el-row>
  294. <el-row>
  295. <el-col :span="12">
  296. <el-form-item
  297. label="监测点名称"
  298. prop="powermonitorname"
  299. >
  300. <el-select
  301. style="width: 100%;"
  302. v-model="dialog.editorBox.form.data.powermonitorname"
  303. >
  304. <el-option
  305. v-for="item of nameObj.powermonitorname.arr"
  306. :key="item.id"
  307. :value="item.id"
  308. :label="item.name"
  309. ></el-option>
  310. </el-select>
  311. </el-form-item>
  312. </el-col>
  313. <el-col :span="12">
  314. <el-form-item
  315. label="监测项目名称"
  316. prop="itemname"
  317. >
  318. <el-select
  319. filterable clearable
  320. style="width: 100%;"
  321. v-model="dialog.editorBox.form.data.itemname"
  322. >
  323. <el-option
  324. v-for="item of nameObj.itemname.arr"
  325. :key="item.id"
  326. :value="item.id"
  327. :label="item.name"
  328. ></el-option>
  329. </el-select>
  330. </el-form-item>
  331. </el-col>
  332. </el-row>
  333. <el-row>
  334. <el-col :span="12">
  335. <el-form-item
  336. label="标准指标上限"
  337. prop="upperlimit"
  338. >
  339. <el-input clearable
  340. style="width: 100%;"
  341. v-model="dialog.editorBox.form.data.upperlimit"
  342. >
  343. </el-input>
  344. </el-form-item>
  345. </el-col>
  346. <el-col :span="12">
  347. <el-form-item
  348. label="标准指标下限"
  349. prop="lowerlimit"
  350. >
  351. <el-input clearable
  352. style="width: 100%;"
  353. v-model="dialog.editorBox.form.data.lowerlimit"
  354. >
  355. </el-input>
  356. </el-form-item>
  357. </el-col>
  358. </el-row>
  359. <el-row>
  360. <el-col :span="12">
  361. <el-form-item
  362. label="制定年度"
  363. prop="creatyear"
  364. >
  365. <el-date-picker
  366. type="year"
  367. v-model="dialog.editorBox.form.data.creatyear"
  368. placeholder=""
  369. style="width: 100%;"
  370. format="yyyy"
  371. value-format="yyyy"
  372. ></el-date-picker>
  373. </el-form-item>
  374. </el-col>
  375. <el-col :span="12">
  376. <el-form-item
  377. label="单位"
  378. prop="unitname"
  379. >
  380. <el-input clearable
  381. style="width: 100%;"
  382. v-model="dialog.editorBox.form.data.unitname"
  383. >
  384. </el-input>
  385. </el-form-item>
  386. </el-col>
  387. </el-row>
  388. </el-form>
  389. </div>
  390. <span
  391. slot="footer"
  392. class="dialog-footer"
  393. >
  394. <el-button
  395. @click="dialog.editorBox.show = false"
  396. :loading="loading"
  397. >取 消</el-button>
  398. <el-button
  399. type="primary"
  400. @click="dataSave"
  401. :loading="loading"
  402. >保 存</el-button>
  403. </span>
  404. </el-dialog>
  405. </div>
  406. </template>
  407. <script>
  408. import { zCheckNumber1 } from '@/utils/validator.js'
  409. export default {
  410. name: 'powerStandardIndex',
  411. data () {
  412. return {
  413. activeMenu: '',
  414. filterForm: {
  415. show: true,
  416. data: {
  417. detectiondepartment: '',
  418. systemname: '',
  419. creatyear: '',
  420. powermonitorname: '',
  421. itemname: ''
  422. },
  423. rules: {
  424. }
  425. },
  426. pageNum: 1,
  427. pageSize: 20,
  428. total: 0,
  429. singleTableHeight: 100,
  430. tableData: [
  431. // {
  432. // detectiondepartment: '',
  433. // systemname: '',
  434. // powermonitorname: '',
  435. // itemname: '',
  436. // upperlimit: '',
  437. // lowerlimit: '',
  438. // creatyear: '',
  439. // unitname: ''
  440. // }
  441. ],
  442. nameObj: {
  443. detectiondepartment: {
  444. obj: {
  445. 'TestCenter': '检化验中心',
  446. 'CentreWaterTreatment': '中央水处理'
  447. },
  448. arr: [
  449. {
  450. id: 'TestCenter',
  451. name: '检化验中心'
  452. },
  453. {
  454. id: 'CentreWaterTreatment',
  455. name: '中央水处理'
  456. }
  457. ]
  458. },
  459. systemname: {
  460. obj: {},
  461. arr: []
  462. },
  463. powermonitorname: {
  464. obj: {},
  465. arr: []
  466. },
  467. itemname: {
  468. obj: {},
  469. arr: []
  470. }
  471. },
  472. loading: false,
  473. tableLoading: false,
  474. dialog: {
  475. editorBox: {
  476. show: false,
  477. type: '',
  478. form: {
  479. data: {
  480. detectiondepartment: '',
  481. systemname: '',
  482. powermonitorname: '',
  483. itemname: '',
  484. upperlimit: '',
  485. lowerlimit: '',
  486. creatyear: '',
  487. unitname: ''
  488. },
  489. rules: {
  490. detectiondepartment: [
  491. { required: true, message: '该项不能为空', trigger: 'change' }
  492. ],
  493. systemname: [
  494. { required: true, message: '该项不能为空', trigger: 'change' }
  495. ],
  496. powermonitorname: [
  497. { required: true, message: '该项不能为空', trigger: 'change' }
  498. ],
  499. itemname: [
  500. { required: true, message: '该项不能为空', trigger: 'change' }
  501. ],
  502. upperlimit: [
  503. { validator: zCheckNumber1, trigger: 'change' }
  504. ],
  505. lowerlimit: [
  506. { validator: zCheckNumber1, trigger: 'change' }
  507. ],
  508. creatyear: [],
  509. unitname: []
  510. }
  511. }
  512. }
  513. }
  514. }
  515. },
  516. created () {
  517. this.activeMenu = window.localStorage.getItem('activeMenu');
  518. },
  519. mounted () {
  520. let that = this;
  521. window.PEDataObj = {
  522. // 将数据绑定到window上,供main页面使用
  523. vm: that,
  524. // tableArr:用于导出成Excel的表格的信息
  525. tableArr: [
  526. {
  527. name: '',
  528. id: 'singleTable'
  529. }
  530. ]
  531. };
  532. that.$nextTick(() => {
  533. // 立即获取的height有一定偏差,通过setTimeout延迟来解决
  534. setTimeout(() => {
  535. that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 45;
  536. }, 1);
  537. });
  538. that.getSystemNameData();
  539. that.getPowermonitorNameData();
  540. that.getItemNameData();
  541. that.getTableData();
  542. },
  543. methods: {
  544. // 计算树区域高度
  545. getRoleHeight (dom) {
  546. return window.innerHeight - dom.offsetTop;
  547. },
  548. // 获取系统名称
  549. getSystemNameData () {
  550. let that = this
  551. let url = 'pass/ems/v1/tcm0325s/getidandname/';
  552. that.axios.get(url)
  553. .then(function (res) {
  554. if (res.code === '0') {
  555. let arr = [];
  556. let obj = {};
  557. for (let item of res.data) {
  558. arr.push({
  559. id: item.powercode,
  560. name: item.powername
  561. })
  562. obj[item.powercode] = item.powername;
  563. }
  564. that.nameObj.systemname.arr = arr;
  565. that.nameObj.systemname.obj = obj;
  566. } else {
  567. that.$message.error(res.message);
  568. }
  569. });
  570. },
  571. // 获取监测点名称
  572. getPowermonitorNameData () {
  573. let that = this
  574. let url = 'pass/ems/v1/tcm0316s/getidandname/';
  575. that.axios.get(url)
  576. .then(function (res) {
  577. if (res.code === '0') {
  578. let arr = [];
  579. let obj = {};
  580. for (let item of res.data) {
  581. arr.push({
  582. id: item.id,
  583. name: item.name
  584. })
  585. obj[item.id] = item.name;
  586. }
  587. that.nameObj.powermonitorname.arr = arr;
  588. that.nameObj.powermonitorname.obj = obj;
  589. } else {
  590. that.$message.error(res.message);
  591. }
  592. });
  593. },
  594. // 获取监测项目
  595. getItemNameData () {
  596. let that = this
  597. let url = 'pass/ems/v1/tcm0323s/getidandname/';
  598. that.axios.get(url)
  599. .then(function (res) {
  600. if (res.code === '0') {
  601. let arr = [];
  602. let obj = {};
  603. for (let item of res.data) {
  604. arr.push({
  605. id: item.id,
  606. name: item.name
  607. })
  608. obj[item.id] = item.name;
  609. }
  610. that.nameObj.itemname.arr = arr;
  611. that.nameObj.itemname.obj = obj;
  612. } else {
  613. that.$message.error(res.message);
  614. }
  615. });
  616. },
  617. // 获取表格中的数据
  618. getTableData (pageNum) {
  619. let that = this,
  620. params = {
  621. detectiondepartment: that.filterForm.data.detectiondepartment,
  622. systemname: that.filterForm.data.systemname,
  623. creatyear: that.filterForm.data.creatyear,
  624. powermonitorname: that.filterForm.data.powermonitorname,
  625. itemname: that.filterForm.data.itemname
  626. };
  627. that.pageNum = pageNum || that.pageNum;
  628. that.tableLoading = true;
  629. let url = 'pass/ems/v1/tcm0324s/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
  630. that.axios.get(url, {
  631. params: params
  632. })
  633. .then(function (res) {
  634. if (res.code === '0') {
  635. let arr = [];
  636. for (let item of res.data.list) {
  637. arr.push({
  638. detectiondepartment: item.detectiondepartment,
  639. systemname: item.systemname,
  640. powermonitorname: item.powermonitorname,
  641. itemname: item.itemname,
  642. upperlimit: item.upperlimit,
  643. lowerlimit: item.lowerlimit,
  644. creatyear: item.creatyear,
  645. unitname: item.unitname
  646. })
  647. }
  648. that.tableData = arr;
  649. that.total = res.data.total;
  650. } else {
  651. that.$message.error(res.message);
  652. }
  653. that.tableLoading = false;
  654. }).catch(function () {
  655. that.tableLoading = false;
  656. });
  657. },
  658. // 改变表格显示条数
  659. tableSizeChange (val) {
  660. let that = this;
  661. that.pageSize = val;
  662. that.getTableData(1);
  663. },
  664. // 重置搜索
  665. tableDataCancel () {
  666. let that = this;
  667. for (let key in that.filterForm.data) {
  668. if (that.filterForm.data[key] instanceof Array) {
  669. that.filterForm.data[key] = [];
  670. } else {
  671. that.filterForm.data[key] = '';
  672. }
  673. }
  674. that.getTableData(1);
  675. },
  676. but_add () {
  677. let that = this;
  678. for (let key in that.dialog.editorBox.form.data) {
  679. that.dialog.editorBox.form.data[key] = '';
  680. }
  681. that.dialog.editorBox.type = 'add';
  682. that.dialog.editorBox.show = true;
  683. setTimeout(() => {
  684. that.$refs['dialog_form'].clearValidate();
  685. }, 100);
  686. },
  687. but_edit (row) {
  688. let that = this;
  689. for (let key in that.dialog.editorBox.form.data) {
  690. if (typeof row[key] !== 'undefined') {
  691. that.dialog.editorBox.form.data[key] = row[key];
  692. }
  693. }
  694. that.dialog.editorBox.type = 'edit';
  695. that.dialog.editorBox.show = true;
  696. },
  697. but_del (row) {
  698. let that = this;
  699. that.$confirm('是否删除该条数据?', '提示', {
  700. confirmButtonText: '确定',
  701. cancelButtonText: '取消',
  702. state: 'warning'
  703. }).then(() => {
  704. that.axios.delete('pass/ems/v1//?powercode=' + row.powercode + '&sort=' + row.sort)
  705. .then(function (res) {
  706. if (res.code === '0') {
  707. that.$message({
  708. message: '删除成功',
  709. type: 'success'
  710. });
  711. that.getTableData();
  712. } else {
  713. that.$message.error(res.message);
  714. }
  715. }).catch(function () {
  716. });
  717. }).catch(() => {
  718. });
  719. },
  720. dataSave () {
  721. let that = this;
  722. let SubmitData = {
  723. detectiondepartment: that.dialog.editorBox.form.data.detectiondepartment,
  724. systemname: that.dialog.editorBox.form.data.systemname,
  725. powermonitorname: that.dialog.editorBox.form.data.powermonitorname,
  726. itemname: that.dialog.editorBox.form.data.itemname,
  727. upperlimit: that.dialog.editorBox.form.data.upperlimit,
  728. lowerlimit: that.dialog.editorBox.form.data.lowerlimit,
  729. creatyear: that.dialog.editorBox.form.data.creatyear,
  730. unitname: that.dialog.editorBox.form.data.unitname
  731. };
  732. that.$refs['dialog_form'].validate((valid) => {
  733. if (valid) {
  734. if (that.dialog.editorBox.type === 'add') {
  735. let foorData = new FormData();
  736. for (let key in SubmitData) {
  737. foorData.append(key, SubmitData[key]);
  738. }
  739. that.loading = true;
  740. that.axios.post('pass/ems/v1//', foorData, {
  741. headers: {
  742. 'Content-Type': 'multipart/form-data'
  743. }
  744. })
  745. .then(function (res) {
  746. if (res.code === '0') {
  747. that.$message({
  748. message: '新增成功',
  749. type: 'success'
  750. });
  751. that.getTableData();
  752. that.dialog.editorBox.show = false;
  753. } else {
  754. that.$message.error(res.message);
  755. }
  756. that.loading = false;
  757. }).catch(function () {
  758. that.loading = false;
  759. });
  760. } else {
  761. that.loading = true;
  762. that.axios.put('pass/ems/v1/tcm0324s/', SubmitData)
  763. .then(function (res) {
  764. if (res.code === '0') {
  765. that.$message({
  766. message: '修改成功',
  767. type: 'success'
  768. });
  769. that.getTableData();
  770. that.dialog.editorBox.show = false;
  771. } else {
  772. that.$message.error(res.message);
  773. }
  774. that.loading = false;
  775. }).catch(function () {
  776. that.loading = false;
  777. });
  778. }
  779. }
  780. });
  781. }
  782. }
  783. }
  784. </script>
  785. <style lang="less">
  786. .powerStandardIndex {
  787. min-width: 700px;
  788. height: 100%;
  789. .box {
  790. height: 100%;
  791. padding: 15px 15px 0 15px;
  792. .box-top {
  793. .el-form-item {
  794. margin-bottom: 7px;
  795. }
  796. .box-top-gjl {
  797. overflow: hidden;
  798. padding: 7px 0;
  799. border-top: 1px solid #ccc;
  800. // border-bottom: 1px solid #ccc;
  801. // margin-bottom: 6px;
  802. }
  803. }
  804. }
  805. }
  806. </style>