detailInfo.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <div class="edit">
  3. <div class="container normal-panel">
  4. <p class="normal-title normal-margin">基础信息</p>
  5. <el-descriptions :column="4">
  6. <el-descriptions-item label="年度">{{detail.year?detail.year:'未知'}}</el-descriptions-item>
  7. <el-descriptions-item label="部门">{{detail.depname?detail.depname:'未知'}}</el-descriptions-item>
  8. <el-descriptions-item label="人员姓名">{{detail.name?detail.name:'未知'}}</el-descriptions-item>
  9. <el-descriptions-item label="职位">{{detail.position?detail.position:'未知'}}</el-descriptions-item>
  10. <el-descriptions-item label="营销区域">{{detail.areaname?detail.areaname:'未知'}}</el-descriptions-item>
  11. <el-descriptions-item label="状态"><span :style="detail.status === '已下达'?'color:#52C41A':'color:#000000'">{{detail.status}}</span></el-descriptions-item>
  12. </el-descriptions>
  13. </div>
  14. <div class="container normal-panel" style="margin-top:16px">
  15. <p class="normal-title normal-margin">系统信息</p>
  16. <el-descriptions :column="4">
  17. <el-descriptions-item label="创建人">{{detail.createby?detail.createby:'未知'}}</el-descriptions-item>
  18. <el-descriptions-item label="创建时间">{{detail.createdate?detail.createdate:'未知'}}</el-descriptions-item>
  19. <el-descriptions-item label="最近调整人">{{detail.changeby?detail.changeby:'未知'}}</el-descriptions-item>
  20. <el-descriptions-item label="最近调整时间">{{detail.changedate?detail.changedate:'未知'}}</el-descriptions-item>
  21. <el-descriptions-item label="下达人">{{detail.checkby?detail.checkby:'未知'}}</el-descriptions-item>
  22. <el-descriptions-item label="下达时间">{{detail.checkdate?detail.checkdate:'未知'}}</el-descriptions-item>
  23. </el-descriptions>
  24. </div>
  25. <div class="container normal-panel" style="margin-top:16px">
  26. <p class="normal-title normal-margin">项目统计</p>
  27. <el-descriptions :column="4">
  28. <el-descriptions-item label="项目总数">{{detail.projectnum?detail.projectnum:'暂无'}}</el-descriptions-item>
  29. <el-descriptions-item label="项目基本目标(万元)">{{detail.target_l?detail.target_l:'暂无'}}</el-descriptions-item>
  30. <el-descriptions-item label="项目挑战目标(万元)">{{detail.target_h?detail.target_h:'暂无'}}</el-descriptions-item>
  31. </el-descriptions>
  32. </div>
  33. <div class="container normal-panel" style="margin-top:16px">
  34. <div class="header" style="margin-bottom:16px">
  35. <Search @searchActive="searchActive" @clearData="clearData" />
  36. </div>
  37. <tableLayout v-if="list" :layout="tablecols" :data="list" :custom="false" height="300">
  38. </tableLayout>
  39. </div>
  40. </div>
  41. </template>
  42. <script>
  43. import Header from '@/SManagement/archives_upload/components/Header'
  44. import Search from '@/components/search/index'
  45. export default {
  46. name: '',
  47. data() {
  48. return {
  49. params: {
  50. "id": 20220906104002,
  51. "content": {
  52. "year": this.$route.query.year,
  53. "hrid": this.$route.query.id,
  54. "where": {
  55. "condition": ""
  56. },
  57. "pageNumber": 1,
  58. "pageSize": 20
  59. }
  60. },
  61. tablecols:'',
  62. detail:'',
  63. list:'',
  64. hrid:JSON.parse(window.sessionStorage.getItem('active_account')).hrid
  65. };
  66. },
  67. components: { Header , Search },
  68. computed:{
  69. },
  70. watch:{
  71. },
  72. created () {
  73. this.ProjectInfo()
  74. this.getprojectTargetList()
  75. this.tablecols = this.tool.tabelCol(this.$route.name).projectTargetTable.tablecols
  76. this.tablecols.pop()
  77. console.log(this.$route.query.year)
  78. console.log(this.$route.query.status)
  79. },
  80. methods: {
  81. /* 获取项目信息 */
  82. async ProjectInfo () {
  83. let res = await this.$api.requested({
  84. "id": 20220906094602,
  85. "content": {
  86. "year": this.$route.query.year,
  87. "hrid": this.$route.query.id,
  88. // "sa_salestargetbillid": 2//可不传
  89. }
  90. })
  91. this.detail = res.data
  92. console.log(this.detail);
  93. },
  94. /* 获取项目目标数据 */
  95. async getprojectTargetList() {
  96. this.params.content.hrid = this.hrid
  97. let res = await this.$api.requested(this.params)
  98. this.list = res.data
  99. console.log(this.list);
  100. },
  101. searchActive(data) {
  102. this.params.content.where.condition = data
  103. this.getprojectTargetList()
  104. },
  105. clearData() {
  106. this.params.content.where.condition = ''
  107. this.getprojectTargetList()
  108. }
  109. },
  110. };
  111. </script>
  112. <style scoped>
  113. .header {
  114. display: flex;
  115. justify-content: space-between;
  116. }
  117. </style>