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. 52
      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) => { .then((res) => {
this.importLoading = false this.importLoading = false
this.importBtnTitle = '导入人员数据' this.importBtnTitle = '导入人员数据'
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1]) // let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName) // console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }) // let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob) // var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a') // var aLink = document.createElement('a')
aLink.style.display = 'none' // aLink.style.display = 'none'
aLink.href = url // aLink.href = url
aLink.setAttribute('download', fileName) // aLink.setAttribute('download', fileName)
document.body.appendChild(aLink) // document.body.appendChild(aLink)
aLink.click() // aLink.click()
document.body.removeChild(aLink) // // document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob // window.URL.revokeObjectURL(url) //blob
this.getTableData() this.getTableData()
}) })
.catch( err => { .catch( err => {

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

@ -36,7 +36,10 @@
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span>提报给</span> <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>
</div> </div>

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

@ -51,31 +51,34 @@
</div> </div>
</div> </div>
<div class="list"> <div class="list">
<div class="item"> <div class="item" v-if="info.serviceShowFlag">
<span class="item-field">服务方</span> <span class="item-field">服务方</span>
<span>{{ info.serviceShowName }}</span> <span>{{ info.serviceShowName }}</span>
</div> </div>
<div class="item"> <template v-if="info.status == 'finished'">
<span class="item-field">实际服务时间</span> <div class="item">
<span v-if="info.serviceStartTime" <span class="item-field">实际服务时间</span>
>{{ info.serviceStartTime }} <br /> <span v-if="info.serviceStartTime"
{{ info.serviceEndTime }}</span >{{ info.serviceStartTime }} <br />
> {{ info.serviceEndTime }}</span
</div> >
<div class="item"> </div>
<span class="item-field">完成情况</span> <div class="item">
<span <span class="item-field">完成情况</span>
>{{ info.finishResult == "resolved" ? "已解决" : "未解决" }} <span
<br /> >{{ info.finishResult == "resolved" ? "已解决" : "未解决" }}
{{ info.finishDesc }}</span <br />
> {{ info.finishDesc }}</span
</div> >
<div class="item"> </div>
<span class="item-field">评价</span> <div class="item">
<span> <span class="item-field">评价</span>
<el-rate :value="info.score" disabled></el-rate> <span>
</span> <el-rate :value="info.score" disabled></el-rate>
</div> </span>
</div>
</template>
</div> </div>
</div> </div>
@ -194,17 +197,18 @@ export default {
if (code === 0) { if (code === 0) {
// console.log('data-org----dict', data) // console.log('data-org----dict', data)
this.info = data; this.info = data;
this.getAnalyse(); this.getAnalyse(demandId);
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
}, },
async getAnalyse() { async getAnalyse(demandId) {
// const url = "/gov/org/customeragency/staffinagencylist"; // const url = "/gov/org/customeragency/staffinagencylist";
this.loading = true; this.loading = true;
const url = "/heart/userdemand/demand-research-analysis"; const url = "/heart/userdemand/demand-research-analysis";
let params = { let params = {
firstCategoryCode: this.info.firstCategoryCode, firstCategoryCode: this.info.firstCategoryCode,
demandRecId: demandId,
icResiUserId: this.info.icResiUserId, icResiUserId: this.info.icResiUserId,
epmetUserIdList: [this.info.epmetUserId], epmetUserIdList: [this.info.epmetUserId],
queryOrigin: this.queryOrigin, queryOrigin: this.queryOrigin,

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

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

Loading…
Cancel
Save