feat(aihr): 重构运营后台与租户知识治理

- 重构运营总览、侧栏和内容运营工作台\n- 增加大喇叭、成果审核与运营统计链路\n- 补齐租户、知识空间、分类和知识维护闭环\n- 加固标签页租户上下文、停用租户写保护与迁移预检
This commit is contained in:
2026-07-23 01:24:22 +08:00
parent 333c365c6f
commit 163b08ecfe
94 changed files with 8610 additions and 1114 deletions
+5 -1
View File
@@ -31,7 +31,7 @@ import '@vueup/vue-quill/dist/vue-quill.snow.css';
import { QuillEditor, Quill } from '@vueup/vue-quill';
import { propTypes } from '@/utils/propTypes';
import { globalHeaders } from '@/utils/request';
import { globalHeaders, reconcileTenantContextResponse } from '@/utils/request';
defineEmits(['update:modelValue']);
@@ -56,6 +56,9 @@ const upload = reactive<UploadOption>({
headers: globalHeaders(),
url: import.meta.env.VITE_APP_BASE_API + '/resource/oss/upload'
});
watchEffect(() => {
upload.headers = globalHeaders();
});
const quillEditorRef = ref();
const uploadRef = ref<HTMLDivElement>();
@@ -118,6 +121,7 @@ watch(
// 图片上传成功返回图片地址
const handleUploadSuccess = (res: any) => {
reconcileTenantContextResponse(res);
// 如果上传成功
if (res.code === 200) {
// 获取富文本实例
+3 -2
View File
@@ -47,7 +47,7 @@
<script setup lang="ts">
import { propTypes } from '@/utils/propTypes';
import { delOss, listByIds } from '@/api/system/oss';
import { globalHeaders } from '@/utils/request';
import { globalHeaders, reconcileTenantContextResponse } from '@/utils/request';
const props = defineProps({
modelValue: {
@@ -73,7 +73,7 @@ const uploadList = ref<any[]>([]);
const baseUrl = import.meta.env.VITE_APP_BASE_API;
const uploadFileUrl = ref(baseUrl + '/resource/oss/upload'); // 上传文件服务器地址
const headers = ref(globalHeaders());
const headers = computed(() => globalHeaders());
const fileList = ref<any[]>([]);
const showTip = computed(() => props.isShowTip && (props.fileType || props.fileSize));
@@ -158,6 +158,7 @@ const handleUploadError = () => {
// 上传成功回调
const handleUploadSuccess = (res: any, file: UploadFile) => {
reconcileTenantContextResponse(res);
if (res.code === 200) {
uploadList.value.push({
name: res.data.fileName,
+35 -3
View File
@@ -1,11 +1,27 @@
<template>
<div style="padding: 0 15px" @click="toggleClick">
<svg :class="{ 'is-active': isActive }" class="hamburger" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="64" height="64">
<button
type="button"
class="hamburger-trigger"
:aria-label="isActive ? '收起侧栏' : '展开侧栏'"
:aria-expanded="isActive"
aria-controls="main-navigation"
@click="toggleClick"
>
<svg
:class="{ 'is-active': isActive }"
class="hamburger"
viewBox="0 0 1024 1024"
xmlns="http://www.w3.org/2000/svg"
width="64"
height="64"
aria-hidden="true"
focusable="false"
>
<path
d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"
/>
</svg>
</div>
</button>
</template>
<script setup lang="ts">
@@ -22,6 +38,22 @@ const toggleClick = () => {
</script>
<style scoped>
.hamburger-trigger {
display: flex;
height: 50px;
padding: 0 15px;
align-items: center;
border: 0;
background: transparent;
color: inherit;
cursor: pointer;
&:focus-visible {
outline: 2px solid #236fd7;
outline-offset: -3px;
}
}
.hamburger {
display: inline-block;
vertical-align: middle;
@@ -44,7 +44,7 @@
import { listByIds, delOss } from '@/api/system/oss';
import { OssVO } from '@/api/system/oss/types';
import { propTypes } from '@/utils/propTypes';
import { globalHeaders } from '@/utils/request';
import { globalHeaders, reconcileTenantContextResponse } from '@/utils/request';
import { compressAccurately } from 'image-conversion';
const props = defineProps({
@@ -81,7 +81,7 @@ const dialogVisible = ref(false);
const baseUrl = import.meta.env.VITE_APP_BASE_API;
const uploadImgUrl = ref(baseUrl + '/resource/oss/upload'); // 上传的图片服务器地址
const headers = ref(globalHeaders());
const headers = computed(() => globalHeaders());
const fileList = ref<any[]>([]);
const showTip = computed(() => props.isShowTip && (props.fileType || props.fileSize));
@@ -173,6 +173,7 @@ const handleExceed = () => {
// 上传成功回调
const handleUploadSuccess = (res: any, file: UploadFile) => {
reconcileTenantContextResponse(res);
if (res.code === 200) {
uploadList.value.push({ name: res.data.fileName, url: res.data.url, ossId: res.data.ossId });
uploadedSuccessfully();