update:数据总览

This commit is contained in:
2025-11-12 18:12:04 +08:00
parent 32bb142882
commit fbc344addb
9 changed files with 168 additions and 108 deletions

View File

@@ -4,7 +4,7 @@
class="select"
v-model="choseData"
:options="listData"
placeholder="请选择"
:placeholder="disabled ? '' : '请选择'"
filterable
clearable
@change="changeFun"
@@ -18,10 +18,12 @@ import { systemApproveQueryApproveFlowTempalteApi } from '@/api/system/systemApp
interface Props {
modelValue: string;
disabled: boolean;
}
const props = withDefaults(defineProps<Props>(), {
modelValue: '',
disabled: false,
});
const listData = ref<any>([]);
const choseData = ref<any>('');

View File

@@ -182,6 +182,7 @@ const updateNavFun = (data: any) => {
};
const reloadFun = () => {
navList.value = [];
visible.value = false;
setTimeout(() => {
visible.value = true;

View File

@@ -4,7 +4,7 @@
class="select"
v-model="choseList"
:options="listData"
placeholder="请选择"
:placeholder="disabled ? '' : '请选择'"
filterable
clearable
:multiple="multiple"
@@ -20,11 +20,13 @@ import { queryNodeListApi } from '@/api/project/node';
interface Props {
modelValue: string;
multiple?: boolean;
disabled: boolean;
}
const props = withDefaults(defineProps<Props>(), {
modelValue: '',
multiple: false,
disabled: false,
});
const listData = ref<any>([]);
const choseList = ref<any>([]);

View File

@@ -3,7 +3,7 @@
<el-input
v-if="item.inputMode === 'input'"
v-model="formData[item.key]"
placeholder="请输入"
:placeholder="(item.disabled && showDisabled) ? '' : '请输入'"
clearable
:disabled="item.disabled && showDisabled"
@input="(val: any) => changeFun(item.key, val)"
@@ -13,14 +13,14 @@
v-model="formData[item.key]"
type="textarea"
autosize
placeholder="请输入"
:placeholder="(item.disabled && showDisabled) ? '' : '请输入'"
:disabled="item.disabled && showDisabled"
@input="(val: any) => changeFun(item.key, val)"
/>
<el-input-number
v-if="item.inputMode === 'inputNumber'"
v-model="formData[item.key]"
placeholder="请输入"
:placeholder="(item.disabled && showDisabled) ? '' : '请输入'"
:min="0"
:step="item.step"
step-strictly
@@ -30,7 +30,7 @@
<el-select
v-if="item.inputMode === 'select'"
v-model="formData[item.key]"
placeholder="请选择"
:placeholder="(item.disabled && showDisabled) ? '' : '请选择'"
clearable
:options="item.options"
:disabled="item.disabled && showDisabled"
@@ -65,7 +65,7 @@
type="datetime"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择"
:placeholder="(item.disabled && showDisabled) ? '' : '请选择'"
clearable
:disabled="item.disabled && showDisabled"
@change="(val: any) => changeFun(item.key, val)"

View File

@@ -40,6 +40,7 @@ interface Props {
colNum?: number;
showDisabled?: boolean;
ruleData?: any;
data?: any;
}
const props = withDefaults(defineProps<Props>(), {
@@ -47,13 +48,18 @@ const props = withDefaults(defineProps<Props>(), {
colNum: 1,
showDisabled: false,
ruleData: {},
data: {},
});
watch(() => props.data, (data: any) => {
formData.value = data;
});
onMounted(() => {
getHeadDataFun();
});
const formData = ref<any>({});
const formData = ref<any>(props.data);
const tableData = ref<any>([]);
const rules = ref<any>({});
const formRef = ref<any>();

View File

@@ -4,8 +4,8 @@
v-model="diaVisible"
:diaTitle="`表名【${name}】字段设置`"
top="2vh"
width="98%"
height="90%"
width="80%"
height="80%"
show-footer
@close="closeFun"
>

View File

@@ -4,7 +4,7 @@
class="select"
v-model="choseList"
:options="listData"
placeholder="请选择"
:placeholder="disabled ? '' : '请选择'"
filterable
clearable
:multiple="multiple"
@@ -20,11 +20,13 @@ import { userListUserApi } from '@/api/system/user';
interface Props {
modelValue: string;
multiple?: boolean;
disabled: boolean;
}
const props = withDefaults(defineProps<Props>(), {
modelValue: '',
multiple: false,
disabled: false,
});
const listData = ref<any>([]);
const choseList = ref<any>([]);

View File

@@ -1,42 +1,55 @@
<template>
<el-drawer
v-model="visible"
title="属性信息"
:size="400"
:close-on-click-modal="false"
@close="closeFun"
>
<div class="comp-data-info">
<div class="content">
<TableForm ref="tableFormRef" tableName="DATA_OVERVIEW_FILE_INFO" showDisabled />
</div>
<template #footer>
<div>
<el-button @click="closeFun">关闭</el-button>
</div>
<TableForm ref="tableFormRef" :data="data" tableName="DATA_OVERVIEW" showDisabled>
<template #form-originalName="{ row }">
{{ row.originalName || '--' }}
</template>
</el-drawer>
<template #form-dataType="{ row }">
{{ DATA_TYPE.O[row.dataType] || '--' }}
</template>
<template #form-creatorName="{ row }">
{{ row.creatorName || '--' }}
</template>
<template #form-createTime="{ row }">
{{ row.createTime || '--' }}
</template>
<template #form-updateTime="{ row }">
{{ row.updateTime || '--' }}
</template>
<template #form-fileSize="{ row }">
{{ formatFileSize(row.fileSize) || '--' }}
</template>
</TableForm>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, watch } from 'vue';
import { ref } from 'vue';
import TableForm from '@/components/common/table/tableForm.vue';
import { formatFileSize } from '@/utils/file';
import { useDict } from '@/utils/useDict';
const emit = defineEmits(['update:modelValue']);
const visible = ref(false);
const { DATA_TYPE } = useDict('DATA_TYPE');
const tableFormRef = ref();
interface Props {
modelValue: boolean;
data: any;
}
const props = withDefaults(defineProps<Props>(), {
modelValue: false,
withDefaults(defineProps<Props>(), {
data: {},
});
watch(() => props.modelValue, (val: boolean) => {
visible.value = val;
});
const closeFun = () => {
emit('update:modelValue', false);
};
</script>
<style lang="scss" scoped>
.comp-data-info {
width: 100%;
min-height: 100%;
padding: 10px;
border: solid 1px var(--el-border-color);
border-radius: 4px;
margin-left: 10px;
}
</style>

View File

@@ -30,6 +30,8 @@
</div>
</template>
<template #table>
<div class="table-content">
<div class="table">
<BaseTable
ref="BaseTableRef"
tableName="DATA_OVERVIEW"
@@ -41,6 +43,7 @@
showCheckbox
@checkbox-all="checkboxChangeFun"
@checkbox-change="checkboxChangeFun"
@cell-click="cellClickFun"
>
<template #leftOptions>
<div>
@@ -76,7 +79,14 @@
<el-button :icon="Edit" type="primary" @click="editFun">编辑</el-button>
<el-button :icon="Delete" type="danger" :disabled="chosenData.length === 0" @click="delFun">删除</el-button>
<el-button :icon="Refresh" @click="reloadFun">刷新</el-button>
<el-button :icon="Warning" @click="infoShow = true">属性信息</el-button>
<span class="info-switch">
<el-switch
v-model="infoShow"
inline-prompt
active-text="详细信息"
inactive-text="详细信息"
/>
</span>
</div>
</template>
<template #originalName="{ row }">
@@ -95,6 +105,13 @@
{{ formatFileSize(row.fileSize) }}
</template>
</BaseTable>
</div>
<div v-if="infoShow" class="info">
<FileInfo
:data="fileData"
/>
</div>
</div>
</template>
</FileTree>
</div>
@@ -107,9 +124,6 @@
:dirId="currentData.id"
@search="searchFileFun"
/>
<FileInfo
v-model="infoShow"
/>
<AddDir
v-model="addDirShow"
:data="currentData"
@@ -150,7 +164,7 @@ import PhaseInfoDia from '@/components/project/phaseInfoDialog.vue';
import NodeDetailDialog from '@/components/common/treeCaseTable/nodeDetailDialog.vue';
import { ElMessage, ElMessageBox } from 'element-plus';
import ProjectInfoDialog from '@/components/project/projectInfoDialog.vue';
import { CirclePlus, Upload, Edit, Refresh, Delete, Warning, Folder, Document } from '@element-plus/icons-vue';
import { CirclePlus, Upload, Edit, Refresh, Delete, Folder, Document } from '@element-plus/icons-vue';
import { NODE_TYPE } from '@/utils/enum/node';
import { useDict } from '@/utils/useDict';
import { formatFileSize } from '@/utils/file';
@@ -170,6 +184,7 @@ const FileTreeRef = ref();
const editId = ref('');
const chosenData = ref<any>([]);
const BaseTableRef = ref();
const fileData = ref<any>({});
onMounted(() => {
getAllTemplateFun();
@@ -239,6 +254,11 @@ const delFun = () => {
}).catch(() => {});
};
const cellClickFun = (data: any) => {
const { row } = data;
fileData.value = row;
};
const beforeUploadFun = (file: any) => {
if (!currentData.value) {
ElMessage.warning('请选择一个目录');
@@ -291,6 +311,7 @@ const checkboxChangeFun = (data: any) => {
const reloadFun = () => {
chosenData.value = [];
currentData.value = '';
if (FileTreeRef.value) {
FileTreeRef.value.reloadFun();
}
@@ -326,5 +347,18 @@ const reloadFun = () => {
padding-left: 4px;
}
}
.info-switch {
margin-left: 12px;
}
.table-content {
display: flex;
.table {
flex: 1;
width: 0;
}
.info {
width: 250px;
}
}
}
</style>