From d26db2d321fa963f085b4c33194627600df48052 Mon Sep 17 00:00:00 2001 From: taoge1020 Date: Wed, 3 Sep 2025 17:28:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/design/received/index.vue | 7 +- src/views/system/user/comm/editInfo.vue | 254 ++++++++ src/views/system/user/index copy.vue | 788 ++++++++++++++++++++++++ src/views/system/user/index.vue | 165 ++--- 4 files changed, 1098 insertions(+), 116 deletions(-) create mode 100644 src/views/system/user/comm/editInfo.vue create mode 100644 src/views/system/user/index copy.vue diff --git a/src/views/design/received/index.vue b/src/views/design/received/index.vue index 0095806..3dfa5ef 100644 --- a/src/views/design/received/index.vue +++ b/src/views/design/received/index.vue @@ -482,8 +482,6 @@ const exportTemplate = async () => { }; const importTemplate = async (files, fileList) => { // 导入表格数据 - console.log(fileList); - const file = fileList[0].raw; // 获取原始文件对象 const reader = new FileReader(); let obj = { @@ -512,17 +510,18 @@ const importTemplate = async (files, fileList) => { return; } let arr = []; + // 判断form.documents 是否对象 jsonData.forEach((item, index) => { if (item[obj.id]) { arr.push({ id: Date.now() + index, - catalogueName: item[obj.name], + catalogueName: item[obj.fliename], remark: item[obj.remark], userId: item[obj.id] }); } }); - form.documents = form.documents.concat(arr); + form.documents = arr; uploadRef.value.clearFiles(); console.log(arr); } catch (err) {} diff --git a/src/views/system/user/comm/editInfo.vue b/src/views/system/user/comm/editInfo.vue new file mode 100644 index 0000000..f91ef6c --- /dev/null +++ b/src/views/system/user/comm/editInfo.vue @@ -0,0 +1,254 @@ + + + + diff --git a/src/views/system/user/index copy.vue b/src/views/system/user/index copy.vue new file mode 100644 index 0000000..87d6aef --- /dev/null +++ b/src/views/system/user/index copy.vue @@ -0,0 +1,788 @@ + + + + + diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 1e02ed5..c3e11ee 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -154,115 +154,17 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ dict.label }} - - - - - - - - - - - +
+ +
+
+
@@ -326,7 +228,7 @@ import { to } from 'await-to-js'; import { getProjectByDeptId, getRoleList, optionselect } from '@/api/system/post'; import ShuttleFrame from '../../project/projectRelevancy/component/ShuttleFrame.vue'; import { listProject } from '@/api/project/project'; - +import editInfo from './comm/editInfo.vue'; const router = useRouter(); const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { sys_normal_disable, sys_user_sex } = toRefs(proxy?.useDict('sys_normal_disable', 'sys_user_sex')); @@ -345,7 +247,7 @@ const initPassword = ref(''); const postOptions = ref([]); const roleOptions = ref([]); const projectOptions = ref([]); - +const editInfoRef = ref | null>(null); /*** 用户导入参数 */ const upload = reactive({ // 是否显示弹出层(用户导入) @@ -377,7 +279,7 @@ const queryFormRef = ref(); const userFormRef = ref(); const uploadRef = ref(); const formDialogRef = ref(); - +const type = ref(1); const dialog = reactive({ visible: false, title: '' @@ -658,6 +560,9 @@ const handleAdd = async () => { const { data } = await api.getUser(); dialog.visible = true; dialog.title = '新增用户'; + nextTick(() => { + editInfoRef.value?.open(); + }); postOptions.value = data.posts; form.value.password = initPassword.value.toString(); }; @@ -669,6 +574,9 @@ const handleUpdate = async (row?: UserForm) => { const { data } = await api.getUser(userId); dialog.visible = true; dialog.title = '修改用户'; + nextTick(() => { + editInfoRef.value?.open(row); + }); Object.assign(form.value, data.user); postOptions.value = data.posts; roleOptions.value = data.roles; @@ -783,6 +691,39 @@ const uploadCert = async () => { certDialog.value = false; proxy?.$modal.msgSuccess('上传证书目录成功'); }; +const onTab = (val) => { + type.value = val; +}; - +