diff --git a/src/views/screenAdaptation/App.vue b/src/views/screenAdaptation/App.vue index 131efdf..e7d5a1c 100644 --- a/src/views/screenAdaptation/App.vue +++ b/src/views/screenAdaptation/App.vue @@ -11,6 +11,12 @@ }, mounted(){ document.title = "洋浦学校智慧校园集成平台"; + window.setIframeHeight = (h) => { + let iframe = document.getElementsByTagName("iframe"); + if (iframe !== null && iframe !== undefined && iframe.length > 0){ + iframe[iframe.length-1].style.height = h + "px"; + } + }; } } diff --git a/src/views/screenAdaptation/api/commonInter.js b/src/views/screenAdaptation/api/commonInter.js index 8ee5ebb..05705e0 100644 --- a/src/views/screenAdaptation/api/commonInter.js +++ b/src/views/screenAdaptation/api/commonInter.js @@ -32,5 +32,11 @@ export default { url:'/person/getPersonInfo', method:'get', isTestLogin:false + }, + + "getThisMonthPersonalSituation":{ + url:"intellioa/attendance/attendanceRule/getThisMonthPersonalSituation", + method:"get", + isTestLogin:true } } \ No newline at end of file diff --git a/src/views/screenAdaptation/menuConfig.js b/src/views/screenAdaptation/menuConfig.js index 7c421b6..9d4bff4 100644 --- a/src/views/screenAdaptation/menuConfig.js +++ b/src/views/screenAdaptation/menuConfig.js @@ -1,3 +1,4 @@ +let AccessSubsystem = ()=>import('./pages/adminCenter/AccessSubsystem.vue') const menuConfig = [ { id: 1, @@ -14,6 +15,12 @@ const menuConfig = [ name: "workbench", component: () => import("./pages/adminCenter/workbench.vue"), }, + { + path:'subSystem/:purview_code/:showOtherOneLevel', + name:'accessSubsystem', + component:AccessSubsystem, + props:true + }, { title: "所有应用", path: "/adminCenter/application", diff --git a/src/views/screenAdaptation/pages/adminCenter/AccessSubsystem.vue b/src/views/screenAdaptation/pages/adminCenter/AccessSubsystem.vue new file mode 100644 index 0000000..086dfb6 --- /dev/null +++ b/src/views/screenAdaptation/pages/adminCenter/AccessSubsystem.vue @@ -0,0 +1,104 @@ + + + + + diff --git a/src/views/screenAdaptation/pages/adminCenter/workBench/appClickHandle.js b/src/views/screenAdaptation/pages/adminCenter/workBench/appClickHandle.js new file mode 100644 index 0000000..4868fcb --- /dev/null +++ b/src/views/screenAdaptation/pages/adminCenter/workBench/appClickHandle.js @@ -0,0 +1,169 @@ +/* +* 点击应用后的处理 +* 对应appConfig.js文件 内容的key每个应用项的app_click的值 +* value为(appData)=>{return {showApp:boolean 是否显示对应功能 必填,params:object 参数 非必填}} +* */ +import axios_config from '../../../../../global-llibs/axios-config'; +import BaseConfig from '../../../../../global-llibs/base-config'; +import InterfaceConfig from '../../../api/commonInter'; +import {Modal} from 'ant-design-vue'; +export default { + attendanceApplication:(appData,callback)=>{ + let rule_text = {0:"补卡", 1:"请假", 2:"公出", 3:"出差"}; + let rule_type_map = {"card_replacement_apply":0,"leave_apply":1, "public_release_apply":2, "business_travel_apply":3} + let rule_type = rule_type_map[appData.id]; + //获取规则 + let param = { + rule_type: rule_type, + person_id: BaseConfig.userInfo.person_id_cookie, + bureau_id: BaseConfig.person_info_my.bureau_id, + }; + + axios_config.callInterface([{ + url:InterfaceConfig.getThisMonthPersonalSituation.url, + params:param, + method:InterfaceConfig.getThisMonthPersonalSituation.method, + isTestLogin:InterfaceConfig.getThisMonthPersonalSituation.isTestLogin + }],(data)=>{ + let result = data[0].data; + if(result.code === 2000){ + let ruleData = result.data; + if(!ruleData.has_rule){ + Modal.warning({ + title:rule_text[rule_type]+"申请失败", + content:"对不起,系统当前未设置完整的"+rule_text[rule_type]+"流程及审批人。", + centered:true + }) + if (callback){ + callback(false) + } + } + //除补卡外检查考勤组情况 + else if(!ruleData.has_group && rule_type !== 0){ + Modal.warning({ + title:rule_text[rule_type]+"申请失败", + content:"对不起,因您当前暂无所属“考勤组”,故不支持"+rule_text[rule_type]+"申请审批流程", + centered:true + }) + if (callback){ + callback(false) + } + } + //检查是否有下级审批人 + else if(ruleData.next_level.check_person_list.length <= 0){ + Modal.warning({ + title:rule_text[rule_type]+"申请失败", + content:"对不起,因您当前所在部门无下级审批人,故不支持"+rule_text[rule_type]+"申请审批流程", + centered:true + }) + if (callback){ + callback(false) + } + } + //设置请假和个性化 + else if(rule_type === 1 + && ruleData.rule.max_times > -1 && ruleData.rule.human_max_times > 0 + && ruleData.rule.max_times <= ruleData.personal_situation.leave_times + && ruleData.rule.human_max_times <= ruleData.personal_situation.leave_human_times){ + //检查次数合计 + Modal.warning({ + title:rule_text[rule_type]+"申请失败", + content:"对不起,因系统当前设置为本月最多可申请" + +(ruleData.rule.human_max_times+ruleData.rule.max_times) + +"次请假,您已申请" + +(ruleData.personal_situation.leave_times+ruleData.personal_situation.leave_human_times) + +"次请假,故不再支持请假申请审批流程", + centered:true + }) + if (callback){ + callback(false) + } + } + else if(rule_type === 1 + && ruleData.rule.max_times > -1 && ruleData.rule.human_max_times > 0 && ruleData.rule.max_hour > -1 + && (ruleData.rule.human_max_times <= ruleData.personal_situation.leave_human_times) + && (ruleData.rule.max_hour <= ruleData.personal_situation.leave_hours)){ + //检查累计时长 + Modal.warning({ + title:rule_text[rule_type]+"申请失败", + content:"对不起,因系统当前设置为本月最多可申请" + +(ruleData.rule.max_hour) + +"小时请假,您已申请" + +(ruleData.personal_situation.leave_hours) + +"小时请假,故不再支持请假申请审批流程", + centered:true + }) + if (callback){ + callback(false) + } + } + //设置请假,未设置个性化 + else if(rule_type === 1 + && ruleData.rule.max_times > -1 && ruleData.rule.human_max_times <= 0 + && ruleData.rule.max_times <= ruleData.personal_situation.leave_times){ + //检查次数 + Modal.warning({ + title:rule_text[rule_type]+"申请失败", + content:"对不起,因系统当前设置为本月最多可申请" + +(ruleData.rule.max_times) + +"次请假,您已申请" + +(ruleData.personal_situation.leave_times) + +"次请假,故不再支持请假申请审批流程", + centered:true + }) + if (callback){ + callback(false) + } + } + else if(rule_type === 1 + && ruleData.rule.max_times > -1 && ruleData.rule.human_max_times <= 0 && ruleData.rule.max_hour > -1 + && ruleData.rule.max_hour <= ruleData.personal_situation.leave_hours){ + //检查时长 + Modal.warning({ + title:rule_text[rule_type]+"申请失败", + content:"对不起,因系统当前设置为本月最多可申请" + +(ruleData.rule.max_hour) + +"小时请假,您已申请" + +(ruleData.personal_situation.leave_hours) + +"小时请假,故不再支持请假申请审批流程", + centered:true + }) + if (callback){ + callback(false) + } + } + //检查是否允许补卡 + else if(rule_type === 0 && ruleData.rule.is_can_patch === 0){ + Modal.warning({ + title:rule_text[rule_type]+"申请失败", + content:"对不起,系统当前未设置允许补卡申请", + centered:true + }) + if (callback){ + callback(false) + } + } + //检查补卡次数 + else if(rule_type === 0 && ruleData.rule.max_times > -1 + && ruleData.rule.max_times <= ruleData.personal_situation.leave_times){ + Modal.warning({ + title:rule_text[rule_type]+"申请失败", + content:"对不起,因系统当前设置为本月最多可申请" + +(ruleData.rule.human_max_times+ruleData.rule.max_times) + +"次补卡,您已申请" + +(ruleData.personal_situation.leave_times+ruleData.personal_situation.leave_human_times) + +"次补卡,故不再支持补卡申请审批流程", + centered:true + }) + if (callback){ + callback(false) + } + }else{ + if (callback){ + callback(true) + } + } + } + }); + } +} diff --git a/src/views/screenAdaptation/pages/adminCenter/workBench/myApplication.vue b/src/views/screenAdaptation/pages/adminCenter/workBench/myApplication.vue index 4cbf775..a553c57 100644 --- a/src/views/screenAdaptation/pages/adminCenter/workBench/myApplication.vue +++ b/src/views/screenAdaptation/pages/adminCenter/workBench/myApplication.vue @@ -33,6 +33,7 @@ import {appConfigData,color} from '../appConfig'; import _ from 'lodash'; import {Tabs} from 'ant-design-vue'; + import AppClickHandle from './appClickHandle'; export default{ data(){ return { @@ -107,7 +108,17 @@ }, //应用点击事件 appClick:function (app) { - + if (app.window_type === 'accessSubsystem' || (app.window_type !== 'accessSubsystem' && app.app_content && app.app_content !== '')){ + if(app.app_click && app.app_click !== ''){ + AppClickHandle[app.app_click](app,(result)=>{ + if (result){ + this.$emit('showApp',app) + } + }) + }else{ + this.$emit('showApp',app) + } + } } }, components:{ diff --git a/src/views/screenAdaptation/pages/adminCenter/workbench.vue b/src/views/screenAdaptation/pages/adminCenter/workbench.vue index 8c961ca..edbc68e 100644 --- a/src/views/screenAdaptation/pages/adminCenter/workbench.vue +++ b/src/views/screenAdaptation/pages/adminCenter/workbench.vue @@ -5,7 +5,7 @@
- +
+ + + @@ -52,9 +63,12 @@ defaultShowModuleAndLayout, themeData, } from "./moduleAndLaySettingConfig"; + import FusionModalPanel from "../../../../components/common/fusionModal/FusionModalPanel"; + let showMain = true; export default{ data(){ return { + showMainContent: showMain, listScroll:this.StaticParams.scrollOption, crmData: null, layoutData: {},//布局信息 @@ -64,11 +78,25 @@ messageNumTimer: null, todo_count: 0, //待办总数 moduleConfig: _.cloneDeep(GlobalParams.moduleConfig), + modalObject: { + show: false, + modalTitle: "", + destroyOnClose: true, + OKButton: true, + CancelButton: true, + modalWidth: "50%", + modalClassName: "", + zIndex: 100, + }, } }, mounted(){ + this.$bus.on("accessSubsystem", this.onAccessSubsystem); this.$bus.on("ModuleAndLayoutChange", this.layoutChange); this.getLayoutInfo(); + window.closePopup = () => { + this.modalObject.show = false; + }; }, computed:{ todoCount: function () { @@ -79,6 +107,11 @@ } return obj; }, + childDom: function () { + return this.modalObject && this.modalObject.url !== "" + ? () => import(`@/${this.modalObject.url}`) + : null; + }, }, methods:{ //获取布局信息 @@ -109,6 +142,7 @@ } else { this.layoutData = defaultShowModuleAndLayout; } + this.changeTheme(); this.getCrmInfo(); } else { Modal.warning({ @@ -456,6 +490,7 @@ this.todo_count += count; } } + this.$bus.emit("totalCountChange",this.todo_count) if (this.messageNumTimer === null) { this.messageNumTimer = setInterval( this.getDesktopTodoNumbers, @@ -566,6 +601,19 @@ this.$bus.emit("layOutSettingChange",this.moduleLayout); }, + //改变主题样式 + changeTheme() { + let theme = themeData.filter((item) => { + return item.id === this.layoutData.theme; + })[0]; + if (theme) { + Object.keys(theme).forEach((key) => { + if (key.indexOf("--") !== -1) { + document.documentElement.style.setProperty(key, theme[key]); + } + }); + } + }, //jurisdictionAry:[]//菜单id 从系统级别(一级)开始 jurisdictionIsExist(jurisdictionAry = [], testRange = true) { let isExist = true; @@ -622,7 +670,7 @@ }, layoutChange:function (changeData) { this.layoutData = changeData; - //this.changeTheme(); + this.changeTheme(); this.calculateModuleData(); this.saveLayoutData(); }, @@ -652,10 +700,78 @@ } ); }, + //更多应用跳转到子系统内 + onAccessSubsystem: function (systemData) { + let params = { + purview_code: systemData.purview_code, + showOtherOneLevel: + systemData.show_oneLevel === true + ? "showOtherOneMenu" + : "hideOtherOneMenu", + }; + + let qurey = {}; + if ( + systemData.menu_name && + Array.isArray(systemData.menu_name) && + systemData.menu_name.length > 0 + ) { + if (systemData.menu_name[0] && systemData.menu_name[0] !== "") { + qurey.oneLevel = systemData.menu_name[0]; + } + + if (systemData.menu_name[1] && systemData.menu_name[1] !== "") { + qurey.twoLevel = systemData.menu_name[1]; + } + + if (systemData.menu_name[2] && systemData.menu_name[1] !== "") { + qurey.bussinessType = systemData.menu_name[2]; + } + } + console.log(params) + console.log(qurey) + this.$router.push({ + name: "accessSubsystem", + params: params, + query: qurey, + }); + }, + onShowApp: function (appData) { + if (appData.window_type === "popupInPlatform") { + for (let key in this.modalObject) { + if ( + appData.modal_params && + appData.modal_params[key] !== null && + appData.modal_params[key] !== undefined + ) { + this.modalObject[key] = appData.modal_params[key]; + } + } + if (appData.params) { + appData.params.appId = appData.id; + } else { + appData.params = { appId: appData.id }; + } + this.modalObject.show = true; + this.modalObject.url = appData.app_content; + this.modalObject.params = appData.params; + } else if (appData.window_type === "accessSubsystem") { + this.onAccessSubsystem(appData); + } + }, + modalCallback: function ([type]) { + if (this.modalObject.callbak) { + this.modalObject.callbak(type); + } else { + this.modalObject.show = false; + } + }, }, beforeDestroy() { // this.$bus.off("RoleChange", this.getCrmInfo); // this.$bus.off("ModuleAndLayoutChange", this.layoutChange); + this.$bus.on("accessSubsystem", this.onAccessSubsystem); + this.$bus.on("ModuleAndLayoutChange", this.layoutChange); if (this.messageNumTimer !== null) { clearInterval(this.messageNumTimer) // setInterval(this.messageNumTimer); @@ -671,7 +787,8 @@ PlanSummary, SchoolDynamic, Schedule, - ModuleMain + ModuleMain, + FusionModalPanel } } @@ -682,6 +799,9 @@ flex-direction: column; justify-content: space-between; /* margin-top: 10px;*/ + /deep/ .__view{ + width: 100% !important; + } .bench-work-box-style{ width: 100%; height: 300px; diff --git a/src/views/screenAdaptation/pages/secondPages/benchBtnBox.vue b/src/views/screenAdaptation/pages/secondPages/benchBtnBox.vue index 2e5333c..7c1d7e6 100644 --- a/src/views/screenAdaptation/pages/secondPages/benchBtnBox.vue +++ b/src/views/screenAdaptation/pages/secondPages/benchBtnBox.vue @@ -4,13 +4,19 @@ - +
+ + + + + +