公司级人员及证书的录入
This commit is contained in:
@ -112,7 +112,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right" width="180" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" fixed="right" width="230" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip v-if="scope.row.userId !== 1" content="修改" placement="top">
|
||||
<el-button v-hasPermi="['system:user:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
||||
@ -131,6 +131,9 @@
|
||||
<el-tooltip v-if="scope.row.userId !== 1" content="编辑关联项目" placement="top">
|
||||
<el-button v-hasPermi="['system:user:edit']" link type="primary" icon="Edit" @click="handleUpdateProject(scope.row)"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip v-if="scope.row.userId !== 1" content="上传证书目录" placement="top">
|
||||
<el-button v-hasPermi="['system:user:edit']" link type="primary" icon="Upload" @click="handleUploadCert(scope.row)"></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -257,7 +260,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 用户导入对话框 -->
|
||||
<el-dialog v-model="upload.open" :title="upload.title" width="400px" append-to-body>
|
||||
<el-dialog draggable v-model="upload.open" :title="upload.title" width="400px" append-to-body>
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
:limit="1"
|
||||
@ -292,11 +295,22 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="上传证书目录" v-model="certDialog" width="30%" destroy-on-close>
|
||||
<!-- <File-upload v-model="fileUpload" :limit="5"></File-upload> -->
|
||||
<ImageUpload v-model="fileUpload" :limit="5"></ImageUpload>
|
||||
<template #footer>
|
||||
<span>
|
||||
<el-button @click="certDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="uploadCert">确定</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="User" lang="ts">
|
||||
import api from '@/api/system/user';
|
||||
import api, { uploadCertList } from '@/api/system/user';
|
||||
import { UserForm, UserQuery, UserVO } from '@/api/system/user/types';
|
||||
import { DeptTreeVO, DeptVO } from '@/api/system/dept/types';
|
||||
import { RoleVO } from '@/api/system/role/types';
|
||||
@ -372,7 +386,8 @@ const initFormData: UserForm = {
|
||||
status: '0',
|
||||
remark: '',
|
||||
postIds: [],
|
||||
roleIds: []
|
||||
roleIds: [],
|
||||
filePath: undefined
|
||||
};
|
||||
|
||||
const initData: PageData<UserForm, UserQuery> = {
|
||||
@ -679,6 +694,31 @@ const handleUpdateProject = (row) => {
|
||||
shuttleVisible.value = true;
|
||||
}
|
||||
};
|
||||
|
||||
const certDialog = ref(false);
|
||||
const certId = ref<string | number>(undefined);
|
||||
const fileUpload = ref<string>();
|
||||
//上传证书
|
||||
const handleUploadCert = (row: UserVO) => {
|
||||
certId.value = row.userId;
|
||||
fileUpload.value = row.filePath;
|
||||
certDialog.value = true;
|
||||
};
|
||||
|
||||
const uploadCert = async () => {
|
||||
if (!fileUpload.value) {
|
||||
proxy?.$modal.msgError('请上传证书目录');
|
||||
return;
|
||||
}
|
||||
let res = await uploadCertList({
|
||||
userId: certId.value,
|
||||
fileId: fileUpload.value
|
||||
});
|
||||
console.log(res);
|
||||
|
||||
certDialog.value = false;
|
||||
proxy?.$modal.msgSuccess('上传证书目录成功');
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
Reference in New Issue
Block a user