Browse Source

Merge branch 'master' of https://git.cocorobo.cn/CocoRoboLabs/pbl_admin_table

lzw 3 months ago
parent
commit
4ef671cc7f

File diff suppressed because it is too large
+ 0 - 0
dist/css/app.a82cefe1.css


File diff suppressed because it is too large
+ 0 - 0
dist/css/app.bafe326b.css


+ 0 - 10
dist/img/Cop2.01296be9.svg

@@ -1,10 +0,0 @@
-<svg width="297" height="297" viewBox="0 0 297 297" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle cx="229.5" cy="165.5" r="31.5" fill="#2B4ABD"/>
-<rect y="197" width="297" height="100" rx="20" fill="#0663FE"/>
-<rect x="8" y="183.554" width="292.634" height="14" transform="rotate(-15.1474 8 183.554)" fill="black"/>
-<path d="M41.2557 22.8818L170.118 100.995L38.0388 173.536L41.2557 22.8818Z" fill="#0663FE"/>
-<path d="M97.1698 262.013H112.987V264.98H97.1698V262.013ZM97.1698 267.973H113.039V270.863H97.1698V267.973ZM97.1182 274.063H113.142V276.979H97.1182V274.063ZM95.3893 262.013H98.4341V271.302C98.4341 272.317 98.3911 273.426 98.3051 274.631C98.2191 275.835 98.0471 277.048 97.789 278.269C97.5482 279.473 97.1784 280.626 96.6795 281.727C96.1978 282.828 95.5613 283.808 94.77 284.668C94.6152 284.462 94.383 284.23 94.0733 283.971C93.7637 283.713 93.4455 283.464 93.1186 283.223C92.809 282.982 92.5423 282.793 92.3187 282.656C93.024 281.881 93.5831 281.03 93.9959 280.101C94.4088 279.155 94.7098 278.183 94.8991 277.185C95.1055 276.17 95.2345 275.164 95.2861 274.166C95.3549 273.151 95.3893 272.188 95.3893 271.276V262.013ZM111.904 262.013H115V280.875C115 281.701 114.897 282.337 114.69 282.785C114.484 283.249 114.114 283.602 113.581 283.842C113.065 284.083 112.402 284.238 111.594 284.307C110.785 284.376 109.788 284.402 108.601 284.384C108.549 283.971 108.42 283.473 108.214 282.888C108.007 282.303 107.801 281.813 107.594 281.417C108.093 281.434 108.592 281.451 109.091 281.469C109.59 281.469 110.029 281.469 110.407 281.469C110.803 281.469 111.086 281.469 111.258 281.469C111.499 281.469 111.663 281.426 111.749 281.34C111.852 281.254 111.904 281.09 111.904 280.849V262.013ZM103.337 263.2H106.459V284.204H103.337V263.2Z" fill="white"/>
-<path d="M67.7795 263.303H87.9063V266.219H67.7795V263.303ZM66.1281 263.303H69.2762V270.244C69.2762 271.293 69.2417 272.446 69.1729 273.702C69.1213 274.957 69.0095 276.248 68.8375 277.572C68.6655 278.88 68.416 280.161 68.0892 281.417C67.7623 282.655 67.3237 283.774 66.7732 284.771C66.6012 284.582 66.3432 284.367 65.9991 284.126C65.6551 283.903 65.3024 283.679 64.9412 283.455C64.5971 283.249 64.2961 283.094 64.038 282.991C64.5197 282.079 64.8982 281.081 65.1734 279.998C65.4658 278.914 65.6809 277.804 65.8185 276.669C65.9561 275.517 66.0421 274.398 66.0765 273.315C66.1109 272.214 66.1281 271.19 66.1281 270.244V263.303ZM75.0561 260.722L78.1784 260C78.488 260.619 78.7804 261.299 79.0557 262.038C79.3481 262.761 79.5718 263.389 79.7266 263.922L76.5011 264.799C76.3635 264.249 76.1571 263.587 75.8819 262.813C75.6066 262.038 75.3314 261.342 75.0561 260.722ZM69.9987 269.599L72.708 268.541C73.0865 269.47 73.4649 270.468 73.8434 271.534C74.239 272.584 74.5917 273.607 74.9013 274.605C75.2282 275.603 75.4776 276.506 75.6496 277.314L72.7338 278.527C72.579 277.718 72.3554 276.798 72.0629 275.766C71.7705 274.734 71.435 273.684 71.0566 272.618C70.6953 271.534 70.3427 270.528 69.9987 269.599ZM75.1335 267.973L77.9461 267.251C78.2558 268.197 78.5568 269.195 78.8493 270.244C79.1417 271.293 79.4083 272.325 79.6492 273.34C79.89 274.338 80.0792 275.241 80.2168 276.05L77.2236 276.875C77.1204 276.067 76.9484 275.155 76.7076 274.14C76.4839 273.125 76.2345 272.085 75.9593 271.018C75.684 269.934 75.4088 268.919 75.1335 267.973ZM83.8551 267.148L87.158 268.257C86.6591 269.926 86.057 271.629 85.3517 273.366C84.6636 275.086 83.8895 276.772 83.0294 278.424C82.1693 280.058 81.2318 281.58 80.2168 282.991C80.0104 282.698 79.7008 282.363 79.2879 281.985C78.8923 281.606 78.531 281.305 78.2042 281.081C79.0987 279.774 79.9072 278.338 80.6297 276.772C81.3694 275.19 82.0059 273.573 82.5392 271.921C83.0896 270.253 83.5283 268.661 83.8551 267.148ZM68.8891 280.591H88.1901V283.507H68.8891V280.591Z" fill="white"/>
-<path d="M51.8352 263.451V282.217H46.7404V263.451H51.8352Z" fill="white"/>
-<path d="M28.4979 282.217H23L29.1943 263.451H36.1583L42.3526 282.217H36.8547L32.7496 268.619H32.603L28.4979 282.217ZM27.4716 274.813H37.8077V278.625H27.4716V274.813Z" fill="white"/>
-</svg>

File diff suppressed because it is too large
+ 0 - 0
dist/img/cocoflow2.b8cc401e.svg


+ 0 - 1
dist/img/dui.a18f4330.svg

@@ -1 +0,0 @@
-<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1744968741523" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6522" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M416.832 798.08C400.64 798.08 384.512 791.872 372.16 779.52L119.424 525.76C94.784 500.992 94.784 460.8 119.424 436.032 144.128 411.264 184.128 411.264 208.768 436.032L416.832 644.928 814.4 245.76C839.04 220.928 879.04 220.928 903.744 245.76 928.384 270.528 928.384 310.656 903.744 335.424L461.504 779.52C449.152 791.872 432.96 798.08 416.832 798.08Z" fill="#0663FE" p-id="6523"></path></svg>

+ 1 - 1
dist/index.html

@@ -36,7 +36,7 @@
         width: 100%;
         background: #e6eaf0;
         font-family: '黑体';
-      }</style><script defer="defer" src="/js/chunk-vendors.50f469f2.js"></script><script defer="defer" src="/js/app.4b83b5e3.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.bafe326b.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but pblAdminTable doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html><script>function stopSafari() {
+      }</style><script defer="defer" src="/js/chunk-vendors.50f469f2.js"></script><script defer="defer" src="/js/app.6f87401f.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.a82cefe1.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but pblAdminTable doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/js/app.4b83b5e3.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.4b83b5e3.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.6f87401f.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.6f87401f.js.map


+ 1 - 0
src/components/schoolArea.vue

@@ -73,6 +73,7 @@ export default {
     display: flex;
     width: 230px;
     height: 54px;
+    font-size: 18px;
     align-items: center;
     padding: 16px;
     box-sizing: border-box;

+ 74 - 66
src/components/sidebarL.vue

@@ -58,7 +58,7 @@
                                     </span>
                                 </div>
                                 <!-- 二级导航 -->
-                                <div class="ulTCopy" v-if="item.toolId == 'appStore' && cocoFlowList[0] && cocoFlowList[1] && cocoFlowList[0].length && cocoFlowList[1].length">
+                                <div class="ulTCopy" v-if="item.toolId.includes('appStore') && ((cocoFlowList[0] && cocoFlowList[0].length) || (cocoFlowList[1] &&  cocoFlowList[1].length))">
                                     <div class="ulTCopyTit">
                                         <span>CocoFlow</span>
                                     </div>
@@ -66,13 +66,13 @@
                                         <span v-if="cocoFlowList[0] && cocoFlowList[0].length" style="color: #00000066;">最近使用</span>
                                         <div class="ulTCopyTxt"  
                                         v-for="(i,ind) in cocoFlowList[0]" 
-                                        @click.stop="openNewWindow(i.url)" :key="ind+'ab'">
+                                        @click.stop="openNewWindow(i)" :key="ind+'ab'">
                                                 <div class="ulTCopyConT">{{ i.name }}</div>
                                         </div>
                                         <span v-if="cocoFlowList[0] && cocoFlowList[1].length" style="color: #00000066;">我的收藏</span>
 
                                         <div class="ulTCopyTxt"
-                                        v-for="(i,ind) in cocoFlowList[1]" @click.stop="openNewWindow(i.url)" :key="ind+'a'">
+                                        v-for="(i,ind) in cocoFlowList[1]" @click.stop="openNewWindow(i)" :key="ind+'a'">
                                                 <div class="ulTCopyConT">{{ i.name }}</div>
                                         </div>
                                     </div>
@@ -87,12 +87,12 @@
 
 <script>
 import { mapGetters, mapActions } from 'vuex';
-
 import store from '../store'
 import { API_CONFIG } from "@/common/apiConfig";
+import { myMixin } from "@/mixins/mixin.js"
 
     export default {
-        props:['urlAddress'],
+        mixins: [ myMixin ],
         computed: {
             ...mapGetters(['userinfo','userinfo2','fromL','appSign']),
             // 如果hk,com没有图标,默认使用cn的
@@ -159,7 +159,7 @@ import { API_CONFIG } from "@/common/apiConfig";
             async gotoKanban(){
                 // 重新获取基础数据
                 await store.dispatch('user/getschPerInfo')
-
+                // await store.commit('user/SET_USERINFO2', {})
                 let num = this.userinfo.type == 1 && this.userinfo.role == 1 && this.userinfo.rrole == 1 ? 1 : 2
                 this.$router.push({
                     path: '/KanBan',
@@ -169,52 +169,53 @@ import { API_CONFIG } from "@/common/apiConfig";
                 });
             },
             mouGet(val){
-                if(val != 'appStore') return
-                console.log('666')
+                
+                if(!val.includes('appStore')) return
+                // console.log('val',val);
                 this.getData()
             },
             // 点击一级导航
             async goto(index,val = null){
                 // console.log('goto',val);
-              
+
+               // 清空二级菜单选中状态
+                this.activeLTwo = ''
                 // val = null 就是点击了首页
                 if (val) {
                     this.activeL = index + 1               
                 }else{
                     // 点击首页清空内容,并把标识去除
                     await store.commit('user/SET_AppSIGN', '')
-                    this.$emit('update:urlAddress','')
 
                     this.$emit('getPer')
-                    // 清空选中状态
-                    this.activeLTwo = ''
                     this.activeL = index
                     return
                 }
            
-                    this.activeLTwo = ''
 
 
-                    // 点击相同应用不刷新  
-                    if (this.appSign == val.toolId) return
+                // 点击相同应用不刷新  
+                if (this.appSign == val.toolId) return
 
-                    // 更新标识
-                    await store.commit('user/SET_AppSIGN', val.toolId)
+                // 更新标识
+                await store.commit('user/SET_AppSIGN', val.toolId)
 
-                    let url = ''
-                    // 查出对应账号的应用区域地址
-                    val.url.forEach(e => {
-                         // if (e.region == this.roleUser.schoolArea || e.region == this.roleUser.orgArea) {
-                        if (e.region == this.$region) {
-                            url = e.url
-                        }
-                    });
-                    let _userinfo = this.roleUser, //登录用户信息
-                    { userid: _userid, organizeid: _oid, type: _type, org: _org, role: _role, classid: _classId } = _userinfo; // 解构赋值获取用户信息
-                    const _TscreenType = 1, _SscreenType = 3; // 常量定义
-                    let queryString = ''
-                    if(val.argumentList && val.argumentList.length){
-                        const paramsMap = {
+                let url = ''
+
+                // 查出对应账号的应用区域地址
+                val.url.forEach(e => {
+                        // if (e.region == this.roleUser.schoolArea || e.region == this.roleUser.orgArea) {
+                    if (e.region == this.$region) {
+                        url = e.url
+                    }
+                });
+                
+                let _userinfo = this.roleUser, //登录用户信息
+                { userid: _userid, organizeid: _oid, type: _type, org: _org, role: _role, classid: _classId } = _userinfo; // 解构赋值获取用户信息
+                const _TscreenType = 1, _SscreenType = 3; // 常量定义
+                let queryString = ''
+                if(val.argumentList && val.argumentList.length){
+                    const paramsMap = {
                         userid: _userid,
                         org: _org,
                         oid: _oid,
@@ -223,37 +224,40 @@ import { API_CONFIG } from "@/common/apiConfig";
                         classId: _classId,
                         TscreenType: _TscreenType,
                         SscreenType: _SscreenType
-                        };
+                    };
 
-                        const canshu = val.argumentList
-                    .filter(param => paramsMap[param] !== undefined || param === 'type')
-                    .map(param => param === 'type' ? `tType=${paramsMap['tType']}` : `${param}=${paramsMap[param]}`);
+                    const canshu = val.argumentList
+                .filter(param => paramsMap[param] !== undefined || param === 'type')
+                .map(param => param === 'type' ? `tType=${paramsMap['tType']}` : `${param}=${paramsMap[param]}`);
 
-                        queryString = canshu.length ? (url.includes('?') ? '&' : '?') + canshu.join('&') : ''; // 生成查询字符串
-                    }
+                    queryString = canshu.length ? (url.includes('?') ? '&' : '?') + canshu.join('&') : ''; // 生成查询字符串
+                }
 
-                    let _url = url + queryString
-                    console.log('_url',_url);
+                let _url = url + queryString
+                console.log('_url',_url);
                     
 
-                    let kpl = ` <iframe 
-                                    allow= "camera *; microphone *;display-capture;midi;encrypted-media;"
-                                    frameborder="no" 
-                                    border="0" 
-                                    style="border:0;width:100%;height:100%;" 
-                                    src="${_url}" 
-                                    ref="pageCon"
-                                    >
-                                </iframe>`
+                    // let kpl = ` <iframe 
+                    //                 allow= "camera *; microphone *;display-capture;midi;encrypted-media;"
+                    //                 frameborder="no" 
+                    //                 border="0" 
+                    //                 style="border:0;width:100%;height:100%;" 
+                    //                 src="${_url}" 
+                    //                 ref="${val.toolId}"
+                    //                 >
+                    //             </iframe>`
+
+                let pl = {json:_url ,stateL :true,toolId :val.toolId}
 
-                    let pl = {json:kpl ,stateL :true,toolId :val.toolId}
+                // 添加打开应用
+                this.$emit('AddAppJson',pl)
+
+                this.addOp3('1', "", { type:this.prefixL + val.toolId + "_open" }, "success")
 
-                    // 添加打开应用
-                    this.$emit('AddAppJson',pl)
             },
             
             // 获取cocoFlow收藏与历史使用记录
-            getData(){
+            getData(){                
                 let params = [
                     {
                         functionName: API_CONFIG.ajax_appStoreSave.functionName,
@@ -273,7 +277,7 @@ import { API_CONFIG } from "@/common/apiConfig";
             },
             // 点击二级导航
             async levTwo(val,index,aInd){     
-                console.log('val,index,aInd',val,index,aInd);
+                // console.log('val,index,aInd',val,index,aInd);
                 
                 
                 this.activeL = ''
@@ -320,25 +324,29 @@ import { API_CONFIG } from "@/common/apiConfig";
                 let _url = url + queryString
                 console.log('_url',_url);
                 
-                let kpl = ` <iframe 
-                                allow= "camera *; microphone *;display-capture;midi;encrypted-media;"
-                                frameborder="no" 
-                                border="0" 
-                                style="border:0;width:100%;height:100%;" 
-                                src="${_url}" 
-                                ref="pageCon"
-                                >
-                            </iframe>`
-
-                let pl = {json:kpl ,stateL :true,toolId :val.toolId}
+                // let kpl = ` <iframe 
+                //                 allow= "camera *; microphone *;display-capture;midi;encrypted-media;"
+                //                 frameborder="no" 
+                //                 border="0" 
+                //                 style="border:0;width:100%;height:100%;" 
+                //                 src="${_url}" 
+                //                 ref="pageCon"
+                //                 >
+                //             </iframe>`
+
+                let pl = {json:_url ,stateL :true,toolId :val.toolId}
+
+                this.addOp3('1', "", { type:this.prefixL + val.toolId + "_open" }, "success")
 
                 this.$emit('AddAppJson',pl)
             },
+            // 打开ai应用
             openNewWindow(val) {
                 console.log(val);
+                this.addOp3('1', "", {id :val.id,name:val.name ,type:this.prefixL + "appstoreOpen" }, "success")
                 
                 // // 基本用法:打开指定 URL
-                window.open(val, "_blank");
+                window.open(val.url, "_blank");
             },
         },
        
@@ -503,7 +511,7 @@ import { API_CONFIG } from "@/common/apiConfig";
    
 }
 .ulTCopyConT:hover{
-    background: #e7e7e7;
+    background: #f6f1f1;
     color: #000;
 }
 .ulTCopyTxtCon{

+ 235 - 194
src/components/topPage.vue

@@ -64,27 +64,42 @@
         <!-- 常见应用  -->
         <div class="footCon">
             <div class="footConLeft">
-                <img src="../assets/img/Cop2.svg" alt="">
-                <!-- <div class="CocoTit">
-                    COCO FLOW
-                </div> -->
+                <img v-if="fromL.basics.cocoFlow" :src="fromL.basics.cocoFlow" alt="">
+
+                <div v-else style="min-width: 150px;display: flex;flex-direction: column;justify-content: flex-end;">
+                    <img class="CutImg" src="../assets/img/dong.png" alt="">
+                    <div class="CocoTit">
+                        COCO FLOW
+                    </div>
+                </div>
+                
             </div>
 
             <div style="display: flex;gap: 16px;flex: 1;">
                 <div class="footList">
                     <div class="footListCon" v-for="(item,index) in admincocoFlow" @click="openNewWindow(item)" :key="index+'2p'">
                         <div class="footListConimg">
-                            <img v-if="!fromL.admin.cocoFlow.length" 
-                            style="margin-bottom: 12px;height: 40px;width: 40px;object-fit: contain;" 
+                            <img v-if="fromL.admin.cocoFlow.length == 0" 
+                            class="footListConimgPic"
                             :src="appImgList[index]" alt="">
 
+                            <img v-else-if="fromL.admin.cocoFlow[index].setIcon" 
+                            class="footListConimgPic"
+                            :src="fromL.admin.cocoFlow[index].setIcon" alt="">
+
                             <img
                             style="margin-bottom: 12px;height: 40px;width: 40px;object-fit: contain;"  
                             v-else :src="JSON.parse(item.json).icon" alt="">
                         </div>
                            
                             
-                        <div class="TabListName">{{ item.name }}</div>
+                        <div class="TabListName">
+                            <el-tooltip class="item" effect="light" :content="item.name" placement="bottom">
+                                <span>
+                                    {{ item.name }}
+                                </span>
+                            </el-tooltip>
+                        </div>
                         <div class="TabListBri">
                             <el-tooltip class="item" effect="light" :content="item.detail" placement="bottom">
                                 <span>
@@ -98,13 +113,24 @@
                     </div>
                 </div>
 
-                <div class="footList2">
+                <div v-if="CocoFlowList.length" class="footList2">
                     <div class="footListCon6" v-for="(item,index) in CocoFlowList" @click="openNewWindow(item)" :key="index+'4p'">
                         <div class="footListConimg">
                             <!-- <img style="margin-bottom: 12px;height: 24px;width: 22px;" :src="JSON.parse(item.json).icon" alt=""> -->
-                            <img style="margin-bottom: 12px;height: 40px;width: 40px;object-fit: contain;" :src="require('../assets/img/cocoflow2.svg')" alt="">
+                            <img v-if="fromL.admin.cocoFlow2[index].setIcon" 
+                            class="footListConimgPic"
+                            :src="fromL.admin.cocoFlow2[index].setIcon" alt="">
+                            <img v-else class="footListConimgPic" :src="JSON.parse(item.json).icon" alt="">
+                            
+                            <!-- <img v-else class="footListConimgPic" :src="require('../assets/img/cocoflow2.svg')" alt=""> -->
+                        </div>
+                        <div class="TabListName">
+                            <el-tooltip class="item" effect="light" :content="item.name" placement="bottom">
+                                <span>
+                                    {{ item.name }}
+                                </span>
+                            </el-tooltip>
                         </div>
-                        <div class="TabListName">{{ item.name }}</div>
                         <div class="TabListBri">
                             <el-tooltip class="item" effect="light" :content="item.detail" placement="bottom">
                                 <span>
@@ -149,7 +175,7 @@
         </div>
 
         <!-- 常见应用弹框 -->
-        <el-dialog
+        <!-- <el-dialog
         title="应用列表"
         :visible.sync="dialogVisible"
         class="moreDia"
@@ -181,7 +207,7 @@
                 <el-button @click="handleClose">取消</el-button>
                 <el-button @click="addUsuallyApp" style="background-color: #0663FE;" type="primary">确认</el-button>
             </div>
-        </el-dialog>
+        </el-dialog> -->
     </div>
 </template>
 
@@ -189,8 +215,11 @@
 import { mapGetters } from 'vuex';
 import store from '../store'
 import { API_CONFIG } from "@/common/apiConfig";
+import { myMixin } from "@/mixins/mixin.js"
 
     export default {
+        mixins: [ myMixin ],
+
         computed: {
             ...mapGetters(['userinfo','userinfo2','fromL']),
             // banner循环图
@@ -253,16 +282,15 @@ import { API_CONFIG } from "@/common/apiConfig";
                 // 平台工具 
                 tabList:[],
                 appImgList:[
-                    require('../assets/img/img4.svg'),
-                    require('../assets/img/img1.svg'),
-                    require('../assets/img/img3.svg'),
-                    require('../assets/img/img5.svg'),
+                    require('../assets/img/img7.svg'),
                     require('../assets/img/img8.svg'),
                     require('../assets/img/img2.svg'),
-                    require('../assets/img/img7.svg'),
                     require('../assets/img/img6.svg'),
+                    require('../assets/img/img5.svg'),
+                    require('../assets/img/img1.svg'),
+                    require('../assets/img/img4.svg'),
+                    require('../assets/img/img3.svg'),
                 ],
-
                 hovList:[],
             }
         },
@@ -273,174 +301,46 @@ import { API_CONFIG } from "@/common/apiConfig";
             },
             // 首页平台应用浮动效果
             setHovered(index, value) {
-                // console.log(index, value);
-                
-
                 this.tabList[index].hovered = value;
-                // console.log('this.tabList',this.tabList[index].hovered);
-                
             },
-            // 删除应用
-            delApp(val){
-                this.$confirm('确定删除吗', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(async () => {
-                    let params = [
-                            {
-                                functionName: API_CONFIG.ajax_del_usuallyApp.functionName,
-                                aid: val, 
-                            },
-                        ];
-                        
-                    this.$ajax
-                        .post(API_CONFIG.baseUrl, params)
-                        .then(() => {
-                            this.$message.success('删除成功')
-                            this.getData()
-                        })
-                        .catch((err) => {
-                            console.log(err);
-                            this.$message.error("删除失败");
-                        });
-                   
-                }).catch(() => {
-                    // 取消操作
-                });
+            // 获取cocoFlow2应用
+            getData(){
+                let cocoFlowCopy = []
+                if (this.fromL.admin.cocoFlow2 && this.fromL.admin.cocoFlow2.length) {
+                    cocoFlowCopy = this.fromL.admin.cocoFlow2.map(item => item.id);
+                }else{
+                    return
+                }
 
-                
-                
-            },
-            handleClose(){
-                this.usuallyList= []
-                this.tab= []
-                this.dialogVisible = false
-            },
-            // 弹框选择添加应用
-            addApp(val){
-                // let data = this.CocoFlowList.filter(e=>{
-                //     return e.id == val 
-                // })
-                // if (data.length != 0) return this.$message.info('常用列表已添加')
-                let kpl = [...this.tab,...this.CocoFlowList]
-                // console.log(kpl);
-                
 
-                const index = this.tab.indexOf(val);
-                if (index !== -1) {
-                    this.tab.splice(index, 1); // 删除第一个匹配项
-                } else {
-                    if (kpl.length > 3) return this.$message.info('只能添加四个常用应用哦')
-                    this.tab.push(val);    // 添加元素到末尾
-                }
-            },
-            // 打开常见应用弹框
-            openUsuallyApp(){
-                this.dialogVisible = true
-                this.loading = true
-                let params = [
-                    {
-                        functionName: API_CONFIG.ajax_usuallyApp.functionName,
-                        uid: this.roleUser.userid, 
-                        cn: this.roleUser.schoolArea ? this.roleUser.schoolArea : this.roleUser.orgArea, //学校id
-                    },
-                ];
-                
-                this.$ajax
-                    .post(API_CONFIG.baseUrl, params)
-                    .then((res) => {
-                        this.usuallyList = res.data[0]
-                        this.loading = false
+                    // let appList=[
+                    //     "4aed8607-19e1-11f0-a66a-005056924926",
+                    //     "337f9d06-1eb6-11f0-a66a-005056924926",
+                    //     "52b4aae8-088d-11f0-b508-005056924926",
+                    //     "5c95f692-1460-11f0-bad1-005056924926"
+                    // ]
 
-                    })
-                    .catch((err) => {
-                        console.log(err);
-                        this.loading = false
-                        this.$message.error("获取工具数据失败");
-                    });
-            },
-            // 添加常用确定按钮
-            async addUsuallyApp(){
-                const uploadYn = async files => {
-                    for (let index = 0; index < files.length; index++) {
-                        await this.XAdd(files[index]);
-                        console.log(index);
-                    }
-                }
-                await uploadYn(this.tab);
-                console.log('完成了');
-                this.getData()
-                this.handleClose()
-            },
-            // 循环添加用户选择常见应用
-            XAdd(val){
-                return new Promise((resolve) => {
                     let params = [
                         {
-                            functionName: API_CONFIG.ajax_add_usuallyApp.functionName,
-                            oid:this.roleUser.organizeid,
-                            aid: val,
-                            uid: this.roleUser.userid,
+                            functionName: API_CONFIG.ajax_AdminApp.functionName,
+                            con: cocoFlowCopy.join(','), 
                         },
                     ];
-                    
-                    this.$ajax
-                        .post(API_CONFIG.baseUrl, params)
-                        .then(() => {
-                            resolve(1)
-                        })
-                        .catch((err) => {
-                            console.log(err);
-                        });
-                    })
-            },
-
-            // 获取已添加cocoFlow应用
-            getData(){
-                // let params = [
-                //     {
-                //         functionName: API_CONFIG.ajax_addedUsuallyApp.functionName,
-                //         uid: this.roleUser.userid, 
-                //     },
-                // ];
-                
-                // this.$ajax
-                //     .post(API_CONFIG.baseUrl, params)
-                //     .then((res) => {
-                //         this.CocoFlowList = res.data[0]
-                //     })
-                //     .catch((err) => {
-                //         console.log(err);
-                //         this.$message.error("获取工具数据失败");
-                //     });
-
-
-                    let appList=[
-                    "4aed8607-19e1-11f0-a66a-005056924926",
-                    "337f9d06-1eb6-11f0-a66a-005056924926",
-                    "52b4aae8-088d-11f0-b508-005056924926",
-                    "5c95f692-1460-11f0-bad1-005056924926"
-
-                        ]
-
-                let params = [
-                    {
-                        functionName: API_CONFIG.ajax_AdminApp.functionName,
-                        con: appList.join(','), 
-                    },
-                ];
                 
                 this.$ajax
                     .post(API_CONFIG.baseUrl, params)
                     .then((res) => {
-                        this.CocoFlowList = res.data[0]
+                        let _data = res.data[0];
+
+                        this.CocoFlowList = cocoFlowCopy.map(id => _data.find(item => item.id === id));
+
                     })
                     .catch((err) => {
                         console.log(err);
                         this.$message.error("获取工具数据失败");
                     });
             },
+            // 筛选可用平台工具,判断是否管理员可见,去除已删除工具
             siftCoco(){
                 let data = []
                 let val = JSON.parse(JSON.stringify(this.fromL.admin.index.list))
@@ -462,35 +362,51 @@ import { API_CONFIG } from "@/common/apiConfig";
                 }
 
                 this.tabList = data
-                console.log('this.tabList',this.tabList);
+                // console.log('this.tabList',this.tabList);
 
             },
+            // 获取cocoFlow应用
             getAdmincocoFlow(){
                 // 筛选可用平台工具,判断是否管理员可见,去除已删除工具
                 this.siftCoco()
                 // console.log('getAdmincocoFlow',this.fromL);
+
+                let cocoFlowCopy = this.fromL.admin.cocoFlow.map(item => item.id);
+                console.log('cocoFlowCopy',cocoFlowCopy);
                 
-                let appList=["2d05a12a-f0e7-11ef-b508-005056924926",
-                            "38ee6402-0539-11f0-b508-005056924926",
-                            "1c83613c-ffb7-11ef-b508-005056924926",
-                            "0d3d87bd-00b6-11f0-b508-005056924926",
-                            "ee61f383-0311-11f0-b508-005056924926",
-                            "701615ab-ffe8-11ef-b508-005056924926",
-                            "d1edef14-ef6f-11ef-b508-005056924926",
-                            "a8781a86-00d8-11f0-b508-005056924926",
-                        ]
+                let appList= [
+                        "d1edef14-ef6f-11ef-b508-005056924926",
+                        "701615ab-ffe8-11ef-b508-005056924926",
+                        "a8781a86-00d8-11f0-b508-005056924926",
+                        "ee61f383-0311-11f0-b508-005056924926",
+                        "38ee6402-0539-11f0-b508-005056924926",
+                        "1c83613c-ffb7-11ef-b508-005056924926",
+                        "0d3d87bd-00b6-11f0-b508-005056924926",
+                        "2d05a12a-f0e7-11ef-b508-005056924926",
+                    ]
+                        
+                       
 
                 let params = [
                     {
                         functionName: API_CONFIG.ajax_AdminApp.functionName,
-                        con: this.fromL.admin.cocoFlow.length == 0 ? appList.join(',') : this.fromL.admin.cocoFlow.join(','), 
+                        con: cocoFlowCopy.length == 0 ? appList.join(',') : cocoFlowCopy.join(','), 
                     },
                 ];
                 
                 this.$ajax
                     .post(API_CONFIG.baseUrl, params)
                     .then((res) => {
-                        this.admincocoFlow = res.data[0]
+                        let _data = res.data[0]
+
+                        if (cocoFlowCopy.length == 0) {
+                            this.admincocoFlow = appList.map(id => _data.find(item => item.id === id));
+                        }else{
+                            this.admincocoFlow = cocoFlowCopy.map(id => _data.find(item => item.id === id));
+                        }
+
+
+
                     })
                     .catch((err) => {
                         console.log(err);
@@ -542,21 +458,23 @@ import { API_CONFIG } from "@/common/apiConfig";
                 console.log('_url',_url);
 
 
-                  let kpl = ` <iframe 
-                                allow= "camera *; microphone *;display-capture;midi;encrypted-media;"
-                                frameborder="no" 
-                                border="0" 
-                                style="border:0;width:100%;height:100%;" 
-                                src="${_url}" 
-                                ref="pageCon"
-                                >
-                            </iframe>`
+                //   let kpl = ` <iframe 
+                //                 allow= "camera *; microphone *;display-capture;midi;encrypted-media;"
+                //                 frameborder="no" 
+                //                 border="0" 
+                //                 style="border:0;width:100%;height:100%;" 
+                //                 src="${_url}" 
+                //                 ref="pageCon"
+                //                 >
+                //             </iframe>`
 
-                let pl = {json:kpl ,stateL :true,toolId :val.toolId}
+                let pl = {json:_url ,stateL :true,toolId :val.toolId}
 
                 // this.$emit('AddAppJson',pl)
                 
                 this.$emit('cutUrl',pl)
+
+                this.addOp3('1', "", { type:this.prefixL + val.toolId + "_open" }, "success")
         
                 // document.querySelector('#pageCon').innerHTML = '';
                 
@@ -567,10 +485,125 @@ import { API_CONFIG } from "@/common/apiConfig";
             // 打开CocoFlow应用
             openNewWindow(val) {
                 console.log(val);
-                
+                this.addOp3('1', "", {id :val.id,name:val.name ,type:this.prefixL + "appstoreOpen" }, "success")
+
                 // // 基本用法:打开指定 URL
                 window.open(val.url, "_blank");
             },
+            //#region 
+             // handleClose(){
+            //     this.usuallyList= []
+            //     this.tab= []
+            //     this.dialogVisible = false
+            // },
+             // 弹框选择添加应用
+            // addApp(val){
+            //     // let data = this.CocoFlowList.filter(e=>{
+            //     //     return e.id == val 
+            //     // })
+            //     // if (data.length != 0) return this.$message.info('常用列表已添加')
+            //     let kpl = [...this.tab,...this.CocoFlowList]
+            //     // console.log(kpl);
+                
+
+            //     const index = this.tab.indexOf(val);
+            //     if (index !== -1) {
+            //         this.tab.splice(index, 1); // 删除第一个匹配项
+            //     } else {
+            //         if (kpl.length > 3) return this.$message.info('只能添加四个常用应用哦')
+            //         this.tab.push(val);    // 添加元素到末尾
+            //     }
+            // },
+             // // 添加常用确定按钮
+            // async addUsuallyApp(){
+            //     const uploadYn = async files => {
+            //         for (let index = 0; index < files.length; index++) {
+            //             await this.XAdd(files[index]);
+            //             console.log(index);
+            //         }
+            //     }
+            //     await uploadYn(this.tab);
+            //     console.log('完成了');
+            //     this.getData()
+            //     this.handleClose()
+            // },
+            // // 循环添加用户选择常见应用
+            // XAdd(val){
+            //     return new Promise((resolve) => {
+            //         let params = [
+            //             {
+            //                 functionName: API_CONFIG.ajax_add_usuallyApp.functionName,
+            //                 oid:this.roleUser.organizeid,
+            //                 aid: val,
+            //                 uid: this.roleUser.userid,
+            //             },
+            //         ];
+                    
+            //         this.$ajax
+            //             .post(API_CONFIG.baseUrl, params)
+            //             .then(() => {
+            //                 resolve(1)
+            //             })
+            //             .catch((err) => {
+            //                 console.log(err);
+            //             });
+            //         })
+            // },
+             // // 删除应用
+            // delApp(val){
+            //     this.$confirm('确定删除吗', '提示', {
+            //         confirmButtonText: '确定',
+            //         cancelButtonText: '取消',
+            //         type: 'warning'
+            //     }).then(async () => {
+            //         let params = [
+            //                 {
+            //                     functionName: API_CONFIG.ajax_del_usuallyApp.functionName,
+            //                     aid: val, 
+            //                 },
+            //             ];
+                        
+            //         this.$ajax
+            //             .post(API_CONFIG.baseUrl, params)
+            //             .then(() => {
+            //                 this.$message.success('删除成功')
+            //                 this.getData()
+            //             })
+            //             .catch((err) => {
+            //                 console.log(err);
+            //                 this.$message.error("删除失败");
+            //             });
+                   
+            //     }).catch(() => {
+            //         // 取消操作
+            //     });
+            // },
+            // 打开常见应用弹框
+            // openUsuallyApp(){
+            //     this.dialogVisible = true
+            //     this.loading = true
+            //     let params = [
+            //         {
+            //             functionName: API_CONFIG.ajax_usuallyApp.functionName,
+            //             uid: this.roleUser.userid, 
+            //             cn: this.roleUser.schoolArea ? this.roleUser.schoolArea : this.roleUser.orgArea, //学校id
+            //         },
+            //     ];
+                
+            //     this.$ajax
+            //         .post(API_CONFIG.baseUrl, params)
+            //         .then((res) => {
+            //             this.usuallyList = res.data[0]
+            //             this.loading = false
+
+            //         })
+            //         .catch((err) => {
+            //             console.log(err);
+            //             this.loading = false
+            //             this.$message.error("获取工具数据失败");
+            //         });
+            // },
+            //#endregion
         },
     }
 </script>
@@ -665,9 +698,9 @@ import { API_CONFIG } from "@/common/apiConfig";
 }
 .TabListName{
     color: #1f2937;
-    font-size: 16px;
+    font-size: 18px;
     font-weight: 600;
-    margin: auto 0 5px;
+    margin: 0 0 5px;
     margin-bottom: 4px;
     -webkit-line-clamp: 2;
     display: -webkit-box;
@@ -676,8 +709,8 @@ import { API_CONFIG } from "@/common/apiConfig";
     text-overflow: ellipsis;
 }
 .TabListBri{
-    color: #4b5563;
-    font-size: 12px;
+    color: rgba(0,0,0,.6);
+    font-size: 14px;
     -webkit-line-clamp: 1;
     display: -webkit-box;
     -webkit-box-orient: vertical;
@@ -715,12 +748,17 @@ import { API_CONFIG } from "@/common/apiConfig";
     box-sizing: border-box;
     display: flex;
     padding-right: 40px;
+    object-fit: contain;
 }
 .footConLeft img{
     min-width: 150px;
     border-radius: 15px;
     /* object-view-box: inset(0% 12px 30px 30px); */
 }
+.CutImg{
+    width: 100% !important;
+    object-view-box: inset(0% 12px 30px 30px);
+}
 .CocoTit{
     width: 100%;
     min-width: 150px;
@@ -786,6 +824,9 @@ import { API_CONFIG } from "@/common/apiConfig";
     padding-top: 8px;
     box-sizing: border-box;
 }
+.footListConimgPic{
+    margin-bottom: 12px;height: 40px;width: 40px;object-fit: contain;
+}
 .cha{
     display: none;position: absolute;top: 10px;right: 10px;
 }

+ 98 - 0
src/mixins/mixin.js

@@ -0,0 +1,98 @@
+import { mapGetters } from 'vuex';
+
+export const myMixin = {
+  computed: {
+    ...mapGetters(['userinfo']),
+    roleUser(){
+      return Object.keys(this.userinfo).length != 0 ? this.userinfo : this.userJson
+    }
+  },
+  data() {
+    return {
+        userJson: {},
+        prefixL: window.location.href.includes("/liyuan") ? "liyuan_" : "admin_"
+    };
+  },
+  methods: {
+    detectBrowser() {
+      const ua = navigator.userAgent;
+
+      // 按优先级顺序检测
+      if (ua.includes("Edg/") || ua.includes("Edge/")) {
+        return "Microsoft Edge";
+      } else if (ua.includes("Firefox")) {
+        return "Mozilla Firefox";
+      } else if (ua.includes("Trident") || ua.includes("MSIE")) {
+        return "Internet Explorer";
+      } else if (ua.includes("360EE")) {
+        return "360 Browser (极速模式)";
+      } else if (ua.includes("360SE")) {
+        return "360 Browser (安全模式)";
+      } else if (ua.includes("SLBrowser")) {
+        return "QQ Browser";
+      } else if (ua.includes("UCBrowser")) {
+        return "UC Browser";
+      } else if (ua.includes("Opera") || ua.includes("OPR/")) {
+        return "Opera";
+      } else if (ua.includes("Chrome") && !ua.includes("Edg/")) {
+        return "Google Chrome";
+      } else if (ua.includes("Safari/") && !ua.includes("Chrome")) {
+        return "Safari";
+      } else {
+        return "Other Browser";
+      }
+    },
+    async addOp3(userTime, loadTime, object, status,account) {
+      try {
+        if(!this.roleUser || !this.roleUser.accountNumber){
+            let res = await this.$ajax.get('https://pbl.cocorobo.cn/api/pbl/selectUser', {
+              userid: account
+            });
+
+            this.userJson = res.data[0][0]
+            console.log('this.userJson',this.userJson);
+        }
+      } catch (e) {
+        console.log(e);
+        return this.addOp3(userTime, loadTime, object, status);
+      }
+
+      console.log('777',this.roleUser);
+      
+
+      let _time = new Date()
+        .toLocaleString("zh-CN", { hour12: false, timeZone: "Asia/Shanghai" })
+        .replace(/\//g, "-");
+      let browser = this.detectBrowser();
+
+      let params = {
+        userid: this.roleUser.userid,
+        username: this.roleUser.username,
+        accountNumber: this.roleUser.accountNumber,
+        org: this.roleUser.orgName,
+        school: this.roleUser.schoolName,
+        browser: browser,
+        userTime: userTime == "1" ? _time : userTime, // 使用时间 1次的就1 其次传秒
+        loadTime: loadTime, //load的时间没有就“”
+        object: JSON.stringify(object), //执行信息传json
+        status: status //成功返回success。失败返回error的信息
+      };
+      console.log('params',params);
+      
+
+      this.$ajax
+        .post('https://pbl.cocorobo.cn/api/mongo/' + "updateUserData2", [params])
+        .then(res => {
+          if (res.data.status == 1) {
+            console.log("保存成功");
+          } else {
+            console.log("保存失败");
+          }
+        })
+        .catch(e => {
+          console.log("保存失败");
+          console.log(e);
+        });
+    }
+  }
+};

+ 26 - 0
src/store/modules/user.js

@@ -81,6 +81,7 @@ const mutations = {
   },
   SET_USERINFO2: (state, userinfo2) => {
     state.userinfo2 = userinfo2;
+    window.topU.US.userInfo = state.userinfo2 && Object.keys(state.userinfo2).length ? state.userinfo2 : state.userinfo
   },
 };
 
@@ -184,6 +185,30 @@ const actions = {
       });
 
       // 第三步
+      if (perData.admin.cocoFlow) {
+				perData.admin.cocoFlow.forEach((i, index) => {
+					let _index = toolList.findIndex((i2) => i.id == i2.id);
+					if (_index != -1) {
+						let _setData = toolList[_index];
+						_setData.setIcon = i.setIcon;
+						perData.admin.cocoFlow[index] = _setData;
+					} else {
+						console.log("无应用", i);
+					}
+				});
+			}
+      if (perData.admin.cocoFlow2) {
+        perData.admin.cocoFlow2.forEach((i, index) => {
+          let _index = toolList.findIndex((i2) => i.id == i2.id);
+          if (_index != -1) {
+          let _setData = toolList[_index];
+          _setData.setIcon = i.setIcon;
+          perData.admin.cocoFlow2[index] = _setData;
+        } else {
+          console.log("无应用", i);
+        }
+        });
+      }
 			perData.admin.index.list.forEach((i, index) => {
 				let _index = toolList.findIndex((i2) => i == i2.id);
 				if (_index != -1) {
@@ -231,6 +256,7 @@ const actions = {
       commit("SET_USERINFO2", {});
       removeToken();
       commit("RESET_STATE");
+      window.topU.US.userInfo = {}
       resolve();
     });
   },

+ 368 - 309
src/views/HomeView.vue

@@ -1,212 +1,269 @@
 <template>
-  <div class="body">
-   
-    <div class="container">
-      <div class="leftBar" style="height: 100%;">
-        <sidebarL @getPer="getPer" @AddAppJson="AddAppJson" :urlAddress.sync="urlAddress"  ref="sidebarLRef"></sidebarL>
-      </div>
-      <div class="table-container">
+	<div class="body">
+		<div class="container">
+			<div class="leftBar" style="height: 100%">
+				<sidebarL
+					@getPer="getPer"
+					@AddAppJson="AddAppJson"
+					ref="sidebarLRef"
+				></sidebarL>
+			</div>
+			<div class="table-container">
+				<div class="top">
+					<div class="topCon">
+						<div class="title">
+							<span v-if="roleUser.orgName">{{ roleUser.orgName }}</span>
+							<span style="color: #0663fe; font-weight: 600">{{
+								roleUser.schoolName
+							}}</span>
+						</div>
+						<div class="person">
+							<div class="person_name">
+								<img
+									@click="openData()"
+									style="
+										width: 40px;
+										height: 40px;
+										object-fit: cover;
+										border-radius: 50%;
+										cursor: pointer;
+									"
+									:src="
+										roleUser.headportrait
+											? roleUser.headportrait
+											: require('../assets/img/toux2.png')
+									"
+									alt=""
+								/>
+								<div class="personInfo">
+									<div class="personInfoTit">
+										{{ roleUser.username }}
+									</div>
+									<div class="personInfoBri">
+										{{ userSuffix() }}
+									</div>
+								</div>
+							</div>
+							<el-button
+								type="text"
+								@click="handleLogout"
+								style="margin-left: 20px"
+								>退出</el-button
+							>
+						</div>
+					</div>
+				</div>
 
-        <div class="top">
-          <div class="topCon">
-            <div class="title">
-              <span v-if="roleUser.orgName">{{roleUser.orgName}}</span >
-              <span style="color: #0663FE;font-weight: 600;">{{ roleUser.schoolName }}</span>
-                
-            </div>
-            <div class="person">
-              <div class="person_name">
-                <img
-                 @click="openData()"
-                style="width: 40px;height: 40px;object-fit: cover;border-radius: 50%; cursor: pointer;" 
-                :src="roleUser.headportrait ? roleUser.headportrait : require('../assets/img/toux2.png')" alt="">
-                <div class="personInfo">
-                  <div class="personInfoTit">
-                    {{  roleUser.username }}
-                  </div>
-                  <div class="personInfoBri">
-                    {{ userSuffix() }}
-                  </div>
-                </div>
-              </div>
-              <el-button type="text" @click="handleLogout" style="margin-left: 20px">退出</el-button>
-            </div>
-          </div>
-        </div>
-        <!-- <router-view></router-view> -->
-         <!-- 首页 -->
-         <homepageL @AddAppJson="AddAppJson" :urlAddress.sync="urlAddress" v-show="!appSign" ref="homepageLRef"></homepageL>
+				<!-- 首页 -->
+				<homepageL
+					@AddAppJson="AddAppJson"
+					v-show="!appSign"
+					ref="homepageLRef"
+				></homepageL>
 
-         <!-- 循环数组展示iframe  -->
-          <div
-              v-for="(item,index) in AppJSon" :key="index">
-            <div style="height: calc(100vh - 60px);" v-show="item.stateL">
-              <div style="height: 100%;"  v-html="item.json"></div>
-            </div>
-          </div>
-        
-         <div v-if="loading" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;background-color: #fff;
-              display: flex;justify-content: center;align-items: center;">
-          <div style="display: flex;flex-direction: column;align-items: center;">
-            <img style="height: 75px;transform: scale(2);" src="../assets/img/cocoloading.gif" alt="">
-            <div style="color: #0354D7;">拼命加载中...</div>
-          </div>  
+				<!-- 循环数组展示iframe  -->
+				<div v-for="(item, index) in AppJSon" :key="index">
+					<!-- {{ item }} -->
+					<div style="height: calc(100vh - 60px)" v-show="item.stateL">
+						<iframe
+							allow="camera *; microphone *;display-capture;midi;encrypted-media;"
+							frameborder="no"
+							style="border: 0; width: 100%; height: calc(100vh - 60px)"
+							:src="item.json"
+							:ref="item.toolId"
+						>
+						</iframe>
+					</div>
+				</div>
 
-         </div>
-      </div>
-    </div>
-  </div>
+				<div
+					v-if="loading"
+					style="
+						position: absolute;
+						left: 0;
+						top: 0;
+						width: 100%;
+						height: 100%;
+						background-color: #fff;
+						display: flex;
+						justify-content: center;
+						align-items: center;
+					"
+				>
+					<div
+						style="display: flex; flex-direction: column; align-items: center"
+					>
+						<img
+							style="height: 75px; transform: scale(2)"
+							src="../assets/img/cocoloading.gif"
+							alt=""
+						/>
+						<div style="color: #0354d7">拼命加载中...</div>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
 </template>
 
 <script>
-import { mapGetters, mapActions } from 'vuex';
-import { loginOut } from '@/api/user';
-import sidebarL from '../components/sidebarL.vue';
+import { mapGetters, mapActions } from "vuex";
+import { loginOut } from "@/api/user";
+import sidebarL from "../components/sidebarL.vue";
 import { API_CONFIG } from "@/common/apiConfig";
-import store from '../store'
-import homepageL from './homepageL.vue';
-
+import store from "../store";
+import homepageL from "./homepageL.vue";
 
 export default {
-  name: "HomeView",
-  components:{
-    sidebarL,
-    homepageL
-  },
-  data() {
-    return {
-      perData:[],
-      toolList:[],
-      form:{},
-      urlAddress:'',
-      AppJSon:[],
-      loading:false
-    }
-  },
-  computed: {
-    ...mapGetters(['userinfo','appSign','userinfo2']),
-    userSuffix(){
-      let yym = ''
-      return function() {
-        
-        // this.userinfo.role == 1 && this.userinfo.rrole == 1 && this.userinfo.type == 1 && 
-        yym = Object.keys(this.userinfo2).length != 0 ? this.userinfo2 : this.userinfo
-       
-        let val = yym.accountNumber
+	name: "HomeView",
+	components: {
+		sidebarL,
+		homepageL,
+	},
+	data() {
+		return {
 
-        let userName = JSON.parse(JSON.stringify(val))
+			AppJSon: [],
+			loading: false,
+		};
+	},
+	computed: {
+		...mapGetters(["userinfo", "appSign", "userinfo2"]),
+		userSuffix() {
+			let yym = "";
+			return function () {
+				// this.userinfo.role == 1 && this.userinfo.rrole == 1 && this.userinfo.type == 1 &&
+				yym =
+					Object.keys(this.userinfo2).length != 0
+						? this.userinfo2
+						: this.userinfo;
 
-        const regEmail = new RegExp("^[A-Za-z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$");
-        
-        // // 判断用户输入账户带不带后缀
-        if (!regEmail.test(userName)) {
-          console.log('111');
-        } else {
-          const parts = userName.split('@');
-          userName = parts[0];
-        }
+				let val = yym.accountNumber;
 
-        return userName
-      }
-    },
-    roleUser(){
-      // this.userinfo.role == 1 && this.userinfo.rrole == 1 && this.userinfo.type == 1&&
-        return  Object.keys(this.userinfo2).length != 0 ? this.userinfo2 : this.userinfo
-    }
-  },
-  methods: {
-    ...mapActions({
-      logout: 'user/logout'
-    }),
-    openData(){
-        window.topU.U.MD.D.I.openApplication('my')
-    },
-    // 打开平台应用工具
-    AddAppJson(val){
-      console.log('val',val);
+				let userName = JSON.parse(JSON.stringify(val));
 
-      // 判断有没有打开过这个应用
-      let data = this.AppJSon.filter(e=>{
-        return val.toolId == e.toolId
-      })
-      // console.log('data',data);
+				const regEmail = new RegExp(
+					"^[A-Za-z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$"
+				);
 
-      if (data.length == 0) {   //为0则添加进列表,并将其他的展示状态改为false
-        this.loading = true
+				// // 判断用户输入账户带不带后缀
+				if (!regEmail.test(userName)) {
+					console.log("111");
+				} else {
+					const parts = userName.split("@");
+					userName = parts[0];
+				}
 
-        // 打开平台工具加载两秒
-        setTimeout(() => {
-          this.loading = false
-        }, 2000);
-        this.AppJSon.forEach(e=>{
-          this.$set(e, 'stateL', false); // 使用 Vue.set 确保响应式
-        })
-        this.AppJSon.push(val)
-      }else{
-        this.AppJSon.forEach(e=>{
-          if (val.toolId == e.toolId) {  //已经打开过了,将点击的工具展示状态改为false
-            this.$set(e, 'stateL', true); // 使用 Vue.set 确保响应式
-          }else{
-            this.$set(e, 'stateL', false); // 确保响应式更新
-          }
-        })
-      }
-    },
+				return userName;
+			};
+		},
+		roleUser() {
+			// this.userinfo.role == 1 && this.userinfo.rrole == 1 && this.userinfo.type == 1&&
+			return Object.keys(this.userinfo2).length != 0
+				? this.userinfo2
+				: this.userinfo;
+		},
+	},
+	methods: {
+		...mapActions({
+			logout: "user/logout",
+		}),
+		// 打开个人信息
+		openData() {
+			window.topU.U.MD.D.I.openApplication("my");
+		},
+		// 打开平台应用工具
+		AddAppJson(val) {
+			// console.log('val',val);
 
-    
-    async handleLogout() {
-      this.$confirm('确定退出吗', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(async () => {
-        loginOut()
-          .then(async () => {
-            this.$message({
-              message: '退出成功',
-              type: 'success'
-            });
-            await this.logout();
-            this.$router.push('/login');
-          })
-          .catch(err => {
-            console.error(err);
-          });
-      }).catch(() => {
-        // 取消操作
-      });
-    },
-   
-    // 获取学校权限与组织权限,优先使用学校权限,其次使用组织权限
-    getPer() {
-      // 查询首页应用
-      this.$refs.homepageLRef.getData()
-      //查询cocofrow最近使用与收藏
-      this.$refs.sidebarLRef.getData()
+			// 判断有没有打开过这个应用
+			let data = this.AppJSon.filter((e) => {
+				return val.toolId == e.toolId;
+			});
+
+			if (data.length == 0) {
+				//为0则添加进列表,并将其他的展示状态改为false
+				this.loading = true;
+
+				// 打开平台工具加载两秒
+				setTimeout(() => {
+					this.loading = false;
+				}, 2000);
+
+				this.AppJSon.forEach((e) => {
+					this.$set(e, "stateL", false); // 使用 Vue.set 确保响应式
+				});
+
+				this.AppJSon.push(val);
+			} else {
+				this.AppJSon.forEach((e) => {
+					if (val.toolId == e.toolId) {
+						//已经打开过了,将点击的工具展示状态改为false
+						this.$set(e, "stateL", true); // 使用 Vue.set 确保响应式
+					} else {
+						this.$set(e, "stateL", false); // 确保响应式更新
+					}
+				});
+
+				setTimeout(() => {
+					
+          console.log('this.$refs.appRef.contentWindow.document.body;',this.$refs[val.toolId][0].contentWindow.document.body);
+          
+					if (!this.$refs[val.toolId][0].contentWindow.document.body) {
+						this.$refs[val.toolId][0].contentWindow.location.reload();
+					}
+				}, 2000);
+			}
+		},
+
+		async handleLogout() {
+			this.$confirm("确定退出吗", "提示", {
+				confirmButtonText: "确定",
+				cancelButtonText: "取消",
+				type: "warning",
+			})
+				.then(async () => {
+					loginOut()
+						.then(async () => {
+							this.$message({
+								message: "退出成功",
+								type: "success",
+							});
+							await this.logout();
+							this.$router.push("/login");
+						})
+						.catch((err) => {
+							console.error(err);
+						});
+				})
+				.catch(() => {
+					// 取消操作
+				});
+		},
+
+		// 获取学校权限与组织权限,优先使用学校权限,其次使用组织权限
+		async getPer() {
+			// 查询首页应用
+			this.$refs.homepageLRef.getData();
+			//查询cocofrow最近使用与收藏
+			this.$refs.sidebarLRef.getData();
 
-      let params = [
-        {
-          functionName: API_CONFIG.ajax_schoolPermission.functionName, // 调用存储过程的名称
-          org: this.roleUser.org, //组织id
-          oid: this.roleUser.organizeid, //学校id
-        },
-      ];
-      
-      // 发起请求
-      this.$ajax
-        .post(API_CONFIG.baseUrl, params)
-        .then((res) => {
-          let data = res.data[0]
-          // console.log('data', data)
-          this.perData= JSON.parse(data[0].json)
-          this.getToolData()
-        })
-        .catch((err) => {
-          console.error("请求失败,错误信息:", err);
-        });
-    },
-    getToolData() {
 			let params = [
+				{
+					functionName: API_CONFIG.ajax_schoolPermission.functionName, // 调用存储过程的名称
+					org: this.roleUser.org, //组织id
+					oid: this.roleUser.organizeid, //学校id
+				},
+			];
+			// 获取学校权限与组织权限,优先使用学校权限,其次使用组织权限
+			// 第一步
+			let res = await this.$ajax.post(API_CONFIG.baseUrl, params);
+			let perData = JSON.parse(res.data[0][0].json);
+
+			// console.log('perData',JSON.parse(JSON.stringify(perData)));
+
+			// 第二步
+			let params2 = [
 				{
 					functionName: "select_desktopToolByPage",
 					status: "",
@@ -214,169 +271,171 @@ export default {
 					lim: 9999999,
 				},
 			];
-			this.$ajax
-				.post(API_CONFIG.baseUrl, params)
-				.then((res) => {
-					let _data = res.data;
-					let _list = _data[0];
-					_list.forEach((i) => {
-						i.url = JSON.parse(i.url);
-						i.json = JSON.parse(i.json);
-						i.argumentList = JSON.parse(i.argumentList);
-					});
-					this.toolList = _list;
-          // console.log('_list',_list);
-          
-					this.setDataListToo(_list);
-				})
-				.catch((err) => {
-					console.log(err);
-					this.$message.error("获取工具数据失败");
-				});
-		},
-    async setDataListToo(toolList = []) {
-      // console.log('toolList',toolList);
-      
-			let _form = JSON.parse(JSON.stringify(this.perData));
-			// _form.desktop.list.forEach((i, index) => {
-			// 	let _index = toolList.findIndex((i2) => i == i2.id);
-			// 	if (_index != -1) {
-			// 		_form.desktop.list[index] = toolList[_index];
-			// 	} else {
-			// 		console.log("无工具", i);
-			// 	}
-			// });
+			let res2 = await this.$ajax.post(API_CONFIG.baseUrl, params2);
+			let toolList = res2.data[0];
+			toolList.forEach((i) => {
+				i.url = JSON.parse(i.url);
+				i.json = JSON.parse(i.json);
+				i.argumentList = JSON.parse(i.argumentList);
+			});
+
+			// 第三步
 
-			_form.admin.index.list.forEach((i, index) => {
+			if (perData.admin.cocoFlow) {
+				perData.admin.cocoFlow.forEach((i, index) => {
+					let _index = toolList.findIndex((i2) => i.id == i2.id);
+					if (_index != -1) {
+						let _setData = toolList[_index];
+						_setData.setIcon = i.setIcon;
+						perData.admin.cocoFlow[index] = _setData;
+					} else {
+						console.log("无应用", i);
+					}
+				});
+			}
+			if (perData.admin.cocoFlow2) {
+				perData.admin.cocoFlow2.forEach((i, index) => {
+					let _index = toolList.findIndex((i2) => i.id == i2.id);
+					if (_index != -1) {
+						let _setData = toolList[_index];
+						_setData.setIcon = i.setIcon;
+						perData.admin.cocoFlow2[index] = _setData;
+					} else {
+						console.log("无应用", i);
+					}
+				});
+			}
+			perData.admin.index.list.forEach((i, index) => {
 				let _index = toolList.findIndex((i2) => i == i2.id);
 				if (_index != -1) {
-					_form.admin.index.list[index] = toolList[_index];
-          _form.admin.index.list[index].hovered = false
+					perData.admin.index.list[index] = toolList[_index];
+					perData.admin.index.list[index].hovered = false;
 				} else {
 					console.log("无工具", i);
 				}
 			});
 
-			_form.admin.sidebar.list.forEach((i, index) => {
+			perData.admin.sidebar.list.forEach((i, index) => {
 				if (i.children) {
 					i.children.forEach((i2, index2) => {
-						let _toolList = JSON.parse(JSON.stringify(toolList))
+						let _toolList = JSON.parse(JSON.stringify(toolList));
 						let _index = _toolList.findIndex((i3) => i2 == i3.id);
-						
+
 						if (_index != -1) {
-							_form.admin.sidebar.list[index].children[index2] = _toolList[_index];
-							_form.admin.sidebar.list[index].children[index2].typeId = _form.admin.sidebar.list[index].typeId + "," +_toolList[_index].id;
+							perData.admin.sidebar.list[index].children[index2] =
+								_toolList[_index];
+							perData.admin.sidebar.list[index].children[index2].typeId =
+								perData.admin.sidebar.list[index].typeId +
+								"," +
+								_toolList[_index].id;
 						} else {
 							console.log("无工具", i);
 						}
 					});
 				} else {
-					let _toolList = JSON.parse(JSON.stringify(toolList))
+					let _toolList = JSON.parse(JSON.stringify(toolList));
 					let _index = _toolList.findIndex((i2) => i == i2.id);
 					if (_index != -1) {
-						_form.admin.sidebar.list[index] = _toolList[_index];
-						_form.admin.sidebar.list[index].typeId =
-							_form.admin.sidebar.list[index].id;
+						perData.admin.sidebar.list[index] = _toolList[_index];
+						perData.admin.sidebar.list[index].typeId =
+							perData.admin.sidebar.list[index].id;
 					} else {
 						console.log("无工具", i);
-					} 
+					}
 				}
 			});
 
-      // console.log('_form',_form);
-      await store.commit('user/SET_FROM', _form)
-      // 获取后台管理设置常见应用
-      this.$refs.homepageLRef.getadmincocoFlow()
-      
-			this.$forceUpdate();
+			await store.commit("user/SET_FROM", perData);
+			// 获取后台管理设置常见应用
+			this.$refs.homepageLRef.getadmincocoFlow();
 		},
-  },
-  mounted() {
-    console.log('重新获取数据');
-    
-      this.getPer()
-  },
+	},
+	mounted() {
+		console.log("重新获取数据");
+		this.getPer();
+	},
 };
 </script>
 
 <style scoped>
-.top{
-  width: 100%;
-  padding: 0 90px;
-  display: flex;
-  height: 60px;
-  box-sizing: border-box;
+.top {
+	width: 100%;
+	padding: 0 90px;
+	display: flex;
+	height: 60px;
+	box-sizing: border-box;
 }
-.topCon{
-  display: flex;
-  width: 100%;
-  justify-content: space-between;
-  align-items: center;
+.topCon {
+	display: flex;
+	width: 100%;
+	justify-content: space-between;
+	align-items: center;
 }
 .body {
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
+	width: 100%;
+	height: 100%;
+	overflow: hidden;
+	font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
+		"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
 }
-.title{
-  font-family: PingFang SC;
-  font-weight: 400;
-  font-size: 14px;
-  line-height: 100%;
-  letter-spacing: 0%;
-  color: #969BA3;
-  display: flex;
-  gap: 11px;
+.title {
+	font-family: PingFang SC;
+	font-weight: 400;
+	font-size: 14px;
+	line-height: 100%;
+	letter-spacing: 0%;
+	color: #969ba3;
+	display: flex;
+	gap: 11px;
 }
-.person{
-  display: flex;
-  align-items: center;
+.person {
+	display: flex;
+	align-items: center;
 }
-.person_name{
-  display: flex;
-  gap: 9px;
+.person_name {
+	display: flex;
+	gap: 9px;
 }
-.personInfo{
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-  padding: 1px 0 2px;
-  box-sizing: border-box;
+.personInfo {
+	display: flex;
+	flex-direction: column;
+	justify-content: space-between;
+	padding: 5px 0 2px;
+	box-sizing: border-box;
 }
-.personInfoTit{
-  font-family: PingFang SC;
-  font-weight: 500;
-  font-size: 16px;
-  line-height: 100%;
-  color: #000000;
+.personInfoTit {
+	font-family: PingFang SC;
+	font-weight: 500;
+	font-size: 14px;
+	line-height: 100%;
+	color: #000000;
 }
-.personInfoBri{
-  font-family: PingFang SC;
-  font-weight: 300;
-  font-size: 10px;
-  line-height: 100%;
-  color: #969BA3;
+.personInfoBri {
+	font-family: PingFang SC;
+	font-weight: 300;
+	font-size: 10px;
+	line-height: 100%;
+	color: #969ba3;
 }
 .container {
-  display: flex;
-  width: 100%;
-  height: 100vh;
+	display: flex;
+	width: 100%;
+	height: 100vh;
 }
-.container >>> .el-loading-mask{
-  z-index: 0;
+.container >>> .el-loading-mask {
+	z-index: 0;
 }
 .table-container {
-  /* display: flex;
+	/* display: flex;
   flex: 1;
   justify-content: center; */
-  width: 100%;
-  background-color: #F9FAFB;
-  position: relative;
+	width: 100%;
+	background-color: #f9fafb;
+	position: relative;
 }
-.leftBar{
-  /* box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px 6px rgb(0 0 0 / 0.1); */
-  /* overflow: visible;  */
-  z-index: 999;
+.leftBar {
+	/* box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px 6px rgb(0 0 0 / 0.1); */
+	/* overflow: visible;  */
+	z-index: 999;
 }
-</style>
+</style>

+ 4 - 4
src/views/homepageL.vue

@@ -14,7 +14,6 @@ import { mapGetters } from 'vuex';
 import { API_CONFIG } from "@/common/apiConfig";
 
     export default {
-        props:['urlAddress'],
         computed: {
             ...mapGetters(['userinfo','userinfo2']),
             roleUser(){
@@ -35,14 +34,15 @@ import { API_CONFIG } from "@/common/apiConfig";
         methods: {
             // 获取后台管理设置常见应用
             getadmincocoFlow(){
+                // 获取已添加cocoFlow应用
+                this.$refs.topPageRef.getData()
+
                 this.$refs.topPageRef.getAdmincocoFlow()
             },
 
             // 查询首页应用
             getData(){
-                // 获取已添加cocoFlow应用
-                this.$refs.topPageRef.getData()
-
+                
                 let params = [
                     {
                         functionName: API_CONFIG.ajax_allApp.functionName, // 调用存储过程的名称

+ 1 - 1
src/views/kanBan/components/AdataKanban.vue

@@ -819,7 +819,7 @@ export default {
     gap: 42px;
     font-family: PingFang SC;
     font-weight: 500;
-    font-size: 14px;
+    font-size: 16px;
     line-height: 22px;
     color: #969BA3;
     margin-bottom: 15px;

+ 3 - 0
src/views/kanBan/components/AquickEntrance.vue

@@ -82,6 +82,9 @@ import { addrrole } from "@/api/user";
                     // console.log('res.data[0]',res.data[0]);
                     if (res.data[0].length) {
                         await store.commit('user/SET_USERINFO2', res.data[0][0])
+
+                        await store.commit('user/SET_AppSIGN', '')
+
                         this.loading = false
 
                         this.$router.push('/');

+ 17 - 11
src/views/kanBan/index.vue

@@ -5,9 +5,10 @@
             <div class="title">
               <span v-if="userinfo.orgName">{{userinfo.orgName}}</span >
               <span style="color: #0663FE;font-weight: 600;">{{ userinfo.schoolName }}</span>
+              <span style="color: #0663FE;cursor: pointer;font-weight: 600;" v-if="isIndex2 == 2" @click="gotoli">返回校区</span>
+
             </div>
             <div class="person">
-                <el-button v-if="isIndex2 == 2" type="text" @click="gotoli" style="margin-right: 20px">返回校区</el-button>
               <div class="person_name">
                 <img
                  @click="openData()"
@@ -28,7 +29,7 @@
         </div>
         <div class="midBlo">
             <div class="buttonArea">
-                <div style="width: 500px;display: flex;gap: 100px;">
+                <div :style="{width: '500px',display: 'flex',justifyContent : userinfo.role == 1 && userinfo.rrole == 1 && userinfo.type ==1? 'space-between' : 'center'}">
                     <div class="btnDiv"  :class="{ active: isActive === 1 }" >
                         <div v-if="userinfo.role == 1 && userinfo.rrole == 1 && userinfo.type ==1" @click="setActive(1)">
                             数据看板
@@ -71,6 +72,7 @@ import AquickEntrance from './components/AquickEntrance';
 import AschoolFeature from './components/AschoolFeature';
 import { mapGetters, mapActions } from 'vuex';
 import { loginOut } from '@/api/user';
+import store from '../../store'
 
 export default {
     name:'kanBan',
@@ -82,6 +84,7 @@ export default {
     },
     computed: {
     ...mapGetters(['userinfo','userinfo2','fromL','appSign']),
+    // 去除账号后缀
     userSuffix(){
       return function(val) {
         let userName = JSON.parse(JSON.stringify(val))
@@ -109,9 +112,12 @@ export default {
             logout: 'user/logout'
         }),
         // 返回首页
-        gotoli(){
+        async gotoli(){
+            await store.commit('user/SET_AppSIGN', '')
+
             this.$router.push('/homepageL');
         },
+        // 退出登录
         async handleLogout() {
             this.$confirm('确定退出吗', '提示', {
                 confirmButtonText: '确定',
@@ -134,8 +140,9 @@ export default {
                 // 取消操作
             });
         },
+        // 导航栏切换
         setActive(Index) {
-            this.isActive = Index; // 设置激活的按钮
+            this.isActive = Index; 
         }
     },
     mounted() {
@@ -180,6 +187,7 @@ export default {
   color: #969BA3;
   display: flex;
   gap: 11px;
+  display: flex;
 }
 .person{
   display: flex;
@@ -193,13 +201,13 @@ export default {
   display: flex;
   flex-direction: column;
   justify-content: space-between;
-  padding: 1px 0 2px;
+  padding: 5px 0 2px;
   box-sizing: border-box;
 }
 .personInfoTit{
   font-family: PingFang SC;
   font-weight: 500;
-  font-size: 16px;
+  font-size: 14px;
   line-height: 100%;
   color: #000000;
 }
@@ -266,16 +274,14 @@ export default {
 
 .btnDiv {
     height: 48px;
-    width: 64px;
+    width: 72px;
     text-align: center;
     line-height: 48px;
-    margin-left: 15px;
+    font-size: 18px;
+    /* margin-left: 15px; */
     cursor: pointer;
 }
 
-/* .btnDiv:hover {
-    background-color: #d6d6e0;
-} */
 
 .btnDiv.active {
     font-weight: 600;

+ 4 - 0
src/views/login/loginPage.vue

@@ -135,8 +135,10 @@ import { API_CONFIG } from "@/common/apiConfig";
 import "@/common/wxLogin";
 import { getUser } from "@/api/user";
 import { loginOut } from "@/api/user";
+import { myMixin } from "@/mixins/mixin.js"
 
 export default {
+	mixins: [ myMixin ],
 	name: "loginPage",
 	data() {
 		return {
@@ -286,6 +288,7 @@ export default {
 							window.localStorage["identity"] = JSON.stringify(_data.identity);
 							this.$message.success("登录成功");
 							await this.login();
+							this.addOp3('1', "", { type:this.prefixL + "login" }, "success",_data.userid)
 							if (
 								userjson.data[0][0].type == 1 &&
 								userjson.data[0][0].role == 1 &&
@@ -559,6 +562,7 @@ export default {
 						window.localStorage["identity"] = JSON.stringify(_data.identity);
 						this.$message.success("登录成功");
 						await this.login();
+						this.addOp3('1', "", { type:this.prefixL + "login" }, "success",_data.userid)
 						if (
 							userjson.data[0][0].type == 1 &&
 							userjson.data[0][0].role == 1 &&

Some files were not shown because too many files changed in this diff