冷凝胶前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

816 lines
23 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 条件查询 -->
  4. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  5. <el-form-item :label="'物料编码:'">
  6. <el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'库位编码:'">
  9. <el-input v-model="searchData.locationID" clearable style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'料号描述:'">
  12. <el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item :label="'出入库单号:'">
  15. <el-input v-model="searchData.transNo" clearable style="width: 120px"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="' '">
  18. <el-button v-if="!authSearch" type="primary" @click="getDataList()">查询</el-button>
  19. <!-- <download-excel-->
  20. <!-- :fields="fields()"-->
  21. <!-- :data="exportData"-->
  22. <!-- type="xls"-->
  23. <!-- :name="exportName"-->
  24. <!-- :header="exportHeader"-->
  25. <!-- :footer="exportFooter"-->
  26. <!-- :fetch="createExportData"-->
  27. <!-- :before-generate="startDownload"-->
  28. <!-- :before-finish="finishDownload"-->
  29. <!-- worksheet="导出信息"-->
  30. <!-- class="el-button el-button&#45;&#45;primary el-button&#45;&#45;medium">-->
  31. <!-- {{ "导出" }}-->
  32. <!-- </download-excel>-->
  33. </el-form-item>
  34. </el-form>
  35. <!-- 展示列表 -->
  36. <el-table
  37. :height="height"
  38. :data="dataList"
  39. @row-click="changeData"
  40. border
  41. highlight-current-row
  42. ref="mainTable"
  43. style="width: 100%;">
  44. <el-table-column
  45. v-for="(item,index) in columnList" :key="index"
  46. :sortable="item.columnSortable"
  47. :prop="item.columnProp"
  48. :header-align="item.headerAlign"
  49. :show-overflow-tooltip="item.showOverflowTooltip"
  50. :align="item.align"
  51. :fixed="item.fixed==''?false:item.fixed"
  52. :width="item.columnWidth"
  53. :label="item.columnLabel">
  54. <template slot-scope="scope">
  55. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  56. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  57. </template>
  58. </el-table-column>
  59. </el-table>
  60. <el-pagination
  61. @size-change="sizeChangeHandle"
  62. @current-change="currentChangeHandle"
  63. :current-page="pageIndex"
  64. :page-sizes="[20, 50, 100, 200, 500]"
  65. :page-size="pageSize"
  66. :total="totalPage"
  67. layout="total, sizes, prev, pager, next, jumper">
  68. </el-pagination>
  69. <el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  70. <el-tab-pane label="卷明细" name="detail">
  71. <el-table
  72. :data="dataList2"
  73. :height="height"
  74. border
  75. style="width: 100%; ">
  76. <el-table-column
  77. v-for="(item,index) in columnList2" :key="index"
  78. :sortable="item.columnSortable"
  79. :prop="item.columnProp"
  80. :header-align="item.headerAlign"
  81. :show-overflow-tooltip="item.showOverflowTooltip"
  82. :align="item.align"
  83. :fixed="item.fixed==''?false:item.fixed"
  84. :min-width="item.columnWidth"
  85. :label="item.columnLabel">
  86. <template slot-scope="scope">
  87. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  88. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  89. style="width: 100px; height: 80px"/></span>
  90. </template>
  91. </el-table-column>
  92. </el-table>
  93. </el-tab-pane>
  94. </el-tabs>
  95. </div>
  96. </template>
  97. <script>
  98. import {
  99. findTrans, // 检验方法查询
  100. findByRoll //查询卷明细
  101. // saveLocation, // 检验方法新增
  102. // updateLocation, // 检验方法修改
  103. // deleteLocation, // 检验方法删除
  104. // findByWarehouse, //查询库区
  105. // inspectionTypeSearch, // 搜索所有检验类型
  106. // // getSiteAndBuByUserName
  107. } from "@/api/material/seekByTrans.js"
  108. // import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
  109. // import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
  110. export default {
  111. data () {
  112. return {
  113. currentRow:'',
  114. headerData:'',
  115. wareHouseList:'',
  116. // 是否收藏
  117. favorite: false,
  118. // 导出 start
  119. exportData: [],
  120. exportName: "检验方法" + this.dayjs().format('YYYYMMDDHHmmss'),
  121. exportHeader: ["检验方法"],
  122. exportFooter: [],
  123. exportList: [],
  124. warehouseData: {
  125. id:'',
  126. site: '',
  127. },
  128. activeName:"detail",
  129. // 导出 end
  130. searchData: {
  131. transNo:'',
  132. site: '',
  133. userName: this.$store.state.user.name,
  134. transDate: '',
  135. warehouseID: '',
  136. rollNo: '',
  137. partNo: '',
  138. partDesc: '',
  139. transQty: '',
  140. batchNo: '',
  141. locationID: '',
  142. wdrNo: '',
  143. manufactureDate: '',
  144. orderRef1: '',
  145. receiver: '',
  146. enterDate: '',
  147. transType: '',
  148. page: 1,
  149. limit: 10,
  150. },
  151. pageIndex: 1,
  152. pageSize: 20,
  153. totalPage: 0,
  154. height: 200,
  155. secondHeight: 200,
  156. dataList: [],
  157. dataList2:[],
  158. dataListLoading: false,
  159. modalFlag: false,
  160. modalDisableFlag: false,
  161. modalData: {
  162. site: '',
  163. warehouseId: '',
  164. locationId: '',
  165. active: 'Y',
  166. locationName: '',
  167. creator: this.$store.state.user.name,
  168. // updateBy: this.$store.state.user.name,
  169. locationDescription: '',
  170. keeper: '',
  171. remarks: '',
  172. createTime: '',
  173. },
  174. // 标头展示
  175. columnList: [
  176. {
  177. userId: this.$store.state.user.name,
  178. functionId: 200003,
  179. serialNumber: '200003TableSite',
  180. tableId: "200003Table",
  181. tableName: "工厂编码",
  182. columnWidth: 100,
  183. columnProp: 'site',
  184. headerAlign: 'center',
  185. align: "center",
  186. columnLabel: '工厂编码',
  187. columnHidden: false,
  188. columnImage: false,
  189. columnSortable: false,
  190. sortLv: 0,
  191. status: true,
  192. fixed: '',
  193. },
  194. {
  195. userId: this.$store.state.user.name,
  196. functionId: 200003,
  197. serialNumber: '200003TableTransType',
  198. tableId: "200003Table",
  199. tableName: "出入库类型",
  200. columnWidth: 105,
  201. columnProp: 'transType',
  202. headerAlign: 'left',
  203. align: "left",
  204. columnLabel: '出入库类型',
  205. columnHidden: false,
  206. columnImage: false,
  207. columnSortable: false,
  208. sortLv: 0,
  209. status: true,
  210. fixed: '',
  211. },
  212. {
  213. userId: this.$store.state.user.name,
  214. functionId: 200003,
  215. serialNumber: '200003TableTransNo',
  216. tableId: "200003Table",
  217. tableName: "出入库单号",
  218. columnWidth: 100,
  219. columnProp: 'transNo',
  220. headerAlign: 'left',
  221. align: "left",
  222. columnLabel: '出入库单号',
  223. columnHidden: false,
  224. columnImage: false,
  225. columnSortable: false,
  226. sortLv: 0,
  227. status: true,
  228. fixed: '',
  229. },
  230. {
  231. userId: this.$store.state.user.name,
  232. functionId: 200003,
  233. serialNumber: '200003TableTransDate',
  234. tableId: "200003Table",
  235. tableName: "出入库日期",
  236. columnWidth: 105,
  237. columnProp: 'transDate',
  238. headerAlign: 'center',
  239. align: "center",
  240. columnLabel: '出入库日期',
  241. columnHidden: false,
  242. columnImage: false,
  243. columnSortable: false,
  244. sortLv: 0,
  245. status: true,
  246. fixed: '',
  247. },
  248. {
  249. userId: this.$store.state.user.name,
  250. functionId: 200003,
  251. serialNumber: '200003TableWarehouseId',
  252. tableId: "200003Table",
  253. tableName: "仓库编码",
  254. columnWidth: 105,
  255. columnProp: 'warehouseID',
  256. headerAlign: 'left',
  257. align: "left",
  258. columnLabel: '仓位编码',
  259. columnHidden: false,
  260. columnImage: false,
  261. columnSortable: false,
  262. sortLv: 0,
  263. status: true,
  264. fixed: '',
  265. },
  266. {
  267. userId: this.$store.state.user.name,
  268. functionId: 200003,
  269. serialNumber: '200003TablePartNo',
  270. tableId: "200003Table",
  271. tableName: "物料编码",
  272. columnWidth: 105,
  273. columnProp: 'partNo',
  274. headerAlign: 'left',
  275. align: "left",
  276. columnLabel: '物料编码',
  277. columnHidden: false,
  278. columnImage: false,
  279. columnSortable: false,
  280. sortLv: 0,
  281. status: true,
  282. fixed: '',
  283. },
  284. {
  285. userId: this.$store.state.user.name,
  286. functionId: 200003,
  287. serialNumber: '200003TablePartDesc',
  288. tableId: "200003Table",
  289. tableName: "料号描述",
  290. columnWidth: 105,
  291. columnProp: 'partDesc',
  292. headerAlign: 'left',
  293. align: "left",
  294. columnLabel: '料号描述',
  295. columnHidden: false,
  296. columnImage: false,
  297. columnSortable: false,
  298. sortLv: 0,
  299. status: true,
  300. fixed: '',
  301. },
  302. {
  303. userId: this.$store.state.user.name,
  304. functionId: 200003,
  305. serialNumber: '200003TableNum',
  306. tableId: "200003Table",
  307. tableName: "卷数量",
  308. columnWidth: 105,
  309. columnProp: 'num',
  310. headerAlign: 'right',
  311. align: "right",
  312. columnLabel: '卷数量',
  313. columnHidden: false,
  314. columnImage: false,
  315. columnSortable: false,
  316. sortLv: 0,
  317. status: true,
  318. fixed: '',
  319. },
  320. {
  321. userId: this.$store.state.user.name,
  322. functionId: 200003,
  323. serialNumber: '200003TableTransQty',
  324. tableId: "200003Table",
  325. tableName: "出入库数量",
  326. columnWidth: 105,
  327. columnProp: 'transQty',
  328. headerAlign: 'right',
  329. align: "right",
  330. columnLabel: '出入库数量',
  331. columnHidden: false,
  332. columnImage: false,
  333. columnSortable: false,
  334. sortLv: 0,
  335. status: true,
  336. fixed: '',
  337. },
  338. {
  339. userId: this.$store.state.user.name,
  340. functionId: 200003,
  341. serialNumber: '200003TableBatchNo',
  342. tableId: "200003Table",
  343. tableName: "批号",
  344. columnWidth: 105,
  345. columnProp: 'batchNo',
  346. headerAlign: 'left',
  347. align: "left",
  348. columnLabel: '批号',
  349. columnHidden: false,
  350. columnImage: false,
  351. columnSortable: false,
  352. sortLv: 0,
  353. status: true,
  354. fixed: '',
  355. },
  356. {
  357. userId: this.$store.state.user.name,
  358. functionId: 200003,
  359. serialNumber: '200003TableLocationID',
  360. tableId: "200003Table",
  361. tableName: "库位",
  362. columnWidth: 105,
  363. columnProp: 'locationID',
  364. headerAlign: 'left',
  365. align: "left",
  366. columnLabel: '库位',
  367. columnHidden: false,
  368. columnImage: false,
  369. columnSortable: false,
  370. sortLv: 0,
  371. status: true,
  372. fixed: '',
  373. },
  374. {
  375. userId: this.$store.state.user.name,
  376. functionId: 200003,
  377. serialNumber: '200003TableWdrNo',
  378. tableId: "200003Table",
  379. tableName: "W/D/R",
  380. columnWidth: 105,
  381. columnProp: 'wdrNo',
  382. headerAlign: 'left',
  383. align: "left",
  384. columnLabel: 'W/D/R',
  385. columnHidden: false,
  386. columnImage: false,
  387. columnSortable: false,
  388. sortLv: 0,
  389. status: true,
  390. fixed: '',
  391. },
  392. {
  393. userId: this.$store.state.user.name,
  394. functionId: 200003,
  395. serialNumber: '200003TableManufactureDate',
  396. tableId: "200003Table",
  397. tableName: "生产日期",
  398. columnWidth: 105,
  399. columnProp: 'manufactureDate',
  400. headerAlign: 'center',
  401. align: "center",
  402. columnLabel: '生产日期',
  403. columnHidden: false,
  404. columnImage: false,
  405. columnSortable: false,
  406. sortLv: 0,
  407. status: true,
  408. fixed: '',
  409. },
  410. {
  411. userId: this.$store.state.user.name,
  412. functionId: 200003,
  413. serialNumber: '200003TableOrderRef1',
  414. tableId: "200003Table",
  415. tableName: "关联单号",
  416. columnWidth: 105,
  417. columnProp: 'orderRef1',
  418. headerAlign: 'left',
  419. align: "left",
  420. columnLabel: '关联单号',
  421. columnHidden: false,
  422. columnImage: false,
  423. columnSortable: false,
  424. sortLv: 0,
  425. status: true,
  426. fixed: '',
  427. },
  428. {
  429. userId: this.$store.state.user.name,
  430. functionId: 200003,
  431. serialNumber: '200003TableReceiver',
  432. tableId: "200003Table",
  433. tableName: "经手人",
  434. columnWidth: 100,
  435. columnProp: 'receiver',
  436. headerAlign: 'left',
  437. align: "left",
  438. columnLabel: '经手人',
  439. columnHidden: false,
  440. columnImage: false,
  441. columnSortable: false,
  442. sortLv: 0,
  443. status: true,
  444. fixed: '',
  445. },
  446. {
  447. userId: this.$store.state.user.name,
  448. functionId: 200003,
  449. serialNumber: '200003TableEnterDate',
  450. tableId: "200003Table",
  451. tableName: "录入时间",
  452. columnWidth: 130,
  453. columnProp: 'enterDate',
  454. headerAlign: 'center',
  455. align: "center",
  456. columnLabel: '录入时间',
  457. columnHidden: false,
  458. columnImage: false,
  459. columnSortable: false,
  460. sortLv: 0,
  461. status: true,
  462. fixed: '',
  463. },
  464. {
  465. userId: this.$store.state.user.name,
  466. functionId: 200003,
  467. serialNumber: '200003TableUserName',
  468. tableId: "200003Table",
  469. tableName: "录入人",
  470. columnWidth: 105,
  471. columnProp: 'userName',
  472. headerAlign: 'left',
  473. align: "left",
  474. columnLabel: '录入人',
  475. columnHidden: false,
  476. columnImage: false,
  477. columnSortable: false,
  478. sortLv: 0,
  479. status: true,
  480. fixed: '',
  481. },
  482. ],
  483. columnList2:[
  484. {
  485. userId: this.$store.state.user.name,
  486. functionId: 200003,
  487. serialNumber: '200003TableTransNo',
  488. tableId: "200003Table",
  489. tableName: "出入库单号",
  490. columnWidth: 200,
  491. columnProp: 'transNo',
  492. headerAlign: 'left',
  493. align: "left",
  494. columnLabel: '出入库单号',
  495. columnHidden: false,
  496. columnImage: false,
  497. columnSortable: false,
  498. sortLv: 0,
  499. status: true,
  500. fixed: '',
  501. },
  502. {
  503. userId: this.$store.state.user.name,
  504. functionId: 200003,
  505. serialNumber: '200003TableRollNo',
  506. tableId: "200003Table",
  507. tableName: "卷号",
  508. columnWidth: 200,
  509. columnProp: 'rollNo',
  510. headerAlign: 'left',
  511. align: "left",
  512. columnLabel: '卷号',
  513. columnHidden: false,
  514. columnImage: false,
  515. columnSortable: false,
  516. sortLv: 0,
  517. status: true,
  518. fixed: '',
  519. },
  520. {
  521. userId: this.$store.state.user.name,
  522. functionId: 200003,
  523. serialNumber: '200003TableSum',
  524. tableId: "200003Table",
  525. tableName: "数量",
  526. columnWidth: 200,
  527. columnProp: 'sum',
  528. headerAlign: 'right',
  529. align: "right",
  530. columnLabel: '数量',
  531. columnHidden: false,
  532. columnImage: false,
  533. columnSortable: false,
  534. sortLv: 0,
  535. status: true,
  536. fixed: '',
  537. },
  538. {
  539. userId: this.$store.state.user.name,
  540. functionId: 200003,
  541. serialNumber: '200003TableManufactureDate',
  542. tableId: "200003Table",
  543. tableName: "生产日期",
  544. columnWidth: 200,
  545. columnProp: 'manufactureDate',
  546. headerAlign: 'center',
  547. align: "center",
  548. columnLabel: '生产日期',
  549. columnHidden: false,
  550. columnImage: false,
  551. columnSortable: false,
  552. sortLv: 0,
  553. status: true,
  554. fixed: '',
  555. },
  556. {
  557. userId: this.$store.state.user.name,
  558. functionId: 200003,
  559. serialNumber: '200003TableEnterDate',
  560. tableId: "200003Table",
  561. tableName: "录入时间",
  562. columnWidth: 200,
  563. columnProp: 'enterDate',
  564. headerAlign: 'center',
  565. align: "center",
  566. columnLabel: '录入时间',
  567. columnHidden: false,
  568. columnImage: false,
  569. columnSortable: false,
  570. sortLv: 0,
  571. status: true,
  572. fixed: '',
  573. },
  574. ],
  575. rules: {
  576. warehouseId:[
  577. {
  578. required: true,
  579. message: ' ',
  580. trigger: ['blur','change']
  581. }
  582. ],
  583. locationId:[
  584. {
  585. required: true,
  586. message: ' ',
  587. trigger: ['blur','change']
  588. }
  589. ],
  590. site:[
  591. {
  592. required: true,
  593. message: ' ',
  594. trigger: ['blur','change']
  595. }
  596. ],
  597. locationName:[
  598. {
  599. required: true,
  600. message: ' ',
  601. trigger: ['blur','change']
  602. }
  603. ]
  604. },
  605. options: [],
  606. userBuList: [],
  607. authSearch: false,
  608. authSave: false,
  609. authUpdate: false,
  610. authDelete: false,
  611. menuId: this.$route.meta.menuId,
  612. }
  613. },
  614. mounted () {
  615. this.$nextTick(() => {
  616. this.height = (window.innerHeight- 260) / 2
  617. })
  618. },
  619. //页面加载前初始化着两个方法
  620. created () {
  621. this.getDataList()
  622. //this.getWareHouseList()
  623. },
  624. methods: {
  625. // 获取用户的bu
  626. getSiteAndBuByUserName () {
  627. let tempData = {
  628. username: this.$store.state.user.name,
  629. }
  630. getSiteAndBuByUserName(tempData).then(({data}) => {
  631. if (data.code === 0) {
  632. this.userBuList = data.rows
  633. }
  634. })
  635. },
  636. tabClick (tab, event) {
  637. // 刷新列表数据
  638. this.refreshCurrentTabTable()
  639. },
  640. changeData(row){
  641. this.currentRow = JSON.parse(JSON.stringify(row));
  642. this.headerData=row;
  643. this.refreshCurrentTabTable ();
  644. },
  645. refreshCurrentTabTable(){
  646. if(this.currentRow===''||this.currentRow===null){
  647. this.currentRow={site:'',transNo:''}
  648. }
  649. findByRoll(this.currentRow).then(({data}) => {
  650. //区分请求成功和失败的状况
  651. if (data && data.code == 0) {
  652. this.dataList2 = data.rows
  653. } else {
  654. this.dataList2 = [];
  655. }
  656. });
  657. },
  658. // 查询获取数据列表
  659. getDataList (){
  660. this.searchData.limit = this.pageSize
  661. this.searchData.page = this.pageIndex
  662. findTrans(this.searchData).then(({data}) => {
  663. if (data.code === 0) {
  664. this.dataList = data.page.list
  665. this.pageIndex = data.page.currPage
  666. this.pageSize = data.page.pageSize
  667. this.totalPage = data.page.totalCount
  668. // if(this.dataList.length>0){
  669. // this.$refs.mainTable.setCurrentRow(this.dataList[0]);
  670. // this.changeData(this.dataList[0])
  671. // }else {
  672. // this.changeData(null)
  673. // }
  674. }
  675. })
  676. },
  677. // 每页数
  678. sizeChangeHandle (val) {
  679. this.pageSize = val
  680. this.pageIndex = 1
  681. this.getDataList()
  682. },
  683. // 当前页
  684. currentChangeHandle (val) {
  685. this.pageIndex = val
  686. this.getDataList()
  687. },
  688. //导出excel
  689. async createExportData() {
  690. this.searchData.limit = -1
  691. this.searchData.page = 1
  692. await findTrans(this.searchData).then(({data}) => {
  693. this.exportList= data.rows
  694. })
  695. return this.exportList
  696. },
  697. startDownload() {},
  698. finishDownload() {},
  699. fields () {
  700. let json = "{"
  701. this.columnList.forEach((item, index) => {
  702. if (index == this.columnList.length - 1) {
  703. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  704. } else {
  705. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  706. }
  707. })
  708. json += "}"
  709. let s = eval("(" + json + ")")
  710. return s
  711. },
  712. // 动态列开始 获取 用户保存的 格式列
  713. async getTableUserColumn (tableId, columnId) {
  714. let queryTableUser = {
  715. userId: this.$store.state.user.name,
  716. functionId: this.$route.meta.menuId,
  717. tableId: tableId,
  718. status: true,
  719. languageCode: this.$i18n.locale
  720. }
  721. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  722. if (data.rows.length > 0) {
  723. //this.columnList1 = []
  724. switch (columnId) {
  725. case 1:
  726. this.columnList = data.rows
  727. break;
  728. // case 2:
  729. // this.columnDetailList = data.rows
  730. // break;
  731. // case 3:
  732. // this.columnList2 = data.rows
  733. // break;
  734. // case 4:
  735. // this.columnList3 = data.rows
  736. // break;
  737. }
  738. } else {
  739. this.getColumnList(tableId, columnId)
  740. }
  741. })
  742. },
  743. // 获取 tableDefault 列
  744. async getColumnList (tableId, columnId) {
  745. let queryTable = {
  746. functionId: this.$route.meta.menuId,
  747. tableId: tableId,
  748. languageCode: this.$i18n.locale
  749. }
  750. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  751. if (!data.rows.length == 0) {
  752. switch (columnId) {
  753. case 1:
  754. this.columnList = data.rows
  755. break;
  756. // case 2:
  757. // this.columnDetailList = data.rows
  758. // break;
  759. // case 3:
  760. // this.columnList2 = data.rows
  761. // break;
  762. // case 4:
  763. // this.columnList3 = data.rows
  764. // break;
  765. }
  766. } else {
  767. // this.showDefault = true.
  768. }
  769. })
  770. },
  771. //获取按钮的权限数据
  772. getButtonAuthData () {
  773. let searchFlag = this.isAuth(this.menuId+":search")
  774. let saveFlag = this.isAuth(this.menuId+":save")
  775. let updateFlag = this.isAuth(this.menuId+":update")
  776. let deleteFlag = this.isAuth(this.menuId+":delete")
  777. //处理页面的权限数据
  778. this.authSearch = !searchFlag
  779. this.authSave = !saveFlag
  780. this.authUpdate = !updateFlag
  781. this.authDelete = !deleteFlag
  782. },
  783. }
  784. }
  785. </script>