Browse Source

flx:更改++图表

wzq 5 months ago
parent
commit
0f57dacefd

+ 4 - 0
src/api/basic.info/unitInfoApi.js

@@ -40,5 +40,9 @@ export default {
40
 	// 单位信息获取
40
 	// 单位信息获取
41
 	getInfoDataList(data) {
41
 	getInfoDataList(data) {
42
 		return request1('list', data, 'get')
42
 		return request1('list', data, 'get')
43
+	},
44
+
45
+	getCityUnitInfoList(data) {
46
+		return request('getCityUnitInfo', data, 'get')
43
 	}
47
 	}
44
 }
48
 }

+ 4 - 0
src/api/business/personnelApi.js

@@ -172,5 +172,9 @@ export default {
172
 	//view
172
 	//view
173
 	RCGHauditRequest(data) {
173
 	RCGHauditRequest(data) {
174
 		return requestPAG('/auditRequest/detail', data, 'get')
174
 		return requestPAG('/auditRequest/detail', data, 'get')
175
+	},
176
+
177
+	getStatisticalChart(data) {
178
+		return request('emPersonInfo/getStatisticalChart', data, 'get')
175
 	}
179
 	}
176
 }
180
 }

+ 4 - 3
src/views/Sales/analysis/pink.js

@@ -6,10 +6,11 @@ export function useaddA(datav, arr) {
6
 			actValue: item.value,
6
 			actValue: item.value,
7
 			label: {
7
 			label: {
8
 				show: true,
8
 				show: true,
9
-				position: 'outside',
9
+				position: 'inner',
10
+				// position: 'outside',
10
 				borderRadius: 5,
11
 				borderRadius: 5,
11
 				padding: [5, 5, 5, 5],
12
 				padding: [5, 5, 5, 5],
12
-				color: colorList[index],
13
+				color: '#464646',
13
 				textStyle: {
14
 				textStyle: {
14
 					fontSize: 14,
15
 					fontSize: 14,
15
 					lineHeight: 20
16
 					lineHeight: 20
@@ -51,7 +52,7 @@ export function useaddA(datav, arr) {
51
 				radius: '65%',
52
 				radius: '65%',
52
 				center: ['50%', '50%'],
53
 				center: ['50%', '50%'],
53
 				label: {
54
 				label: {
54
-					show: true,
55
+					show: false,
55
 					// formatter: '{b} {d}%',
56
 					// formatter: '{b} {d}%',
56
 					formatter: '{d}%'
57
 					formatter: '{d}%'
57
 				},
58
 				},

+ 54 - 1
src/views/basic.info/unitInfo/index.vue

@@ -14,7 +14,8 @@
14
 			<div class="btnBox">
14
 			<div class="btnBox">
15
 				<a-button style="margin-right: 16px" @click="searchData">查询</a-button>
15
 				<a-button style="margin-right: 16px" @click="searchData">查询</a-button>
16
 				<a-button style="margin-right: 16px" @click="reset">重置</a-button>
16
 				<a-button style="margin-right: 16px" @click="reset">重置</a-button>
17
-				<a-button type="primary" @click="addData">新增</a-button>
17
+				<a-button style="margin-right: 16px" type="primary" @click="addData">新增</a-button>
18
+				<a-button type="primary" @click="getView">分地区统计</a-button>
18
 			</div>
19
 			</div>
19
 		</a-space>
20
 		</a-space>
20
 		<a-table
21
 		<a-table
@@ -45,12 +46,60 @@
45
 		/> -->
46
 		/> -->
46
 		<!-- 查看--编辑--新增等操作 -->
47
 		<!-- 查看--编辑--新增等操作 -->
47
 		<DetailedList :dataObj="dataObj" @isVisible="isVisible" />
48
 		<DetailedList :dataObj="dataObj" @isVisible="isVisible" />
49
+		<a-modal
50
+			v-model:visible="AddEditDialog.open"
51
+			:title="AddEditDialog.title"
52
+			:footer="null"
53
+			:closable="false"
54
+			:maskClosable="false"
55
+			width="800px"
56
+		>
57
+			<div class="acc_del">
58
+				<a-table :dataSource="AddEditDialoglist" :pagination="false" :columns="AddEditDialogtable">
59
+					<template #bodyCell="{ column, record }">
60
+						<template v-if="column.dataIndex === 'checkResult'">
61
+							<div v-if="record.checkResult == 0">不合格</div>
62
+							<div v-if="record.checkResult == 1">合格</div>
63
+						</template>
64
+					</template>
65
+				</a-table>
66
+			</div>
67
+			<div class="btn-box">
68
+				<!-- <a-button v-if="dataObj.isType !== '3'" style="margin-right: 16px" type="primary" @click="handleOk"
69
+					>保存</a-button
70
+				> -->
71
+				<a-button @click="onDialogOk">关闭</a-button>
72
+			</div>
73
+		</a-modal>
48
 	</div>
74
 	</div>
49
 </template>
75
 </template>
50
 
76
 
51
 <script setup name="unitInfo">
77
 <script setup name="unitInfo">
52
 	import unitInfoApi from '@/api/basic.info/unitInfoApi'
78
 	import unitInfoApi from '@/api/basic.info/unitInfoApi'
53
 	import DetailedList from './detailedList.vue'
79
 	import DetailedList from './detailedList.vue'
80
+
81
+	const getView = () => {
82
+		AddEditDialog.value.open = true
83
+		AddEditDialoglist.value = []
84
+		AddEditDialoglistDEl()
85
+	}
86
+	const AddEditDialog = ref({
87
+		open: false,
88
+		title: '分地区统计'
89
+	})
90
+	const onDialogOk = () => {
91
+		AddEditDialog.value.open = false
92
+		AddEditDialoglist.value = []
93
+	}
94
+	const AddEditDialoglist = ref([])
95
+	const AddEditDialogtable = [
96
+		{ title: '地区', width: '10%', align: 'center', dataIndex: 'cityName' },
97
+		{ title: '企业数量', width: '10%', align: 'center', dataIndex: 'unitCount' }
98
+	]
99
+	const AddEditDialoglistDEl = async () => {
100
+		const res = await unitInfoApi.getCityUnitInfoList()
101
+		AddEditDialoglist.value = res
102
+	}
54
 	const columns = [
103
 	const columns = [
55
 		{
104
 		{
56
 			title: '序号',
105
 			title: '序号',
@@ -314,4 +363,8 @@
314
 	::v-deep .ant-pagination-options {
363
 	::v-deep .ant-pagination-options {
315
 		display: none !important;
364
 		display: none !important;
316
 	}
365
 	}
366
+	.btn-box {
367
+		text-align: center;
368
+		margin-top: 10px;
369
+	}
317
 </style>
370
 </style>

+ 80 - 26
src/views/business/enterprise/detailedList.vue

@@ -16,11 +16,11 @@
16
 							<a-input autocomplete="off" :disabled="showLock" v-model:value="formState.tydwbm" /> </a-form-item
16
 							<a-input autocomplete="off" :disabled="showLock" v-model:value="formState.tydwbm" /> </a-form-item
17
 					></a-col>
17
 					></a-col>
18
 					<a-col :span="8"
18
 					<a-col :span="8"
19
-						><a-form-item label="单位名称" name="dwmc">
19
+						><a-form-item label="企业名称" name="dwmc">
20
 							<a-input autocomplete="off" :disabled="showLock" v-model:value="formState.dwmc" /> </a-form-item
20
 							<a-input autocomplete="off" :disabled="showLock" v-model:value="formState.dwmc" /> </a-form-item
21
 					></a-col>
21
 					></a-col>
22
 					<a-col :span="8"
22
 					<a-col :span="8"
23
-						><a-form-item label="单位代码" name="dwdm">
23
+						><a-form-item label="统一社会信用代码" name="dwdm">
24
 							<a-input
24
 							<a-input
25
 								autocomplete="off"
25
 								autocomplete="off"
26
 								placeholder="请输入18位统一社会信用代码"
26
 								placeholder="请输入18位统一社会信用代码"
@@ -39,7 +39,7 @@
39
 							/> </a-form-item
39
 							/> </a-form-item
40
 					></a-col>
40
 					></a-col>
41
 					<a-col :span="8"
41
 					<a-col :span="8"
42
-						><a-form-item label="注册资本" name="zczb">
42
+						><a-form-item label="注册资本(万元)" name="zczb">
43
 							<a-input
43
 							<a-input
44
 								class="int-box"
44
 								class="int-box"
45
 								@input="onInput"
45
 								@input="onInput"
@@ -47,12 +47,12 @@
47
 								:disabled="showLock"
47
 								:disabled="showLock"
48
 								v-model:value="formState.zczb"
48
 								v-model:value="formState.zczb"
49
 							>
49
 							>
50
-								<template #suffix>万元</template>
50
+								<!-- <template #suffix>万元</template> -->
51
 							</a-input></a-form-item
51
 							</a-input></a-form-item
52
 						></a-col
52
 						></a-col
53
 					>
53
 					>
54
 					<a-col :span="8"
54
 					<a-col :span="8"
55
-						><a-form-item label="资产总额" name="zcze">
55
+						><a-form-item label="资产总额(万元)" name="zcze">
56
 							<a-input
56
 							<a-input
57
 								class="int-box"
57
 								class="int-box"
58
 								@input="onChangeInput"
58
 								@input="onChangeInput"
@@ -60,7 +60,7 @@
60
 								:disabled="showLock"
60
 								:disabled="showLock"
61
 								v-model:value="formState.zcze"
61
 								v-model:value="formState.zcze"
62
 							>
62
 							>
63
-								<template #suffix>万元</template>
63
+								<!-- <template #suffix>万元</template> -->
64
 							</a-input></a-form-item
64
 							</a-input></a-form-item
65
 						></a-col
65
 						></a-col
66
 					>
66
 					>
@@ -75,7 +75,7 @@
75
 							<a-input autocomplete="off" :disabled="showLock" v-model:value="formState.frsfzh" /> </a-form-item
75
 							<a-input autocomplete="off" :disabled="showLock" v-model:value="formState.frsfzh" /> </a-form-item
76
 					></a-col>
76
 					></a-col>
77
 					<a-col :span="8"
77
 					<a-col :span="8"
78
-						><a-form-item label="法人联系方式" name="frlxfs">
78
+						><a-form-item label="法人联系方式" name="frlxfs" :rules="[{ validator: isMobileData, trigger: 'blur' }]">
79
 							<a-input autocomplete="off" :disabled="showLock" v-model:value="formState.frlxfs" /> </a-form-item
79
 							<a-input autocomplete="off" :disabled="showLock" v-model:value="formState.frlxfs" /> </a-form-item
80
 					></a-col>
80
 					></a-col>
81
 				</a-row>
81
 				</a-row>
@@ -97,6 +97,7 @@
97
 					<a-col :span="16"
97
 					<a-col :span="16"
98
 						><a-form-item v-model:validation-status="formState.zcdz" label="注册地址" name="zcdz" class="from-item">
98
 						><a-form-item v-model:validation-status="formState.zcdz" label="注册地址" name="zcdz" class="from-item">
99
 							<a-cascader
99
 							<a-cascader
100
+								:allowClear="false"
100
 								:disabled="showLock"
101
 								:disabled="showLock"
101
 								class="address-box"
102
 								class="address-box"
102
 								:options="cascaOptions"
103
 								:options="cascaOptions"
@@ -196,6 +197,28 @@
196
 							</a-select>
197
 							</a-select>
197
 						</a-form-item></a-col
198
 						</a-form-item></a-col
198
 					>
199
 					>
200
+					<a-col :span="8"
201
+						><a-form-item label="总仓容">
202
+							<a-input
203
+								autocomplete="off"
204
+								:disabled="showLock"
205
+								v-model:value="formState.totalWarehouseCapacity"
206
+							/> </a-form-item
207
+					></a-col>
208
+				</a-row>
209
+				<a-row>
210
+					<a-col :span="12">
211
+						<a-form-item ref="uploadDataList" label="上传电子扫描件">
212
+							<UPLoadData
213
+								:beforeUpload="beforeUpload"
214
+								:disabled="showLock"
215
+								listType="picture-card"
216
+								multiple
217
+								v-model:urls="formState.electronicScan"
218
+								:change="changeUpload"
219
+							/>
220
+						</a-form-item>
221
+					</a-col>
199
 				</a-row>
222
 				</a-row>
200
 			</a-form>
223
 			</a-form>
201
 			<div class="btn-box">
224
 			<div class="btn-box">
@@ -209,8 +232,9 @@
209
 </template>
232
 </template>
210
 
233
 
211
 <script setup>
234
 <script setup>
212
-	import unitInfoApi from '@/api/basic.info/unitInfoApi-zq'
235
+	import unitInfoApi from '@/api/basic.info/unitInfoApi'
213
 	import { message } from 'ant-design-vue'
236
 	import { message } from 'ant-design-vue'
237
+	import global from '@/api/basic.info/global'
214
 	import {
238
 	import {
215
 		isSocialCreditOrIdCode,
239
 		isSocialCreditOrIdCode,
216
 		isLongitude,
240
 		isLongitude,
@@ -223,7 +247,7 @@
223
 		isSocialCreditCode,
247
 		isSocialCreditCode,
224
 		administrativeDivision,
248
 		administrativeDivision,
225
 		isUnitCode
249
 		isUnitCode
226
-	} from '@/utils/validator-zq'
250
+	} from '@/utils/validator'
227
 	const props = defineProps({
251
 	const props = defineProps({
228
 		dataObj: {
252
 		dataObj: {
229
 			type: Object,
253
 			type: Object,
@@ -253,7 +277,9 @@
253
 		kqs: '',
277
 		kqs: '',
254
 		cfs: '',
278
 		cfs: '',
255
 		ygs: '',
279
 		ygs: '',
256
-		dwzt: ''
280
+		dwzt: '',
281
+		totalWarehouseCapacity: '',
282
+		electronicScan: ''
257
 	})
283
 	})
258
 	const cascaOptions = ref([])
284
 	const cascaOptions = ref([])
259
 	const unitTypeList = ref([])
285
 	const unitTypeList = ref([])
@@ -287,11 +313,7 @@
287
 		kqs: [{ required: true, message: '请输入库区数', trigger: 'blur' }],
313
 		kqs: [{ required: true, message: '请输入库区数', trigger: 'blur' }],
288
 		cfs: [{ required: true, message: '请输入仓房数', trigger: 'blur' }],
314
 		cfs: [{ required: true, message: '请输入仓房数', trigger: 'blur' }],
289
 		ygs: [{ required: true, message: '请输入油罐数', trigger: 'blur' }],
315
 		ygs: [{ required: true, message: '请输入油罐数', trigger: 'blur' }],
290
-		dwzt: [{ required: true, message: '请选择单位状态', trigger: 'change' }],
291
-		frlxfs: [
292
-			{ required: true, message: '请输入法人联系方式', trigger: 'change' },
293
-			{ validator: isMobileData, trigger: 'change' }
294
-		]
316
+		dwzt: [{ required: true, message: '请选择单位状态', trigger: 'change' }]
295
 	})
317
 	})
296
 	const auditStatus = ref([
318
 	const auditStatus = ref([
297
 		{ name: '正常', dwzt: 1 },
319
 		{ name: '正常', dwzt: 1 },
@@ -316,6 +338,17 @@
316
 			unitTypeList.value = res
338
 			unitTypeList.value = res
317
 		})
339
 		})
318
 	}
340
 	}
341
+	// 文件预览方式
342
+	function changeUpload(ev) {
343
+		return global.uploadFile(ev).then((reg) => {
344
+			return reg
345
+		})
346
+	}
347
+	const uploadDataList = ref(null)
348
+	function beforeUpload() {
349
+		uploadDataList.value.clearValidate()
350
+	}
351
+
319
 	// 取消按钮
352
 	// 取消按钮
320
 	const handleCancel = () => {
353
 	const handleCancel = () => {
321
 		visible.value = false
354
 		visible.value = false
@@ -334,6 +367,19 @@
334
 			.then(() => {
367
 			.then(() => {
335
 				formState.value.zczb = Number(formState.value.zczb)
368
 				formState.value.zczb = Number(formState.value.zczb)
336
 				formState.value.zcze = Number(formState.value.zcze)
369
 				formState.value.zcze = Number(formState.value.zcze)
370
+				// 判断附件内容存在与否
371
+				if (Array.isArray(formState.value.electronicScan)) {
372
+					if (formState.value.electronicScan[0].url) {
373
+						let arrList = formState.value.electronicScan
374
+						formState.value.electronicScan = []
375
+						arrList.forEach((item) => {
376
+							formState.value.electronicScan.push(item.url)
377
+						})
378
+						formState.value.electronicScan = formState.value.electronicScan.join(',')
379
+					} else {
380
+						formState.value.electronicScan = formState.value.electronicScan.join(',')
381
+					}
382
+				}
337
 				// isTypeData === '1' 新增  2是编辑 3是查看
383
 				// isTypeData === '1' 新增  2是编辑 3是查看
338
 				if (isTypeData.value === '1') return addData()
384
 				if (isTypeData.value === '1') return addData()
339
 				if (isTypeData.value === '2') return editData()
385
 				if (isTypeData.value === '2') return editData()
@@ -390,18 +436,22 @@
390
 	// 注册地址选择一栏
436
 	// 注册地址选择一栏
391
 	const getChangeData = (val, selectedOptions) => {
437
 	const getChangeData = (val, selectedOptions) => {
392
 		// 将选择好的id循环取出push到formState.value里面
438
 		// 将选择好的id循环取出push到formState.value里面
393
-		if (selectedOptions.length === 1) {
394
-			register = { zcdzProvince: '', zcdzCity: '', zcdzArea: '' }
395
-			register.zcdzProvince = selectedOptions[0].id
396
-		} else if (selectedOptions.length === 2) {
397
-			register = { zcdzProvince: '', zcdzCity: '', zcdzArea: '' }
398
-			register.zcdzProvince = selectedOptions[0].id
399
-			register.zcdzCity = selectedOptions[1].id
439
+		if (selectedOptions.slice(-1)[0].sortCode.toString().length >= 6) {
440
+			if (selectedOptions.length === 1) {
441
+				register = { zcdzProvince: '', zcdzCity: '', zcdzArea: '' }
442
+				register.zcdzProvince = selectedOptions[0].id
443
+			} else if (selectedOptions.length === 2) {
444
+				register = { zcdzProvince: '', zcdzCity: '', zcdzArea: '' }
445
+				register.zcdzProvince = selectedOptions[0].id
446
+				register.zcdzCity = selectedOptions[1].id
447
+			} else {
448
+				register = { zcdzProvince: '', zcdzCity: '', zcdzArea: '' }
449
+				register.zcdzProvince = selectedOptions[0].id
450
+				register.zcdzCity = selectedOptions[1].id
451
+				register.zcdzArea = selectedOptions[2].id
452
+			}
400
 		} else {
453
 		} else {
401
-			register = { zcdzProvince: '', zcdzCity: '', zcdzArea: '' }
402
-			register.zcdzProvince = selectedOptions[0].id
403
-			register.zcdzCity = selectedOptions[1].id
404
-			register.zcdzArea = selectedOptions[2].id
454
+			formState.value.zcdz = ''
405
 		}
455
 		}
406
 	}
456
 	}
407
 
457
 
@@ -437,6 +487,10 @@
437
 	const detailData = (id) => {
487
 	const detailData = (id) => {
438
 		unitInfoApi.unitInfoDetail({ id: id }).then((res) => {
488
 		unitInfoApi.unitInfoDetail({ id: id }).then((res) => {
439
 			formState.value = { ...res }
489
 			formState.value = { ...res }
490
+			if (res.electronicScan) {
491
+				formState.value.electronicScan = []
492
+				formState.value.electronicScan = res.electronicScan.split(',') || ''
493
+			}
440
 		})
494
 		})
441
 	}
495
 	}
442
 	const isClose = () => {
496
 	const isClose = () => {

+ 54 - 1
src/views/business/enterprise/index.vue

@@ -14,7 +14,7 @@
14
 			<div class="btnBox">
14
 			<div class="btnBox">
15
 				<a-button style="margin-right: 16px" @click="searchData">查询</a-button>
15
 				<a-button style="margin-right: 16px" @click="searchData">查询</a-button>
16
 				<a-button style="margin-right: 16px" @click="reset">重置</a-button>
16
 				<a-button style="margin-right: 16px" @click="reset">重置</a-button>
17
-				<!-- <a-button type="primary" @click="addData">新增</a-button> -->
17
+				<a-button type="primary" @click="getView">分地区统计</a-button>
18
 			</div>
18
 			</div>
19
 		</a-space>
19
 		</a-space>
20
 		<a-table
20
 		<a-table
@@ -45,12 +45,61 @@
45
 		/> -->
45
 		/> -->
46
 		<!-- 查看--编辑--新增等操作 -->
46
 		<!-- 查看--编辑--新增等操作 -->
47
 		<DetailedList :dataObj="dataObj" @isVisible="isVisible" />
47
 		<DetailedList :dataObj="dataObj" @isVisible="isVisible" />
48
+
49
+		<a-modal
50
+			v-model:visible="AddEditDialog.open"
51
+			:title="AddEditDialog.title"
52
+			:footer="null"
53
+			:closable="false"
54
+			:maskClosable="false"
55
+			width="800px"
56
+		>
57
+			<div class="acc_del">
58
+				<a-table :dataSource="AddEditDialoglist" :pagination="false" :columns="AddEditDialogtable">
59
+					<template #bodyCell="{ column, record }">
60
+						<template v-if="column.dataIndex === 'checkResult'">
61
+							<div v-if="record.checkResult == 0">不合格</div>
62
+							<div v-if="record.checkResult == 1">合格</div>
63
+						</template>
64
+					</template>
65
+				</a-table>
66
+			</div>
67
+			<div class="btn-box">
68
+				<!-- <a-button v-if="dataObj.isType !== '3'" style="margin-right: 16px" type="primary" @click="handleOk"
69
+					>保存</a-button
70
+				> -->
71
+				<a-button @click="onDialogOk">关闭</a-button>
72
+			</div>
73
+		</a-modal>
48
 	</div>
74
 	</div>
49
 </template>
75
 </template>
50
 
76
 
51
 <script setup name="unitInfo">
77
 <script setup name="unitInfo">
52
 	import unitInfoApi from '@/api/basic.info/unitInfoApi'
78
 	import unitInfoApi from '@/api/basic.info/unitInfoApi'
53
 	import DetailedList from './detailedList.vue'
79
 	import DetailedList from './detailedList.vue'
80
+	const getView = () => {
81
+		AddEditDialog.value.open = true
82
+		AddEditDialoglist.value = []
83
+		AddEditDialoglistDEl()
84
+	}
85
+	const AddEditDialog = ref({
86
+		open: false,
87
+		title: '分地区统计'
88
+	})
89
+	const onDialogOk = () => {
90
+		AddEditDialog.value.open = false
91
+		AddEditDialoglist.value = []
92
+	}
93
+	const AddEditDialoglist = ref([])
94
+	const AddEditDialogtable = [
95
+		{ title: '地区', width: '10%', align: 'center', dataIndex: 'cityName' },
96
+		{ title: '企业数量', width: '10%', align: 'center', dataIndex: 'unitCount' }
97
+	]
98
+	const AddEditDialoglistDEl = async () => {
99
+		const res = await unitInfoApi.getCityUnitInfoList()
100
+		AddEditDialoglist.value = res
101
+	}
102
+
54
 	const columns = [
103
 	const columns = [
55
 		{
104
 		{
56
 			title: '序号',
105
 			title: '序号',
@@ -312,4 +361,8 @@
312
 	::v-deep .ant-pagination-options {
361
 	::v-deep .ant-pagination-options {
313
 		display: none !important;
362
 		display: none !important;
314
 	}
363
 	}
364
+	.btn-box {
365
+		text-align: center;
366
+		margin-top: 10px;
367
+	}
315
 </style>
368
 </style>

+ 174 - 0
src/views/business/personnel/data.js

@@ -0,0 +1,174 @@
1
+import * as echarts from 'echarts'
2
+
3
+export function useaddA(datav, arr) {
4
+	var seriesData = datav.map((item, index) => {
5
+		return {
6
+			...item,
7
+			actValue: item.value,
8
+			label: {
9
+				show: true,
10
+				position: 'inner',
11
+				borderRadius: 5,
12
+				padding: [5, 5, 5, 5],
13
+				color: '#464646',
14
+				textStyle: {
15
+					fontSize: 14,
16
+					lineHeight: 20
17
+				},
18
+				formatter: '{b}\n{c}\n{d}%'
19
+			}
20
+		}
21
+	})
22
+	return {
23
+		backgroundColor: '#fff',
24
+		grid: {
25
+			top: 0,
26
+			bottom: 0,
27
+			left: 0,
28
+			right: 0
29
+		},
30
+		title: {
31
+			text: '',
32
+			x: 'center'
33
+		},
34
+		tooltip: {
35
+			trigger: 'item',
36
+			axisPointer: {
37
+				type: 'shadow',
38
+				textStyle: {
39
+					color: '#012366'
40
+				}
41
+			},
42
+			textStyle: {
43
+				color: '#fff'
44
+			},
45
+			backgroundColor: '#3D5667',
46
+			borderColor: 'rgba(0, 58, 99, 0.8)',
47
+			confine: true,
48
+			formatter: '{a} <br/>{b} : {c} ({d}%)'
49
+		},
50
+		// tooltip: {
51
+		// 	trigger: 'item',
52
+		// 	formatter: '{a} <br/>{b} : {c} ({d}%)',
53
+		// 	textStyle: {
54
+		// 		fontSize: 12
55
+		// 	}
56
+		// },
57
+		legend: {
58
+			show: true,
59
+			// orient: 'vertical',
60
+			left: 'center',
61
+			textStyle: {
62
+				color: '#012366'
63
+			},
64
+			bottom: 0,
65
+			data: arr
66
+		},
67
+		series: [
68
+			{
69
+				color: ['#FFFF54', '#75FBFD', '#ABF04B', '#75FBFD'],
70
+				name: '',
71
+				type: 'pie',
72
+				radius: '65%',
73
+				center: ['50%', '50%'],
74
+				label: {
75
+					show: true,
76
+					// formatter: '{b} {d}%',
77
+					formatter: '{d}%'
78
+				},
79
+				// itemStyle: {
80
+				//   //饼图之间颜色
81
+				//   normal: {
82
+				//     borderColor: "#fff",
83
+				//     borderWidth: 4,
84
+				//   },
85
+				// },
86
+				labelLine: {
87
+					length: 10,
88
+					length2: 10
89
+				},
90
+				data: seriesData
91
+			}
92
+		]
93
+	}
94
+}
95
+
96
+export function useaddB(datav, arr) {
97
+	var seriesData = datav.map((item, index) => {
98
+		return {
99
+			...item,
100
+			actValue: item.value,
101
+			label: {
102
+				show: true,
103
+				position: 'inner',
104
+				borderRadius: 5,
105
+				padding: [5, 5, 5, 5],
106
+				color: '#464646',
107
+				textStyle: {
108
+					fontSize: 14,
109
+					lineHeight: 20
110
+				},
111
+				formatter: '{b}\n{c}\n{d}%'
112
+			}
113
+		}
114
+	})
115
+	return {
116
+		backgroundColor: '#fff',
117
+		grid: {
118
+			top: 0,
119
+			bottom: 0,
120
+			left: 0,
121
+			right: 0
122
+		},
123
+		title: {
124
+			text: '',
125
+			x: 'center'
126
+		},
127
+		tooltip: {
128
+			trigger: 'item',
129
+			axisPointer: {
130
+				type: 'shadow',
131
+				textStyle: {
132
+					color: '#012366'
133
+				}
134
+			},
135
+			textStyle: {
136
+				color: '#fff'
137
+			},
138
+			backgroundColor: '#3D5667',
139
+			borderColor: 'rgba(0, 58, 99, 0.8)',
140
+			confine: true,
141
+			formatter: '{a} <br/>{b} : {c} ({d}%)'
142
+		},
143
+		legend: {
144
+			show: true,
145
+			// orient: 'vertical',
146
+			left: 'center',
147
+			textStyle: {
148
+				color: '#012366'
149
+			},
150
+			bottom: 0,
151
+			data: arr
152
+		},
153
+		series: [
154
+			{
155
+				color: ['#FFFF54', '#AE7731', '#C72A28', '#75FBFD'],
156
+				name: '',
157
+				type: 'pie',
158
+				radius: '65%',
159
+				center: ['50%', '50%'],
160
+				label: {
161
+					show: true,
162
+					// formatter: '{b} {d}%',
163
+					formatter: '{d}%'
164
+				},
165
+
166
+				labelLine: {
167
+					length: 10,
168
+					length2: 10
169
+				},
170
+				data: seriesData
171
+			}
172
+		]
173
+	}
174
+}

+ 81 - 14
src/views/business/personnel/index.vue

@@ -10,6 +10,7 @@
10
 				<div class="btnBox">
10
 				<div class="btnBox">
11
 					<a-button type="primary" class="primarySele" @click="Search"> 查询 </a-button>
11
 					<a-button type="primary" class="primarySele" @click="Search"> 查询 </a-button>
12
 					<a-button class="snowy-buttom-left" @click="onReset"> 重置 </a-button>
12
 					<a-button class="snowy-buttom-left" @click="onReset"> 重置 </a-button>
13
+					<a-button type="primary" @click="getView">汇总统计</a-button>
13
 					<a-button type="primary" class="primarySele" @click="onView('add')"> 新增 </a-button>
14
 					<a-button type="primary" class="primarySele" @click="onView('add')"> 新增 </a-button>
14
 				</div>
15
 				</div>
15
 			</a-space>
16
 			</a-space>
@@ -29,6 +30,29 @@
29
 				</template>
30
 				</template>
30
 			</a-table>
31
 			</a-table>
31
 		</div>
32
 		</div>
33
+
34
+		<a-modal
35
+			v-model:visible="AddEditDialog.open"
36
+			:title="AddEditDialog.title"
37
+			:footer="null"
38
+			:closable="false"
39
+			:maskClosable="false"
40
+			width="800px"
41
+		>
42
+			<div class="acc_del">
43
+				<div>
44
+					<h3>人员性别统计</h3>
45
+					<Ecs width="350px" height="400px" :options="coclistA" @load="load" id="FoodsLineA" />
46
+				</div>
47
+				<div>
48
+					<h3>岗位性质统</h3>
49
+					<Ecs width="350px" height="400px" :options="coclistB" @load="load" id="FoodsLineB" />
50
+				</div>
51
+			</div>
52
+			<div class="btn-box">
53
+				<a-button @click="onDialogOk">关闭</a-button>
54
+			</div>
55
+		</a-modal>
32
 	</div>
56
 	</div>
33
 </template>
57
 </template>
34
 <script setup>
58
 <script setup>
@@ -36,23 +60,57 @@
36
 	import { listPagination } from '@/hook/listlistPagination.js'
60
 	import { listPagination } from '@/hook/listlistPagination.js'
37
 	import { reactive, ref, watch } from 'vue'
61
 	import { reactive, ref, watch } from 'vue'
38
 	import { useRouter, useRoute } from 'vue-router'
62
 	import { useRouter, useRoute } from 'vue-router'
39
-	import { defineComponent } from 'vue'
40
-	import useRouterdel from '@/router/index'
63
+	import { useaddA, useaddB } from './data.js'
64
+
41
 	const formRef = ref(null)
65
 	const formRef = ref(null)
42
 	const router = useRouter()
66
 	const router = useRouter()
43
 	const route = useRoute()
67
 	const route = useRoute()
44
-	onMounted(() => {
45
-		// onSearch()
68
+	const getView = () => {
69
+		coclistA.value = {}
70
+		coclistB.value = {}
71
+		AddEditDialog.value.open = true
72
+		AddEditDialoglistDEl()
73
+		AddEditDialoglistDElB()
74
+	}
75
+	const AddEditDialog = ref({
76
+		open: false,
77
+		title: '汇总统计'
46
 	})
78
 	})
47
-	// useRouterdel.beforeResolve((to, from, next) => {
48
-	// 	console.log(to.fullPath == '/business/personnel')
49
-	// 	if (to.fullPath == '/business/personnel') {
50
-	// 		next()
51
-	// 		onSearch()
52
-	// 	} else {
53
-	// 		next()
54
-	// 	}
55
-	// })
79
+	const onDialogOk = () => {
80
+		coclistA.value = {}
81
+		coclistB.value = {}
82
+		AddEditDialog.value.open = false
83
+	}
84
+	const coclistA = ref({})
85
+	const coclistB = ref({})
86
+	const AddEditDialoglistDEl = async () => {
87
+		const res = await business.getStatisticalChart({ chartType: 1 })
88
+		const nameDataA = res.map((item) => item.genderName)
89
+		let dataA = res.map((item) => {
90
+			return {
91
+				value: item.count,
92
+				name: item.genderName
93
+			}
94
+		})
95
+		coclistA.value = useaddA(dataA, nameDataA)
96
+	}
97
+
98
+	const AddEditDialoglistDElB = async () => {
99
+		const res = await business.getStatisticalChart({ chartType: 2 })
100
+		const nameDataB = res.map((item) => item.genderName)
101
+		let dataB = res.map((item) => {
102
+			return {
103
+				value: item.count,
104
+				name: item.genderName
105
+			}
106
+		})
107
+		coclistB.value = useaddB(dataB, nameDataB)
108
+	}
109
+
110
+	const load = (v) => {}
111
+
112
+	onMounted(() => {})
113
+
56
 	watch(
114
 	watch(
57
 		() => route,
115
 		() => route,
58
 		(newVal) => {
116
 		(newVal) => {
@@ -79,7 +137,6 @@
79
 		{ title: '联系方式', dataIndex: 'contact' },
137
 		{ title: '联系方式', dataIndex: 'contact' },
80
 		{ title: '操作', key: '操作' }
138
 		{ title: '操作', key: '操作' }
81
 	]
139
 	]
82
-	const SiteOptions = []
83
 
140
 
84
 	const { tableData, onSearch, handlePageChange, pagination, Search, onReset, SearchFormDel } = listPagination(
141
 	const { tableData, onSearch, handlePageChange, pagination, Search, onReset, SearchFormDel } = listPagination(
85
 		{ name: '' },
142
 		{ name: '' },
@@ -143,4 +200,14 @@
143
 	.silt-title {
200
 	.silt-title {
144
 		display: flex;
201
 		display: flex;
145
 	}
202
 	}
203
+	.btn-box {
204
+		text-align: center;
205
+		margin-top: 10px;
206
+	}
207
+	.acc_del {
208
+		display: flex;
209
+		justify-content: space-between;
210
+		margin-bottom: 20px;
211
+		text-align: center;
212
+	}
146
 </style>
213
 </style>