yrik 4 years ago
parent
commit
50ccb1862e
2 changed files with 318 additions and 64 deletions
  1. 7 0
      ruoyi-ui/src/api/system/config.js
  2. 311 64
      ruoyi-ui/src/views/index.vue

+ 7 - 0
ruoyi-ui/src/api/system/config.js

@@ -55,6 +55,13 @@ export function listIndex(data) {
     data: data
     data: data
   })
   })
 }
 }
+export function listIndexfou(data) {
+  return request({
+    url: '/boman-system/p/cs/getTableQuery',
+    method: 'post',
+    data: data
+  })
+}
 // 修改参数配置
 // 修改参数配置
 export function updateConfig(data) {
 export function updateConfig(data) {
   return request({
   return request({

+ 311 - 64
ruoyi-ui/src/views/index.vue

@@ -17,12 +17,13 @@
                   </ul>
                   </ul>
                   <div class="index_haderPagin">
                   <div class="index_haderPagin">
                     <el-pagination
                     <el-pagination
+                          v-show="total>0"
                          @size-change="handleSizeChange"
                          @size-change="handleSizeChange"
                          @current-change="handleCurrentChange"
                          @current-change="handleCurrentChange"
                          :current-page.sync="currentPage3"
                          :current-page.sync="currentPage3"
                          :page-size="pageSize"
                          :page-size="pageSize"
                          layout="prev, pager, next, jumper"
                          layout="prev, pager, next, jumper"
-                         :total="1000">
+                         :total="total">
                     </el-pagination>
                     </el-pagination>
                     <span>共 {{total}} 条  每页显示 6 条  </span>
                     <span>共 {{total}} 条  每页显示 6 条  </span>
                   </div>
                   </div>
@@ -39,7 +40,7 @@
                      <!-- <el-tab-pane  name="first">
                      <!-- <el-tab-pane  name="first">
                         <span slot="label" class="index_heseviewed"><p class="tab_i">3</p> 我的行程</span> -->
                         <span slot="label" class="index_heseviewed"><p class="tab_i">3</p> 我的行程</span> -->
                          <div v-if="num == 0">
                          <div v-if="num == 0">
-                           <el-table :data="tableData" style="width: 100%;margin-top: 10px;"  :stripe="true"   >
+                           <el-table :data="tableDataalid" style="width: 100%;margin-top: 10px;"  :stripe="true"   >
                                    <!-- <el-table-column type="selection" width="55" align="center" /> -->
                                    <!-- <el-table-column type="selection" width="55" align="center" /> -->
                                    <el-table-column label="序号" align="center" prop="noticeId" width="60" height="53" max-height="53" />
                                    <el-table-column label="序号" align="center" prop="noticeId" width="60" height="53" max-height="53" />
                                   <el-table-column
                                   <el-table-column
@@ -53,16 +54,18 @@
                                     label="部门"
                                     label="部门"
                                     align="center"
                                     align="center"
                                     prop="name"
                                     prop="name"
-                                    :formatter="typeFormat"
+
                                     width="70"
                                     width="70"
                                   />
                                   />
+                                  <!-- :formatter="typeFormat" -->
                                   <el-table-column
                                   <el-table-column
                                     label="请假类型"
                                     label="请假类型"
                                     align="center"
                                     align="center"
                                     prop="status"
                                     prop="status"
-                                    :formatter="statusFormat"
+
                                     width="75"
                                     width="75"
                                   />
                                   />
+                                  <!-- :formatter="statusFormat" -->
                                   <el-table-column label="请假事由" align="center" prop="createBy" width="100"  :show-overflow-tooltip="true"/>
                                   <el-table-column label="请假事由" align="center" prop="createBy" width="100"  :show-overflow-tooltip="true"/>
                                   <el-table-column label="请假时间" align="center" prop="date" width="150"/>
                                   <el-table-column label="请假时间" align="center" prop="date" width="150"/>
                                     <!-- <template slot-scope="scope">
                                     <!-- <template slot-scope="scope">
@@ -112,32 +115,27 @@
            <div class="index_heade  index_headeProfile">
            <div class="index_heade  index_headeProfile">
              <img src="../assets/images/icon_tjbj.png" alt="" class="index_headerImg">
              <img src="../assets/images/icon_tjbj.png" alt="" class="index_headerImg">
             <p class="index_headetab">
             <p class="index_headetab">
-              <span :class="[num == index ? ' spanto' : '']" v-for="(item,index) in editableTabsteo" :key="index" @click="tabSbu(index)">{{item.dictLabel}} </span>
+              <span :class="[numprofile == index ? ' spanto' : '']" v-for="(item,index) in editableTabsteo" :key="index" @click="tabSbuprofile(item.dictValue)">{{item.dictLabel}} </span>
             </p>
             </p>
             <!-- <el-tabs v-model="activeName" @tab-click="handleClick">
             <!-- <el-tabs v-model="activeName" @tab-click="handleClick">
                  <el-tab-pane label="用户管理" name="first"> -->
                  <el-tab-pane label="用户管理" name="first"> -->
-                   <div v-if="num == 0">
-                     <h3 style="text-align: center;">北京凯特伟业科技有限公司</h3>
-                                      <p class="index_profilep">	北京凯特伟业科技有限公司,是HBP集团(股票代码002554)下属全资子公司,主营业务互联网软件服务。公司拥有十余年软件开发经验,其案例遍布能源、通信、金融 、医疗、养老 、制造业等各行业。主要产品有JEPLUS软件开发平台、蒜瓣企业管理系统等,并提供saas服务。
-                     蒜瓣产品支持SAAS(即当前软件发展最流行的多租户模式,例如钉钉)和定制两种模式。一般企业不需要购买任何硬件,刚开始只需要简单注册即可,企业无需再配备IT方面的专业技术人员,同时又能得到最新的技术应用,满足企业对信息管理的需求;大型企业有专业化需求时,可采用定制模式。</p>
+                   <div >
+                     <h3 style="text-align: center;">{{tieku}}</h3>
+                     <!-- {{getLisprofileone[0].info_title}} -->
+                                      <p class="index_profilep" > {{comg}}	</p>
+                                      <!-- {{getLisprofileone[0].info_content}} -->
                                       <div class="index_haderPagin">
                                       <div class="index_haderPagin">
                                         <el-pagination
                                         <el-pagination
-                                             @size-change="handleSizeChange"
-                                             @current-change="handleCurrentChange"
+                                             @size-change="handleSizeChangeprofile"
+                                             @current-change="handleCurrentChangeprofile"
                                              :current-page.sync="currentPage3"
                                              :current-page.sync="currentPage3"
-                                             :page-size="pageSize"
+                                             :page-size="queryParamstabprofile.pageSize"
                                              layout="prev, pager, next, jumper"
                                              layout="prev, pager, next, jumper"
-                                             :total="1000">
+                                             :total="totalprofile">
                                         </el-pagination>
                                         </el-pagination>
-                                        <span>共 85 条  每页显示 5 条  当前 1/17 页</span>
+                                        <span>共 {{totalprofile}} 条  每页显示 1条  </span>
                                       </div>
                                       </div>
                    </div>
                    </div>
-                <!-- </el-tab-pane>
-                 <el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
-                 <el-tab-pane label="角色管理" name="third">角色管理</el-tab-pane>
-                 <el-tab-pane label="定时任务补偿" name="fourth">定时任务补偿</el-tab-pane>
-             </el-tabs> -->
-
            </div>
            </div>
         </el-col>
         </el-col>
       </el-col>
       </el-col>
@@ -149,8 +147,25 @@
               <span>日程</span>
               <span>日程</span>
               <span><i class="el-icon-date"></i>创建日程</span>
               <span><i class="el-icon-date"></i>创建日程</span>
             </p>
             </p>
-            <el-calendar v-model="value">
-            </el-calendar>
+            <el-calendar id="calendar">
+                <!-- 这里使用的是 2.5 slot 语法,对于新项目请使用 2.6 slot 语法-->
+                <template
+                  slot="dateCell"
+                  slot-scope="{date, data}">
+                  <!--自定义内容-->
+                  <div>
+                    <div class="calendar-day" style="text-align: center">
+                      <el-tooltip v-if="brightDate.indexOf(data.day) != -1" class="item" effect="dark" :content="content(data.day)" placement="right">
+                        <span class="everyDay">{{ data.day.split('-').slice(2).join('-') }}</span>
+                      </el-tooltip>
+                      <span v-else>{{ data.day.split('-').slice(2).join('-') }}</span>
+                      <!-- <p :class="data.isSelected ? 'is-selected' : ''">
+                            {{ data.day.split('-').slice(1).join('-') }} {{ data.isSelected ? '✔️' : ''}}
+                      </p> -->
+                    </div>
+                  </div>
+                </template>
+              </el-calendar>
             <img src="../assets/images/pic_kpbg.png" alt="" class="index_navTimeimg">
             <img src="../assets/images/pic_kpbg.png" alt="" class="index_navTimeimg">
           </div>
           </div>
          </div>
          </div>
@@ -159,13 +174,14 @@
            <div class="index_nav index_memoranduNnavTime">
            <div class="index_nav index_memoranduNnavTime">
             <div class="index_navTime ">
             <div class="index_navTime ">
               <p class="index_navTimep">
               <p class="index_navTimep">
-                <span>日程</span>
+                <span>备忘录</span>
                 <span><i class="el-icon-date"></i>创建日程</span>
                 <span><i class="el-icon-date"></i>创建日程</span>
               </p>
               </p>
               <ul >
               <ul >
-                <li v-for="(index,item) in 6" :key="index">
-                  <p>今日的工作安排</p>
-                  <span>01-24</span>
+                <li v-for="(item,index) in getmemorandum" :key="index">
+                  <p>{{item.memorandum_title}}
+                  </p>
+                  <span>{{item.remind_time}}</span>
                 </li>
                 </li>
 
 
               </ul>
               </ul>
@@ -187,41 +203,27 @@
                            <!-- <span><i class="el-icon-date"></i>创建日程</span> -->
                            <!-- <span><i class="el-icon-date"></i>创建日程</span> -->
                          </p>
                          </p>
                         <div class="index_memoranduMailnav">
                         <div class="index_memoranduMailnav">
-                          <el-table :data="tableData" style="width: 100%;margin-top: 10px;"  :stripe="true"  >
-                                  <!-- <el-table-column type="selection" width="55" align="center" /> -->
-                                  <!-- <el-table-column label="序号" align="center" prop="noticeId" width="60" height="53" max-height="53" /> -->
-                                 <el-table-column
-                                   label="申请人"
-                                   align="center"
-                                   prop="name"
-                                   :show-overflow-tooltip="true"
-                                   style="height: 38px;"
-                                 />
-                                 <el-table-column
-                                   label="部门"
-                                   align="center"
-                                   prop="name"
-                                   :formatter="typeFormat"
-                                   style="height: 38px;"
-                                 />
-                                 <el-table-column
-                                   label="请假类型"
-                                   align="center"
-                                   prop="status"
-                                   :formatter="statusFormat"
-                                   style="height: 38px;"
-                                 />
-
-                                </el-table>
+                           <div class="tab_tol">
+                          	<tr class="tr_one">
+                          		<th style=" text-align: center;" v-for="(item,index) in tableDataalid" :key="index">{{item.columnComment}}</th>
+                          	</tr>
+                          		<tr v-for="(item,index) in getLisaillie" :key="index" :class=" [index%2  ==0 ? 'two_tr two_trtwo':'two_tr']" @click="chakn(item)">
+                          			<td style=" text-align: center;" >{{ item.contacts_name }}</td>
+                          			<td style="text-align: center;">{{ item.dept_id  }}</td>
+                          			<td style=" text-align: center;" >{{ item.phone }}</td>
+                          			<td style=" text-align: center;" >{{ item.is_del == 1? '删除' :  '未删除'}}</td>
+                          			<td style="text-align: center; " >{{ item.remark}}</td>
+                          		</tr>
+                           </div>
                           <div class="index_haderPagin index_haderPaginfoiu">
                           <div class="index_haderPagin index_haderPaginfoiu">
                             <el-pagination
                             <el-pagination
-                                 @size-change="handleSizeChange"
-                                 @current-change="handleCurrentChange"
+                                 @size-change="handleSizeChangeali"
+                                 @current-change="handleCurrentChangeali"
                                  :current-page.sync="currentPage3"
                                  :current-page.sync="currentPage3"
-                                 :page-size="pageSize"
+                                 :page-size="queryParamsail.pageSize"
                                  :small= "true"
                                  :small= "true"
                                  layout="prev, pager, next, jumper"
                                  layout="prev, pager, next, jumper"
-                                 :total="1000">
+                                 :total="totalali">
                             </el-pagination>
                             </el-pagination>
                           </div>
                           </div>
                         </div>
                         </div>
@@ -239,7 +241,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-  import { listIndex, listIndextwo, listIndextherr, getConfig, delConfig, addConfig, updateConfig, clearCache } from "@/api/system/config";
+  import { listIndex, listIndextwo, listIndextherr, listIndexfou, getConfig, delConfig, addConfig, updateConfig, clearCache } from "@/api/system/config";
 export default {
 export default {
   name: "index",
   name: "index",
   data() {
   data() {
@@ -248,7 +250,9 @@ export default {
       version: "2.5.0",
       version: "2.5.0",
        currentPage3: 1,
        currentPage3: 1,
        total:0,
        total:0,
-       pageSize:10,
+       totalprofile:0,
+       totalali:0,
+       pageSize:6,
        activeName: 'second',
        activeName: 'second',
        value: new Date(),
        value: new Date(),
        editableTabs: [],
        editableTabs: [],
@@ -262,21 +266,113 @@ export default {
         condition:{
         condition:{
           notice_type:1
           notice_type:1
         }
         }
-
-
+      },
+      queryParamstab:{
+        table:'sys_notice',
+        orderBy:'create_time desc',
+        pageNo:1,
+        pageSize:6,
+        condition:{
+          notice_type:1
+        }
+      },
+      // 公司概况
+      queryParamstabprofile:{
+        table:'sys_info',
+        orderBy:'create_time desc',
+        pageNo:1,
+        pageSize:1,
+        condition:{
+          notice_type:1
+        }
+      },
+      // 日历
+      queryParamscalendar:{
+        table:'sys_schedule',
+        orderBy:'create_time desc',
+        pageNo:1,
+        pageSize:10,
+      },
+      // 备忘录
+      queryParamstabmemorandum:{
+        table:'sys_memorandum',
+        orderBy:'create_time desc',
+        pageNo:1,
+        pageSize:6,
+      },
+      // 通讯录
+      queryParamsail:{
+        table:'sys_contacts',
+        orderBy:'create_time desc',
+        pageNo:1,
+        pageSize:6,
       },
       },
       num:0,
       num:0,
+      numprofile:0,
       dictType:'sys_notice_type',
       dictType:'sys_notice_type',
       // 公司概况
       // 公司概况
       dictTypetwo:'sys_describe_type',
       dictTypetwo:'sys_describe_type',
+      gettabList:[],
+      getLisprofileone:[],
+      // 备忘录
+      getmemorandum:[],
+      //通讯录参数
+      aliemg:{
+        table:'sys_contacts'
+      },
+      tableDataalid:[],
+      getLisaillie:[],
+      alendarList:[],
+      calendarData: [
+
+            ],
+            ary:[],
+            tieku:'',
+            comg:'',
+            aekti:''
     };
     };
   },
   },
+
   created() {
   created() {
+    this.getLisalendar()//日历
     this.getList()
     this.getList()
     this.getListtab()
     this.getListtab()
     this.getLiser()
     this.getLiser()
+    this.getLisprofile()
+    this.getLismemorandum()  //备忘录
+    this.getLisail()//通讯录
+    this.getLisailtwo()
+
   },
   },
+  computed: {
+     // 时间高亮的数组
+     brightDate () {
+       // let ary = []
+       var that =  this
+       console.log(that.calendarData)
+       for (var i = 0 ; i < that.calendarData.length; i++) {
+         // that.ary.push(that.calendarData[i].startDate)
+         that.ary.push(that.calendarData[i].begin_time.slice(0,10))
+         console.log(that.calendarData[i].begin_time)
+       }
+       console.log(that.ary)
+       return that.ary
+     }
+
+   },
   methods: {
   methods: {
+
+      // Tooltip 文字提示
+        content (date) {
+          let content = ''
+          console.log(data,37645)
+          for (let i in this.calendarData) {
+            if (date === this.calendarData[i].begin_time) {
+              content = this.calendarData[i].schedule_title + ` ` + this.calendarData[i].schedule_type
+            }
+          }
+          // return content
+        },
     //数据  第一部分列表
     //数据  第一部分列表
     getList() {
     getList() {
       this.loading = true;
       this.loading = true;
@@ -288,6 +384,69 @@ export default {
         }
         }
       );
       );
     },
     },
+    //数据  第二部分列表
+    getListtabone() {
+      this.loading = true;
+      listIndex(this.queryParams).then(response => {
+          this.configList = response.data.rows;
+          console.log(this.configList)
+          this.total = response.data.total;
+          this.loading = false;
+        }
+      );
+    },
+    //数据  第三部分列表
+    getLisprofile() {
+      this.loading = true;
+      listIndex(this.queryParamstabprofile).then(response => {
+          if(response.data !== undefined){
+            this.getLisprofileone = response.data.rows;
+            this.tieku = this.getLisprofileone[0].info_title
+            this.comg = this.getLisprofileone[0].info_content
+            console.log(this.getLisprofileone[0].info_title,98)
+            this.totalprofile = response.data.total;
+          }
+          this.loading = false;
+        }
+      );
+    },
+    //数据  日历数据列表
+    getLisalendar() {
+      this.loading = true;
+      listIndex(this.queryParamscalendar).then(response => {
+          if(response.data !== undefined){
+            this.calendarData = response.data.rows;
+            console.log(this.calendarData,9845765)
+          }
+          this.loading = false;
+        }
+      );
+    },
+    //数据  备忘录数据列表
+    getLismemorandum() {
+      this.loading = true;
+      listIndex(this.queryParamstabmemorandum).then(response => {
+          if(response.data !== undefined){
+            this.getmemorandum = response.data.rows;
+            console.log(this.getmemorandum,98765)
+          }
+          this.loading = false;
+        }
+      );
+    },
+    // 数据列表   通讯录数据
+    getLisailtwo() {
+      this.loading = true;
+      listIndex(this.queryParamsail).then(response => {
+          if(response.data !== undefined){
+            this.getLisaillie = response.data.rows;
+            // console.log(this.configList)
+          }
+          this.totalali = response.data.total
+          this.loading = false;
+        }
+      );
+    },
     //tab 公告 栏数据
     //tab 公告 栏数据
     getListtab() {
     getListtab() {
       this.loading = true;
       this.loading = true;
@@ -300,7 +459,7 @@ export default {
         }
         }
       )
       )
     },
     },
-    // 公司概况
+    // 公司概况  tab
     getLiser() {
     getLiser() {
       this.loading = true;
       this.loading = true;
       listIndextherr(this.dictTypetwo).then(response => {
       listIndextherr(this.dictTypetwo).then(response => {
@@ -311,6 +470,19 @@ export default {
         }
         }
       )
       )
     },
     },
+   // 通讯录表头
+   getLisail() {
+     this.loading = true;
+     listIndexfou(this.aliemg).then(response => {
+         if(response.data !== undefined){
+           this.tableDataalid = response.data.tableHeadList;
+           console.log(this.tableDataalid,67)
+           this.totalprofile = response.data.total;
+         }
+         this.loading = false;
+       }
+     );
+   },
     goTarget(href) {
     goTarget(href) {
       window.open(href, "_blank");
       window.open(href, "_blank");
     },
     },
@@ -318,17 +490,43 @@ export default {
             console.log(`每页 ${val} 条`);
             console.log(`每页 ${val} 条`);
       },
       },
     handleCurrentChange(val) {
     handleCurrentChange(val) {
-            console.log(`当前页: ${val}`);
+      this.queryParams.pageNo = val
+      this.getList()
+        console.log(`当前页: ${val}`);
       },
       },
+      // 公司概况
+      handleSizeChangeprofile(val) {
+              console.log(`每页 ${val} 条`);
+        },
+      handleCurrentChangeprofile(val) {
+        this.queryParamstabprofile.pageNo = val
+        this.getLisprofile()
+          console.log(`当前页: ${val}`);
+        },
+     // 通讯录
+     handleSizeChangeali(val) {
+             console.log(`每页 ${val} 条`);
+       },
+     handleCurrentChangeali(val) {
+       this.queryParamsail.pageNo = val
+       this.getLisailtwo()
+         console.log(`当前页: ${val}`);
+       },
     handleClick(tab, event) {
     handleClick(tab, event) {
               console.log(tab, event);
               console.log(tab, event);
       },
       },
-      // tab点击
+      // 第一部分tab点击
     tabSbu(index){
     tabSbu(index){
       console.log(index)
       console.log(index)
      this.num = index - 1
      this.num = index - 1
      this.queryParams.condition.notice_type = index
      this.queryParams.condition.notice_type = index
      this.getList()
      this.getList()
+    },
+    // 第三部分tab点击
+    tabSbuprofile(index){
+      this.numprofile = index - 1
+      this.queryParamstabprofile.condition.notice_type = index
+      this.getLisprofile()
     }
     }
   },
   },
 };
 };
@@ -392,7 +590,16 @@ export default {
          margin-left: 0;
          margin-left: 0;
        }
        }
      }
      }
-
+   .everyDay {
+     display: inline-block;
+     width: 20px;
+     height: 20px;
+     line-height: 20px;
+     background-color: #409eff;
+     color: #fff;
+     border-radius: 50%;
+     margin-top: 5px;
+   }
   }
   }
 </style>
 </style>
 
 
@@ -688,4 +895,44 @@ export default {
    }
    }
   }
   }
 }
 }
+
+// table
+.tab_tol{
+  // display: flex;
+  .tr_one{
+    display: flex;
+    justify-content: space-around;
+    width: 100%;
+    th{
+      flex: 1;
+      font-size: 12px;
+      font-family: PingFang SC;
+      font-weight: bold;
+      color: #343434;
+      line-height: 36px;
+      overflow: hidden;
+      text-overflow:ellipsis;
+      white-space: nowrap;
+    }
+  }
+  .two_tr{
+    display: flex;
+    justify-content: space-around;
+    font-size: 12px;
+    font-family: PingFang SC;
+    font-weight: bold;
+    color: #343434;
+    line-height: 36px;
+    td{
+      flex: 1;
+      overflow: hidden;
+      text-overflow:ellipsis;
+      white-space: nowrap;
+    }
+  }
+  .two_trtwo{
+    background-color: #F2F2F2;
+  }
+}
+
 </style>
 </style>