增加后台接口
This commit is contained in:
parent
1269f11f33
commit
57082e1d7b
164
package-lock.json
generated
164
package-lock.json
generated
@ -12,6 +12,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^4.1.0",
|
||||
"axios": "^1.4.0",
|
||||
"naive-ui": "^2.34.3",
|
||||
"stylus": "^0.59.0",
|
||||
"vite": "^4.3.2",
|
||||
@ -570,6 +571,23 @@
|
||||
"integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/axios/-/axios-1.4.0.tgz",
|
||||
"integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.0",
|
||||
"form-data": "^4.0.0",
|
||||
"proxy-from-env": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
@ -586,6 +604,18 @@
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
|
||||
@ -643,6 +673,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.17.18",
|
||||
"resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.17.18.tgz",
|
||||
@ -691,6 +730,34 @@
|
||||
"integrity": "sha512-qaeGN5bx63s/AXgQo8gj6fBkxge+OoLddLniox5qtLAEY5HSnuSlISXVPxnSae1dWblvTh4/HoMIB+mbMsvZzw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/form-data": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz",
|
||||
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"mime-types": "^2.1.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
@ -773,6 +840,27 @@
|
||||
"sourcemap-codec": "^1.4.8"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.52.0",
|
||||
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
|
||||
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.35",
|
||||
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
|
||||
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"mime-db": "1.52.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
|
||||
@ -867,6 +955,12 @@
|
||||
"node": "^10 || ^12 || >=14"
|
||||
}
|
||||
},
|
||||
"node_modules/proxy-from-env": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
||||
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "3.21.0",
|
||||
"resolved": "https://registry.npmmirror.com/rollup/-/rollup-3.21.0.tgz",
|
||||
@ -1410,6 +1504,23 @@
|
||||
"integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg==",
|
||||
"dev": true
|
||||
},
|
||||
"asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
|
||||
"dev": true
|
||||
},
|
||||
"axios": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/axios/-/axios-1.4.0.tgz",
|
||||
"integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"follow-redirects": "^1.15.0",
|
||||
"form-data": "^4.0.0",
|
||||
"proxy-from-env": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
@ -1426,6 +1537,15 @@
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
|
||||
@ -1470,6 +1590,12 @@
|
||||
"ms": "2.1.2"
|
||||
}
|
||||
},
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
||||
"dev": true
|
||||
},
|
||||
"esbuild": {
|
||||
"version": "0.17.18",
|
||||
"resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.17.18.tgz",
|
||||
@ -1511,6 +1637,23 @@
|
||||
"integrity": "sha512-qaeGN5bx63s/AXgQo8gj6fBkxge+OoLddLniox5qtLAEY5HSnuSlISXVPxnSae1dWblvTh4/HoMIB+mbMsvZzw==",
|
||||
"dev": true
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
||||
"dev": true
|
||||
},
|
||||
"form-data": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz",
|
||||
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"mime-types": "^2.1.12"
|
||||
}
|
||||
},
|
||||
"fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
@ -1580,6 +1723,21 @@
|
||||
"sourcemap-codec": "^1.4.8"
|
||||
}
|
||||
},
|
||||
"mime-db": {
|
||||
"version": "1.52.0",
|
||||
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
|
||||
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||
"dev": true
|
||||
},
|
||||
"mime-types": {
|
||||
"version": "2.1.35",
|
||||
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
|
||||
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"mime-db": "1.52.0"
|
||||
}
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
|
||||
@ -1656,6 +1814,12 @@
|
||||
"source-map-js": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"proxy-from-env": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
||||
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
|
||||
"dev": true
|
||||
},
|
||||
"rollup": {
|
||||
"version": "3.21.0",
|
||||
"resolved": "https://registry.npmmirror.com/rollup/-/rollup-3.21.0.tgz",
|
||||
|
@ -13,6 +13,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^4.1.0",
|
||||
"axios": "^1.4.0",
|
||||
"naive-ui": "^2.34.3",
|
||||
"stylus": "^0.59.0",
|
||||
"vite": "^4.3.2",
|
||||
|
34
src/App.vue
34
src/App.vue
@ -1,27 +1,29 @@
|
||||
<template>
|
||||
<n-message-provider>
|
||||
<n-layout>
|
||||
<n-layout-header bordered>
|
||||
<n-space align="center" style="padding: 10px">
|
||||
<span>工作考核细则:</span>
|
||||
<n-button ghost @click="onWgyClick">街道社区4-5级网格</n-button>
|
||||
<n-button ghost @click="onDdyClick">区级与街道指挥调度中心(调度专管员)</n-button>
|
||||
<n-button ghost @click="onZfGAClick">执法局、公安分局</n-button>
|
||||
<n-button ghost @click="onWgy3Click">3 级网格长</n-button>
|
||||
<n-button ghost @click="onZnbmClick">其他职能部门</n-button>
|
||||
</n-space>
|
||||
</n-layout-header>
|
||||
<n-layout-content>
|
||||
<router-view></router-view>
|
||||
</n-layout-content>
|
||||
</n-layout>
|
||||
<n-dialog-provider>
|
||||
<n-layout>
|
||||
<n-layout-header bordered>
|
||||
<n-space align="center" style="padding: 10px">
|
||||
<span>工作考核细则:</span>
|
||||
<n-button ghost @click="onWgyClick">街道社区4-5级网格</n-button>
|
||||
<n-button ghost @click="onDdyClick">区级与街道指挥调度中心(调度专管员)</n-button>
|
||||
<n-button ghost @click="onZfGAClick">执法局、公安分局</n-button>
|
||||
<n-button ghost @click="onWgy3Click">3 级网格长</n-button>
|
||||
<n-button ghost @click="onZnbmClick">其他职能部门</n-button>
|
||||
</n-space>
|
||||
</n-layout-header>
|
||||
<n-layout-content>
|
||||
<router-view></router-view>
|
||||
</n-layout-content>
|
||||
</n-layout>
|
||||
</n-dialog-provider>
|
||||
</n-message-provider>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { NMessageProvider, NLayout, NLayoutHeader, NLayoutContent, NSpace, NButton} from 'naive-ui';
|
||||
import { NMessageProvider, NDialogProvider, NLayout, NLayoutHeader, NLayoutContent, NSpace, NButton} from 'naive-ui';
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
@ -265,7 +265,7 @@ export default {
|
||||
key: 'K',
|
||||
keyName: 'totalScore',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
width: 60,
|
||||
render(row, index) {
|
||||
return vueSelf.computeK(row);
|
||||
}
|
||||
@ -276,7 +276,7 @@ export default {
|
||||
key: 'L',
|
||||
keyName: 'shouldPay',
|
||||
fixed: 'right',
|
||||
width: 100
|
||||
width: 60
|
||||
},
|
||||
{
|
||||
align: 'center',
|
||||
@ -284,7 +284,7 @@ export default {
|
||||
key: 'M',
|
||||
keyName: 'actualPay',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
width: 60,
|
||||
render(row, index) {
|
||||
return vueSelf.computeK(row) * row.L / 100;
|
||||
}
|
||||
|
@ -1,46 +1,49 @@
|
||||
<template>
|
||||
<n-space class="container" vertical>
|
||||
<n-space justify="center">
|
||||
<h1>街道社区4-5级网格工作考核细则(以季度为考核周期)</h1>
|
||||
<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.street.value"
|
||||
:options="search.select.street.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-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" :clearable="true" />
|
||||
</n-grid-item>
|
||||
<n-grid-item>
|
||||
<n-select placeholder="请选择月份" v-model:value="search.select.month.value"
|
||||
:options="search.select.month.options" :clearable="true" />
|
||||
</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">搜索</n-button>
|
||||
<n-button type="info">导出</n-button>
|
||||
<n-button type="default" @click="onUpdateClick">更新</n-button>
|
||||
</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>
|
||||
</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.street.value"
|
||||
:options="search.select.street.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-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" :clearable="true" />
|
||||
</n-grid-item>
|
||||
<n-grid-item>
|
||||
<n-select placeholder="请选择月份" v-model:value="search.select.month.value"
|
||||
:options="search.select.month.options" :clearable="true" />
|
||||
</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">搜索</n-button>
|
||||
<n-button type="info">导出</n-button>
|
||||
</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>
|
||||
</n-space>
|
||||
</n-spin>
|
||||
<n-modal preset="dialog" style="width: 800px" :show="modal.distance.show" :show-icon="false" :mask-closable="true"
|
||||
:closable="false" :on-update-show="onDistancenCloseClick">
|
||||
<wgy-work />
|
||||
@ -49,8 +52,9 @@
|
||||
:closable="false" :on-update-show="onReportDayCloseClick">
|
||||
<wgy-report-day />
|
||||
</n-modal>
|
||||
<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">
|
||||
<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">
|
||||
<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" />
|
||||
@ -69,10 +73,14 @@ import {
|
||||
NButton,
|
||||
NDataTable,
|
||||
NModal,
|
||||
NSpin,
|
||||
useMessage,
|
||||
useDialog,
|
||||
} from 'naive-ui';
|
||||
import WgyWork from '../common/WgyWork.vue'
|
||||
import WgyReportDay from '../common/WgyReportDay.vue'
|
||||
import Scoring from '../common/Scoring.vue';
|
||||
import { listYear, listMonth, getCurrentYear, getCurrentMonth } from '../utils/common'
|
||||
|
||||
export default {
|
||||
name: 'Wgy',
|
||||
@ -86,6 +94,7 @@ export default {
|
||||
NButton,
|
||||
NDataTable,
|
||||
NModal,
|
||||
NSpin,
|
||||
|
||||
WgyWork,
|
||||
WgyReportDay,
|
||||
@ -94,6 +103,9 @@ export default {
|
||||
data() {
|
||||
let vueSelf = this;
|
||||
return {
|
||||
message: useMessage(),
|
||||
dialog: useDialog(),
|
||||
dataLoading: false,
|
||||
search: {
|
||||
select: {
|
||||
street: {
|
||||
@ -123,8 +135,8 @@ export default {
|
||||
wgy: {
|
||||
value: 4,
|
||||
options: [
|
||||
{ label: '5级网格员', value: '5' },
|
||||
{ label: '4级网格员', value: '4' }
|
||||
{ label: '5级网格员', value: 4 },
|
||||
{ label: '4级网格员', value: 3 }
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -860,10 +872,34 @@ export default {
|
||||
this.modal.scoring.userName = row.B;
|
||||
this.modal.scoring.title = '党建信息抽查';
|
||||
},
|
||||
|
||||
computeAE(row) {
|
||||
return row.C + row.H - row.J + row.L - row.M - row.N - row.O - row.P + row.Q - row.S - row.T - row.U - row.V + row.W + row.X + row.Y - row.Z + row.AA + row.AB + row.AC - row.AD;
|
||||
},
|
||||
|
||||
onUpdateClick() {
|
||||
let vueSelf = this;
|
||||
vueSelf.dialog.warning({
|
||||
title: '警告',
|
||||
content: '确定更新吗?更新时间较长...',
|
||||
positiveText: '确定',
|
||||
negativeText: '不确定',
|
||||
onPositiveClick: () => {
|
||||
vueSelf.dataLoading = true;
|
||||
vueSelf.$axios.put(`api/kpi/khxz/update-wgy/kh-year/${vueSelf.search.select.year.value}/kh-month/${vueSelf.search.select.month.value}/wgy-level/${vueSelf.search.select.wgy.value}`, {
|
||||
}).then(resp => {
|
||||
vueSelf.message.info('更新成功');
|
||||
vueSelf.listData();
|
||||
}).catch(resp => {
|
||||
console.error(resp)
|
||||
vueSelf.message.error('更新失败');
|
||||
}).finally(() => {
|
||||
vueSelf.dataLoading = false;
|
||||
});
|
||||
},
|
||||
onNegativeClick: () => {
|
||||
}
|
||||
});
|
||||
},
|
||||
listTestData() {
|
||||
let data = [];
|
||||
for (let i = 0; i < 100; i++) {
|
||||
@ -976,15 +1012,46 @@ export default {
|
||||
this.table.minHeight = body.clientHeight - 408;
|
||||
this.table.maxHeight = body.clientHeight - 408;
|
||||
this.table.scrollX = body.clientWidth;
|
||||
},
|
||||
listData() {
|
||||
let vueSelf = this;
|
||||
vueSelf.dataLoading = true;
|
||||
vueSelf.$axios.get(`api/kpi/khxz/list-wgy`, {
|
||||
params: {
|
||||
khYear: vueSelf.search.select.year.value,
|
||||
khMonth: vueSelf.search.select.month.value,
|
||||
wgyLevel: vueSelf.search.select.wgy.value
|
||||
}
|
||||
}).then(resp => {
|
||||
let data = resp.data;
|
||||
data.forEach((item, index) => {
|
||||
item.A = index + 1;
|
||||
})
|
||||
this.table.data = data;
|
||||
console.log(resp);
|
||||
}).catch(resp => {
|
||||
console.log(resp);
|
||||
}).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.listData();
|
||||
}
|
||||
},
|
||||
computed() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let vueSelf = this;
|
||||
vueSelf.listTestData();
|
||||
vueSelf.init();
|
||||
// vueSelf.listTestData();
|
||||
vueSelf.resize();
|
||||
window.onresize = this.resize
|
||||
window.onresize = this.resize;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -268,7 +268,7 @@ export default {
|
||||
key: 'N',
|
||||
keyName: 'totalScore',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
width: 60,
|
||||
render(row, index) {
|
||||
return vueSelf.computeN(row);
|
||||
}
|
||||
@ -279,7 +279,7 @@ export default {
|
||||
key: 'O',
|
||||
keyName: 'shouldPay',
|
||||
fixed: 'right',
|
||||
width: 100
|
||||
width: 60
|
||||
},
|
||||
{
|
||||
align: 'center',
|
||||
@ -287,7 +287,7 @@ export default {
|
||||
key: 'P',
|
||||
keyName: 'actualPay',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
width: 60,
|
||||
render(row, index) {
|
||||
return vueSelf.computeN(row) * row.O / 100;
|
||||
}
|
||||
@ -401,9 +401,9 @@ export default {
|
||||
J: d.unReportError,
|
||||
reasonJ: d.reasonUnReportError,
|
||||
K: d.others,
|
||||
reasonJ: d.reasonOthers,
|
||||
reasonK: d.reasonOthers,
|
||||
L: d.unComplete,
|
||||
reasonJ: d.reasonUnComplete,
|
||||
reasonL: d.reasonUnComplete,
|
||||
M: d.quarter,
|
||||
N: d.totalScore,
|
||||
O: d.shouldPay,
|
||||
|
@ -291,7 +291,7 @@ export default {
|
||||
key: 'M',
|
||||
keyName: 'totalScore',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
width: 60,
|
||||
render(row, index) {
|
||||
return vueSelf.computeM(row);
|
||||
}
|
||||
@ -302,7 +302,7 @@ export default {
|
||||
key: 'N',
|
||||
keyName: 'shouldPay',
|
||||
fixed: 'right',
|
||||
width: 100
|
||||
width: 60
|
||||
},
|
||||
{
|
||||
align: 'center',
|
||||
@ -310,7 +310,7 @@ export default {
|
||||
key: 'O',
|
||||
keyName: 'actualPay',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
width: 60,
|
||||
render(row, index) {
|
||||
return vueSelf.computeM(row) * row.O / 100;
|
||||
}
|
||||
@ -482,7 +482,7 @@ export default {
|
||||
K: d.handleReasonOthers,
|
||||
reasonJ: d.reasonHandleResult,
|
||||
L: d.superviseResult,
|
||||
reasonJ: d.reasonSuperviseResult,
|
||||
reasonL: d.reasonSuperviseResult,
|
||||
M: d.totalScore,
|
||||
N: d.shouldPay,
|
||||
O: d.actualPay,
|
||||
|
@ -275,7 +275,7 @@ export default {
|
||||
key: 'N',
|
||||
keyName: 'totalScore',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
width: 60,
|
||||
render(row, index) {
|
||||
return vueSelf.computeN(row);
|
||||
}
|
||||
@ -286,7 +286,7 @@ export default {
|
||||
key: 'O',
|
||||
keyName: 'shouldPay',
|
||||
fixed: 'right',
|
||||
width: 100
|
||||
width: 60
|
||||
},
|
||||
{
|
||||
align: 'center',
|
||||
@ -294,7 +294,7 @@ export default {
|
||||
key: 'P',
|
||||
keyName: 'actualPay',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
width: 60,
|
||||
render(row, index) {
|
||||
return vueSelf.computeN(row) * row.O / 100;
|
||||
}
|
||||
@ -422,9 +422,9 @@ export default {
|
||||
J: d.others,
|
||||
reasonJ: d.reasonOthers,
|
||||
K: d.handleResult,
|
||||
reasonJ: d.reasonHandleResult,
|
||||
reasonK: d.reasonHandleResult,
|
||||
L: d.superviseResult,
|
||||
reasonJ: d.reasonSuperviseResult,
|
||||
reasonL: d.reasonSuperviseResult,
|
||||
M: d.superviseResult,
|
||||
reasonM: d.reasonSuperviseResult,
|
||||
N: d.totalScore,
|
||||
|
31
src/components/utils/common.js
Normal file
31
src/components/utils/common.js
Normal file
@ -0,0 +1,31 @@
|
||||
export const getCurrentYear = () => {
|
||||
return new Date().getFullYear();
|
||||
}
|
||||
|
||||
export const getCurrentMonth = () => {
|
||||
return new Date().getMonth() + 1;
|
||||
}
|
||||
|
||||
export const listYear = () => {
|
||||
let startYear = 2022;
|
||||
let currentYear = new Date().getFullYear();
|
||||
let array = [];
|
||||
for (let year = currentYear; year >= startYear; year--) {
|
||||
array.push({
|
||||
label: `${year}年`,
|
||||
value: year
|
||||
});
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
export const listMonth = () => {
|
||||
let array = [];
|
||||
for (let month = 1; month <= 12; month++) {
|
||||
array.push({
|
||||
label: `${month}月`,
|
||||
value: month
|
||||
})
|
||||
}
|
||||
return array;
|
||||
}
|
12
src/main.js
12
src/main.js
@ -2,6 +2,7 @@ import { createApp } from 'vue'
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import './style.css'
|
||||
import App from './App.vue'
|
||||
import axios from 'axios';
|
||||
|
||||
import Wgy from './components/table/Wgy.vue';
|
||||
import Ddy from './components/table/Ddy.vue';
|
||||
@ -9,6 +10,7 @@ import ZfGa from './components/table/ZfGa.vue';
|
||||
import Wgy3 from './components/table/Wgy3.vue';
|
||||
import Znbm from './components/table/Znbm.vue';
|
||||
|
||||
// 路由
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes: [
|
||||
@ -20,6 +22,16 @@ const router = createRouter({
|
||||
]
|
||||
});
|
||||
|
||||
// axios
|
||||
const createAxios = {
|
||||
install(app, options) {
|
||||
axios.defaults.baseURL = 'http://127.0.0.1:8087/bigdata';
|
||||
axios.defaults.timeout = 6000;
|
||||
app.config.globalProperties.$axios = axios;
|
||||
}
|
||||
}
|
||||
|
||||
const app = createApp(App);
|
||||
app.use(router);
|
||||
app.use(createAxios);
|
||||
app.mount('#app');
|
||||
|
Loading…
Reference in New Issue
Block a user