1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
| <template>
| <div class="app-container">
| <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
| <el-form-item label="选择院区" prop="status">
| <el-select v-model="queryParams.status" clearable style="width: 240px">
| <el-option v-for="area in hospitalAreas" :key="area.hospAreaId" :label="area.hospAreaName"
| :value="area.hospAreaId" />
| </el-select>
| </el-form-item>
| <el-form-item>
| <el-button type="primary" size="mini" @click="tongbu(true)">同步字典</el-button>
| <el-button type="primary" size="mini" @click="tongbu(false)">只调用存储过程</el-button>
| </el-form-item>
| </el-form>
| </div>
| </template>
| <script>
| import { yuanqu, tongbuzidian } from "@/api/system/dict/type";
| export default {
| name: "Dict",
| data() {
| return {
|
| // 显示搜索条件
| showSearch: true,
| // 字典表格数据
| typeList: [],
| // 院区数据
| hospitalAreas: [],
| // 查询参数
| queryParams: {
| status: undefined
| },
| // 表单参数
| form: {},
| };
| },
| created() {
| yuanqu().then((res) => {
| this.hospitalAreas = res.data || [];
| console.log(res);
| });
| this.getList();
| },
| methods: {
| tongbu(t) {
| tongbuzidian(t).then((res) => {
| console.log(res);
| })
| },
| getAreaName(status) {
| const area = this.hospitalAreas.find(area => area.hospAreaId === status);
| return area ? area.hospAreaName : status;
| }
| }
| };
| </script>
|
|