merge
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
<el-form-item :label="$t('工况库.审核模版')" prop="approveTemplateId" v-if="form.bApprove === true">
|
<el-form-item :label="$t('工况库.审核模版')" prop="approveTemplateId" v-if="form.bApprove === true">
|
||||||
<ApproveList
|
<ApproveList
|
||||||
v-model="form.approveTemplateId"
|
v-model="form.approveTemplateId"
|
||||||
|
@change="onApproveChangeFun"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('工况库.升版')" prop="bNewVersion" >
|
<el-form-item :label="$t('工况库.升版')" prop="bNewVersion" >
|
||||||
@@ -118,6 +119,9 @@ const onShowFun = () => {
|
|||||||
form.versionType = 0;
|
form.versionType = 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
const onApproveChangeFun = (data:any) => {
|
||||||
|
form.approveTemplateName = data.label;
|
||||||
|
};
|
||||||
const resetFun = () => {
|
const resetFun = () => {
|
||||||
if (!formRef.value) {
|
if (!formRef.value) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -91,8 +91,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-space>
|
</el-space>
|
||||||
</div>
|
</div>
|
||||||
<loadCaseTable v-show="currentTableType==='tree'" ref="treeTableRef" tableName="TASK_POOL" :modalTableNameList="['TASK_POOL_CATEGORY','TASK_POOL_TASK','TASK_POOL_PERFORMANCE']" :data="tableData" :loading="loading" :editMode="true" > </loadCaseTable>
|
<loadCaseTable
|
||||||
<loadCaseTable v-show="currentTableType==='list'" ref="listTableRef" readonly tableName="TASK_POOL_LIST" :data="extractTableData" :loading="loading" :editMode="false"> </loadCaseTable>
|
v-show="currentTableType==='tree'"
|
||||||
|
ref="treeTableRef"
|
||||||
|
tableName="TASK_POOL"
|
||||||
|
:modalTableNameList="['TASK_POOL_CATEGORY','TASK_POOL_TASK','TASK_POOL_PERFORMANCE']"
|
||||||
|
:data="tableData"
|
||||||
|
:loading="loading"
|
||||||
|
:editMode="true"
|
||||||
|
> </loadCaseTable>
|
||||||
|
<loadCaseTable
|
||||||
|
v-show="currentTableType==='list'"
|
||||||
|
ref="listTableRef"
|
||||||
|
border="full"
|
||||||
|
readonly
|
||||||
|
tableName="TASK_POOL_LIST"
|
||||||
|
:data="extractTableData"
|
||||||
|
:loading="loading"
|
||||||
|
:editMode="false"
|
||||||
|
> </loadCaseTable>
|
||||||
<loadcase-pro-table
|
<loadcase-pro-table
|
||||||
v-if="false"
|
v-if="false"
|
||||||
ref="treeTableRef2"
|
ref="treeTableRef2"
|
||||||
@@ -228,7 +245,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, nextTick, onMounted, ref, type Ref } from 'vue';
|
import { computed, nextTick, onMounted, ref, type Ref } from 'vue';
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||||
import { cloneDeep, groupBy } from 'lodash-es';
|
import { cloneDeep, groupBy, isEqual } from 'lodash-es';
|
||||||
import { onBeforeRouteLeave, useRouter } from 'vue-router';
|
import { onBeforeRouteLeave, useRouter } from 'vue-router';
|
||||||
import loadcaseProTable from '@/components/loadCaseTable/commonTable/loadcaseProTable.vue';
|
import loadcaseProTable from '@/components/loadCaseTable/commonTable/loadcaseProTable.vue';
|
||||||
import loadCaseTable from '@/components/common/treeCaseTable/loadCaseTable.vue';
|
import loadCaseTable from '@/components/common/treeCaseTable/loadCaseTable.vue';
|
||||||
@@ -341,6 +358,7 @@ const refreshData = async (callback?: any) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const treeTableRef = ref();
|
const treeTableRef = ref();
|
||||||
|
const listTableRef = ref();
|
||||||
const getVxeRef = () => {
|
const getVxeRef = () => {
|
||||||
return treeTableRef?.value?.loadcaseTableRef?.TreeTableRef?.treeTableRef;
|
return treeTableRef?.value?.loadcaseTableRef?.TreeTableRef?.treeTableRef;
|
||||||
};
|
};
|
||||||
@@ -407,6 +425,7 @@ const createTaskPoolFun = async (formData: any) => {
|
|||||||
nodes: pickedNodes,
|
nodes: pickedNodes,
|
||||||
bApprove: formData.bApprove,
|
bApprove: formData.bApprove,
|
||||||
approveTemplateId: formData.approveTemplateId,
|
approveTemplateId: formData.approveTemplateId,
|
||||||
|
approveTemplateName: formData.approveTemplateName,
|
||||||
};
|
};
|
||||||
const res: any = await createTaskPoolApi(req);
|
const res: any = await createTaskPoolApi(req);
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
@@ -419,6 +438,7 @@ const updateTaskPoolFun = async (formData: any) => {
|
|||||||
const req = {
|
const req = {
|
||||||
bApprove: formData.bApprove,
|
bApprove: formData.bApprove,
|
||||||
approveTemplateId: formData.approveTemplateId,
|
approveTemplateId: formData.approveTemplateId,
|
||||||
|
approveTemplateName: formData.approveTemplateName,
|
||||||
bNewVersion: formData.bNewVersion,
|
bNewVersion: formData.bNewVersion,
|
||||||
versionType: formData.versionType,
|
versionType: formData.versionType,
|
||||||
poolBrief: {
|
poolBrief: {
|
||||||
@@ -744,7 +764,12 @@ const queryTaskPoolFun = async () => {
|
|||||||
tableData.value = tree;
|
tableData.value = tree;
|
||||||
isEmptyPool.value = false;
|
isEmptyPool.value = false;
|
||||||
extractTableData.value = extractLeafNodesWithParentTypes(res.data.nodes);
|
extractTableData.value = extractLeafNodesWithParentTypes(res.data.nodes);
|
||||||
|
const vxeInstance = listTableRef?.value?.loadcaseTableRef?.TreeTableRef?.treeTableRef;
|
||||||
|
const mergeCells = calcMergeCellsFun(extractTableData.value);
|
||||||
|
console.log('extractTableData.value', extractTableData.value);
|
||||||
|
console.log('mergeCells', mergeCells);
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
vxeInstance.setMergeCells(mergeCells);
|
||||||
// treeTableRef.value?.changeLevel('全部展开');
|
// treeTableRef.value?.changeLevel('全部展开');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -753,6 +778,82 @@ const queryTaskPoolFun = async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const calcMergeCellsFun = (tableData: any) => {
|
||||||
|
const mergeCells: any[] = [];
|
||||||
|
if (!Array.isArray(tableData) || tableData.length === 0) return mergeCells;
|
||||||
|
|
||||||
|
const excludeFields = ['performanceName', 'operation', '_X_ROW_KEY', '_X_ROW_CHILD'];
|
||||||
|
const isEmpty = (v: any) => v === null || v === undefined || v === '';
|
||||||
|
|
||||||
|
const vxeInstance = listTableRef?.value?.loadcaseTableRef?.TreeTableRef?.treeTableRef;
|
||||||
|
let columnOrder: string[] = [];
|
||||||
|
try {
|
||||||
|
if (vxeInstance && typeof vxeInstance.getColumns === 'function') {
|
||||||
|
const cols = vxeInstance.getColumns() || [];
|
||||||
|
columnOrder = cols
|
||||||
|
.map((c: any) => c.property || c.field || c.dataIndex || '')
|
||||||
|
.filter((f: string) => !!f);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error('e', e);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const compCols =
|
||||||
|
Array.isArray(tableColumns?.value) && tableColumns.value.length > 0
|
||||||
|
? tableColumns.value.map((c: any) => c.field || c.dataIndex || c.key).filter(Boolean)
|
||||||
|
: [];
|
||||||
|
const rowKeys = Object.keys(tableData[0] || {});
|
||||||
|
const fullOrder = columnOrder.length > 0 ? columnOrder : compCols.length > 0 ? compCols : rowKeys;
|
||||||
|
|
||||||
|
const fields = fullOrder.filter((f) => !!f && !excludeFields.includes(f));
|
||||||
|
|
||||||
|
const valuesEqual = (a: any, b: any) => {
|
||||||
|
if (isEmpty(a) || isEmpty(b)) return false;
|
||||||
|
if (typeof a === 'object' || typeof b === 'object') {
|
||||||
|
return isEqual(a, b);
|
||||||
|
}
|
||||||
|
return String(a).trim() === String(b).trim();
|
||||||
|
};
|
||||||
|
|
||||||
|
const fieldToColIndex = new Map<string, number>();
|
||||||
|
fullOrder.forEach((f, idx) => {
|
||||||
|
if (!f) return;
|
||||||
|
if (!excludeFields.includes(f) && tableData[0] && Object.prototype.hasOwnProperty.call(tableData[0], f)) {
|
||||||
|
fieldToColIndex.set(f, idx);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
fields.forEach((field) => {
|
||||||
|
const colIdxInFull = fieldToColIndex.has(field) ? fieldToColIndex.get(field)! : -1;
|
||||||
|
if (colIdxInFull === -1) return;
|
||||||
|
|
||||||
|
let start = 0;
|
||||||
|
let startVal = tableData[0][field];
|
||||||
|
|
||||||
|
for (let i = 1; i <= tableData.length; i++) {
|
||||||
|
const curr = i < tableData.length ? tableData[i][field] : undefined;
|
||||||
|
const equal = i < tableData.length && valuesEqual(startVal, curr);
|
||||||
|
|
||||||
|
if (!equal) {
|
||||||
|
const rowspan = i - start;
|
||||||
|
if (rowspan > 1 && !isEmpty(startVal)) {
|
||||||
|
mergeCells.push({
|
||||||
|
row: start + 1,
|
||||||
|
col: colIdxInFull + 1,
|
||||||
|
rowspan,
|
||||||
|
colspan: 1,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
start = i;
|
||||||
|
startVal = curr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return mergeCells;
|
||||||
|
};
|
||||||
|
|
||||||
const queryTaskPoolPerformanceFun = async () => {
|
const queryTaskPoolPerformanceFun = async () => {
|
||||||
performanceLoading.value = true;
|
performanceLoading.value = true;
|
||||||
const req = {
|
const req = {
|
||||||
|
|||||||
@@ -44,6 +44,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #operate="{row}">
|
||||||
|
<el-button link type="dnager" @click="deleteFileFn(row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
</BaseTable>
|
</BaseTable>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -98,6 +102,17 @@ const deleteFileBatchFn = async () => {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const deleteFileFn = async (row:any) => {
|
||||||
|
const param = [row.id];
|
||||||
|
|
||||||
|
const res:any = await batchDeleteBigFileApi(param);
|
||||||
|
if (res && res.code === 200) {
|
||||||
|
ElMessage.success('删除成功');
|
||||||
|
searchFn();
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -1,6 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="storage-page">
|
<div class="storage-page">
|
||||||
<div class="operate-box">
|
<div class="operate-box">
|
||||||
|
|
||||||
|
<div class="targetYm-date">
|
||||||
|
<div class="title" >时间范围:</div>
|
||||||
|
<el-radio-group v-model="formData.intervalMonths" @change="intervalMonthsChangeFn">
|
||||||
|
<el-radio-button v-for="item in monthList" :key="item.value" :value="item.value" :label="item.name" />
|
||||||
|
</el-radio-group>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="targetYm-date" v-if="radio === 'increment'">
|
||||||
|
<div class="title" >增量月份:</div>
|
||||||
|
<el-date-picker
|
||||||
|
class="date-style"
|
||||||
|
v-model="formData.targetYm"
|
||||||
|
type="month"
|
||||||
|
placeholder="请请选择月份"
|
||||||
|
format="YYYY-MM"
|
||||||
|
value-format="YYYY-MM"
|
||||||
|
@change="intervalMonthsChangeFn"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-radio-group v-model="radio" @change="radioChangeFn">
|
<el-radio-group v-model="radio" @change="radioChangeFn">
|
||||||
<el-radio value="default" size="large">默认</el-radio>
|
<el-radio value="default" size="large">默认</el-radio>
|
||||||
<el-radio value="increment" size="large">增量</el-radio>
|
<el-radio value="increment" size="large">增量</el-radio>
|
||||||
@@ -9,78 +31,132 @@
|
|||||||
|
|
||||||
<!-- 项目存储空间统计 -->
|
<!-- 项目存储空间统计 -->
|
||||||
<div class="chart-item" >
|
<div class="chart-item" >
|
||||||
<div class="chart-filter">
|
<div class="chart-content" >
|
||||||
<span>项目:</span>
|
<EchartCard title="项目存储空间统计" ref="projectStorageSpaceStatisticsRef" :charts-id="'chart1'" :bar-type="'barChart'">
|
||||||
<div class="project-name-content">
|
<template #formSlot>
|
||||||
<ProjectSelect
|
<el-form :model="projectStorageSpaceStatisticsFormData" :inline="true">
|
||||||
class="select-width margin-right-12"
|
<el-form-item label="项目:">
|
||||||
v-model="projectStorageSpaceStatisticsFormData.nodeId"
|
<ProjectSelect
|
||||||
@change="initProjectStorageSpaceStatisticsFn"
|
class="select-width margin-right-12"
|
||||||
/>
|
v-model="projectStorageSpaceStatisticsFormData.nodeId"
|
||||||
</div>
|
@change="initProjectStorageSpaceStatisticsFn"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</EchartCard>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-content" id="chart1" ref="projectStorageSpaceStatisticsRef"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 学科存储空间统计 -->
|
<!-- 学科存储空间统计 -->
|
||||||
<div class="chart-item" >
|
<div class="chart-item" >
|
||||||
<div class="chart-filter">
|
|
||||||
<span>学科:</span>
|
<div class="chart-content" >
|
||||||
<div class="project-name-content">
|
<EchartCard title="学科存储空间统计" ref="statisticsOfSubjectStorageSpaceRef" :charts-id="'chart2'" :bar-type="'barChart'">
|
||||||
<el-select v-model="statisticsOfSubjectStorageSpaceFormData.nodeId" @change="initStatisticsOfSubjectStorageSpaceFn">
|
<template #formSlot>
|
||||||
<el-option v-for="item in disciplineOptions" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
<el-form :model="statisticsOfSubjectStorageSpaceFormData" :inline="true">
|
||||||
</el-select>
|
<el-form-item label="学科:">
|
||||||
</div>
|
<el-select class="select-width" v-model="statisticsOfSubjectStorageSpaceFormData.nodeId" @change="initStatisticsOfSubjectStorageSpaceFn">
|
||||||
|
<el-option v-for="item in disciplineOptions" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
</EchartCard>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-content" id="chart2" ref="statisticsOfSubjectStorageSpaceRef"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 用户存储空间统计 -->
|
<!-- 用户存储空间统计 -->
|
||||||
<div class="chart-item" >
|
<div class="chart-item" >
|
||||||
<div class="chart-filter">
|
|
||||||
<span>用户组:</span>
|
<div class="chart-content" >
|
||||||
<div class="project-name-content mr10" >
|
<EchartCard title="用户存储空间统计" ref="userStorageSpaceStatisticsRef" :charts-id="'chart3'" :bar-type="'barChart'">
|
||||||
<el-select
|
<template #formSlot>
|
||||||
clearable
|
<el-form :model="userStorageSpaceStatisticsFormData" :inline="true">
|
||||||
class="select-width margin-right-12"
|
<el-form-item label="用户组:">
|
||||||
v-model="userStorageSpaceStatisticsFormData.userGroupId"
|
<el-select
|
||||||
@change="initUserStorageSpaceStatisticsFn"
|
clearable
|
||||||
>
|
class="select-width margin-right-12"
|
||||||
<el-option
|
v-model="userStorageSpaceStatisticsFormData.userGroupId"
|
||||||
v-for="item in userGroupOptions"
|
@change="initUserStorageSpaceStatisticsFn"
|
||||||
:label="item.label"
|
>
|
||||||
:value="item.value"
|
<el-option
|
||||||
:key="item.value"
|
v-for="item in userGroupOptions"
|
||||||
></el-option>
|
:label="item.label"
|
||||||
</el-select>
|
:value="item.value"
|
||||||
</div>
|
:key="item.value"
|
||||||
<span>用户:</span>
|
></el-option>
|
||||||
<div class="project-name-content">
|
</el-select>
|
||||||
<UserSelect
|
</el-form-item>
|
||||||
class="select-width"
|
<el-form-item label="用户:">
|
||||||
v-model="userStorageSpaceStatisticsFormData.userIds"
|
<UserSelect
|
||||||
@change="initUserStorageSpaceStatisticsFn"
|
class="select-width"
|
||||||
/>
|
v-model="userStorageSpaceStatisticsFormData.userIds"
|
||||||
</div>
|
@change="initUserStorageSpaceStatisticsFn"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</EchartCard>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="chart-content" id="chart3" ref="userStorageSpaceStatisticsRef"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, defineProps, defineEmits, reactive, onMounted } from 'vue';
|
import { ref, reactive, onMounted, nextTick } from 'vue';
|
||||||
import ProjectSelect from '@/components/common/projectSelect/index.vue';
|
import ProjectSelect from '@/components/common/projectSelect/index.vue';
|
||||||
import UserSelect from '@/components/common/userSelect/index.vue';
|
import UserSelect from '@/components/common/userSelect/index.vue';
|
||||||
import { queryNodeListApi } from '@/api/project/node';
|
import { queryNodeListApi } from '@/api/project/node';
|
||||||
import { userQueryGroupApi } from '@/api/system/user';
|
import { userQueryGroupApi } from '@/api/system/user';
|
||||||
|
import { getDirectorySizeByUserIdApi, getNodeSizeByNodeTypeApi } from '@/api/data/data';
|
||||||
|
import EchartCard from '@/components/common/echartCard/index.vue';
|
||||||
|
|
||||||
const radio = ref('default');
|
const radio = ref('default');
|
||||||
|
|
||||||
const radioChangeFn = () => {
|
const formData = reactive({
|
||||||
|
targetYm: '',
|
||||||
|
intervalMonths: 6,
|
||||||
|
});
|
||||||
|
|
||||||
|
const monthList = ref([
|
||||||
|
{
|
||||||
|
value: 6,
|
||||||
|
name: '近6个月',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 12,
|
||||||
|
name: '近1年',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 24,
|
||||||
|
name: '近2年',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 36,
|
||||||
|
name: '近3年',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const radioChangeFn = async () => {
|
||||||
|
formData.targetYm = '';
|
||||||
|
|
||||||
|
await initProjectStorageSpaceStatisticsFn();
|
||||||
|
await initStatisticsOfSubjectStorageSpaceFn();
|
||||||
|
await initUserStorageSpaceStatisticsFn();
|
||||||
|
};
|
||||||
|
|
||||||
|
const intervalMonthsChangeFn = async () => {
|
||||||
|
await initProjectStorageSpaceStatisticsFn();
|
||||||
|
await initStatisticsOfSubjectStorageSpaceFn();
|
||||||
|
await initUserStorageSpaceStatisticsFn();
|
||||||
};
|
};
|
||||||
|
|
||||||
// 项目存储空间统计
|
// 项目存储空间统计
|
||||||
@@ -91,6 +167,73 @@ const projectStorageSpaceStatisticsFormData = reactive({
|
|||||||
|
|
||||||
const initProjectStorageSpaceStatisticsFn = async () => {
|
const initProjectStorageSpaceStatisticsFn = async () => {
|
||||||
|
|
||||||
|
const xData:any = [];
|
||||||
|
const seriesData:any = [];
|
||||||
|
|
||||||
|
const res:any = await getNodeSizeByNodeTypeApi({
|
||||||
|
queryNodeType: 'project',
|
||||||
|
nodeId: projectStorageSpaceStatisticsFormData.nodeId,
|
||||||
|
intervalMonths: formData.intervalMonths,
|
||||||
|
targetYm: formData.targetYm,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (res && res.code === 200) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
projectStorageSpaceStatisticsRef.value.commonChartRef.disposeEchartsByKey('chart1');
|
||||||
|
|
||||||
|
projectStorageSpaceStatisticsRef.value.commonChartRef.option = {
|
||||||
|
title: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
show: false,
|
||||||
|
top: '0%',
|
||||||
|
left: 'center',
|
||||||
|
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: '10%',
|
||||||
|
bottom: '10%',
|
||||||
|
left: '5%',
|
||||||
|
right: '5%',
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: xData,
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
},
|
||||||
|
dataZoom:
|
||||||
|
xData.length > 4
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
type: 'slider',
|
||||||
|
show: true,
|
||||||
|
xAxisIndex: [0],
|
||||||
|
start: 0,
|
||||||
|
end: 100,
|
||||||
|
textStyle: {
|
||||||
|
color: 'transparent',
|
||||||
|
},
|
||||||
|
maxValueSpan: 4,
|
||||||
|
minValueSpan: 4,
|
||||||
|
moveHandleSize: 10,
|
||||||
|
height: 0,
|
||||||
|
filterMode: 'empty',
|
||||||
|
bottom: 15,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: null,
|
||||||
|
series: seriesData,
|
||||||
|
};
|
||||||
|
projectStorageSpaceStatisticsRef.value.commonChartRef.initChart();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 学科存储空间统计
|
// 学科存储空间统计
|
||||||
@@ -100,7 +243,71 @@ const statisticsOfSubjectStorageSpaceFormData = reactive({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const initStatisticsOfSubjectStorageSpaceFn = async () => {
|
const initStatisticsOfSubjectStorageSpaceFn = async () => {
|
||||||
|
const xData:any = [];
|
||||||
|
const seriesData:any = [];
|
||||||
|
const res:any = await getNodeSizeByNodeTypeApi({
|
||||||
|
queryNodeType: 'discipline',
|
||||||
|
nodeId: projectStorageSpaceStatisticsFormData.nodeId,
|
||||||
|
intervalMonths: formData.intervalMonths,
|
||||||
|
targetYm: formData.targetYm,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (res && res.code === 200) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
statisticsOfSubjectStorageSpaceRef.value.commonChartRef.disposeEchartsByKey('chart2');
|
||||||
|
|
||||||
|
statisticsOfSubjectStorageSpaceRef.value.commonChartRef.option = {
|
||||||
|
title: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
show: false,
|
||||||
|
top: '0%',
|
||||||
|
left: 'center',
|
||||||
|
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: '10%',
|
||||||
|
bottom: '10%',
|
||||||
|
left: '5%',
|
||||||
|
right: '5%',
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: xData,
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
},
|
||||||
|
dataZoom:
|
||||||
|
xData.length > 4
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
type: 'slider',
|
||||||
|
show: true,
|
||||||
|
xAxisIndex: [0],
|
||||||
|
start: 0,
|
||||||
|
end: 100,
|
||||||
|
textStyle: {
|
||||||
|
color: 'transparent',
|
||||||
|
},
|
||||||
|
maxValueSpan: 4,
|
||||||
|
minValueSpan: 4,
|
||||||
|
moveHandleSize: 10,
|
||||||
|
height: 0,
|
||||||
|
filterMode: 'empty',
|
||||||
|
bottom: 15,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: null,
|
||||||
|
series: seriesData,
|
||||||
|
};
|
||||||
|
statisticsOfSubjectStorageSpaceRef.value.commonChartRef.initChart();
|
||||||
};
|
};
|
||||||
|
|
||||||
// 用户存储空间统计
|
// 用户存储空间统计
|
||||||
@@ -111,7 +318,70 @@ const userStorageSpaceStatisticsFormData = reactive({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const initUserStorageSpaceStatisticsFn = async () => {
|
const initUserStorageSpaceStatisticsFn = async () => {
|
||||||
|
const xData:any = [];
|
||||||
|
const seriesData:any = [];
|
||||||
|
const res:any = await getDirectorySizeByUserIdApi({
|
||||||
|
userIds: userStorageSpaceStatisticsFormData.userIds,
|
||||||
|
intervalMonths: formData.intervalMonths,
|
||||||
|
targetYm: formData.targetYm,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (res && res.code === 200) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
userStorageSpaceStatisticsRef.value.commonChartRef.disposeEchartsByKey('chart3');
|
||||||
|
|
||||||
|
userStorageSpaceStatisticsRef.value.commonChartRef.option = {
|
||||||
|
title: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
show: false,
|
||||||
|
top: '0%',
|
||||||
|
left: 'center',
|
||||||
|
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: '10%',
|
||||||
|
bottom: '10%',
|
||||||
|
left: '5%',
|
||||||
|
right: '5%',
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: xData,
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
},
|
||||||
|
dataZoom:
|
||||||
|
xData.length > 4
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
type: 'slider',
|
||||||
|
show: true,
|
||||||
|
xAxisIndex: [0],
|
||||||
|
start: 0,
|
||||||
|
end: 100,
|
||||||
|
textStyle: {
|
||||||
|
color: 'transparent',
|
||||||
|
},
|
||||||
|
maxValueSpan: 4,
|
||||||
|
minValueSpan: 4,
|
||||||
|
moveHandleSize: 10,
|
||||||
|
height: 0,
|
||||||
|
filterMode: 'empty',
|
||||||
|
bottom: 15,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: null,
|
||||||
|
series: seriesData,
|
||||||
|
};
|
||||||
|
userStorageSpaceStatisticsRef.value.commonChartRef.initChart();
|
||||||
};
|
};
|
||||||
|
|
||||||
const disciplineOptions = ref<any>([]);
|
const disciplineOptions = ref<any>([]);
|
||||||
@@ -151,6 +421,12 @@ const getGroupList = async () => {
|
|||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getDisciplineOptionsFun();
|
await getDisciplineOptionsFun();
|
||||||
await getGroupList();
|
await getGroupList();
|
||||||
|
|
||||||
|
nextTick(() => {
|
||||||
|
initProjectStorageSpaceStatisticsFn();
|
||||||
|
initStatisticsOfSubjectStorageSpaceFn();
|
||||||
|
initUserStorageSpaceStatisticsFn();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@@ -162,6 +438,10 @@ onMounted(async () => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.select-width{
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
.operate-box{
|
.operate-box{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
@@ -170,6 +450,22 @@ onMounted(async () => {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
|
|
||||||
|
.targetYm-date{
|
||||||
|
display: flex;
|
||||||
|
height: 50px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-right: 12px;
|
||||||
|
|
||||||
|
.title{
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.date-style){
|
||||||
|
width: 150px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart-item {
|
.chart-item {
|
||||||
@@ -197,6 +493,11 @@ onMounted(async () => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chart-content{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user