bt-xtgxq-system-bigdata-exa.../src/components/table/Wgy.vue

1172 lines
51 KiB
Vue
Raw Normal View History

2023-05-04 18:16:22 +08:00
<template>
2023-05-09 22:02:21 +08:00
<n-spin :show="dataLoading">
<n-space class="container" vertical>
<n-space justify="center">
<h1>街道社区4-5级网格工作考核细则以季度为考核周期</h1>
</n-space>
<n-space class="search" vertical>
<n-grid :cols="7" :x-gap="10">
<n-grid-item>
<n-select placeholder="请选择街道" v-model:value="search.select.area.value"
2023-05-12 18:17:38 +08:00
:options="search.select.area.options" :clearable="true" @update:value="onAreaValueUpdate" />
2023-05-09 22:02:21 +08:00
</n-grid-item>
<n-grid-item>
<n-select placeholder="请选择社区" v-model:value="search.select.community.value"
:options="search.select.community.options" :clearable="true" />
</n-grid-item>
<n-grid-item>
<n-input v-model:value="search.input.keywords" type="text" placeholder="姓名|手机号" />
</n-grid-item>
<n-grid-item>
<n-select placeholder="请选择年份" v-model:value="search.select.year.value"
:options="search.select.year.options" />
2023-05-09 22:02:21 +08:00
</n-grid-item>
<n-grid-item>
<n-select placeholder="请选择月份" v-model:value="search.select.month.value"
:options="search.select.month.options" />
2023-05-09 22:02:21 +08:00
</n-grid-item>
<n-grid-item>
<n-select placeholder="请选择网格员级别" v-model:value="search.select.wgy.value"
:options="search.select.wgy.options" :clearable="true" />
</n-grid-item>
<n-grid-item>
<n-space>
<n-button type="primary" @click="onSearchClick">搜索</n-button>
2023-05-12 18:17:38 +08:00
<n-button type="default" @click="onSaveClick">保存</n-button>
<n-button type="info" @click="onExportClick" :disabled="btnExportDisabled">导出</n-button>
2023-05-09 22:02:21 +08:00
</n-space>
</n-grid-item>
</n-grid>
</n-space>
<n-space class="body">
<n-data-table size="small" :columns="table.columns" :data="table.data" :bordered="true" :single-line="false"
:min-height="table.minHeight" :max-height="table.maxHeight" :scroll-x="table.scrollX" />
</n-space>
2023-05-06 18:09:41 +08:00
</n-space>
2023-05-09 22:02:21 +08:00
</n-spin>
2023-05-04 18:16:22 +08:00
<n-modal preset="dialog" style="width: 800px" :show="modal.distance.show" :show-icon="false" :mask-closable="true"
:closable="false" :on-update-show="onDistancenCloseClick">
2023-05-12 18:17:38 +08:00
<wgy-work :user-id="search.userId" :user-name="search.userName" :year="search.select.year.value"
:month="search.select.month.value" :level="search.select.wgy.value" />
2023-05-04 18:16:22 +08:00
</n-modal>
<n-modal preset="dialog" style="width: 800px" :show="modal.reportDay.show" :show-icon="false" :mask-closable="true"
:closable="false" :on-update-show="onReportDayCloseClick">
<wgy-report-day />
</n-modal>
2023-05-09 22:02:21 +08:00
<n-modal preset="dialog" style="width: 600px" :title="`【${modal.scoring.userName}】${modal.scoring.title}打分`"
:show="modal.scoring.show" :show-icon="false" :mask-closable="true" :closable="false"
:on-update-show="onScroingCloseClick">
2023-05-04 18:16:22 +08:00
<scoring :row-key="modal.scoring.rowKey" :row-index="modal.scoring.rowIndex" :score="modal.scoring.score"
:reason="modal.scoring.reason" :min-score="modal.scoring.minScore" :max-score="modal.scoring.maxScore"
@confirm="onScroingConfimClick" />
</n-modal>
</template>
<script>
2023-05-12 18:17:38 +08:00
import { createElementBlock, h } from 'vue';
2023-05-04 18:16:22 +08:00
import {
NSpace,
NGrid,
NGridItem,
NSelect,
NRadio,
NInput,
NButton,
NDataTable,
NModal,
2023-05-12 18:17:38 +08:00
NSpin,
2023-05-09 22:02:21 +08:00
useMessage,
useDialog,
2023-05-04 18:16:22 +08:00
} from 'naive-ui';
import WgyWork from '../common/WgyWork.vue'
import WgyReportDay from '../common/WgyReportDay.vue'
import Scoring from '../common/Scoring.vue';
2023-05-12 18:17:38 +08:00
import { listYear, listMonth, getCurrentYear, getCurrentMonth, download } from '../utils/common'
2023-05-04 18:16:22 +08:00
export default {
2023-05-05 18:19:42 +08:00
name: 'Wgy',
2023-05-04 18:16:22 +08:00
components: {
NSpace,
NGrid,
NGridItem,
NSelect,
NRadio,
NInput,
NButton,
NDataTable,
NModal,
2023-05-09 22:02:21 +08:00
NSpin,
2023-05-04 18:16:22 +08:00
WgyWork,
WgyReportDay,
Scoring,
},
data() {
let vueSelf = this;
return {
2023-05-09 22:02:21 +08:00
message: useMessage(),
dialog: useDialog(),
dataLoading: false,
2023-05-12 18:17:38 +08:00
btnExportDisabled: false,
isEdit: false,
2023-05-04 18:16:22 +08:00
search: {
userId: null,
userName: null,
2023-05-04 18:16:22 +08:00
select: {
area: {
2023-05-04 18:16:22 +08:00
value: null,
options: [
{ label: '稀土路街道', value: 'xtl' }
]
},
community: {
value: null,
options: [
{ label: '社区', value: 'sq' }
]
},
year: {
value: null,
options: [
{ label: '2023年', value: '2023' }
]
},
month: {
value: null,
options: [
{ label: '1月', value: '1' }
]
2023-05-06 18:09:41 +08:00
},
wgy: {
value: 4,
options: [
2023-05-09 22:02:21 +08:00
{ label: '5级网格员', value: 4 },
{ label: '4级网格员', value: 3 }
2023-05-06 18:09:41 +08:00
]
2023-05-04 18:16:22 +08:00
}
},
input: {
keywords: ''
}
},
table: {
2023-05-05 10:05:31 +08:00
minHeight: 300,
maxHeight: 300,
scrollX: 2420,
2023-05-04 18:16:22 +08:00
columns: [
{
align: 'center',
title: '序号',
key: 'A',
keyName: 'key',
fixed: 'left',
width: 60
},
{
align: 'center',
2023-07-14 16:16:35 +08:00
title: '姓名(网格数)',
2023-05-04 18:16:22 +08:00
key: 'B',
keyName: 'name',
fixed: 'left',
2023-07-14 16:16:35 +08:00
width: 140,
render(row) {
return `${row.B}(${row.gridCount})`
}
2023-05-04 18:16:22 +08:00
},
{
align: 'center',
title: '片区巡查40分',
key: 'C',
keyName: 'distance',
fixed: 'left',
width: 80,
className: 'score-plus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onDistanceClick(row, index);
}
}, row.C);
}
},
{
align: 'center',
title: '巡查上报、案件受理过程质量',
key: 'quality',
children: [
{
align: 'center',
title: '基础分',
key: 'D',
keyName: 'baseScore',
width: 80
},
{
align: 'center',
title: '本月应报案件数',
key: 'E',
keyName: 'shouldReportCount',
width: 60,
},
{
align: 'center',
title: '本月单个案件分值',
key: 'F',
keyName: 'caseSingleScore',
width: 60
},
2024-04-10 10:48:04 +08:00
{
align: 'center',
title: '复杂案件数量',
key: 'complex',
keyName: 'complexScore',
width: 60
},
2023-05-04 18:16:22 +08:00
{
align: 'center',
title: '本月实报案件',
key: 'report',
children: [
{
align: 'center',
title: '数量',
key: 'G',
keyName: 'reportCount',
width: 60
},
{
align: 'center',
title: '得分',
key: 'H',
keyName: 'reportScore',
width: 60,
className: 'score-plus',
}
]
},
{
align: 'center',
title: '本月少报案件',
key: 'missReport',
children: [
{
align: 'center',
title: '数量',
key: 'I',
keyName: 'missReportCount',
width: 60
},
{
align: 'center',
title: '得分',
key: 'J',
keyName: 'missReportScore',
width: 60,
className: 'score-minus',
}
]
},
{
align: 'center',
title: '本月多报案件',
key: 'moreReport',
children: [
{
align: 'center',
title: '数量',
key: 'K',
keyName: 'moreReportCount',
width: 60
},
{
align: 'center',
title: '得分',
key: 'L',
keyName: 'moreReportScore',
width: 60,
className: 'score-plus',
}
]
},
{
align: 'center',
title: '凡属下列情况之一经核准予以扣分',
key: 'noDeduct',
children: [
{
align: 'center',
title: '应上报却未上报案件',
key: 'M',
keyName: 'shouldButNo',
width: 80,
className: 'score-minus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onShouldButNoClick(row, index);
}
}, row.M);
}
},
{
align: 'center',
title: '平台立案上报不标准不及时的',
key: 'N',
keyName: 'timeout',
width: 80,
className: 'score-minus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onTimeoutClick(row, index);
}
}, row.N);
}
},
{
align: 'center',
title: '恶意退单',
key: 'O',
keyName: 'maliciousChargeback',
width: 50,
className: 'score-minus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onMaliciousChargebackClick(row, index);
}
}, row.O);
}
},
{
align: 'center',
title: '其它情况',
key: 'P',
keyName: 'noDeductOthers',
width: 50,
className: 'score-minus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onNoDeductOthersClick(row, index);
}
}, row.P);
}
}
]
},
]
},
/*{
2023-05-04 18:16:22 +08:00
align: 'center',
title: '案件处置实效(指挥协调实效)',
key: 'dispatch',
children: [
{
align: 'center',
title: '结案情况得分',
key: 'Q',
keyName: 'overScore',
width: 60,
className: 'score-plus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onOverScoreClick(row, index);
}
2023-08-07 16:24:51 +08:00
}, row.Q);
}
2023-05-04 18:16:22 +08:00
},
{
align: 'center',
title: '督察案件结案情况',
key: 'supervise',
children: [
{
align: 'center',
title: '督查次数',
key: 'R',
keyName: 'superviseCount',
width: 60,
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onSuperviseCountClick(row, index);
}
}, row.R);
}
},
{
align: 'center',
title: '督查扣分',
key: 'S',
keyName: 'superviseDeductScore',
width: 60,
className: 'score-minus',
2023-10-24 11:02:19 +08:00
render(row, index) {
vueSelf.computeS(row);
}
2023-05-04 18:16:22 +08:00
}
]
},
{
align: 'center',
title: '案件处置过程质量',
key: 'handle',
children: [
{
align: 'center',
title: '网格员24小时未核查扣分',
key: 'T',
keyName: 'unCheckIn24Hours',
width: 80,
className: 'score-minus',
},
{
align: 'center',
title: '反馈虚假信息',
key: 'U',
keyName: 'fakeInfo',
width: 60,
className: 'score-minus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onFakeInfoClick(row, index);
}
}, row.U);
}
},
{
align: 'center',
title: '其他情况',
key: 'V',
keyName: 'handleOthers',
width: 60,
className: 'score-minus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onHandleOthersClick(row, index);
}
}, row.V);
}
}
]
},
]
},*/
2023-05-04 18:16:22 +08:00
{
align: 'center',
title: '人口信息管理',
key: 'population',
children: [
{
align: 'center',
2023-12-11 09:07:11 +08:00
title: '社区基数人口数',
key: 'communityBasePopulationCount',
keyName: 'communityBasePopulationCount',
width: 80,
},
{
align: 'center',
title: '社区人口数',
key: 'communityPopulationCount',
keyName: 'communityPopulationCount',
width: 80,
},
{
align: 'center',
title: '社区人口录入比例',
key: 'communityPopulationRate',
keyName: 'communityPopulationRate',
width: 80,
},
{
align: 'center',
2024-04-22 15:41:08 +08:00
title: '人口信息录入(15)',
2023-05-04 18:16:22 +08:00
key: 'W',
keyName: 'populationSave',
width: 80,
className: 'score-plus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onPopulationSaveClick(row, index);
}
}, row.W);
}
},
{
align: 'center',
2024-04-22 15:41:08 +08:00
title: '人口信息质量管理(15)',
2023-05-04 18:16:22 +08:00
key: 'X',
keyName: 'populationQuality',
width: 80,
className: 'score-plus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onPopulationQualityClick(row, index);
}
}, row.X);
}
},
2024-04-22 15:41:08 +08:00
/*{
2023-05-04 18:16:22 +08:00
align: 'center',
2023-12-11 09:07:11 +08:00
title: '人口信息维护(4)',
2023-05-04 18:16:22 +08:00
key: 'Y',
keyName: 'populationEdit',
width: 80,
className: 'score-plus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onPopulationEditClick(row, index);
}
}, row.Y);
}
2024-04-22 15:41:08 +08:00
},*/
2023-05-04 18:16:22 +08:00
{
align: 'center',
title: '抽查情况',
key: 'Z',
keyName: 'populationSpotCheck',
width: 80,
className: 'score-minus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onPopulationSpotCheckClick(row, index);
}
}, row.Z);
}
},
]
},
/*{
2023-05-04 18:16:22 +08:00
align: 'center',
title: '党组织建设',
key: 'party',
children: [
{
align: 'center',
2023-12-11 09:07:11 +08:00
title: '党建信息上报(3)',
2023-05-04 18:16:22 +08:00
key: 'AA',
keyName: 'partySave',
width: 80,
className: 'score-plus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onPartySaveClick(row, index);
}
}, row.AA);
}
},
{
align: 'center',
2023-12-11 09:07:11 +08:00
title: '党建信息质量管理(3)',
2023-05-04 18:16:22 +08:00
key: 'AB',
keyName: 'partyQuality',
width: 80,
className: 'score-plus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onPartyQualityClick(row, index);
}
}, row.AB);
}
},
{
align: 'center',
2023-12-11 09:07:11 +08:00
title: '党建信息维护(4)',
2023-05-04 18:16:22 +08:00
key: 'AC',
keyName: 'partyEdit',
width: 80,
className: 'score-plus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onPartyEditClick(row, index);
}
}, row.AC);
}
},
{
align: 'center',
title: '抽查情况',
key: 'AD',
keyName: 'partySpotCheck',
width: 80,
className: 'score-minus',
render(row, index) {
return h('a', {
href: 'javascript:void(0);',
onClick() {
vueSelf.onPartySpotCheckClick(row, index);
}
}, row.AD);
}
},
]
},*/
2023-05-04 18:16:22 +08:00
{
align: 'center',
title: '总得分',
key: 'AE',
keyName: 'totalScore',
fixed: 'right',
width: 100,
render(row, index) {
return vueSelf.computeAE(row);
}
},
2023-07-12 09:42:33 +08:00
{
align: 'center',
title: '评级',
key: 'AH',
keyName: 'evaluation',
fixed: 'right',
width: 100,
render(row, index) {
return vueSelf.computeAH(row);
}
},
2023-05-04 18:16:22 +08:00
{
align: 'center',
2023-07-14 16:16:35 +08:00
title: '应发(浮动)绩效工资',
2023-05-04 18:16:22 +08:00
key: 'AF',
keyName: 'shouldPay',
fixed: 'right',
2023-07-06 14:23:55 +08:00
width: 100,
render(row, index) {
2023-07-14 16:16:35 +08:00
let score = vueSelf.computeAE(row);
if(score <= 100 && score >= 85) {
return `${333 * row.gridCount}(${500 * row.gridCount})`;
} else if(score >= 75) {
2023-10-24 11:02:19 +08:00
return `${333 * row.gridCount}(${333 * row.gridCount})`;
2023-07-14 16:16:35 +08:00
} else if(score >= 60) {
2023-10-24 11:02:19 +08:00
return `${333 * row.gridCount}(${233 * row.gridCount})`;
2023-07-14 16:16:35 +08:00
}
return `${333 * row.gridCount}(0)`;
2023-07-06 14:23:55 +08:00
}
2023-05-04 18:16:22 +08:00
},
{
align: 'center',
title: '实发绩效工资',
key: 'AG',
keyName: 'actualPay',
fixed: 'right',
width: 100,
render(row, index) {
2024-04-10 10:48:04 +08:00
return ((vueSelf.computeAE(row) * vueSelf.computeAF(row) / 100) + vueSelf.computeComplex(row)).toFixed(2);
2023-05-04 18:16:22 +08:00
}
}
],
data: []
},
modal: {
distance: {
show: false
},
reportDay: {
show: false
},
scoring: {
show: false,
userName: null,
title: null,
rowKey: null,
rowIndex: null,
score: 0,
reason: '',
minScore: null,
maxScore: null
}
}
}
},
methods: {
// 打分确定
onScroingConfimClick(key, index, { score, reason, userId, userName, date }) {
this.modal.scoring.show = false;
this.table.data[index][key] = score;
this.table.data[index][`reason${key}`] = reason;
},
// 打分关闭
onScroingCloseClick() {
this.modal.scoring.show = false;
},
// 打分打开
onScroingClick(type, row, index) {
this.modal.scoring.show = false;
},
// 本月应上报案件数关闭
onReportDayCloseClick() {
this.modal.reportDay.show = false;
},
// 本月应上报案件数打开
onReportDayClick(row, index) {
this.modal.reportDay.show = true;
},
// 考勤模态框关闭
onDistancenCloseClick() {
this.modal.distance.show = false;
},
// 片区巡查打开
onDistanceClick(row, index) {
let distance = row.C;
2023-05-12 18:17:38 +08:00
this.search.userId = row.userId;
this.search.userName = row.B;
2023-05-04 18:16:22 +08:00
this.modal.distance.show = true;
},
// 4、5级网格员单选
onSearchRadioLevelValueChange(e) {
this.search.radio.level.value = parseInt(e.target.value);
},
// 应上报却未上报案件 -
2023-05-04 18:16:22 +08:00
onShouldButNoClick(row, index) {
let shouldButNo = row.M;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'M';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = shouldButNo;
this.modal.scoring.reason = row.reasonM;
this.modal.scoring.maxScore = null;
this.modal.scoring.minScore = null;
this.modal.scoring.userName = row.B;
this.modal.scoring.title = '应上报却未上报案件';
},
// 平台立案上报不标准不及时的 -
2023-05-04 18:16:22 +08:00
onTimeoutClick(row, index) {
let timeout = row.N;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'N';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = timeout;
this.modal.scoring.reason = row.reasonN;
this.modal.scoring.maxScore = null;
this.modal.scoring.minScore = null;
this.modal.scoring.userName = row.B;
this.modal.scoring.title = '平台立案上报不标准不及时的';
},
// 恶意退单 -
2023-05-04 18:16:22 +08:00
onMaliciousChargebackClick(row, index) {
let maliciousChargeback = row.O;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'O';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = maliciousChargeback;
this.modal.scoring.reason = row.reasonO;
this.modal.scoring.maxScore = null;
this.modal.scoring.minScore = null;
this.modal.scoring.userName = row.B;
this.modal.scoring.title = '恶意退单';
},
// 扣分其它情况 -
2023-05-04 18:16:22 +08:00
onNoDeductOthersClick(row, index) {
let noDeductOthers = row.P;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'M';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = noDeductOthers;
this.modal.scoring.reason = row.reasonP;
this.modal.scoring.maxScore = null;
this.modal.scoring.minScore = null;
this.modal.scoring.userName = row.B;
this.modal.scoring.title = '扣分其它情况';
},
// 结案情况得分 -
onOverScoreClick(row, index) {
let overScore = row.Q;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'Q';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = overScore;
this.modal.scoring.reason = row.reasonQ;
this.modal.scoring.userName = row.B;
this.modal.scoring.maxScore = 10;
this.modal.scoring.minScore = 0;
this.modal.scoring.title = '结案情况得分';
},
// 督察扣分 -
2023-05-04 18:16:22 +08:00
onSuperviseCountClick(row, index) {
let superviseCount = row.R;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'R';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = superviseCount;
this.modal.scoring.reason = row.reasonR;
this.modal.scoring.userName = row.B;
this.modal.scoring.title = '督察扣分';
},
// 反馈虚假信息 -
2023-05-04 18:16:22 +08:00
onFakeInfoClick(row, index) {
let fakeInfo = row.U;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'U';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = fakeInfo;
this.modal.scoring.reason = row.reasonU;
this.modal.scoring.maxScore = null;
this.modal.scoring.minScore = null;
this.modal.scoring.userName = row.B;
this.modal.scoring.title = '反馈虚假信息';
},
// 处置其他情况 -
2023-05-04 18:16:22 +08:00
onHandleOthersClick(row, index) {
let handleOthers = row.V;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'V';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = handleOthers;
this.modal.scoring.reason = row.reasonV;
this.modal.scoring.maxScore = null;
this.modal.scoring.minScore = null;
this.modal.scoring.userName = row.B;
this.modal.scoring.title = '处置其他情况';
},
// 人口信息录入 +
2023-05-04 18:16:22 +08:00
onPopulationSaveClick(row, index) {
let populationSave = row.W;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'W';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = populationSave;
this.modal.scoring.reason = row.reasonW;
this.modal.scoring.maxScore = 15;
this.modal.scoring.minScore = 0;
2023-05-04 18:16:22 +08:00
this.modal.scoring.userName = row.B;
this.modal.scoring.title = '人口信息录入';
},
// 人口信息质量 +
2023-05-04 18:16:22 +08:00
onPopulationQualityClick(row, index) {
let populationQuality = row.X;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'X';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = populationQuality;
this.modal.scoring.reason = row.reasonX;
this.modal.scoring.maxScore = 15;
2023-05-04 18:16:22 +08:00
this.modal.scoring.minScore = 0;
this.modal.scoring.userName = row.B;
this.modal.scoring.title = '人口信息质量';
},
// 人口信息维护 +
2023-05-04 18:16:22 +08:00
onPopulationEditClick(row, index) {
let populationEdit = row.Y;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'Y';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = populationEdit;
this.modal.scoring.reason = row.reasonY;
2023-06-15 11:28:54 +08:00
this.modal.scoring.maxScore = 4;
2023-05-04 18:16:22 +08:00
this.modal.scoring.minScore = 0;
this.modal.scoring.userName = row.B;
this.modal.scoring.title = '人口信息维护'
},
// 人口信息抽查 -
2023-05-04 18:16:22 +08:00
onPopulationSpotCheckClick(row, index) {
let populationSpotCheck = row.Z;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'Z';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = populationSpotCheck;
this.modal.scoring.reason = row.reasonZ;
this.modal.scoring.maxScore = 4;
this.modal.scoring.minScore = 0;
this.modal.scoring.userName = row.B;
this.modal.scoring.title = '人口信息抽查';
},
// 党建信息录入 +
2023-06-15 11:28:54 +08:00
onPartySaveClick(row, index) {
2023-05-04 18:16:22 +08:00
let partySave = row.AA;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'AA';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = partySave;
this.modal.scoring.reason = row.reasonAA;
this.modal.scoring.maxScore = null;
this.modal.scoring.minScore = null;
this.modal.scoring.userName = row.B;
this.modal.scoring.title = '党建信息录入';
},
// 党建信息质量 +
2023-05-04 18:16:22 +08:00
onPartyQualityClick(row, index) {
let partyQuality = row.AB;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'AB';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = partyQuality;
this.modal.scoring.reason = row.reasonAB;
this.modal.scoring.maxScore = 3;
this.modal.scoring.minScore = 0;
this.modal.scoring.userName = row.B;
this.modal.scoring.title = '党建信息质量';
},
// 党建信息维护 +
2023-05-04 18:16:22 +08:00
onPartyEditClick(row, index) {
let partyEdit = row.AC;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'AC';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = partyEdit;
this.modal.scoring.reason = row.reasonAC;
2023-06-15 11:28:54 +08:00
this.modal.scoring.maxScore = 4;
2023-05-04 18:16:22 +08:00
this.modal.scoring.minScore = 0;
this.modal.scoring.userName = row.B;
this.modal.scoring.title = '党建信息维护';
},
// 党建信息抽查 -
2023-05-04 18:16:22 +08:00
onPartySpotCheckClick(row, index) {
let partySpotCheck = row.AD;
this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'AD';
this.modal.scoring.rowIndex = index;
this.modal.scoring.score = partySpotCheck;
this.modal.scoring.reason = row.reasonAD;
this.modal.scoring.maxScore = 3;
this.modal.scoring.minScore = 0;
this.modal.scoring.userName = row.B;
this.modal.scoring.title = '党建信息抽查';
},
2023-10-24 11:02:19 +08:00
computeS(row) {
return (row.R * 0.2).toFixed(2);
},
2023-05-04 18:16:22 +08:00
computeAE(row) {
2023-10-24 11:02:19 +08:00
let s = this.computeS(row);
// let result = row.C + row.H + row.L - row.M - row.N - row.O - row.P + row.Q - s - row.T - row.U - row.V + row.W + row.X + row.Y - row.Z + row.AA + row.AB + row.AC - row.AD;
2024-04-28 11:33:44 +08:00
let C = Number(row.C);
let H = Number(row.H);
let L = Number(row.L);
let M = Number(row.M);
let N = Number(row.N);
let O = Number(row.O);
let P = Number(row.P);
let W = Number(row.W);
let X = Number(row.X);
let Z = Number(row.Z);
let result = C + H + L - M - N - O - P + W + X - Z;
console.log(row.C + "--" + row.H + "--"+ row.L + "--"+ row.M + "--"+ row.N + "--"+ row.O + "--"+ row.P + "--"+ row.W + "--"+ row.X + "--"+ row.Z)
console.log(result)
2023-06-15 11:28:54 +08:00
result = Math.min(result, 100);
return result < 0 ? 0 : result.toFixed(2);
2023-05-09 22:02:21 +08:00
},
2024-04-10 10:48:04 +08:00
computeComplex(row) {
let complex = row.complex;
return complex * 200;
},
2023-07-12 09:42:33 +08:00
computeAF(row) {
let score = this.computeAE(row);
if(score <= 100 && score >= 85) {
return 500 * row.gridCount;
} else if(score >= 75) {
return 333 * row.gridCount;
} else if(score >= 60) {
2023-10-24 11:02:19 +08:00
return 233 * row.gridCount;
2023-07-12 09:42:33 +08:00
}
return 0
},
computeAH(row) {
let score = this.computeAE(row);
if(score <= 100 && score >= 85) {
return '优';
} else if(score >= 75) {
return '良';
} else if(score >= 60) {
2023-07-14 16:16:35 +08:00
return '合格';
2023-07-12 09:42:33 +08:00
}
2023-07-14 16:16:35 +08:00
return '不合格';
2023-07-12 09:42:33 +08:00
},
onSearchClick() {
this.listData();
2023-05-06 18:09:41 +08:00
},
2023-05-12 18:17:38 +08:00
onSaveClick() {
let vueSelf = this;
let tableDatas = [];
vueSelf.table.data.forEach(item => {
item.AE = vueSelf.computeAE(item);
2023-07-12 09:42:33 +08:00
item.AF = vueSelf.computeAF(item);
2023-05-12 18:17:38 +08:00
item.AG = (item.AE * item.AF / 100).toFixed(2);
2023-07-12 09:42:33 +08:00
item.AH = vueSelf.computeAH(item);
2023-05-12 18:17:38 +08:00
tableDatas.push({...item});
})
vueSelf.dialog.warning({
title: "提示",
content: "确定更新吗?",
positiveText: "确定",
negativeText: "取消",
onPositiveClick: () => {
vueSelf.dataLoading = true;
vueSelf.$axios.put(`api/kpi/khxz/update-wgy/${vueSelf.search.select.wgy.value}`, {
datas: tableDatas
}).then( resp => {
vueSelf.message.info('保存成功');
}).catch( ({data}) => {
console.error(resp);
vueSelf.message.error(data.data.msg);
}).finally(() => {
vueSelf.dataLoading = false;
});
},
onNegativeClick: () => {
}
})
},
onExportClick() {
let vueSelf = this;
vueSelf.btnExportDisabled = true;
download(vueSelf.$axios, `api/kpi/khxz/export-wgy`, vueSelf.getQuery(), () => {
vueSelf.btnExportDisabled = false;
});
},
2023-05-12 18:17:38 +08:00
getQuery() {
return {
areaId: this.search.select.area.value,
communityId: this.search.select.community.value,
khYear: this.search.select.year.value,
khMonth: this.search.select.month.value,
wgyLevel: this.search.select.wgy.value,
keywords: this.search.input.keywords
}
},
2023-05-06 18:09:41 +08:00
resize() {
let body = document.body;
this.table.minHeight = body.clientHeight - 408;
this.table.maxHeight = body.clientHeight - 408;
this.table.scrollX = body.clientWidth;
2023-05-09 22:02:21 +08:00
},
listArea() {
let vueSelf = this;
vueSelf.$axios.get(`api/kpi/list-area`, {
2023-05-12 18:17:38 +08:00
}).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;
2023-05-12 18:17:38 +08:00
if (!areaId) {
vueSelf.search.select.community.options = [];
return;
}
vueSelf.$axios.get(`api/kpi/list-community/area-id/${areaId}`, {
2023-05-12 18:17:38 +08:00
}).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);
})
},
2023-05-09 22:02:21 +08:00
listData() {
let vueSelf = this;
vueSelf.dataLoading = true;
vueSelf.$axios.get(`api/kpi/khxz/list-wgy`, {
2023-05-12 18:17:38 +08:00
params: vueSelf.getQuery()
}).then(({ data }) => {
2023-08-07 16:24:51 +08:00
let totalGridCount = 0;
2023-05-09 22:02:21 +08:00
data.forEach((item, index) => {
item.A = index + 1;
2023-12-11 09:07:11 +08:00
item.F = item.E === 0 ? 0 : parseFloat((item.D / item.E).toFixed(2));
2024-04-28 11:33:44 +08:00
item.H = (Math.min(item.F * item.G, item.D)).toFixed(2);
item.J = (Math.min(item.F * item.I, item.D)).toFixed(2);
item.L = (item.K > 10 ? 10 : item.K) * 0.5;
/*item.Q = item.communityPopulationRate >= 0.75 ? 10 : (item.communityPopulationRate >= 0.6 ? 5 : 0);*/
2023-12-11 09:07:11 +08:00
// 人口信息管理
// 未录入数据数量 = 社区基数人口数 - 社区人口数
2024-04-22 15:41:08 +08:00
/*var differenceValue = item.communityBasePopulationCount - item.communityPopulationCount;
var no100Score;
if(differenceValue > 0 && differenceValue <= 15) {
no100Score = differenceValue;
}else {
no100Score = 0;
}
2024-04-22 15:41:08 +08:00
item.W = item.communityPopulationRate === 1 ? 15 : no100Score;*/
2024-04-28 11:33:44 +08:00
item.W = (item.communityPopulationRate * 15).toFixed(2);
2024-04-22 15:41:08 +08:00
item.X = 15;
// item.Y = parseFloat((4 * item.communityPopulationRate).toFixed(2));
// 党组织建设(去掉)
/*item.AA = item.communityPopulationRate >= 0.75 ? 3 : (item.communityPopulationRate >= 0.6 ? 1.5 : 0);
2023-12-11 09:07:11 +08:00
item.AB = item.communityPopulationRate >= 0.75 ? 3 : (item.communityPopulationRate >= 0.6 ? 1.5 : 0);
item.AC = item.communityPopulationRate >= 0.75 ? 4 : (item.communityPopulationRate >= 0.6 ? 2 : 0);*/
/*item.S = item.R * 0.2;*/
2023-08-07 16:24:51 +08:00
totalGridCount += item.gridCount;
2024-04-10 10:48:04 +08:00
if(null == item.complex || '' == item.complex || typeof(item.complex) == 'undefined') {
item.complex = 0;
}
2023-05-09 22:02:21 +08:00
})
2024-04-10 10:48:04 +08:00
console.log(data)
2023-05-09 22:02:21 +08:00
this.table.data = data;
2023-08-07 16:24:51 +08:00
console.log(`totalGridCount: ${totalGridCount}`)
2023-05-12 18:17:38 +08:00
}).catch(({ data }) => {
vueSelf.message.error(data.msg);
2023-05-09 22:02:21 +08:00
}).finally(() => {
vueSelf.dataLoading = false;
});
},
init() {
this.search.select.year.options = listYear();
this.search.select.year.value = getCurrentYear();
this.search.select.month.options = listMonth();
this.search.select.month.value = getCurrentMonth();
this.listArea();
2023-05-09 22:02:21 +08:00
this.listData();
2023-05-04 18:16:22 +08:00
}
},
computed() {
},
mounted() {
let vueSelf = this;
2023-05-09 22:02:21 +08:00
vueSelf.init();
2023-05-06 18:09:41 +08:00
vueSelf.resize();
2023-05-09 22:02:21 +08:00
window.onresize = this.resize;
2023-05-04 18:16:22 +08:00
}
}
</script>
<style lang="stylus" scoped>
.container
2023-05-06 18:09:41 +08:00
padding 0 10px
2023-05-16 10:57:26 +08:00
:deep(.n-data-table-thead th)
background-color rgba(196, 196, 196, 1)
// :deep(.score-plus)
// background-color yellow
// :deep(.score-minus)
// background-color red
2023-05-04 18:16:22 +08:00
</style>