|  | @ -33,6 +33,10 @@ | 
			
		
	
		
		
			
				
					|  |  |                  class="diy-button--reset" |  |  |                  class="diy-button--reset" | 
			
		
	
		
		
			
				
					|  |  |                  size="small" |  |  |                  size="small" | 
			
		
	
		
		
			
				
					|  |  |                  @click="resetSearch">重置</el-button> |  |  |                  @click="resetSearch">重置</el-button> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       <!-- <el-button style="margin-left:10px" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                  class="diy-button--reset" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                  size="small" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                  @click="resetSearch">重置</el-button> --> | 
			
		
	
		
		
			
				
					|  |  |     </div> |  |  |     </div> | 
			
		
	
		
		
			
				
					|  |  |     <div class="div_btn"> |  |  |     <div class="div_btn"> | 
			
		
	
		
		
			
				
					|  |  |       <el-button style="" |  |  |       <el-button style="" | 
			
		
	
	
		
		
			
				
					|  | @ -99,6 +103,11 @@ | 
			
		
	
		
		
			
				
					|  |  |                  class="diy-button--reset" |  |  |                  class="diy-button--reset" | 
			
		
	
		
		
			
				
					|  |  |                  size="small" |  |  |                  size="small" | 
			
		
	
		
		
			
				
					|  |  |                  @click="handleExport">导出</el-button> |  |  |                  @click="handleExport">导出</el-button> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       <el-button v-if="agencyObj.level == 'community'" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                  style="margin-left:10px" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                  class="diy-button--qrcode" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                  size="small" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                  @click="handleDownQr(agencyObj, 'community')">社区二维码</el-button> | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |     </div> |  |  |     </div> | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | @ -119,6 +128,11 @@ | 
			
		
	
		
		
			
				
					|  |  |         <el-table-column prop="neighborHoodName" |  |  |         <el-table-column prop="neighborHoodName" | 
			
		
	
		
		
			
				
					|  |  |                          label="小区名称" |  |  |                          label="小区名称" | 
			
		
	
		
		
			
				
					|  |  |                          min-width="100"> |  |  |                          min-width="100"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           <!-- <template slot-scope="scope"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             <a class="name-a" @click="handleDetail(scope.row)"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |               {{ scope.row.neighborHoodName }} | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             </a> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           </template> --> | 
			
		
	
		
		
			
				
					|  |  |         </el-table-column> |  |  |         </el-table-column> | 
			
		
	
		
		
			
				
					|  |  |         <el-table-column prop="agencyName" |  |  |         <el-table-column prop="agencyName" | 
			
		
	
		
		
			
				
					|  |  |                          label="所属组织" |  |  |                          label="所属组织" | 
			
		
	
	
		
		
			
				
					|  | @ -156,6 +170,10 @@ | 
			
		
	
		
		
			
				
					|  |  |                        style="color:#feb349;text-decoration: underline;" |  |  |                        style="color:#feb349;text-decoration: underline;" | 
			
		
	
		
		
			
				
					|  |  |                        size="small" |  |  |                        size="small" | 
			
		
	
		
		
			
				
					|  |  |                        @click="handleToNextLevel(scope.row)">进入</el-button> --> |  |  |                        @click="handleToNextLevel(scope.row)">进入</el-button> --> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             <!-- <el-button type="text" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                        class="div-table-button--qr" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                        size="small" | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                        @click="handleDownQr(scope.row, 'neighborHood')">二维码</el-button> --> | 
			
		
	
		
		
			
				
					|  |  |             <el-button type="text" |  |  |             <el-button type="text" | 
			
		
	
		
		
			
				
					|  |  |                        class="div-table-button--detail" |  |  |                        class="div-table-button--detail" | 
			
		
	
		
		
			
				
					|  |  |                        size="small" |  |  |                        size="small" | 
			
		
	
	
		
		
			
				
					|  | @ -223,6 +241,7 @@ import CommunityForm from './communityForm' | 
			
		
	
		
		
			
				
					|  |  | import { requestPost } from "@/js/dai/request"; |  |  | import { requestPost } from "@/js/dai/request"; | 
			
		
	
		
		
			
				
					|  |  | import { mapGetters } from 'vuex' |  |  | import { mapGetters } from 'vuex' | 
			
		
	
		
		
			
				
					|  |  | import { Loading } from 'element-ui' // 引入Loading服务 |  |  | import { Loading } from 'element-ui' // 引入Loading服务 | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import axios from 'axios' | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | let loading // 加载动画 |  |  | let loading // 加载动画 | 
			
		
	
		
		
			
				
					|  |  | export default { |  |  | export default { | 
			
		
	
	
		
		
			
				
					|  | @ -528,7 +547,29 @@ export default { | 
			
		
	
		
		
			
				
					|  |  |         this.$message.error(msg) |  |  |         this.$message.error(msg) | 
			
		
	
		
		
			
				
					|  |  |       } |  |  |       } | 
			
		
	
		
		
			
				
					|  |  |     }, |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  | 
 |  |  |     async handleDownQr (row, type) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |       // const url = window.SITE_CONFIG['apiURL'] + `/gov/org/icneighborhood/createQrCode/${row.neighborHoodId}` | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       const url = '/gov/org/agency/create-qrcode' | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       const _id = type == 'community' ? row.id : row.neighborHoodId | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       const params = { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         id: _id, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         type | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       await axios({ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         method: 'POST', | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         url: window.SITE_CONFIG['apiURL'] + url, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         data: params, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         responseType: 'blob' | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       }).then(res => { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         console.log('res----1r', res) | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         if (res.headers["content-disposition"]) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1]) | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           console.log('filename', fileName) | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           this.download(res.data, fileName) //释放掉blob对象 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         } else this.$message.error('下载失败') | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         // this.download(res.data, '1.png') | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       }) | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     }, | 
			
		
	
		
		
			
				
					|  |  |     //导出表格 |  |  |     //导出表格 | 
			
		
	
		
		
			
				
					|  |  |     async handleExport () { |  |  |     async handleExport () { | 
			
		
	
		
		
			
				
					|  |  |       let title = this.agencyObj.label |  |  |       let title = this.agencyObj.label | 
			
		
	
	
		
		
			
				
					|  | 
 |