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

Merge remote-tracking branch 'origin/master'

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