a98e94b45e62bf500e3e26f7779b5cf9bc5f9ef3.svn-base 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <div>
  3. <el-container style="height:520px;">
  4. <el-main style="border:1px solid #d5d5ff;margin-left:5px;padding:0px;">
  5. <p @click="showImg(item.value)" class="item-c" v-for="item in itemList"><span>{{item.name}}</span><span style="float:right">{{imgObj[item.value]}}张<i class="el-icon-arrow-right" style="padding-left: 10px;padding-right: 10px;"></i></span></p>
  6. </el-main>
  7. </el-container>
  8. <add-pic-com v-if="jqmmDialogShow" :dialogTitle="'相关材料'" :jqmmEngId="currentObjectRgstrId" :type="type" :openType="openType" @jqmmDialogClose="jqmmDialogClose"></add-pic-com>
  9. </div>
  10. </template>
  11. <script>
  12. import addPicCom from "./addPic.vue"
  13. import request from "@util/gw_ajax_request.js"
  14. export default {
  15. components: {
  16. addPicCom
  17. },
  18. props: ['currentObjectId','currentObjectName','currentObjectRgstrId','openType'],
  19. data() {
  20. return{
  21. imgObj:{},
  22. jqmmDialogShow:false,
  23. count:0,
  24. type:"",
  25. itemList:[
  26. {name:"大坝坝顶及迎水坡",value:"rssfgd1"},
  27. {name:"大坝背水坡及坝脚",value:"rssfgd2"},
  28. {name:"溢洪道进口段",value:"rssfgd3"},
  29. {name:"溢洪道控制段及交通桥",value:"rssfgd4"},
  30. {name:"溢洪道泄槽段",value:"rssfgd5"},
  31. {name:"溢洪道消能工",value:"rssfgd6"},
  32. {name:"输水建筑物进口及控制设施",value:"rssfgd7"},
  33. {name:"输水建筑物出口及设施",value:"rssfgd8"},
  34. {name:"水库运行管理设施",value:"rssfgd9"},
  35. {name:"水库监测设施",value:"rssfgd10"}
  36. ]
  37. }
  38. },
  39. computed:{
  40. recPersId(){
  41. return localStorage.getItem("userid")? localStorage.getItem("userid"): ''
  42. }
  43. },
  44. created(){
  45. this.initNum();
  46. },
  47. mounted() {
  48. },
  49. watch: {
  50. },
  51. methods: {
  52. async initNum(){
  53. this.imgObj = {};
  54. for(var i = 0;i<this.itemList.length;i++){
  55. await this.countImg(this.itemList[i].value)
  56. }
  57. },
  58. jqmmDialogClose(){
  59. this.jqmmDialogShow = false;
  60. this.imgObj = {};
  61. this.initNum();
  62. },
  63. showImg(type){
  64. this.jqmmDialogShow = true;
  65. this.type = type;
  66. },
  67. countImg(type){
  68. let params = {
  69. bizId: this.currentObjectRgstrId,
  70. bizType: type
  71. }
  72. var _self = this;
  73. request.post(`/file/findPageInfo`,params).then(res =>{
  74. if(res.success) {
  75. _self.$set(_self.imgObj,type,res.data.list.length.toString())
  76. }
  77. })
  78. },
  79. }
  80. }
  81. </script>
  82. <style scoped>
  83. .item-c{
  84. width: calc(100% - 40px);
  85. line-height: 30px;
  86. margin-top: 10px;
  87. margin-left: 20px;
  88. height: 30px;
  89. text-indent: 20px;
  90. border: 1px solid #e6e6e6;
  91. }
  92. #dcdxHeader {
  93. padding: 15px 20px;
  94. }
  95. #dxdcFooter {
  96. text-align: center;
  97. }
  98. #dxdcAside {
  99. border:1px solid #d5d5ff;
  100. }
  101. .el-dialog__wrapper .el-treeWhite{
  102. /* max-height: 260px !important; */
  103. }
  104. .add-problem-icon{
  105. font-size: 16px;
  106. }
  107. .el-icon-camera-solid,.el-icon-circle-plus{
  108. margin-left: 20px;
  109. color: #00bbff;
  110. font-size: 18px;
  111. line-height: 12px;
  112. vertical-align: middle;
  113. cursor: pointer;
  114. }
  115. .el-icon-circle-plus{
  116. vertical-align: top;
  117. }
  118. </style>