超融合平台迁移阶段代码提交

init
gongdi 4 years ago
parent b9f2fee09f
commit 2d65e8cc8e

@ -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";
}
};
}
}
</script>

@ -32,5 +32,11 @@ export default {
url:'/person/getPersonInfo',
method:'get',
isTestLogin:false
},
"getThisMonthPersonalSituation":{
url:"intellioa/attendance/attendanceRule/getThisMonthPersonalSituation",
method:"get",
isTestLogin:true
}
}

@ -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",

@ -0,0 +1,104 @@
<template>
<div class="subsystem-container-style">
<iframe :src="url" allowfullscreen class="iframe-style" id="mainFrame"></iframe>
</div>
</template>
<script>
let oneLevel="";
let twoLevel="";
let type = "";
export default {
name: "AccessSubsystem",
props:["purview_code",'showOtherOneLevel'],
data:function(){
return{
code:this.purview_code,
showOther:this.showOtherOneLevel,
oneLevelMenu:oneLevel,
twoLevelMenu:twoLevel,
bussinessType:type,
}
},
computed:{
url:function(){
let path = this.BaseConfig.contextpath + '/pro_integration/reactProject/dailyOfficeWork/index.html?fromSuperFunsion=true&isShowMenu=false&menu_code=001002&purview_id=3&purview_code='
+ this.code + "&showOtherOneLevel=" + this.showOther;
if (this.oneLevelMenu !== ''){
path += '&oneLevel=' + this.oneLevelMenu;
if (this.twoLevelMenu !== ''){
path += '&twoLevel=' + this.twoLevelMenu;
}
}
if (this.bussinessType !== ''){
path += '&bussinessType=' + this.bussinessType;
}
return path;
}
},
watch:{
purview_code:function (newData) {
this.code = newData;
},
showOtherOneLevel:function (newData) {
this.showOther = newData;
}
},
beforeRouteEnter(to, from, next) {
if (to.query.oneLevel){
oneLevel = to.query.oneLevel;
}else{
oneLevel = '';
}
if (to.query.twoLevel){
twoLevel = to.query.twoLevel;
}else{
twoLevel = '';
}
if (to.query.bussinessType){
type = to.query.bussinessType;
}else{
type = '';
}
next();
},
beforeRouteUpdate(to, from, next) {
if (to.query.oneLevel){
this.oneLevelMenu = to.query.oneLevel;
}else{
this.oneLevelMenu = '';
}
if (to.query.twoLevel){
this.twoLevelMenu = to.query.twoLevel;
}else{
this.twoLevelMenu = '';
}
if (to.query.bussinessType){
type = to.query.bussinessType;
}else{
type = '';
}
next();
//
// /foo/:id /foo/1 /foo/2
// Foo
// 访 `this`
},
}
</script>
<style scoped lang="scss">
.subsystem-container-style{
height: calc(100% - 100px);
overflow-y: auto;
.iframe-style{
width: 100%;
min-height: calc(100% - 10px);
border:none;
}
}
</style>

@ -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)
}
}
}
});
}
}

@ -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:{

@ -5,7 +5,7 @@
<div class="bench-work-box-style">
<MsgCenter style="width: calc(30% - 12px)"/>
<ToBeDone style="width: calc(35% - 12px)" :countData="todoCount" @btnClick="onDealBtnClick"/>
<MyApplication style="width: calc(35% - 12px)" :appData="crmData"/>
<MyApplication style="width: calc(35% - 12px)" :appData="crmData" @showApp="onShowApp"/>
</div>
<div class="module-main-style">
<ModuleMain
@ -13,6 +13,17 @@
:moduleScrollTop="moduleScrollTop"
/>
</div>
<FusionModalPanel
v-bind="modalObject"
@callback="modalCallback"
:style="{ display: showMainContent === true ? 'block' : 'none' }"
>
<component
v-if="modalObject.show"
:is="childDom"
v-bind="modalObject.params"
></component>
</FusionModalPanel>
<!--<div class="column-style">-->
<!--<MsgCenter/>-->
<!--<ToBeDone/>-->
@ -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
}
}
</script>
@ -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;

@ -4,13 +4,19 @@
<my-icon :type="iconType" class="icon-style"></my-icon>
</div>
</a-badge>
<a-popover v-else class="bench-btn-style" trigger="click">
<a-popover v-else class="bench-btn-style" trigger="click" placement="bottom" overlayClassName="btn-popover-style" v-model="clicked">
<div class="bench-btn-div" :title="title">
<my-icon :type="iconType" class="icon-style"></my-icon>
</div>
<template slot="content">
<slot></slot>
</template>
<!--<a-badge :count="badgeCount" :title="badgeTitle !== ''?(badgeCountTitle + '' + badgeCount):badgeCount + ''"-->
<!--:showZero="false" size="small" :id="'funBtn_' + btnId">-->
<!--<div class="function-btn-style" :title="btnTitle !== ''?btnTitle:null">-->
<!--<my-icon v-if="btnIcon !== ''" :type="btnIcon" style="font-size: 22px;color: white;"/>-->
<!--</div>-->
<!--</a-badge>-->
</a-popover>
</template>
<script>
@ -23,9 +29,20 @@
import {Badge,Popover} from 'ant-design-vue';
export default{
data(){
return {}
return {
btnId:this.id,
btnIcon:this.icon,
btnTitle:this.title,
badgeCount:this.count,
badgeTitle:this.badgeCountTitle,
clicked:false
}
},
props: {
id:{
type:String,
default:''
},
btnType: {
type: String,
default: "badge"
@ -36,6 +53,10 @@
title: {
type: String,
},
badgeCountTitle:{
type:String,
default:''
},
count:{
type:Number,
default:0
@ -54,6 +75,19 @@
</script>
<style scoped lang="scss">
@import "../../assets/scss/style";
.btn-popover-style{
left: 815px !important;
.ant-popover-inner{
border-radius: 14px;
}
.ant-popover-inner-content{
padding: 0 !important;
}
.ant-popover-arrow{
left: initial !important;
right:15px!important;
}
}
.bench-btn-style{
width: 30px;
height: 30px;

@ -18,7 +18,7 @@
<div v-if="menuPath === '/adminCenter/workbench'" class="bench-top-btn-box-style">
<BenchBtnBox iconType="icon-lingdangxiaoxi" title="消息处理" :count="msgCount" @btnClick="onBtnClick('noticeRemind')"/>
<BenchBtnBox iconType="icon-youjian" title="邮件查看" :count="mailCount" @btnClick="onBtnClick('mail')"/>
<BenchBtnBox iconType="icon-caidan" title="更多应用" btnType="popover">
<BenchBtnBox iconType="icon-caidan" title="更多应用" btnType="popover" ref="systemListRef">
<system-list
:crmData="systemData"
@accessSubsystem="onAccessSubsystem"
@ -65,6 +65,7 @@
screenWidth: document.body.clientWidth,
topImgUrl:"",
msgCount:0,//
totalCount:0,//
mailCount:0,//
clickItem: "",
modalUrl: "",
@ -107,6 +108,7 @@
this.$emit("modelChange", this.menuPath);
this.$bus.on("topCountChange",this.changeCount)
this.$bus.on("totalCountChange",this.changeTotalCount)
this.$bus.on("systemDataChange",this.changeSystemData)
this.$bus.on("layOutSettingChange",this.changeLayOutSetting)
this.$bus.on("toDoBtnClick",this.toDoBtnClick)
@ -151,6 +153,10 @@
this.msgCount = config[0].count;
this.mailCount = config[0].count;
},
//
changeTotalCount:function (totalCount) {
this.totalCount = totalCount;
},
//
changeSystemData:function (config) {
this.systemData = config;
@ -168,7 +174,7 @@
this.clickItem = type;
switch (type) {
case "noticeRemind":
this.params = { message: this.notice_count, todo: this.todo_count };
this.params = { message: this.msgCount, todo: this.totalCount };
if (extraParams !== null) {
this.params.messageType = extraParams.messageType;
this.params.todoType = extraParams.todoType;
@ -213,12 +219,14 @@
this.$set(this.modalProps, "show", false);
}
},
onAccessSubsystem:function () {
onAccessSubsystem:function (systemData) {
this.$refs.systemListRef.clicked = false;
this.$bus.emit("accessSubsystem", systemData);
}
},
beforeDestroy(){
this.$bus.off("topCountChange", this.changeCount)
this.$bus.off("totalCountChange",this.changeTotalCount)
this.$bus.off("systemDataChange", this.changeSystemData)
this.$bus.off("layOutSettingChange",this.changeLayOutSetting)
this.$bus.off("toDoBtnClick",this.toDoBtnClick)

@ -0,0 +1,17 @@
:root{
--platTitle:'';//
--btnBgc:'';//
--btnBor:'';//
--btnHover:'';//hover
--modTitleOne:'';//1
--modTitleTwo:'';//2
--noticeOne:'';//1
--noticeTwo:'';//2
--todoOne:'';//1
--todoTwo:'';//2
--todoOneBtn:'';//1
--todoTwoBtn:'';//2
--appOne:'';//1
--appTwo:'';//2
--quickPositioningBgc:''//
}
Loading…
Cancel
Save