刘妍 2024-07-11 16:00:13 +08:00
commit 23eb447853
12 changed files with 231 additions and 147 deletions

View File

@ -6,7 +6,7 @@
<div class="anticon" :class="getAppLogoClass" @click="goHome">
<img :src="VITE_GLOB_APP_LOGO" />
<div class="ml-2 truncate md:opacity-100" :class="getTitleClass" v-show="showTitle">
{{ title }}
{{ subjectLogoTitle ? subjectLogoTitle : title }}
</div>
</div>
</template>
@ -19,6 +19,8 @@
import { PageEnum } from '@/enums/pageEnum';
import { useUserStore } from '@/store/modules/user';
import { getAppEnvConfig } from '@/utils/env';
import { SUBJECT_LOGO_TITLE } from '@/enums/cacheEnum';
import { getAuthCache } from '@/utils/auth';
const { VITE_GLOB_APP_LOGO } = getAppEnvConfig();
@ -41,6 +43,8 @@
const { getCollapsedShowTitle } = useMenuSetting();
const userStore = useUserStore();
const { title } = useGlobSetting();
const subjectLogoTitle = getAuthCache(SUBJECT_LOGO_TITLE);
const go = useGo();
const getAppLogoClass = computed(() => [

View File

@ -31,6 +31,7 @@ export const TABLE_SETTING_KEY = 'TABLE__SETTING__KEY__';
// 专题设置
export const SUBJECT_KEY = 'SUBJECT__';
export const SUBJECT_LOGO_TITLE = 'SUBJECT_LOGO_TITLE__';
export enum CacheTypeEnum {
SESSION,

View File

@ -4,7 +4,7 @@ import { defineStore } from 'pinia';
import { store } from '@/store';
import { RoleEnum } from '@/enums/roleEnum';
import { PageEnum } from '@/enums/pageEnum';
import { ROLES_KEY, TOKEN_KEY, USER_INFO_KEY, SUBJECT_KEY } from '@/enums/cacheEnum';
import { ROLES_KEY, TOKEN_KEY, USER_INFO_KEY, SUBJECT_KEY, SUBJECT_LOGO_TITLE } from '@/enums/cacheEnum';
import { getAuthCache, setAuthCache } from '@/utils/auth';
import { GetUserInfoModel, LoginParams } from '@/api/sys/model/userModel';
import { doLogout, getUserInfo, loginApi } from '@/api/sys/user';
@ -25,6 +25,7 @@ interface UserState {
sessionTimeout?: boolean;
lastUpdateTime: number;
subject?: string;
subjectLogoTitle?: string;
}
export const useUserStore = defineStore({
@ -41,6 +42,7 @@ export const useUserStore = defineStore({
// Last fetch time
lastUpdateTime: 0,
subject: '',
subjectLogoTitle: '',
}),
getters: {
getUserInfo(state): UserInfo {
@ -61,11 +63,15 @@ export const useUserStore = defineStore({
getSubject(state): string {
return state.subject || getAuthCache<string>(SUBJECT_KEY);
},
getSubjectLogoTitle(state): string {
return state.subjectLogoTitle || getAuthCache<string>(SUBJECT_LOGO_TITLE);
},
},
actions: {
async setSubject(subject: string | undefined, link: string) {
async setSubject(subject: string | undefined, logoTitle: string | undefined, link: string) {
this.subject = subject;
setAuthCache(SUBJECT_KEY, subject);
setAuthCache(SUBJECT_LOGO_TITLE, logoTitle);
if (subject != undefined) {
const permissionStore = usePermissionStore();
await permissionStore.buildRoutesAction();

View File

@ -6,6 +6,7 @@ import { createLocalStorage, createSessionStorage } from '@/utils/cache';
import { Memory } from './memory';
import {
SUBJECT_KEY,
SUBJECT_LOGO_TITLE,
TOKEN_KEY,
USER_INFO_KEY,
ROLES_KEY,
@ -22,6 +23,7 @@ import { pick, omit } from 'lodash-es';
interface BasicStore {
[SUBJECT_KEY]: string | number | null | undefined;
[SUBJECT_LOGO_TITLE]: string | number | null | undefined;
[TOKEN_KEY]: string | number | null | undefined;
[USER_INFO_KEY]: UserInfo;
[ROLES_KEY]: string[];

View File

@ -17,13 +17,23 @@
<a-input v-model:value="modalData.id" />
</a-form-item>
<a-form-item label="专栏名称" name="title">
<a-textarea v-model:value="modalData.title" />
<a-input v-model:value="modalData.title" />
</a-form-item>
<a-form-item label="LOGO名称" name="logoTitle">
<a-input v-model:value="modalData.logoTitle" />
</a-form-item>
<a-form-item label="状态" name="isShow">
<a-select v-model:value="modalData.isShow">
<a-select-option :value="true">启用</a-select-option>
<a-select-option :value="false">停用</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="是否开放" name="isDevelop">
<a-switch
v-model:checked="modalData.isDevelop"
checked-children="开放"
un-checked-children="不开放"
/>
</a-form-item>
<a-form-item label="流程分类" name="category">
<a-select
@ -39,10 +49,10 @@
un-checked-children="否"
/>
</a-form-item>
<a-form-item label="外部链接" name="linkOrApi" v-if="modalData.isExternal">
<a-form-item label="外部链接" name="linkOrApi" v-if="modalData.isExternal" :required="modalData.isDevelop">
<a-input v-model:value="modalData.linkOrApi" />
</a-form-item>
<a-form-item label="跳转首页" name="linkOrApi" v-if="!modalData.isExternal">
<a-form-item label="跳转首页" name="linkOrApi" v-if="!modalData.isExternal" :required="modalData.isDevelop">
<a-input v-model:value="modalData.linkOrApi" />
</a-form-item>
<a-form-item label="排序号" name="sort">
@ -95,7 +105,9 @@
const modalData = ref({
id: '' as string,
title: '' as string,
logoTitle: '' as string,
isShow: true as boolean,
isDevelop: false as boolean,
isExternal: false as boolean,
linkOrApi: '' as string,
sort: 0 as number,
@ -119,6 +131,7 @@
getCategory();
});
//
async function getCategory() {
categoryOptions.value = await getLoad({ code: 'FlowSort' });
}

View File

@ -17,6 +17,11 @@ export const columns: BasicColumn[] = [
dataIndex: 'title',
width: 200,
},
{
title: 'LOGO名称',
dataIndex: 'logoTitle',
width: 200,
},
{
title: '类型',
dataIndex: 'isExternal',
@ -32,6 +37,11 @@ export const columns: BasicColumn[] = [
dataIndex: 'isShow',
width: 200,
},
{
title: '是否开放',
dataIndex: 'isDevelop',
width: 200,
},
{
title: '排序',
dataIndex: 'sort',

View File

@ -1,5 +1,5 @@
<template>
<div class="page-div categories-page">
<div>
<BasicTable @register="registerTable">
<template #toolbar>
<PermissionBtn @btnEvent="buttonClick"></PermissionBtn>
@ -17,6 +17,10 @@
@change="changeIsShow(record)"
/>
</template>
<template v-if="column.key === 'isDevelop'">
<a-tag color="yellow" v-if="record.isDevelop"></a-tag>
<a-tag color="gray" v-else></a-tag>
</template>
<template v-if="column.key === 'action'">
<a-button v-if="record.sort > 1" type="dashed" @click="sortUp(record)">
<template #icon>
@ -63,7 +67,9 @@
data: {
id: '' as string,
title: '' as string,
logoTitle: '' as string,
isShow: true as boolean,
isDevelop: false as boolean,
isExternal: false as boolean,
linkOrApi: '' as string,
sort: 0 as number,
@ -128,9 +134,13 @@
temp_add.data = {
id: '',
title: '',
logoTitle: '',
isShow: true,
imgUrl: '',
isDevelop: false,
isExternal: false,
linkOrApi: '',
sort: sortNumber + 1,
imgUrl: '',
};
openModal(true, temp_add);
break;
@ -141,7 +151,7 @@
}
let temp_edit = cloneDeep(modalData);
temp_edit.title = '编辑';
temp_edit.data = getSelectRows()[0];
temp_edit.data = cloneDeep(getSelectRows()[0]);
openModal(true, temp_edit);
break;
case 'btnDelete':
@ -194,74 +204,3 @@
reload();
}
</script>
<style lang="scss" scoped>
.page-div {
position: relative;
top: 10px;
left: 10px;
width: calc(100% - 20px);
height: calc(100% - 20px);
display: flex;
.left-div {
background-color: #fff;
display: flex;
flex-direction: column;
.header {
display: flex;
flex-direction: column;
padding: 10px;
border-bottom: 1px solid #eee;
.buttons-div {
display: flex;
justify-content: space-between;
}
.search-div {
margin-top: 10px;
display: flex;
}
}
.content {
border-radius: 5px;
height: 100%;
overflow: auto;
.showTree {
height: 100%;
overflow: auto;
}
}
}
.right-div {
flex: 1;
display: flex;
flex-direction: column;
}
}
</style>
<style lang="scss">
.categories-page {
.left-div {
.h-full {
height: auto;
}
.search-div {
.ant-btn-primary {
background-color: #2a7dc9;
}
.ant-input-search-button {
width: 42px;
}
}
}
}
.categories-modal {
.ant-modal-footer > button {
display: none;
}
.ant-modal-footer {
margin-top: 0px;
border-top: 0px;
}
}
// ant-table-header
</style>

View File

@ -4,9 +4,8 @@
<div class="screen-item">
<div class="screen-item-label" style="margin-right:9px;">年份</div>
<a-select
height="39px"
allowClear
style="flex: 1"
style="width: 103px"
v-model:value="props.year"
:options="yearOptions"
@change=" (value) => {
@ -18,7 +17,7 @@
<div class="screen-item-label" style="margin-right:11px;">图斑来源</div>
<a-select
allowClear
style="flex: 1"
style="width: 142px"
v-model:value="props.patchSource"
:options="patchSourceOptions"
@change="
@ -32,7 +31,7 @@
<div class="screen-item-label" style="margin-right:9px;">批次</div>
<a-select
allowClear
style="flex: 1"
style="width: 117px"
v-model:value="props.batch"
:options="batchOptions"
@change="
@ -134,19 +133,34 @@
padding: 22px 12px 14px 13px;
.screen-row {
display: flex;
height: 39px;
.screen-item {
font-family: Alibaba PuHuiTi;
font-weight: 500;
font-size: 17px;
color: #000000;
width: 33.3%;
// width: 33.3%;
display: flex;
.screen-item-label {
// width: 56px;
// padding-left: 10px;
font-family: Alibaba PuHuiTi;
font-weight: 500;
font-size: 17px;
color: #000000;
line-height: 30px;
display: flex;
align-items: center;
}
:deep(.ant-select-selector){
display: flex;
align-items: center;
font-family: HarmonyOS Sans;
font-weight: 500;
font-size: 19px;
color: #000000;
line-height: 30px;
height: 39px;
box-shadow: 2px 3px 3px 1px rgba(13,13,13,0.05);
}
}
}
}

View File

@ -1,48 +1,48 @@
<template>
<div class="map-list-content">
<div class="screen-div">
<div class="screen-item">
<div class="screen-item" style="margin-right:20px;margin-bottom:15px;">
<div class="screen-item-label">年份</div>
<a-select
allowClear
style="flex: 1"
style="width:103px;"
v-model:value="params.year"
:options="props.yearOptions"
/>
</div>
<div class="screen-item">
<div class="screen-item" style="margin-right:17px;margin-bottom:15px;">
<div class="screen-item-label">图斑来源</div>
<a-select
allowClear
style="flex: 1"
style="width:142px;"
v-model:value="params.patchSource"
:options="patchSourceOptions"
/>
</div>
<div class="screen-item">
<div class="screen-item" style="margin-bottom:15px;">
<div class="screen-item-label">批次</div>
<a-select
allowClear
style="flex: 1"
style="width:117px;"
v-model:value="params.batch"
:options="props.batchOptions"
/>
</div>
<div class="screen-item" style="margin-bottom:0px;">
<div class="screen-item" style="margin-right:13px;">
<div class="screen-item-label">类型</div>
<a-select
allowClear
style="flex: 1"
style="width:136px;"
v-model:value="params.is_build_complete"
:options="markTypeOptions"
/>
</div>
<div class="screen-item" style="width: 44.4%;margin-bottom:0px;">
<div class="screen-item-label">图斑号</div>
<a-input v-model:value="params.geomid" style="flex: 1" />
<div class="screen-item" style="margin-right:51px;">
<!-- <div class="screen-item-label">图斑号</div> -->
<a-input v-model:value="params.geomid" class="item-input" placeholder="请输入图斑编号"/>
</div>
<div class="screen-item" style="width: 22.2%;display: flex; justify-content: end;margin-bottom: 0px;">
<a-button type="primary" :icon="h(SearchOutlined)" @click="query"></a-button>
<div class="screen-item" style="display: flex; justify-content: end;margin-bottom: 0px;">
<a-button type="primary" class="item-button" :icon="h(SearchOutlined)" @click="query"></a-button>
</div>
</div>
<div class="sift-div">
@ -453,26 +453,60 @@
flex-direction: column;
}
.screen-div {
padding: 10px 10px 19px 10px;
padding: 22px 12px 19px 13px;
display: flex;
width: 590px;
// margin-top: 10px;
flex-wrap: wrap;
// background: @component-background;
.screen-item {
width: 33.3%;
// width: 33.3%;
display: flex;
margin-bottom: 15px;
// margin-bottom: 15px;
font-family: Alibaba PuHuiTi;
font-weight: 500;
font-size: 17px;
color: #000000;
height: 39px;
.screen-item-label {
width: 83px;
padding-left: 10px;
font-family: Alibaba PuHuiTi;
font-weight: 500;
font-size: 17px;
color: #000000;
line-height: 30px;
display: flex;
align-items: center;
// font-size: 15px;
margin-right: 9px;
}
:deep(.ant-select-selector){
display: flex;
align-items: center;
font-family: HarmonyOS Sans;
font-weight: 500;
font-size: 19px;
color: #000000;
line-height: 30px;
height: 39px;
box-shadow: 2px 3px 3px 1px rgba(13,13,13,0.05);
}
.item-input{
font-family: Alibaba PuHuiTi;
font-weight: 400;
font-size: 19px;
color: #000000;
line-height: 30px;
width:223px;
box-shadow: 2px 3px 3px 1px rgba(13,13,13,0.05);
}
.item-button{
font-family: Alibaba PuHuiTi;
font-weight: 400;
font-size: 19px;
color: #FFFFFF;
line-height: 30px;
height:39px;
width: 97px;
background:#086DEC;
}
}
.screen-button-div {
@ -611,7 +645,8 @@
.data-list-info-div{
display: flex;
justify-content: space-between;
padding-top: 10px;
margin-top: 10px;
height: 40px;
.info-layout-div{
display:flex;
align-items: center;
@ -630,7 +665,7 @@
width: 80px;
border-radius: 7px;
margin-right: 8px;
height: 30px;
height: 33px;
justify-content: center;
.info-label{
font-family: Alibaba PuHuiTi;

View File

@ -441,6 +441,7 @@
function closeModal(){
modalShow.value = false;
emits('getInfoList');
}
function handleSuccess() {}
</script>

View File

@ -11,80 +11,81 @@
</a-radio-group>
</div>
<div class="screen-div">
<div class="screen-item">
<div class="screen-item" style="margin-right:20px;margin-bottom:12px;">
<div class="screen-item-label">年份</div>
<a-select
allowClear
style="flex: 1;"
style="width:103px;"
v-model:value="props.infoScreenData.year"
:options="yearOptions"
@change="(value) => emits('mapListScreenChange',value,'year')"
/>
</div>
<div class="screen-item">
<div class="screen-item-label" style="width:84px;">图斑来源</div>
<div class="screen-item" style="margin-right:17px;margin-bottom:12px;">
<div class="screen-item-label" style="margin-right: 11px;">图斑来源</div>
<a-select
allowClear
style="flex: 1;"
style="width:142px;"
v-model:value="props.infoScreenData.patchSource"
:options="patchSourceOptions"
@change="(value) => emits('mapListScreenChange',value,'patchSource')"
/>
</div>
<div class="screen-item">
<div class="screen-item" style="margin-bottom:12px;">
<div class="screen-item-label">批次</div>
<a-select
allowClear
style="flex: 1;"
style="width:117px;"
v-model:value="props.infoScreenData.batch"
:options="batchOptions"
@change="(value) => emits('mapListScreenChange',value,'batch')"
/>
</div>
<div class="screen-item">
<div class="screen-item" style="margin-right:15px;margin-bottom:22px;">
<div class="screen-item-label">标注</div>
<a-select
allowClear
style="flex: 1;"
style="width:136px;"
v-model:value="props.infoScreenData.markType"
:options="markTypeOptions"
@change="(value) => emits('mapListScreenChange',value,'markType')"
/>
</div>
<div class="screen-item" style="width:66.6%">
<div class="screen-item-label" style="width:84px;">下发时间</div>
<div class="screen-item" style="margin-bottom:22px;">
<div class="screen-item-label" style="margin-right: 10px;">下发时间</div>
<a-range-picker
:format="'YYYY-MM-DD'"
allowClear
style="flex: 1;"
style="width: 293px;"
class="item-time-select"
@change="(value) => emits('mapListScreenChange',value,'time')"
/>
</div>
<div class="screen-item">
<div class="screen-item" style="margin-right: 13px;">
<div class="screen-item-label">乡镇</div>
<a-select
allowClear
style="flex: 1;"
style="width:136px;"
v-model:value="props.infoScreenData.streetId"
:options="streetsAreaOptions"
@change="(value) => emits('mapListScreenChange',value,'streetId')"
/>
</div>
<div class="screen-item" style="width:40%">
<div class="screen-item" style="margin-right: 14px;">
<a-input
placeholder="请输入图斑编号"
style="flex:1;margin-left: 10px;"
class="item-input"
v-model:value="props.infoScreenData.mapNo"
@change="(value) => emits('mapListScreenChange',value.target.value,'mapNo')"
/>
</div>
<div class="screen-item" style="width: 23.3%">
<div class="screen-item">
<a-button
style="margin-left:10px;"
class="item-button"
type="primary"
:icon="h(SearchOutlined)"
@click="emits('getInfoList')">查询</a-button>
<Icon style="font-size: 20px;margin-left: 10px;" icon="streamline:interface-time-reset-time-clock-reset-stopwatch-circle-measure-loading" @click="emits('resetScreenData')" />
<Icon style="font-size: 25px;margin-left: 10px;" icon="streamline:interface-time-reset-time-clock-reset-stopwatch-circle-measure-loading" @click="emits('resetScreenData')" />
</div>
</div>
<div class="sift-div">
@ -537,25 +538,73 @@ const closeMolder = () => {
padding: 10px;
}
.screen-div{
padding: 10px;
padding: 10px 12px 20px 13px;
display: flex;
width:590px;
flex-wrap: wrap;
.screen-item{
width: 33.3%;
// width: 33.3%;
display: flex;
margin-bottom: 12px;
font-family: Alibaba PuHuiTi;
font-weight: 500;
font-size: 17px;
color: #000000;
height: 39px;
// margin-bottom: 12px;
// font-family: Alibaba PuHuiTi;
// font-weight: 500;
// font-size: 17px;
// color: #000000;
.screen-item-label{
width: 53px;
padding-left: 10px;
font-family: Alibaba PuHuiTi;
font-weight: 500;
font-size: 17px;
color: #000000;
line-height: 30px;
// width: 53px;
// padding-left: 10px;
display: flex;
align-items: center;
margin-right: 9px;
// font-size: 15px;
}
:deep(.ant-select-selector){
display: flex;
align-items: center;
font-family: HarmonyOS Sans;
font-weight: 500;
font-size: 19px;
color: #000000;
line-height: 30px;
height: 39px;
box-shadow: 2px 3px 3px 1px rgba(13,13,13,0.05);
}
.item-input{
width:223px;
font-family: Alibaba PuHuiTi;
font-weight: 500;
font-size: 17px;
color: #000000;
line-height: 30px;
box-shadow: 2px 3px 3px 1px rgba(13,13,13,0.05);
}
.item-time-select{
box-shadow: 2px 3px 3px 1px rgba(13,13,13,0.05);
:deep(input){
font-family: HarmonyOS Sans;
font-weight: 500;
font-size: 15px;
color: #000000;
line-height: 30px;
}
}
.item-button{
font-family: Alibaba PuHuiTi;
font-weight: 400;
font-size: 19px;
color: #FFFFFF;
line-height: 30px;
height:39px;
width: 97px;
background: #086DEC;
// margin-left:12px;
}
}
.screen-button-div{
display: flex;
@ -568,16 +617,25 @@ const closeMolder = () => {
}
.top-radio-button-div{
width:100%;
padding:33px 10px 8px 10px;
padding: 33px 12px 8px 13px;
:deep(.ant-radio-button-wrapper-checked){
font-family: Alibaba PuHuiTi;
font-weight: 500 !important;
font-size: 20px;
color: #FFFFFF !important;
line-height: 40px;
background: #086DEC;
}
.radio-item{
width:50%;
text-align: center;
height: 40px;
user-select: none;
font-family: Alibaba PuHuiTi;
font-weight: 400;
font-size: 20px;
height: 40px;
color: #000000;
line-height: 40px;
user-select: none;
}
}
.sift-div{
@ -693,7 +751,8 @@ const closeMolder = () => {
.data-list-info-div{
display: flex;
justify-content: space-between;
padding-top: 10px;
margin-top: 10px;
height: 40px;
.info-layout-div{
display:flex;
align-items: center;
@ -712,7 +771,7 @@ const closeMolder = () => {
width: 80px;
border-radius: 7px;
margin-right: 8px;
height: 30px;
height: 33px;
justify-content: center;
.info-label{
font-family: Alibaba PuHuiTi;

View File

@ -126,10 +126,6 @@
});
}
onMounted(() => {
getData();
});
//
const scrollToElement = async (type) => {
if (contentArea.value) {
@ -143,14 +139,14 @@
};
//
async function getHome(item) {
if (!item.linkOrApi) {
if (!item.isDevelop) {
message.warn('暂未开放!');
return;
}
if (item.isExternal) {
window.location.href = item.linkOrApi;
} else {
userStore.setSubject(item.id, item.linkOrApi);
userStore.setSubject(item.id, item.logoTitle, item.linkOrApi);
}
}
//
@ -173,6 +169,10 @@
function handleLoginOut() {
userStore.confirmLoginOut();
}
onMounted(() => {
getData();
});
</script>
<style lang="less" scoped>
.subject {