Browse Source

Merge branch 'dev-shuju' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-shuju

shibei_master
jiangyy 4 years ago
parent
commit
173ff47279
  1. 24
      src/views/modules/communityParty/elegant/index.vue
  2. 5
      src/views/modules/visual/basicinfo/cpts/incident-info.vue
  3. 10
      src/views/modules/visual/measure/dialogInfo.vue
  4. 71
      src/views/modules/visual/measure/service.vue

24
src/views/modules/communityParty/elegant/index.vue

@ -339,18 +339,18 @@ export default {
.then((res) => {
this.importLoading = false
this.importBtnTitle = '导入人员数据'
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
// 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.getTableData()
})
.catch( err => {

5
src/views/modules/visual/basicinfo/cpts/incident-info.vue

@ -36,7 +36,10 @@
</div>
<div class="info-prop">
<span>提报给</span>
<span>{{ info.eventPerson.join("、") || "--" }}</span>
<div>
<div :key="item" v-for="item in info.eventOrg">{{ item }}</div>
<div :key="item" v-for="item in info.eventPerson">{{ item }}</div>
</div>
</div>
</div>

10
src/views/modules/visual/measure/dialogInfo.vue

@ -51,10 +51,11 @@
</div>
</div>
<div class="list">
<div class="item">
<div class="item" v-if="info.serviceShowFlag">
<span class="item-field">服务方</span>
<span>{{ info.serviceShowName }}</span>
</div>
<template v-if="info.status == 'finished'">
<div class="item">
<span class="item-field">实际服务时间</span>
<span v-if="info.serviceStartTime"
@ -76,6 +77,8 @@
<el-rate :value="info.score" disabled></el-rate>
</span>
</div>
</template>
</div>
</div>
@ -194,17 +197,18 @@ export default {
if (code === 0) {
// console.log('data-org----dict', data)
this.info = data;
this.getAnalyse();
this.getAnalyse(demandId);
} else {
this.$message.error(msg);
}
},
async getAnalyse() {
async getAnalyse(demandId) {
// const url = "/gov/org/customeragency/staffinagencylist";
this.loading = true;
const url = "/heart/userdemand/demand-research-analysis";
let params = {
firstCategoryCode: this.info.firstCategoryCode,
demandRecId: demandId,
icResiUserId: this.info.icResiUserId,
epmetUserIdList: [this.info.epmetUserId],
queryOrigin: this.queryOrigin,

71
src/views/modules/visual/measure/service.vue

@ -116,7 +116,9 @@
<div class="echarts-container">
<div id="echartsBox" class="echarts-boxs"></div>
</div>
<div class="ecahrts-button">
<el-button type="warning" size="small" @click="handleExport">导出</el-button>
</div>
<div class="warning-box-bottom">
<screen-table
:headerList="headerList"
@ -153,6 +155,7 @@ import screenTable from "../components/screen-table/index";
import cptCard from "@/views/modules/visual/cpts/card";
import nextTick from "dai-js/tools/nextTick";
import dialogInfo from './dialogInfo'
import axios from 'axios'
import * as echarts from 'echarts';
export default {
@ -179,7 +182,8 @@ export default {
{ title: "服务方", coulmn: 'serviceName' },
{ title: "服务时间", coulmn: 'wantServiceTime' },
],
categoryList: {},
categoryList: [],
categoryCode: '',
timeRange: '',
tableData: [
// [1,'','','2',''],
@ -336,7 +340,8 @@ export default {
console.log('yData', yData)
this.initCharts(xData, yData)
this.getServiceList(orgId, orgType, data.categoryList[0].categoryCode)
this.categoryCode = categoryList[0].categoryCode
this.getServiceList(orgId, orgType, categoryList[0].categoryCode)
} else {
}
this.visibleLoading = false;
@ -414,6 +419,44 @@ export default {
this.$message.error(msg)
}
},
handleExport() {
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
let params = {
orgId: _arr[0],
orgType: orgType,
categoryCode: this.categoryCode,
startDateId: this.timeRange && this.timeRange[0] || '',
endDateId: this.timeRange && this.timeRange[1] || ''
}
// .post('epmetuser/icresiuser/exportExcel', params)
axios({
url: window.SITE_CONFIG['apiURL'] + '/heart/userdemand/analysis-export',
// url: 'epmetuser/icresiuser/exportExcel',
method: 'post',
data: params,
responseType: 'blob'
})
.then(res => {
console.log('resllll', res)
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
})
.catch((err) => {
console.log('获取导出情失败', err)
return this.$message.error('网络错误')
})
},
getTreeData(data){
if (!Array.isArray(data)) return []
let arr = data.map(item => {
@ -468,8 +511,10 @@ export default {
if (item.categoryName == params.name) code = item.categoryCode
})
if (code) {
this.categoryCode = code
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.pageNo = 1
this.getServiceList(_arr[0], orgType, code)
}
},
@ -492,11 +537,15 @@ export default {
pageSizeChangeHandleNew(val) {
this.pageNo = 1;
this.pageSize = val;
this.handleCascader(this.selectAgency)
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getServiceList(_arr[0], orgType, this.categoryCode)
},
pageCurrentChangeHandleNew(val) {
this.pageNo = val;
this.handleCascader(this.selectAgency)
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getServiceList(_arr[0], orgType, this.categoryCode)
},
},
};
@ -508,6 +557,9 @@ export default {
scoped
></style>
<style lang="scss" scoped>
.warning-box-bottom {
margin-top: 10px;
}
.card-title {
display: flex;
align-items: center;
@ -723,5 +775,14 @@ export default {
height: 400px;
}
.ecahrts-button {
width: 100%;
text-align: right;
::v-deep .el-button--warning {
background: linear-gradient(90deg, #0863EA, #3B9FFC);
border: 0;
}
}
</style>

Loading…
Cancel
Save