|
@@ -1,94 +1,185 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="app-container">
|
3
|
3
|
<el-form :inline="true">
|
4
|
|
- <el-form-item label="姓名:">
|
|
4
|
+ <el-form-item label="诊所名称:">
|
5
|
5
|
<el-input
|
6
|
|
- v-model="form.doctorName"
|
7
|
|
- placeholder="请输入姓名查找"
|
|
6
|
+ v-model="clinicName"
|
|
7
|
+ placeholder="请输入诊所名称查找"
|
8
|
8
|
></el-input>
|
9
|
9
|
</el-form-item>
|
10
|
10
|
<el-form-item>
|
11
|
11
|
<el-button type="primary" @click="initList" icon="el-icon-search"
|
12
|
|
- >搜索</el-button
|
|
12
|
+ >搜索
|
|
13
|
+ </el-button
|
13
|
14
|
>
|
14
|
15
|
<el-button @click="reset">重置</el-button>
|
15
|
16
|
</el-form-item>
|
16
|
17
|
</el-form>
|
17
|
18
|
|
18
|
19
|
<el-row style="margin-bottom: 20px;">
|
19
|
|
- <el-button type="primary" plain icon="el-icon-plus" size="mini"
|
20
|
|
- >新增</el-button
|
|
20
|
+ <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="add()"
|
|
21
|
+ >新增
|
|
22
|
+ </el-button
|
21
|
23
|
>
|
22
|
24
|
</el-row>
|
23
|
25
|
|
24
|
26
|
<el-table :data="tableData" style="width: 100%">
|
25
|
|
- <el-table-column prop="date" label="日期" align="center">
|
|
27
|
+ <el-table-column prop="clinicCode" label="诊所编号" align="center">
|
26
|
28
|
</el-table-column>
|
27
|
|
- <el-table-column prop="name" label="姓名" align="center">
|
|
29
|
+ <el-table-column prop="clinicName" label="诊所名称" align="center">
|
|
30
|
+ </el-table-column>
|
|
31
|
+ <el-table-column prop="clinicIp" label="IP地址" align="center">
|
|
32
|
+ </el-table-column>
|
|
33
|
+ <el-table-column prop="phone" label="手机号" align="center">
|
|
34
|
+ </el-table-column>
|
|
35
|
+ <el-table-column prop="serverUser" label="服务器登录名" align="center">
|
|
36
|
+ </el-table-column>
|
|
37
|
+ <el-table-column prop="serverPassword" label="服务器密码" align="center">
|
|
38
|
+ </el-table-column>
|
|
39
|
+ <el-table-column prop="versionInfo" label="服务器版本编号" align="center">
|
|
40
|
+ </el-table-column>
|
|
41
|
+ <el-table-column prop="versionRefer" label="购买版本" align="center">
|
|
42
|
+ </el-table-column>
|
|
43
|
+ <el-table-column prop="creatTime" label="购买时间" align="center" width="170px">
|
|
44
|
+ </el-table-column>
|
|
45
|
+ <el-table-column prop="expireTime" label="到期时间" align="center" width="170px">
|
|
46
|
+ </el-table-column>
|
|
47
|
+ <el-table-column prop="isExpire" label="是否到期" align="center" width="170px">
|
|
48
|
+ <template slot-scope="scope">
|
|
49
|
+ <p v-if="scope.row.isExpire > 1" > 剩余天数({{scope.row.isExpire}}) </p>
|
|
50
|
+ <span v-else style="color: red">已到期</span>
|
|
51
|
+ </template>
|
28
|
52
|
</el-table-column>
|
29
|
53
|
<el-table-column prop="address" label="地址" align="center">
|
30
|
54
|
</el-table-column>
|
31
|
55
|
<el-table-column fixed="right" label="操作" align="center">
|
32
|
56
|
<template slot-scope="scope">
|
33
|
|
- <el-button type="text" size="small">编辑</el-button>
|
34
|
|
- <el-button type="text" size="small" style="color: red"
|
35
|
|
- >删除</el-button
|
36
|
|
- >
|
|
57
|
+ <el-button type="text" size="small" @click="">升级</el-button>
|
|
58
|
+ <el-button type="text" size="small" @click="edit(scope.row)">编辑</el-button>
|
|
59
|
+ <el-button type="text" size="small" style="color: red" @click="deleteData(scope.row.id)">删除
|
|
60
|
+ </el-button>
|
37
|
61
|
</template>
|
38
|
62
|
</el-table-column>
|
39
|
63
|
</el-table>
|
40
|
64
|
|
41
|
65
|
<pagination
|
42
|
|
- v-show="total > 0"
|
43
|
|
- :total="total"
|
44
|
|
- :page.sync="form.pageNum"
|
45
|
|
- :limit.sync="form.pageSize"
|
46
|
|
- @pagination="initList"
|
|
66
|
+ v-show="total > 0"
|
|
67
|
+ :total="total"
|
|
68
|
+ :page.sync="form.pageNum"
|
|
69
|
+ :limit.sync="form.pageSize"
|
|
70
|
+ @pagination="initList"
|
|
71
|
+ />
|
|
72
|
+ <addClinic
|
|
73
|
+ :onOpen="onOpen"
|
|
74
|
+ :title="title"
|
|
75
|
+ :pageType="pageType"
|
|
76
|
+ :dictType="dictType"
|
|
77
|
+ ref="addClinicRef"
|
|
78
|
+ @closeDialog="closeDialog"
|
47
|
79
|
/>
|
48
|
80
|
</div>
|
49
|
81
|
</template>
|
50
|
82
|
|
51
|
83
|
<script>
|
|
84
|
+import {clinictList,delClinict} from '@/api/allApi.js'
|
|
85
|
+import addClinic from "./addClinic.vue";
|
|
86
|
+import edit from "@/views/settingsPage/clinicOverview/edit.vue";
|
|
87
|
+
|
52
|
88
|
export default {
|
53
|
89
|
name: 'EitcErmPcIndex',
|
54
|
|
-
|
|
90
|
+ computed: {
|
|
91
|
+ },
|
|
92
|
+ components: {
|
|
93
|
+ addClinic
|
|
94
|
+ },
|
55
|
95
|
data() {
|
56
|
96
|
return {
|
|
97
|
+ onOpen: false,
|
|
98
|
+ title: ``,
|
|
99
|
+ dictType: ``,
|
57
|
100
|
form: {
|
58
|
101
|
pageNum: 1,
|
59
|
102
|
pageSize: 10
|
60
|
103
|
},
|
61
|
|
- tableData: [
|
62
|
|
- {
|
63
|
|
- date: '2016-05-02',
|
64
|
|
- name: '王小虎',
|
65
|
|
- address: '上海市普陀区金沙江路 1518 弄'
|
66
|
|
- },
|
67
|
|
- {
|
68
|
|
- date: '2016-05-04',
|
69
|
|
- name: '王小虎',
|
70
|
|
- address: '上海市普陀区金沙江路 1517 弄'
|
71
|
|
- },
|
72
|
|
- {
|
73
|
|
- date: '2016-05-01',
|
74
|
|
- name: '王小虎',
|
75
|
|
- address: '上海市普陀区金沙江路 1519 弄'
|
76
|
|
- },
|
77
|
|
- {
|
78
|
|
- date: '2016-05-03',
|
79
|
|
- name: '王小虎',
|
80
|
|
- address: '上海市普陀区金沙江路 1516 弄'
|
81
|
|
- }
|
82
|
|
- ],
|
83
|
|
- total: 0
|
|
104
|
+ clinicName: '',
|
|
105
|
+ data: {},
|
|
106
|
+ editData: {},
|
|
107
|
+ tableData: [],
|
|
108
|
+ total: 0,
|
|
109
|
+ pageType: 1,
|
84
|
110
|
}
|
85
|
111
|
},
|
86
|
112
|
|
87
|
|
- mounted() {},
|
|
113
|
+ mounted() {
|
|
114
|
+ this.initList('')
|
|
115
|
+ },
|
88
|
116
|
|
89
|
117
|
methods: {
|
90
|
|
- initList() {},
|
91
|
|
- reset() {}
|
|
118
|
+ /**
|
|
119
|
+ * 编辑
|
|
120
|
+ */
|
|
121
|
+ edit(val) {
|
|
122
|
+ this.onOpen = true;
|
|
123
|
+ this.pageType = 2;
|
|
124
|
+ this.$refs.addClinicRef.formData = val;
|
|
125
|
+ },
|
|
126
|
+ /**
|
|
127
|
+ * 新增
|
|
128
|
+ */
|
|
129
|
+ add(){
|
|
130
|
+ this.onOpen = true;
|
|
131
|
+ this.pageType = 1;
|
|
132
|
+ },
|
|
133
|
+ async initList() {
|
|
134
|
+ let obj = {}
|
|
135
|
+ if (this.clinicName.length>0){
|
|
136
|
+ obj = {clinicName: this.clinicName}
|
|
137
|
+ }
|
|
138
|
+ const res = await clinictList(obj)
|
|
139
|
+ this.tableData = res.rows;
|
|
140
|
+ this.tableData.forEach(x=>{
|
|
141
|
+ const today = new Date();
|
|
142
|
+ let endTime = new Date(Date.parse(x.expireTime.replace(/-/g, "/"))).getTime();
|
|
143
|
+ x.isExpire =Math.ceil(Math.abs((today - endTime)) / (1000 * 60 * 60 * 24));
|
|
144
|
+ })
|
|
145
|
+ },
|
|
146
|
+ /**
|
|
147
|
+ * 重置
|
|
148
|
+ */
|
|
149
|
+ reset() {
|
|
150
|
+ this.clinicName = ''
|
|
151
|
+ },
|
|
152
|
+ /**
|
|
153
|
+ * 关闭弹窗
|
|
154
|
+ */
|
|
155
|
+ closeDialog(){
|
|
156
|
+ this.onOpen = false;
|
|
157
|
+ },
|
|
158
|
+ /**
|
|
159
|
+ * 删除
|
|
160
|
+ */
|
|
161
|
+ deleteData(id) {
|
|
162
|
+ this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
|
|
163
|
+ confirmButtonText: '确定',
|
|
164
|
+ cancelButtonText: '取消',
|
|
165
|
+ type: 'warning'
|
|
166
|
+ }).then(() => {
|
|
167
|
+ delClinict(id).then(res => {
|
|
168
|
+ if (res.code !== 200) return this.$message.error(res.msg);
|
|
169
|
+ this.initList()
|
|
170
|
+ this.$message({
|
|
171
|
+ type: 'success',
|
|
172
|
+ message: '删除成功!'
|
|
173
|
+ });
|
|
174
|
+ })
|
|
175
|
+ }).catch(() => {
|
|
176
|
+ this.$message({
|
|
177
|
+ type: 'info',
|
|
178
|
+ message: '已取消删除'
|
|
179
|
+ });
|
|
180
|
+ });
|
|
181
|
+
|
|
182
|
+ }
|
92
|
183
|
}
|
93
|
184
|
}
|
94
|
|
-</script>
|
|
185
|
+</script>
|