liuhj пре 2 година
родитељ
комит
3d6a4ca773

+ 11 - 1
src/components/Login.vue

@@ -72,6 +72,7 @@ export default {
         },
         //登录
         Login() {
+            var homepage="";
             if(this.usernum==""||this.password==""){
                 this.$message({
                     message: "请填写账号密码!",
@@ -94,7 +95,16 @@ export default {
                 if(res.data.code==200){
                     localStorage.setItem('userinif', JSON.stringify(res.data.data));
                     that.fullscreenLoading=false;
-                    that.$router.push('/home/index');
+                    for(var l=0;l<res.data.data.authData.length;l++){
+                        if(res.data.data.authData[l].modulName=='主页'){
+                            homepage=res.data.data.authData[l].pageList[0].webUrl
+                            localStorage.setItem("indexs",res.data.data.authData[l].modulid+'-'+res.data.data.authData[l].pageList[0].pageid);
+                            localStorage.setItem("innhtml",res.data.data.authData[l].pageList[0].pageName);
+                        }
+                    }
+                    that.$router.push({ path: "/home"+homepage});
+                    console.log("/home"+homepage)
+                    // that.$router.push('/home/index');
                 }else{
                     that.fullscreenLoading=false;
                     that.$message({

+ 1 - 3
src/components/OP/OPgroup.vue

@@ -144,9 +144,7 @@ export default {
             ],
             value: '0',
             groupDatas:[],
-            groupData: [
-                
-            ],
+            groupData: [],
             groupDatass:[],
             currentPage: 1, // 当前页码
             pageSize: 12 ,// 每页的数据条数

+ 1 - 1
src/components/child/AuthorityJob.vue

@@ -82,7 +82,7 @@ export default {
             pageSize: 14,// 每页的数据条数
             stateArr: [],
             selectedAccount: [],
-            PathUrl:'http://localhost:5256',
+            PathUrl:'',
             opList :[],//操作方式
             loading:true,
         }

+ 1 - 4
src/components/child/AuthorityUser.vue

@@ -65,9 +65,6 @@
 </template>
 
 <script>
-import { cw } from '@fullcalendar/core/internal-common';
-import { promised, reject, resolve } from 'q';
-
 export default {
     data() {
         return {
@@ -88,7 +85,7 @@ export default {
             pageSize: 14,// 每页的数据条数
             stateArr: [],
             selectedAccount: [],
-            PathUrl: 'http://localhost:5256',
+            PathUrl: '',
             opList: [],//操作方式
             loading: true,
             Users: [],

+ 98 - 10
src/components/child/Generalindex.vue

@@ -51,28 +51,30 @@
                             <el-input
                                 placeholder="请输入内容"
                                 v-model="input"
+                                @input="Inquireclick()"
                                 clearable>
                             </el-input>
-                            <el-button type="primary"><i class="icon-sousuo"></i></el-button>
+                            <!-- <el-button type="primary"><i class="icon-sousuo"></i></el-button> -->
                         </div>
                     </div>
                     <template>
                         <el-table
-                        :data="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)"
+                        :data="groupDatas.slice((currentPage-1)*pageSize,currentPage*pageSize)"
                         border
                         style="width: 100%">
                             <el-table-column
-                                prop="date"
+                                prop="teamName"
                                 label="团组名"
-                                width="220">
+                                width="350">
                             </el-table-column>
                             <el-table-column
-                                prop="name"
+                                prop="clientUnit"
                                 label="团组单位">
                             </el-table-column>
                             <el-table-column
-                                width="260" 
-                                prop="address"
+                                width="120" 
+                                prop="visitDate"
+                                :formatter="filteryear"
                                 label="出访时间">
                             </el-table-column>
                             <el-table-column width="80" label="管控">
@@ -90,7 +92,7 @@
                             :page-sizes="[8,10,15,20]" 
                             :page-size="pageSize" 
                             layout="total, sizes, prev, pager, next" 
-                            :total="tableData.length">
+                            :total="groupDatas.length">
                         </el-pagination>
                     </div>
                 </div>
@@ -151,7 +153,7 @@ export default {
     },
     data() {
         return {
-            tableData: [
+            groupData: [
                 {
                     date: '2016-05-03',
                     name: '王小虎',
@@ -238,6 +240,7 @@ export default {
                     address: '上海市普陀区金沙江路 1518 弄'
                 }
             ],
+            groupDatas:[],
             currentPage: 1, // 当前页码
             pageSize: 8 ,// 每页的数据条数
             //日程数据
@@ -344,9 +347,94 @@ export default {
         },
         handleDateClick(inif){
             // console.log(info)
-        }
+        },
+        Grouplist(){
+            var url="/api/Groups/GetGroupList"
+            var that=this
+            that.fullscreenLoading = true;
+            this.$axios({
+                method: 'post',
+                url:url,
+                headers:{
+                    Authorization:'Bearer '+this.token
+                },
+                data:{
+                    portType: 1,
+                }
+            }).then(function(res){
+                if(res.data.code==200){
+                    that.groupData=res.data.data
+                    that.groupData.forEach(item=>{
+                        if(item.clientName==null){
+                            item.clientName = ''
+                        } 
+                        if(item.clientUnit==null){
+                            item.clientUnit = ''
+                        } 
+                        if(item.id==null){
+                            item.id = ''
+                        } 
+                        if(item.isSure==null){
+                            item.isSure = ''
+                        } 
+                        if(item.jietuanOperator==null){
+                            item.jietuanOperator = ''
+                        } 
+                        if(item.salesQuoteNo==null){
+                            item.salesQuoteNo = ''
+                        } 
+                        if(item.teamName==null){
+                            item.teamName = ''
+                        } 
+                        if(item.teamType==null){
+                            item.teamType = ''
+                        } 
+                        if(item.tourCode==null){
+                            item.tourCode = ''
+                        } 
+                        if(item.visitDate==null){
+                            item.visitDate = ''
+                        } 
+                        if(item.visitDays==null){
+                            item.visitDays = ''
+                        } 
+                        if(item.visitPNumber==null){
+                            item.visitPNumber = ''
+                        } 
+                    })
+                    that.groupDatas=that.groupData;
+                    console.log(that.groupData)
+                    that.fullscreenLoading = false;
+                }
+            })
+        },
+        Inquireclick() {
+            var newarr = [];
+            if (this.input == "") {
+                newarr = this.groupData;
+            } else {
+                for (var i = 0; i < this.groupData.length; i++) {
+                    if (this.groupData[i].teamName.indexOf(this.input) != -1) {
+                        newarr.push(this.groupData[i]);
+                    }
+                    else if (this.groupData[i].clientUnit.indexOf(this.input) != -1) {
+                        newarr.push(this.groupData[i]);
+                    }
+                    else if (this.groupData[i].visitDate.indexOf(this.input) != -1) {
+                        newarr.push(this.groupData[i]);
+                    }
+                }
+            }
+            this.groupDatas = newarr;
+            this.currentPage = 1;
+        },
+        filteryear(val){
+            let gstime=val.visitDate.split(' ')[0]
+            return gstime;
+        },
     },
     mounted(){
+        this.Grouplist()
         // this.calendarOptions.events.push({
         // color: '#ff9900', 
         // title: "kljkl",

+ 1 - 3
src/components/child/PageFunction.vue

@@ -88,8 +88,6 @@
 
 
 <script>
-import { cw } from '@fullcalendar/core/internal-common';
-import { promised, reject, resolve } from 'q';
 import Modal from '../template/dialog.vue';
 
 export default {
@@ -100,7 +98,7 @@ export default {
         SearchInput:'', //查询的值
         currentPage : 1 , //页码
         pageSize: 5,// 每页的数据条数
-        PathUrl:'http://localhost:5256',
+        PathUrl:'',
         showModal: false, //测试弹层
         dialogTitle:'测试标题',
         pageBind:{

+ 54 - 8
src/components/home.vue

@@ -33,7 +33,11 @@
               </div>
             </div>
           </div>
-          <el-submenu v-for="(item,index) in menuList" :key="index" :index='item.modulid + ""' @click="toURL($event.index)">
+          <el-menu-item v-for="(item,filindex) in filmenuList" :key="filindex+'/'" :index="item.modulid+'-'+item.pageList[0].pageid" @click="toURLs($event.index,item)">
+            <i class="iconfont icon-shouye"></i>
+            <span slot="title">{{item.pageList[0].pageName}}</span>
+          </el-menu-item>
+          <el-submenu v-for="(item,index) in filmenuLists" :key="index" :index='item.modulid + ""' @click="toURL($event.index)">
             <template slot="title">
               <i class="iconfont icon-shouye"></i>
               <span>{{item.modulName}}</span>
@@ -42,10 +46,6 @@
               <el-menu-item @click="toURL($event.index,items)"  v-for="(items,index) in item.pageList" :key="index" :index="items.modulid+'-'+items.pageid">{{items.pageName}}</el-menu-item>
             </el-menu-item-group>
           </el-submenu>
-          <!-- <el-menu-item v-for="(item,index) in menuList" :key="index" index="" @click="toURL($event.index)">
-            <i class="iconfont icon-shouye"></i>
-            <span slot="title">{{item.modulName}}</span>
-          </el-menu-item> -->
           <!-- <el-menu-item index="1" @click="toURL($event.index)">
             <i class="iconfont icon-shouye"></i>
             <span slot="title">首页</span>
@@ -182,7 +182,7 @@
               <div class="operate-li">全屏</div>
               <div class="operate-li">修改密码</div>
               <div class="operate-li">个人资料</div>
-              <div class="operate-li">登出</div>
+              <div @click="logOut()" class="operate-li">登出</div>
             </div>
           </div>
         </el-header>
@@ -219,6 +219,14 @@
           document.querySelector(".all").style.height = window.innerHeight + "px";
           document.querySelector(".delwh").style.width = "";
         },
+        toURLs(val,item) {
+          console.log(val)
+          console.log(item)
+          localStorage.setItem("indexs",val);
+          localStorage.setItem("innhtml",item.pageList[0].pageName);
+          this.$router.push({ path: "/home"+item.pageList[0].webUrl });
+          document.querySelector(".header-title").innerHTML =item.pageList[0].pageName;
+        },
         toURL(val,item) {
           console.log(val)
           localStorage.setItem("indexs",val);
@@ -273,6 +281,28 @@
         getmenu(){
           this.menuList=JSON.parse(localStorage.getItem('userinif')).authData;
           console.log(this.menuList)
+        },
+        //登出
+        logOut(){
+          this.$confirm('此操作将退出此账号, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            this.$router.push({name:'Login'})
+            localStorage.clear();
+            this.$message({
+              type: 'success',
+              message: '已退出!'
+            });
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '已取消退出'
+            });          
+          });
+          // this.$router.push({name:'Login'})
+          // localStorage.clear();
         }
       },
       mounted() {
@@ -283,9 +313,25 @@
       },
       created() {
         this.userinif=JSON.parse(localStorage.getItem('userinif'));
-        console.log(this.userinif)
-        console.log(this.$route);
+        
+
       },
+      computed:{
+        filmenuList:function(){
+          return this.menuList.filter(function(item){
+            if(item.modulName=='主页'){
+              return item
+            }
+          })
+        },
+        filmenuLists:function(){
+          return this.menuList.filter(function(item){
+            if(item.modulName!='主页'){
+              return item
+            }
+          })
+        }
+      }
     };
   </script>
   <style>

+ 1 - 1
src/components/system/SetData.vue

@@ -96,7 +96,7 @@ export default {
                 ],
             },
             setDataType: [
-                { id: 0, name: '全部' }
+              
             ]
         }
     },

+ 2 - 2
src/main.js

@@ -9,8 +9,8 @@ import './assets/icon/iconfont.css'
 import store from './store/index.js';
 
 import axios from 'axios';
-//axios.defaults.baseURL = 'http://132.232.92.186:8888';
-axios.defaults.baseURL = 'http://localhost:5256/';
+axios.defaults.baseURL = 'http://132.232.92.186:8888';
+// axios.defaults.baseURL = 'http://localhost:5256/';
 import { Message } from "element-ui";
 Vue.prototype.$message = Message
 Vue.prototype.$axios = axios;