mirror of
https://github.com/certd/certd.git
synced 2026-04-03 14:10:54 +08:00
chore: project manager
This commit is contained in:
BIN
packages/ui/certd-client/public/static/images/ent/admin_mode.png
Normal file
BIN
packages/ui/certd-client/public/static/images/ent/admin_mode.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 117 KiB |
@@ -7,6 +7,7 @@ import { useSettingStore } from "/@/store/settings";
|
||||
import { useUserStore } from "/@/store/user";
|
||||
import { useI18n } from "/src/locales";
|
||||
import { userDict } from "../../dicts";
|
||||
import { useDicts } from "/@/views/certd/dicts";
|
||||
|
||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||
const router = useRouter();
|
||||
@@ -35,6 +36,8 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
const selectedRowKeys: Ref<any[]> = ref([]);
|
||||
context.selectedRowKeys = selectedRowKeys;
|
||||
|
||||
const { projectMemberStatusDict } = useDicts();
|
||||
|
||||
return {
|
||||
crudOptions: {
|
||||
settings: {
|
||||
@@ -133,6 +136,27 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
width: 200,
|
||||
},
|
||||
},
|
||||
status: {
|
||||
title: t("certd.ent.projectMemberStatus"),
|
||||
type: "dict-select",
|
||||
dict: projectMemberStatusDict,
|
||||
search: {
|
||||
show: true,
|
||||
},
|
||||
form: {
|
||||
show: true,
|
||||
},
|
||||
column: {
|
||||
width: 200,
|
||||
cellRender: ({ row }) => {
|
||||
return (
|
||||
<div class="flex items-center">
|
||||
<fs-values-format model-value={row.status} dict={projectMemberStatusDict}></fs-values-format>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
},
|
||||
createTime: {
|
||||
title: t("certd.createTime"),
|
||||
type: "datetime",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</fs-crud>
|
||||
<AdminModeIntro v-if="!projectStore.isEnterprise"></AdminModeIntro>
|
||||
</fs-page>
|
||||
</template>
|
||||
|
||||
@@ -22,7 +23,8 @@ import createCrudOptions from "./crud";
|
||||
import { message, Modal } from "ant-design-vue";
|
||||
import { DeleteBatch } from "./api";
|
||||
import { useI18n } from "/src/locales";
|
||||
|
||||
import { useProjectStore } from "/@/store/project";
|
||||
import AdminModeIntro from "./intro.vue";
|
||||
const { t } = useI18n();
|
||||
|
||||
defineOptions({
|
||||
@@ -30,6 +32,7 @@ defineOptions({
|
||||
});
|
||||
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
||||
|
||||
const projectStore = useProjectStore();
|
||||
const selectedRowKeys = context.selectedRowKeys;
|
||||
const handleBatchDelete = () => {
|
||||
if (selectedRowKeys.value?.length > 0) {
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<div class="admin-mode-intro">
|
||||
<div class="mask">
|
||||
<div class="intro-content">
|
||||
<h2 class="intro-title text-xl font-bold">当前为SaaS管理模式,项目管理需要切换到企业模式</h2>
|
||||
<div class="mt-8 image-block">
|
||||
<div class="flex gap-8">
|
||||
<div class="intro-desc flex-1">SaaS模式:每个用户管理自己的流水线和授权资源,独立使用。</div>
|
||||
<div class="intro-desc flex-1">企业模式:企业内部员工使用,通过项目合作管理流水线证书和授权资源。</div>
|
||||
</div>
|
||||
<div class="image-intro">
|
||||
<img :src="src" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="action">
|
||||
<a-button type="primary" html-type="button" @click="goSwitchMode">立即前往切换模式</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx">
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "/src/locales";
|
||||
import { useRouter } from "vue-router";
|
||||
defineOptions({
|
||||
name: "AdminModeIntro",
|
||||
});
|
||||
|
||||
const src = ref("static/images/ent/admin_mode.png");
|
||||
|
||||
const router = useRouter();
|
||||
function goSwitchMode() {
|
||||
router.push("/sys/settings?tab=mode");
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.admin-mode-intro {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 9999;
|
||||
|
||||
.mask {
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.intro-content {
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.image-block {
|
||||
text-align: center;
|
||||
.image-intro {
|
||||
width: 100%;
|
||||
img {
|
||||
margin: 0 auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,7 +2,12 @@
|
||||
<div class="sys-settings-form sys-settings-mode">
|
||||
<a-form :model="formState" name="basic" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }" autocomplete="off" @finish="onFinish">
|
||||
<a-form-item :label="t('certd.sys.setting.adminMode')" :name="['public', 'adminMode']">
|
||||
<fs-dict-radio v-model:value="formState.public.adminMode" :dict="adminModeDict" />
|
||||
<div class="w-full flex items-center">
|
||||
<fs-dict-radio v-model:value="formState.public.adminMode" :disabled="!settingsStore.isPlus" :dict="adminModeDict" />
|
||||
<vip-button class="ml-5" mode="button"></vip-button>
|
||||
</div>
|
||||
<div class="intro-desc helper">SaaS模式:每个用户管理自己的流水线和授权资源,独立使用。</div>
|
||||
<div class="intro-desc helper">企业模式:企业内部员工使用,通过项目合作管理流水线证书和授权资源。</div>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label=" " :colon="false" :wrapper-col="{ span: 8 }">
|
||||
@@ -30,14 +35,14 @@ defineOptions({
|
||||
|
||||
const adminModeDict = dict({
|
||||
data: [
|
||||
{
|
||||
label: t("certd.sys.setting.enterpriseMode"),
|
||||
value: "enterprise",
|
||||
},
|
||||
{
|
||||
label: t("certd.sys.setting.saasMode"),
|
||||
value: "saas",
|
||||
},
|
||||
{
|
||||
label: t("certd.sys.setting.enterpriseMode"),
|
||||
value: "enterprise",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user