no message

This commit is contained in:
kuaifan 2025-05-15 16:44:58 +08:00
parent 3bb1bf0967
commit 9888d9f59e
11 changed files with 111 additions and 47 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="52" height="52" viewBox="0 0 52 52"><defs><clipPath id="master_svg0_3138_29732"><rect x="12" y="12" width="28" height="28" rx="0"/></clipPath></defs><g><rect x="0" y="0" width="52" height="52" rx="12" fill="#84C56A" fill-opacity="1"/><g clip-path="url(#master_svg0_3138_29732)"><g><g><path d="M27.126664663848878,28.231620556030272C26.25417466384888,29.10411055603027,24.854894663848878,29.10411055603027,23.98241466384888,28.231620556030272C23.126384663848878,27.359130556030273,23.126384663848878,25.959850556030275,23.98241466384888,25.087360556030273L29.085604663848876,19.984124556030274C28.032074663848878,19.424413556030274,26.813884663848874,19.078710556030273,25.513384663848875,19.078710556030273C21.39786466384888,19.078710556030273,18.039604663848877,22.420510556030273,18.039604663848877,26.55249055603027C18.039604663848877,30.684510556030276,21.39786466384888,34.009810556030274,25.513384663848875,34.009810556030274C29.62890466384888,34.009810556030274,32.98720466384888,30.668010556030275,32.98720466384888,26.536020556030273C32.98720466384888,25.301370556030275,32.69080466384888,24.149020556030273,32.16400466384888,23.128380556030272L27.126664663848878,28.231620556030272Z" fill="#FFFFFF" fill-opacity="1"/></g><g><g><path d="M36.49362605285644,15.83566C36.29602605285645,15.80274,36.147826052856445,15.65458,36.11492605285645,15.45703L35.489426052856444,12L32.21344605285645,15.27595L31.752506052856447,15.736889999999999L31.390346052856444,16.09905C31.291566052856446,16.19783,31.242186052856447,16.34599,31.258646052856445,16.51061L31.604346052856446,18.93053L31.768976052856445,19.09515L24.920750052856445,25.9434C24.558585452856445,26.305500000000002,24.558585452856445,26.8982,24.920750052856445,27.2603C25.282915052856445,27.622500000000002,25.875546052856446,27.622500000000002,26.237716052856445,27.2603L33.02008605285644,20.41211L33.135316052856446,20.41211L35.50582605285645,20.691969999999998C35.637526052856444,20.70843,35.78572605285645,20.65905,35.884526052856444,20.56027L40.00002605285644,16.44476L36.49362605285644,15.83566Z" fill="#FFFFFF" fill-opacity="1"/></g></g><g><path d="M37.876400000000004,21.926598541641233L37.827,21.778438541641236L34.9955,22.832008541641237L35.0449,22.980168541641234C35.5882,24.395898541641238,35.7857,25.877498541641238,35.6869,27.375498541641235C35.5882,28.807698541641237,35.1766,30.190598541641236,34.5017,31.458098541641235C33.8267,32.725698541641236,32.9048,33.845098541641235,31.769,34.73409854164123C30.5837,35.65599854164124,29.2667,36.31439854164124,27.7851,36.66009854164123C26.32,37.005798541641234,24.822,37.07169854164124,23.3568,36.77539854164124C21.941110000000002,36.51199854164123,20.62415,35.952298541641234,19.43888,35.11269854164124C18.23715,34.28959854164124,17.26588,33.25249854164123,16.50863,32.017798541641234C15.71845,30.733798541641235,15.22459,29.350998541641236,15.05997,27.836498541641234C14.87889,26.338398541641233,15.02704,24.840398541641235,15.48798,23.424598541641235C15.932459999999999,22.058288541641236,16.62386,20.823638541641238,17.61159,19.720678541641234C18.56639,18.650638541641236,19.71873,17.794618541641235,21.01923,17.185518541641237C22.3856,16.559958541641237,23.8342,16.247178541641237,25.3488,16.247178541641237C26.287100000000002,16.247178541641237,27.209,16.378878541641235,28.1473,16.609348541641236L28.2955,16.658728541641235L29.0856,13.744946541641236L28.9375,13.695560541641235C27.7851,13.382781541641235,26.567,13.218160641641235,25.3488,13.201698541641235C23.3898,13.201698541641235,21.5131,13.629712541641235,19.76812,14.436348541641236C18.10545,15.226538541641236,16.6074,16.345958541641235,15.37275,17.728768541641237C14.12163,19.128038541641235,13.21622,20.741328541641234,12.640045,22.502768541641235C12.0474104,24.330098541641235,11.866328,26.256098541641236,12.0967967,28.198598541641235C12.327266,30.124698541641234,12.969286,31.951998541641235,13.97347,33.59819854164124C14.94473,35.178598541641236,16.22878,36.52839854164124,17.75975,37.581998541641234C19.29072,38.63559854164124,21.002769999999998,39.359898541641236,22.8301,39.72209854164123C23.669600000000003,39.88669854164124,24.5257,39.968998541641234,25.3652,39.968998541641234C26.418799999999997,39.968998541641234,27.5053,39.83729854164123,28.5424,39.590398541641235C30.4355,39.11299854164123,32.180499999999995,38.273398541641235,33.695,37.08819854164123C35.1601,35.93579854164123,36.329,34.52009854164123,37.2179,32.87389854164124C38.0904,31.227698541641235,38.6007,29.449798541641236,38.7324,27.589498541641234C38.8477,25.663498541641236,38.5513,23.753898541641234,37.876400000000004,21.926598541641233Z" fill="#FFFFFF" fill-opacity="1"/></g></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -423,6 +423,9 @@ export default {
return new Promise(resolve => {
microApp.forceSetData(name, {type: 'beforeClose'}, array => {
if (!array?.find(item => item === true)) {
if (name === 'appstore') {
this.$store.dispatch("updateMicroAppsEntries");
}
if ($A.isSubElectron) {
$A.Electron.sendMessage('windowDestroy');
} else {

View File

@ -15,6 +15,21 @@
{{ t == 'base' ? $L('常用') : $L('管理员') }}
</div>
<Row :gutter="16">
<Col v-for="item in (t == 'base' ? filterMicroAppsEntries : filterMicroAppsEntriesAdmin)" :key="item.key"
:xs="{ span: 6 }"
:sm="{ span: 6 }"
:lg="{ span: 6 }"
:xl="{ span: 6 }"
:xxl="{ span: 3 }">
<div class="apply-col">
<div @click="microClick(item)">
<div class="logo">
<div class="apply-icon no-dark-content" :style="{backgroundImage: `url(${item.icon})`}"></div>
</div>
<p>{{ $L(item.label) }}</p>
</div>
</div>
</Col>
<Col v-for="(item, key) in applyList" :key="key"
v-if="((t=='base' && !item.type) || item.type == t) && item.show !== false"
:xs="{ span: 6 }"
@ -280,7 +295,7 @@
</template>
<script>
import {mapState} from "vuex";
import { mapGetters, mapState } from "vuex";
import DrawerOverlay from "../../components/DrawerOverlay";
import UserSelect from "../../components/UserSelect";
import SystemAibot from "./setting/components/SystemAibot";
@ -349,6 +364,7 @@ export default {
},
activated() {
this.initList()
this.$store.dispatch("updateMicroAppsEntries");
},
computed: {
...mapState([
@ -362,6 +378,10 @@ export default {
'formOptions',
'routeLoading',
]),
...mapGetters([
'filterMicroAppsEntries',
'filterMicroAppsEntriesAdmin',
]),
isExistAdminList() {
return this.applyList.map(h => h.type).indexOf('admin') !== -1;
}
@ -375,7 +395,6 @@ export default {
initList() {
const applyList = [
{ value: "approve", label: "审批中心", sort: 30 },
{ value: "okr", label: "OKR 管理", sort: 40 },
{ value: "report", label: "工作报告", sort: 50 },
{ value: "mybot", label: "我的机器人", sort: 55 },
{ value: "robot", label: "AI 机器人", sort: 60, show: this.systemConfig.server_closeai !== 'close' },
@ -398,9 +417,7 @@ export default {
])
}
//
const adminApplyList = [
{ value: "okrAnalyze", label: "OKR 结果", sort: 150, show: this.userIsAdmin || this.userInfo.department_owner }
];
const adminApplyList = [];
if (this.userIsAdmin) {
adminApplyList.push(...[
{ value: "ldap", label: "LDAP", sort: 160 },
@ -432,6 +449,10 @@ export default {
}
return item.value == type && num > 0
},
//
microClick(item) {
this.$store.dispatch("openMicroApp", item);
},
//
applyClick(item, area = '') {
switch (item.value) {
@ -441,10 +462,6 @@ export default {
case 'setting':
this.goForward({ name: 'manage-' + item.value });
break;
case 'okr':
case 'okrAnalyze':
this.$store.dispatch("openOkr", item.value == 'okr' ? 'list' : 'analysis');
break;
case 'report':
emitter.emit('openReport', area == 'badge' ? 'receive' : 'my');
break;

View File

@ -2619,11 +2619,19 @@ export default {
});
},
openOkr() {
if (!this.dialogData.link_id) {
openOkr(id) {
if (!id) {
return;
}
this.$store.dispatch("openOkr", this.dialogData.link_id);
this.$store.dispatch("openMicroApp", {
name: 'okr-details',
url: $A.mainUrl('apps/okr/'),
props: {
type: 'details',
id,
},
transparent: true,
});
},
onSessionSubmit() {
@ -3144,7 +3152,7 @@ export default {
break;
case 'okr':
this.openOkr()
this.openOkr(this.dialogData.link_id)
break;
default:
@ -3752,7 +3760,7 @@ export default {
this.$store.dispatch("openTask", $A.runNum(target.getAttribute("data-id")));
}
if (target.classList.contains('mention') && target.classList.contains('okr')) {
this.$store.dispatch("openOkr", $A.runNum(target.getAttribute("data-id")));
this.openOkr($A.runNum(target.getAttribute("data-id")));
}
break;

View File

@ -623,6 +623,7 @@ export default {
dispatch("getProjectByQueue");
dispatch("getTaskForDashboard");
dispatch("dialogMsgRead");
dispatch("updateMicroAppsEntries");
//
const allIds = Object.values(state.userAvatar).map(({userid}) => userid);
[...new Set(allIds)].some(userid => dispatch("getUserBasic", {userid}))
@ -4635,33 +4636,44 @@ export default {
},
/** *****************************************************************************************/
/** *************************************** OKR *********************************************/
/** ************************************ App Store ******************************************/
/** *****************************************************************************************/
/**
* 打开OKR
* 更新微应用菜单入口
* @param state
* @param dispatch
* @param value
* @param appName
*/
openOkr({state}, value) {
if (/^\d+$/.test(value)) {
// 打开详情页
emitter.emit('openMicroApp', {
name: 'okr-details',
url: $A.mainUrl('apps/okr/'),
props: {
type: 'details',
id: value,
updateMicroAppsEntries({state, dispatch}, appName) {
dispatch("call", {
url: 'apps/entry',
data: {
app_name: appName || null,
},
transparent: true,
});
} else {
// 打开列表、统计
emitter.emit('openMicroApp', {
name: `okr-${value}`,
url: $A.mainUrl(`apps/okr/${value}`),
});
}).then(({data}) => {
state.microAppsEntries = data
})
},
/**
* 打开微应用
* @param state
* @param item
*/
openMicroApp({state}, item) {
if (!item || !$A.isJson(item)) {
return
}
const event = {
name: `${item.app_name}_${item.key}`,
url: $A.mainUrl(item.url),
}
for (let key in item) {
if (['props', 'transparent', 'keepAlive', 'disableScopecss'].includes(key)) {
event[key] = item[key]
}
}
emitter.emit('openMicroApp', event);
},
}

View File

@ -276,5 +276,38 @@ export default {
getDialogQuote: (state) => (id) => {
const quote = state.dialogQuotes.find(item => item.id === id)
return quote || null
},
/**
* 获取应用菜单入口
* 过滤出location为application的菜单项
*
* @param {Object} state
* @returns {Array}
*/
filterMicroAppsEntries: (state) => {
return state.microAppsEntries.filter(item => item.location === 'application')
},
/**
* 获取应用管理菜单入口
* 过滤出location为application/admin的菜单项
*
* @param {Object} state
* @returns {Array}
*/
filterMicroAppsEntriesAdmin: (state) => {
return state.microAppsEntries.filter(item => item.location === 'application/admin')
},
/**
* 获取主导航菜单入口
* 过滤出location为main/menu的菜单项
*
* @param {Object} state
* @returns {Array}
*/
filterMicroAppsEntriesMain: (state) => {
return state.microAppsEntries.filter(item => item.location === 'main/menu')
}
}

View File

@ -260,4 +260,7 @@ export default {
// 长按数据
longpressData: {type: '', data: null, element: null},
// 微应用菜单入口
microAppsEntries: [],
};

View File

@ -199,14 +199,6 @@
background-image: url("../images/application/meeting-join.svg");
}
&.okr {
background-image: url("../images/application/okr.svg");
}
&.okr-analyze {
background-image: url("../images/application/okr-analyze.svg");
}
&.report {
background-image: url("../images/application/report.svg");
}

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="52" height="52" viewBox="0 0 52 52"><defs><clipPath id="master_svg0_3138_29732"><rect x="12" y="12" width="28" height="28" rx="0"/></clipPath></defs><g><rect x="0" y="0" width="52" height="52" rx="12" fill="#84C56A" fill-opacity="1"/><g clip-path="url(#master_svg0_3138_29732)"><g><g><path d="M27.126664663848878,28.231620556030272C26.25417466384888,29.10411055603027,24.854894663848878,29.10411055603027,23.98241466384888,28.231620556030272C23.126384663848878,27.359130556030273,23.126384663848878,25.959850556030275,23.98241466384888,25.087360556030273L29.085604663848876,19.984124556030274C28.032074663848878,19.424413556030274,26.813884663848874,19.078710556030273,25.513384663848875,19.078710556030273C21.39786466384888,19.078710556030273,18.039604663848877,22.420510556030273,18.039604663848877,26.55249055603027C18.039604663848877,30.684510556030276,21.39786466384888,34.009810556030274,25.513384663848875,34.009810556030274C29.62890466384888,34.009810556030274,32.98720466384888,30.668010556030275,32.98720466384888,26.536020556030273C32.98720466384888,25.301370556030275,32.69080466384888,24.149020556030273,32.16400466384888,23.128380556030272L27.126664663848878,28.231620556030272Z" fill="#FFFFFF" fill-opacity="1"/></g><g><g><path d="M36.49362605285644,15.83566C36.29602605285645,15.80274,36.147826052856445,15.65458,36.11492605285645,15.45703L35.489426052856444,12L32.21344605285645,15.27595L31.752506052856447,15.736889999999999L31.390346052856444,16.09905C31.291566052856446,16.19783,31.242186052856447,16.34599,31.258646052856445,16.51061L31.604346052856446,18.93053L31.768976052856445,19.09515L24.920750052856445,25.9434C24.558585452856445,26.305500000000002,24.558585452856445,26.8982,24.920750052856445,27.2603C25.282915052856445,27.622500000000002,25.875546052856446,27.622500000000002,26.237716052856445,27.2603L33.02008605285644,20.41211L33.135316052856446,20.41211L35.50582605285645,20.691969999999998C35.637526052856444,20.70843,35.78572605285645,20.65905,35.884526052856444,20.56027L40.00002605285644,16.44476L36.49362605285644,15.83566Z" fill="#FFFFFF" fill-opacity="1"/></g></g><g><path d="M37.876400000000004,21.926598541641233L37.827,21.778438541641236L34.9955,22.832008541641237L35.0449,22.980168541641234C35.5882,24.395898541641238,35.7857,25.877498541641238,35.6869,27.375498541641235C35.5882,28.807698541641237,35.1766,30.190598541641236,34.5017,31.458098541641235C33.8267,32.725698541641236,32.9048,33.845098541641235,31.769,34.73409854164123C30.5837,35.65599854164124,29.2667,36.31439854164124,27.7851,36.66009854164123C26.32,37.005798541641234,24.822,37.07169854164124,23.3568,36.77539854164124C21.941110000000002,36.51199854164123,20.62415,35.952298541641234,19.43888,35.11269854164124C18.23715,34.28959854164124,17.26588,33.25249854164123,16.50863,32.017798541641234C15.71845,30.733798541641235,15.22459,29.350998541641236,15.05997,27.836498541641234C14.87889,26.338398541641233,15.02704,24.840398541641235,15.48798,23.424598541641235C15.932459999999999,22.058288541641236,16.62386,20.823638541641238,17.61159,19.720678541641234C18.56639,18.650638541641236,19.71873,17.794618541641235,21.01923,17.185518541641237C22.3856,16.559958541641237,23.8342,16.247178541641237,25.3488,16.247178541641237C26.287100000000002,16.247178541641237,27.209,16.378878541641235,28.1473,16.609348541641236L28.2955,16.658728541641235L29.0856,13.744946541641236L28.9375,13.695560541641235C27.7851,13.382781541641235,26.567,13.218160641641235,25.3488,13.201698541641235C23.3898,13.201698541641235,21.5131,13.629712541641235,19.76812,14.436348541641236C18.10545,15.226538541641236,16.6074,16.345958541641235,15.37275,17.728768541641237C14.12163,19.128038541641235,13.21622,20.741328541641234,12.640045,22.502768541641235C12.0474104,24.330098541641235,11.866328,26.256098541641236,12.0967967,28.198598541641235C12.327266,30.124698541641234,12.969286,31.951998541641235,13.97347,33.59819854164124C14.94473,35.178598541641236,16.22878,36.52839854164124,17.75975,37.581998541641234C19.29072,38.63559854164124,21.002769999999998,39.359898541641236,22.8301,39.72209854164123C23.669600000000003,39.88669854164124,24.5257,39.968998541641234,25.3652,39.968998541641234C26.418799999999997,39.968998541641234,27.5053,39.83729854164123,28.5424,39.590398541641235C30.4355,39.11299854164123,32.180499999999995,38.273398541641235,33.695,37.08819854164123C35.1601,35.93579854164123,36.329,34.52009854164123,37.2179,32.87389854164124C38.0904,31.227698541641235,38.6007,29.449798541641236,38.7324,27.589498541641234C38.8477,25.663498541641236,38.5513,23.753898541641234,37.876400000000004,21.926598541641233Z" fill="#FFFFFF" fill-opacity="1"/></g></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 4.7 KiB