Commit 27d4d8c0 authored by 罗林杰's avatar 罗林杰

Merge remote-tracking branch 'origin/master'

parents 89d04c58 4ba5d8ed
<script setup lang="ts">
import { h } from 'vue';
import { Modal } from 'ant-design-vue';
import { h, ref, onMounted } from 'vue';
import { Modal, Segmented } from 'ant-design-vue';
import { useI18n } from '@/hooks/web/useI18n';
import { useUserStoreWithOut } from '@/store/modules/user';
import { router } from '@/router';
import {
editBucketData,
editColumnData,
editTableData,
} from '@/views/metaModel/standardModel/modelData';
const { t } = useI18n();
const userStore = useUserStoreWithOut();
const localKey = 'vben-v5.0.0-upgrade-prompt';
import {router} from "@/router";
// if (!localStorage.getItem(localKey)) {
// Modal.confirm({
// title: t('layout.header.upgrade-prompt.title'),
......@@ -20,36 +26,93 @@
// }
localStorage.setItem(localKey, String(Date.now()));
const value = ref('服务平台');
const data = ref([
{
payload: {
key: 1,
},
value: '服务平台',
},
{
payload: {
key: 2,
},
value: '数仓开发',
},
{
payload: {
key: 3,
},
value: '数据治理',
},
{
payload: {
key: 4,
},
value: '数据服务',
},
{
payload: {
key: 6,
},
value: '数据共享交换',
},
]);
onMounted(() => {
value.value = localStorage.getItem('segmentValue');
});
function handleClick() {
window.open('https://www.vben.pro', '_blank');
}
async function handleSelect(type) {
async function handleSelect(type, segmentValue) {
localStorage.setItem('type', type);
localStorage.setItem('segmentValue', segmentValue);
await router.replace('/');
window.location.reload();
}
</script>
<template>
<div>
<a-button type="primary" @click="handleSelect(1)" style="margin-right: 10px">{{
t('layout.header.model1')
}}</a-button>
<a-button type="primary" @click="handleSelect(4)" style="margin-right: 10px">{{
t('layout.header.model4')
}}</a-button>
<a-button type="primary" @click="handleSelect(2)" style="margin-right: 10px">{{
t('layout.header.model2')
}}</a-button>
<a-button type="primary" @click="handleSelect(3)" style="margin-right: 10px">{{
t('layout.header.model3')
}}</a-button>
<a-button type="primary" @click="handleSelect(6)" style="margin-right: 10px">{{
t('layout.header.model5')
}}</a-button>
<!-- 前往体验新版-->
<!-- <a-button type="primary" @click="handleClick">{{-->
<!-- t('layout.header.upgrade-prompt.ok-text')-->
<!-- }}</a-button>-->
<!-- <a-button type="primary" @click="handleSelect(1)" style="margin-right: 10px">{{-->
<!-- t('layout.header.model1')-->
<!-- }}</a-button>-->
<!-- <a-button type="primary" @click="handleSelect(4)" style="margin-right: 10px">{{-->
<!-- t('layout.header.model4')-->
<!-- }}</a-button>-->
<!-- <a-button type="primary" @click="handleSelect(2)" style="margin-right: 10px">{{-->
<!-- t('layout.header.model2')-->
<!-- }}</a-button>-->
<!-- <a-button type="primary" @click="handleSelect(3)" style="margin-right: 10px">{{-->
<!-- t('layout.header.model3')-->
<!-- }}</a-button>-->
<!-- <a-button type="primary" @click="handleSelect(6)" style="margin-right: 10px">{{-->
<!-- t('layout.header.model5')-->
<!-- }}</a-button>-->
<Segmented v-model:value="value" :options="data" size="large">
<template #label="{ payload, value: segmentValue }">
<div
@click="handleSelect(payload.key, segmentValue)"
style="
font-size: 18px;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 35px;
"
>
<span> {{ segmentValue }} </span>
</div>
</template>
</Segmented>
<!-- 前往体验新版-->
<!-- <a-button type="primary" @click="handleClick">{{-->
<!-- t('layout.header.upgrade-prompt.ok-text')-->
<!-- }}</a-button>-->
</div>
</template>
......@@ -17,6 +17,7 @@
:sider="false"
/>
<LayoutBreadcrumb v-if="getShowContent && getShowBread" :theme="getHeaderTheme" />
<!-- <UpgradePrompt class="mr-2 ml-4" />-->
</div>
<!-- left end -->
......
......@@ -63,16 +63,12 @@
</div>
</div>
</div>
<List v-if="value === 'cardList'" >
<List v-if="value === 'cardList'">
<Row :gutter="16">
<template v-for="item in cardListData" :key="item.title">
<Col :span="6">
<ListItem>
<Card
:hoverable="true"
style="height: 250px; width: 300px; position: relative"
>
<Card :hoverable="true" style="height: 250px; width: 300px; position: relative">
<div style="display: flex; justify-content: space-between">
<div style="display: flex; align-items: center; gap: 5px">
<Checkbox
......@@ -108,11 +104,17 @@
<span v-if="item.isShare">有条件共享</span>
<span v-else>无条件共享</span>
<div>
<a-button style="padding: 0; border: none; box-shadow: none" @click="information(item)">
<a-button
style="padding: 0; border: none; box-shadow: none"
@click="information(item)"
>
<Icon icon="icon-park-outline:eyes" />{{ item.view }}</a-button
>
<Divider type="vertical" />
<a-button style="padding: 0; border: none; box-shadow: none" @click="pushNotifications">
<a-button
style="padding: 0; border: none; box-shadow: none"
@click="pushNotifications"
>
<Icon icon="icon-park-outline:hand-up" />{{ item.edit }}</a-button
>
</div>
......@@ -224,8 +226,6 @@
}
}
function handleSelectCard(item: any) {
if (selectedCard.includes(item)) {
selectedCard.splice(selectedCard.indexOf(item), 1);
......@@ -291,7 +291,6 @@
});
}
function onSearch() {
let filteredList = cardList.filter((item) => {
const titleMatch = item.title.toLowerCase().includes(params.value.toLowerCase());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment