Browse Source

Merge branch 'master' of http://101.42.248.108:3000/wangyu/eitc-erm-pc

李帅 3 months ago
parent
commit
42070cfebd

+ 8 - 1
src/api/allApi.js

@@ -906,4 +906,11 @@ export function noticeManageDetails(params) {
906
     method: 'get',
906
     method: 'get',
907
     params
907
     params
908
   })
908
   })
909
-}
909
+}
910
+
911
+export function delClinict(id) {
912
+  return request({
913
+    url: `/sys/clinict/`+id,
914
+    method: 'delete'
915
+  })
916
+}

+ 121 - 80
src/views/settingsPage/clinicMaintenance/addClinic.vue

@@ -2,29 +2,32 @@
2
   <div>
2
   <div>
3
     <el-dialog :visible="onOpen" v-if="onOpen" @close="onClose" :title="pageType===1?`新增`:`编辑`">
3
     <el-dialog :visible="onOpen" v-if="onOpen" @close="onClose" :title="pageType===1?`新增`:`编辑`">
4
       <el-row :gutter="15">
4
       <el-row :gutter="15">
5
-        <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
5
+        <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="120px">
6
           <el-col :span="11">
6
           <el-col :span="11">
7
             <el-form-item label="诊所名称" prop="clinicName">
7
             <el-form-item label="诊所名称" prop="clinicName">
8
               <el-input v-model="formData.clinicName" placeholder="请输入诊所名称" clearable
8
               <el-input v-model="formData.clinicName" placeholder="请输入诊所名称" clearable
9
-                        :style="{width: '100%'}" :maxlength="64"></el-input>
9
+                        :style="{width: '100%'}" :maxlength="64"
10
+              ></el-input>
10
             </el-form-item>
11
             </el-form-item>
11
           </el-col>
12
           </el-col>
12
           <el-col :span="11">
13
           <el-col :span="11">
13
-            <el-form-item label="服务IP" prop="clinicIp">
14
-              <el-input v-model="formData.clinicIp" placeholder="请输入服务IP" clearable :style="{width: '100%'}">
14
+            <el-form-item label="IP地址" prop="clinicIp">
15
+              <el-input v-model="formData.clinicIp" placeholder="请输入IP地址" clearable :style="{width: '100%'}">
15
               </el-input>
16
               </el-input>
16
             </el-form-item>
17
             </el-form-item>
17
           </el-col>
18
           </el-col>
18
           <el-col :span="11">
19
           <el-col :span="11">
19
-            <el-form-item label="服务用户" prop="serverUser">
20
-              <el-input v-model="formData.serverUser" placeholder="请输入服务用户" clearable
21
-                        :style="{width: '100%'}"></el-input>
20
+            <el-form-item label="服务器登录名" prop="serverUser">
21
+              <el-input v-model="formData.serverUser" placeholder="请输入服务器登录名" clearable
22
+                        :style="{width: '100%'}"
23
+              ></el-input>
22
             </el-form-item>
24
             </el-form-item>
23
           </el-col>
25
           </el-col>
24
           <el-col :span="11">
26
           <el-col :span="11">
25
-            <el-form-item label="服务密码" prop="serverPassword">
26
-              <el-input v-model="formData.serverPassword" placeholder="请输入服务密码" clearable
27
-                        :style="{width: '100%'}"></el-input>
27
+            <el-form-item label="服务器密码" prop="serverPassword">
28
+              <el-input v-model="formData.serverPassword" placeholder="请输入服务器密码" clearable
29
+                        :style="{width: '100%'}"
30
+              ></el-input>
28
             </el-form-item>
31
             </el-form-item>
29
           </el-col>
32
           </el-col>
30
           <el-col :span="11">
33
           <el-col :span="11">
@@ -34,21 +37,26 @@
34
             </el-form-item>
37
             </el-form-item>
35
           </el-col>
38
           </el-col>
36
           <el-col :span="11">
39
           <el-col :span="11">
37
-            <el-form-item label="创建时间" prop="creatTime">
40
+            <el-form-item label="购买时间" prop="creatTime">
38
               <el-date-picker v-model="formData.creatTime" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
41
               <el-date-picker v-model="formData.creatTime" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
39
-                              :style="{width: '100%'}" placeholder="请输入创建时间" clearable></el-date-picker>
42
+                              :style="{width: '100%'}" placeholder="请选择购买时间" clearable
43
+                              :picker-options="pickerStartOptions"
44
+              ></el-date-picker>
40
             </el-form-item>
45
             </el-form-item>
41
           </el-col>
46
           </el-col>
42
           <el-col :span="11">
47
           <el-col :span="11">
43
             <el-form-item label="到期时间" prop="expireTime">
48
             <el-form-item label="到期时间" prop="expireTime">
44
               <el-date-picker v-model="formData.expireTime" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
49
               <el-date-picker v-model="formData.expireTime" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
45
-                              :style="{width: '100%'}" placeholder="请选择时间选择" clearable></el-date-picker>
50
+                              :style="{width: '100%'}" placeholder="请选择到期时间" clearable
51
+                              :picker-options="pickerEndOptions"
52
+              ></el-date-picker>
46
             </el-form-item>
53
             </el-form-item>
47
           </el-col>
54
           </el-col>
48
           <el-col :span="11">
55
           <el-col :span="11">
49
-            <el-form-item label="版本信息" prop="versionInfo">
50
-              <el-input v-model="formData.versionInfo" placeholder="请输入版本信息" clearable
51
-                        :style="{width: '100%'}"></el-input>
56
+            <el-form-item label="版本编号" prop="versionInfo">
57
+              <el-input v-model="formData.versionInfo" placeholder="请输入版本编号" clearable
58
+                        :style="{width: '100%'}"
59
+              ></el-input>
52
             </el-form-item>
60
             </el-form-item>
53
           </el-col>
61
           </el-col>
54
           <el-col :span="11">
62
           <el-col :span="11">
@@ -58,8 +66,8 @@
58
             </el-form-item>
66
             </el-form-item>
59
           </el-col>
67
           </el-col>
60
           <el-col :span="11">
68
           <el-col :span="11">
61
-            <el-form-item label="绑定手机" prop="phone">
62
-              <el-input v-model="formData.phone" placeholder="请输入绑定手机" clearable :style="{width: '100%'}">
69
+            <el-form-item label="手机" prop="phone">
70
+              <el-input v-model="formData.phone" placeholder="请输入手机" clearable :style="{width: '100%'}">
63
               </el-input>
71
               </el-input>
64
             </el-form-item>
72
             </el-form-item>
65
           </el-col>
73
           </el-col>
@@ -70,11 +78,13 @@
70
             </el-form-item>
78
             </el-form-item>
71
           </el-col>
79
           </el-col>
72
           <el-col :span="11">
80
           <el-col :span="11">
73
-            <el-form-item label="版本描述" prop="versionRefer">
74
-              <el-select v-model="formData.versionRefer" placeholder="请选择版本描述" clearable
75
-                         :style="{width: '100%'}">
81
+            <el-form-item label="购买版本" prop="versionRefer">
82
+              <el-select v-model="formData.versionRefer" placeholder="请选择购买版本" clearable
83
+                         :style="{width: '100%'}"
84
+              >
76
                 <el-option v-for="(item, index) in mobileOptions" :key="index" :label="item.label"
85
                 <el-option v-for="(item, index) in mobileOptions" :key="index" :label="item.label"
77
-                           :value="item.value" :disabled="item.disabled"></el-option>
86
+                           :value="item.value" :disabled="item.disabled"
87
+                ></el-option>
78
               </el-select>
88
               </el-select>
79
             </el-form-item>
89
             </el-form-item>
80
           </el-col>
90
           </el-col>
@@ -88,7 +98,7 @@
88
   </div>
98
   </div>
89
 </template>
99
 </template>
90
 <script>
100
 <script>
91
-import {addClinict, editClinict} from '@/api/allApi.js'
101
+import { addClinict, editClinict } from '@/api/allApi.js'
92
 
102
 
93
 export default {
103
 export default {
94
   components: {},
104
   components: {},
@@ -116,23 +126,38 @@ export default {
116
         region: ``,
126
         region: ``,
117
         phone: ``,
127
         phone: ``,
118
         address: ``,
128
         address: ``,
119
-        versionRefer: ``,
129
+        versionRefer: ``
130
+      },
131
+      pickerStartOptions: {
132
+        disabledDate: (time) => {
133
+
134
+          if (this.formData.expireTime !== null) {
135
+            return time.getTime() > new Date(this.formData.expireTime).getTime()
136
+          }
137
+        }
138
+      },
139
+      pickerEndOptions: {
140
+        disabledDate: (time) => {
141
+          if (this.formData.creatTime !== null){
142
+            return time.getTime() < new Date(this.formData.creatTime).getTime()
143
+          }
144
+        }
120
       },
145
       },
121
       mobileOptions: [{
146
       mobileOptions: [{
122
-        "label": "免费版",
123
-        "value": "免费版"
124
-      },{
125
-        "label": "基础版",
126
-        "value": "基础版"
147
+        'label': '免费版',
148
+        'value': '免费版'
127
       }, {
149
       }, {
128
-        "label": "高级版",
129
-        "value": "高级版"
150
+        'label': '基础版',
151
+        'value': '基础版'
130
       }, {
152
       }, {
131
-        "label": "豪华版",
132
-        "value": "豪华版"
153
+        'label': '高级版',
154
+        'value': '高级版'
133
       }, {
155
       }, {
134
-        "label": "尊贵版",
135
-        "value": "尊贵版"
156
+        'label': '豪华版',
157
+        'value': '豪华版'
158
+      }, {
159
+        'label': '尊贵版',
160
+        'value': '尊贵版'
136
       }],
161
       }],
137
       rules: {
162
       rules: {
138
         clinicName: [{
163
         clinicName: [{
@@ -142,21 +167,21 @@ export default {
142
         }],
167
         }],
143
         clinicIp: [{
168
         clinicIp: [{
144
           required: true,
169
           required: true,
145
-          message: '请输入服务IP',
170
+          message: '请输入IP地址',
146
           trigger: 'blur'
171
           trigger: 'blur'
147
         }, {
172
         }, {
148
           pattern: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
173
           pattern: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
149
-          message: '服务IP格式错误',
174
+          message: 'IP地址格式错误',
150
           trigger: 'blur'
175
           trigger: 'blur'
151
         }],
176
         }],
152
         serverUser: [{
177
         serverUser: [{
153
           required: true,
178
           required: true,
154
-          message: '请输入服务用户',
179
+          message: '请输入服务器登录名',
155
           trigger: 'blur'
180
           trigger: 'blur'
156
         }],
181
         }],
157
         serverPassword: [{
182
         serverPassword: [{
158
           required: true,
183
           required: true,
159
-          message: '请输入服务密码',
184
+          message: '请输入服务密码',
160
           trigger: 'blur'
185
           trigger: 'blur'
161
         }],
186
         }],
162
         realmName: [{
187
         realmName: [{
@@ -166,17 +191,17 @@ export default {
166
         }],
191
         }],
167
         creatTime: [{
192
         creatTime: [{
168
           required: true,
193
           required: true,
169
-          message: '请输入创建时间',
194
+          message: '请选择购买时间',
170
           trigger: 'change'
195
           trigger: 'change'
171
         }],
196
         }],
172
         expireTime: [{
197
         expireTime: [{
173
           required: true,
198
           required: true,
174
-          message: '请选择时间选择',
199
+          message: '请选择到期时间',
175
           trigger: 'change'
200
           trigger: 'change'
176
         }],
201
         }],
177
         versionInfo: [{
202
         versionInfo: [{
178
           required: true,
203
           required: true,
179
-          message: '请输入版本信息',
204
+          message: '请输入版本编号',
180
           trigger: 'blur'
205
           trigger: 'blur'
181
         }],
206
         }],
182
         region: [{
207
         region: [{
@@ -186,7 +211,7 @@ export default {
186
         }],
211
         }],
187
         phone: [{
212
         phone: [{
188
           required: true,
213
           required: true,
189
-          message: '请输入绑定手机',
214
+          message: '请输入手机',
190
           trigger: 'blur'
215
           trigger: 'blur'
191
         }, {
216
         }, {
192
           pattern: /^1(3|4|5|7|8|9)\d{9}$/,
217
           pattern: /^1(3|4|5|7|8|9)\d{9}$/,
@@ -200,19 +225,24 @@ export default {
200
         }],
225
         }],
201
         versionRefer: [{
226
         versionRefer: [{
202
           required: true,
227
           required: true,
203
-          message: '请输入版本描述',
228
+          message: '请选择购买版本',
204
           trigger: 'blur'
229
           trigger: 'blur'
205
-        }],
206
-      },
230
+        }]
231
+      }
207
     }
232
     }
208
   },
233
   },
209
-  computed: {},
210
-  watch: {},
234
+  computed:
235
+      {}
236
+  ,
237
+  watch: {}
238
+  ,
211
   created() {
239
   created() {
212
-  },
240
+  }
241
+  ,
213
   mounted() {
242
   mounted() {
214
 
243
 
215
-  },
244
+  }
245
+  ,
216
   methods: {
246
   methods: {
217
     onClose() {
247
     onClose() {
218
       this.$emit('closeDialog')
248
       this.$emit('closeDialog')
@@ -220,39 +250,50 @@ export default {
220
         creatTime: null,
250
         creatTime: null,
221
         expireTime: null
251
         expireTime: null
222
       }
252
       }
223
-    },
224
-    async handleConfirm() {
225
-      /**
226
-       * 新增
227
-       */
228
-      if (this.pageType === 1) {
229
-        const res = await addClinict(this.formData)
230
-        if (res.code === 200) {
231
-          this.$emit('closeDialog')
232
-          this.$emit('initList')
233
-          this.$message.success('保存成功')
234
-        } else {
235
-          this.$message.error(res.msg)
236
-        }
237
-      } else {
238
-        /**
239
-         * 编辑
240
-         */
241
-        console.log(this.formData)
242
-        const res = await editClinict(this.formData)
243
-        if (res.code === 200) {
244
-          this.$emit('initList')
245
-          this.$emit('closeDialog')
246
-          this.$message.success('保存成功')
247
-          this.formData = {
248
-            creatTime: null,
249
-            expireTime: null
253
+    }
254
+    ,
255
+    handleConfirm() {
256
+
257
+      this.$refs.elForm.validate(async(valid) => {
258
+        if (valid) {
259
+          /**
260
+           * 新增
261
+           */
262
+          if (this.pageType === 1) {
263
+            const res = await addClinict(this.formData)
264
+            if (res.code === 200) {
265
+              this.$emit('closeDialog')
266
+              this.$emit('initList')
267
+              this.$message.success('保存成功')
268
+            } else {
269
+              this.$message.error(res.msg)
270
+            }
271
+          } else {
272
+            /**
273
+             * 编辑
274
+             */
275
+            console.log(this.formData)
276
+            const res = await editClinict(this.formData)
277
+            if (res.code === 200) {
278
+              this.$emit('initList')
279
+              this.$emit('closeDialog')
280
+              this.$message.success('保存成功')
281
+              this.formData = {
282
+                creatTime: null,
283
+                expireTime: null
284
+              }
285
+            } else {
286
+              this.$message.error(res.msg)
287
+            }
250
           }
288
           }
251
         } else {
289
         } else {
252
-          this.$message.error(res.msg)
290
+          console.log('error submit!!')
291
+          return false
253
         }
292
         }
254
-      }
255
-    },
293
+      })
294
+
295
+    }
296
+
256
   }
297
   }
257
 }
298
 }
258
 
299
 

+ 29 - 22
src/views/settingsPage/clinicMaintenance/index.vue

@@ -24,36 +24,36 @@
24
     </el-row>
24
     </el-row>
25
 
25
 
26
     <el-table :data="tableData" style="width: 100%">
26
     <el-table :data="tableData" style="width: 100%">
27
-      <el-table-column prop="clinicCode" label="诊所编号" align="center">
27
+      <el-table-column prop="clinicCode" label="诊所编号" align="center" show-overflow-tooltip>
28
       </el-table-column>
28
       </el-table-column>
29
-      <el-table-column prop="clinicName" label="诊所名称" align="center">
29
+      <el-table-column prop="clinicName" label="诊所名称" align="center" show-overflow-tooltip>
30
       </el-table-column>
30
       </el-table-column>
31
-      <el-table-column prop="clinicIp" label="IP地址" align="center">
31
+      <el-table-column prop="clinicIp" label="IP地址" align="center" show-overflow-tooltip>
32
       </el-table-column>
32
       </el-table-column>
33
-      <el-table-column prop="phone" label="手机号" align="center">
33
+      <el-table-column prop="phone" label="手机号" align="center" show-overflow-tooltip>
34
       </el-table-column>
34
       </el-table-column>
35
-      <el-table-column prop="serverUser" label="服务器登录名" align="center">
35
+      <el-table-column prop="serverUser" label="服务器登录名" align="center" show-overflow-tooltip>
36
       </el-table-column>
36
       </el-table-column>
37
-      <el-table-column prop="serverPassword" label="服务器密码" align="center">
37
+      <el-table-column prop="serverPassword" label="服务器密码" align="center" show-overflow-tooltip>
38
       </el-table-column>
38
       </el-table-column>
39
-      <el-table-column prop="versionInfo" label="服务器版本编号" align="center">
39
+      <el-table-column prop="versionInfo" label="版本编号" align="center" show-overflow-tooltip>
40
       </el-table-column>
40
       </el-table-column>
41
-      <el-table-column prop="versionRefer" label="购买版本" align="center">
41
+      <el-table-column prop="versionRefer" label="购买版本" align="center" show-overflow-tooltip>
42
       </el-table-column>
42
       </el-table-column>
43
-      <el-table-column prop="creatTime" label="购买时间" align="center" width="170px">
43
+      <el-table-column prop="creatTime" label="购买时间" align="center" width="150px" show-overflow-tooltip>
44
       </el-table-column>
44
       </el-table-column>
45
-      <el-table-column prop="expireTime" label="到期时间" align="center" width="170px">
45
+      <el-table-column prop="expireTime" label="到期时间" align="center" width="150px" show-overflow-tooltip>
46
       </el-table-column>
46
       </el-table-column>
47
-      <el-table-column prop="isExpire" label="是否到期" align="center" width="170px">
47
+      <el-table-column prop="isExpire" label="是否到期" align="center" width="150px" show-overflow-tooltip>
48
         <template slot-scope="scope">
48
         <template slot-scope="scope">
49
           <p v-if="scope.row.isExpire > 30 "  style="color: green"> 剩余天数({{scope.row.isExpire}}) </p>
49
           <p v-if="scope.row.isExpire > 30 "  style="color: green"> 剩余天数({{scope.row.isExpire}}) </p>
50
           <p v-else-if="scope.row.isExpire > 1 && scope.row.isExpire < 31"  style="color: orange"> 剩余天数({{scope.row.isExpire}}) </p>
50
           <p v-else-if="scope.row.isExpire > 1 && scope.row.isExpire < 31"  style="color: orange"> 剩余天数({{scope.row.isExpire}}) </p>
51
           <span v-else style="color: red">已到期</span>
51
           <span v-else style="color: red">已到期</span>
52
         </template>
52
         </template>
53
       </el-table-column>
53
       </el-table-column>
54
-      <el-table-column prop="address" label="地址" align="center">
54
+      <el-table-column prop="address" label="地址" align="center" show-overflow-tooltip>
55
       </el-table-column>
55
       </el-table-column>
56
-      <el-table-column fixed="right" label="操作" align="center">
56
+      <el-table-column fixed="right" label="操作" align="center" width="150">
57
         <template slot-scope="scope">
57
         <template slot-scope="scope">
58
           <el-button type="text" size="small" @click="upgrade(scope.row)">升级</el-button>
58
           <el-button type="text" size="small" @click="upgrade(scope.row)">升级</el-button>
59
           <el-button type="text" size="small" @click="edit(scope.row)">编辑</el-button>
59
           <el-button type="text" size="small" @click="edit(scope.row)">编辑</el-button>
@@ -91,6 +91,8 @@
91
 import {clinictList,delClinict} from '@/api/allApi.js'
91
 import {clinictList,delClinict} from '@/api/allApi.js'
92
 import addClinic from "./addClinic.vue";
92
 import addClinic from "./addClinic.vue";
93
 import upgrade from "./upgrade.vue";
93
 import upgrade from "./upgrade.vue";
94
+// 分页组件
95
+import Pagination from "@/components/Pagination";
94
 
96
 
95
 export default {
97
 export default {
96
   name: 'EitcErmPcIndex',
98
   name: 'EitcErmPcIndex',
@@ -130,7 +132,7 @@ export default {
130
     edit(val) {
132
     edit(val) {
131
       this.onOpen = true;
133
       this.onOpen = true;
132
       this.pageType = 2;
134
       this.pageType = 2;
133
-      this.$refs.addClinicRef.formData = val;
135
+      this.$refs.addClinicRef.formData = { ...val };
134
     },
136
     },
135
     /**
137
     /**
136
      * 新增
138
      * 新增
@@ -149,23 +151,28 @@ export default {
149
       console.log(val)
151
       console.log(val)
150
     },
152
     },
151
     async initList() {
153
     async initList() {
152
-      let obj = {}
154
+      let obj = {pageNum: this.form.pageNum,pageSize: this.form.pageSize}
153
       if (this.clinicName.length>0){
155
       if (this.clinicName.length>0){
154
         obj = {clinicName: this.clinicName}
156
         obj = {clinicName: this.clinicName}
155
       }
157
       }
156
       const res = await clinictList(obj)
158
       const res = await clinictList(obj)
157
-      this.tableData = res.rows;
158
-      this.tableData.forEach(x=>{
159
-        const today = new Date();
160
-        let endTime = new Date(Date.parse(x.expireTime.replace(/-/g, "/"))).getTime();
161
-        x.isExpire =Math.ceil(Math.abs((today - endTime)) / (1000 * 60 * 60 * 24));
162
-      })
159
+      if (res.code === 200){
160
+        this.total = res.total;
161
+        this.tableData = res.rows;
162
+        this.tableData.forEach(x=>{
163
+          const today = new Date();
164
+          let endTime = new Date(Date.parse(x.expireTime.replace(/-/g, "/"))).getTime();
165
+          x.isExpire =Math.ceil(Math.abs((today - endTime)) / (1000 * 60 * 60 * 24));
166
+        })
167
+        this.loading = false;
168
+      }
163
     },
169
     },
164
     /**
170
     /**
165
      * 重置
171
      * 重置
166
      */
172
      */
167
     reset() {
173
     reset() {
168
       this.clinicName = ''
174
       this.clinicName = ''
175
+      this.initList('')
169
     },
176
     },
170
     /**
177
     /**
171
      * 关闭弹窗
178
      * 关闭弹窗
@@ -178,7 +185,7 @@ export default {
178
      * 删除
185
      * 删除
179
      */
186
      */
180
     deleteData(id) {
187
     deleteData(id) {
181
-      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
188
+      this.$confirm('此操作将永久删除该, 是否继续?', '提示', {
182
         confirmButtonText: '确定',
189
         confirmButtonText: '确定',
183
         cancelButtonText: '取消',
190
         cancelButtonText: '取消',
184
         type: 'warning'
191
         type: 'warning'

+ 17 - 12
src/views/settingsPage/clinicMaintenance/upgrade.vue

@@ -1,6 +1,6 @@
1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
-    <el-dialog :visible="upgradeOpen" @close="onClose" title="升级">
3
+    <el-dialog :visible="upgradeOpen" v-if="upgradeOpen"   @close="onClose" title="升级">
4
       <el-row :gutter="15">
4
       <el-row :gutter="15">
5
         <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
5
         <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
6
 
6
 
@@ -68,7 +68,7 @@ export default {
68
         }],
68
         }],
69
         vcode: [{
69
         vcode: [{
70
           required: true,
70
           required: true,
71
-          message: '请输入升级版本',
71
+          message: '请输入校验码',
72
           trigger: 'blur'
72
           trigger: 'blur'
73
         }]
73
         }]
74
       },
74
       },
@@ -94,16 +94,21 @@ export default {
94
     },
94
     },
95
     async handleConfirm() {
95
     async handleConfirm() {
96
       console.log(this.formData)
96
       console.log(this.formData)
97
-      const res = await editClinict(this.formData)
98
-      if (res.code === 200) {
99
-        this.$emit('initList')
100
-        this.$emit('closeDialog')
101
-        this.$message.success('保存成功')
102
-        this.formData = {}
103
-      } else {
104
-        this.$message.error(res.msg)
105
-        this.$emit('closeDialog')
106
-      }
97
+      this.$refs.elForm.validate(async(valid) => {
98
+        if (valid) {
99
+          const res = await editClinict(this.formData)
100
+          if (res.code === 200) {
101
+            this.$emit('initList')
102
+            this.$emit('closeDialog')
103
+            this.$message.success('保存成功')
104
+            this.formData = {}
105
+          } else {
106
+            this.$message.error(res.msg)
107
+            this.$emit('closeDialog')
108
+          }
109
+        }
110
+      })
111
+
107
     },
112
     },
108
     field102BeforeUpload(file) {
113
     field102BeforeUpload(file) {
109
       let isRightSize = file.size / 1024 / 1024 < 2
114
       let isRightSize = file.size / 1024 / 1024 < 2