完成考核细则

This commit is contained in:
TS-QD1 2023-05-14 00:28:30 +08:00
parent 5bfbdf9bf0
commit a8c7810ed8
5 changed files with 44 additions and 31 deletions

View File

@ -109,9 +109,9 @@ const checkProcess = () => {
if(percent >= 100) { if(percent >= 100) {
clearInterval(checkProcessInterval); clearInterval(checkProcessInterval);
checkProcessInterval = null; checkProcessInterval = null;
// isKpiUpdatProgressModalShow.value = false; isKpiUpdatProgressModalShow.value = false;
} else { } else {
// isKpiUpdatProgressModalShow.value = true; isKpiUpdatProgressModalShow.value = true;
} }
}).catch((resp) => { }).catch((resp) => {
console.error(resp) console.error(resp)
@ -126,7 +126,7 @@ const onUpdateConfirm = () => {
isKpiUpdateModalShow.value = false; isKpiUpdateModalShow.value = false;
dialog.warning({ dialog.warning({
title: "警告", title: "警告",
content: "确定更新吗?时间较长,请耐心等待...", content: "更新后,之前人工输入的分值也会清空,需要重新输入并保存,确定更新吗?更新时间较长,请耐心等待...",
positiveText: "确定", positiveText: "确定",
negativeText: "取消", negativeText: "取消",
onPositiveClick: () => { onPositiveClick: () => {

View File

@ -11,11 +11,11 @@
</n-grid-item> </n-grid-item>
<n-grid-item> <n-grid-item>
<n-select placeholder="请选择年份" v-model:value="search.select.year.value" <n-select placeholder="请选择年份" v-model:value="search.select.year.value"
:options="search.select.year.options" :clearable="true" /> :options="search.select.year.options" />
</n-grid-item> </n-grid-item>
<n-grid-item> <n-grid-item>
<n-select placeholder="请选择月份" v-model:value="search.select.month.value" <n-select placeholder="请选择月份" v-model:value="search.select.month.value"
:options="search.select.month.options" :clearable="true" /> :options="search.select.month.options" />
</n-grid-item> </n-grid-item>
<n-grid-item> <n-grid-item>
<n-space> <n-space>

View File

@ -19,11 +19,11 @@
</n-grid-item> </n-grid-item>
<n-grid-item> <n-grid-item>
<n-select placeholder="请选择年份" v-model:value="search.select.year.value" <n-select placeholder="请选择年份" v-model:value="search.select.year.value"
:options="search.select.year.options" :clearable="true" /> :options="search.select.year.options"/>
</n-grid-item> </n-grid-item>
<n-grid-item> <n-grid-item>
<n-select placeholder="请选择月份" v-model:value="search.select.month.value" <n-select placeholder="请选择月份" v-model:value="search.select.month.value"
:options="search.select.month.options" :clearable="true" /> :options="search.select.month.options" />
</n-grid-item> </n-grid-item>
<n-grid-item> <n-grid-item>
<n-space> <n-space>
@ -493,6 +493,8 @@ export default {
}, },
getQuery() { getQuery() {
return { return {
areaId: this.search.select.area.value,
communityId: this.search.select.community.value,
khYear: this.search.select.year.value, khYear: this.search.select.year.value,
khMonth: this.search.select.month.value, khMonth: this.search.select.month.value,
keywords: this.search.input.keywords keywords: this.search.input.keywords

View File

@ -15,11 +15,11 @@
</n-grid-item> </n-grid-item>
<n-grid-item> <n-grid-item>
<n-select placeholder="请选择年份" v-model:value="search.select.year.value" <n-select placeholder="请选择年份" v-model:value="search.select.year.value"
:options="search.select.year.options" :clearable="true" /> :options="search.select.year.options" />
</n-grid-item> </n-grid-item>
<n-grid-item> <n-grid-item>
<n-select placeholder="请选择月份" v-model:value="search.select.month.value" <n-select placeholder="请选择月份" v-model:value="search.select.month.value"
:options="search.select.month.options" :clearable="true" /> :options="search.select.month.options" />
</n-grid-item> </n-grid-item>
<n-grid-item> <n-grid-item>
<n-space> <n-space>

View File

@ -7,23 +7,19 @@
<n-space class="search" vertical> <n-space class="search" vertical>
<n-grid :cols="7" :x-gap="10"> <n-grid :cols="7" :x-gap="10">
<n-grid-item> <n-grid-item>
<n-select placeholder="请选择街道" v-model:value="search.select.street.value" <n-select placeholder="请选择机构" v-model:value="search.select.department.value"
:options="search.select.street.options" :clearable="true" /> :options="search.select.department.options" :clearable="true" />
</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-grid-item> <n-grid-item>
<n-input v-model:value="search.input.keywords" type="text" placeholder="姓名|手机号" /> <n-input v-model:value="search.input.keywords" type="text" placeholder="姓名|手机号" />
</n-grid-item> </n-grid-item>
<n-grid-item> <n-grid-item>
<n-select placeholder="请选择年份" v-model:value="search.select.year.value" <n-select placeholder="请选择年份" v-model:value="search.select.year.value"
:options="search.select.year.options" :clearable="true" /> :options="search.select.year.options" />
</n-grid-item> </n-grid-item>
<n-grid-item> <n-grid-item>
<n-select placeholder="请选择月份" v-model:value="search.select.month.value" <n-select placeholder="请选择月份" v-model:value="search.select.month.value"
:options="search.select.month.options" :clearable="true" /> :options="search.select.month.options" />
</n-grid-item> </n-grid-item>
<n-grid-item> <n-grid-item>
<n-space> <n-space>
@ -95,13 +91,7 @@ export default {
userId: null, userId: null,
userName: null, userName: null,
select: { select: {
street: { department: {
value: null,
options: [
{ label: '稀土路街道', value: 'xtl' }
]
},
community: {
value: null, value: null,
options: [ options: [
{ label: '社区', value: 'sq' } { label: '社区', value: 'sq' }
@ -346,7 +336,7 @@ export default {
onUnBackErrorClick(row, index) { onUnBackErrorClick(row, index) {
let unBackError = row.H; let unBackError = row.H;
this.modal.scoring.show = true; this.modal.scoring.show = true;
this.modal.scoring.rowKey = 'J'; this.modal.scoring.rowKey = 'H';
this.modal.scoring.rowIndex = index; this.modal.scoring.rowIndex = index;
this.modal.scoring.score = unBackError; this.modal.scoring.score = unBackError;
this.modal.scoring.reason = row.reasonH; this.modal.scoring.reason = row.reasonH;
@ -395,13 +385,29 @@ export default {
this.modal.scoring.title = '督察案件'; this.modal.scoring.title = '督察案件';
}, },
computeN(row) { computeN(row) {
return row.G - row.H - row.J - row.K + row.L + row.M; return Math.max(row.G - row.H - row.J - row.K + row.L + row.M, 0);
}, },
resize() { resize() {
let body = document.body; let body = document.body;
this.table.minHeight = body.clientHeight - 378; this.table.minHeight = body.clientHeight - 378;
this.table.maxHeight = body.clientHeight - 378; this.table.maxHeight = body.clientHeight - 378;
this.table.scrollX = body.clientWidth; // this.table.scrollX = body.clientWidth;
},
listZnbm() {
let vueSelf = this;
vueSelf.$axios.get(`api/kpi/list-znbm`, {
}).then(({ data }) => {
let optionArray = [];
data.forEach((item, index) => {
optionArray.push({
label: item.departmentName,
value: item.departmentId
})
})
vueSelf.search.select.department.options = optionArray;
}).catch(resp => {
vueSelf.message.error(resp.data.msg);
})
}, },
onSearchClick() { onSearchClick() {
this.listData(); this.listData();
@ -410,8 +416,8 @@ export default {
let vueSelf = this; let vueSelf = this;
let tableDatas = []; let tableDatas = [];
vueSelf.table.data.forEach(item => { vueSelf.table.data.forEach(item => {
item.AE = vueSelf.computeAE(item); item.N = vueSelf.computeN(item);
item.AG = (item.AE * item.AF / 100).toFixed(2); item.P = (item.N * item.O / 100).toFixed(2);
tableDatas.push({...item}); tableDatas.push({...item});
}) })
vueSelf.dialog.warning({ vueSelf.dialog.warning({
@ -421,7 +427,7 @@ export default {
negativeText: "取消", negativeText: "取消",
onPositiveClick: () => { onPositiveClick: () => {
vueSelf.dataLoading = true; vueSelf.dataLoading = true;
vueSelf.$axios.put(`api/kpi/khxz/update-wgy/${vueSelf.search.select.wgy.value}`, { vueSelf.$axios.put(`api/kpi/khxz/update-znbm`, {
datas: tableDatas datas: tableDatas
}).then( resp => { }).then( resp => {
vueSelf.message.info('保存成功'); vueSelf.message.info('保存成功');
@ -439,12 +445,13 @@ export default {
onExportClick() { onExportClick() {
let vueSelf = this; let vueSelf = this;
vueSelf.btnExportDisabled = true; vueSelf.btnExportDisabled = true;
download(vueSelf.$axios, `api/kpi/khxz/export-wgy`, vueSelf.getQuery(), () => { download(vueSelf.$axios, `api/kpi/khxz/export-znbm`, vueSelf.getQuery(), () => {
vueSelf.btnExportDisabled = false; vueSelf.btnExportDisabled = false;
}); });
}, },
getQuery() { getQuery() {
return { return {
departmentId: this.search.select.department.value,
khYear: this.search.select.year.value, khYear: this.search.select.year.value,
khMonth: this.search.select.month.value, khMonth: this.search.select.month.value,
keywords: this.search.input.keywords keywords: this.search.input.keywords
@ -456,6 +463,9 @@ export default {
vueSelf.$axios.get(`api/kpi/khxz/list-znbm`, { vueSelf.$axios.get(`api/kpi/khxz/list-znbm`, {
params: vueSelf.getQuery() params: vueSelf.getQuery()
}).then(({ data }) => { }).then(({ data }) => {
data.forEach((item, index) => {
item.A = index + 1;
});
this.table.data = data; this.table.data = data;
}).catch(({ data }) => { }).catch(({ data }) => {
vueSelf.message.error(data.msg); vueSelf.message.error(data.msg);
@ -468,6 +478,7 @@ export default {
this.search.select.year.value = getCurrentYear(); this.search.select.year.value = getCurrentYear();
this.search.select.month.options = listMonth(); this.search.select.month.options = listMonth();
this.search.select.month.value = getCurrentMonth(); this.search.select.month.value = getCurrentMonth();
this.listZnbm();
this.listData(); this.listData();
} }
}, },