From f6ba5de2578c58a738f35b29a708c523ccb518ba Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 05 十二月 2024 09:20:07 +0800
Subject: [PATCH] 最新版本541200007
---
admin/src/views/task/dangetDetail.vue | 48 +++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 43 insertions(+), 5 deletions(-)
diff --git a/admin/src/views/task/dangetDetail.vue b/admin/src/views/task/dangetDetail.vue
index 34ba35b..2651ddb 100644
--- a/admin/src/views/task/dangetDetail.vue
+++ b/admin/src/views/task/dangetDetail.vue
@@ -1,5 +1,5 @@
<template>
- <GlobalWindow :title="title" :visible.sync="isShowModal" @confirm="confirm">
+ <GlobalWindow :title="title" :visible.sync="isShowModal" @close="close" @confirm="confirm">
<div class="modal_wrap">
<div class="modal_content">
<div class="header">
@@ -191,7 +191,7 @@
>杞氦</el-button
>
<el-button @click="isShowBack = true" type="danger" plain>閫�鍥�</el-button>
- <el-button @click="isShowModal = false">杩斿洖</el-button>
+ <el-button @click="close">杩斿洖</el-button>
</template>
<!-- 鍚屾剰/鎷掔粷 -->
<el-dialog
@@ -258,6 +258,7 @@
class="avatar-uploader"
:action="uploadUrl"
:show-file-list="false"
+ :on-error="uploadError"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
>
@@ -291,6 +292,7 @@
:action="uploadUrl"
:show-file-list="false"
:on-success="handleAfterSuccess"
+ :on-error="uploadError"
:before-upload="beforeAvatarUpload"
>
<img v-if="param.url" :src="param.url" class="avatar" />
@@ -360,6 +362,7 @@
:action="uploadUrl"
:show-file-list="false"
:on-success="handleBackSuccess"
+ :on-error="uploadError"
:before-upload="beforeAvatarUpload"
>
<div class="upload_box">
@@ -406,6 +409,7 @@
<script>
import GlobalWindow from '@/components/common/GlobalWindow'
import { memberList } from '@/api/business/hiddenDangerParam'
+import { Loading } from 'element-ui'
import {
uploadFile,
hiddenDangerDetail,
@@ -420,7 +424,7 @@
id: '',
type: '',
uploadUrl: uploadFile,
-
+ loadingInstance: false,
title: '璁垮棰勭害璇︽儏',
isShowModal: false,
info: {},
@@ -481,12 +485,18 @@
this.subLoading = false
this.$tip.apiSuccess('澶勭悊鎴愬姛')
this.getDetail()
+ this.$emit('success')
+ this.$emit('close')
this.isShowProblem = false
})
.finally(() => {
this.subLoading = false
})
})
+ },
+ close(){
+ this.isShowModal = false
+ this.$emit('close')
},
onSubBack () {
this.$refs.backForm.validate((valid) => {
@@ -554,6 +564,11 @@
},
reject () { },
handleAvatarSuccess (res) {
+ this.$nextTick(() => { // 浠ユ湇鍔$殑鏂瑰紡璋冪敤鐨� Loading 闇�瑕佸紓姝ュ叧闂�
+ if(this.loadingInstance){
+ this.loadingInstance.close()
+ }
+ })
if (res.code === 200) {
const str = res.data.url.indexOf('png') > 0 || res.data.url.indexOf('jpg') > 0
const arr = this.handleParam.dealBeforeFileList || []
@@ -566,6 +581,11 @@
}
},
handleAfterSuccess (res) {
+ this.$nextTick(() => { // 浠ユ湇鍔$殑鏂瑰紡璋冪敤鐨� Loading 闇�瑕佸紓姝ュ叧闂�
+ if(this.loadingInstance){
+ this.loadingInstance.close()
+ }
+ })
if (res.code === 200) {
const str = res.data.url.indexOf('png') > 0 || res.data.url.indexOf('jpg') > 0
const arr = this.handleParam.dealAfterFileList || []
@@ -578,6 +598,11 @@
}
},
handleBackSuccess (res) {
+ this.$nextTick(() => { // 浠ユ湇鍔$殑鏂瑰紡璋冪敤鐨� Loading 闇�瑕佸紓姝ュ叧闂�
+ if(this.loadingInstance){
+ this.loadingInstance.close()
+ }
+ })
if (res.code === 200) {
const str = res.data.url.indexOf('png') > 0 || res.data.url.indexOf('jpg') > 0
const arr = this.backForm.dealBeforeFileList || []
@@ -589,12 +614,25 @@
this.$set(this.backForm, 'dealBeforeFileList', arr)
}
},
- beforeAvatarUpload () { }
+ beforeAvatarUpload () {
+ this.loadingInstance = Loading.service({
+ lock: true,
+ text: 'Loading',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+ },
+ uploadError() {
+ this.$nextTick(() => { // 浠ユ湇鍔$殑鏂瑰紡璋冪敤鐨� Loading 闇�瑕佸紓姝ュ叧闂�
+ this.loadingInstance.close()
+ })
+ },
}
}
</script>
<style lang="scss" scoped>
+@import "@/assets/style/variables.scss";
.upload_wrap {
display: flex;
flex-wrap: wrap;
@@ -794,7 +832,7 @@
font-size: 13px;
color: #888888;
.status {
- color: #00ba67;
+ color: $primaryColor;
}
}
.m_content {
--
Gitblit v1.9.3