Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
17cbd59aea
|
@ -11,3 +11,12 @@ VITE_APP_PROXY_URL=http://172.10.10.93:8765
|
|||
|
||||
# rsa 公钥
|
||||
VITE_APP_RSA_PUBLIC_KEY=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJps/EXxxSpEM1Ix4R0NWIOBciHCr7P7coDT8tNKfelgR7txcJOqHCO/MIWe7T04aHQTcpQxqx9hMca7dbqz8TZpz9jvLzE/6ZonVKxHsoFnNlHMp1/CPAJ9f6D9wYicum2KltJkmQ0g//D9W2zPCYoGOmSRFcZx/KEBa4EM53jQIDAQAB
|
||||
|
||||
# 高德
|
||||
VITE_APP_GAODE_KEY=ca549d915cb38803582ca7e85c5f972c
|
||||
VITE_APP_GAODE_VERSION=2.0
|
||||
VITE_APP_SECURITY_JS_CODE=f464462874676b3f1469780a62e5b921
|
||||
|
||||
# VITE_APP_GAODE_KEY=f379a3f860a68d7438526275d6a94b05
|
||||
# VITE_APP_GAODE_VERSION=2.0
|
||||
# VITE_APP_SECURITY_JS_CODE=432125a0f8d8cad2dac38b77d6f6728f
|
|
@ -8,3 +8,8 @@ VITE_APP_BASE_API=/api
|
|||
VITE_APP_PROXY_URL=http://172.10.10.93:8765
|
||||
# rsa 公钥
|
||||
VITE_APP_RSA_PUBLIC_KEY=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCpu1C3JHZ+Ng/eVVCZtwKsOZv9RktpAL13pKy4FoRHyNv2t8TPV2AMzLzfEzlWx001nBxyVxEMR2N9jAcqFLHv7r16ciOzbtzB9dky2G+bc9jIs4/EdVK5bAZcPRh5Jrb78sC9PHyR4AeceDyCIKHLUbWBJB4NTZE0s1Wh5kMynQIDAQAB
|
||||
|
||||
# 高德
|
||||
VITE_APP_GAODE_KEY=f379a3f860a68d7438526275d6a94b05
|
||||
VITE_APP_GAODE_VERSION=2.0
|
||||
VITE_APP_SECURITY_JS_CODE=432125a0f8d8cad2dac38b77d6f6728f
|
|
@ -10,12 +10,10 @@ declare module 'vue' {
|
|||
AAvatar: typeof import('ant-design-vue/es')['Avatar']
|
||||
AButton: typeof import('ant-design-vue/es')['Button']
|
||||
ACascader: typeof import('ant-design-vue/es')['Cascader']
|
||||
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
|
||||
ACheckboxGroup: typeof import('ant-design-vue/es')['CheckboxGroup']
|
||||
ACol: typeof import('ant-design-vue/es')['Col']
|
||||
AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider']
|
||||
ADatePicker: typeof import('ant-design-vue/es')['DatePicker']
|
||||
ADivider: typeof import('ant-design-vue/es')['Divider']
|
||||
AdministrativeDivisionTree: typeof import('./src/components/tree/AdministrativeDivisionTree.vue')['default']
|
||||
ADropdown: typeof import('ant-design-vue/es')['Dropdown']
|
||||
AForm: typeof import('ant-design-vue/es')['Form']
|
||||
|
@ -31,7 +29,6 @@ declare module 'vue' {
|
|||
AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
|
||||
AModal: typeof import('ant-design-vue/es')['Modal']
|
||||
APagination: typeof import('ant-design-vue/es')['Pagination']
|
||||
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
|
||||
APopover: typeof import('ant-design-vue/es')['Popover']
|
||||
ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup']
|
||||
ARangePicker: typeof import('ant-design-vue/es')['RangePicker']
|
||||
|
@ -41,9 +38,6 @@ declare module 'vue' {
|
|||
ASpin: typeof import('ant-design-vue/es')['Spin']
|
||||
ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
|
||||
ATable: typeof import('ant-design-vue/es')['Table']
|
||||
ATabPane: typeof import('ant-design-vue/es')['TabPane']
|
||||
ATabs: typeof import('ant-design-vue/es')['Tabs']
|
||||
ATag: typeof import('ant-design-vue/es')['Tag']
|
||||
ATextarea: typeof import('ant-design-vue/es')['Textarea']
|
||||
ATimePicker: typeof import('ant-design-vue/es')['TimePicker']
|
||||
ATimeRangePicker: typeof import('ant-design-vue/es')['TimeRangePicker']
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
"vue-uuid": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@amap/amap-jsapi-types": "^0.0.15",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^22.5.1",
|
||||
"@vitejs/plugin-vue": "^5.1.2",
|
||||
|
@ -55,6 +56,13 @@
|
|||
"integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@amap/amap-jsapi-types": {
|
||||
"version": "0.0.15",
|
||||
"resolved": "https://registry.npmmirror.com/@amap/amap-jsapi-types/-/amap-jsapi-types-0.0.15.tgz",
|
||||
"integrity": "sha512-oqyRqHpVDZh5bUe2mAJh41ZsziSj0eUzwcfIbiaBNB0eiTJnZNhKsTdk77VOklOjwuwNfsblpKW9LjmWNpeQ7A==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@ampproject/remapping": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
"vue-uuid": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@amap/amap-jsapi-types": "^0.0.15",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^22.5.1",
|
||||
"@vitejs/plugin-vue": "^5.1.2",
|
||||
|
|
|
@ -0,0 +1,178 @@
|
|||
/* 扩展ant design pro按钮组件颜色 */
|
||||
$--my-antd-important: !important;
|
||||
|
||||
.btn-danger {
|
||||
color: #ffffff;
|
||||
background-color: #F5222D;
|
||||
border-color: #F5222D;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #ff4d4f $--my-antd-important;
|
||||
border-color: #ff4d4f $--my-antd-important;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #cf1322 $--my-antd-important;
|
||||
border-color: #cf1322 $--my-antd-important;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-volcano {
|
||||
color: #ffffff;
|
||||
background-color: #FA541C;
|
||||
border-color: #FA541C;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #ff7a45 $--my-antd-important;
|
||||
border-color: #ff7a45 $--my-antd-important;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #d4380d $--my-antd-important;
|
||||
border-color: #d4380d $--my-antd-important;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-warn {
|
||||
color: #ffffff;
|
||||
background-color: #FAAD14;
|
||||
border-color: #FAAD14;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #ffc53d $--my-antd-important;
|
||||
border-color: #ffc53d $--my-antd-important;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #d48806 $--my-antd-important;
|
||||
border-color: #d48806 $--my-antd-important;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
color: #ffffff;
|
||||
background-color: #52C41A;
|
||||
border-color: #52C41A;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #73d13d $--my-antd-important;
|
||||
border-color: #73d13d $--my-antd-important;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #389e0d $--my-antd-important;
|
||||
border-color: #389e0d $--my-antd-important;
|
||||
}
|
||||
}
|
||||
|
||||
.button-color-cyan {
|
||||
color: #ffffff;
|
||||
background-color: #13C2C2;
|
||||
border-color: #13C2C2;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #36cfc9 $--my-antd-important;
|
||||
border-color: #36cfc9 $--my-antd-important;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #08979c $--my-antd-important;
|
||||
border-color: #08979c $--my-antd-important;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-daybreak {
|
||||
color: #ffffff;
|
||||
background-color: #1890FF;
|
||||
border-color: #1890FF;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #096dd9 $--my-antd-important;
|
||||
border-color: #096dd9 $--my-antd-important;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #40a9ff $--my-antd-important;
|
||||
border-color: #40a9ff $--my-antd-important;
|
||||
}
|
||||
}
|
||||
|
||||
.button-color-geekblue {
|
||||
color: #ffffff;
|
||||
background-color: #2F54EB;
|
||||
border-color: #2F54EB;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #1d39c4 $--my-antd-important;
|
||||
border-color: #1d39c4 $--my-antd-important;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #597ef7 $--my-antd-important;
|
||||
border-color: #597ef7 $--my-antd-important;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-purple {
|
||||
color: #ffffff;
|
||||
background-color: #722ED1;
|
||||
border-color: #722ED1;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #9254de $--my-antd-important;
|
||||
border-color: #9254de $--my-antd-important;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
color: #ffffff $--my-antd-important;
|
||||
background-color: #531dab $--my-antd-important;
|
||||
border-color: #531dab $--my-antd-important;
|
||||
}
|
||||
}
|
||||
|
||||
.table-row-warn td {
|
||||
background-color: #fefca6;
|
||||
}
|
||||
|
||||
.table-row-danger td {
|
||||
background-color: #f79988;
|
||||
}
|
||||
|
||||
.table-row-success td {
|
||||
background-color: #b6fcbe;
|
||||
}
|
||||
|
||||
.ant-table-summary td {
|
||||
background: #edeff6;
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, onUnmounted, shallowRef } from 'vue'
|
||||
import { initMap } from '@/utils/aMapUtil'
|
||||
import { MapContainerProps, MapPlugins } from '@/types/components/map'
|
||||
import { MapContainerProps, MapPlugins } from '@/types/components/map/index.ts'
|
||||
|
||||
const props = withDefaults(defineProps<MapContainerProps>(), {
|
||||
plugins: (): MapPlugins[] => {
|
||||
|
|
|
@ -1,19 +1,16 @@
|
|||
import {createApp} from 'vue'
|
||||
import { createApp } from 'vue'
|
||||
import App from '@/App.vue'
|
||||
import '@/reset.css'
|
||||
import './index.css'
|
||||
// 公共样式
|
||||
import '@/assets/scss/common.scss'
|
||||
// iconfont css
|
||||
import '@/assets/scss/myAntD.scss'
|
||||
import "@/assets/iconfont/iconfont.css";
|
||||
// vue Router
|
||||
import router from "@/router";
|
||||
// pinia stores
|
||||
import pinia from "@/stores";
|
||||
|
||||
const vueApp = createApp(App);
|
||||
import {initEnums} from "@/config/dict.ts";
|
||||
|
||||
import { initEnums } from "@/config/dict.ts";
|
||||
//高德类型声明文件
|
||||
import "@amap/amap-jsapi-types";
|
||||
initEnums()
|
||||
vueApp
|
||||
.use(router)
|
||||
|
|
|
@ -82,6 +82,16 @@ export const staticRouter: RouteRecordRaw[] =
|
|||
},
|
||||
component: () => import('@/views/query/publicUnit.vue')
|
||||
},
|
||||
{
|
||||
path: 'assessment-record', // 这里使用相对路径而不是 '/register'
|
||||
name: 'assessment-record',
|
||||
meta: {
|
||||
|
||||
title: '考核记录',
|
||||
keepalive: true
|
||||
},
|
||||
component: () => import('@/views/query/assessmentRecord.vue')
|
||||
}
|
||||
// {
|
||||
// path: 'weapp-user', // 这里使用相对路径而不是 '/register'
|
||||
// name: 'weapp-user',
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
/**
|
||||
* 高德支持的插件列表
|
||||
* @link https://lbs.amap.com/api/javascript-api-v2/guide/abc/plugins-list
|
||||
*/
|
||||
export type MapPlugins =
|
||||
'AMap.ElasticMarker'
|
||||
| 'AMap.ToolBar'
|
||||
| 'AMap.Scale'
|
||||
| 'AMap.HawkEye'
|
||||
| 'AMap.ControlBar'
|
||||
| 'AMap.MapType'
|
||||
| 'AMap.Geolocation'
|
||||
| 'AMap.AutoComplete'
|
||||
| 'AMap.PlaceSearch'
|
||||
| 'AMap.DistrictSearch'
|
||||
| 'AMap.LineSearch'
|
||||
| 'AMap.StationSearch'
|
||||
| 'AMap.Driving'
|
||||
| 'AMap.TruckDriving'
|
||||
| 'AMap.Transfer'
|
||||
| 'AMap.Walking'
|
||||
| 'AMap.Riding'
|
||||
| 'AMap.DragRoute'
|
||||
| 'AMap.Geocoder'
|
||||
| 'AMap.CitySearch'
|
||||
| 'AMap.IndoorMap'
|
||||
| 'AMap.MouseTool'
|
||||
| 'AMap.CircleEditor'
|
||||
| 'AMap.PolygonEditor'
|
||||
| 'AMap.PolylineEditor'
|
||||
| 'AMap.RectangleEditor'
|
||||
| 'AMap.EllipseEditor'
|
||||
| 'AMap.BezierCurveEditor'
|
||||
| 'AMap.MarkerCluster'
|
||||
| 'AMap.RangingTool'
|
||||
| 'AMap.CloudDataSearch'
|
||||
| 'AMap.Weather'
|
||||
| 'AMap.HeatMap'
|
||||
|
||||
export interface MapContainerProps {
|
||||
plugins?: MapPlugins[],
|
||||
initCallback?: (map: AMap.Map) => void,
|
||||
mapOptions?: AMap.MapOptions
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
import {BaseTableRowRecord} from "@/types/components/table";
|
||||
import {BaseEnum} from "../../../global";
|
||||
|
||||
|
||||
|
||||
export interface AssessmentRecordPagerVo extends BaseTableRowRecord {
|
||||
/** 企事业单位名称 **/
|
||||
enterprisesUnitName: string;
|
||||
/** 考核项目名称 **/
|
||||
ckProjectName: string;
|
||||
/** 考核项目总分 **/
|
||||
totalScore: number;
|
||||
/** 考核项目类型 **/
|
||||
type: BaseEnum<string>;
|
||||
/** 考核项目备注 **/
|
||||
ckProjectRemark: string;
|
||||
/** 公安单位名称 **/
|
||||
policeUnitName: string;
|
||||
/** 考核人员签字 **/
|
||||
assessmentUserSignature: string;
|
||||
/** 被考核单位人员签字 **/
|
||||
byAssessmentEnterprisesUnitUserSignature: string;
|
||||
/** 考核备注 **/
|
||||
remark: string;
|
||||
/** 总扣分 **/
|
||||
deductionPointsTotal: number;
|
||||
}
|
||||
|
||||
|
||||
export interface AssessmentRecordPagerQueryParams {
|
||||
type: string
|
||||
}
|
||||
|
||||
export interface DeductedDetailRes {
|
||||
/*考核分组id */
|
||||
ckGroupId: number;
|
||||
groupRowSpan: number;
|
||||
/*考核分组名字 */
|
||||
groupName: string;
|
||||
/*考核分组总分 */
|
||||
groupTotalScore: number;
|
||||
/*考核分组备注 */
|
||||
groupRemark: string;
|
||||
/*考核项id */
|
||||
ckItemId: number;
|
||||
itemRowSpan: number;
|
||||
/*考核项名字 */
|
||||
itemName: string;
|
||||
/*组件类型,可用值:RADIO,MULTIPLE */
|
||||
itemType: BaseEnum<string>;
|
||||
/*考核项备注 */
|
||||
itemRemark: string;
|
||||
/*考核标准id */
|
||||
ckStandardId: number;
|
||||
/*考核标准 */
|
||||
standardName: string;
|
||||
/*扣分数 */
|
||||
deductionPoints: Record<string, unknown>;
|
||||
/*是否选中 */
|
||||
isSelected: boolean;
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
import { BaseTableRowRecord } from "@/types/components/table";
|
||||
|
||||
export interface PoliceUnitPagerQueryParams {
|
||||
/** 名称 **/
|
||||
name?: string;
|
||||
/** 代码 **/
|
||||
code?: string;
|
||||
/** 行政区划 **/
|
||||
administrativeDivisionCodes?: string[];
|
||||
/** 是否启用 **/
|
||||
isEnable?: BaseEnum<number>;
|
||||
/** 审核状态 **/
|
||||
checkStatus?: BaseEnum<number>;
|
||||
}
|
||||
|
||||
export interface PoliceUnitPagerVo extends BaseTableRowRecord {
|
||||
/** 名称 **/
|
||||
name?: string;
|
||||
/** 代码 **/
|
||||
code?: string;
|
||||
/** 省编码 **/
|
||||
province?: string;
|
||||
/** 省名字 **/
|
||||
provinceName?: string;
|
||||
/** 市编码 **/
|
||||
city?: string;
|
||||
/** 市名字 **/
|
||||
cityName?: string;
|
||||
/** 区/县编码 **/
|
||||
districts?: string;
|
||||
/** 区/县名字 **/
|
||||
districtsName?: string;
|
||||
/** 街道编码 **/
|
||||
street?: string;
|
||||
/** 街道编码 **/
|
||||
streetName?: string;
|
||||
/** 详细地址 **/
|
||||
address?: string;
|
||||
/** 联系人 **/
|
||||
contactPersonInfo?: {
|
||||
name: string;
|
||||
telephone: string;
|
||||
};
|
||||
/** 是否启用 **/
|
||||
isEnable?: BaseEnum<number>;
|
||||
/** 审核状态 **/
|
||||
checkStatus?: BaseEnum<number>;
|
||||
}
|
||||
|
||||
export interface EnterprisesUnitPagerQueryParams {
|
||||
/** 公安单位id **/
|
||||
policeUnitId: string;
|
||||
}
|
||||
|
||||
export interface EnterprisesUnitPagerVo extends BaseTableRowRecord {
|
||||
/** 名字 **/
|
||||
name?: string;
|
||||
type: BaseEnum<string>
|
||||
/** 公安单位id **/
|
||||
policeUnitId: string;
|
||||
/** 省编码 **/
|
||||
province?: string;
|
||||
/** 省名称 **/
|
||||
provinceName?: string;
|
||||
/** 市编码 **/
|
||||
city?: string;
|
||||
/** 市名称 **/
|
||||
cityName?: string;
|
||||
/** 区编码 **/
|
||||
districts?: string;
|
||||
/** 区名称 **/
|
||||
districtsName?: string;
|
||||
/** 街编码 **/
|
||||
street?: string;
|
||||
/** 街名称 **/
|
||||
streetName?: string;
|
||||
/** 地址 **/
|
||||
address?: string;
|
||||
point: [number, number]
|
||||
/** 联系方式 **/
|
||||
contactPersonInfo?: {
|
||||
name: string;
|
||||
telephone: string;
|
||||
};
|
||||
/** 备注 **/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface EnterprisesUnitSaveOrUpdateParams {
|
||||
/** id **/
|
||||
snowFlakeId?: string;
|
||||
/** 公安单位id **/
|
||||
policeUnitId: string;
|
||||
/** 名称 **/
|
||||
name: string;
|
||||
/** 类型 **/
|
||||
type: string;
|
||||
/** 行政区划编码 **/
|
||||
administrativeDivisionCodes: string[];
|
||||
/** 详细地址 **/
|
||||
address?: string;
|
||||
point?: [number, number]
|
||||
/** 联系人 **/
|
||||
contactPersonInfo?: {
|
||||
name: string;
|
||||
telephone: string;
|
||||
};
|
||||
/** 备注 **/
|
||||
remark?: string;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
import AMapLoader from "@amap/amap-jsapi-loader";
|
||||
import { MapPlugins } from "@/types/components/map";
|
||||
import { MapPlugins } from "@/types/components/map/index";
|
||||
|
||||
export const initMap = (plugins?: MapPlugins[]): Promise<typeof AMap> => new Promise((resolve, reject) => {
|
||||
//@ts-ignore
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
import api from "@/axios";
|
||||
import {AssessmentRecordPagerVo, DeductedDetailRes} from "@/types/views/assessmentRecord.ts";
|
||||
import {ColumnsType} from "ant-design-vue/es/table";
|
||||
import {Modal, Table} from "ant-design-vue";
|
||||
|
||||
export const deductedDetail = async (assessmentRecord: AssessmentRecordPagerVo) => {
|
||||
const {data} = await api.get<DeductedDetailRes[]>('/assessmentRecord/deductedDetail', {assessmentRecordId: assessmentRecord.snowFlakeId})
|
||||
const groupRowSpan: Record<string, { firstIndex: number, count: number }> = {}
|
||||
const itemRowSpan: Record<string, { firstIndex: number, count: number }> = {}
|
||||
|
||||
data.forEach((item, index) => {
|
||||
//如果第一次没有值
|
||||
if (item.ckGroupId) {
|
||||
if (!groupRowSpan[item.ckGroupId]) {
|
||||
groupRowSpan[item.ckGroupId] = {count: 1, firstIndex: index}
|
||||
} else {
|
||||
groupRowSpan[item.ckGroupId].count++;
|
||||
data[index].groupRowSpan = 0
|
||||
}
|
||||
}
|
||||
|
||||
if (item.ckItemId) {
|
||||
if (!itemRowSpan[item.ckItemId]) {
|
||||
itemRowSpan[item.ckItemId] = {count: 1, firstIndex: index}
|
||||
} else {
|
||||
itemRowSpan[item.ckItemId].count++;
|
||||
data[index].itemRowSpan = 0
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Object.values(groupRowSpan).forEach(({count, firstIndex}) => {
|
||||
data[firstIndex].groupRowSpan = count;
|
||||
})
|
||||
|
||||
Object.values(itemRowSpan).forEach(({count, firstIndex}) => {
|
||||
data[firstIndex].itemRowSpan = count;
|
||||
})
|
||||
|
||||
const ckProjectDetailTableColumns: ColumnsType<DeductedDetailRes> = [
|
||||
{
|
||||
dataIndex: 'groupName',
|
||||
title: '考核分组',
|
||||
customCell: (_record) => {
|
||||
return {
|
||||
rowspan: _record.groupRowSpan
|
||||
}
|
||||
},
|
||||
customRender: ({record: _record}) => {
|
||||
return <div>
|
||||
<p>{_record.groupName}({_record.groupTotalScore})</p>
|
||||
<p>{_record.groupRemark}</p>
|
||||
</div>
|
||||
}
|
||||
}, {
|
||||
dataIndex: 'itemName',
|
||||
title: '考核项',
|
||||
customCell: (_record) => {
|
||||
return {
|
||||
rowspan: _record.itemRowSpan
|
||||
}
|
||||
},
|
||||
customRender: ({record: _record}) => {
|
||||
if (!_record.ckItemId) {
|
||||
return '/'
|
||||
}
|
||||
return <div>
|
||||
<p>{_record.itemName}({_record.itemType?.label})
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
}, {
|
||||
dataIndex: 'standardName',
|
||||
title: '标准',
|
||||
customRender: ({record: _record}) => {
|
||||
if (!_record.ckStandardId) {
|
||||
return '/'
|
||||
}
|
||||
return <div>
|
||||
<p style={{color: _record.isSelected ? 'red' : ''}}>{_record.standardName}扣{_record.deductionPoints}分</p>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Modal.info({
|
||||
title: `【${assessmentRecord.enterprisesUnitName}/${assessmentRecord.ckProjectName}】扣分详情`,
|
||||
icon: ' ',
|
||||
width: '80%',
|
||||
centered: true,
|
||||
content: () => <div style={{height: '80vh', overflow: 'auto'}}>
|
||||
<Table
|
||||
size="small"
|
||||
bordered
|
||||
pagination={false}
|
||||
class="margin-top-xs"
|
||||
columns={ckProjectDetailTableColumns}
|
||||
data-source={data}
|
||||
></Table>
|
||||
</div>
|
||||
})
|
||||
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
<template>
|
||||
<div>
|
||||
<TableProMax ref="tableRef" :request-api="reqApi" :columns="columns">
|
||||
</TableProMax>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx">
|
||||
import TableProMax from "@/components/table/TableProMax.vue";
|
||||
import api from "@/axios";
|
||||
import {TableProMaxProps} from "@/types/components/table";
|
||||
import {
|
||||
AssessmentRecordPagerQueryParams,
|
||||
AssessmentRecordPagerVo,
|
||||
} from "@/types/views/assessmentRecord.ts";
|
||||
import {ComponentExposed} from "vue-component-type-helpers";
|
||||
import { ref} from "vue";
|
||||
import {Modal} from "ant-design-vue";
|
||||
import {deductedDetail} from "@/views/query/assessmentIndex.tsx";
|
||||
const tableRef = ref<ComponentExposed<typeof TableProMax>>(null!)
|
||||
type TableProps = TableProMaxProps<AssessmentRecordPagerVo,AssessmentRecordPagerQueryParams>
|
||||
const reqApi: TableProps['requestApi'] = (params) => api.post('/assessmentRecord/pager', params) //分页
|
||||
const columns: TableProps['columns'] = [
|
||||
{
|
||||
dataIndex: 'enterprisesUnitName',
|
||||
title: '单位名称'
|
||||
}, {
|
||||
dataIndex: 'type',
|
||||
title: '类型',
|
||||
customRender: ({text}) => text?.label
|
||||
}, {
|
||||
dataIndex: 'ckProjectName',
|
||||
title: '考核项目'
|
||||
}, {
|
||||
dataIndex: 'totalScore',
|
||||
title: '总分'
|
||||
}, {
|
||||
dataIndex: 'deductionPointsTotal',
|
||||
title: '扣分',
|
||||
customRender:({record})=>{
|
||||
if (!record.deductionPointsTotal) {
|
||||
return <a-tag color="green">0</a-tag>
|
||||
}
|
||||
return <a-tag class="pointer" color="red" onClick={()=>deductedDetail(record)}>{record.deductionPointsTotal}</a-tag>
|
||||
}
|
||||
}, {
|
||||
dataIndex: 'result',
|
||||
title: '得分',
|
||||
customRender: ({record}) => record.totalScore - record.deductionPointsTotal
|
||||
}, {
|
||||
dataIndex: 'policeUnitName',
|
||||
title: '考核单位'
|
||||
}, {
|
||||
dataIndex: 'createUserName',
|
||||
title: '考核人'
|
||||
}, {
|
||||
dataIndex: 'createTime',
|
||||
title: '考核时间'
|
||||
}, {
|
||||
dataIndex: 'remark',
|
||||
title: '考核备注'
|
||||
}, {
|
||||
dataIndex: 'signature',
|
||||
title: '签字',
|
||||
customRender:({record})=>{
|
||||
return <a-button onClick={()=>{
|
||||
Modal.info({
|
||||
title: `${record.enterprisesUnitName}${record.ckProjectName} 签字结果`,
|
||||
content: () => <>
|
||||
<div>审核人签字: <a-image src={record.assessmentUserSignature}/>
|
||||
</div>
|
||||
<div>被审核单位人员签字: <a-image src={record.byAssessmentEnterprisesUnitUserSignature}/></div>
|
||||
</>
|
||||
})
|
||||
}}>查看</a-button>
|
||||
},
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
|
@ -0,0 +1,148 @@
|
|||
<template>
|
||||
<div>
|
||||
<TableProMax ref="tableRef" :request-api="reqApi" :columns="columns">
|
||||
</TableProMax>
|
||||
<div>
|
||||
<a-modal v-model:open="open" title="扣分项" @ok="open = false" width="80%">
|
||||
<a-table :columns="TableColumns" :data-source="dataSource" :pagination="false" bordered>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'itemName'">
|
||||
<ul>
|
||||
<li v-for="(item, index) in record.itemName" :key="index">
|
||||
{{ item.itemName }}
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
<template v-if="column.key === 'deductionStandards'">
|
||||
<ul>
|
||||
<li v-for="(item, index) in record.itemName" :key="index">
|
||||
<ul>
|
||||
<li v-for="(standard, standardIndex) in item.standards" :key="standardIndex">
|
||||
{{ standard.standardName }}
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-modal>>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx">
|
||||
|
||||
import TableProMax from "@/components/table/TableProMax.vue";
|
||||
import api from "@/axios";
|
||||
import {TableProMaxProps} from "@/types/components/table";
|
||||
import {
|
||||
AssessmentRecordPagerQueryParams,
|
||||
AssessmentRecordPagerVo,
|
||||
} from "@/types/views/assessmentRecord.ts";
|
||||
import {ComponentExposed} from "vue-component-type-helpers";
|
||||
import {computed, ref} from "vue";
|
||||
import {Modal} from "ant-design-vue";
|
||||
const tableRef = ref<ComponentExposed<typeof TableProMax>>(null!)
|
||||
type TableProps = TableProMaxProps<AssessmentRecordPagerVo,AssessmentRecordPagerQueryParams>
|
||||
|
||||
const open = ref<boolean>(false);
|
||||
const reqApi: TableProps['requestApi'] = (params) => api.post('/assessmentRecord/pager', params) //分页
|
||||
const columns: TableProps['columns'] = [
|
||||
{
|
||||
dataIndex: 'enterprisesUnitName',
|
||||
title: '单位名称'
|
||||
}, {
|
||||
dataIndex: 'type',
|
||||
title: '类型',
|
||||
customRender: ({text}) => text?.label
|
||||
}, {
|
||||
dataIndex: 'ckProjectName',
|
||||
title: '考核项目'
|
||||
}, {
|
||||
dataIndex: 'totalScore',
|
||||
title: '总分'
|
||||
}, {
|
||||
dataIndex: 'deductionPointsTotal',
|
||||
title: '扣分',
|
||||
customRender:({record})=>{
|
||||
if (!record.deductionPointsTotal) {
|
||||
return <a-tag color="green">0</a-tag>
|
||||
}
|
||||
return <a-tag class="pointer" color="red" onClick={()=>deductionPointsTotalTable(record)}>{record.deductionPointsTotal}</a-tag>
|
||||
}
|
||||
}, {
|
||||
dataIndex: 'result',
|
||||
title: '得分',
|
||||
customRender: ({record}) => record.totalScore - record.deductionPointsTotal
|
||||
}, {
|
||||
dataIndex: 'policeUnitName',
|
||||
title: '考核单位'
|
||||
}, {
|
||||
dataIndex: 'createUserName',
|
||||
title: '考核人'
|
||||
}, {
|
||||
dataIndex: 'createTime',
|
||||
title: '考核时间'
|
||||
}, {
|
||||
dataIndex: 'remark',
|
||||
title: '考核备注'
|
||||
}, {
|
||||
dataIndex: 'signature',
|
||||
title: '签字',
|
||||
customRender:({record})=>{
|
||||
return <a-button onClick={()=>{
|
||||
Modal.info({
|
||||
title: `${record.enterprisesUnitName}${record.ckProjectName} 签字结果`,
|
||||
content: () => <>
|
||||
<div>审核人签字: <a-image src={record.assessmentUserSignature}/>
|
||||
</div>
|
||||
<div>被审核单位人员签字: <a-image src={record.byAssessmentEnterprisesUnitUserSignature}/></div>
|
||||
</>
|
||||
})
|
||||
}}>查看</a-button>
|
||||
},
|
||||
}
|
||||
]
|
||||
const groupRow = ref({})
|
||||
const TableColumns = [
|
||||
{ title: '考核分组', dataIndex: 'groupName', key: 'groupName' },
|
||||
{ title: '考核项', dataIndex: 'itemName', key: 'itemName', slots: { customRender: 'bodyCell' } },
|
||||
{ title: '扣分标准', dataIndex: 'deductionStandards', key: 'deductionStandards', slots: { customRender: 'bodyCell' } }
|
||||
];
|
||||
|
||||
const dataSource = computed(() => {
|
||||
return Object.keys(groupRow.value).map(groupName => ({
|
||||
key: groupName,
|
||||
groupName: groupName,
|
||||
itemName: Object.values(groupRow.value[groupName])
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
const deductionPointsTotalTable =async(record:AssessmentRecordPagerVo)=>{
|
||||
const resp = await api.get('/assessmentRecord/deductedDetail',{assessmentRecordId:record.snowFlakeId})
|
||||
resp.data.forEach((item,index)=>{
|
||||
if (!groupRow.value[item.groupName]) {
|
||||
groupRow.value[item.groupName] = {};
|
||||
}
|
||||
if (!groupRow.value[item.groupName][item.ckItemId]) {
|
||||
groupRow.value[item.groupName][item.ckItemId] = {
|
||||
itemName: item.itemName,
|
||||
standards: []
|
||||
};
|
||||
}
|
||||
groupRow.value[item.groupName][item.ckItemId].standards.push(item);
|
||||
})
|
||||
open.value = true
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
|
@ -24,7 +24,7 @@ const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => {
|
|||
const _mapRef = ref<ComponentExposed<typeof MapContainer>>(null)
|
||||
const _formParams = ref<_FormType>({ ...params })
|
||||
|
||||
let city = ''
|
||||
let city = '全国'
|
||||
const initMarker = (map: AMap.Map) => {
|
||||
//添加maker点 设置point
|
||||
const maker = new AMap.Marker({
|
||||
|
@ -47,6 +47,7 @@ const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => {
|
|||
required: true,
|
||||
customRender: () => {
|
||||
return (
|
||||
// AutoComplete 自动完成 组件
|
||||
<AutoComplete
|
||||
v-model:value={_formParams.value.name}
|
||||
options={autoAddress.value}
|
||||
|
@ -56,14 +57,18 @@ const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => {
|
|||
initMarker(_mapRef.value?.mapInstance)
|
||||
}}
|
||||
onSearch={debounce((val: string) => {
|
||||
console.log('onSearch___________________', val)
|
||||
|
||||
//@ts-ignore
|
||||
const auto = new AMap.AutoComplete({
|
||||
city: city,
|
||||
input: 'tipinput',
|
||||
// input: 'tipinput',
|
||||
citylimit: true,
|
||||
})
|
||||
auto.search(val, (status, result) => {
|
||||
console.log('🚀 ~ auto.search ~ status, result:', status, result)
|
||||
if (status === 'complete') {
|
||||
// 生成组件需要数据
|
||||
autoAddress.value = result.tips?.map((e) => {
|
||||
return {
|
||||
value: e.name,
|
||||
|
@ -125,7 +130,7 @@ const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => {
|
|||
customRender: () => (
|
||||
<MapContainer
|
||||
ref={_mapRef}
|
||||
plugins={['AMap.AutoComplete']}
|
||||
plugins={['AMap.AutoComplete', 'AMap.PlaceSearch']}
|
||||
style={{ width: '100%', height: '300px', position: 'relative' }}
|
||||
initCallback={(map) => {
|
||||
const contextMenu = new AMap.ContextMenu()
|
||||
|
|
|
@ -26,7 +26,6 @@ import { publicUnitPagerQueryParams, FromItem } from '@/types/views/publicUnit.t
|
|||
// import FormProMax from '@/components/form/FormProMax.vue'
|
||||
import { FormProMaxItemOptions } from '@/types/components/form//index.ts'
|
||||
import { FormExpose } from 'ant-design-vue/es/form/Form'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { showEnterprisesUnit } from './index'
|
||||
const formRef = ref<FormExpose>(null)
|
||||
type TableProps = TableProMaxProps<publicUnitPagerQueryParams>
|
||||
|
|
|
@ -54,9 +54,9 @@ interface ImportMetaEnv {
|
|||
readonly VITE_APP_RSA_PUBLIC_KEY: string;
|
||||
|
||||
// 高德
|
||||
readonly VITE_APP_GAODE_KEY: string
|
||||
readonly VITE_APP_GAODE_VERSION: string
|
||||
readonly VITE_APP_SECURITY_JS_CODE: string
|
||||
VITE_APP_GAODE_KEY: string
|
||||
VITE_APP_GAODE_VERSION: string
|
||||
VITE_APP_SECURITY_JS_CODE: string
|
||||
}
|
||||
|
||||
declare module '*.vue' {
|
||||
|
|
Loading…
Reference in New Issue