Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
9f316137c0
|
@ -53,6 +53,7 @@ declare module 'vue' {
|
|||
IconFont: typeof import('./src/components/iconfont/IconFont.vue')['default']
|
||||
Layout: typeof import('./src/components/layout/layout.vue')['default']
|
||||
LayoutHeader: typeof import('./src/components/layout/header/LayoutHeader.vue')['default']
|
||||
MapContainer: typeof import('./src/components/aMap/MapContainer.vue')['default']
|
||||
MenuItem: typeof import('./src/components/layout/MenuItem.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
declare module '*.vue' {
|
||||
import type { DefineComponent } from 'vue'
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
||||
const component: DefineComponent<{}, {}, any>
|
||||
export default component
|
||||
}
|
|
@ -8,6 +8,8 @@
|
|||
"name": "supermanagement",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||
"@vueuse/core": "^11.2.0",
|
||||
"ant-design-vue": "^4.2.3",
|
||||
"axios": "^1.7.5",
|
||||
"jsencrypt": "^3.3.2",
|
||||
|
@ -47,6 +49,12 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/@amap/amap-jsapi-loader": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz",
|
||||
"integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@ampproject/remapping": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
|
||||
|
@ -1270,6 +1278,12 @@
|
|||
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz",
|
||||
"integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw=="
|
||||
},
|
||||
"node_modules/@types/web-bluetooth": {
|
||||
"version": "0.0.20",
|
||||
"resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz",
|
||||
"integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@vitejs/plugin-vue": {
|
||||
"version": "5.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.3.tgz",
|
||||
|
@ -1530,6 +1544,42 @@
|
|||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.3.tgz",
|
||||
"integrity": "sha512-Jp2v8nylKBT+PlOUjun2Wp/f++TfJVFjshLzNtJDdmFJabJa7noGMncqXRM1vXGX+Yo2V7WykQFNxusSim8SCA=="
|
||||
},
|
||||
"node_modules/@vueuse/core": {
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-11.2.0.tgz",
|
||||
"integrity": "sha512-JIUwRcOqOWzcdu1dGlfW04kaJhW3EXnnjJJfLTtddJanymTL7lF1C0+dVVZ/siLfc73mWn+cGP1PE1PKPruRSA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/web-bluetooth": "^0.0.20",
|
||||
"@vueuse/metadata": "11.2.0",
|
||||
"@vueuse/shared": "11.2.0",
|
||||
"vue-demi": ">=0.14.10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
}
|
||||
},
|
||||
"node_modules/@vueuse/metadata": {
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-11.2.0.tgz",
|
||||
"integrity": "sha512-L0ZmtRmNx+ZW95DmrgD6vn484gSpVeRbgpWevFKXwqqQxW9hnSi2Ppuh2BzMjnbv4aJRiIw8tQatXT9uOB23dQ==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
}
|
||||
},
|
||||
"node_modules/@vueuse/shared": {
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-11.2.0.tgz",
|
||||
"integrity": "sha512-VxFjie0EanOudYSgMErxXfq6fo8vhr5ICI+BuE3I9FnX7ePllEsVrRQ7O6Q1TLgApeLuPKcHQxAXpP+KnlrJsg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"vue-demi": ">=0.14.10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
}
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.12.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||
"@vueuse/core": "^11.2.0",
|
||||
"ant-design-vue": "^4.2.3",
|
||||
"axios": "^1.7.5",
|
||||
"jsencrypt": "^3.3.2",
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
<template>
|
||||
<div :id="mapId" class="mapContainer">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, onUnmounted, shallowRef } from 'vue'
|
||||
import { initMap } from '@/utils/aMapUtil'
|
||||
import { MapContainerProps, MapPlugins } from '@/types/components/map'
|
||||
|
||||
const props = withDefaults(defineProps<MapContainerProps>(), {
|
||||
plugins: (): MapPlugins[] => {
|
||||
return []
|
||||
},
|
||||
mapOptions: (): AMap.MapOptions => {
|
||||
return {
|
||||
// 是否为3D地图模式
|
||||
viewMode: '3D',
|
||||
// 初始化地图级别
|
||||
zoom: 11,
|
||||
mapStyle: 'amap://styles/darkblue',
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
const mapId = 'mapContainer'
|
||||
const map = shallowRef<AMap.Map>(null)
|
||||
|
||||
defineExpose({
|
||||
mapInstance: map,
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
initMap(props.plugins).then((AMap) => {
|
||||
map.value = new AMap.Map(mapId, props.mapOptions)
|
||||
props.initCallback && props.initCallback(map.value)
|
||||
})
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
map.value?.destroy()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
#mapContainer {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
|
@ -1,3 +1,5 @@
|
|||
|
||||
// global.d.ts不能出现 export 关键字否则这个文件会失效
|
||||
declare const __APP_ENV: ImportMetaEnv;
|
||||
class TreeNodeVo<T, E = Record<string, any>> {
|
||||
value: T;
|
||||
|
@ -18,7 +20,7 @@ interface JsonResult<T> {
|
|||
}
|
||||
|
||||
|
||||
export interface SecurityUnitPagerQueryParams {
|
||||
interface SecurityUnitPagerQueryParams {
|
||||
/** 名称 **/
|
||||
name?: string;
|
||||
/** 社会编码 **/
|
||||
|
@ -34,14 +36,7 @@ interface BaseEnum<T> {
|
|||
value: T;
|
||||
label: string
|
||||
}
|
||||
class TreeNodeVo<T, E = Record<string, any>> {
|
||||
value: T;
|
||||
parentValue: T;
|
||||
label: string;
|
||||
orderIndex?: number;
|
||||
children?: TreeNodeVo<T>[]
|
||||
extData?: E;
|
||||
}
|
||||
|
||||
interface Grid {
|
||||
//栅格占据的列数
|
||||
span?: number;
|
|
@ -0,0 +1,18 @@
|
|||
import AMapLoader from "@amap/amap-jsapi-loader";
|
||||
import { MapPlugins } from "@/types/components/map";
|
||||
|
||||
export const initMap = (plugins?: MapPlugins[]): Promise<typeof AMap> => new Promise((resolve, reject) => {
|
||||
//@ts-ignore
|
||||
window._AMapSecurityConfig = {
|
||||
securityJsCode: __APP_ENV.VITE_APP_SECURITY_JS_CODE
|
||||
}
|
||||
AMapLoader.load({
|
||||
key: __APP_ENV.VITE_APP_GAODE_KEY,
|
||||
version: __APP_ENV.VITE_APP_GAODE_VERSION,
|
||||
plugins
|
||||
}).then((aMap: typeof AMap) => {
|
||||
resolve(aMap)
|
||||
}).catch(err => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
|
@ -0,0 +1,326 @@
|
|||
import { TableProMaxProps, TableProMaxSlots } from '@/types/components/table'
|
||||
import { EnterprisesUnitPagerQueryParams, EnterprisesUnitPagerVo, EnterprisesUnitSaveOrUpdateParams, PoliceUnitPagerVo } from '@/types/views/unitManage/police/policeUnit.ts'
|
||||
import { ref } from 'vue'
|
||||
import { FormExpose } from 'ant-design-vue/es/form/Form'
|
||||
import { ComponentExposed } from 'vue-component-type-helpers'
|
||||
import MapContainer from '@/components/aMap/MapContainer.vue'
|
||||
import { FormProMaxItemOptions } from '@/types/components/form'
|
||||
import { dictSelectNodes } from '@/config/dict.ts'
|
||||
import { AutoComplete, Button, Input, message, Modal, Space } from 'ant-design-vue'
|
||||
import api from '@/axios'
|
||||
import TableProMax from '@/components/table/TableProMax.vue'
|
||||
import { deleteDataModal } from '@/components/tsx/ModalPro.tsx'
|
||||
import { PageParams } from '@/types/hooks/useTableProMax.ts'
|
||||
import FormProMax from '@/components/form/FormProMax.vue'
|
||||
import { debounce } from 'lodash-es'
|
||||
|
||||
type _TableProps = TableProMaxProps<EnterprisesUnitPagerVo, EnterprisesUnitPagerQueryParams>
|
||||
type _FormType = EnterprisesUnitSaveOrUpdateParams & {
|
||||
contactPersonInfoName?: string
|
||||
contactPersonInfoTelephone?: string
|
||||
}
|
||||
const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => {
|
||||
const _formRef = ref<FormExpose>(null)
|
||||
const _mapRef = ref<ComponentExposed<typeof MapContainer>>(null)
|
||||
const _formParams = ref<_FormType>({ ...params })
|
||||
|
||||
let city = ''
|
||||
const initMarker = (map: AMap.Map) => {
|
||||
//添加maker点 设置point
|
||||
const maker = new AMap.Marker({
|
||||
position: _formParams.value.point,
|
||||
draggable: true,
|
||||
})
|
||||
maker.on('dragend', ({ lnglat }) => {
|
||||
_formParams.value.point = lnglat
|
||||
})
|
||||
map.clearMap()
|
||||
map.add(maker)
|
||||
map.setFitView()
|
||||
}
|
||||
const autoAddress = ref<SelectNodeVo<string>[]>([])
|
||||
|
||||
const _formOptions = ref<FormProMaxItemOptions<_FormType>>({
|
||||
name: {
|
||||
type: 'custom',
|
||||
label: '单位名称',
|
||||
required: true,
|
||||
customRender: () => {
|
||||
return (
|
||||
<AutoComplete
|
||||
v-model:value={_formParams.value.name}
|
||||
options={autoAddress.value}
|
||||
onSelect={(_, options: SelectNodeVo<string>) => {
|
||||
_formParams.value.point = options.extData?.location
|
||||
_formParams.value.address = options.extData?.address
|
||||
initMarker(_mapRef.value?.mapInstance)
|
||||
}}
|
||||
onSearch={debounce((val: string) => {
|
||||
//@ts-ignore
|
||||
const auto = new AMap.AutoComplete({
|
||||
city: city,
|
||||
input: 'tipinput',
|
||||
citylimit: true,
|
||||
})
|
||||
auto.search(val, (status, result) => {
|
||||
if (status === 'complete') {
|
||||
autoAddress.value = result.tips?.map((e) => {
|
||||
return {
|
||||
value: e.name,
|
||||
label: e.name,
|
||||
extData: {
|
||||
district: e.district,
|
||||
address: e.address,
|
||||
location: e.location,
|
||||
},
|
||||
} as SelectNodeVo<string>
|
||||
})
|
||||
} else {
|
||||
autoAddress.value = []
|
||||
}
|
||||
})
|
||||
}, 300)}
|
||||
v-slots={{
|
||||
option: (item: SelectNodeVo<string>) => {
|
||||
return (
|
||||
<div>
|
||||
<p>{item.label}</p>
|
||||
<p style={{ color: '#9a9c9d' }}>
|
||||
{item.extData?.district} {item.extData?.address}
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Input placeholder='请输入单位名称' />
|
||||
</AutoComplete>
|
||||
)
|
||||
},
|
||||
},
|
||||
type: {
|
||||
type: 'select',
|
||||
label: '单位类型',
|
||||
required: true,
|
||||
options: dictSelectNodes('EnterprisesUnitType'),
|
||||
},
|
||||
administrativeDivisionCodes: {
|
||||
type: 'administrativeDivisionTree',
|
||||
label: '行政区划',
|
||||
required: true,
|
||||
componentsProps: {
|
||||
displayRender: ({ labels }): string => {
|
||||
city = labels[1]
|
||||
return labels.join(' / ')
|
||||
},
|
||||
},
|
||||
},
|
||||
address: {
|
||||
type: 'inputTextArea',
|
||||
label: '详细地址',
|
||||
},
|
||||
map: {
|
||||
type: 'custom',
|
||||
label: '经纬度',
|
||||
customRender: () => (
|
||||
<MapContainer
|
||||
ref={_mapRef}
|
||||
plugins={['AMap.AutoComplete']}
|
||||
style={{ width: '100%', height: '300px', position: 'relative' }}
|
||||
initCallback={(map) => {
|
||||
const contextMenu = new AMap.ContextMenu()
|
||||
contextMenu.addItem(
|
||||
'标记',
|
||||
() => {
|
||||
const { lng, lat } = contextMenu.getPosition()
|
||||
_formParams.value.point = [lng, lat]
|
||||
initMarker(map)
|
||||
},
|
||||
0
|
||||
)
|
||||
map.on('rightclick', ({ lnglat }) => {
|
||||
contextMenu.open(map, lnglat)
|
||||
})
|
||||
if (_formParams.value.point) {
|
||||
initMarker(map)
|
||||
}
|
||||
}}
|
||||
></MapContainer>
|
||||
),
|
||||
},
|
||||
contactPersonInfoName: {
|
||||
type: 'input',
|
||||
label: '联系人名称',
|
||||
},
|
||||
contactPersonInfoTelephone: {
|
||||
type: 'input',
|
||||
label: '联系人电话',
|
||||
},
|
||||
remark: {
|
||||
type: 'inputTextArea',
|
||||
label: '备注',
|
||||
},
|
||||
})
|
||||
Modal.confirm({
|
||||
title: params.snowFlakeId ? `【${params.name}】 信息编辑` : '新增企事业单位',
|
||||
width: 600,
|
||||
icon: ' ',
|
||||
centered: true,
|
||||
content: () => <FormProMax ref={_formRef} v-model:value={_formParams.value} formItemOptions={_formOptions.value} />,
|
||||
onOk: async () => {
|
||||
await _formRef.value?.validate()
|
||||
const resp = await api.post('/enterprisesUnit/saveOrUpdate', {
|
||||
..._formParams.value,
|
||||
contactPersonInfo: {
|
||||
name: _formParams.value.contactPersonInfoName,
|
||||
telephone: _formParams.value.contactPersonInfoTelephone,
|
||||
},
|
||||
})
|
||||
message.success(resp.message)
|
||||
callback && callback()
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export const showEnterprisesUnit = (policeUnitPagerVo: PoliceUnitPagerVo) => {
|
||||
const _tableRef = ref<ComponentExposed<typeof TableProMax>>(null)
|
||||
const _columns: _TableProps['columns'] = [
|
||||
{
|
||||
dataIndex: 'name',
|
||||
title: '名称',
|
||||
},
|
||||
{
|
||||
dataIndex: 'type',
|
||||
title: '类型',
|
||||
customRender: ({ text }) => text?.label,
|
||||
},
|
||||
{
|
||||
dataIndex: 'contactPersonInfo',
|
||||
title: '联系人',
|
||||
ellipsis: true,
|
||||
customRender: ({ text }) => text?.name + '/' + text.telephone,
|
||||
},
|
||||
{
|
||||
dataIndex: 'province',
|
||||
title: '行政区划',
|
||||
ellipsis: true,
|
||||
customRender: ({ record }) => [record.provinceName, record.cityName, record.districtsName, record.streetName].filter(Boolean).join('/'),
|
||||
},
|
||||
{
|
||||
dataIndex: 'address',
|
||||
title: '详细地址',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
dataIndex: 'remark',
|
||||
title: '备注',
|
||||
},
|
||||
{
|
||||
dataIndex: 'createTime',
|
||||
title: '创建时间',
|
||||
},
|
||||
{
|
||||
dataIndex: 'opt',
|
||||
title: '操作',
|
||||
customRender: ({ record }) => (
|
||||
<Space>
|
||||
<Button
|
||||
class='btn-warn'
|
||||
onClick={() =>
|
||||
saveOrUpdateEnterprisesUnit(
|
||||
{
|
||||
snowFlakeId: record.snowFlakeId,
|
||||
policeUnitId: record.policeUnitId,
|
||||
name: record.name,
|
||||
type: record.type.value,
|
||||
administrativeDivisionCodes: [record.province, record.city, record.districts, record.street].filter(Boolean),
|
||||
address: record.address,
|
||||
point: record.point,
|
||||
contactPersonInfoName: record.contactPersonInfo?.name,
|
||||
contactPersonInfoTelephone: record.contactPersonInfo?.telephone,
|
||||
remark: record.remark,
|
||||
},
|
||||
_tableRef.value?.requestGetTableData
|
||||
)
|
||||
}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
class='btn-danger'
|
||||
onClick={() =>
|
||||
deleteDataModal(record.name, async () => {
|
||||
const resp = await api.delete('/enterprisesUnit/deleteById', {
|
||||
enterprisesUnitId: record.snowFlakeId,
|
||||
})
|
||||
message.success(resp.message)
|
||||
await _tableRef.value?.requestGetTableData()
|
||||
})
|
||||
}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]
|
||||
const _reqApi: _TableProps['requestApi'] = (params) => {
|
||||
;(params as PageParams<EnterprisesUnitPagerQueryParams>).params.policeUnitId = policeUnitPagerVo.snowFlakeId
|
||||
return api.post('/enterprisesUnit/pager', params)
|
||||
}
|
||||
Modal.info({
|
||||
title: `【${policeUnitPagerVo.name}】 管辖企事业单位`,
|
||||
width: '80%',
|
||||
centered: true,
|
||||
maskClosable: true,
|
||||
content: () => (
|
||||
<TableProMax
|
||||
ref={_tableRef}
|
||||
size='small'
|
||||
columns={_columns}
|
||||
requestApi={_reqApi}
|
||||
searchFormOptions={{
|
||||
name: {
|
||||
type: 'input',
|
||||
label: '单位名称',
|
||||
},
|
||||
address: {
|
||||
type: 'input',
|
||||
label: '地址',
|
||||
},
|
||||
remark: {
|
||||
type: 'input',
|
||||
label: '备注',
|
||||
},
|
||||
}}
|
||||
v-slots={
|
||||
{
|
||||
tableHeader: (_) => {
|
||||
return (
|
||||
<Space>
|
||||
<Button
|
||||
class='btn-success'
|
||||
onClick={() =>
|
||||
saveOrUpdateEnterprisesUnit(
|
||||
{
|
||||
name: undefined,
|
||||
type: 'party_government',
|
||||
policeUnitId: policeUnitPagerVo.snowFlakeId,
|
||||
administrativeDivisionCodes: [policeUnitPagerVo.province, policeUnitPagerVo.city, policeUnitPagerVo.districts, policeUnitPagerVo.street].filter(Boolean),
|
||||
},
|
||||
_tableRef.value?.requestGetTableData
|
||||
)
|
||||
}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
<Button disabled>导入</Button>
|
||||
</Space>
|
||||
)
|
||||
},
|
||||
} as TableProMaxSlots<PoliceUnitPagerVo>
|
||||
}
|
||||
/>
|
||||
),
|
||||
})
|
||||
}
|
|
@ -27,11 +27,11 @@ import { publicUnitPagerQueryParams, FromItem } from '@/types/views/publicUnit.t
|
|||
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>
|
||||
const tableRef = ref<ComponentExposed<typeof TableProMax>>(null!)
|
||||
const reqApi: TableProps['requestApi'] = (params) => api.post('/management/police/enterprisesUnitPager', params) //分页
|
||||
const reqApi: TableProps['requestApi'] = (params) => api.post('/enterprisesUnit/pager', params) //分页
|
||||
|
||||
const columns: TableProps['columns'] = [
|
||||
{
|
||||
|
@ -90,6 +90,19 @@ const columns: TableProps['columns'] = [
|
|||
dataIndex: 'remark',
|
||||
title: '备注',
|
||||
},
|
||||
{
|
||||
dataIndex: 'opt',
|
||||
title: '操作',
|
||||
customRender({ record }) {
|
||||
return (
|
||||
<a-space>
|
||||
<a-button class='btn-success' onClick={() => showEnterprisesUnit(record)}>
|
||||
企事业单位
|
||||
</a-button>
|
||||
</a-space>
|
||||
)
|
||||
},
|
||||
},
|
||||
]
|
||||
const x: number = columns.reduce((a, b) => a + (b.width as number), 0)
|
||||
const visible = ref(false)
|
||||
|
|
|
@ -1,20 +1,37 @@
|
|||
// /// <reference types="vite/client" />
|
||||
|
||||
// // vue3导入模块报红解决方案——找不到模块“./XXX.vue”或其相应的类型声明
|
||||
// // 报错原因是:typescript 只能理解 .ts 文件,无法理解 .vue文件
|
||||
// // 因此需要给.vue文件加上类型说明文件
|
||||
// declare module '*.vue' {
|
||||
// import type { DefineComponent } from 'vue'
|
||||
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
||||
// const component: DefineComponent<{}, {}, any>
|
||||
// export default component
|
||||
// }
|
||||
|
||||
|
||||
// declare module 'lodash-es' {
|
||||
// import { includes, isEmpty, ceil, divide } from 'lodash';
|
||||
// export { includes, isEmpty, ceil, divide };
|
||||
// }
|
||||
// interface ImportMetaEnv {
|
||||
// // 项目名称
|
||||
// readonly VITE_APP_NAME: string;
|
||||
// // 当前环境
|
||||
// readonly VITE_APP_ENV: 'development' | 'production';
|
||||
// // 启动端口
|
||||
// readonly VITE_APP_PORT: number;
|
||||
|
||||
// // axios
|
||||
// readonly VITE_APP_BASE_API: string;
|
||||
// readonly VITE_APP_PROXY_URL: string;
|
||||
|
||||
// // RSA公钥
|
||||
// readonly VITE_APP_RSA_PUBLIC_KEY: string;
|
||||
// }
|
||||
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
// vue3导入模块报红解决方案——找不到模块“./XXX.vue”或其相应的类型声明
|
||||
// 报错原因是:typescript 只能理解 .ts 文件,无法理解 .vue文件
|
||||
// 因此需要给.vue文件加上类型说明文件
|
||||
declare module '*.vue' {
|
||||
import type { DefineComponent } from 'vue'
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
||||
const component: DefineComponent<{}, {}, any>
|
||||
export default component
|
||||
}
|
||||
|
||||
|
||||
declare module 'lodash-es' {
|
||||
import { includes, isEmpty, ceil, divide } from 'lodash';
|
||||
export { includes, isEmpty, ceil, divide };
|
||||
}
|
||||
interface ImportMetaEnv {
|
||||
// 项目名称
|
||||
readonly VITE_APP_NAME: string;
|
||||
|
@ -22,14 +39,30 @@ interface ImportMetaEnv {
|
|||
readonly VITE_APP_ENV: 'development' | 'production';
|
||||
// 启动端口
|
||||
readonly VITE_APP_PORT: number;
|
||||
// 模块名称
|
||||
readonly VITE_APP_MODULE_NAME: string;
|
||||
|
||||
// axios
|
||||
readonly VITE_APP_BASE_API: string;
|
||||
readonly VITE_APP_PROXY_URL: string;
|
||||
|
||||
// minio
|
||||
readonly VITE_APP_MINIO_URL: string
|
||||
readonly VITE_APP_MINIO_BUCKET: string
|
||||
|
||||
// RSA公钥
|
||||
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
|
||||
}
|
||||
|
||||
declare module '*.vue' {
|
||||
import { DefineComponent, readonly } from "vue"
|
||||
const component: DefineComponent<{}, {}, any>
|
||||
export default component
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,82 +1,88 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"composite": true, // 标记为复合项目的一部分 [ty-reference](1)
|
||||
"target": "ES2020", // 设置目标 JavaScript 语言标准版本
|
||||
"useDefineForClassFields": true, // 为类字段使用 `defineProperty`,以支持装饰器
|
||||
"module": "ESNext", // 设置模块系统
|
||||
"lib": [ // 指定要包含的类型库
|
||||
"ES2020", // 包含 ES2020 的类型定义
|
||||
"DOM", // 包含 DOM 类型定义
|
||||
"DOM.Iterable" // 包含 DOM 可迭代类型定义
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"module": "ESNext",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable"
|
||||
],
|
||||
"skipLibCheck": true, // 忽略类型库的类型检查
|
||||
"skipLibCheck": true,
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler", // 设置模块解析策略为 bundler 模式
|
||||
"allowImportingTsExtensions": true, // 允许导入 TypeScript 扩展名
|
||||
"isolatedModules": true, // 将每个文件视为一个模块
|
||||
"moduleDetection": "force", // 强制将所有模块视为 ESM
|
||||
"noEmit": false, // 允许发出文件
|
||||
"declaration": true, // 如果需要生成 .d.ts 文件
|
||||
"emitDeclarationOnly": true, // 只发出声明文件,而不生成 JS 文件
|
||||
"jsx": "preserve", // 保留 JSX 节点,不转换
|
||||
"jsxImportSource": "vue", // JSX 元素来自 Vue
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"isolatedModules": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
"jsx": "preserve",
|
||||
"jsxImportSource": "vue",
|
||||
/* Linting */
|
||||
"strict": false, // 开启所有严格类型检查选项
|
||||
"noUnusedLocals": true, // 报告未使用的局部变量
|
||||
"noUnusedParameters": true, // 报告未使用的参数
|
||||
"noFallthroughCasesInSwitch": true, // 报告 switch 语句中的 fallthrough 错误
|
||||
"baseUrl": "./", // 设置基础模块解析目录
|
||||
"strict": false,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"baseUrl": "./",
|
||||
/* 配置别名 */
|
||||
"paths": { // 设置路径映射
|
||||
"@/*": [ // 将 @/ 映射到 src/ 目录
|
||||
"./src/*"
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"allowSyntheticDefaultImports": true // 允许默认导入
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": [ // 指定包含的文件
|
||||
"src/**/*.ts", // 包括 src 目录下的所有 TypeScript 文件
|
||||
"src/**/*.d.ts", // 包括 src 目录下的所有类型声明文件
|
||||
"src/**/*.tsx", // 包括 src 目录下的所有 JSX 文件
|
||||
"src/**/*.vue", // 包括 src 目录下的所有 Vue 文件
|
||||
"global.d.ts"
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.d.ts",
|
||||
"src/**/*.tsx",
|
||||
"src/**/*.vue"
|
||||
]
|
||||
}
|
||||
// // 脚手架自带 配置:
|
||||
|
||||
|
||||
|
||||
|
||||
// {
|
||||
// "compilerOptions": {
|
||||
// "target": "ES2020",
|
||||
// "useDefineForClassFields": true,
|
||||
// "module": "ESNext",
|
||||
// "lib": [
|
||||
// "ES2020",
|
||||
// "DOM",
|
||||
// "DOM.Iterable"
|
||||
// "composite": true, // 标记为复合项目的一部分 [ty-reference](1)
|
||||
// "target": "ES2020", // 设置目标 JavaScript 语言标准版本
|
||||
// "useDefineForClassFields": true, // 为类字段使用 `defineProperty`,以支持装饰器
|
||||
// "module": "ESNext", // 设置模块系统
|
||||
// "lib": [ // 指定要包含的类型库
|
||||
// "ES2020", // 包含 ES2020 的类型定义
|
||||
// "DOM", // 包含 DOM 类型定义
|
||||
// "DOM.Iterable" // 包含 DOM 可迭代类型定义
|
||||
// ],
|
||||
// "skipLibCheck": true,
|
||||
// "skipLibCheck": true, // 忽略类型库的类型检查
|
||||
// /* Bundler mode */
|
||||
// "moduleResolution": "bundler",
|
||||
// "allowImportingTsExtensions": true,
|
||||
// "isolatedModules": true,
|
||||
// "moduleDetection": "force",
|
||||
// "noEmit": true,
|
||||
// "jsx": "preserve",
|
||||
// "moduleResolution": "bundler", // 设置模块解析策略为 bundler 模式
|
||||
// "allowImportingTsExtensions": true, // 允许导入 TypeScript 扩展名
|
||||
// "isolatedModules": true, // 将每个文件视为一个模块
|
||||
// "moduleDetection": "force", // 强制将所有模块视为 ESM
|
||||
// "noEmit": false, // 允许发出文件
|
||||
// "declaration": true, // 如果需要生成 .d.ts 文件
|
||||
// "emitDeclarationOnly": true, // 只发出声明文件,而不生成 JS 文件
|
||||
// "jsx": "preserve", // 保留 JSX 节点,不转换
|
||||
// "jsxImportSource": "vue", // JSX 元素来自 Vue
|
||||
// /* Linting */
|
||||
// "strict": true,
|
||||
// "noUnusedLocals": true,
|
||||
// "noUnusedParameters": true,
|
||||
// "noFallthroughCasesInSwitch": true,
|
||||
// "baseUrl": "/",
|
||||
// "strict": false, // 开启所有严格类型检查选项
|
||||
// "noUnusedLocals": true, // 报告未使用的局部变量
|
||||
// "noUnusedParameters": true, // 报告未使用的参数
|
||||
// "noFallthroughCasesInSwitch": true, // 报告 switch 语句中的 fallthrough 错误
|
||||
// "baseUrl": "./", // 设置基础模块解析目录
|
||||
// /* 配置别名 */
|
||||
// "paths": {
|
||||
// "@/*": [
|
||||
// "paths": { // 设置路径映射
|
||||
// "@/*": [ // 将 @/ 映射到 src/ 目录
|
||||
// "./src/*"
|
||||
// ]
|
||||
// },
|
||||
// "allowSyntheticDefaultImports": true // 允许默认导入
|
||||
// },
|
||||
// "include": [
|
||||
// "src/**/*.ts",
|
||||
// "src/**/*.tsx",
|
||||
// "src/**/*.vue"
|
||||
// "include": [ // 指定包含的文件
|
||||
// "src/**/*.ts", // 包括 src 目录下的所有 TypeScript 文件
|
||||
// "src/**/*.d.ts", // 包括 src 目录下的所有类型声明文件
|
||||
// "src/**/*.tsx", // 包括 src 目录下的所有 JSX 文件
|
||||
// "src/**/*.vue", // 包括 src 目录下的所有 Vue 文件
|
||||
// "global.d.ts"
|
||||
// ]
|
||||
// }
|
File diff suppressed because one or more lines are too long
|
@ -1,40 +1,43 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "/", // 确保相对路径从根目录开始
|
||||
"paths": { // 设置路径映射
|
||||
"@/*": [ // 将 @/ 映射到 src/ 目录
|
||||
"./src/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [], // 可以留空,表示不显式指定任何文件
|
||||
"references": [ // 引用其他 tsconfig 文件
|
||||
{
|
||||
"path": "./tsconfig.app.json" // 引用 tsconfig.app.json
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.node.json" // 引用 tsconfig.node.json
|
||||
}
|
||||
],
|
||||
"include": [ // 指定包含的文件
|
||||
"env.d.ts", // 包括环境类型的声明文件
|
||||
"src/vite-env.d.ts", // 包括 Vite 环境类型的声明文件
|
||||
"src/**/*.ts", // 包括 src 目录下的所有 TypeScript 文件
|
||||
"src/**/*.tsx", // 包括 src 目录下的所有 JSX 文件
|
||||
"src/**/*.vue", // 包括 src 目录下的所有 Vue 文件
|
||||
"global.d.ts", // 确保 global.d.ts 文件被包含
|
||||
"vite.config.ts" // Node 配置文件
|
||||
]
|
||||
}
|
||||
// // 脚手架自带 配置:
|
||||
// {
|
||||
// "files": [],
|
||||
// "references": [
|
||||
// "compilerOptions": {
|
||||
// "jsx": "react",
|
||||
// "baseUrl": "/", // 确保相对路径从根目录开始
|
||||
// "paths": { // 设置路径映射
|
||||
// "@/*": [ // 将 @/ 映射到 src/ 目录
|
||||
// "./src/*"
|
||||
// ]
|
||||
// }
|
||||
// },
|
||||
// "files": [], // 可以留空,表示不显式指定任何文件
|
||||
// "references": [ // 引用其他 tsconfig 文件
|
||||
// {
|
||||
// "path": "./tsconfig.app.json"
|
||||
// "path": "./tsconfig.app.json" // 引用 tsconfig.app.json
|
||||
// },
|
||||
// {
|
||||
// "path": "./tsconfig.node.json"
|
||||
// "path": "./tsconfig.node.json" // 引用 tsconfig.node.json
|
||||
// }
|
||||
// ],
|
||||
// "include": [ // 指定包含的文件
|
||||
// "env.d.ts", // 包括环境类型的声明文件
|
||||
// "src/vite-env.d.ts", // 包括 Vite 环境类型的声明文件
|
||||
// "src/**/*.ts", // 包括 src 目录下的所有 TypeScript 文件
|
||||
// "src/**/*.tsx", // 包括 src 目录下的所有 JSX 文件
|
||||
// "src/**/*.vue", // 包括 src 目录下的所有 Vue 文件
|
||||
// "global.d.ts", // 确保 global.d.ts 文件被包含
|
||||
// "vite.config.ts" // Node 配置文件
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// 脚手架自带 配置:
|
||||
{
|
||||
"files": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.app.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.node.json"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,47 +1,47 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"composite": true, // 标记为复合项目的一部分 [ty-reference](1)
|
||||
"target": "ES2022", // 设置目标 JavaScript 语言标准版本
|
||||
"lib": [ // 指定要包含的类型库
|
||||
"ES2023" // 包含 ES2023 的类型定义
|
||||
],
|
||||
"module": "ESNext", // 设置模块系统
|
||||
"skipLibCheck": true, // 忽略类型库的类型检查
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler", // 设置模块解析策略为 bundler 模式
|
||||
"allowImportingTsExtensions": true, // 允许导入 TypeScript 扩展名
|
||||
"isolatedModules": true, // 将每个文件视为一个模块
|
||||
"moduleDetection": "force", // 强制将所有模块视为 ESM
|
||||
"noEmit": false, // 允许发出文件
|
||||
"declaration": true, // 如果需要生成 .d.ts 文件
|
||||
"emitDeclarationOnly": true, // 只发出声明文件,而不生成 JS 文件
|
||||
"strict": true, // 开启所有严格类型检查选项
|
||||
"noUnusedLocals": true, // 报告未使用的局部变量
|
||||
"noUnusedParameters": true, // 报告未使用的参数
|
||||
"noFallthroughCasesInSwitch": true // 报告 switch 语句中的 fallthrough 错误
|
||||
},
|
||||
"include": [ // 指定包含的文件
|
||||
"vite.config.ts" // 包括 Vite 配置文件
|
||||
]
|
||||
}
|
||||
// 脚手架自带 配置:
|
||||
// {
|
||||
// "compilerOptions": {
|
||||
// "target": "ES2022",
|
||||
// "lib": ["ES2023"],
|
||||
// "module": "ESNext",
|
||||
// "skipLibCheck": true,
|
||||
// "composite": true, // 标记为复合项目的一部分 [ty-reference](1)
|
||||
// "target": "ES2022", // 设置目标 JavaScript 语言标准版本
|
||||
// "lib": [ // 指定要包含的类型库
|
||||
// "ES2023" // 包含 ES2023 的类型定义
|
||||
// ],
|
||||
// "module": "ESNext", // 设置模块系统
|
||||
// "skipLibCheck": true, // 忽略类型库的类型检查
|
||||
// /* Bundler mode */
|
||||
// "moduleResolution": "bundler",
|
||||
// "allowImportingTsExtensions": true,
|
||||
// "isolatedModules": true,
|
||||
// "moduleDetection": "force",
|
||||
// "noEmit": true,
|
||||
// /* Linting */
|
||||
// "strict": true,
|
||||
// "noUnusedLocals": true,
|
||||
// "noUnusedParameters": true,
|
||||
// "noFallthroughCasesInSwitch": true
|
||||
// "moduleResolution": "bundler", // 设置模块解析策略为 bundler 模式
|
||||
// "allowImportingTsExtensions": true, // 允许导入 TypeScript 扩展名
|
||||
// "isolatedModules": true, // 将每个文件视为一个模块
|
||||
// "moduleDetection": "force", // 强制将所有模块视为 ESM
|
||||
// "noEmit": false, // 允许发出文件
|
||||
// "declaration": true, // 如果需要生成 .d.ts 文件
|
||||
// "emitDeclarationOnly": true, // 只发出声明文件,而不生成 JS 文件
|
||||
// "strict": true, // 开启所有严格类型检查选项
|
||||
// "noUnusedLocals": true, // 报告未使用的局部变量
|
||||
// "noUnusedParameters": true, // 报告未使用的参数
|
||||
// "noFallthroughCasesInSwitch": true // 报告 switch 语句中的 fallthrough 错误
|
||||
// },
|
||||
// "include": ["vite.config.ts"]
|
||||
// }
|
||||
// "include": [ // 指定包含的文件
|
||||
// "vite.config.ts" // 包括 Vite 配置文件
|
||||
// ]
|
||||
// }
|
||||
// 脚手架自带 配置:
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2023"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"isolatedModules": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -1,2 +0,0 @@
|
|||
declare const _default: import("vite").UserConfigFnObject;
|
||||
export default _default;
|
|
@ -33,8 +33,9 @@ public class OpenController {
|
|||
@Operation(summary = "获取企事业单位列表")
|
||||
@CheckOpenApi(value = OpenApiType.Information_on_enterprises_and_institutions)
|
||||
@GetMapping("/getEnterprisesUnit")
|
||||
public List<SelectNodeVo<Long>> getEnterprisesUnit(@Schema(description = "公安单位机构代码") @RequestParam String policeCode) {
|
||||
return openApiService.getEnterprisesUnit(policeCode);
|
||||
public List<SelectNodeVo<Long>> getEnterprisesUnit(@Schema(description = "代码") @RequestParam String code,
|
||||
@Schema(description = "等级") @RequestParam Integer level) {
|
||||
return openApiService.getEnterprisesUnit(code, level);
|
||||
}
|
||||
|
||||
@Operation(summary = "企事业单位详情")
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package com.changhu.mapper;
|
||||
|
||||
import com.changhu.common.pojo.vo.SelectNodeVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 20252
|
||||
* @createTime 2024/11/15 下午2:27
|
||||
* @desc OpenApiMapper...
|
||||
*/
|
||||
@Mapper
|
||||
public interface OpenApiMapper {
|
||||
|
||||
/**
|
||||
* 根据单位获取企事业单位
|
||||
*
|
||||
* @param code 代码
|
||||
* @param level 等级
|
||||
* @return 企事业单位
|
||||
*/
|
||||
List<SelectNodeVo<Long>> getEnterprisesUnit(@Param("code") String code,
|
||||
@Param("level") Integer level);
|
||||
}
|
|
@ -1,7 +1,9 @@
|
|||
package com.changhu.module.assessmentCriteria.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.changhu.common.annotation.CheckUserType;
|
||||
import com.changhu.common.annotation.JsonBody;
|
||||
import com.changhu.common.db.enums.UserType;
|
||||
import com.changhu.module.assessmentCriteria.pojo.queryParams.AssessmentRecordPagerQueryParams;
|
||||
import com.changhu.module.assessmentCriteria.pojo.vo.AssessmentRecordDetailVo;
|
||||
import com.changhu.module.assessmentCriteria.pojo.vo.AssessmentRecordPagerVo;
|
||||
|
@ -29,12 +31,14 @@ public class AssessmentRecordController {
|
|||
|
||||
@Operation(summary = "考核记录分页")
|
||||
@PostMapping("/pager")
|
||||
@CheckUserType(userTypes = {UserType.MANAGEMENT_POLICE, UserType.MANAGEMENT_SUPER})
|
||||
public Page<AssessmentRecordPagerVo> pager(@RequestBody PageParams<AssessmentRecordPagerQueryParams, AssessmentRecordPagerVo> queryParams) {
|
||||
return assessmentRecordService.pager(queryParams);
|
||||
}
|
||||
|
||||
@Operation(summary = "扣分详情")
|
||||
@GetMapping("/deductedDetail")
|
||||
@CheckUserType(userTypes = {UserType.MANAGEMENT_POLICE, UserType.MANAGEMENT_SUPER})
|
||||
public List<AssessmentRecordDetailVo> deductedDetail(@RequestParam Long assessmentRecordId) {
|
||||
return assessmentRecordService.deductedDetail(assessmentRecordId);
|
||||
}
|
||||
|
|
|
@ -19,10 +19,12 @@ public interface CkAssessmentRecordMapper extends BaseMapper<CkAssessmentRecord>
|
|||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param params 查询参数
|
||||
* @param page 分页对象
|
||||
* @param policeUnitId 公安单位id
|
||||
* @param params 查询参数
|
||||
* @return 结果
|
||||
*/
|
||||
Page<AssessmentRecordPagerVo> pager(@Param("page") Page<AssessmentRecordPagerVo> page,
|
||||
@Param("policeUnitId") Long policeUnitId,
|
||||
@Param("params") AssessmentRecordPagerQueryParams params);
|
||||
}
|
||||
|
|
|
@ -13,4 +13,10 @@ import lombok.Data;
|
|||
public class AssessmentRecordPagerQueryParams {
|
||||
@Schema(description = "企事业单位类型")
|
||||
private EnterprisesUnitType type;
|
||||
@Schema(description = "公安单位名称")
|
||||
private String policeUnitName;
|
||||
@Schema(description = "企事业单位名称")
|
||||
private String enterprisesUnitName;
|
||||
@Schema(description = "考核人")
|
||||
private String assessmentUserName;
|
||||
}
|
||||
|
|
|
@ -4,8 +4,10 @@ import cn.hutool.core.bean.BeanUtil;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.extension.toolkit.Db;
|
||||
import com.changhu.common.db.enums.UserType;
|
||||
import com.changhu.common.enums.ResultCode;
|
||||
import com.changhu.common.exception.MessageException;
|
||||
import com.changhu.common.utils.UserUtil;
|
||||
import com.changhu.module.assessmentCriteria.mapper.CkAssessmentRecordMapper;
|
||||
import com.changhu.module.assessmentCriteria.mapper.CkProjectMapper;
|
||||
import com.changhu.module.assessmentCriteria.pojo.entity.CkAssessmentRecord;
|
||||
|
@ -35,7 +37,10 @@ public class CkAssessmentRecordServiceImpl extends ServiceImpl<CkAssessmentRecor
|
|||
|
||||
@Override
|
||||
public Page<AssessmentRecordPagerVo> pager(PageParams<AssessmentRecordPagerQueryParams, AssessmentRecordPagerVo> queryParams) {
|
||||
return baseMapper.pager(queryParams.getPage(), queryParams.getParams());
|
||||
if (UserType.MANAGEMENT_POLICE.equals(UserUtil.getUserType())) {
|
||||
return baseMapper.pager(queryParams.getPage(), UserUtil.getUnitId(), queryParams.getParams());
|
||||
}
|
||||
return baseMapper.pager(queryParams.getPage(), null, queryParams.getParams());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.changhu.pojo.dto;
|
||||
|
||||
import com.changhu.common.db.enums.EnterprisesUnitType;
|
||||
import com.changhu.module.management.pojo.model.ContactPersonInfo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -24,6 +25,8 @@ public class EnterprisesUnitDetailDTO {
|
|||
private Long snowFlakeId;
|
||||
@Schema(description = "名字")
|
||||
private String name;
|
||||
@Schema(description = "类型")
|
||||
private EnterprisesUnitType type;
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
@Schema(description = "联系人")
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package com.changhu.pojo.queryParams;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author 20252
|
||||
* @createTime 2024/11/15 下午2:16
|
||||
* @desc OpenGetEnterprisesUnit...
|
||||
*/
|
||||
@Data
|
||||
public class OpenGetEnterprisesUnit {
|
||||
|
||||
private SearchType searchType;
|
||||
|
||||
private String code;
|
||||
private Integer level;
|
||||
|
||||
@Getter
|
||||
public enum SearchType {
|
||||
ADMINISTRATIVE_DIVISION,
|
||||
POLICE_UNIT
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ package com.changhu.service;
|
|||
import com.changhu.common.pojo.vo.SelectNodeVo;
|
||||
import com.changhu.pojo.dto.DataViewDTO;
|
||||
import com.changhu.pojo.dto.EnterprisesUnitDetailDTO;
|
||||
import com.changhu.pojo.queryParams.OpenGetEnterprisesUnit;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -15,10 +16,11 @@ public interface OpenApiService {
|
|||
/**
|
||||
* 获取企事业单位列表
|
||||
*
|
||||
* @param policeCode 公安机构代码
|
||||
* @param code 代码
|
||||
* @param level 等级
|
||||
* @return 企事业单位列表
|
||||
*/
|
||||
List<SelectNodeVo<Long>> getEnterprisesUnit(String policeCode);
|
||||
List<SelectNodeVo<Long>> getEnterprisesUnit(String code, Integer level);
|
||||
|
||||
/**
|
||||
* 企事业单位详情
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.changhu.service.impl;
|
|||
import com.baomidou.mybatisplus.extension.toolkit.Db;
|
||||
import com.changhu.common.exception.MessageException;
|
||||
import com.changhu.common.pojo.vo.SelectNodeVo;
|
||||
import com.changhu.mapper.OpenApiMapper;
|
||||
import com.changhu.module.management.pojo.entity.EnterprisesUnit;
|
||||
import com.changhu.module.management.pojo.entity.PoliceUnit;
|
||||
import com.changhu.module.management.pojo.entity.SecurityUnit;
|
||||
|
@ -10,6 +11,7 @@ import com.changhu.module.management.service.ServiceProjectService;
|
|||
import com.changhu.module.miniProgram.pojo.entity.SecurityUser;
|
||||
import com.changhu.pojo.dto.DataViewDTO;
|
||||
import com.changhu.pojo.dto.EnterprisesUnitDetailDTO;
|
||||
import com.changhu.pojo.queryParams.OpenGetEnterprisesUnit;
|
||||
import com.changhu.service.OpenApiService;
|
||||
import com.changhu.support.mybatisplus.pojo.entity.BaseEntity;
|
||||
import lombok.SneakyThrows;
|
||||
|
@ -30,18 +32,12 @@ public class OpenApiServiceImpl implements OpenApiService {
|
|||
@Autowired
|
||||
private ServiceProjectService serviceProjectService;
|
||||
|
||||
@Autowired
|
||||
private OpenApiMapper openApiMapper;
|
||||
|
||||
@Override
|
||||
public List<SelectNodeVo<Long>> getEnterprisesUnit(String policeCode) {
|
||||
PoliceUnit policeUnit = Db.lambdaQuery(PoliceUnit.class).eq(PoliceUnit::getCode, policeCode).oneOpt().orElseThrow(() -> new MessageException("当前系统没有该派出所"));
|
||||
return Db.lambdaQuery(EnterprisesUnit.class)
|
||||
.eq(EnterprisesUnit::getPoliceUnitId, policeUnit.getSnowFlakeId())
|
||||
.list()
|
||||
.stream()
|
||||
.map(item -> SelectNodeVo.<Long>builder()
|
||||
.value(item.getSnowFlakeId())
|
||||
.label(item.getName())
|
||||
.build())
|
||||
.toList();
|
||||
public List<SelectNodeVo<Long>> getEnterprisesUnit(String code, Integer level) {
|
||||
return openApiMapper.getEnterprisesUnit(code, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -52,6 +48,7 @@ public class OpenApiServiceImpl implements OpenApiService {
|
|||
.map(item -> EnterprisesUnitDetailDTO.builder()
|
||||
.snowFlakeId(item.getSnowFlakeId())
|
||||
.name(item.getName())
|
||||
.type(item.getType())
|
||||
.address(item.getAddress())
|
||||
.contactPersonInfo(item.getContactPersonInfo())
|
||||
.remark(item.getRemark())
|
||||
|
|
|
@ -19,7 +19,21 @@
|
|||
left join ck_assessment_record_details card on car.snow_flake_id = card.ck_assessment_record_id and card.delete_flag = 0
|
||||
left join ck_standard cs on card.ck_standard_id = cs.snow_flake_id
|
||||
where car.delete_flag = 0
|
||||
|
||||
<if test="policeUnitId!=null">
|
||||
and eu.police_unit_id = #{policeUnitId}
|
||||
</if>
|
||||
<if test="params.type!=null">
|
||||
and cp.type = #{params.type.value}
|
||||
</if>
|
||||
<if test="params.policeUnitName!=null and params.policeUnitName!=''">
|
||||
and pu.name like concat('%',#{params.policeUnitName},'%')
|
||||
</if>
|
||||
<if test="params.enterprisesUnitName!=null and params.enterprisesUnitName!=''">
|
||||
and eu.name like concat('%',#{params.enterprisesUnitName},'%')
|
||||
</if>
|
||||
<if test="params.assessmentUserName!=null and params.assessmentUserName!=''">
|
||||
and mpu.name like concat('%',#{params.assessmentUserName},'%')
|
||||
</if>
|
||||
group by car.snow_flake_id
|
||||
order by car.create_time desc
|
||||
</select>
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.changhu.mapper.OpenApiMapper">
|
||||
<select id="getEnterprisesUnit" resultType="com.changhu.common.pojo.vo.SelectNodeVo">
|
||||
select
|
||||
eu.snow_flake_id as 'value',
|
||||
eu.name as 'label'
|
||||
from enterprises_unit eu
|
||||
left join police_unit pu on eu.police_unit_id = pu.snow_flake_id
|
||||
where eu.delete_flag = 0
|
||||
<choose>
|
||||
<when test="level==1">
|
||||
and eu.province = #{code}
|
||||
</when>
|
||||
<when test="level==2">
|
||||
and eu.city = #{code}
|
||||
</when>
|
||||
<when test="level==3">
|
||||
and eu.districts = #{code}
|
||||
</when>
|
||||
<when test="level==4">
|
||||
and eu.street = #{code}
|
||||
</when>
|
||||
<when test="level==5">
|
||||
and pu.code = #{code}
|
||||
</when>
|
||||
<otherwise>and eu.snow_flake_id = -1</otherwise>
|
||||
</choose>
|
||||
order by eu.create_time desc
|
||||
</select>
|
||||
</mapper>
|
|
@ -87,13 +87,9 @@ export const ckProjectDetail = async (ckProjectId: string): Promise<CkProjectDet
|
|||
}
|
||||
})
|
||||
|
||||
Object.values(groupRowSpan).forEach(({count, firstIndex}) => {
|
||||
data[firstIndex].groupRowSpan = count;
|
||||
})
|
||||
Object.values(groupRowSpan).forEach(({count, firstIndex}) => data[firstIndex].groupRowSpan = count)
|
||||
|
||||
Object.values(itemRowSpan).forEach(({count, firstIndex}) => {
|
||||
data[firstIndex].itemRowSpan = count;
|
||||
})
|
||||
Object.values(itemRowSpan).forEach(({count, firstIndex}) => data[firstIndex].itemRowSpan = count)
|
||||
|
||||
return data
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
ref="tableRef"
|
||||
:request-api="reqApi"
|
||||
:columns="columns"
|
||||
:searchFormOptions="searchFormOptions"
|
||||
>
|
||||
|
||||
</table-pro-max>
|
||||
</template>
|
||||
|
||||
|
@ -20,16 +20,16 @@ import {
|
|||
AssessmentRecordPagerVo
|
||||
} from "@/types/views/unitManage/police/assessmentRecord.ts";
|
||||
import {deductedDetail} from "@/views/unitManage/police/assessmentRecord/index.tsx";
|
||||
import {dictSelectNodes} from "@/config/dict.ts";
|
||||
|
||||
|
||||
type TableProps = TableProMaxProps<AssessmentRecordPagerVo, AssessmentRecordPagerQueryParams>
|
||||
const tableRef = ref<ComponentExposed<typeof TableProMax>>(null)
|
||||
const reqApi: TableProps["requestApi"] = (params) => {
|
||||
return api.post('/assessmentRecord/pager', params)
|
||||
}
|
||||
const reqApi: TableProps["requestApi"] = (params) => api.post('/assessmentRecord/pager', params)
|
||||
const columns: TableProps['columns'] = [
|
||||
{
|
||||
dataIndex: 'enterprisesUnitName',
|
||||
title: '单位名称'
|
||||
title: '事业单位'
|
||||
}, {
|
||||
dataIndex: 'type',
|
||||
title: '类型',
|
||||
|
@ -84,6 +84,29 @@ const columns: TableProps['columns'] = [
|
|||
},
|
||||
}
|
||||
]
|
||||
const searchFormOptions = ref<TableProps['searchFormOptions']>({
|
||||
type: {
|
||||
type: 'select',
|
||||
label: '单位类型',
|
||||
options: [{
|
||||
value: null,
|
||||
label: '全部'
|
||||
}, ...dictSelectNodes('EnterprisesUnitType')]
|
||||
},
|
||||
policeUnitName: {
|
||||
type: 'input',
|
||||
label: '公安单位',
|
||||
},
|
||||
enterprisesUnitName: {
|
||||
type: 'input',
|
||||
label: '事业单位'
|
||||
},
|
||||
assessmentUserName: {
|
||||
type: 'input',
|
||||
label: '考核人'
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
Loading…
Reference in New Issue