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