Merge branch 'master' of https://gitcode.com/hk_openRepo/OpenRepo_Portal into dev-shenjianbin

This commit is contained in:
shenjianbin
2025-03-15 15:09:24 +08:00
20 changed files with 545 additions and 113 deletions

View File

@@ -1,37 +1,20 @@
<template>
<div class="version-info">
<Card simple class="jyh-card mt-3">
<div class="card-title">预警通知列表</div>
<div class="mb-3">
<d-table
class="jyh-table jyh-table-2"
:header-bg="true"
:data="licenseTableData"
>
<d-column field="code" header="编号"></d-column>
<d-column field="name" header="名称">
<template #default="scope">
<a @click="openWarningDetail(scope.row)">{{ scope.row.name }}</a>
</template>
</d-column>
<d-column field="detail" header="描述"></d-column>
</d-table>
</div>
</Card>
<d-modal class="warning-modal" v-model="warningModalVisable" title="主题:">
<EarlyWarningDetail @close="colseWarningDetail" :warningData="currentWarning" type="user"></EarlyWarningDetail>
</d-modal>
<d-tabs class="jyh-tabs jyh-tabs-2 jyh-tabs-4" type="wrapped" v-model="selectTab">
<d-tab id="gryj" title="个人预警通知列表"></d-tab>
<d-tab id="zzyj" title="组织预警通知列表"></d-tab>
</d-tabs>
<EarlyWarningPerson v-if="selectTab==='gryj'"/>
<EarlyWarningOrganization v-if="selectTab==='zzyj'"/>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import EarlyWarningDetail from '@/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue';
const licenseTableData = ref([{code: '05822156', name:'MIT License',detail: 'integer'}]);
const CopyrightTableData = ref([{code: '05822156',detail: 'integer'}]);
import EarlyWarningPerson from './EarlyWarningPerson.vue';
import EarlyWarningOrganization from './EarlyWarningOrganization.vue';
const selectTab = ref('gryj');
const warningModalVisable = ref(false);
const currentWarning = ref();

View File

@@ -0,0 +1,47 @@
<template>
<Card simple class="jyh-card mt-3">
<div class="card-title">组织预警通知列表</div>
<div class="mb-3">
<d-table
class="jyh-table jyh-table-2"
:header-bg="true"
:data="licenseTableData"
>
<d-column field="code" header="时间"></d-column>
<d-column field="name" header="标题">
<template #default="scope">
<a>{{scope.row.name}}</a>
</template>
</d-column>
<d-column field="detail" header="详情"></d-column>
<d-column field="level" header="级别">
<template #default="scope,text">
<d-status v-if="scope.row.level===4" type="error">危险</d-status>
<d-status v-if="scope.row.level===3" type="warning">严重</d-status>
<d-status v-if="scope.row.level===2" class="yellow-status">一般</d-status>
<d-status v-if="scope.row.level===1" type="running">提示</d-status>
</template>
</d-column>
</d-table>
</div>
</Card>
</template>
<script setup lang="ts">
import { ref } from 'vue';
const licenseTableData = ref([
{code: '05822156', name:'MIT License',detail: 'integer',level: 4},
{code: '05822156', name:'MIT License',detail: 'integer',level: 3},
{code: '05822156', name:'MIT License',detail: 'integer',level: 2},
{code: '05822156', name:'MIT License',detail: 'integer',level: 1},
]);
</script>
<style scoped lang="scss">
@import 'devui-theme/styles-var/devui-var.scss';
</style>

View File

@@ -0,0 +1,47 @@
<template>
<Card simple class="jyh-card mt-3">
<div class="card-title">个人预警通知列表</div>
<div class="mb-3">
<d-table
class="jyh-table jyh-table-2"
:header-bg="true"
:data="licenseTableData"
>
<d-column field="code" header="时间"></d-column>
<d-column field="name" header="标题">
<template #default="scope">
<a>{{scope.row.name}}</a>
</template>
</d-column>
<d-column field="detail" header="详情"></d-column>
<d-column field="level" header="级别">
<template #default="scope,text">
<d-status v-if="scope.row.level===4" type="error">危险</d-status>
<d-status v-if="scope.row.level===3" type="warning">严重</d-status>
<d-status v-if="scope.row.level===2" class="yellow-status">一般</d-status>
<d-status v-if="scope.row.level===1" type="running">提示</d-status>
</template>
</d-column>
</d-table>
</div>
</Card>
</template>
<script setup lang="ts">
import { ref } from 'vue';
const licenseTableData = ref([
{code: '05822156', name:'MIT License',detail: 'integer',level: 4},
{code: '05822156', name:'MIT License',detail: 'integer',level: 3},
{code: '05822156', name:'MIT License',detail: 'integer',level: 2},
{code: '05822156', name:'MIT License',detail: 'integer',level: 1},
]);
</script>
<style scoped lang="scss">
@import 'devui-theme/styles-var/devui-var.scss';
</style>

View File

@@ -0,0 +1,98 @@
<template>
<div>
<div v-if="hasOrganization"></div>
<div v-else>
<NoData>
<div class="font-bold mb-[20px]">很抱歉当前无任何组织赶快去</div>
<d-button
size="lg"
variant="solid"
@click="createOrganizationBtnClick"
>新建组织</d-button>
</NoData>
</div>
</div>
<d-modal
v-model="createOrganizationModalCtrl"
title="新建组织"
class="w-[600px]"
>
<d-form
ref="createFormRef"
layout="vertical"
:data="createFormData"
message-type="none"
>
<d-form-item
field="organizationName"
label="组织名称"
required
>
<d-input v-model="createFormData.organizationName" />
</d-form-item>
<d-form-item field="organizationProfile" label="组织简介" required>
<d-textarea
v-model="createFormData.organizationProfile"
show-count
maxlength="200"
/>
</d-form-item>
</d-form>
<div class="flex justify-center">
<d-button
variant="solid"
class="mr-[8px]"
@click="confirmCreateOrganizationBtnClick"
>确定</d-button>
<d-button @click="createOrganizationModalClose">取消</d-button>
</div>
</d-modal>
</template>
<script setup lang="ts">
import {reactive, ref} from "vue";
import NoData from "@/components/NoData/NoData.vue";
const hasOrganization = ref(false);
const createOrganizationModalCtrl = ref(false);
const createFormData = reactive({
organizationName: "",
organizationProfile: "", // 组织简介
});
const createFormRef = ref();
function confirmCreateOrganizationBtnClick() {
createFormRef.value.validate(isValid => {
if (isValid) {
createOrganization();
}
});
}
async function createOrganization() {
const params = {
organizationName: createFormData.organizationName,
organizationProfile: createFormData.organizationProfile,
};
try {
} catch (e) {
}
}
function createOrganizationBtnClick(): void {
createOrganizationModalCtrl.value = true;
}
function createOrganizationModalClose(): void {
createOrganizationModalCtrl.value = false;
}
</script>
<style scoped lang="scss">
</style>

View File

@@ -3,7 +3,7 @@
<div class="version-header">
<d-breadcrumb class="secret-breadcrumb">
<gc-breadcrumb-item :to="{ name: 'home' }"><span class="title">首页</span></gc-breadcrumb-item>
<gc-breadcrumb-item :to="{ name: 'home' }"><span class="title">高级搜索</span></gc-breadcrumb-item>
<!-- <gc-breadcrumb-item :to="{ name: 'home' }"><span class="title">高级搜索</span></gc-breadcrumb-item>-->
<gc-breadcrumb-item><span class="cur-title">个人中心</span></gc-breadcrumb-item>
</d-breadcrumb>
<div class="version-detail-header">
@@ -22,12 +22,14 @@
<d-tabs class="jyh-tabs jyh-tabs-2 jyh-tabs-3" type="wrapped" v-model="selectTab">
<d-tab id="yjtzlb" title="预警通知列表"></d-tab>
<d-tab id="dylb" title="订阅列表"></d-tab>
<d-tab id="organizationManage" title="组织管理"></d-tab>
</d-tabs>
</div>
</div>
<div class="version-detail-content">
<early-warning v-if="selectTab==='yjtzlb'"/>
<subscribe-list v-if="selectTab==='dylb'"/>
<OrganizationManage v-if="selectTab === 'organizationManage'" />
</div>
</div>
</template>
@@ -38,6 +40,8 @@ import { useRouter, useRoute } from 'vue-router';
import { getOrgInfo } from '@/views/Org/hooks/orgInfo';
import EarlyWarning from './Detail/EarlyWarning.vue';
import SubscribeList from './Detail/SubscribeList.vue';
import OrganizationManage from './OrganizationManage/OrganizationManage.vue';
const { namespace } = getOrgInfo();
const avatarUrl = '/src/assets/imgs/avatar/male.png';