Compare commits
No commits in common. "c88984537e675138aacf296b55fa8c0671b496ef" and "f88e3b9709a9915f3104ef2b48025b650637e23a" have entirely different histories.
c88984537e
...
f88e3b9709
|
@ -1,7 +1,7 @@
|
||||||
# 配置文档参考 https://taro-docs.jd.com/docs/next/env-mode-config
|
# 配置文档参考 https://taro-docs.jd.com/docs/next/env-mode-config
|
||||||
TARO_APP_ID="wx0acd1c4fcf94bdd3"
|
TARO_APP_ID="wx0acd1c4fcf94bdd3"
|
||||||
TARO_APP_BASE_API="http://172.10.10.93:8765"
|
# TARO_APP_BASE_API="http://172.10.10.93:8765"
|
||||||
# TARO_APP_BASE_API="https://www.hnjinglian.cn:5678"
|
TARO_APP_BASE_API="https://www.hnjinglian.cn:5678"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,6 @@ export interface PoliceUnitPagerQueryParams {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PoliceUnitPagerVo extends BaseTableRowRecord {
|
export interface PoliceUnitPagerVo extends BaseTableRowRecord {
|
||||||
|
|
||||||
sex: { label: string }
|
|
||||||
/** 名称 **/
|
/** 名称 **/
|
||||||
name?: string;
|
name?: string;
|
||||||
/** 代码 **/
|
/** 代码 **/
|
||||||
|
@ -55,7 +53,6 @@ export interface EnterprisesUnitPagerQueryParams {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EnterprisesUnitPagerVo extends BaseTableRowRecord {
|
export interface EnterprisesUnitPagerVo extends BaseTableRowRecord {
|
||||||
sex: { label: string }
|
|
||||||
/** 名字 **/
|
/** 名字 **/
|
||||||
name?: string;
|
name?: string;
|
||||||
type: BaseEnum<string>
|
type: BaseEnum<string>
|
||||||
|
@ -89,12 +86,9 @@ export interface EnterprisesUnitPagerVo extends BaseTableRowRecord {
|
||||||
remark?: string;
|
remark?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export interface EnterprisesUnitSaveOrUpdateParams {
|
export interface EnterprisesUnitSaveOrUpdateParams {
|
||||||
/** id **/
|
/** id **/
|
||||||
snowFlakeId?: string;
|
snowFlakeId?: string;
|
||||||
|
|
||||||
/** 公安单位id **/
|
/** 公安单位id **/
|
||||||
policeUnitId: string;
|
policeUnitId: string;
|
||||||
/** 名称 **/
|
/** 名称 **/
|
||||||
|
@ -114,47 +108,3 @@ export interface EnterprisesUnitSaveOrUpdateParams {
|
||||||
/** 备注 **/
|
/** 备注 **/
|
||||||
remark?: string;
|
remark?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface securityUnitIdListParams {
|
|
||||||
snowFlakeId?: string;
|
|
||||||
serviceProjectId?: string;
|
|
||||||
securityUnitId?: string;
|
|
||||||
name?: string;
|
|
||||||
remark?: string;
|
|
||||||
photo?: string;
|
|
||||||
telephone?: string;
|
|
||||||
workPost?: string;
|
|
||||||
sex?: string;
|
|
||||||
nativePlace?: string;
|
|
||||||
idCard?: string;
|
|
||||||
dateOfBirth?: string;
|
|
||||||
securityNumber?: string;
|
|
||||||
noSecurityNumberDesc?: string;
|
|
||||||
homeAddress?: string;
|
|
||||||
}
|
|
||||||
export interface securityUnitIdListPagerVo {
|
|
||||||
snowFlakeId?: string;
|
|
||||||
serviceProjectId?: string;
|
|
||||||
securityUnitId?: string;
|
|
||||||
name?: string;
|
|
||||||
remark?: string;
|
|
||||||
photo?: string;
|
|
||||||
telephone?: {
|
|
||||||
desensitizedValue?: string;
|
|
||||||
originalValue?: string;
|
|
||||||
};
|
|
||||||
workPost?: string;
|
|
||||||
sex?: {
|
|
||||||
label?: string;
|
|
||||||
value: number | string
|
|
||||||
};
|
|
||||||
nativePlace?: string;
|
|
||||||
idCard?: {
|
|
||||||
desensitizedValue?: string;
|
|
||||||
originalValue?: string;
|
|
||||||
};
|
|
||||||
dateOfBirth?: string;
|
|
||||||
securityNumber?: string;
|
|
||||||
noSecurityNumberDesc?: string;
|
|
||||||
homeAddress?: string;
|
|
||||||
}
|
|
||||||
|
|
|
@ -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>
|
|
@ -1,311 +0,0 @@
|
||||||
import { TableProMaxProps, TableProMaxSlots } from '@/types/components/table'
|
|
||||||
import { EnterprisesUnitPagerQueryParams, securityUnitIdListPagerVo, securityUnitIdListParams, PoliceUnitPagerVo } from '@/types/views/unitManage/police/policeUnit.ts'
|
|
||||||
import { reactive, ref } from 'vue'
|
|
||||||
import { FormExpose } from 'ant-design-vue/es/form/Form'
|
|
||||||
import { ComponentExposed } from 'vue-component-type-helpers'
|
|
||||||
import { FormProMaxItemOptions } from '@/types/components/form'
|
|
||||||
import { dictSelectNodes } from '@/config/dict.ts'
|
|
||||||
import { Button, message, Modal, Space, Tag } 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'
|
|
||||||
|
|
||||||
type _TableProps = TableProMaxProps<securityUnitIdListPagerVo, EnterprisesUnitPagerQueryParams>
|
|
||||||
|
|
||||||
const _formParams = reactive<securityUnitIdListParams>({
|
|
||||||
snowFlakeId: '', //
|
|
||||||
serviceProjectId: '', // 服务项目id
|
|
||||||
securityUnitId: '', // 保安单位id
|
|
||||||
name: '', //
|
|
||||||
photo: '',
|
|
||||||
telephone: '',
|
|
||||||
workPost: '',
|
|
||||||
sex: '',
|
|
||||||
nativePlace: '',
|
|
||||||
idCard: '',
|
|
||||||
dateOfBirth: '',
|
|
||||||
securityNumber: '',
|
|
||||||
noSecurityNumberDesc: '',
|
|
||||||
homeAddress: '',
|
|
||||||
remark: '',
|
|
||||||
})
|
|
||||||
const saveOrUpdateEnterprisesUnit = (callback: Function, params, type: string) => {
|
|
||||||
console.log('🚀 ~ saveOrUpdateEnterprisesUnit ~ params:', params)
|
|
||||||
if (type === 'add') {
|
|
||||||
_formParams.serviceProjectId = params.snowFlakeId
|
|
||||||
_formParams.securityUnitId = params.securityUnitId
|
|
||||||
} else {
|
|
||||||
_formParams.snowFlakeId = params.snowFlakeId
|
|
||||||
_formParams.serviceProjectId = params.serviceProjectId
|
|
||||||
_formParams.securityUnitId = params.securityUnitId
|
|
||||||
_formParams.name = params.name
|
|
||||||
_formParams.photo = params?.photo
|
|
||||||
_formParams.telephone = params.telephone.originalValue
|
|
||||||
_formParams.workPost = params.workPost
|
|
||||||
_formParams.sex = params.sex.value
|
|
||||||
_formParams.nativePlace = params.nativePlace
|
|
||||||
_formParams.idCard = params.idCard.originalValue
|
|
||||||
_formParams.dateOfBirth = params.dateOfBirth
|
|
||||||
_formParams.securityNumber = params.securityNumber
|
|
||||||
_formParams.noSecurityNumberDesc = params?.noSecurityNumberDesc
|
|
||||||
_formParams.homeAddress = params.homeAddress
|
|
||||||
_formParams.remark = params.remark
|
|
||||||
}
|
|
||||||
|
|
||||||
const _formRef = ref<FormExpose>(null)
|
|
||||||
|
|
||||||
const _formOptions = ref<FormProMaxItemOptions<any>>({
|
|
||||||
name: {
|
|
||||||
type: 'input',
|
|
||||||
label: '姓名',
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
idCard: {
|
|
||||||
type: 'input',
|
|
||||||
label: '身份证',
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
telephone: {
|
|
||||||
type: 'input',
|
|
||||||
label: '手机号',
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
sex: {
|
|
||||||
type: 'radioGroup',
|
|
||||||
label: '性别',
|
|
||||||
required: true,
|
|
||||||
options: [...dictSelectNodes('Sex')],
|
|
||||||
},
|
|
||||||
securityNumber: {
|
|
||||||
type: 'input',
|
|
||||||
label: '保安证号',
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
dateOfBirth: {
|
|
||||||
type: 'datePicker',
|
|
||||||
label: '出生日期',
|
|
||||||
componentsProps: {
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
},
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
workPost: {
|
|
||||||
type: 'input',
|
|
||||||
label: '工作岗位',
|
|
||||||
},
|
|
||||||
nativePlace: {
|
|
||||||
type: 'input',
|
|
||||||
label: '籍贯',
|
|
||||||
},
|
|
||||||
homeAddress: {
|
|
||||||
type: 'input',
|
|
||||||
label: '家庭住址',
|
|
||||||
},
|
|
||||||
noSecurityNumberDesc: {
|
|
||||||
type: 'input',
|
|
||||||
label: '无证说明',
|
|
||||||
},
|
|
||||||
|
|
||||||
remark: {
|
|
||||||
type: 'inputTextArea',
|
|
||||||
label: '备注',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
Modal.confirm({
|
|
||||||
title: params.name ? `【${params.name}】 编辑保安信息` : '新增保安人员',
|
|
||||||
width: 600,
|
|
||||||
icon: ' ',
|
|
||||||
centered: true,
|
|
||||||
content: () => <FormProMax ref={_formRef} v-model:value={_formParams} formItemOptions={_formOptions.value} />,
|
|
||||||
onOk: async () => {
|
|
||||||
await _formRef.value?.validate()
|
|
||||||
|
|
||||||
const resp = await api.post('/m2/eu/add_upd_sec_user', {
|
|
||||||
..._formParams,
|
|
||||||
})
|
|
||||||
message.success(resp.message)
|
|
||||||
callback && callback()
|
|
||||||
},
|
|
||||||
onCancel: async () => {
|
|
||||||
console.log('onCancel')
|
|
||||||
|
|
||||||
_formParams.snowFlakeId = ''
|
|
||||||
_formParams.serviceProjectId = ''
|
|
||||||
_formParams.securityUnitId = ''
|
|
||||||
_formParams.name = ''
|
|
||||||
_formParams.photo = ''
|
|
||||||
_formParams.telephone = ''
|
|
||||||
_formParams.workPost = ''
|
|
||||||
_formParams.sex = ''
|
|
||||||
_formParams.nativePlace = ''
|
|
||||||
_formParams.idCard = ''
|
|
||||||
_formParams.dateOfBirth = ''
|
|
||||||
_formParams.securityNumber = ''
|
|
||||||
_formParams.noSecurityNumberDesc = ''
|
|
||||||
_formParams.homeAddress = ''
|
|
||||||
_formParams.remark = ''
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// record_
|
|
||||||
export const showEnterprisesUnit = (record_) => {
|
|
||||||
console.log('🚀 ~ showEnterprisesUnit ~ record_:', record_)
|
|
||||||
const _tableRef = ref<ComponentExposed<typeof TableProMax>>(null)
|
|
||||||
const _columns: _TableProps['columns'] = [
|
|
||||||
{
|
|
||||||
dataIndex: 'name',
|
|
||||||
title: '姓名',
|
|
||||||
width: 100,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
dataIndex: 'idCard',
|
|
||||||
title: '身份证',
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return text.desensitizedValue
|
|
||||||
},
|
|
||||||
width: 160,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
dataIndex: 'sex',
|
|
||||||
title: '性别',
|
|
||||||
width: 60,
|
|
||||||
customRender: ({ record }) => {
|
|
||||||
return <Tag color={'success'}>{record.sex.label}</Tag>
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'dateOfBirth',
|
|
||||||
title: '出生日期',
|
|
||||||
width: 100,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'telephone',
|
|
||||||
title: '手机号',
|
|
||||||
width: 120,
|
|
||||||
ellipsis: true,
|
|
||||||
customRender: ({ text }) => text?.originalValue,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'securityNumber',
|
|
||||||
title: '保安证号',
|
|
||||||
width: 120,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'nativePlace',
|
|
||||||
title: '籍贯',
|
|
||||||
width: 120,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'workPost',
|
|
||||||
title: '工作岗位',
|
|
||||||
width: 120,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
dataIndex: 'homeAddress',
|
|
||||||
title: '家庭住址',
|
|
||||||
width: 120,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'remark',
|
|
||||||
title: '备注',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'createTime',
|
|
||||||
title: '创建时间',
|
|
||||||
width: 120,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
dataIndex: 'opt',
|
|
||||||
title: '操作',
|
|
||||||
width: 200,
|
|
||||||
fixed: 'right',
|
|
||||||
customRender: ({ record }) => (
|
|
||||||
<Space>
|
|
||||||
<Button class='btn-warn' onClick={() => saveOrUpdateEnterprisesUnit(_tableRef.value?.requestGetTableData, record, 'edit')}>
|
|
||||||
编辑
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
class='btn-danger'
|
|
||||||
onClick={() =>
|
|
||||||
deleteDataModal(record.name, async () => {
|
|
||||||
const resp = await api.delete('/m2/eu/del_security_user_id', {
|
|
||||||
enterprisesUnitId: record.snowFlakeId,
|
|
||||||
})
|
|
||||||
message.success(resp.message)
|
|
||||||
await _tableRef.value?.requestGetTableData()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</Button>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]
|
|
||||||
const x: number = _columns.reduce((a, b) => a + (b.width as number), 0)
|
|
||||||
const _reqApi: _TableProps['requestApi'] = (params) => {
|
|
||||||
// console.log(record_);
|
|
||||||
|
|
||||||
;(params as PageParams<EnterprisesUnitPagerQueryParams>).params.serviceProjectId = record_.snowFlakeId
|
|
||||||
return api.post('/m2/eu/sec_user_pager', params)
|
|
||||||
}
|
|
||||||
Modal.info({
|
|
||||||
title: `【${record_.name}】 管理保安人员`,
|
|
||||||
width: '80%',
|
|
||||||
centered: true,
|
|
||||||
maskClosable: true,
|
|
||||||
content: () => (
|
|
||||||
<TableProMax
|
|
||||||
scroll={{ x: x }}
|
|
||||||
ref={_tableRef}
|
|
||||||
size='small'
|
|
||||||
columns={_columns}
|
|
||||||
requestApi={_reqApi}
|
|
||||||
searchFormOptions={{
|
|
||||||
name: {
|
|
||||||
type: 'input',
|
|
||||||
label: '姓名',
|
|
||||||
},
|
|
||||||
securityNumber: {
|
|
||||||
type: 'input',
|
|
||||||
label: '保安证号',
|
|
||||||
},
|
|
||||||
telephone: {
|
|
||||||
type: 'input',
|
|
||||||
label: '手机号',
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
v-slots={
|
|
||||||
{
|
|
||||||
tableHeader: (_) => {
|
|
||||||
return (
|
|
||||||
<Space>
|
|
||||||
<Button class='btn-success' onClick={() => saveOrUpdateEnterprisesUnit(_tableRef.value?.requestGetTableData, record_, 'add')}>
|
|
||||||
新增
|
|
||||||
</Button>
|
|
||||||
<Button disabled>导入</Button>
|
|
||||||
</Space>
|
|
||||||
)
|
|
||||||
},
|
|
||||||
} as TableProMaxSlots<PoliceUnitPagerVo>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
})
|
|
||||||
}
|
|
|
@ -1,7 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableProMax
|
<TableProMax
|
||||||
style="width: 100%"
|
|
||||||
:expandedRowRender="expandedRowRender"
|
:expandedRowRender="expandedRowRender"
|
||||||
:expand-column-width="50"
|
:expand-column-width="50"
|
||||||
:defaultExpandAllRows="false"
|
:defaultExpandAllRows="false"
|
||||||
|
@ -40,7 +39,6 @@ import { publicUnitPagerQueryParams } from '@/types/views/publicUnit.ts'
|
||||||
import { FormProMaxItemOptions } from '@/types/components/form//index.ts'
|
import { FormProMaxItemOptions } from '@/types/components/form//index.ts'
|
||||||
import { FormExpose } from 'ant-design-vue/es/form/Form'
|
import { FormExpose } from 'ant-design-vue/es/form/Form'
|
||||||
import { serviceProjectSaveOrUpdateParams_ } from '@/types/views/serviceManagement'
|
import { serviceProjectSaveOrUpdateParams_ } from '@/types/views/serviceManagement'
|
||||||
import { showEnterprisesUnit } from './index.tsx'
|
|
||||||
type _FormType = EnterprisesUnitSaveOrUpdateParams & {
|
type _FormType = EnterprisesUnitSaveOrUpdateParams & {
|
||||||
contactPersonInfoName?: string
|
contactPersonInfoName?: string
|
||||||
contactPersonInfoTelephone?: string
|
contactPersonInfoTelephone?: string
|
||||||
|
@ -478,19 +476,16 @@ const expandedRowRender: TableProMaxProps['expandedRowRender'] = ({ record }) =>
|
||||||
{
|
{
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
title: '服务项目名称',
|
title: '服务项目名称',
|
||||||
width: 120,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'type',
|
dataIndex: 'type',
|
||||||
title: '服务类型',
|
title: '服务类型',
|
||||||
customRender: ({ text }) => <a-tag>{text?.label}</a-tag>,
|
customRender: ({ text }) => <a-tag>{text?.label}</a-tag>,
|
||||||
width: 120,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'twoType',
|
dataIndex: 'twoType',
|
||||||
title: '二级类型',
|
title: '二级类型',
|
||||||
customRender: ({ text }) => <a-tag>{text?.label}</a-tag>,
|
customRender: ({ text }) => <a-tag>{text?.label}</a-tag>,
|
||||||
width: 120,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'outsourceName',
|
dataIndex: 'outsourceName',
|
||||||
|
@ -500,63 +495,45 @@ const expandedRowRender: TableProMaxProps['expandedRowRender'] = ({ record }) =>
|
||||||
return record.outsourceName
|
return record.outsourceName
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
width: 120,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'isFiling',
|
dataIndex: 'isFiling',
|
||||||
title: '是否备案',
|
title: '是否备案',
|
||||||
customRender: ({ text }) => <a-tag>{text?.label}</a-tag>,
|
customRender: ({ text }) => <a-tag>{text?.label}</a-tag>,
|
||||||
width: 120,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'idNumber',
|
dataIndex: 'idNumber',
|
||||||
title: '保安服务许可证',
|
title: '保安服务许可证',
|
||||||
width: 200,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
dataIndex: 'serviceArea',
|
dataIndex: 'serviceArea',
|
||||||
title: '服务区域面积',
|
title: '服务区域面积',
|
||||||
width: 60,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'buildingTotal',
|
dataIndex: 'buildingTotal',
|
||||||
title: '楼栋数量',
|
title: '楼栋数量',
|
||||||
width: 60,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
dataIndex: 'houseTotal',
|
dataIndex: 'houseTotal',
|
||||||
title: '户数',
|
title: '户数',
|
||||||
width: 60,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'staffTotal',
|
dataIndex: 'staffTotal',
|
||||||
title: '工作人员数量',
|
title: '工作人员数量',
|
||||||
width: 60,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'securityUserTotal',
|
dataIndex: 'securityUserTotal',
|
||||||
title: '保安人员数量',
|
title: '保安人员数量',
|
||||||
width: 60,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'remark',
|
dataIndex: 'remark',
|
||||||
title: '备注',
|
title: '备注',
|
||||||
width: 120,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'createUserInfo',
|
dataIndex: 'createUserInfo',
|
||||||
title: '创建人',
|
title: '创建人',
|
||||||
width: 200,
|
|
||||||
ellipsis: true,
|
|
||||||
customRender: ({ record }) => {
|
customRender: ({ record }) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
@ -570,20 +547,15 @@ const expandedRowRender: TableProMaxProps['expandedRowRender'] = ({ record }) =>
|
||||||
{
|
{
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
width: 120,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'opt',
|
dataIndex: 'opt',
|
||||||
title: '操作',
|
title: '操作',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
width: 300,
|
|
||||||
customRender({ record }) {
|
customRender({ record }) {
|
||||||
return (
|
return (
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button class='btn-success' onClick={() => showEnterprisesUnit(record)}>
|
|
||||||
保安人员
|
|
||||||
</a-button>
|
|
||||||
<a-button
|
<a-button
|
||||||
class='btn-warn'
|
class='btn-warn'
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
|
@ -627,34 +599,29 @@ const expandedRowRender: TableProMaxProps['expandedRowRender'] = ({ record }) =>
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
// const x2: number = _columns.reduce((a, b) => a + (b.width as number), 0)
|
|
||||||
const _reqApi: _TableProps['requestApi'] = async () => {
|
const _reqApi: _TableProps['requestApi'] = async () => {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
return await api.get('/m2/eu/listSp', { enterprisesUnitId: record?.snowFlakeId })
|
return await api.get('/m2/eu/listSp', { enterprisesUnitId: record?.snowFlakeId })
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div style={{ width: '100%' }}>
|
<TableProMax
|
||||||
<TableProMax
|
ref={_tableRef}
|
||||||
style={{ width: '1500px' }}
|
size='small'
|
||||||
scroll={{ x: '1500px' }}
|
columns={_columns}
|
||||||
ref={_tableRef}
|
requestApi={_reqApi}
|
||||||
size='small'
|
isPagination={false}
|
||||||
columns={_columns}
|
v-slots={{
|
||||||
requestApi={_reqApi}
|
tableHeader: (_) => {
|
||||||
isPagination={false}
|
return (
|
||||||
v-slots={{
|
<Space>
|
||||||
tableHeader: () => {
|
<Button type={'primary'} onClick={() => addService(record)}>
|
||||||
return (
|
新增服务项目
|
||||||
<Space>
|
</Button>
|
||||||
<Button type={'primary'} onClick={() => addService(record)}>
|
</Space>
|
||||||
新增服务项目
|
)
|
||||||
</Button>
|
},
|
||||||
</Space>
|
}}
|
||||||
)
|
/>
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ import FormProMax from '@/components/form/FormProMax.vue'
|
||||||
import { FormProMaxItemOptions } from '@/types/components/form'
|
import { FormProMaxItemOptions } from '@/types/components/form'
|
||||||
import { FormExpose } from 'ant-design-vue/es/form/Form'
|
import { FormExpose } from 'ant-design-vue/es/form/Form'
|
||||||
import { publicUnitPagerQueryParams, FromItem } from '@/types/views/publicUnit.ts'
|
import { publicUnitPagerQueryParams, FromItem } from '@/types/views/publicUnit.ts'
|
||||||
import { ComponentExposed } from 'vue-component-type-helpers'
|
|
||||||
const tableRef = ref<ComponentExposed<typeof TableProMax>>(null!)
|
const tableRef = ref<ComponentExposed<typeof TableProMax>>(null!)
|
||||||
const formRef = ref<FormExpose>(null)
|
const formRef = ref<FormExpose>(null)
|
||||||
type TableProps = TableProMaxProps<publicUnitPagerQueryParams>
|
type TableProps = TableProMaxProps<publicUnitPagerQueryParams>
|
||||||
|
|
Loading…
Reference in New Issue