index.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <div class="personal-target">
  3. <Header>
  4. <el-button size="small" @click="export1" v-if="tool.checkAuth($route.name,'export')">导出</el-button>
  5. </Header>
  6. <div class="container normal-panel">
  7. <table1 ref="table">
  8. <template v-slot:detail="scope">
  9. <el-button v-if="tool.checkAuth($route.name,'read')" type="text" size="small" @click="$router.push({path:'/projectDetail',query:{id:scope.data.data.hrid,year:scope.data.year}})">详情</el-button>
  10. <el-button v-if="tool.checkAuth($route.name,'update')" type="text" size="small" @click="$router.push({path:'/editProjectInfo',query:{id:scope.data.data.hrid,year:scope.data.year}})">编辑</el-button>
  11. </template>
  12. </table1>
  13. </div>
  14. </div>
  15. </template>
  16. <script>
  17. import Header from '@/SManagement/archives_upload/components/Header';
  18. import table1 from './components/table'
  19. export default {
  20. name: '',
  21. data() {
  22. return {
  23. };
  24. },
  25. components: { Header , table1},
  26. computed:{
  27. },
  28. watch:{
  29. },
  30. created() {
  31. },
  32. methods: {
  33. async export1() {
  34. if(!Object.keys(this.$refs.table.tableData).length > 0) return
  35. let res = await this.$api.requested({
  36. "id": 20220916160002,
  37. "content": {
  38. "row": this.$refs.table.tableData
  39. }
  40. })
  41. this.tool.showMessage(res,() => {
  42. window.open(res.msg,'_self')
  43. })
  44. }
  45. },
  46. };
  47. </script>
  48. <style scoped>
  49. </style>