mirror of
https://github.com/certd/certd.git
synced 2026-04-24 12:27:25 +08:00
chore: 手机端适配
This commit is contained in:
@@ -349,6 +349,7 @@ function openUpgrade() {
|
|||||||
}
|
}
|
||||||
const modalRef = modal.success({
|
const modalRef = modal.success({
|
||||||
title,
|
title,
|
||||||
|
class: "vip-modal",
|
||||||
maskClosable: true,
|
maskClosable: true,
|
||||||
okText: t("vip.close"),
|
okText: t("vip.close"),
|
||||||
width: 1100,
|
width: 1100,
|
||||||
@@ -371,10 +372,11 @@ function openUpgrade() {
|
|||||||
let plusInfo: any = "";
|
let plusInfo: any = "";
|
||||||
if (isPlus) {
|
if (isPlus) {
|
||||||
plusInfo = (
|
plusInfo = (
|
||||||
<div class="mt-10">
|
<div class="mt-10 flex flex-col md:flex-row ">
|
||||||
{t("vip.current")} {vipLabel} {t("vip.activated_expire_time")}
|
<span class="mr-2">
|
||||||
{settingStore.expiresText}
|
{t("vip.current")} {vipLabel} {t("vip.activated_expire_time")} {settingStore.expiresText}
|
||||||
<a class="ml-15" href="https://app.handfree.work/subject/#/page/detail/1" target="_blank">
|
</span>
|
||||||
|
<a href="https://app.handfree.work/subject/#/page/detail/1" target="_blank">
|
||||||
{t("vip.learn_more")}
|
{t("vip.learn_more")}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -385,9 +387,9 @@ function openUpgrade() {
|
|||||||
for (const key in vipTypeDefine) {
|
for (const key in vipTypeDefine) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const item = vipTypeDefine[key];
|
const item = vipTypeDefine[key];
|
||||||
const vipBlockClass = `vip-block ${key === settingStore.plusInfo.vipType ? "current" : ""}`;
|
const vipBlockClass = `vip-block ${key === settingStore.plusInfo.vipType ? "current" : ""}`;
|
||||||
slots.push(
|
slots.push(
|
||||||
<a-col span={8}>
|
<div class="w-full md:w-1/3 mb-4 p-5">
|
||||||
<div class={vipBlockClass}>
|
<div class={vipBlockClass}>
|
||||||
<h3 class="block-header ">
|
<h3 class="block-header ">
|
||||||
<span class="flex-o">{item.title}</span>
|
<span class="flex-o">{item.title}</span>
|
||||||
@@ -413,17 +415,15 @@ function openUpgrade() {
|
|||||||
</ul>
|
</ul>
|
||||||
<div class="footer flex-between flex-vc">
|
<div class="footer flex-between flex-vc">
|
||||||
<div class="price-show">
|
<div class="price-show">
|
||||||
{item.price && (
|
{item.priceText && (
|
||||||
<span class="flex">
|
<span class="flex">
|
||||||
<span class="-text">¥{item.price}</span>
|
<span class="-text">{item.priceText}</span>
|
||||||
<span>/</span>
|
<a-tooltip class="ml-5" title={item.discountText}>
|
||||||
{t("vip.year")}
|
|
||||||
<a-tooltip class="ml-5" title={item.price3}>
|
|
||||||
<fs-icon class="pointer color-red" icon="ic:outline-discount"></fs-icon>
|
<fs-icon class="pointer color-red" icon="ic:outline-discount"></fs-icon>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{!item.price && (
|
{!item.priceText && (
|
||||||
<span>
|
<span>
|
||||||
<span class="price-text">{t("vip.freee")}</span>
|
<span class="price-text">{t("vip.freee")}</span>
|
||||||
</span>
|
</span>
|
||||||
@@ -432,7 +432,7 @@ function openUpgrade() {
|
|||||||
<div class="get-show">{item.get && <div>{item.get()}</div>}</div>
|
<div class="get-show">{item.get && <div>{item.get()}</div>}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
@@ -446,18 +446,15 @@ function openUpgrade() {
|
|||||||
<a-row gutter={20}>{slots}</a-row>
|
<a-row gutter={20}>{slots}</a-row>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-10">
|
<div class="mt-10">
|
||||||
<div class="flex-o w-100">
|
<div class=" w-100 flex-col md:flex-row ">
|
||||||
<span>{t("vip.site_id")}:</span>
|
<span>{t("vip.site_id")}:</span>
|
||||||
<fs-copyable v-model={computedSiteId.value}></fs-copyable>
|
<fs-copyable v-model={computedSiteId.value} class="mr-2"></fs-copyable>
|
||||||
|
<a onClick={goBindAccount}>{t("vip.not_effective")}</a>
|
||||||
<a class="ml-2" onClick={goBindAccount}>
|
|
||||||
{t("vip.not_effective")}
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{plusInfo}
|
{plusInfo}
|
||||||
<div class="mt-10">
|
<div class="mt-10 ">
|
||||||
{t("vip.have_activation_code")}
|
<span class="mr-2">{t("vip.have_activation_code")}</span>
|
||||||
<span>
|
<span>
|
||||||
<a onClick={showManualActivation}>{t("vip.manual_activation")}</a>
|
<a onClick={showManualActivation}>{t("vip.manual_activation")}</a>
|
||||||
</span>
|
</span>
|
||||||
@@ -478,6 +475,11 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
.vip-modal {
|
||||||
|
.ant-modal-confirm-content {
|
||||||
|
margin-inline-start: 10px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
.layout-vip {
|
.layout-vip {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -315,4 +315,8 @@ h6 {
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-input-number{
|
||||||
|
min-width: 100px;
|
||||||
}
|
}
|
||||||
@@ -265,7 +265,7 @@ export default function ({ crudExpose, context: { selectedRowKeys } }: CreateCru
|
|||||||
type: "number",
|
type: "number",
|
||||||
search: {
|
search: {
|
||||||
show: true,
|
show: true,
|
||||||
col: { span: 3 },
|
col: { span: 2 },
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
width: 100,
|
width: 100,
|
||||||
@@ -281,7 +281,7 @@ export default function ({ crudExpose, context: { selectedRowKeys } }: CreateCru
|
|||||||
show: computed(() => {
|
show: computed(() => {
|
||||||
return userStore.isAdmin && settingStore.sysPublic.managerOtherUserPipeline;
|
return userStore.isAdmin && settingStore.sysPublic.managerOtherUserPipeline;
|
||||||
}),
|
}),
|
||||||
col: { span: 3 },
|
col: { span: 2 },
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
show: false,
|
show: false,
|
||||||
@@ -317,40 +317,41 @@ export default function ({ crudExpose, context: { selectedRowKeys } }: CreateCru
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
content: {
|
// content: {
|
||||||
title: t("certd.fields.pipelineContent"),
|
// title: t("certd.fields.pipelineContent"),
|
||||||
form: { show: false },
|
// form: { show: false },
|
||||||
column: {
|
// column: {
|
||||||
show: false,
|
// show: false,
|
||||||
},
|
// },
|
||||||
valueBuilder({ row }) {
|
// valueBuilder({ row }) {
|
||||||
if (row.content) {
|
// if (row.content) {
|
||||||
row.content = JSON.parse(row.content);
|
// row.content = JSON.parse(row.content);
|
||||||
const pipeline = row.content;
|
// const pipeline = row.content;
|
||||||
let stepCount = 0;
|
// let stepCount = 0;
|
||||||
eachStages(pipeline.stages, (item, runnableType) => {
|
// eachStages(pipeline.stages, (item, runnableType) => {
|
||||||
if (runnableType === "step") {
|
// if (runnableType === "step") {
|
||||||
stepCount++;
|
// stepCount++;
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
row._stepCount = stepCount;
|
// row._stepCount = stepCount;
|
||||||
if (pipeline.triggers) {
|
// if (pipeline.triggers) {
|
||||||
row._triggerCount = pipeline.triggers?.length > 0 ? pipeline.triggers.length : "-";
|
// row._triggerCount = pipeline.triggers?.length > 0 ? pipeline.triggers.length : "-";
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
valueResolve({ row }) {
|
// valueResolve({ row }) {
|
||||||
if (row.content) {
|
// if (row.content) {
|
||||||
row.content = JSON.stringify(row.content);
|
// row.content = JSON.stringify(row.content);
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
triggerCount: {
|
triggerCount: {
|
||||||
title: t("certd.fields.scheduledTaskCount"),
|
title: t("certd.fields.scheduledTaskCount"),
|
||||||
type: "number",
|
type: "number",
|
||||||
column: {
|
column: {
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 120,
|
||||||
|
sorter: true,
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
show: false,
|
show: false,
|
||||||
@@ -465,6 +466,12 @@ export default function ({ crudExpose, context: { selectedRowKeys } }: CreateCru
|
|||||||
disabled: {
|
disabled: {
|
||||||
title: t("certd.fields.enabled"),
|
title: t("certd.fields.enabled"),
|
||||||
type: "dict-switch",
|
type: "dict-switch",
|
||||||
|
search: {
|
||||||
|
show: true,
|
||||||
|
col: {
|
||||||
|
span: 2,
|
||||||
|
},
|
||||||
|
},
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: [
|
data: [
|
||||||
{ value: false, label: t("certd.fields.enabledLabel") },
|
{ value: false, label: t("certd.fields.enabledLabel") },
|
||||||
|
|||||||
@@ -61,22 +61,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="warning">
|
<div class="warning">
|
||||||
<a-carousel arrows dots-class="slick-dots slick-thumb" autoplay dot-position="right">
|
<notice-bar :list="noticeList"></notice-bar>
|
||||||
<a-alert v-if="!settingStore.isComm" type="warning" show-icon>
|
|
||||||
<template #message>
|
|
||||||
<div>
|
|
||||||
{{ t("certd.dashboard.alertMessage") }}
|
|
||||||
<a class="ml-5 flex-inline" href="https://gitee.com/certd/certd" target="_blank">gitee</a>、 <a class="ml-5 flex-inline" href="https://github.com/certd/certd" target="_blank">github</a>、
|
|
||||||
<a class="ml-5 flex-inline" href="https://certd.docmirror.cn" target="_blank">{{ t("certd.dashboard.helpDoc") }}</a>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</a-alert>
|
|
||||||
<a-alert v-if="settingStore.sysPublic.notice" type="warning" show-icon>
|
|
||||||
<template #message>
|
|
||||||
{{ settingStore.sysPublic.notice }}
|
|
||||||
</template>
|
|
||||||
</a-alert>
|
|
||||||
</a-carousel>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="statistic-data m-20">
|
<div class="statistic-data m-20">
|
||||||
@@ -166,7 +151,7 @@ import { useI18n } from "/src/locales";
|
|||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
import { usePluginStore } from "/@/store/plugin";
|
import { usePluginStore } from "/@/store/plugin";
|
||||||
import { notification } from "ant-design-vue";
|
import { notification } from "ant-design-vue";
|
||||||
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
import NoticeBar from "./notice-bar.vue";
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "DashboardUser",
|
name: "DashboardUser",
|
||||||
});
|
});
|
||||||
@@ -289,6 +274,32 @@ function openUpgradeUrl() {
|
|||||||
function openChangeLogUrl() {
|
function openChangeLogUrl() {
|
||||||
window.open("https://certd.docmirror.cn/guide/changelogs/CHANGELOG.html");
|
window.open("https://certd.docmirror.cn/guide/changelogs/CHANGELOG.html");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const noticeList = computed(() => {
|
||||||
|
const list = [];
|
||||||
|
if (!settingStore.isComm) {
|
||||||
|
list.push(`
|
||||||
|
${t("certd.dashboard.alertMessage")}
|
||||||
|
<a class="ml-5 flex-inline" href="https://gitee.com/certd/certd" target="_blank">
|
||||||
|
gitee
|
||||||
|
</a>
|
||||||
|
、
|
||||||
|
<a class="ml-5 flex-inline" href="https://github.com/certd/certd" target="_blank">
|
||||||
|
github
|
||||||
|
</a>
|
||||||
|
、
|
||||||
|
<a class="ml-5 flex-inline" href="https://certd.docmirror.cn" target="_blank">
|
||||||
|
${t("certd.dashboard.helpDoc")}
|
||||||
|
</a>
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (settingStore.sysPublic.notice) {
|
||||||
|
list.push(`${settingStore.sysPublic.notice}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<template>
|
||||||
|
<a-carousel v-if="list?.length" class="notice-bar pointer" arrows dots-class="slick-dots slick-thumb" autoplay dot-position="right">
|
||||||
|
<a-alert v-for="(item, index) in list" :key="index" type="warning" show-icon>
|
||||||
|
<template #message>
|
||||||
|
<div @click="handleClick(item)" v-html="item"></div>
|
||||||
|
</template>
|
||||||
|
</a-alert>
|
||||||
|
</a-carousel>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { Modal } from "ant-design-vue";
|
||||||
|
import { h } from "vue";
|
||||||
|
const props = defineProps<{
|
||||||
|
list: string[];
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const handleClick = (item: string) => {
|
||||||
|
Modal.info({
|
||||||
|
title: "公告",
|
||||||
|
width: 700,
|
||||||
|
maskClosable: true,
|
||||||
|
content: () => {
|
||||||
|
return h("div", {
|
||||||
|
innerHTML: item,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.notice-bar {
|
||||||
|
.ant-alert-content {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -138,8 +138,10 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
|||||||
}
|
}
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
item.stepCount = stepCount;
|
item.stepCount = stepCount;
|
||||||
// @ts-ignore
|
if(item.triggerCount == 0 ){
|
||||||
item.triggerCount = pipeline.triggers?.length;
|
item.triggerCount = pipeline.triggers?.length;
|
||||||
|
}
|
||||||
|
|
||||||
delete item.content;
|
delete item.content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user