初步完成 公安后台 保安人员 头像上传 待复测
This commit is contained in:
parent
87c9c7b053
commit
59b58cf6f7
|
@ -22,3 +22,7 @@ VITE_APP_RSA_PUBLIC_KEY=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJps/EXxxSpEM1Ix4R
|
|||
VITE_APP_GAODE_KEY=f379a3f860a68d7438526275d6a94b05
|
||||
VITE_APP_GAODE_VERSION=2.0
|
||||
VITE_APP_SECURITY_JS_CODE=432125a0f8d8cad2dac38b77d6f6728f
|
||||
|
||||
# minio
|
||||
VITE_APP_MINIO_URL=http://118.253.177.137:9000
|
||||
VITE_APP_MINIO_BUCKET=police-security-dev
|
|
@ -13,3 +13,7 @@ VITE_APP_RSA_PUBLIC_KEY=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCpu1C3JHZ+Ng/eVVCZ
|
|||
VITE_APP_GAODE_KEY=f379a3f860a68d7438526275d6a94b05
|
||||
VITE_APP_GAODE_VERSION=2.0
|
||||
VITE_APP_SECURITY_JS_CODE=432125a0f8d8cad2dac38b77d6f6728f
|
||||
|
||||
# minio
|
||||
VITE_APP_MINIO_URL=https://www.hnjinglian.cn:9002
|
||||
VITE_APP_MINIO_BUCKET=police-security
|
|
@ -34,6 +34,7 @@ declare module 'vue' {
|
|||
APagination: typeof import('ant-design-vue/es')['Pagination']
|
||||
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
|
||||
APopover: typeof import('ant-design-vue/es')['Popover']
|
||||
AProgress: typeof import('ant-design-vue/es')['Progress']
|
||||
ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup']
|
||||
ARangePicker: typeof import('ant-design-vue/es')['RangePicker']
|
||||
ARow: typeof import('ant-design-vue/es')['Row']
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script type="module" src="/src/assets/iconfont/iconfont.js"></script>
|
||||
|
||||
<title>Vite + Vue + TS</title>
|
||||
<title>公安后台</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,8 +1,9 @@
|
|||
<template>
|
||||
<div class="simpleUploadDiv">
|
||||
<a-progress v-if="uploading" type="circle" :percent="percent" />
|
||||
<a-image height="80%" v-else :src="minioBaseUrl + modelValue" alt="avatar" />
|
||||
<a-button class="btn-success" @click="selectFile">{{ btnLabel }}</a-button>
|
||||
<!-- height="80%" width="80%" -->
|
||||
<a-image v-else :src="minioBaseUrl + modelValue" alt="avatar" />
|
||||
<a-button style="margin-top: 4px" class="btn-success" @click="selectFile">{{ btnLabel }}</a-button>
|
||||
<input id="myFileInput" type="file" style="display: none" />
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -14,6 +14,7 @@ import FormProMax from '@/components/form/FormProMax.vue'
|
|||
import { debounce } from 'lodash-es'
|
||||
import { SearchOutlined } from '@ant-design/icons-vue'
|
||||
import axios from 'axios'
|
||||
import SingleImageFileUpload from '@/components/upload/SingleImageFileUpload.vue'
|
||||
type _TableProps = TableProMaxProps<securityUnitIdListPagerVo, EnterprisesUnitPagerQueryParams>
|
||||
|
||||
const _formParams = reactive<securityUnitIdListParams>({
|
||||
|
@ -78,8 +79,14 @@ const saveOrUpdateEnterprisesUnit = (callback: Function, params, type: string) =
|
|||
}
|
||||
|
||||
const _formRef = ref<FormExpose>(null)
|
||||
|
||||
const uploadFileRef = ref(null)
|
||||
const _formOptions = ref<FormProMaxItemOptions<securityUnitIdListParams>>({
|
||||
photo: {
|
||||
type: 'custom',
|
||||
label: '头像',
|
||||
customRender: () => <SingleImageFileUpload height={200} v-model:value={_formParams.photo} ref={uploadFileRef} />,
|
||||
},
|
||||
|
||||
name: {
|
||||
type: 'input',
|
||||
label: '姓名',
|
||||
|
@ -274,7 +281,7 @@ export const showEnterprisesUnit = (record_) => {
|
|||
onClick={() =>
|
||||
deleteDataModal(record.name, async () => {
|
||||
const resp = await api.delete('/m2/eu/del_security_user_id', {
|
||||
securityUserId: record?.securityUnitId,
|
||||
securityUserId: record?.snowFlakeId,
|
||||
})
|
||||
message.success(resp.message)
|
||||
await _tableRef.value?.requestGetTableData()
|
||||
|
|
Loading…
Reference in New Issue