table-check-layer.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <!--
  2. 表码详情
  3. @Author: linqian
  4. @Date: 2021-04-01 15:38
  5. -->
  6. <template>
  7. <div>
  8. <!-- 查询项 -->
  9. <el-form :inline="true" class="search-form">
  10. <el-form-item label="数据资源名称">
  11. <el-input v-model="condition.resourceName.value" placeholder="请输入数据资源名称" clearable></el-input>
  12. </el-form-item>
  13. <el-form-item>
  14. <dg-button type="primary" icon="el-icon-search" @click="handleSearch">查询</dg-button>
  15. </el-form-item>
  16. </el-form>
  17. <!-- 表格 -->
  18. <new-table
  19. ref="table"
  20. :tableUrl="tableUrl"
  21. :tableHeader="tableHeader"
  22. :condition="searchCondition"
  23. :tableOptList="tableOptList"
  24. @submitTableOpt="receviceOpt"
  25. ></new-table>
  26. </div>
  27. </template>
  28. <script>
  29. // 列权限清单弹框
  30. import columnCheckLayer from './column-check-layer';
  31. import newTable from '@/components/new-table';
  32. export default {
  33. props: {
  34. tab: String,
  35. codeDataTypeStr: String,
  36. idcard: {
  37. type: String,
  38. default: ''
  39. }
  40. },
  41. components: { newTable },
  42. data() {
  43. return {
  44. condition: {
  45. codeDataTypeStr: {
  46. value: '',
  47. op: '='
  48. },
  49. resourceName: {
  50. value: '',
  51. op: 'like'
  52. },
  53. idcard: {
  54. value: '',
  55. op: '='
  56. }
  57. },
  58. searchCondition: {},
  59. tableUrl: '/authsvr/v2/dataauth/dataDetailList',
  60. tableHeader: [
  61. {
  62. prop: 'resourceName',
  63. label: '数据资源名称'
  64. },
  65. {
  66. prop: 'tableCode',
  67. label: '数据资源英文名称'
  68. },
  69. {
  70. prop: 'resourceCode',
  71. label: '数据资源标识符'
  72. }
  73. ],
  74. tableOptList: ['查看列权限清单']
  75. };
  76. },
  77. computed: {},
  78. methods: {
  79. receviceOpt(opt, row) {
  80. this.handleViewColumnCheckList(row);
  81. },
  82. handleViewColumnCheckList(row) {
  83. const layer = this.$dgLayer({
  84. title: '列权限清单列表',
  85. content: columnCheckLayer,
  86. props: {
  87. tableList: row.dataItems
  88. },
  89. on: {
  90. success(params) {
  91. layer.close(layer.dialogIndex);
  92. }
  93. },
  94. cancel: function (index, layero) {
  95. // 关闭对应弹窗的ID
  96. layer.close(index);
  97. return false;
  98. },
  99. area: ['900px', '760px']
  100. });
  101. },
  102. handleSearch() {
  103. this.searchCondition = this.condition;
  104. this.$refs.table.handleSearch();
  105. }
  106. },
  107. created() {
  108. this.condition.codeDataTypeStr.value = this.codeDataTypeStr;
  109. this.condition.idcard.value = this.idcard;
  110. this.searchCondition = this.condition;
  111. },
  112. mounted() {}
  113. };
  114. </script>
  115. <style lang='scss'>
  116. </style>