76e3d64327e87dcd4fab79077ca14e4d1078fd6f.svn-base 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <div >
  3. <div class="search-wrapper">
  4. <el-form ref="form" :inline="true" label-width="100px">
  5. <el-form-item label="检查表类型">
  6. <el-select
  7. v-model="checkreporttypeselectvalue"
  8. clearable
  9. collapse-tags>
  10. <el-option
  11. v-for="item in reportTypesList"
  12. :key="item.reporttypeNumber"
  13. :label="item.reporttypeName"
  14. :value="item.reporttypeNumber">
  15. </el-option>
  16. </el-select>
  17. </el-form-item>
  18. <el-form-item label="检查表名称">
  19. <el-input v-model="searchObj.reportName" clearable></el-input>
  20. </el-form-item>
  21. <el-button type="primary" @click="getMemberList()">查询</el-button>
  22. </el-form>
  23. </div>
  24. <el-row>
  25. <el-col style="padding: 5px;" :span="2" v-for="(o, index) in memberList" :key="o.reportId" :offset="(index % 8== 0) ? 0 : 1">
  26. <el-tooltip class="item" effect="dark" :content="o.reportName" placement="bottom">
  27. <el-card :body-style="{ padding: '0px' }" @click.native="openPageoffice(o.projectId,o.reportId)">
  28. <img src="../../../../static/images/word.png" class="image">
  29. <div style="padding: 2px;font-size:10px;">
  30. <span style="width:100px;
  31. overflow:hidden;
  32. text-overflow:ellipsis;
  33. white-space:nowrap;
  34. display:inline-block;
  35. ">{{o.reportName}}</span>
  36. </div>
  37. </el-card>
  38. </el-tooltip>
  39. </el-col>
  40. </el-row>
  41. <el-pagination
  42. background
  43. @size-change="handleSizeChange"
  44. @current-change="handleCurrentChange"
  45. :current-page.sync="searchObj.pageNum"
  46. :page-sizes="[10, 20, 300, 40]"
  47. :page-size="searchObj.pageSize"
  48. layout="total, prev, pager, next"
  49. :total="total"
  50. style="margin: 10px auto">
  51. </el-pagination>
  52. </div>
  53. </template>
  54. <script>
  55. import request from '../../../utils/gw_ajax_request.js'
  56. import {hostUrl} from '@util/global_variable.js'
  57. export default {
  58. data() {
  59. return {
  60. currentDate: new Date(),
  61. memberList:[],
  62. total: 0,
  63. searchObj: {
  64. pageSize: 20,
  65. pageNum: 1,
  66. reportName: '',
  67. reporttypeNumber: '',
  68. projectId: ''
  69. },
  70. checkreporttypeselectvalue: '',
  71. reportTypesList: []
  72. };
  73. },
  74. created(){
  75. this.getMemberList();
  76. this.getReportTypeList();
  77. },
  78. methods:{
  79. handleCurrentChange(val) {
  80. this.searchObj.pageNum = val;
  81. this.getMemberList();
  82. },
  83. handleSizeChange(val) {
  84. this.searchObj.pageSize = val
  85. this.getMemberList();
  86. },
  87. getMemberList(){
  88. this.searchObj.projectId = this.$route.query.projectId;
  89. this.searchObj.reporttypeNumber = this.checkreporttypeselectvalue;
  90. request.post('/bis/insp/ProjectLinkReport/findProjectLinkAllReport',this.searchObj).then((res)=>{
  91. if(res.success){
  92. this.memberList = res.data.list
  93. this.total = res.data.total
  94. }else{
  95. this.$message.warning(res.message)
  96. }
  97. }).catch(error=>{
  98. this.$message.error(error)
  99. });
  100. },
  101. getReportTypeList(){
  102. request.get('/bis/insp/AttCheckreporttypeBase/findCheckreportTypeList',{}).then((res)=>{
  103. if(res.success){
  104. this.reportTypesList = res.data
  105. }else{
  106. this.$message.warning(res.message)
  107. }
  108. }).catch(error=>{
  109. this.$message.error(error)
  110. });
  111. },
  112. openPageoffice:function(projectId,reportId){
  113. let host = hostUrl;
  114. // let host = 'http://10.1.102.140:9002';
  115. let nginx = '/pageofficePath/';
  116. let href = 'pageoffice://|'+host+nginx+'/dc/pageoffice/quality/word/'+projectId+'/'+reportId+'|width=1100px;height=800px;ismodal=false;||91A4EE66EC1921F376873E85D6C74FFA|A890649B44577C32CE1930797E1299F9';
  117. let a = document.createElement('a'); // 创建a标签
  118. a.setAttribute('href', href);// href链接
  119. a.click();// 自执行点击事件
  120. }
  121. }
  122. }
  123. </script>
  124. <style>
  125. .time {
  126. font-size: 13px;
  127. color: #999;
  128. }
  129. .bottom {
  130. margin-top: 13px;
  131. line-height: 12px;
  132. }
  133. .button {
  134. padding: 0;
  135. float: right;
  136. }
  137. .image {
  138. width: 100%;
  139. display: block;
  140. }
  141. .clearfix:before,
  142. .clearfix:after {
  143. display: table;
  144. content: "";
  145. }
  146. .clearfix:after {
  147. clear: both
  148. }
  149. .item {
  150. margin: 4px;
  151. }
  152. </style>