ProjectManagement4.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <!-- 项目管理 项目附件 -->
  3. <div class="ProjectManagement4">
  4. <div class="vfpHeader">
  5. <!-- 详情页 -->
  6. <div class="titleOne">项目管理</div>
  7. <div class="smallTitle" style="left: 100px;">项目进展详情</div>
  8. <el-button type="primary" @click="back">返回</el-button>
  9. </div>
  10. <hr>
  11. <!-- 跳转导航开始 -->
  12. <div class="AppBar">
  13. <div @click="content">项目基本内容</div>
  14. <div @click="remark">项目详情</div>
  15. <div @click="remark2">活动开展</div>
  16. <div class="AppBarActive">项目附件</div>
  17. <div @click="remark5">项目结题附件</div>
  18. </div>
  19. <!-- 跳转导航结束 -->
  20. <div class="pmInp">
  21. <el-button type="primary" class="btn" size="mini">上传文件</el-button>
  22. </div>
  23. <!-- 表格开始 -->
  24. <el-table
  25. :data="tableData"
  26. tooltip-effect="dark"
  27. stripe
  28. style="height: 550px;"
  29. class="fontSize"
  30. :header-cell-style="{ background: '#f2f2f2',color:'#000' }"
  31. >
  32. <el-table-column
  33. prop="title"
  34. label="活动名称"
  35. align="center"
  36. >
  37. </el-table-column>
  38. <el-table-column
  39. prop="fileName"
  40. label="活动中期报告"
  41. align="center"
  42. >
  43. </el-table-column>
  44. <el-table-column
  45. prop="size"
  46. label="大小"
  47. align="center"
  48. >
  49. </el-table-column>
  50. <el-table-column
  51. prop="uploadTime"
  52. label="时间"
  53. align="center"
  54. >
  55. </el-table-column>
  56. <el-table-column
  57. prop="operation"
  58. align="center"
  59. label="操作"
  60. >
  61. <template #default="scope">
  62. <div class="operations">
  63. <el-button type="primary" class="bt1" size="mini" @click="lookDetails(scope.rows.id)" style="background: #477edd">详情查看</el-button>
  64. </div>
  65. </template>
  66. </el-table-column>
  67. </el-table>
  68. <!-- 表格结束 -->
  69. <!-- 分页 -->
  70. <el-pagination
  71. @current-change="handleCurrentChange"
  72. :current-page="table.currentPage"
  73. :page-size="table.packageSize"
  74. layout=" prev, pager, next"
  75. background
  76. class="pagination"
  77. :total="table.total">
  78. </el-pagination>
  79. <!-- 分页结束 -->
  80. </div>
  81. </template>
  82. <script>
  83. export default {
  84. data() {
  85. return {
  86. table:{ // 分页数据
  87. total:0,
  88. packageSize:8,
  89. currentPage:1
  90. },
  91. tableData:[],
  92. }
  93. },
  94. methods:{
  95. handleCurrentChange(val) { //当页数发生改变的时候调用获取列表数据请求
  96. // console.log(`当前页: ${val}`);
  97. this.table.currentPage=val
  98. this.getData()
  99. },
  100. getData(){ //获取基础信息
  101. let param={
  102. uid:this.$store.state.userInfo.userid,
  103. pid:JSON.parse(localStorage.getItem('pid')),
  104. page:this.table.currentPage,
  105. lim:this.table.packageSize
  106. }
  107. // console.log(param);
  108. this.ajax
  109. .get(this.$store.state.api+'/GetActivityFileByProjectId',param)
  110. .then(res=>{
  111. // console.log(res.data);
  112. let k=[]
  113. res.data[0].forEach((e,i) => {
  114. let { title: f, reportFile: l } = e;
  115. k.push(Object.assign({title:f},JSON.parse(l)))
  116. });
  117. this.tableData=k
  118. // console.log(k);
  119. // if (res.data[0][0] != undefined) {
  120. // let { title: f, reportFile: l } = res.data[0][0];
  121. // let k= Object.assign({title:f},JSON.parse(l))
  122. // this.tableData=[k]
  123. // }
  124. // console.log(this.tableData);
  125. },err=>{
  126. console.log(err);
  127. })
  128. },
  129. content(){
  130. this.$router.push('/ProjectManagement1')
  131. },
  132. remark(){
  133. this.$router.push('/ProjectManagement2')
  134. },
  135. remark2(){
  136. this.$router.push('/ProjectManagement3')
  137. },
  138. remark5(){
  139. this.$router.push('/ProjectManagement5')
  140. },
  141. backBtn2(){
  142. this.$router.push('/ProjectManagement1')
  143. },
  144. lookDetails(){
  145. console.log(111);
  146. },
  147. back(){
  148. this.$router.push('/ProjectManagement')
  149. },
  150. },
  151. mounted(){
  152. this.getData()
  153. }
  154. }
  155. </script>
  156. <style lang="less">
  157. .ProjectManagement4{
  158. .pagination{
  159. float: right;
  160. margin: 20px 55px 10px;
  161. }
  162. .pm1Tit{
  163. display: flex;
  164. margin-left: 20px;
  165. div{
  166. width: 130px;
  167. cursor: pointer;
  168. font-weight: 550;
  169. }
  170. .pr1TitBass{
  171. height: 2px;
  172. width: 100%;
  173. background: #3D67BC;
  174. }
  175. }
  176. .pmInp{
  177. width: 100%;
  178. display: flex;
  179. margin: 10px 0 10px 0;
  180. justify-content: flex-end;
  181. .btn{
  182. height: 30px;
  183. width: 100px;
  184. font-size: 16px !important;
  185. background: #477edd;
  186. margin-left: 10px;
  187. }
  188. }
  189. }
  190. </style>