index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837
  1. <template>
  2. <div>
  3. <basic-container v-show="isShow">
  4. <avue-crud :option="option"
  5. :table-loading="loading"
  6. :data="data"
  7. :page.sync="page"
  8. :search.sync="query"
  9. :permission="permissionList"
  10. :before-open="beforeOpen"
  11. v-model="form"
  12. id="out-table"
  13. :header-cell-class-name="headerClassName"
  14. ref="crud"
  15. @row-update="rowUpdate"
  16. @row-save="rowSave"
  17. @row-del="rowDel"
  18. @search-change="searchChange"
  19. @search-reset="searchReset"
  20. @selection-change="selectionChange"
  21. @current-change="currentChange"
  22. @size-change="sizeChange"
  23. @refresh-change="refreshChange"
  24. @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 323)"
  25. @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 323)"
  26. @on-load="onLoad"
  27. @tree-load="treeLoad" >
  28. <template slot="menuLeft">
  29. <el-button type="primary"
  30. size="small"
  31. icon="el-icon-plus"
  32. @click="addAccountsfun">新 增
  33. </el-button>
  34. <el-button type="danger"
  35. size="small"
  36. icon="el-icon-delete"
  37. plain
  38. @click="handleDelete">删 除
  39. </el-button>
  40. <div style="margin-top: 10px">
  41. <el-tabs type="card" v-model="query.property" @tab-click="handleClick">
  42. <el-tab-pane :label="item.dictValue" :name="item.dictKey"
  43. v-for="item in propertyData" :key="item.dictKey">
  44. <span slot="label">{{item.dictValue}}</span>
  45. </el-tab-pane>
  46. </el-tabs>
  47. </div>
  48. </template>
  49. <template slot="menu" slot-scope="{ row, index }">
  50. <el-button size="small" icon="el-icon-edit" type="text" :disabled="row.count == 1" @click="editfun(row,index)">编辑</el-button>
  51. <!--<el-button v-if="row.isItem == 1" size="small" type="text" @click="editOpeningfun(row,index)">核算期初</el-button>-->
  52. <el-button size="small" type="text" :disabled="row.count == 1" @click="addChildfun(row,index)">添加子项</el-button>
  53. <el-button size="small" icon="el-icon-delete" type="text" :disabled="row.count == 1" @click="rowDel(row, index)">删 除</el-button>
  54. </template>
  55. <template slot="code" slot-scope="{ row }">
  56. <span style="color: #1e9fff" @click="editDetailsfun(row.id)">{{row.code}}</span>
  57. </template>
  58. <template slot="isItem" slot-scope="{ row }">
  59. <span class="pointerClick" v-if="row.isItem == 1" @click="editOpeningfun(row)" >是</span>
  60. <span v-else >否</span>
  61. </template>
  62. <template slot="quantityOpenDr" slot-scope="{ row }">
  63. <el-input-number style="width: 100%;" v-model="row.quantityOpenDr"
  64. v-if="row.edit" min="0" :controls="false"
  65. size="mini" autocomplete="off" clearable
  66. placeholder="请输入期初借方数量" >
  67. </el-input-number>
  68. <span v-else >{{row.quantityOpenDr}}</span>
  69. </template>
  70. </avue-crud>
  71. </basic-container>
  72. <!--辅助核算-->
  73. <el-dialog
  74. title="账户管理"
  75. append-to-body
  76. :visible.sync="accountsVisible"
  77. class="el-dialogDeep"
  78. width="60%"
  79. :close-on-click-modal="false"
  80. :before-close="handleClose">
  81. <accounts-dialog ref="accountsDialog" :form="form"></accounts-dialog>
  82. <span slot="footer" class="dialog-footer">
  83. <el-button @click="accountsVisible = false">取 消</el-button>
  84. <el-button type="primary" @click="bigSavefun">确 定</el-button>
  85. </span>
  86. </el-dialog>
  87. <!--从表数据-->
  88. <el-dialog
  89. title="辅助核算期初"
  90. append-to-body
  91. :visible.sync="sopenblcVisible"
  92. class="el-dialogDeep"
  93. width="70%"
  94. :close-on-click-modal="false"
  95. :before-close="handleClose">
  96. <accitemsopenblc :form="form" ></accitemsopenblc>
  97. <span slot="footer" class="dialog-footer">
  98. <el-button @click="sopenblcVisible = false">取 消</el-button>
  99. <el-button type="primary" @click="openingCalculatefun">保 存</el-button>
  100. </span>
  101. </el-dialog>
  102. <!--<accountsDetails v-if="!isShow" @goBack="goBack"></accountsDetails>-->
  103. </div>
  104. </template>
  105. <script>
  106. import {
  107. accountsList,
  108. accountsDetail,
  109. accountsSubmit,
  110. accountsRemove,
  111. getAccountsCode
  112. } from "@/api/iosBasicData/accounts";
  113. import {mapGetters} from "vuex";
  114. import accountsDialog from "@/views/iosBasicData/accounts/assembly/accountsDialog.vue";
  115. import accountsDetails from "@/views/iosBasicData/accounts/accountsDetails.vue";
  116. import {getWorkDicts} from "@/api/system/dictbiz";
  117. import accitemsopenblc from "@/views/iosBasicData/accounts/assembly/accitemsopenblc.vue";
  118. export default {
  119. data() {
  120. return {
  121. accountsVisible:false, // 添加编辑弹窗
  122. sopenblcVisible:false, // 从表数据
  123. isShow:true,
  124. form: {},
  125. query: {
  126. property:'0',
  127. },
  128. loading: true,
  129. page: {
  130. pageSize: 10,
  131. currentPage: 1,
  132. total: 0
  133. },
  134. selectionList: [],
  135. option:{},
  136. optionBack: {
  137. height:'auto',
  138. calcHeight: 30,
  139. tip: false,
  140. searchShow: true,
  141. searchMenuSpan: 6,
  142. border: true,
  143. index: true,
  144. viewBtn: true,
  145. selection: true,
  146. dialogClickModal: false,
  147. menuWidth:"200",
  148. lazy: true,
  149. tree: true,
  150. rowKey:'code',
  151. rowParentKey:'children',
  152. simplePage: true,
  153. searchIcon:true,
  154. searchIndex:3,
  155. column: [
  156. {
  157. label: "科目代码",
  158. prop: "code",
  159. search: true,
  160. width: 100,
  161. overHidden: true,
  162. },
  163. {
  164. label: "中文名称",
  165. prop: "cnName",
  166. search: true,
  167. width: 200,
  168. overHidden: true,
  169. },
  170. {
  171. label: "方向",
  172. prop: "dc",
  173. overHidden: true,
  174. type:'select',
  175. search: true,
  176. width: 50,
  177. dicData:[
  178. {
  179. label:'借方',
  180. value:'D',
  181. },
  182. {
  183. label:'贷方',
  184. value:'C',
  185. }
  186. ]
  187. },
  188. {
  189. label: "外币",
  190. prop: "isForeign",
  191. overHidden: true,
  192. search: true,
  193. type:'select',
  194. width: 50,
  195. dicData:[
  196. {
  197. label:'否',
  198. value:0,
  199. },
  200. {
  201. label:'是',
  202. value:1,
  203. }
  204. ]
  205. },
  206. {
  207. label: "币种",
  208. prop: "curCode",
  209. overHidden: true,
  210. search: true,
  211. width: 50,
  212. },
  213. // {
  214. // label: "数量",
  215. // prop: "isQuantity",
  216. // overHidden: true,
  217. // search: true,
  218. // type:'select',
  219. // width: "50",
  220. // dicData:[
  221. // {
  222. // label:'否',
  223. // value:0,
  224. // },
  225. // {
  226. // label:'是',
  227. // value:1,
  228. // }
  229. // ]
  230. // },
  231. {
  232. label: "客户",
  233. prop: "isCorp",
  234. overHidden: true,
  235. search: true,
  236. type:'select',
  237. width: 50,
  238. dicData:[
  239. {
  240. label:'否',
  241. value:0,
  242. },
  243. {
  244. label:'是',
  245. value:1,
  246. }
  247. ]
  248. },
  249. {
  250. label: "部门",
  251. prop: "isDept",
  252. overHidden: true,
  253. search: true,
  254. type:'select',
  255. width: 50,
  256. dicData:[
  257. {
  258. label:'否',
  259. value:0,
  260. },
  261. {
  262. label:'是',
  263. value:1,
  264. }
  265. ]
  266. },
  267. {
  268. label: "职员",
  269. prop: "isEmpl",
  270. overHidden: true,
  271. search: true,
  272. type:'select',
  273. width: 50,
  274. dicData:[
  275. {
  276. label:'否',
  277. value:0,
  278. },
  279. {
  280. label:'是',
  281. value:1,
  282. }
  283. ]
  284. },
  285. // {
  286. // label: "项目",
  287. // prop: "isItem",
  288. // overHidden: true,
  289. // search: true,
  290. // type:'select',
  291. // width: "50",
  292. // dicData:[
  293. // {
  294. // label:'否',
  295. // value:0,
  296. // },
  297. // {
  298. // label:'是',
  299. // value:1,
  300. // }
  301. // ]
  302. // },
  303. {
  304. label: "是否生成过凭证",
  305. prop: "count",
  306. overHidden: true,
  307. search: true,
  308. type:'select',
  309. width: 120,
  310. dicData:[
  311. {
  312. label:'否',
  313. value:'0',
  314. },
  315. {
  316. label:'是',
  317. value:'1',
  318. }
  319. ]
  320. },
  321. {
  322. label: "允许手工凭证使用",
  323. prop: "isManual",
  324. overHidden: true,
  325. search: true,
  326. type:'select',
  327. width: 120,
  328. dicData:[
  329. {
  330. label:'否',
  331. value:'0',
  332. },
  333. {
  334. label:'是',
  335. value:'1',
  336. }
  337. ]
  338. },
  339. {
  340. label: "应收/应付科目",
  341. prop: "isArAp",
  342. overHidden: true,
  343. search: true,
  344. type:'select',
  345. width: 120,
  346. dicData:[
  347. {
  348. label:'否',
  349. value:'0',
  350. },
  351. {
  352. label:'是',
  353. value:'1',
  354. }
  355. ]
  356. },
  357. {
  358. label: "上级科目",
  359. prop: "parentCode",
  360. overHidden: true,
  361. width: 120,
  362. },
  363. // {
  364. // label: "children",
  365. // prop: "children",
  366. // hasChildren:true,
  367. // },
  368. {
  369. label: "期初数量借方",
  370. prop: "quantityOpenDr",
  371. width: 120,
  372. overHidden: true,
  373. },
  374. {
  375. label: "期初本币借方金额",
  376. prop: "amountOpenDr",
  377. width: 120,
  378. overHidden: true,
  379. },
  380. {
  381. label: "期初外币借方金额",
  382. prop: "amountOpenDrUsd",
  383. width: 120,
  384. overHidden: true,
  385. },
  386. {
  387. label: "期初数量贷方",
  388. prop: "quantityOpenCr",
  389. overHidden: true,
  390. width: 120,
  391. },
  392. {
  393. label: "期初本币贷方金额",
  394. prop: "amountOpenCr",
  395. overHidden: true,
  396. width: 120,
  397. },
  398. {
  399. label: "期初外币贷方金额",
  400. prop: "amountOpenCrUsd",
  401. overHidden: true,
  402. width: 120,
  403. },
  404. {
  405. label: "期初数量余额",
  406. prop: "quantityOpenUsdBlc",
  407. overHidden: true,
  408. width: 120,
  409. },
  410. {
  411. label: "期初本币余额",
  412. prop: "amountOpenBlc",
  413. overHidden: true,
  414. width: 120,
  415. },
  416. {
  417. label: "期初外币余额",
  418. prop: "amountOpenUsdBlc",
  419. overHidden: true,
  420. width: 120,
  421. },
  422. {
  423. label: "本期数量借方",
  424. prop: "quantityDr",
  425. width: 120,
  426. overHidden: true,
  427. },
  428. {
  429. label: "本期本币借方金额",
  430. prop: "amountDr",
  431. width: 120,
  432. overHidden: true,
  433. },
  434. {
  435. label: "本期外币借方金额",
  436. prop: "amountDrUsd",
  437. width: 120,
  438. overHidden: true,
  439. },
  440. {
  441. label: "本期数量贷方",
  442. prop: "quantityCr",
  443. width: 120,
  444. overHidden: true,
  445. },
  446. {
  447. label: "本期本币贷方金额",
  448. prop: "amountCr",
  449. width: 120,
  450. overHidden: true,
  451. },
  452. {
  453. label: "本期外币贷方金额",
  454. prop: "amountCrUsd",
  455. width: 120,
  456. overHidden: true,
  457. },
  458. {
  459. label: "本期数量余额",
  460. prop: "quantityUsdBlc",
  461. width: 120,
  462. overHidden: true,
  463. },
  464. {
  465. label: "本期本币余额",
  466. prop: "amountBlc",
  467. width: 120,
  468. overHidden: true,
  469. },
  470. {
  471. label: "本期外币余额",
  472. prop: "amountUsdBlc",
  473. width: 120,
  474. overHidden: true,
  475. },
  476. {
  477. label: "备注",
  478. prop: "remarks",
  479. overHidden: true,
  480. width: 200,
  481. },
  482. ]
  483. },
  484. data: [],
  485. propertyData:[], // 科目类别
  486. };
  487. },
  488. components:{accitemsopenblc, accountsDialog,accountsDetails},
  489. computed: {
  490. ...mapGetters(["permission"]),
  491. permissionList() {
  492. return {
  493. addBtn: this.vaildData(this.permission.accounts_add, false),
  494. viewBtn: this.vaildData(this.permission.accounts_view, false),
  495. delBtn: this.vaildData(this.permission.accounts_delete, false),
  496. editBtn: this.vaildData(this.permission.accounts_edit, false)
  497. };
  498. },
  499. ids() {
  500. let ids = [];
  501. this.selectionList.forEach(ele => {
  502. ids.push(ele.id);
  503. });
  504. return ids.join(",");
  505. }
  506. },
  507. async created() {
  508. this.option = await this.getColumnData(this.getColumnName(323), this.optionBack);
  509. this.propertyWorkDictsfun()
  510. },
  511. methods: {
  512. // 辅助核算期初确认
  513. openingCalculatefun(){
  514. this.accountsSubmitfun()
  515. this.sopenblcVisible = false
  516. },
  517. // 核算项目数据
  518. propertyWorkDictsfun(cnName){
  519. getWorkDicts('itemClassify_los').then((res) => {
  520. this.propertyData = res.data.data
  521. });
  522. },
  523. // 添加
  524. addAccountsfun(){
  525. if (this.selectionList.length > 1) {
  526. return this.$message.warning('只能选择一条数据')
  527. }
  528. this.form = {}
  529. if (this.selectionList.length == 1) {
  530. if (this.selectionList[0].count == 1) {
  531. return this.$message.warning('当前科目已经生成凭证')
  532. }
  533. getAccountsCode({code:this.selectionList[0].code}).then(res=>{
  534. this.$set(this.form,'code',res.data.data)
  535. })
  536. }
  537. if (this.selectionList.length == 0) {
  538. getAccountsCode({code:0}).then(res=>{
  539. this.$set(this.form,'code',res.data.data)
  540. })
  541. }
  542. // 复制上默认值
  543. this.form.isItem = '0'
  544. this.form.curCode = 'CNY'
  545. // 打开弹窗
  546. this.accountsVisible = true
  547. // this.isShow = false
  548. },
  549. // 编辑
  550. editDetailsfun(id){
  551. // 详情接口
  552. accountsDetail(id).then(res => {
  553. this.form = res.data.data;
  554. this.$set(this.form,'property',this.form.property + '')
  555. });
  556. this.accountsVisible = true
  557. },
  558. // 大保存
  559. bigSavefun(){
  560. let msgs=[]
  561. if (!this.form.code) {
  562. msgs.push('科目编码')
  563. }
  564. if (!this.form.cnName) {
  565. msgs.push('科目名称')
  566. }
  567. if (!this.form.dc) {
  568. msgs.push('方向')
  569. }
  570. if(msgs.length>0) {
  571. this.$alert(`请填写下列信息:${msgs.join(" ,")}!`, '提示', {
  572. confirmButtonText: '确定',
  573. });
  574. return
  575. }
  576. this.accountsSubmitfun()
  577. },
  578. // 保存
  579. accountsSubmitfun(){
  580. accountsSubmit(this.form).then(res=>{
  581. this.$message.success("操作成功!")
  582. this.accountsVisible = false
  583. this.onLoad(this.page, this.query)
  584. })
  585. },
  586. // 弹窗点击差号
  587. handleClose(done) {
  588. done();
  589. // this.$confirm('确认关闭?')
  590. // .then(_ => {
  591. // done();
  592. // })
  593. // .catch(_ => {});
  594. },
  595. // 添加
  596. rowSave(row, done, loading) {
  597. accountsSubmit(row).then(() => {
  598. this.onLoad(this.page);
  599. this.$message({
  600. type: "success",
  601. message: "操作成功!"
  602. });
  603. done();
  604. }, error => {
  605. loading();
  606. window.console.log(error);
  607. });
  608. },
  609. // 编辑操作
  610. rowUpdate(row, index, done, loading) {
  611. accountsSubmit(row).then(() => {
  612. this.onLoad(this.page);
  613. this.$message({
  614. type: "success",
  615. message: "操作成功!"
  616. });
  617. done();
  618. }, error => {
  619. loading();
  620. });
  621. },
  622. // 删除
  623. rowDel(row) {
  624. this.$confirm("确定将选择数据删除?", {
  625. confirmButtonText: "确定",
  626. cancelButtonText: "取消",
  627. type: "warning"
  628. })
  629. .then(() => {
  630. return accountsRemove(row.id);
  631. })
  632. .then(() => {
  633. this.onLoad(this.page);
  634. this.$message({
  635. type: "success",
  636. message: "操作成功!"
  637. });
  638. });
  639. },
  640. // 编辑
  641. editfun(row){
  642. accountsDetail(row.id).then(res => {
  643. this.form = res.data.data;
  644. this.$set(this.form,'property',this.form.property + '')
  645. });
  646. this.accountsVisible = true
  647. this.$nextTick(()=>{
  648. this.$refs.accountsDialog.propertyWorkDictsfun()
  649. })
  650. },
  651. // 添加子项
  652. addChildfun(row){
  653. this.form = {
  654. parentId:row.id,
  655. parentCode:row.code,
  656. parentCnName:row.cnName,
  657. }
  658. getAccountsCode({code:row.code}).then(res=>{
  659. this.$set(this.form,'code',res.data.data)
  660. })
  661. // 复制上默认值
  662. this.form.isItem = '0'
  663. this.form.curCode = 'CNY'
  664. this.accountsVisible = true
  665. },
  666. // 核算期初
  667. editOpeningfun(row){
  668. accountsDetail(row.id).then(res => {
  669. this.form = res.data.data;
  670. });
  671. this.sopenblcVisible = true
  672. },
  673. // 匹配删除
  674. handleDelete() {
  675. if (this.selectionList.length === 0) {
  676. this.$message.warning("请选择至少一条数据");
  677. return;
  678. }
  679. this.$confirm("确定将选择数据删除?", {
  680. confirmButtonText: "确定",
  681. cancelButtonText: "取消",
  682. type: "warning"
  683. })
  684. .then(() => {
  685. return accountsRemove(this.ids);
  686. })
  687. .then(() => {
  688. this.onLoad(this.page);
  689. this.$message({
  690. type: "success",
  691. message: "操作成功!"
  692. });
  693. this.$refs.crud.toggleSelection();
  694. });
  695. },
  696. // 打开弹窗调用详情接口
  697. beforeOpen(done, type) {
  698. if (["edit", "view"].includes(type)) {
  699. accountsDetail(this.form.id).then(res => {
  700. this.form = res.data.data;
  701. });
  702. }
  703. done();
  704. },
  705. searchReset() {
  706. this.query = {};
  707. this.onLoad(this.page);
  708. },
  709. // 搜索按钮点击
  710. searchChange(params, done) {
  711. // this.query = params;
  712. this.page.currentPage = 1;
  713. this.onLoad(this.page, this.query);
  714. done();
  715. },
  716. // table 切换
  717. handleClick(){
  718. this.page.currentPage = 1;
  719. this.onLoad(this.page, this.query);
  720. },
  721. selectionChange(list) {
  722. this.selectionList = list;
  723. },
  724. selectionClear() {
  725. this.selectionList = [];
  726. this.$refs.crud.toggleSelection();
  727. },
  728. currentChange(currentPage){
  729. this.page.currentPage = currentPage;
  730. },
  731. sizeChange(pageSize){
  732. this.page.pageSize = pageSize;
  733. },
  734. refreshChange() {
  735. this.onLoad(this.page, this.query);
  736. },
  737. onLoad(page, params = {}) {
  738. this.loading = true;
  739. accountsList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
  740. const data = res.data.data;
  741. this.page.total = data.total;
  742. // 前端去掉凭证明细中已使用的判断
  743. data.records.forEach(item => {
  744. item.count = "0"
  745. })
  746. this.data = data.records;
  747. this.loading = false;
  748. this.selectionClear();
  749. });
  750. },
  751. // 懒加载查询子节点数据
  752. treeLoad(row, treeNode, resolve){
  753. console.log(row,688)
  754. console.log(row,treeNode,resolve,673)
  755. },
  756. // 详情的返回列表
  757. goBack() {
  758. // 初始化数据
  759. if (JSON.stringify(this.$route.query) != "{}") {
  760. this.$router.$avueRouter.closeTag();
  761. this.$router.push({
  762. path: "/iosBasicData/accounts/index"
  763. });
  764. }
  765. this.isShow = true;
  766. this.onLoad(this.page, this.search);
  767. },
  768. //自定义列保存
  769. async saveColumnTwo(ref, option, optionBack, code) {
  770. /**
  771. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  772. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  773. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  774. */
  775. const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
  776. if (inSave) {
  777. this.$message.success("保存成功");
  778. //关闭窗口
  779. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  780. }
  781. },
  782. //自定义列重置
  783. async resetColumnTwo(ref, option, optionBack, code) {
  784. this[option] = this[optionBack];
  785. const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
  786. if (inSave) {
  787. this.$message.success("重置成功");
  788. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  789. }
  790. },
  791. // 更改表格颜色
  792. headerClassName(tab){
  793. //颜色间隔
  794. let back = ""
  795. if (tab.columnIndex >= 0 && tab.column.level === 1) {
  796. if (tab.columnIndex % 2 === 0) {
  797. back = "back-one"
  798. } else if (tab.columnIndex % 2 === 1) {
  799. back = "back-two"
  800. }
  801. }
  802. return back;
  803. },
  804. }
  805. };
  806. </script>
  807. <style scoped>
  808. ::v-deep#out-table .back-one {
  809. background: #ecf5ff !important;
  810. text-align: center;
  811. }
  812. ::v-deep#out-table .back-two {
  813. background: #ecf5ff !important;
  814. text-align: center;
  815. }
  816. .pointerClick {
  817. cursor:pointer;
  818. color: #1e9fff;
  819. }
  820. /deep/ .el-col-md-8 {
  821. width: 24.33333%;
  822. }
  823. </style>