update:参数库
This commit is contained in:
@@ -98,63 +98,6 @@ export const getKKFileViewURLFromMinioApi = (params: any) => {
|
||||
return get(`${PREFIX}data/getKKFileViewURLFromMinio`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取仿真参数库展示树
|
||||
* @param params type 1:模型库/2:模型库分类/3:参数对象 id 传对应模型库id/模型库分类id/参数对象id,不传查所有的模型库
|
||||
* @returns
|
||||
*/
|
||||
export const getSimulationParameterTreeApi = (params: any) => {
|
||||
return get(`${PREFIX}simulationParameterLibrary/getSimulationParameterTree`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加新的仿真参数库
|
||||
* @param params parameterLibraryName 仿真参数库名
|
||||
* @returns
|
||||
*/
|
||||
export const addLibraryApi = (params: any) => {
|
||||
return get(`${PREFIX}simulationParameterLibrary/addLibrary`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加新的仿真参数库分类
|
||||
* @param params parameterLibraryId 仿真参数库ID parameterLibraryCategoryName 仿真参数库分类名
|
||||
* @returns
|
||||
*/
|
||||
export const addLibraryCategoryApi = (params: any) => {
|
||||
return get(`${PREFIX}simulationParameterLibrary/addLibraryCategory`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取仿真参数库分类参数对象
|
||||
* @param params ObjectId 参数对象id
|
||||
* @returns
|
||||
*/
|
||||
export const getSimulationParameterLibraryCategoryObjectApi = (params: any) => {
|
||||
return get(
|
||||
`${PREFIX}simulationParameterLibrary/getSimulationParameterLibraryCategoryObject`,
|
||||
params
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加新的仿真参数库分类的参数对象
|
||||
* @param params parameterLibraryId 参数库id parameterLibraryCategoryId 参数分类id parameterLibraryCategoryObjectName 参数对象名 fileName 文件名 file
|
||||
* @returns
|
||||
*/
|
||||
export const addLibraryCategoryObjectApi = (params: any) => {
|
||||
return upload(`${PREFIX}simulationParameterLibrary/addLibraryCategoryObject`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除仿真参数库数据
|
||||
* @param params type 1:仿真参数库 2:仿真参数库分类 3:仿真参数库分类参数对象 id 仿真参数库id/仿真参数库分类id/仿真参数库分类参数对象id
|
||||
* @returns
|
||||
*/
|
||||
export const deleteSimulationParameterApi = (params: any) => {
|
||||
return post(`${PREFIX}simulationParameterLibrary/deleteSimulationParameter`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询用户配额
|
||||
* @param params
|
||||
@@ -247,12 +190,11 @@ export const downloadFileForEditApi = (params: any) => {
|
||||
return get(`${PREFIX}data/downloadFileForEdit`, params);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 查询文件树信息
|
||||
* @param params
|
||||
* @returns
|
||||
* @param params
|
||||
* @returns
|
||||
*/
|
||||
export const dataTreeListDirApi = (params: any) => {
|
||||
return get(`${PREFIX}data/listDir?`, params);
|
||||
};
|
||||
};
|
||||
|
||||
66
src/api/data/simulationParameterLibrary.ts
Normal file
66
src/api/data/simulationParameterLibrary.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
import { get, post, upload } from '@/api/request';
|
||||
|
||||
const env = import.meta.env;
|
||||
const PREFIX = env.VITE_API_PREFIX_DATA;
|
||||
|
||||
/**
|
||||
* 添加新的仿真参数库分类的参数对象
|
||||
* @param params parameterLibraryId 参数库id parameterLibraryCategoryId 参数分类id parameterLibraryCategoryObjectName 参数对象名 fileName 文件名 file
|
||||
* @returns
|
||||
*/
|
||||
export const addLibraryCategoryObjectApi = (params: any) => {
|
||||
return upload(`${PREFIX}simulationParameterLibrary/addLibraryCategoryObject`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除仿真参数库数据
|
||||
* @param params type 1:仿真参数库 2:仿真参数库分类 3:仿真参数库分类参数对象 id 仿真参数库id/仿真参数库分类id/仿真参数库分类参数对象id
|
||||
* @returns
|
||||
*/
|
||||
export const deleteSimulationParameterApi = (params: any) => {
|
||||
return post(`${PREFIX}simulationParameterLibrary/deleteSimulationParameter`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取仿真参数库分类参数对象
|
||||
* @param params ObjectId 参数对象id
|
||||
* @returns
|
||||
*/
|
||||
export const getSimulationParameterLibraryCategoryObjectApi = (params: any) => {
|
||||
return get(
|
||||
`${PREFIX}simulationParameterLibrary/getSimulationParameterLibraryCategoryObject`,
|
||||
params
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加新的仿真参数库分类
|
||||
* @param params parameterLibraryId 仿真参数库ID parameterLibraryCategoryName 仿真参数库分类名
|
||||
* @returns
|
||||
*/
|
||||
export const addLibraryCategoryApi = (params: any) => {
|
||||
return get(`${PREFIX}simulationParameterLibrary/addLibraryCategory`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加新的仿真参数库
|
||||
* @param params parameterLibraryName 仿真参数库名
|
||||
* @returns
|
||||
*/
|
||||
export const addLibraryApi = (params: any) => {
|
||||
return get(`${PREFIX}simulationParameterLibrary/addLibrary`, params);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取仿真参数库展示树
|
||||
* @param params type 1:模型库/2:模型库分类/3:参数对象 id 传对应模型库id/模型库分类id/参数对象id,不传查所有的模型库
|
||||
* @returns
|
||||
*/
|
||||
export const getSimulationParameterTreeApi = (params: any) => {
|
||||
return get(`${PREFIX}simulationParameterLibrary/getSimulationParameterTree`, params);
|
||||
};
|
||||
|
||||
// 编辑参数库
|
||||
export const editSimulationParameterApi = (params: any) => {
|
||||
return post(`${PREFIX}simulationParameterLibrary/editSimulationParameter`, params);
|
||||
};
|
||||
@@ -291,6 +291,7 @@ defineExpose({
|
||||
justify-content: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: var(--el-color-primary);
|
||||
margin-right: var(--margin-tiny);
|
||||
}
|
||||
.label {
|
||||
|
||||
@@ -53,16 +53,18 @@
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<div class="tree-menu">
|
||||
<el-breadcrumb :separator-icon="ArrowRight">
|
||||
<el-breadcrumb-item
|
||||
v-for="item in navList"
|
||||
:key="item[dataKey.id]"
|
||||
@click="openDirFun(item[dataKey.id])"
|
||||
>
|
||||
{{ item[dataKey.name] }}
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<div class="top-content">
|
||||
<div class="menu">
|
||||
<el-breadcrumb separator="/">
|
||||
<el-breadcrumb-item
|
||||
v-for="item in navList"
|
||||
:key="item[dataKey.id]"
|
||||
@click="openDirFun(item[dataKey.id])"
|
||||
>
|
||||
{{ item[dataKey.name] }}
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<slot name="table" />
|
||||
@@ -74,7 +76,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { ArrowRight, Folder, FolderOpened, Document, DArrowLeft } from '@element-plus/icons-vue';
|
||||
import { Folder, FolderOpened, Document, DArrowLeft } from '@element-plus/icons-vue';
|
||||
|
||||
interface Props {
|
||||
api: any;
|
||||
@@ -289,11 +291,22 @@ defineExpose({
|
||||
background-color: var(--el-bg-color);
|
||||
border-radius: var(--border-radius-normal);
|
||||
padding: var(--padding-normal);
|
||||
|
||||
.tree-menu {
|
||||
.top-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 40px;
|
||||
padding: 10px 0;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: solid 1px var(--el-border-color-light);
|
||||
.menu {
|
||||
flex: 1;
|
||||
height: 24px;
|
||||
background-color: var(--el-bg-color-page);
|
||||
margin-right: 20px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
73
src/views/simulation/parameter/components/edit.vue
Normal file
73
src/views/simulation/parameter/components/edit.vue
Normal file
@@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<Dialog v-model="visible" diaTitle="编辑名称" :width="350" @close="closeFun">
|
||||
<template #default>
|
||||
<el-form :model="formData" labelWidth="auto">
|
||||
<el-form-item label="名称" prop="modifyFileName">
|
||||
<el-input v-model="formData.modifyFileName" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<template #footer>
|
||||
<div>
|
||||
<el-button @click="closeFun">取消</el-button>
|
||||
<el-button type="primary" @click="submitFun">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
import { editSimulationParameterApi } from '@/api/data/simulationParameterLibrary';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
interface Props {
|
||||
modelValue: boolean;
|
||||
data: any;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
modelValue: false,
|
||||
data: {},
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(val: boolean) => {
|
||||
visible.value = val;
|
||||
if (val) {
|
||||
formData.value.modifyFileName = props.data.name;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'confirm']);
|
||||
const visible = ref(false);
|
||||
|
||||
const formData = ref({
|
||||
modifyFileName: '',
|
||||
});
|
||||
|
||||
const submitFun = () => {
|
||||
if (!formData.value.modifyFileName) {
|
||||
ElMessage.warning('请输入名称');
|
||||
return;
|
||||
}
|
||||
const params = {
|
||||
...formData.value,
|
||||
...props.data,
|
||||
};
|
||||
editSimulationParameterApi(params).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('操作成功');
|
||||
closeFun();
|
||||
emit('confirm', params);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const closeFun = () => {
|
||||
emit('update:modelValue', false);
|
||||
};
|
||||
</script>
|
||||
@@ -17,7 +17,11 @@
|
||||
<div class="custom-tree-node">
|
||||
<el-icon class="icon-style" v-if="data.type != 3"><Folder /></el-icon>
|
||||
<el-icon class="icon-style" v-else><Document /></el-icon>
|
||||
<span>{{ data.name }}</span>
|
||||
<div class="name" :title="data.name">{{ data.name }}</div>
|
||||
<div class="options">
|
||||
<el-link type="primary" @click="openEditFun(data)">编辑</el-link>
|
||||
<el-link type="danger" @click="deleteParamFun(dataType[data.type])">删除</el-link>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-tree>
|
||||
@@ -45,39 +49,23 @@
|
||||
type="primary"
|
||||
v-if="currentNode?.type === 1 || !currentNode?.type"
|
||||
@click="openCreateFun('lib')"
|
||||
>新增参数库</el-button
|
||||
>
|
||||
新增参数库
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="currentNode?.type === 1"
|
||||
@click="openCreateFun('type')"
|
||||
>新增分类</el-button
|
||||
>
|
||||
新增分类
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="currentNode?.type === 2"
|
||||
@click="openCreateFun('param')"
|
||||
>新增参数对象</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
v-if="currentNode?.type === 1"
|
||||
:disabled="currentNode?.type != 1"
|
||||
@click="deleteParamFun('lib')"
|
||||
>删除参数库</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
v-if="currentNode?.type === 2"
|
||||
@click="deleteParamFun('type')"
|
||||
>删除分类</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
v-if="currentNode?.type === 3"
|
||||
@click="deleteParamFun('param')"
|
||||
>删除参数对象</el-button
|
||||
>
|
||||
新增参数对象
|
||||
</el-button>
|
||||
<el-button @click="infoShow = true">参数详情</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -130,6 +118,7 @@
|
||||
@createFun="creatLibParamObjFun"
|
||||
/>
|
||||
<ApproveDel v-model="approveDelShow" :api="deleteSimulationParameterApi" :params="delParams" />
|
||||
<Edit v-model="editShow" :data="editData" @confirm="resetTreeFun" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -138,19 +127,20 @@ import { ref } from 'vue';
|
||||
import { Document, Folder } from '@element-plus/icons-vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import {
|
||||
getSimulationParameterTreeApi,
|
||||
addLibraryApi,
|
||||
addLibraryCategoryApi,
|
||||
getSimulationParameterLibraryCategoryObjectApi,
|
||||
addLibraryCategoryObjectApi,
|
||||
deleteSimulationParameterApi,
|
||||
getSimulationParameterLibraryCategoryObjectApi,
|
||||
getSimulationParameterTreeApi,
|
||||
} from '@/api/data/data';
|
||||
} from '@/api/data/simulationParameterLibrary';
|
||||
import addParamLib from './components/addParamLib.vue';
|
||||
import addParamType from './components/addParamType.vue';
|
||||
import addParamObject from './components/addParamObject.vue';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import UploadFile from '@/components/common/uploadFile/index.vue';
|
||||
import ApproveDel from '@/components/common/approveDel/index.vue';
|
||||
import Edit from './components/edit.vue';
|
||||
|
||||
const currentNodeKey = ref<any>('');
|
||||
const currentNode = ref<any>({});
|
||||
@@ -163,6 +153,8 @@ const paramTableRef = ref();
|
||||
const infoShow = ref(false);
|
||||
const approveDelShow = ref(false);
|
||||
const delParams = ref<any>({});
|
||||
const editShow = ref(false);
|
||||
const editData = ref<any>({});
|
||||
|
||||
const props = {
|
||||
label: 'label',
|
||||
@@ -170,6 +162,12 @@ const props = {
|
||||
isLeaf: 'leaf',
|
||||
};
|
||||
|
||||
const dataType: any = {
|
||||
1: 'lib',
|
||||
2: 'type',
|
||||
3: 'param',
|
||||
};
|
||||
|
||||
const loadMoreFun = async (node: any, resolve: any) => {
|
||||
const listData: any = await getSimulationParameterTreeDAtaFun(node.data);
|
||||
return resolve(listData);
|
||||
@@ -239,6 +237,18 @@ const currentChangeFun = async (data: any) => {
|
||||
}
|
||||
};
|
||||
|
||||
const openEditFun = (data: any) => {
|
||||
editData.value = data;
|
||||
editShow.value = true;
|
||||
};
|
||||
|
||||
const resetTreeFun = (data: any) => {
|
||||
const { id, type, modifyFileName } = data;
|
||||
const node = libTreeRef.value.getNode(`${id}_${type}`);
|
||||
console.log(node.data);
|
||||
node.data.name = modifyFileName;
|
||||
};
|
||||
|
||||
const openCreateFun = (flag: any) => {
|
||||
if (flag === 'lib') {
|
||||
showParamLibVisible.value = true;
|
||||
@@ -350,9 +360,24 @@ const deleteParamFun = (flag: any) => {
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
.icon-style {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.name {
|
||||
width: 0;
|
||||
flex: 1;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.options {
|
||||
width: 70px;
|
||||
padding: 0 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
}
|
||||
.page-content-right {
|
||||
|
||||
@@ -68,7 +68,10 @@
|
||||
import { nextTick, reactive, ref, watch } from 'vue';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import { addLibraryCategoryObjectApi, getSimulationParameterTreeApi } from '@/api/data/data';
|
||||
import {
|
||||
getSimulationParameterTreeApi,
|
||||
addLibraryCategoryObjectApi,
|
||||
} from '@/api/data/simulationParameterLibrary';
|
||||
import { systemApproveQueryApproveFlowTempalteApi } from '@/api/system/systemApprove';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
|
||||
@@ -66,13 +66,13 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { nextTick, onMounted, reactive, ref, watch } from 'vue';
|
||||
import { nextTick, onMounted, reactive, ref } from 'vue';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import {
|
||||
getSimulationParameterLibraryCategoryObjectApi,
|
||||
getSimulationParameterTreeApi,
|
||||
} from '@/api/data/data';
|
||||
getSimulationParameterLibraryCategoryObjectApi,
|
||||
} from '@/api/data/simulationParameterLibrary';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
const visible = ref(true);
|
||||
|
||||
@@ -1,56 +1,48 @@
|
||||
<template>
|
||||
<BaseTable
|
||||
showIndex
|
||||
tableName="NODE_DETAIL_FILE"
|
||||
ref="tableRef"
|
||||
:params="{ uuid: projectUuid, queryTarget: 2 }"
|
||||
:api="dataQueryDirApi"
|
||||
:actionList="actionList"
|
||||
>
|
||||
<template #leftOptions>
|
||||
<el-button :disabled="freeze" icon="plus" @click="openDialog('add')" type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</template>
|
||||
<template #fileType="{ row }">
|
||||
{{ PROJECT_FILE_TYPE.O[row.fileType] }}
|
||||
</template>
|
||||
<template #fileSize="{ row }">
|
||||
{{ formatFileSize(row.fileSize) }}
|
||||
</template>
|
||||
<!-- <template #tableActions="{ row }">
|
||||
<div class="gl-table-actions">
|
||||
<el-link type="primary" @click="openTabReviewFile(row.id)">预览</el-link>
|
||||
<el-link type="primary" @click="downloadFile(row.id)">下载</el-link>
|
||||
<el-link type="primary" @click="openDialog('edit', row)">编辑</el-link>
|
||||
<el-popconfirm title="确认删除?" @confirm="deleteFileFun(row.id)">
|
||||
<template #reference>
|
||||
<el-link type="danger">删除</el-link>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
<div>
|
||||
<BaseTable
|
||||
showIndex
|
||||
tableName="NODE_DETAIL_FILE"
|
||||
ref="tableRef"
|
||||
:params="{ uuid: projectUuid, queryTarget: 2 }"
|
||||
:api="dataQueryDirApi"
|
||||
:actionList="actionList"
|
||||
>
|
||||
<template #leftOptions>
|
||||
<el-button :disabled="freeze" icon="plus" @click="openDialog('add')" type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</template>
|
||||
<template #fileType="{ row }">
|
||||
{{ PROJECT_FILE_TYPE.O[row.fileType] }}
|
||||
</template>
|
||||
<template #fileSize="{ row }">
|
||||
{{ formatFileSize(row.fileSize) }}
|
||||
</template>
|
||||
</BaseTable>
|
||||
<Dialog
|
||||
v-model="dialogVisible"
|
||||
:diaTitle="isEditDialog ? '编辑' : '上传文件'"
|
||||
:width="500"
|
||||
:height="500"
|
||||
show-confirm-button
|
||||
show-cancel-button
|
||||
show-footer
|
||||
>
|
||||
<div class="content">
|
||||
<TableForm ref="tableFormRef" tableName="NODE_DETAIL_FILE" />
|
||||
</div>
|
||||
</template> -->
|
||||
</BaseTable>
|
||||
<Dialog
|
||||
v-model="dialogVisible"
|
||||
:diaTitle="isEditDialog ? '编辑' : '上传文件'"
|
||||
:width="500"
|
||||
:height="500"
|
||||
show-confirm-button
|
||||
show-cancel-button
|
||||
show-footer
|
||||
>
|
||||
<div class="content">
|
||||
<TableForm ref="tableFormRef" tableName="NODE_DETAIL_FILE" />
|
||||
</div>
|
||||
<template #footer>
|
||||
<div>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmUploadFun">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</Dialog>
|
||||
<template #footer>
|
||||
<div>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmUploadFun">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</Dialog>
|
||||
<FilePreview v-model="previewVisible" :fileId="previewFileId" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
@@ -59,8 +51,9 @@ import { dataDelFileApi, dataQueryDirApi, dataUpdateFileApi } from '@/api/data/d
|
||||
import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import { upload } from '@/api/request';
|
||||
import { useDict } from '@/utils/useDict';
|
||||
import { formatFileSize, openTabReviewFile } from '@/utils/file';
|
||||
import { formatFileSize } from '@/utils/file';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import FilePreview from '@/components/common/filePreview/index.vue';
|
||||
|
||||
const env = import.meta.env;
|
||||
const PREFIX = env.VITE_API_PREFIX_PROJECT;
|
||||
@@ -87,14 +80,16 @@ const props = defineProps({
|
||||
});
|
||||
|
||||
const isEditDialog = ref(false);
|
||||
|
||||
const previewVisible = ref(false);
|
||||
const previewFileId = ref<any>('');
|
||||
const dialogVisible = ref(false);
|
||||
const actionList = ref<any>([
|
||||
{
|
||||
title: '预览',
|
||||
type: 'primary',
|
||||
click: (row: any) => {
|
||||
openTabReviewFile(row.id);
|
||||
previewFileId.value = row.id;
|
||||
previewVisible.value = true;
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user