@ -149,14 +149,15 @@
< el -dialog
< el -dialog
: visible . sync = "definitionUpdateDialog"
: visible . sync = "definitionUpdateDialog"
v - if = "definitionUpdateDialog"
append - to - body = "true"
append - to - body = "true"
width = "auto" >
width = "auto" >
< m -definition -update :type ="type" @onProgressDefinition ="onProgressDefinition" @onUpdateDefinition ="onUpdateDefinition" @onArchiveDefinition ="onArchiveDefinition" @closeDefinition ="closeDefinition" > < / m -definition -update >
< m -definition -update :type ="type" @onProgressDefinition ="onProgressDefinition" @onUpdateDefinition ="onUpdateDefinition" @onArchiveDefinition ="onArchiveDefinition" @closeDefinition ="closeDefinition" > < / m -definition -update >
< / e l - d i a l o g >
< / e l - d i a l o g >
< el -dialog
< el -dialog
id = "fileUpdateDialog"
: visible . sync = "fileUpdateDialog"
: visible . sync = "fileUpdateDialog"
v - if = "fileUpdateDialog"
append - to - body = "true"
append - to - body = "true"
width = "auto" >
width = "auto" >
< m -file -update :type ="type" @onProgressFileUpdate ="onProgressFileUpdate" @onUpdateFileUpdate ="onUpdateFileUpdate" @onArchiveDefinition ="onArchiveFileUpdate" @closeFileUpdate ="closeFileUpdate" > < / m -file -update >
< m -file -update :type ="type" @onProgressFileUpdate ="onProgressFileUpdate" @onUpdateFileUpdate ="onUpdateFileUpdate" @onArchiveDefinition ="onArchiveFileUpdate" @closeFileUpdate ="closeFileUpdate" > < / m -file -update >
@ -164,6 +165,7 @@
< el -dialog
< el -dialog
: visible . sync = "fileChildUpdateDialog"
: visible . sync = "fileChildUpdateDialog"
v - if = "fileChildUpdateDialog"
append - to - body = "true"
append - to - body = "true"
width = "auto" >
width = "auto" >
< m -file -child -update :type ="type" :id ="id" @onProgressFileChildUpdate ="onProgressFileChildUpdate" @onUpdateFileChildUpdate ="onUpdateFileChildUpdate" @onArchiveFileChildUpdate ="onArchiveFileChildUpdate" @closeFileChildUpdate ="closeFileChildUpdate" > < / m -file -child -update >
< m -file -child -update :type ="type" :id ="id" @onProgressFileChildUpdate ="onProgressFileChildUpdate" @onUpdateFileChildUpdate ="onUpdateFileChildUpdate" @onArchiveFileChildUpdate ="onArchiveFileChildUpdate" @closeFileChildUpdate ="closeFileChildUpdate" > < / m -file -child -update >
@ -171,20 +173,27 @@
< el -dialog
< el -dialog
: visible . sync = "resourceChildUpdateDialog"
: visible . sync = "resourceChildUpdateDialog"
v - if = "resourceChildUpdateDialog"
append - to - body = "true"
append - to - body = "true"
width = "auto" >
width = "auto" >
< m -resource -child -update :type ="type" :id ="id" @onProgressResourceChildUpdate ="onProgressResourceChildUpdate" @onUpdateResourceChildUpdate ="onUpdateResourceChildUpdate" @onArchiveFileChildUpdate ="onArchiveResourceChildUpdate" @closeResourceChildUpdate ="closeResourceChildUpdate" > < / m -resource -child -update >
< m -resource -child -update :type ="type" :id ="id" @onProgressResourceChildUpdate ="onProgressResourceChildUpdate" @onUpdateResourceChildUpdate ="onUpdateResourceChildUpdate" @onArchiveFileChildUpdate ="onArchiveResourceChildUpdate" @closeResourceChildUpdate ="closeResourceChildUpdate" > < / m -resource -child -update >
< / e l - d i a l o g >
< / e l - d i a l o g >
< el -dialog
< el -dialog
: visible . sync = "fileUploadDialog"
: visible . sync = "fileReUploadDialog"
v - if = "fileReUploadDialog"
append - to - body = "true"
append - to - body = "true"
width = "auto" >
width = "auto" >
< m -file -upload
< m -file -re -upload :type ="type" :fileName ="fileName" :id ="id" :desc ="desc" @onProgress ="onProgressReUpload" @onUpdate ="onUpdateReUpload" @onArchive ="onArchiveReUpload" @closeReUpload ="closeReUpload" > < / m -file -re -upload >
: originalFileData = "originalFileData"
< / e l - d i a l o g >
@ onUploadFile = "onUploadFile"
@ closeFileUpload = "closeFileUpload" >
< el -dialog
< / m - f i l e - u p l o a d >
: visible . sync = "fileChildReUploadDialog"
append - to - body = "true"
: destroy - on - close = "true"
v - if = "fileChildReUploadDialog"
width = "auto" >
< m -file -child -re -update :type ="type" :fileName ="fileName" :id ="id" :desc ="desc" @onProgress ="onProgressChildReUpload" @onUpdate ="onUpdateChildReUpload" @onArchive ="onArchiveChildReUpload" @closeReUpload ="closeChildReUpload" > < / m -file -child -re -update >
< / e l - d i a l o g >
< / e l - d i a l o g >
< / div >
< / div >
< / template >
< / template >
@ -193,11 +202,12 @@
import cookies from 'js-cookie'
import cookies from 'js-cookie'
import { mapState , mapActions } from 'vuex'
import { mapState , mapActions } from 'vuex'
import { findComponentDownward } from '@/module/util/'
import { findComponentDownward } from '@/module/util/'
import mFileReUpload from '@/module/components/fileUpdate/fileReUpload'
import mFileUpdate from '@/module/components/fileUpdate/fileUpdate'
import mFileUpdate from '@/module/components/fileUpdate/fileUpdate'
import mFileChildUpdate from '@/module/components/fileUpdate/fileChildUpdate'
import mFileChildUpdate from '@/module/components/fileUpdate/fileChildUpdate'
import mResourceChildUpdate from '@/module/components/fileUpdate/resourceChildUpdate'
import mResourceChildUpdate from '@/module/components/fileUpdate/resourceChildUpdate'
import mFileChildReUpdate from '@/module/components/fileUpdate/fileChildReUpdate'
import mDefinitionUpdate from '@/module/components/fileUpdate/definitionUpdate'
import mDefinitionUpdate from '@/module/components/fileUpdate/definitionUpdate'
import mFileUpload from '@/module/components/fileUpdate/fileReUpload'
import mProgressBar from '@/module/components/progressBar/progressBar'
import mProgressBar from '@/module/components/progressBar/progressBar'
import { findLocale , localeList } from '@/module/i18n/config'
import { findLocale , localeList } from '@/module/i18n/config'
@ -227,10 +237,11 @@
fileChildUpdateDialog : false ,
fileChildUpdateDialog : false ,
id : null ,
id : null ,
fileName : '' ,
fileName : '' ,
description : '' ,
desc : '' ,
originalFileData : { } ,
resourceChildUpdateDialog : false ,
resourceChildUpdateDialog : false ,
fileUploadDialog : false
fileReUploadDialog : false ,
fileChildReUploadDialog : false ,
data : ''
}
}
} ,
} ,
@ -253,6 +264,30 @@
this . _signOut ( )
this . _signOut ( )
}
}
} ,
} ,
/* fileReUpload */
_fileReUpload ( type , item ) {
if ( this . progress ) {
this . _toggleArchive ( )
return
}
this . fileReUploadDialog = true
this . type = type
this . fileName = item . fileName
this . desc = item . description
this . id = item . id
} ,
_fileChildReUpload ( type , item , data ) {
if ( this . progress ) {
this . _toggleArchive ( )
return
}
this . fileReUploadDialog = true
this . type = type
this . fileName = item . fileName
this . desc = item . description
this . id = item . id
this . data = data
} ,
/ * *
/ * *
* Upload ( for the time being )
* Upload ( for the time being )
* /
* /
@ -295,17 +330,6 @@
this . progress = 0
this . progress = 0
this . fileUpdateDialog = false
this . fileUpdateDialog = false
} ,
} ,
onUploadFile ( ) {
let self = this
findComponentDownward ( self . $root , 'resource-list-index-FILE' ) . _updateList ( )
this . isUpdate = false
this . progress = 0
this . fileUploadDialog = false
} ,
closeFileUpload ( ) {
this . progress = 0
this . fileUploadDialog = false
} ,
onArchiveFileUpdate ( ) {
onArchiveFileUpdate ( ) {
this . isUpdate = true
this . isUpdate = true
} ,
} ,
@ -322,14 +346,7 @@
this . id = data
this . id = data
this . fileChildUpdateDialog = true
this . fileChildUpdateDialog = true
} ,
} ,
_fileReUpload ( item ) {
if ( this . progress ) {
this . _toggleArchive ( )
return
}
this . originalFileData = item
this . fileUploadDialog = true
} ,
onProgressFileChildUpdate ( val ) {
onProgressFileChildUpdate ( val ) {
this . progress = val
this . progress = val
} ,
} ,
@ -395,6 +412,40 @@
setTimeout ( ( ) => {
setTimeout ( ( ) => {
window . location . reload ( )
window . location . reload ( )
} , 100 )
} , 100 )
} ,
onProgressReUpload ( val ) {
this . progress = val
} ,
onUpdateReUpload ( ) {
let self = this
findComponentDownward ( self . $root , ` resource-list-index- ${ this . type } ` ) . _updateList ( )
this . isUpdate = false
this . progress = 0
this . fileReUploadDialog = false
} ,
onArchiveReUpload ( ) {
this . isUpdate = true
} ,
closeReUpload ( ) {
this . progress = 0
this . fileReUploadDialog = false
} ,
onProgressChildReUpload ( val ) {
this . progress = val
} ,
onUpdateChildReUpload ( ) {
let self = this
findComponentDownward ( self . $root , ` resource-list-index- ${ this . type } ` ) . _updateList ( this . data )
this . isUpdate = false
this . progress = 0
this . fileChildReUploadDialog = false
} ,
onArchiveChildReUpload ( ) {
this . isUpdate = true
} ,
closeChildReUpload ( ) {
this . progress = 0
this . fileChildReUploadDialog = false
}
}
} ,
} ,
created ( ) {
created ( ) {
@ -405,7 +456,7 @@
computed : {
computed : {
... mapState ( 'user' , [ 'userInfo' ] )
... mapState ( 'user' , [ 'userInfo' ] )
} ,
} ,
components : { mFileUpdate , mProgressBar , mDefinitionUpdate , mFileChildUpdate , mResourceChildUpdate , mFileUploa d }
components : { mFileUpdate , mFileReUpload , m ProgressBar , mDefinitionUpdate , mFileChildUpdate , mResourceChildUpdate , mFileChildRe Update }
}
}
< / script >
< / script >