diff --git a/policeManagement/components.d.ts b/policeManagement/components.d.ts index a4445cc..f757bec 100644 --- a/policeManagement/components.d.ts +++ b/policeManagement/components.d.ts @@ -20,6 +20,7 @@ declare module 'vue' { ADropdown: typeof import('ant-design-vue/es')['Dropdown'] AForm: typeof import('ant-design-vue/es')['Form'] AFormItem: typeof import('ant-design-vue/es')['FormItem'] + AImage: typeof import('ant-design-vue/es')['Image'] AInput: typeof import('ant-design-vue/es')['Input'] AInputNumber: typeof import('ant-design-vue/es')['InputNumber'] AInputPassword: typeof import('ant-design-vue/es')['InputPassword'] diff --git a/policeManagement/src/router/staticRouters.ts b/policeManagement/src/router/staticRouters.ts index 45b703d..b8de99d 100644 --- a/policeManagement/src/router/staticRouters.ts +++ b/policeManagement/src/router/staticRouters.ts @@ -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', diff --git a/policeManagement/src/types/views/assessmentRecord.ts b/policeManagement/src/types/views/assessmentRecord.ts new file mode 100644 index 0000000..2353e8d --- /dev/null +++ b/policeManagement/src/types/views/assessmentRecord.ts @@ -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; + /** 考核项目备注 **/ + 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; + /*考核项备注 */ + itemRemark: string; + /*考核标准id */ + ckStandardId: number; + /*考核标准 */ + standardName: string; + /*扣分数 */ + deductionPoints: Record; + /*是否选中 */ + isSelected: boolean; +} diff --git a/policeManagement/src/views/query/assessmentIndex.tsx b/policeManagement/src/views/query/assessmentIndex.tsx new file mode 100644 index 0000000..547b057 --- /dev/null +++ b/policeManagement/src/views/query/assessmentIndex.tsx @@ -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('/assessmentRecord/deductedDetail', {assessmentRecordId: assessmentRecord.snowFlakeId}) + const groupRowSpan: Record = {} + const itemRowSpan: Record = {} + + 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 = [ + { + dataIndex: 'groupName', + title: '考核分组', + customCell: (_record) => { + return { + rowspan: _record.groupRowSpan + } + }, + customRender: ({record: _record}) => { + return
+

{_record.groupName}({_record.groupTotalScore})

+

{_record.groupRemark}

+
+ } + }, { + dataIndex: 'itemName', + title: '考核项', + customCell: (_record) => { + return { + rowspan: _record.itemRowSpan + } + }, + customRender: ({record: _record}) => { + if (!_record.ckItemId) { + return '/' + } + return
+

{_record.itemName}({_record.itemType?.label}) +

+
+ } + }, { + dataIndex: 'standardName', + title: '标准', + customRender: ({record: _record}) => { + if (!_record.ckStandardId) { + return '/' + } + return
+

{_record.standardName}扣{_record.deductionPoints}分

+
+ } + } + ] + + Modal.info({ + title: `【${assessmentRecord.enterprisesUnitName}/${assessmentRecord.ckProjectName}】扣分详情`, + icon: ' ', + width: '80%', + centered: true, + content: () =>
+
+
+ }) + +} diff --git a/policeManagement/src/views/query/assessmentRecord.vue b/policeManagement/src/views/query/assessmentRecord.vue new file mode 100644 index 0000000..ba22966 --- /dev/null +++ b/policeManagement/src/views/query/assessmentRecord.vue @@ -0,0 +1,93 @@ + + + + + \ No newline at end of file diff --git a/policeManagement/src/views/query/assessmentRecord.vue.bak b/policeManagement/src/views/query/assessmentRecord.vue.bak new file mode 100644 index 0000000..3fc71eb --- /dev/null +++ b/policeManagement/src/views/query/assessmentRecord.vue.bak @@ -0,0 +1,148 @@ + + + + + \ No newline at end of file diff --git a/policeManagement/src/views/query/publicUnit.vue b/policeManagement/src/views/query/publicUnit.vue index 3093cef..ce3647e 100644 --- a/policeManagement/src/views/query/publicUnit.vue +++ b/policeManagement/src/views/query/publicUnit.vue @@ -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(null) type TableProps = TableProMaxProps