提交修复代码
This commit is contained in:
parent
218538eb21
commit
f353388f49
|
@ -145,6 +145,14 @@ export function pageResource(query: any): AxiosPromise<any[]> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function awaitResourceCount(query: any): AxiosPromise<number> {
|
||||||
|
return request({
|
||||||
|
url: '/file/resource/await/count',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export function pagePerson(query: any): AxiosPromise<any[]> {
|
export function pagePerson(query: any): AxiosPromise<any[]> {
|
||||||
return request({
|
return request({
|
||||||
url: '/oss/person/pageList',
|
url: '/oss/person/pageList',
|
||||||
|
@ -153,6 +161,14 @@ export function pagePerson(query: any): AxiosPromise<any[]> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function awaitTextbookCount(query: any): AxiosPromise<number> {
|
||||||
|
return request({
|
||||||
|
url: '/file/textbook/await/count',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export function awaitTexbookList(query: any): AxiosPromise<any[]> {
|
export function awaitTexbookList(query: any): AxiosPromise<any[]> {
|
||||||
return request({
|
return request({
|
||||||
url: '/file/textbook/await/pageList',
|
url: '/file/textbook/await/pageList',
|
||||||
|
|
|
@ -17,6 +17,12 @@
|
||||||
<b style="color: #f56c6c">{{ fileType.join('、') }}</b>
|
<b style="color: #f56c6c">{{ fileType.join('、') }}</b>
|
||||||
</template>
|
</template>
|
||||||
格式文件
|
格式文件
|
||||||
|
<p>
|
||||||
|
文件大小限制
|
||||||
|
<template v-if="fileSize">
|
||||||
|
<b style="color: #f56c6c">{{ fileSize }}MB</b>
|
||||||
|
</template>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<!-- 文件列表 -->
|
<!-- 文件列表 -->
|
||||||
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
|
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
|
||||||
|
@ -48,7 +54,7 @@ const props = defineProps({
|
||||||
// 大小限制(MB)
|
// 大小限制(MB)
|
||||||
fileSize: propTypes.number.def(1024),
|
fileSize: propTypes.number.def(1024),
|
||||||
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||||
fileType: propTypes.array.def(['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf', 'txt', 'jpg', 'png', 'jpeg', 'gif', 'bmp', 'mp4', 'mov', 'wmv', 'flv', 'avi', 'mkv', 'mp3', 'wma']),
|
fileType: propTypes.array.def(['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf', 'txt', 'jpg', 'png', 'jpeg', 'gif', 'bmp', 'mp4', 'mov', 'wmv', 'flv', 'avi', 'mkv', 'mp3', 'wma', 'zip', 'rar']),
|
||||||
// 是否显示提示
|
// 是否显示提示
|
||||||
isShowTip: propTypes.bool.def(true)
|
isShowTip: propTypes.bool.def(true)
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,8 +5,14 @@
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<el-button type="" text="plain">全部专题资源</el-button>
|
<el-button type="" text="plain">全部专题资源</el-button>
|
||||||
<br>
|
<br>
|
||||||
<el-button v-hasPermi="['file:textbook:awaitList']" :class="['btn-audit', isAudit && 'active']" type=""
|
|
||||||
|
<el-badge v-if="auditNum > 0" :value="auditNum" style="margin-left:10px;margin-top: 10px;">
|
||||||
|
<el-button v-hasPermi="['file:resource:awaitList']" :class="['btn-audit', isAudit && 'active']" type=""
|
||||||
|
text="plain" @click="handleAudit">待审核</el-button>
|
||||||
|
</el-badge>
|
||||||
|
<el-button v-else v-hasPermi="['file:resource:awaitList']" :class="['btn-audit', isAudit && 'active']" type=""
|
||||||
text="plain" @click="handleAudit">待审核</el-button>
|
text="plain" @click="handleAudit">待审核</el-button>
|
||||||
|
|
||||||
<div class="tree-container-scroll">
|
<div class="tree-container-scroll">
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<el-tree ref="treeRef" v-loading="treeLoading" :data="treeData" :props="defaultProps" default-expand-all
|
<el-tree ref="treeRef" v-loading="treeLoading" :data="treeData" :props="defaultProps" default-expand-all
|
||||||
|
@ -175,7 +181,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Oss" lang="ts">
|
<script setup name="Oss" lang="ts">
|
||||||
import { pageResource, awaitResourceList, previewResource, previewResourceTxt, delResource, addResource, reviewResource, copyResource, moveResource } from '@/api/system/oss';
|
import { pageResource, awaitResourceList, awaitResourceCount, previewResource, delResource, addResource, reviewResource, copyResource, moveResource } from '@/api/system/oss';
|
||||||
import FileMd5Upload from '@/components/FileMd5Upload/index.vue';
|
import FileMd5Upload from '@/components/FileMd5Upload/index.vue';
|
||||||
import { OssForm, OssQuery, OssVO } from '@/api/system/oss/types';
|
import { OssForm, OssQuery, OssVO } from '@/api/system/oss/types';
|
||||||
import { listCatalogResource } from "@/api/resource/catalogResource";
|
import { listCatalogResource } from "@/api/resource/catalogResource";
|
||||||
|
@ -327,6 +333,7 @@ function reset() {
|
||||||
function handleQuery() {
|
function handleQuery() {
|
||||||
queryParams.value.pageNum = 1;
|
queryParams.value.pageNum = 1;
|
||||||
getList();
|
getList();
|
||||||
|
awaitResourceCountData()
|
||||||
}
|
}
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
|
@ -344,24 +351,7 @@ function handleSelectionChange(selection: OssVO[]) {
|
||||||
const handleHeaderClass = ({ column }: any): any => {
|
const handleHeaderClass = ({ column }: any): any => {
|
||||||
column.order = column.multiOrder;
|
column.order = column.multiOrder;
|
||||||
};
|
};
|
||||||
/** 点击表头进行排序 */
|
|
||||||
const handleHeaderCLick = (column: any) => {
|
|
||||||
if (column.sortable !== 'custom') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
switch (column.multiOrder) {
|
|
||||||
case 'descending':
|
|
||||||
column.multiOrder = 'ascending';
|
|
||||||
break;
|
|
||||||
case 'ascending':
|
|
||||||
column.multiOrder = '';
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
column.multiOrder = 'descending';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
handleOrderChange(column.property, column.multiOrder);
|
|
||||||
};
|
|
||||||
const handleOrderChange = (prop: string, order: string) => {
|
const handleOrderChange = (prop: string, order: string) => {
|
||||||
let orderByArr = queryParams.value.orderByColumn ? queryParams.value.orderByColumn.split(',') : [];
|
let orderByArr = queryParams.value.orderByColumn ? queryParams.value.orderByColumn.split(',') : [];
|
||||||
let isAscArr = queryParams.value.isAsc ? queryParams.value.isAsc.split(',') : [];
|
let isAscArr = queryParams.value.isAsc ? queryParams.value.isAsc.split(',') : [];
|
||||||
|
@ -384,6 +374,7 @@ const handleOrderChange = (prop: string, order: string) => {
|
||||||
queryParams.value.orderByColumn = orderByArr.join(',');
|
queryParams.value.orderByColumn = orderByArr.join(',');
|
||||||
queryParams.value.isAsc = isAscArr.join(',');
|
queryParams.value.isAsc = isAscArr.join(',');
|
||||||
getList();
|
getList();
|
||||||
|
awaitResourceCountData()
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 文件按钮操作 */
|
/** 文件按钮操作 */
|
||||||
|
@ -406,6 +397,7 @@ const submitForm = async () => {
|
||||||
await addResource({ ossId, catalogId, fileName: fileName.value })
|
await addResource({ ossId, catalogId, fileName: fileName.value })
|
||||||
dialog.visible = false;
|
dialog.visible = false;
|
||||||
getList();
|
getList();
|
||||||
|
awaitResourceCountData()
|
||||||
};
|
};
|
||||||
|
|
||||||
const submitMoveForm = () => {
|
const submitMoveForm = () => {
|
||||||
|
@ -487,6 +479,7 @@ const handleAudit = () => {
|
||||||
isTree.value = false
|
isTree.value = false
|
||||||
|
|
||||||
getList()
|
getList()
|
||||||
|
awaitResourceCountData()
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleNode = (node: any) => {
|
const handleNode = (node: any) => {
|
||||||
|
@ -498,6 +491,7 @@ const handleNode = (node: any) => {
|
||||||
|
|
||||||
queryParams.value.catalogId = node.catalogId
|
queryParams.value.catalogId = node.catalogId
|
||||||
getList()
|
getList()
|
||||||
|
awaitResourceCountData()
|
||||||
}
|
}
|
||||||
|
|
||||||
const preViewUrl = import.meta.env.VITE_APP_PREVIEW
|
const preViewUrl = import.meta.env.VITE_APP_PREVIEW
|
||||||
|
@ -518,9 +512,16 @@ const getlistCatalogResource = async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auditNum = ref(0)
|
||||||
|
const awaitResourceCountData = async () => {
|
||||||
|
const res = await awaitResourceCount(queryParams.value)
|
||||||
|
auditNum.value = res.data
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getlistCatalogResource()
|
getlistCatalogResource()
|
||||||
getList();
|
getList();
|
||||||
|
awaitResourceCountData()
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,15 @@
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
<el-button type="" text="plain">全部文件</el-button>
|
<el-button type="" text="plain">全部文件</el-button>
|
||||||
<br>
|
<br>
|
||||||
<el-button v-hasPermi="['file:textbook:awaitList']" :class="['btn-audit', isAudit && 'active']" type=""
|
|
||||||
|
|
||||||
|
<el-badge v-if="auditNum > 0" :value="auditNum" style="margin-left:10px;margin-top: 10px;">
|
||||||
|
<el-button v-hasPermi="['file:textbook:awaitList']" :class="['btn-audit', isAudit && 'active']" type=""
|
||||||
|
text="plain" @click="handleAudit">待审核</el-button>
|
||||||
|
</el-badge>
|
||||||
|
<el-button v-else v-hasPermi="['file:textbook:awaitList']" :class="['btn-audit', isAudit && 'active']" type=""
|
||||||
text="plain" @click="handleAudit">待审核</el-button>
|
text="plain" @click="handleAudit">待审核</el-button>
|
||||||
|
|
||||||
<div class="tree-container-scroll">
|
<div class="tree-container-scroll">
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<el-tree ref="treeRef" v-loading="treeLoading" :data="treeData" :props="defaultProps" default-expand-all
|
<el-tree ref="treeRef" v-loading="treeLoading" :data="treeData" :props="defaultProps" default-expand-all
|
||||||
|
@ -182,7 +189,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Oss" lang="ts">
|
<script setup name="Oss" lang="ts">
|
||||||
import { pageTextbook, awaitTexbookList, previewTextbook, previewTextbookTxt, delTextbook, addTextbook, reviewTextbook, copyTextbook, moveTextbook } from '@/api/system/oss';
|
import { pageTextbook, awaitTexbookList, previewTextbook, awaitTextbookCount, delTextbook, addTextbook, reviewTextbook, copyTextbook, moveTextbook } from '@/api/system/oss';
|
||||||
import FileMd5Upload from '@/components/FileMd5Upload/index.vue';
|
import FileMd5Upload from '@/components/FileMd5Upload/index.vue';
|
||||||
import { OssForm, OssQuery, OssVO } from '@/api/system/oss/types';
|
import { OssForm, OssQuery, OssVO } from '@/api/system/oss/types';
|
||||||
import { listCatalogTextbook } from "@/api/resource/catalogTextbook";
|
import { listCatalogTextbook } from "@/api/resource/catalogTextbook";
|
||||||
|
@ -308,6 +315,7 @@ const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
const handleTypeChange = () => {
|
const handleTypeChange = () => {
|
||||||
getList()
|
getList()
|
||||||
|
awaitTextbookCountData()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询OSS对象存储列表 */
|
/** 查询OSS对象存储列表 */
|
||||||
|
@ -339,6 +347,7 @@ function reset() {
|
||||||
function handleQuery() {
|
function handleQuery() {
|
||||||
queryParams.value.pageNum = 1;
|
queryParams.value.pageNum = 1;
|
||||||
getList();
|
getList();
|
||||||
|
awaitTextbookCountData()
|
||||||
}
|
}
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
|
@ -384,6 +393,7 @@ const submitForm = async () => {
|
||||||
await addTextbook({ ossId, catalogId, fileName: fileName.value, type: queryParams.value.type })
|
await addTextbook({ ossId, catalogId, fileName: fileName.value, type: queryParams.value.type })
|
||||||
dialog.visible = false;
|
dialog.visible = false;
|
||||||
getList();
|
getList();
|
||||||
|
awaitTextbookCountData()
|
||||||
};
|
};
|
||||||
|
|
||||||
const submitMoveForm = () => {
|
const submitMoveForm = () => {
|
||||||
|
@ -465,6 +475,7 @@ const handleAudit = () => {
|
||||||
isTree.value = false
|
isTree.value = false
|
||||||
|
|
||||||
getList()
|
getList()
|
||||||
|
awaitTextbookCountData()
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleNode = (node: any) => {
|
const handleNode = (node: any) => {
|
||||||
|
@ -476,6 +487,7 @@ const handleNode = (node: any) => {
|
||||||
|
|
||||||
queryParams.value.catalogId = node.catalogId
|
queryParams.value.catalogId = node.catalogId
|
||||||
getList()
|
getList()
|
||||||
|
awaitTextbookCountData()
|
||||||
}
|
}
|
||||||
|
|
||||||
const preViewUrl = import.meta.env.VITE_APP_PREVIEW
|
const preViewUrl = import.meta.env.VITE_APP_PREVIEW
|
||||||
|
@ -496,9 +508,16 @@ const getListCatalogTextbook = async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auditNum = ref(0)
|
||||||
|
const awaitTextbookCountData = async () => {
|
||||||
|
const res = await awaitTextbookCount(queryParams.value)
|
||||||
|
auditNum.value = res.data
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getListCatalogTextbook()
|
getListCatalogTextbook()
|
||||||
getList();
|
getList();
|
||||||
|
awaitTextbookCountData()
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,9 @@
|
||||||
<el-input v-model="form.username" placeholder="请输入系统用户名" maxlength="30" />
|
<el-input v-model="form.username" placeholder="请输入系统用户名" maxlength="30" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="!form.id" label="用户密码" prop="password">
|
<el-form-item v-if="!form.id" label="用户密码" prop="password">
|
||||||
<el-input v-model="form.password" type="password" placeholder="请输入系统用户密码" maxlength="20" />
|
<el-tooltip effect="dark" content="包含至少8个字符,包括大写字母、小写字母、数字和特殊字符" placement="top">
|
||||||
|
<el-input v-model="form.password" type="password" placeholder="请输入系统用户密码" maxlength="20" />
|
||||||
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="租户套餐" prop="packageId">
|
<el-form-item label="租户套餐" prop="packageId">
|
||||||
<el-select v-model="form.packageId" :disabled="!!form.tenantId" placeholder="请选择租户套餐" clearable
|
<el-select v-model="form.packageId" :disabled="!!form.tenantId" placeholder="请选择租户套餐" clearable
|
||||||
|
|
|
@ -162,7 +162,9 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item v-if="form.userId == undefined" label="密码" prop="password">
|
<el-form-item v-if="form.userId == undefined" label="密码" prop="password">
|
||||||
<el-input v-model="form.password" placeholder="请输入密码" type="password" maxlength="20" show-password />
|
<el-tooltip effect="dark" content="包含至少8个字符,包括大写字母、小写字母、数字和特殊字符" placement="top">
|
||||||
|
<el-input v-model="form.password" placeholder="请输入密码" type="password" maxlength="20" show-password />
|
||||||
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
Loading…
Reference in New Issue