detail.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <template>
  2. <view class="content">
  3. <view class="title"> 项目详情 </view>
  4. <view class="list">
  5. <view class="detail">
  6. <span class="subTitle">项目名称:</span>
  7. <span class="detailContent">{{ currentProject.project_name }}</span>
  8. </view>
  9. <view class="detail">
  10. <span class="subTitle">项目类别:</span>
  11. <span class="detailContent">{{ currentProject.TypeInfo.name }}</span>
  12. </view>
  13. <view class="detail" v-if="currentProject.IndustryInfo">
  14. <span class="subTitle">行业名称:</span>
  15. <span class="detailContent">
  16. {{ currentProject.IndustryInfo.name }}
  17. </span>
  18. </view>
  19. <view class="detail">
  20. <span class="subTitle">流程:</span>
  21. <span class="detailContent">{{ currentProject.FlowInfo.name }}</span>
  22. </view>
  23. <view class="detail" v-if="currentProject.location">
  24. <span class="subTitle">项目地区:</span>
  25. <span class="detailContent">
  26. {{ `${currentProject.location}(${currentProject.location_code})` }}
  27. </span>
  28. </view>
  29. <view class="detail" v-if="currentProject.name">
  30. <span class="subTitle">项目简称:</span>
  31. <span class="detailContent">{{ currentProject.name }}</span>
  32. </view>
  33. <view class="detail" v-if="currentProject.version">
  34. <span class="subTitle">项目批次:</span>
  35. <span class="detailContent">{{ currentProject.version }}期</span>
  36. </view>
  37. <view class="detail" v-if="currentProject.AuthorUser">
  38. <span class="subTitle">创建人:</span>
  39. <span class="detailContent">{{ currentProject.AuthorUser.CName }}</span>
  40. </view>
  41. <view class="detail" v-if="currentProject.AuthorDepInfo">
  42. <span class="subTitle">所属部门:</span>
  43. <span class="detailContent">
  44. {{ currentProject.AuthorDepInfo.Name }}
  45. </span>
  46. </view>
  47. <view class="detail">
  48. <span class="subTitle">项目编号:</span>
  49. <span class="detailContent">
  50. {{ currentProject.project_full_code }}
  51. </span>
  52. </view>
  53. </view>
  54. <view class="group">
  55. <button
  56. v-if="canAuth()"
  57. @click="onHandleAudit(1)"
  58. type="primary"
  59. class="commit"
  60. >
  61. 审核通过
  62. </button>
  63. <button v-if="canAuth()" @click="onHandleAudit(0)" class="commit">
  64. 审核拒绝
  65. </button>
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. import { mapState } from "vuex";
  71. export default {
  72. data() {
  73. return { auth: false };
  74. },
  75. computed: {
  76. ...mapState(["currentProject"]),
  77. },
  78. onLoad(options) {
  79. this.auth = Boolean(options.auth);
  80. },
  81. methods: {
  82. canAuth() {
  83. return this.auth;
  84. },
  85. onHandleAudit(value) {
  86. if (value) console.log("审核通过");
  87. else console.log("审核拒绝");
  88. },
  89. },
  90. };
  91. </script>
  92. <style lang="less" scoped>
  93. .content {
  94. display: flex;
  95. flex-wrap: wrap;
  96. }
  97. .title {
  98. width: 100%;
  99. padding: 0 20px 20px 20px;
  100. background: #f8f8f8;
  101. font: 24px bold;
  102. }
  103. .list {
  104. margin-left: 10%;
  105. width: 100%;
  106. }
  107. .detail {
  108. width: 100%;
  109. padding: 15px 0;
  110. font-size: 18px;
  111. display: flex;
  112. justify-items: space-between;
  113. .subTitle {
  114. width: 30%;
  115. }
  116. .detailContent {
  117. width: 70%;
  118. }
  119. }
  120. .group {
  121. width: 100%;
  122. display: flex;
  123. position: fixed;
  124. flex-wrap: wrap;
  125. justify-content: flex-start;
  126. bottom: 0;
  127. left: 0;
  128. .commit {
  129. width: 50%;
  130. border-radius: 0;
  131. margin: inherit;
  132. }
  133. }
  134. </style>