123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>Document</title>
- <link rel="stylesheet" href="../../../css/element.css">
- <link rel="stylesheet" href="../css/zidian.css">
- </head>
- <body>
- <div id="app" v-cloak>
- <nav class="header">
- <span id="text">查看字典</span>
- <span id="close" @click="clickClose"><i class="el-icon-close"></i></span>
- </nav>
- <el-container style="height: 100%;">
- <el-aside style="width: 200px; ">
- <el-menu active-text-color="#2eaafa" :default-openeds="['1']">
- <el-menu-item class="ellipsis" title="检验专业代码" index="1-0" @click="daimaClick">
- 药品编码</el-menu-item>
- <el-menu-item class="ellipsis" title="检验专业分类" index="1-1" @click="fenleiClick">
- 急救药品代码</el-menu-item>
- </el-aside>
- <el-main style="height: 100%;overflow: hidden;">
- <div class="flex">
- <span id="searchtext"> 字典项:</span>
- <el-input placeholder="请输入代码或者名称" id="typeSearch" v-model="searchKey">
- </el-input>
- <i class="el-icon-search" @click='searchClick'></i>
- </div>
- <el-table :data="tableData" border style="width: 100%" >
- <el-table-column type="index" label="序号" width='60'>
- </el-table-column>
- <el-table-column prop="code" label="值域编码">
- </el-table-column>
- <el-table-column prop="value" label="值域名称">
- </el-table-column>
- </el-table>
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
- :page-sizes="pageSizeArr" :page-size="pageSize" layout="total,sizes,prev, pager, next, jumper"
- :total="total">
- </el-pagination>
- </el-main>
- </el-container>
- </div>
- <script>
- window.noUse = true
- </script>
- <script src="../../../js/post.js"></script>
- <script src="../../../js/api/bigDataOut-api.js"></script>
- <script>
- new Vue({
- el: "#app",
- data: function () {
- return {
- currentPage: 1, //初始页
- pageSize: 10, // 每页的数据
- pageSizeArr: [2,5,10],
- searchKey: '',
- total: 0,
- tableData: [],
- hidden: true,
- code: "STD_MEDICINE",
- }
- },
- mounted: function () {
- this.getData()
- },
- methods: {
- clickClose:function(){
- top.layer.close(top.layer.getFrameIndex(window.name))
- },
- daimaClick: function () {
- this.code = 'STD_MEDICINE',
- this.initData()
- },
- fenleiClick: function () {
- this.code = 'CV08.50.301',
- this.initData()
- },
- handleCurrentChange: function (val) {
- this.currentPage = val;
- this.getData()
- },
- handleSizeChange: function (val) {
- this.pageSize = val;
- this.initData()
- },
- initData: function () { //初始化
- this.currentPage = 1;
- this.getData()
- },
- searchClick: function () {
- this.initData()
- },
- getData: function () {
- var vm = this;
- var params = {
- code: this.code,
- size: this.pageSize,
- page: this.currentPage
- }
- if (this.searchKey) {
- params.filters ="code?"+this.searchKey+" g1;value?"+this.searchKey+" g1"
- }
- GlobalEventBus.$emit('setLoading', {
- loading: true
- }); //等待效果
- bigDataOutApi.lastDictItem(params).then(function (res) {
- console.log(res)
- GlobalEventBus.$emit('setLoading');
- vm.tableData = res.detailModelList;
- vm.total = res.totalCount;
- }).catch(function (err) {
- console.log(err)
- GlobalEventBus.$emit('setLoading');
- })
- },
- }
- })
- </script>
- </body>
- </html>
|