157 lines
4.8 KiB
Java
157 lines
4.8 KiB
Java
<template>
|
|
<a-modal
|
|
:title="title"
|
|
:width="800"
|
|
:visible="visible"
|
|
:confirm-loading="confirmLoading"
|
|
:maskClosable="false"
|
|
@cancel="visible = false"
|
|
>
|
|
<template slot="footer">
|
|
<a-button key="back" @click="visible = false">
|
|
{{$t('cancel')}}
|
|
</a-button>
|
|
</template>
|
|
<!-- <div style="text-align: right;margin-bottom: 10px">-->
|
|
<!-- <div @click="handleExport" class="operator-text">-->
|
|
<!-- <a-icon type="export" :rotate="-90"/>-->
|
|
<!-- {{$t('export')}}-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
<a-table
|
|
ref="table"
|
|
:components="drag(columns,'columns')"
|
|
:loading="loading"
|
|
:pagination="false"
|
|
:scroll="{x: '100%',y:400}"
|
|
:data-source="dataSource"
|
|
@change="tableOnChange"
|
|
:columns="columns"
|
|
>
|
|
<!-- -->
|
|
<a slot="areaOfResponsibility" @click="areaOfResponsibilityClick(result)" slot-scope="text,result">
|
|
{{text}}
|
|
</a>
|
|
</a-table>
|
|
</a-modal>
|
|
</template>
|
|
|
|
<script>
|
|
import { getAction, postAction, downloadFile } from '@/api/manage'
|
|
import moment from 'moment'
|
|
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
|
|
|
export default {
|
|
name: 'responsibilityList',
|
|
mixins: [ResizeHeader, ResizeColumnProvide],
|
|
data() {
|
|
return {
|
|
visible: false,
|
|
title: '',
|
|
confirmLoading: false,
|
|
loading: false,
|
|
dataSource: [],
|
|
queryParam: {},
|
|
url: {
|
|
groupByTerritoryXls: '/project/projectLibraryBase/exportProjectDetailsStatisticsGroupByTerritoryXls',
|
|
GroupByTerritory: '/project/projectLibraryBase/getProjectDetailsStatisticsGroupByTerritory'
|
|
},
|
|
columns: [
|
|
{
|
|
title: this.$t('areaOfResponsibility'),
|
|
dataIndex: 'dutyTerritoryName',
|
|
align: 'left',
|
|
width: 150,
|
|
ellipsis: true,
|
|
sorter: true,
|
|
scopedSlots: { customRender: 'areaOfResponsibility' }
|
|
},
|
|
{
|
|
title: this.$t('Quantity'),
|
|
dataIndex: 'amount',
|
|
align: 'left',
|
|
ellipsis: true,
|
|
width: 150,
|
|
sorter: true
|
|
},
|
|
{
|
|
title: this.$t('proportionWithInTheAreaOfResponsibility'),
|
|
dataIndex: 'percentage',
|
|
align: 'left',
|
|
ellipsis: true,
|
|
width: 240,
|
|
sorter: true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
mounted() {
|
|
},
|
|
methods: {
|
|
getData(data) {
|
|
this.visible = true
|
|
this.title = data.title
|
|
this.queryParam = data
|
|
this.getList()
|
|
},
|
|
tableOnChange(pagination, filters, sorter) {
|
|
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
|
if (sorter.columnKey == 'attestationRank_dictText') {
|
|
this.orderByField = 'attestationRank'
|
|
} else if (sorter.columnKey == 'dutyTerritory_dictText') {
|
|
this.orderByField = 'dutyTerritory'
|
|
} else if (sorter.columnKey == 'designDeliverableTypeName') {
|
|
this.orderByField = 'designDeliverableType'
|
|
} else if (sorter.columnKey == 'verifyDeliverableTypeName') {
|
|
this.orderByField = 'verifyDeliverableType'
|
|
} else if (sorter.columnKey == 'designDutyIdName') {
|
|
this.orderByField = 'designDutyId'
|
|
} else if (sorter.columnKey == 'verifyDutyIdName') {
|
|
this.orderByField = 'verifyDutyId'
|
|
} else if (sorter.columnKey == 'verifyFlowStatusName') {
|
|
this.orderByField = 'verifyFlowStatus'
|
|
} else if (sorter.columnKey == 'designFlowStatusName') {
|
|
this.orderByField = 'designFlowStatus'
|
|
} else {
|
|
this.orderByField = sorter.columnKey
|
|
}
|
|
this.getList()
|
|
},
|
|
getList() {
|
|
this.loading = true
|
|
let query = {
|
|
...this.queryParam,
|
|
orderBy: this.orderBy,
|
|
orderByField: this.orderByField,
|
|
}
|
|
getAction(this.url.GroupByTerritory, query).then((res) => {
|
|
if (res.success) {
|
|
this.loading = false
|
|
this.dataSource = res.result.dataList || []
|
|
} else {
|
|
this.loading = false
|
|
this.dataSource = []
|
|
}
|
|
})
|
|
},
|
|
handleExport() {
|
|
downloadFile(this.url.groupByTerritoryXls, this.title + '.xls', this.queryParam)
|
|
},
|
|
handleCancel() {
|
|
this.visible = false
|
|
},
|
|
areaOfResponsibilityClick(item) {
|
|
if (this.queryParam.operatorType == 'queryFGTaskToConfirmStatistics' ||
|
|
this.queryParam.operatorType == 'queryDesignStatistics' ||
|
|
this.queryParam.operatorType == 'queryVerifyStatistics') {
|
|
item.isListing = '1'
|
|
}
|
|
this.$emit('responsibility', item)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style> |