Browse Source

[Feture-3327][ui]Add the function of re-uploading files in the udf subdirectory

pull/3/MERGE
break60 4 years ago
parent
commit
7a866ff20a
  1. 19
      dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/list.vue

19
dolphinscheduler-ui/src/js/conf/home/pages/resource/pages/udf/pages/subUdfDirectory/_source/list.vue

@ -43,7 +43,7 @@
<th scope="col" width="140"> <th scope="col" width="140">
<span>{{$t('Update Time')}}</span> <span>{{$t('Update Time')}}</span>
</th> </th>
<th scope="col" width="110"> <th scope="col" width="130">
<span>{{$t('Operation')}}</span> <span>{{$t('Operation')}}</span>
</th> </th>
</tr> </tr>
@ -76,6 +76,16 @@
<span v-else>-</span> <span v-else>-</span>
</td> </td>
<td> <td>
<x-button
type="info"
shape="circle"
size="xsmall"
data-toggle="tooltip"
:title="$t('ReUpload File')"
:disabled="item.directory? true: false"
@click="_reUpload(item)"
icon="ans-icon-upload">
</x-button>
<x-button <x-button
type="info" type="info"
shape="circle" shape="circle"
@ -127,6 +137,7 @@
import mRename from './rename' import mRename from './rename'
import { downloadFile } from '@/module/download' import { downloadFile } from '@/module/download'
import { bytesToSize } from '@/module/util/util' import { bytesToSize } from '@/module/util/util'
import { findComponentDownward } from '@/module/util'
import localStore from '@/module/util/localStorage' import localStore from '@/module/util/localStorage'
export default { export default {
@ -155,6 +166,12 @@
this.$router.push({ path: `/resource/udf/subUdfDirectory/${item.id}` }) this.$router.push({ path: `/resource/udf/subUdfDirectory/${item.id}` })
} }
}, },
/**
* File Upload
*/
_reUpload (item) {
findComponentDownward(this.$root, 'roof-nav')._fileChildReUpload('UDF', item, this.$route.params.id)
},
_rtSize (val) { _rtSize (val) {
return bytesToSize(parseInt(val)) return bytesToSize(parseInt(val))
}, },

Loading…
Cancel
Save