|
|
@ -33,6 +33,10 @@ |
|
|
|
class="diy-button--reset" |
|
|
|
size="small" |
|
|
|
@click="resetSearch">重置</el-button> |
|
|
|
<!-- <el-button style="margin-left:10px" |
|
|
|
class="diy-button--reset" |
|
|
|
size="small" |
|
|
|
@click="resetSearch">重置</el-button> --> |
|
|
|
</div> |
|
|
|
<div class="div_btn"> |
|
|
|
<el-button style="" |
|
|
@ -99,6 +103,11 @@ |
|
|
|
class="diy-button--reset" |
|
|
|
size="small" |
|
|
|
@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> |
|
|
|
|
|
|
@ -119,6 +128,11 @@ |
|
|
|
<el-table-column prop="neighborHoodName" |
|
|
|
label="小区名称" |
|
|
|
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 prop="agencyName" |
|
|
|
label="所属组织" |
|
|
@ -156,6 +170,10 @@ |
|
|
|
style="color:#feb349;text-decoration: underline;" |
|
|
|
size="small" |
|
|
|
@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" |
|
|
|
class="div-table-button--detail" |
|
|
|
size="small" |
|
|
@ -223,6 +241,7 @@ import CommunityForm from './communityForm' |
|
|
|
import { requestPost } from "@/js/dai/request"; |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
import { Loading } from 'element-ui' // 引入Loading服务 |
|
|
|
import axios from 'axios' |
|
|
|
|
|
|
|
let loading // 加载动画 |
|
|
|
export default { |
|
|
@ -528,7 +547,29 @@ export default { |
|
|
|
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 () { |
|
|
|
let title = this.agencyObj.label |
|
|
|