jiangyy 3 years ago
parent
commit
e928704f98
  1. 219
      src/views/modules/shequzhili/statics/cEvent.vue
  2. 321
      src/views/modules/shequzhili/statics/gridMember.vue
  3. 442
      src/views/modules/shequzhili/statics/gridMemberEvent.vue

219
src/views/modules/shequzhili/statics/cEvent.vue

@ -1,10 +1,20 @@
<template>
<div class="mode-block resi-container">
<el-card ref="searchCard" class="search-card">
<el-form ref="searchForm" :inline="true" :model="dataForm" size="small">
<el-form-item label="所属组织" label-width="100px"
<div v-if="showType==='one'">
<el-card ref="searchCard"
class="search-card">
<el-form ref="searchForm"
:inline="true"
:model="dataForm"
size="small">
<el-form-item label="所属组织"
label-width="100px"
prop="agencyId">
<el-cascader ref="cascaderUnit" v-model="dataForm.agencyId" :options="optionsA" :props="{ checkStrictly: true, emitPath: false,children:'subAgencyList',label:'agencyName',value:'agencyId'}" clearable />
<el-cascader ref="cascaderUnit"
v-model="dataForm.agencyId"
:options="optionsA"
:props="{ checkStrictly: true, emitPath: false,children:'subAgencyList',label:'agencyName',value:'agencyId'}"
clearable />
<!-- <template slot-scope="{ node, data }">
<div @click="cascaderClick(data)">
<span>{{ data.objectName }}</span>
@ -26,12 +36,13 @@
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" class="diy-button--search" @click="handleSearch">查询</el-button>
<el-button
class="diy-button--reset"
<el-button type="primary"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button class="diy-button--reset"
size="small"
@click="resetForm('searchForm')"
>重置</el-button>
@click="resetForm('searchForm')">重置</el-button>
</el-form-item>
</el-form>
</el-card>
@ -42,63 +53,136 @@
size="small">总计</el-button>
<el-button @click="exportHandle"
class="diy-button--reset"
size="small" :loading="exportLoading">导出</el-button>
size="small"
:loading="exportLoading">导出</el-button>
</div>
<el-table class="resi-table" v-loading="dataListLoading" :data="dataList" border style="width: 100%"
<el-table class="resi-table"
v-loading="dataListLoading"
:data="dataList"
border
style="width: 100%"
:height="tableHeight">
<!-- <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> -->
<el-table-column type="index" label="序号" header-align="center" align="center" width="50"></el-table-column>
<el-table-column min-width="100" prop="orgName" label="所属社区" header-align="center" align="center" >
<el-table-column type="index"
label="序号"
header-align="center"
align="center"
width="50"></el-table-column>
<el-table-column min-width="100"
prop="orgName"
label="所属社区"
header-align="center"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.orgType==='agency'"><a class="name-a" style="color: #2195fe;" @click="handleClick(scope.row)">{{scope.row.orgName}}</a></span>
<span v-if="scope.row.orgType==='agency'"><a class="name-a"
style="color: #2195fe;"
@click="handleClick(scope.row)">{{scope.row.orgName}}</a></span>
<span v-else>{{scope.row.orgName}}</span>
</template>
</el-table-column>
<el-table-column min-width="100" prop="memberCount" label="网格员数" header-align="center" align="center" />
<el-table-column min-width="100"
prop="memberCount"
label="网格员数"
header-align="center"
align="center">
<template slot-scope="scope">
<span><a class="name-a"
style="color: #2195fe;"
@click="handleClickMember(scope.row)">{{scope.row.memberCount}}</a></span>
</template>
</el-table-column>
<el-table-column min-width="100" prop="projectCount" label="上报数量" header-align="center" align="center" />
<el-table-column min-width="110" prop="closedCount" label="办结数" header-align="center" align="center" />
<el-table-column min-width="110" prop="projectAve" label="人均上报" header-align="center" align="center" />
<el-table-column min-width="110" prop="closedAve" label="人均办结" header-align="center" align="center" />
<el-table-column min-width="100"
prop="projectCount"
label="上报数量"
header-align="center"
align="center" />
<el-table-column min-width="110"
prop="closedCount"
label="办结数"
header-align="center"
align="center" />
<el-table-column min-width="110"
prop="projectAve"
label="人均上报"
header-align="center"
align="center" />
<el-table-column min-width="110"
prop="closedAve"
label="人均办结"
header-align="center"
align="center" />
</el-table>
<div>
<el-pagination
@size-change="handleSizeChange"
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total"
>
:total="total">
</el-pagination>
</div>
</el-card>
<el-dialog
title="总计"
<el-dialog title="总计"
:visible.sync="totalVisible"
width="60%">
<template>
<el-table
:data="tableData"
<el-table :data="tableData"
style="width: 100%"
height="200">
<!-- <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> -->
<el-table-column min-width="100" prop="orgName" label="所属社区" header-align="center" align="center" />
<el-table-column min-width="100" prop="memberCount" label="网格员数" header-align="center" align="center" />
<el-table-column min-width="100" prop="projectCount" label="上报数量" header-align="center" align="center" />
<el-table-column min-width="110" prop="closedCount" label="办结数" header-align="center" align="center" />
<el-table-column min-width="110" prop="projectAve" label="人均上报" header-align="center" align="center" />
<el-table-column min-width="110" prop="closedAve" label="人均办结" header-align="center" align="center" />
<el-table-column min-width="100"
prop="orgName"
label="所属社区"
header-align="center"
align="center" />
<el-table-column min-width="100"
prop="memberCount"
label="网格员数"
header-align="center"
align="center" />
<el-table-column min-width="100"
prop="projectCount"
label="上报数量"
header-align="center"
align="center" />
<el-table-column min-width="110"
prop="closedCount"
label="办结数"
header-align="center"
align="center" />
<el-table-column min-width="110"
prop="projectAve"
label="人均上报"
header-align="center"
align="center" />
<el-table-column min-width="110"
prop="closedAve"
label="人均办结"
header-align="center"
align="center" />
</el-table>
</template>
</el-dialog>
</div>
<div v-if="showType==='two'">
<grid-member :orgId="selOrgId"
:orgType="selOrgType"
:startDate="dataForm.startDate"
:endDate="dataForm.endDate"
@handleBackToOne="handleBackToOne"></grid-member>
</div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import gridMember from "./gridMember";
// import AddOrUpdate from './factagencyuserhousedaily-add-or-update'
export default {
data () {
@ -115,7 +199,7 @@ export default {
optionsA: [],
totalVisible: false,
pickerOptions: {
disabledDate(time) {
disabledDate (time) {
return time.getTime() > Date.now();
},
},
@ -130,11 +214,15 @@ export default {
total: 0,
tableData: [],
pageNo: 1,
pageSize: 20
pageSize: 20,
showType: 'one',
selOrgId: '',
selOrgType: '',
}
},
components: {
// AddOrUpdate
gridMember
},
created () {
this.getGridList()
@ -154,18 +242,26 @@ export default {
},
computed: {
...mapGetters(["clientHeight", "iframeHeight"]),
tableHeight() {
tableHeight () {
const h = this.clientHeight - 360 + this.iframeHeigh;
const _h = this.clientHeight - 360;
return this.$store.state.inIframe ? h : _h;
},
},
methods: {
handleClick(row) {
handleClick (row) {
this.dataForm.agencyId = row.orgId
this.handleSearch()
},
resetForm(formName) {
handleClickMember (row) {
this.selOrgId = row.orgId
this.selOrgType = row.orgType
this.showType = 'two'
},
handleBackToOne () {
this.showType = "one"
},
resetForm (formName) {
this.$refs[formName].resetFields();
this.timeRange = "";
this.dataForm.startDate = "";
@ -174,17 +270,17 @@ export default {
this.pageNo = 1
this.getTableList()
},
handleSearch() {
handleSearch () {
this.dataForm.type = 1
this.pageNo = 1
this.getTableList()
},
handleSizeChange(val) {
handleSizeChange (val) {
console.log(`每页 ${val}`);
this.pageSize = val;
this.getTableList();
},
handleCurrentChange(val) {
handleCurrentChange (val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableList();
@ -248,7 +344,7 @@ export default {
})
this.totalVisible = true
},
getTableList() {
getTableList () {
const { user } = this.$store.state
const _data = {
...this.dataForm,
@ -269,7 +365,7 @@ export default {
return this.$message.error('网络错误')
})
},
getGridList() {
getGridList () {
const { user } = this.$store.state
this.dataListLoading = true
const params = {
@ -288,7 +384,7 @@ export default {
let { agencyList, subAgencyList } = res.data
// this.optionsA = res.data
// console.log(this.optionsA);
const _arr = [{...agencyList, subAgencyList: [...subAgencyList] }]
const _arr = [{ ...agencyList, subAgencyList: [...subAgencyList] }]
this.optionsA = this.deepTree(_arr)
console.log('optionsA----', this.optionsA)
}
@ -299,7 +395,7 @@ export default {
})
this.dataListLoading = false
},
deepTree(arr) {
deepTree (arr) {
if (Array.isArray(arr)) {
return arr.map(item => {
return {
@ -313,7 +409,7 @@ export default {
}
</script>
<style>
.block{
.block {
position: absolute;
left: 0px;
display: inline-block;
@ -321,12 +417,12 @@ export default {
height: 50px;
background: #fff;
}
.cascader-block .el-cascader-node>.el-radio{
.cascader-block .el-cascader-node > .el-radio {
display: none;
}
</style>
<style lang="scss" scoped>
.blacklist-reason {
.blacklist-reason {
width: 100%;
height: 80px;
border: 1px solid #e4e4e4;
@ -334,19 +430,19 @@ export default {
resize: none;
padding: 8px;
box-sizing: border-box;
}
}
</style>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
@import "@/assets/scss/buttonstyle.scss";
.resi-container .resi-card-table {
.resi-container .resi-card-table {
::v-deep .el-table th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
// border-right: 1px solid rgba(33, 149, 254, 1);
}
}
.resi-table {
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
@ -357,11 +453,10 @@ export default {
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
}
.form-wr {
}
.form-wr {
.input-width {
width: 260px;
}
.input-width-textarea {
width: 500px;
@ -383,18 +478,18 @@ export default {
}
}
}
}
.div-content {
}
.div-content {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.resi-row-btn {
}
.resi-row-btn {
margin-bottom: 13px;
.upload-btn {
display: inline-block;
margin: 0 10px;
}
}
}
</style>

321
src/views/modules/shequzhili/statics/gridMember.vue

@ -0,0 +1,321 @@
<template>
<div class="mode-block resi-container">
<div v-if="showType==='two'">
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button @click="handleBackToOne"
class="diy-button--search"
size="small">返回</el-button>
<el-button @click="exportHandle"
class="diy-button--reset"
size="small"
:loading="exportLoading">导出</el-button>
</div>
<el-table class="resi-table"
v-loading="dataListLoading"
:data="tableData"
border
style="width: 100%"
:height="tableHeight">
<el-table-column type="index"
label="序号"
header-align="center"
align="center"
width="50"></el-table-column>
<el-table-column min-width="100"
prop="staffName"
label="网格员"
header-align="center"
align="center" />
<el-table-column min-width="100"
prop="projectCount"
label="上报数量"
header-align="center"
align="center">
<template slot-scope="scope">
<span><a class="name-a"
style="color: #2195fe;"
@click="handleClickCount(scope.row)">{{scope.row.projectCount}}</a></span>
</template>
</el-table-column>
<el-table-column min-width="110"
prop="closedCount"
label="办结数"
header-align="center"
align="center">
<template slot-scope="scope">
<span><a class="name-a"
style="color: #2195fe;"
@click="handleClickCount(scope.row)">{{scope.row.closedCount}}</a></span>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</el-card>
</div>
<div v-if="showType==='three'">
<grid-member-event :orgId="orgId"
:orgType="orgType"
:startTime="startDate"
:endTime="endDate"
:staffName="selStaffName"
@handleBackToTwo="handleBackToTwo"></grid-member-event>
</div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import { requestPost } from "@/js/dai/request";
import gridMemberEvent from "./gridMemberEvent";
export default {
data () {
return {
showType: 'two',
exportLoading: false,
dataListLoading: false,
total: 0,
tableData: [],
pageNo: 1,
pageSize: 20,
selStaffName: ''
}
},
components: {
gridMemberEvent
},
created () {
this.getTableList()
},
watch: {
},
props: {
orgId: {
type: String,
default: "",
},
orgType: {
type: String,
default: "",
},
startDate: {
type: String,
default: "",
},
endDate: {
type: String,
default: "",
},
},
computed: {
...mapGetters(["clientHeight", "iframeHeight"]),
tableHeight () {
const h = this.clientHeight - 255 + this.iframeHeigh;
const _h = this.clientHeight - 255;
return this.$store.state.inIframe ? h : _h;
},
},
methods: {
handleBackToOne () {
this.$emit("handleBackToOne")
},
handleClick (row) {
this.dataForm.agencyId = row.orgId
this.handleSearch()
},
handleClickCount (row) {
this.selStaffName = row.staffName
this.showType = 'three'
},
handleBackToTwo () {
this.showType = "two"
},
async getTableList () {
this.dataListLoading = true
const url = "/data/aggregator/org/memberProjectInfoList"
let params = {
orgId: this.orgId,
orgType: this.orgType,
startDate: this.startDate ? this.startDate.substring(0, 8) : '',
endDate: this.endDate ? this.endDate.substring(0, 8) : '',
pageNo: this.pageNo,
pageSize: this.pageSize
}
const { data, code, msg } = await requestPost(url, params)
this.dataListLoading = false
if (code === 0) {
this.total = data.total || 0;
this.tableData = data.list
} else {
this.$message.error(msg)
}
},
handleSizeChange (val) {
console.log(`每页 ${val}`);
this.pageSize = val;
this.getTableList();
},
handleCurrentChange (val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableList();
},
exportHandle () {
const url = '/data/aggregator/org/memberProjectInfoList/export'
this.exportLoading = true
this.$http({
method: 'Post',
url,
responseType: 'blob',
data: {
orgId: this.orgId,
orgType: this.orgType,
startDate: this.startDate ? this.startDate.substring(0, 8) : '',
endDate: this.endDate ? this.endDate.substring(0, 8) : '',
}
}).then(res => {
// this.download(res.data, title + '.xls')
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
// this.exportLoading = false
} else this.$message.error('下载失败')
this.exportLoading = false
}).catch(err => {
console.log('err', err)
this.exportLoading = false
return this.$message.error('网络错误')
})
},
}
}
</script>
<style>
.block {
position: absolute;
left: 0px;
display: inline-block;
width: 35px;
height: 50px;
background: #fff;
}
.cascader-block .el-cascader-node > .el-radio {
display: none;
}
</style>
<style lang="scss" scoped>
.blacklist-reason {
width: 100%;
height: 80px;
border: 1px solid #e4e4e4;
border-radius: 4px;
resize: none;
padding: 8px;
box-sizing: border-box;
}
</style>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
.resi-container .resi-card-table {
::v-deep .el-table th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
// border-right: 1px solid rgba(33, 149, 254, 1);
}
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
::v-deep .btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);
}
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
}
.form-wr {
.input-width {
width: 260px;
}
.input-width-textarea {
width: 500px;
}
.imsg-list {
display: flex;
align-items: center;
.imgs-item {
position: relative;
margin-right: 10px;
.el-icon-delete {
position: absolute;
top: 0;
right: 0;
font-size: 18px;
color: red;
z-index: 3;
cursor: pointer;
}
}
}
}
.div-content {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.resi-row-btn {
margin-bottom: 13px;
.upload-btn {
display: inline-block;
margin: 0 10px;
}
}
</style>

442
src/views/modules/shequzhili/statics/gridMemberEvent.vue

@ -0,0 +1,442 @@
<template>
<div class="mode-block resi-container">
<el-card v-if="pageType == 'list'"
class="resi-card-table">
<div class="resi-row-btn">
<el-button @click="handleBackToTwo"
class="diy-button--search"
size="small">返回</el-button>
<el-button @click="exportHandle"
class="diy-button--reset"
size="small"
:loading="exportLoading">导出</el-button>
</div>
<el-table :data="tableData"
border
v-loading="dataListLoading"
style="width: 100%"
class="resi-table"
:height="tableHeight">
<el-table-column label="序号"
fixed="left"
type="index"
align="center"
width="50" />
<el-table-column prop="gridName"
align="center"
label="所属组织/网格"
min-width="140"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="firstName"
label="事件类型"
min-width="140"
align="center"
:show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.firstName + '-' + scope.row.secondName }}
</template>
</el-table-column>
<el-table-column prop="staffName"
width="100"
align="center"
label="报事人"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="mobile"
align="center"
label="手机号"
width="140"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime"
align="center"
label="上报时间"
width="160"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="backGround"
align="center"
label="事件内容"
min-width="160"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="publicReply"
align="center"
min-width="160"
label="办理结果(结案说明)"
:show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.publicReply }}
</template>
</el-table-column>
<el-table-column prop="urlList"
align="center"
label="图片 ">
<template slot-scope="scope">
<el-image v-if="scope.row.urlList&&scope.row.urlList.length>0"
style="width: 40px; height: 40px"
:src="scope.row.urlList[0]"
:preview-src-list="scope.row.urlList">
</el-image>
<span v-else></span>
</template>
</el-table-column>
<el-table-column prop="origin"
align="center"
label="上报渠道"
width="120" />
<!-- <template slot-scope="scope">
<span v-if="scope.row.origin == 'agency'">网格上报</span>
<span v-else-if="scope.row.origin == 'ic_event'">居民上报</span>
<span v-else-if="scope.row.origin == 'work_event'">巡查上报</span>
<span v-else-if="scope.row.origin == 'issue'">议题上报</span>
</template>
</el-table-column> -->
<el-table-column prop="address"
align="center"
label="地址 "
:show-overflow-tooltip="true" />
<el-table-column prop="status"
align="center"
label="状态 "
width="70" />
<!-- <template slot-scope="scope">
{{ scope.row.status == 'pending' ? '处理中' : '已结案' }}
</template>
</el-table-column> -->
<el-table-column fixed="right"
label="操作"
align="center"
width="100">
<template slot-scope="scope">
<el-button @click="handleWatch(scope.$index)"
type="text"
size="small">查看</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</el-card>
<div class="g-page"
v-if="pageType == 'info'">
<project-info ref="eleEditForm"
:type="pageType"
:projectId="currentProject.projectId"
@close="handleClose"
@afterEdit="handleEditSuccess" />
</div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import { requestPost } from "@/js/dai/request";
import projectInfo from "../xiangmu/cpts/project-info";
export default {
data () {
return {
exportLoading: false,
dataListLoading: false,
total: 0,
tableData: [],
pageNo: 1,
pageSize: 20,
currentProject: {
projectId: "",
userId: "",
categoryCodes: [],
},
pageType: 'list'
}
},
components: {
projectInfo
},
created () {
this.getTableList()
},
watch: {
},
props: {
orgId: {
type: String,
default: "",
},
orgType: {
type: String,
default: "",
},
startTime: {
type: String,
default: "",
},
endTime: {
type: String,
default: "",
},
staffName: {
type: String,
default: "",
},
},
computed: {
...mapGetters(["clientHeight", "iframeHeight"]),
tableHeight () {
const h = this.clientHeight - 255 + this.iframeHeigh;
const _h = this.clientHeight - 255;
return this.$store.state.inIframe ? h : _h;
},
},
methods: {
handleBackToTwo () {
this.$emit("handleBackToTwo")
},
handleClick (row) {
this.dataForm.agencyId = row.orgId
this.handleSearch()
},
async getTableList () {
this.dataListLoading = true
const { user } = this.$store.state
const url = "/gov/project/project/orgprojectlist"
let start = ''
let end = ''
//yyyy-MM-dd HH:mm:ss
if (this.startTime) {
start = this.startTime.substring(0, 4) + '-' + this.startTime.substring(4, 6) + '-' + this.startTime.substring(6, 8) + ' ' + this.startTime.substring(8, 10) + ':' + this.startTime.substring(10, 12) + ':' + this.startTime.substring(12, 14)
}
if (this.endTime) {
end = this.endTime.substring(0, 4) + '-' + this.endTime.substring(4, 6) + '-' + this.endTime.substring(6, 8) + ' ' + this.endTime.substring(8, 10) + ':' + this.endTime.substring(10, 12) + ':' + this.endTime.substring(12, 14)
}
let params = {
orgId: this.orgId,
orgType: this.orgType,
startTime: start,
endTime: end,
staffName: this.staffName,
pageNo: this.pageNo,
pageSize: this.pageSize
}
const { data, code, msg } = await requestPost(url, params)
this.dataListLoading = false
if (code === 0) {
this.total = data.total || 0;
this.tableData = data.list
? data.list.map((item) => {
return {
...item,
urlList: item.urlList && item.urlList.map(n => n.url)
};
})
: [];
} else {
this.$message.error(msg)
}
},
async handleWatch (rowIndex) {
let item = this.tableData[rowIndex];
this.currentProject = {
projectId: item.projectId,
};
this.pageType = "info";
},
handleClose () {
this.pageType = "list";
this.currentProject = {
projectId: "",
};
},
handleEditSuccess () {
this.handleClose();
// this.getTableData();
},
exportHandle () {
const url = '/gov/project/project/orgprojectexport'
let start = ''
let end = ''
if (this.startTime) {
start = this.startTime.substring(0, 4) + '-' + this.startTime.substring(4, 6) + '-' + this.startTime.substring(6, 8) + ' ' + this.startTime.substring(8, 10) + ':' + this.startTime.substring(10, 12) + ':' + this.startTime.substring(12, 14)
}
if (this.endTime) {
end = this.endTime.substring(0, 4) + '-' + this.endTime.substring(4, 6) + '-' + this.endTime.substring(6, 8) + ' ' + this.endTime.substring(8, 10) + ':' + this.endTime.substring(10, 12) + ':' + this.endTime.substring(12, 14)
}
this.exportLoading = true
this.$http({
method: 'Post',
url,
responseType: 'blob',
data: {
orgId: this.orgId,
orgType: this.orgType,
startTime: start,
endTime: end,
staffName: this.staffName,
}
}).then(res => {
// this.download(res.data, title + '.xls')
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
// this.exportLoading = false
} else this.$message.error('下载失败')
this.exportLoading = false
}).catch(err => {
console.log('err', err)
this.exportLoading = false
return this.$message.error('网络错误')
})
},
handleSizeChange (val) {
console.log(`每页 ${val}`);
this.pageSize = val;
this.getTableList();
},
handleCurrentChange (val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.getTableList();
},
}
}
</script>
<style>
.block {
position: absolute;
left: 0px;
display: inline-block;
width: 35px;
height: 50px;
background: #fff;
}
.cascader-block .el-cascader-node > .el-radio {
display: none;
}
</style>
<style lang="scss" scoped>
.blacklist-reason {
width: 100%;
height: 80px;
border: 1px solid #e4e4e4;
border-radius: 4px;
resize: none;
padding: 8px;
box-sizing: border-box;
}
</style>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
.resi-container .resi-card-table {
::v-deep .el-table th {
color: #fff;
background-color: rgba(33, 149, 254, 1);
// border-right: 1px solid rgba(33, 149, 254, 1);
}
}
.resi-table {
::v-deep .el-button--text {
text-decoration: underline;
}
::v-deep .btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);
}
::v-deep .btn-color-edit {
color: rgba(0, 167, 169, 1);
}
}
.form-wr {
.input-width {
width: 260px;
}
.input-width-textarea {
width: 500px;
}
.imsg-list {
display: flex;
align-items: center;
.imgs-item {
position: relative;
margin-right: 10px;
.el-icon-delete {
position: absolute;
top: 0;
right: 0;
font-size: 18px;
color: red;
z-index: 3;
cursor: pointer;
}
}
}
}
.div-content {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.resi-row-btn {
margin-bottom: 13px;
.upload-btn {
display: inline-block;
margin: 0 10px;
}
}
</style>
Loading…
Cancel
Save