完成网格长报表
This commit is contained in:
parent
569a03b7f3
commit
5bfbdf9bf0
@ -7,8 +7,8 @@
|
||||
<n-space class="search" vertical>
|
||||
<n-grid :cols="7" :x-gap="10">
|
||||
<n-grid-item>
|
||||
<n-select placeholder="请选择街道" v-model:value="search.select.street.value"
|
||||
:options="search.select.street.options" :clearable="true" />
|
||||
<n-select placeholder="请选择街道" v-model:value="search.select.area.value"
|
||||
:options="search.select.area.options" :clearable="true" @update:value="onAreaValueUpdate"/>
|
||||
</n-grid-item>
|
||||
<n-grid-item>
|
||||
<n-select placeholder="请选择社区" v-model:value="search.select.community.value"
|
||||
@ -96,7 +96,7 @@ export default {
|
||||
userId: null,
|
||||
userName: null,
|
||||
select: {
|
||||
street: {
|
||||
area: {
|
||||
value: null,
|
||||
options: [
|
||||
{ label: '稀土路街道', value: 'xtl' }
|
||||
@ -218,7 +218,15 @@ export default {
|
||||
title: '没完成办理流程',
|
||||
key: 'I',
|
||||
keyName: 'unComplete',
|
||||
width: 60
|
||||
width: 60,
|
||||
render(row, index) {
|
||||
return h('a', {
|
||||
href: 'javascript:void(0);',
|
||||
onClick() {
|
||||
vueSelf.onUnCompleteClick(row, index);
|
||||
}
|
||||
}, row.I);
|
||||
}
|
||||
},
|
||||
{
|
||||
align: 'center',
|
||||
@ -257,7 +265,10 @@ export default {
|
||||
title: '网格案件调度情况得分',
|
||||
key: 'L',
|
||||
keyName: 'unComplete',
|
||||
width: 60
|
||||
width: 60,
|
||||
render(row, index) {
|
||||
return vueSelf.computeL(row);
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
@ -335,6 +346,19 @@ export default {
|
||||
onScroingCloseClick() {
|
||||
this.modal.scoring.show = false;
|
||||
},
|
||||
// 没完成办理流程 -
|
||||
onUnCompleteClick(row, index) {
|
||||
let unComplete = row.I;
|
||||
this.modal.scoring.show = true;
|
||||
this.modal.scoring.rowKey = 'I';
|
||||
this.modal.scoring.rowIndex = index;
|
||||
this.modal.scoring.score = unComplete;
|
||||
this.modal.scoring.reason = row.reasonI;
|
||||
this.modal.scoring.maxScore = null;
|
||||
this.modal.scoring.minScore = null;
|
||||
this.modal.scoring.userName = row.B;
|
||||
this.modal.scoring.title = '没完成办理流程';
|
||||
},
|
||||
// 未上报案件造成严重影响 -
|
||||
onUnReportErrorClick(row, index) {
|
||||
let unReportError = row.J;
|
||||
@ -374,8 +398,11 @@ export default {
|
||||
this.modal.scoring.userName = row.B;
|
||||
this.modal.scoring.title = '网格工作季度考核';
|
||||
},
|
||||
computeL(row) {
|
||||
return Math.max(row.F - row.H - row.I - row.J - row.K, 0);
|
||||
},
|
||||
computeN(row) {
|
||||
return row.C - row.E + row.L + row.M
|
||||
return Math.max(row.C - row.E + this.computeL(row) + row.M, 0);
|
||||
},
|
||||
resize() {
|
||||
let body = document.body;
|
||||
@ -383,6 +410,46 @@ export default {
|
||||
this.table.maxHeight = body.clientHeight - 355;
|
||||
// this.table.scrollX = body.clientWidth;
|
||||
},
|
||||
listArea() {
|
||||
let vueSelf = this;
|
||||
vueSelf.$axios.get(`api/kpi/list-area`, {
|
||||
}).then(({ data }) => {
|
||||
let optionArray = [];
|
||||
data.forEach((item, index) => {
|
||||
optionArray.push({
|
||||
label: item.dictName,
|
||||
value: item.dictId
|
||||
})
|
||||
})
|
||||
vueSelf.search.select.area.options = optionArray;
|
||||
}).catch(resp => {
|
||||
vueSelf.message.error(resp.data.msg);
|
||||
})
|
||||
},
|
||||
onAreaValueUpdate(value) {
|
||||
this.listCommunity(value);
|
||||
},
|
||||
listCommunity(areaId) {
|
||||
let vueSelf = this;
|
||||
vueSelf.search.select.community.value = null;
|
||||
if (!areaId) {
|
||||
vueSelf.search.select.community.options = [];
|
||||
return;
|
||||
}
|
||||
vueSelf.$axios.get(`api/kpi/list-community/area-id/${areaId}`, {
|
||||
}).then(({ data }) => {
|
||||
let optionArray = [];
|
||||
data.forEach((item, index) => {
|
||||
optionArray.push({
|
||||
label: item.communityName,
|
||||
value: item.communityId
|
||||
})
|
||||
})
|
||||
vueSelf.search.select.community.options = optionArray;
|
||||
}).catch(resp => {
|
||||
vueSelf.message.error(resp.data.msg);
|
||||
})
|
||||
},
|
||||
onSearchClick() {
|
||||
this.listData();
|
||||
},
|
||||
@ -390,8 +457,9 @@ export default {
|
||||
let vueSelf = this;
|
||||
let tableDatas = [];
|
||||
vueSelf.table.data.forEach(item => {
|
||||
item.AE = vueSelf.computeAE(item);
|
||||
item.AG = (item.AE * item.AF / 100).toFixed(2);
|
||||
item.L = vueSelf.computeL(item);
|
||||
item.N = vueSelf.computeN(item);
|
||||
item.P = (item.N * item.O / 100).toFixed(2);
|
||||
tableDatas.push({...item});
|
||||
})
|
||||
vueSelf.dialog.warning({
|
||||
@ -401,7 +469,7 @@ export default {
|
||||
negativeText: "取消",
|
||||
onPositiveClick: () => {
|
||||
vueSelf.dataLoading = true;
|
||||
vueSelf.$axios.put(`api/kpi/khxz/update-wgy/${vueSelf.search.select.wgy.value}`, {
|
||||
vueSelf.$axios.put(`api/kpi/khxz/update-wgz`, {
|
||||
datas: tableDatas
|
||||
}).then( resp => {
|
||||
vueSelf.message.info('保存成功');
|
||||
@ -419,7 +487,7 @@ export default {
|
||||
onExportClick() {
|
||||
let vueSelf = this;
|
||||
vueSelf.btnExportDisabled = true;
|
||||
download(vueSelf.$axios, `api/kpi/khxz/export-wgy`, vueSelf.getQuery(), () => {
|
||||
download(vueSelf.$axios, `api/kpi/khxz/export-wgz`, vueSelf.getQuery(), () => {
|
||||
vueSelf.btnExportDisabled = false;
|
||||
});
|
||||
},
|
||||
@ -451,6 +519,7 @@ export default {
|
||||
this.search.select.year.value = getCurrentYear();
|
||||
this.search.select.month.options = listMonth();
|
||||
this.search.select.month.value = getCurrentMonth();
|
||||
this.listArea();
|
||||
this.listData();
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user