Commit 020beff8 authored by baiyinhao's avatar baiyinhao

新增平台列表页面

parent dd426679
This diff is collapsed.
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<span>2024-12-17</span> <span>2024-12-17</span>
</div> </div>
</div> </div>
<div class="right-li"> <div class="right-li" @click="handleClick">
<div class="li-left"> <div class="li-left">
<el-tag type="danger" style="font-size: 14px">国家政策</el-tag> <el-tag type="danger" style="font-size: 14px">国家政策</el-tag>
</div> </div>
...@@ -109,8 +109,11 @@ ...@@ -109,8 +109,11 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { router } from '@/router';
import { ref } from 'vue'; import { ref } from 'vue';
import { useRouter, onBeforeRouteLeave } from 'vue-router';
const fileType = ref(''); // 文件下载后缀 const fileType = ref(''); // 文件下载后缀
const choseFile = ref({}); // 选择文件对象 const choseFile = ref({}); // 选择文件对象
const downloadType = ref(''); // 1是本地文件下载,2是oss文件下载 const downloadType = ref(''); // 1是本地文件下载,2是oss文件下载
...@@ -130,13 +133,15 @@ ...@@ -130,13 +133,15 @@
fileUploadName: '项目推荐汇总表.xlsx', fileUploadName: '项目推荐汇总表.xlsx',
fileAddress: '/profile/attachments/project-recommendation-summary.xlsx', fileAddress: '/profile/attachments/project-recommendation-summary.xlsx',
}); });
document.querySelectorAll('.right-li').forEach((element) => { document.querySelectorAll('.right-li').forEach((element) => {
element.addEventListener('click', () => { element.addEventListener('click', () => {
console.log('click'); console.log('click');
}); });
}); });
function handleClick() { function handleClick() {
console.log('click'); console.log('clickpush');
router.push('/aaaFont/nationalPolicy/details');
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
......
...@@ -6,7 +6,22 @@ ...@@ -6,7 +6,22 @@
:title="getTitle" :title="getTitle"
@ok="handleSubmit" @ok="handleSubmit"
> >
<BasicForm @register="registerForm" /> <BasicForm @register="registerForm">
<template #import="{}">
<BasicUpload
:maxSize="20"
:maxNumber="1"
@change="handleChange"
@click="handleUpload"
:api="userImport"
:accept="['.xlsx, .xls']"
>
<template #uploadBtnName>
<span>导入文件</span>
</template>
</BasicUpload>
</template>
</BasicForm>
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
...@@ -15,10 +30,11 @@ ...@@ -15,10 +30,11 @@
import { BasicForm, useForm } from '@/components/Form'; import { BasicForm, useForm } from '@/components/Form';
import { accountFormSchema } from './institution.data'; import { accountFormSchema } from './institution.data';
import { getDeptList } from '@/api/system/dept/dept'; import { getDeptList } from '@/api/system/dept/dept';
import { addUserApi, UserDetailApi, UserUpdataApi } from '@/api/system/user/user'; import { addUserApi, UserDetailApi, UserUpdataApi, userImport } from '@/api/system/user/user';
import { encryptTwo } from '../../../../src/utils/jsencrypt.js'; import { encryptTwo } from '../../../../src/utils/jsencrypt.js';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import { TreeData } from '@/views/dataSharingAndExchange/catalogingManagement/institutionData'; import { TreeData } from '@/views/dataSharingAndExchange/catalogingManagement/institutionData';
import { BasicUpload } from '@/components/Upload';
defineOptions({ name: 'AccountModal' }); defineOptions({ name: 'AccountModal' });
...@@ -65,8 +81,14 @@ ...@@ -65,8 +81,14 @@
]); ]);
}); });
const getTitle = computed(() => (!unref(isUpdate) ? '新增账号' : '编辑账号')); const getTitle = computed(() => (!unref(isUpdate) ? '新增轮播图' : '编辑轮播图'));
function handleChange(list: string[]) {
console.log('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', list);
createMessage.success(`文件上传成功`);
}
function handleUpload() {
isGetMeta.value = 'true';
}
function handleTree(data, id, parentId, children, rootId) { function handleTree(data, id, parentId, children, rootId) {
id = id || 'id'; id = id || 'id';
parentId = parentId || 'parentId'; parentId = parentId || 'parentId';
......
...@@ -195,51 +195,11 @@ export const accountFormSchema: any[] = [ ...@@ -195,51 +195,11 @@ export const accountFormSchema: any[] = [
}, },
], ],
}, },
// { {
// field: 'visibleRange', field: 'import',
// label: '可见范围', label: '上传轮播图',
// component: 'Select', slot: 'import',
// componentProps: { },
// options: [
// { label: '所有人', value: '所有人' },
// { label: '用户1', value: '用户1' },
// { label: '用户2', value: '用户2' },
// ],
// },
// colProps: { lg: 24, md: 24 },
// rules: [
// {
// required: true,
// message: '请输入登录名',
// },
// ],
// },
// {
// field: 'resourceNum',
// label: '可见资源数',
// component: 'InputNumber',
// colProps: { lg: 24, md: 24 },
// rules: [
// {
// required: true,
// message: '请输入',
// },
// ],
// },
// {
// field: 'institutionId',
// label: '所属编目',
// component: 'TreeSelect',
// colProps: { lg: 24, md: 24 },
// componentProps: {
// fieldNames: {
// label: 'institutionName',
// value: 'businessId',
// },
// getPopupContainer: () => document.body,
// },
// required: true,
// },
]; ];
export const EditFormSchema: any[] = [ export const EditFormSchema: any[] = [
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment