forked from ccsens_fe/tall-mui-3
11 changed files with 156 additions and 48 deletions
@ -1,3 +1,40 @@ |
|||
<template> |
|||
<view>导入wbs</view> |
|||
<view> |
|||
<view @tap="handleUpload">{{ task.name }}</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapState, mapMutations } from 'vuex'; |
|||
|
|||
export default { |
|||
name: 'p-wbs-import', |
|||
props: { |
|||
task: { |
|||
type: Object, |
|||
default: () => {}, |
|||
}, |
|||
}, |
|||
data() { |
|||
return {}; |
|||
}, |
|||
|
|||
computed: mapState('project', ['alert']), |
|||
|
|||
methods: { |
|||
...mapMutations('project', ['setShowAlert']), |
|||
|
|||
// 导入wbs |
|||
async handleUpload() { |
|||
try { |
|||
const data = await this.$u.api.import(); |
|||
// 导入WBS成功后 |
|||
// 直接打开导入的项目 |
|||
console.log('data: ', data); |
|||
} catch (error) { |
|||
this.setShowAlert(error); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
Loading…
Reference in new issue