zidian.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>Document</title>
  8. <link rel="stylesheet" href="../../../css/element.css">
  9. <link rel="stylesheet" href="../css/zidian.css">
  10. </head>
  11. <body>
  12. <div id="app" v-cloak>
  13. <nav class="header">
  14. <span id="text">查看字典</span>
  15. <span id="close" @click="clickClose"><i class="el-icon-close"></i></span>
  16. </nav>
  17. <el-container style="height: 100%;">
  18. <el-aside style="width: 200px; ">
  19. <el-menu active-text-color="#2eaafa" v-model="activeTab2" :default-openeds="['1']">
  20. <el-menu-item class="ellipsis" name="daiban" title="检验专业代码" index="1-0" @click="daimaClick">
  21. 检验专业代码</el-menu-item>
  22. <el-menu-item class="ellipsis" name="fenlei" title="检验专业分类" index="1-1" @click="fenleiClick">
  23. 检验专业分类</el-menu-item>
  24. </el-aside>      
  25. <el-main style="height: 100%;overflow: hidden;">
  26. <div class="flex">
  27. <span id="searchtext"> 字典项:</span>
  28. <el-input placeholder="请输入内容" id="typeSearch" v-model="searchKey">
  29. </el-input>
  30. <i class="el-icon-search" @click='searchClick'></i>
  31. </div>
  32. <el-table :data="tableData" border style="width: 100%" >
  33. <el-table-column type="index" label="序号" width='60'>
  34. </el-table-column>
  35. <el-table-column prop="code" label="值域编码">
  36. </el-table-column>
  37. <el-table-column prop="value" label="值域名称">
  38. </el-table-column>
  39. </el-table>
  40. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  41. :page-sizes="pageSizeArr" :page-size="pageSize" layout="total,sizes,prev, pager, next, jumper"
  42. :total="total">
  43. </el-pagination>
  44. </el-main>
  45. </el-container>
  46. </div>
  47. <script>
  48. window.noUse = true
  49. </script>
  50. <script src="../../../js/post.js"></script>
  51. <script src="../../../js/api/bigDataOut-api.js"></script>
  52. <script>
  53. new Vue({
  54. el: "#app",
  55. data: function () {
  56. return {
  57. activeTab2:"daiban",
  58. currentPage: 1, //初始页
  59. pageSize: 10, // 每页的数据
  60. pageSizeArr: [2,5,10],
  61. searchKey: '',
  62. total: 0,
  63. tableData: [],
  64. hidden: true,
  65. code: "STD_CHECK_ITEM",
  66. }
  67. },
  68. mounted: function () {
  69. this.getData()
  70. },
  71. methods: {
  72. clickClose:function(){
  73. top.layer.close(top.layer.getFrameIndex(window.name))
  74. },
  75. daimaClick: function () {
  76. this.code = 'STD_CHECK_ITEM',
  77. this.initData()
  78. },
  79. fenleiClick: function () {
  80. this.code = 'STD_LAB_EXAM_TYPE',
  81. this.initData()
  82. },
  83. handleCurrentChange: function (val) {
  84. this.currentPage = val;
  85. this.getData()
  86. },
  87. handleSizeChange: function (val) {
  88. this.pageSize = val;
  89. this.initData()
  90. },
  91. initData: function () { //初始化
  92. this.currentPage = 1;
  93. this.getData()
  94. },
  95. searchClick: function () {
  96. this.initData()
  97. },
  98. getData: function () {
  99. var vm = this;
  100. var params = {
  101. code: this.code,
  102. size: this.pageSize,
  103. page: this.currentPage
  104. }
  105. if (this.searchKey) {
  106. params.filters ="code?"+this.searchKey+" g1;value?"+this.searchKey+" g1"
  107. }
  108. GlobalEventBus.$emit('setLoading', {
  109. loading: true
  110. }); //等待效果
  111. bigDataOutApi.lastDictItem(params).then(function (res) {
  112. console.log(res)
  113. GlobalEventBus.$emit('setLoading');
  114. vm.tableData = res.detailModelList;
  115. vm.total = res.totalCount;
  116. }).catch(function (err) {
  117. console.log(err)
  118. GlobalEventBus.$emit('setLoading');
  119. })
  120. },
  121. }
  122. })
  123. </script>
  124. </body>
  125. </html>