|
|
@@ -35,7 +35,7 @@
|
|
|
完成任务
|
|
|
</el-button>
|
|
|
</div>
|
|
|
- <basic-curd class='full-width' :data='data' :option='taskOption' @row-view='rowDetail'>
|
|
|
+ <basic-curd class='full-width' :data='data' :option='taskOption' @row-view='rowDetail' @row-del='rowDel'>
|
|
|
<template #menu='{row}'>
|
|
|
<main-button title='提交文件' v-if='row.type === 2' icon='Position' @click='postFile(row)'/>
|
|
|
</template>
|
|
|
@@ -50,6 +50,7 @@
|
|
|
multiple
|
|
|
accept='.doc,.docx,.pdf,.xls,.xlsx,.png,.jpg,.jpeg,.ppt,pptx'
|
|
|
show-file-list
|
|
|
+ :headers="{'Authorization':`Basic ${clientId}`}"
|
|
|
:on-success='uploadSuccess'
|
|
|
>
|
|
|
<el-icon class="el-icon--upload">
|
|
|
@@ -84,12 +85,15 @@ import BasicContainer from '@/components/basic-container/main.vue'
|
|
|
import basicCurd from '@/components/basic-curd/index.vue'
|
|
|
import MainButton from '@/components/main-button.vue'
|
|
|
import api from '@/api/index.js'
|
|
|
+import { Base64 } from 'js-base64'
|
|
|
+import website from '@/config/website.js'
|
|
|
|
|
|
export default {
|
|
|
name: 'detail',
|
|
|
components: { MainButton, BasicContainer, basicCurd },
|
|
|
data () {
|
|
|
return {
|
|
|
+ clientId: '',
|
|
|
showImage: false,
|
|
|
imgList: [],
|
|
|
show: false,
|
|
|
@@ -130,6 +134,7 @@ export default {
|
|
|
this.id = this.$route.query.id
|
|
|
this.taskId = this.$route.query.taskId
|
|
|
this.detail()
|
|
|
+ this.clientId = Base64.encode(`${website.clientId}:${website.clientSecret}`)
|
|
|
},
|
|
|
methods: {
|
|
|
detail () {
|
|
|
@@ -149,6 +154,15 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ rowDel (row) {
|
|
|
+ this.$api.task.taskRemove({ taskId: this.taskId, ids: row.id }).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
rowDetail (row, index) {
|
|
|
if (row.type === 2) {
|
|
|
const data = { folderId: row.folderId }
|
|
|
@@ -266,7 +280,7 @@ export default {
|
|
|
const data = { dispatcherUser: this.currentFolder.dispatcherUser, folderId: this.currentFolder.folderId, files: this.fileList }
|
|
|
this.$api.task.uploadFile(data).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
- console.log(res)
|
|
|
+ this.show = false
|
|
|
} else {
|
|
|
this.$message.error(res.msg)
|
|
|
}
|