移动端
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

114 líneas
3.2 KiB

  1. <template>
  2. <div class="app-container">
  3. <van-nav-bar
  4. :title="type"
  5. left-arrow
  6. @click-left="$router.back(-1)"
  7. />
  8. <p class="title">{{form.title}}</p>
  9. <van-row style="text-align: center;margin: 0.3rem 0;">
  10. <van-col span="2" :offset="1">
  11. <van-image
  12. width="24"
  13. height="24"
  14. src="../../../static/images/onlineHome/threeAffair1.png"
  15. style="margin-top: 5px;"
  16. />
  17. </van-col>
  18. <van-col span="20">
  19. <van-row>
  20. <van-col span="24" style="text-align: left;font-size: 10px;">{{form.createBy}}</van-col>
  21. </van-row>
  22. <van-row>
  23. <van-col span="24" style="text-align: left;font-size: 10px;">{{form.createTime}}</van-col>
  24. </van-row>
  25. </van-col>
  26. </van-row>
  27. <div id="content" style="padding: 0 10px"></div>
  28. <p style="margin-top:20px;padding: 0 10px">附件下载{{fileList&&fileList.length==0?':暂无可下载文件':''}}</p>
  29. <van-cell v-for="(item,index) in fileList" :key="index">
  30. <a :href="item.fileUrl">{{index+1}}.{{item.fileName}}</a>
  31. </van-cell>
  32. </div>
  33. </template>
  34. <script>
  35. import onlineHomeIndex from "../onlineHomeIndex";
  36. import {attachmentList, getAffairs, listAffairs} from "../../api/onlineHome/threeAffairs";
  37. import request from '@/utils/request'
  38. export default {
  39. components: {
  40. },
  41. name: "threeAffairsDetail",
  42. data() {
  43. return {
  44. loading: false,
  45. finished: false,
  46. id:null,
  47. type:"",
  48. // 查询参数
  49. queryParams: {
  50. pageNum: 1,
  51. pageSize: 10,
  52. title: null,
  53. openType: null,
  54. deptId: null,
  55. isWechat: null,
  56. status: null,
  57. },
  58. form:{},
  59. fileList: [], //上传附件图片列表
  60. fileListData: [], //上传附件图片列表参数
  61. };
  62. },
  63. created() {
  64. console.log(this.$route.query.type)
  65. if(this.$route.query.type== "1"){
  66. this.type = "村务公开"
  67. }else if(this.$route.query.type== "2"){
  68. this.type = "党务公开"
  69. }else if(this.$route.query.type== "3"){
  70. this.type = "政务公开"
  71. }
  72. this.id = this.$route.query.id
  73. this.getDetail();
  74. },
  75. methods: {
  76. getDetail() {
  77. getAffairs(this.id).then(response => {
  78. this.form = response.data
  79. document.getElementById('content').innerHTML = response.data.content;
  80. let params = {
  81. "fileType" : "0",
  82. "tableName":"t_village_affairs",
  83. "tableId":this.id,
  84. }
  85. attachmentList(params).then((res) => {
  86. res.rows.map(r => {
  87. r.fileUrl = location.protocol+"//"+location.host+request.defaults.baseURL+r.fileUrl
  88. this.fileList.push(r)
  89. })
  90. });
  91. })
  92. },
  93. },
  94. }
  95. </script>
  96. <style scoped lang="scss">
  97. .app-container {
  98. padding-bottom: 0.5rem;
  99. height: 100vh;
  100. background-color: #fff;
  101. }
  102. .title{
  103. text-align: center;
  104. font-size: 0.6rem;
  105. }
  106. #content{
  107. overflow: hidden;
  108. }
  109. </style>