Commit e60990ba by zhuzhequan

保存加loading

parent 031a9060
...@@ -46,7 +46,9 @@ ...@@ -46,7 +46,9 @@
:close-on-click-modal='false' :close-on-click-modal='false'
:before-close='beforeClose' :before-close='beforeClose'
width='1000px' width='1000px'
> >
<div v-loading="saveLoading">
<el-form <el-form
size='mini' size='mini'
:inline='true' :inline='true'
...@@ -80,7 +82,7 @@ ...@@ -80,7 +82,7 @@
</div> </div>
<!-- 上传多个app文件 --> <!-- 上传多个app文件 -->
<el-form-item required class="el-col-24" label="上传文件"> <el-form-item required label="上传文件">
<!-- accept=".apk,.ipa" --> <!-- accept=".apk,.ipa" -->
<el-upload <el-upload
action action
...@@ -97,14 +99,16 @@ ...@@ -97,14 +99,16 @@
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
<div slot='footer'> <div slot='footer'>
<el-button size='small' @click='clone' <el-button :disabled="saveLoading" size='small' @click='clone'
>取 消 >取 消
</el-button </el-button
> >
<el-button <el-button
size='small' size='small'
type='primary' type='primary'
:disabled="saveLoading"
@click='submit' @click='submit'
>保 存 >保 存
</el-button </el-button
...@@ -129,6 +133,7 @@ export default { ...@@ -129,6 +133,7 @@ export default {
data() { data() {
return { return {
loading: false, loading: false,
saveLoading: false,
sourceData: [], sourceData: [],
dialogVisible: false, dialogVisible: false,
editForm: { editForm: {
...@@ -330,6 +335,7 @@ export default { ...@@ -330,6 +335,7 @@ export default {
message: '请上传文件!' message: '请上传文件!'
}) })
} }
this.saveLoading = true
const productionAssistantParams = this.formFile(this.fileList, { const productionAssistantParams = this.formFile(this.fileList, {
...this.editForm, ...this.editForm,
businessType: 'production_assistant' businessType: 'production_assistant'
...@@ -342,11 +348,15 @@ export default { ...@@ -342,11 +348,15 @@ export default {
type: 'success', type: 'success',
message: '保存成功!' message: '保存成功!'
}) })
this.saveLoading = false
this.resetForm() this.resetForm()
await this.getProductionAssistantList() await this.getProductionAssistantList()
this.dialogVisible = false this.dialogVisible = false
} else {
this.saveLoading = false
} }
} catch (error) { } catch (error) {
this.saveLoading = false
console.log('error:>>', error) console.log('error:>>', error)
} }
} }
...@@ -454,7 +464,7 @@ export default { ...@@ -454,7 +464,7 @@ export default {
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
} }
:deep() .el-button { .el-button {
font-size: 28px; font-size: 28px;
color: #8c939d; color: #8c939d;
text-align: center; text-align: center;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment