|
@@ -1,39 +1,39 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div>
|
3
|
|
- <el-dialog :visible="upgradeOpen" @close="onClose" title="Dialog Title">
|
|
3
|
+ <el-dialog :visible="upgradeOpen" @close="onClose" title="升级">
|
4
|
4
|
<el-row :gutter="15">
|
5
|
5
|
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
|
6
|
6
|
|
7
|
7
|
<el-col :span="12">
|
8
|
|
- <el-form-item label="现在版本" prop="versionInfo">
|
9
|
|
- <el-input v-model="formData.versionInfo" placeholder="请输入现在版本" readonly :disabled='true' clearable
|
|
8
|
+ <el-form-item label="现在版本" prop="versionInfoOld">
|
|
9
|
+ <el-input v-model="formData.versionInfoOld" placeholder="请输入现在版本" readonly :disabled='true' clearable
|
10
|
10
|
:style="{width: '100%'}"></el-input>
|
11
|
11
|
</el-form-item>
|
12
|
12
|
</el-col>
|
13
|
13
|
<el-col :span="12">
|
14
|
|
- <el-form-item label="升级版本" prop="versionInfoNew">
|
15
|
|
- <el-input v-model="formData.versionInfoNew" placeholder="请输入升级版本" :maxlength="64" clearable
|
|
14
|
+ <el-form-item label="升级版本" prop="versionInfo">
|
|
15
|
+ <el-input v-model="formData.versionInfo" placeholder="请输入升级版本" :maxlength="64" clearable
|
16
|
16
|
:style="{width: '100%'}"></el-input>
|
17
|
17
|
</el-form-item>
|
18
|
18
|
</el-col>
|
19
|
|
- <el-col :span="24">
|
20
|
|
- <el-form-item label="上传升级包" prop="field102" required>
|
21
|
|
- <el-upload ref="field102" :file-list="field102fileList" :action="field102Action"
|
22
|
|
- :before-upload="field102BeforeUpload">
|
23
|
|
- <el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
|
24
|
|
- </el-upload>
|
25
|
|
- </el-form-item>
|
26
|
|
- </el-col>
|
|
19
|
+<!-- <el-col :span="24">-->
|
|
20
|
+<!-- <el-form-item label="上传升级包" prop="field102" required>-->
|
|
21
|
+<!-- <el-upload ref="field102" :file-list="field102fileList" :action="field102Action"-->
|
|
22
|
+<!-- :before-upload="field102BeforeUpload">-->
|
|
23
|
+<!-- <el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>-->
|
|
24
|
+<!-- </el-upload>-->
|
|
25
|
+<!-- </el-form-item>-->
|
|
26
|
+<!-- </el-col>-->
|
27
|
27
|
<el-col :span="12">
|
28
|
28
|
<el-form-item label="校验码" prop="vcode">
|
29
|
|
- <el-input v-model="formData.vcode" placeholder="请输入校验码" readonly :disabled='true' clearable
|
|
29
|
+ <el-input v-model="formData.vcode" placeholder="请输入校验码" clearable
|
30
|
30
|
:style="{width: '100%'}"></el-input>
|
31
|
31
|
</el-form-item>
|
32
|
|
- </el-col>
|
33
|
|
- <el-col :span="4">
|
34
|
|
- <el-form-item label-width="16px" label="" prop="field105">
|
35
|
|
- <el-button type="primary" size="medium"> 获取校验码 </el-button>
|
36
|
|
- </el-form-item>
|
|
32
|
+<!-- </el-col>-->
|
|
33
|
+<!-- <el-col :span="4">-->
|
|
34
|
+<!-- <el-form-item label-width="16px" label="" prop="field105">-->
|
|
35
|
+<!-- <el-button type="primary" size="medium"> 获取校验码 </el-button>-->
|
|
36
|
+<!-- </el-form-item>-->
|
37
|
37
|
</el-col>
|
38
|
38
|
</el-form>
|
39
|
39
|
</el-row>
|
|
@@ -45,6 +45,8 @@
|
45
|
45
|
</div>
|
46
|
46
|
</template>
|
47
|
47
|
<script>
|
|
48
|
+import {editClinict} from '@/api/allApi.js'
|
|
49
|
+
|
48
|
50
|
export default {
|
49
|
51
|
inheritAttrs: false,
|
50
|
52
|
components: {},
|
|
@@ -59,7 +61,12 @@ export default {
|
59
|
61
|
formData: {
|
60
|
62
|
},
|
61
|
63
|
rules: {
|
62
|
|
- versionInfoNew: [{
|
|
64
|
+ versionInfo: [{
|
|
65
|
+ required: true,
|
|
66
|
+ message: '请输入升级版本',
|
|
67
|
+ trigger: 'blur'
|
|
68
|
+ }],
|
|
69
|
+ vcode: [{
|
63
|
70
|
required: true,
|
64
|
71
|
message: '请输入升级版本',
|
65
|
72
|
trigger: 'blur'
|
|
@@ -85,11 +92,18 @@ export default {
|
85
|
92
|
close() {
|
86
|
93
|
this.$emit('closeDialog')
|
87
|
94
|
},
|
88
|
|
- handleConfirm() {
|
89
|
|
- this.$refs['elForm'].validate(valid => {
|
90
|
|
- if (!valid) return
|
91
|
|
- this.close()
|
92
|
|
- })
|
|
95
|
+ async handleConfirm() {
|
|
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
|
+ }
|
93
|
107
|
},
|
94
|
108
|
field102BeforeUpload(file) {
|
95
|
109
|
let isRightSize = file.size / 1024 / 1024 < 2
|