347617796@qq.com %!s(int64=2) %!d(string=hai) anos
pai
achega
fdc3fb6664

+ 1 - 1
.ftp/ftp-sync.json

@@ -7,5 +7,5 @@
     "password": "gdy123456",
     "remotePath": "/home/tuser/qywxpc",
     "uploadOnSave": false,
-    "downloadOnOpen":false
+    "downloadOnOpen": false
 }

+ 1 - 1
src/permission.js

@@ -50,7 +50,7 @@ router.beforeEach((to, from, next) => {
       if (whiteList.indexOf(to.path) !== -1 || window.location.href.indexOf('loginbytoken/') !== -1) { // 在免登录白名单,直接进入
         next()
       } else {
-        window.location.href = process.env.BASE_API //直接重新授权
+        // window.location.href = process.env.BASE_API //直接重新授权
       }
     }
   }

+ 0 - 8
src/views/common/applicationIntegrationPopup.vue

@@ -212,7 +212,6 @@
     },
     data() {
       return {
-
         pickerBeginDateBefore: {
           disabledDate(time) {
             return time.getTime() > Date.now();
@@ -554,7 +553,6 @@
       },
       // 初始化审核人
       initializesReviewer(list,index,bool){
-
         const superior = list || this.user_info.employee_detail.superior_list
         const num = index || 0
         const item = this.dialogData.items[num]
@@ -671,14 +669,8 @@
             rule_item_details: {range_type: ''}
           }]
           this.initializesReviewer(this.user_info.employee_detail.superior_list,0,true)
-          // console.log('关闭前')
           this.$emit('update:visible', false)
       },
-      // // 关闭弹窗
-      // closePopup(){
-      //   this.$emit('update:visible', false)
-      // }
-
     }
   }
 </script>

+ 331 - 358
src/views/integral/EmployeeTable.vue

@@ -1,12 +1,12 @@
 <template>
   <div>
-    <el-alert class="diy-tip"  title="温馨提示:" @close="tips_close" v-show="tips_show" type="success" description show-icon>
-		  当前组织架构成员通过微信通讯录同步,员工开启积分管理后才能正式启用并进入“功道云积分制”,如果您的微信通讯录有变动,点击
+    <el-alert class="diy-tip" title="温馨提示:" :closable="false"  type="success" description show-icon>
+      当前组织架构成员通过微信通讯录同步,员工开启积分管理后才能正式启用并进入“功道云积分制”,如果您的微信通讯录有变动,点击
       <span class="blue" style="margin-left: 10px;cursor: pointer;" @click="tb()" v-loading="tbLoading">
-					<i class="el-icon-refresh"></i>
-					立即同步
-				</span>
-		</el-alert>
+        <i class="el-icon-refresh"></i>
+        立即同步
+      </span>
+    </el-alert>
 
     <el-row class="architecture">
       <el-col :span="6" class="RuleLeft">
@@ -19,11 +19,11 @@
             <div ref="ruletree" class="department_box">
               <el-tree
                 node-key="id"
-                :expand-on-click-node= "false"
+                :expand-on-click-node="false"
                 :data="bmList"
                 class="cate-tree"
                 :highlight-current="true"
-                :props="{ children: 'children', label: 'name' , value: 'id'}"
+                :props="{ children: 'children', label: 'name', value: 'id' }"
                 @node-click="handleNodeClick"
                 :accordion="true"
                 empty-text="您暂无部门数据,请同步微信通讯录"
@@ -35,13 +35,8 @@
                   slot-scope="{ node, data }"
                   style="font-size: 14px;color: #606266; width:100%; text-align: left;"
                 >
-								  <img src="static/images/one.png" style="width: 20px;margin-right: 5px;" />
-                  <span class="name"
-                    ><WWOpenData
-                      type="departmentName"
-                      :openid="data.name"
-                    ></WWOpenData
-                  ></span>
+                  <img src="static/images/one.png" style="width: 20px;margin-right: 5px;" />
+                  <span class="name"><WWOpenData type="departmentName" :openid="data.name"></WWOpenData></span>
                 </div>
               </el-tree>
             </div>
@@ -49,46 +44,36 @@
         </div>
       </el-col>
       <el-col :span="18" class="RuleRight">
-				<el-button @click="participation()" :loading="enable_loading" size="medium" type="primary" style="margin-right: 10px;">批量启用积分管理</el-button>
-        <el-input placeholder="输入同事姓名" size="medium" style="width: 230px;"  v-model="keywords" clearable @input="searchUser()">
-        </el-input>
-        <div
-          style="color: #303133;font-size: 14px;padding:10px 0 0 0; line-height: 32px; overflow: hidden;"
-        >
-        </div>
+        <el-button @click="participation()" :loading="enable_loading" size="medium" type="primary" style="margin-right: 10px;">批量启用积分管理</el-button>
+        <el-input placeholder="输入同事姓名" size="medium" style="width: 230px;" v-model="keywords" clearable @input="searchUser()"></el-input>
+        <div style="color: #303133;font-size: 14px;padding:10px 0 0 0; line-height: 32px; overflow: hidden;"></div>
         <div class="list_box">
-          <div
-            style="margin-bottom:10px;margin-top:30px;"
-            class="inline-block-btn-list"
-          >
-            <div
-              class="gap-right-8 fr"
-              style="display:inline-block; width:180px;"
-            >
-            </div>
-          </div>
-					<el-table :data="userList" @selection-change="handleSelectionChange" v-loading="tableToading">
-						<el-table-column type="selection" width="50" :selectable="isSelectable"></el-table-column>
-						<el-table-column label="姓名">
-							<template slot-scope="scope">
-								<div class="flex-box flex-v-ce">
-									<userImage :user_name="scope.row.name" :img_url="scope.row.img_url" width="44px" height="44px"></userImage>
-									<div style="margin-left: 10px;"><WWOpenData type="userName" :openid="scope.row.name"></WWOpenData></div>
-								</div>
-							</template>
-						</el-table-column>
-						<el-table-column label="部门">
-							<template slot-scope="scope">
-								<div class="" style="">
-									<span v-for="(item, index) in scope.row.employee_detail.dept_list" :key="index">
-                    <div v-if="item.depart_id !== 1"><WWOpenData type="departmentName" :openid="item.depart_name"></WWOpenData><span v-if="(scope.row.employee_detail.dept_list.length-index)>1">,</span></div>
+          <div style="margin-bottom:10px;margin-top:30px;" class="inline-block-btn-list"><div class="gap-right-8 fr" style="display:inline-block; width:180px;"></div></div>
+          <el-table :data="userList" @selection-change="handleSelectionChange" v-loading="tableToading">
+            <el-table-column type="selection" width="50" :selectable="isSelectable"></el-table-column>
+            <el-table-column label="姓名">
+              <template slot-scope="scope">
+                <div class="flex-box flex-v-ce">
+                  <userImage :user_name="scope.row.name" :img_url="scope.row.img_url" width="44px" height="44px"></userImage>
+                  <div style="margin-left: 10px;"><WWOpenData type="userName" :openid="scope.row.name"></WWOpenData></div>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="部门">
+              <template slot-scope="scope">
+                <div class="" style="">
+                  <span v-for="(item, index) in scope.row.employee_detail.dept_list" :key="index">
+                    <div v-if="item.depart_id !== 1">
+                      <WWOpenData type="departmentName" :openid="item.depart_name"></WWOpenData>
+                      <span v-if="scope.row.employee_detail.dept_list.length - index > 1">,</span>
+                    </div>
                   </span>
-								</div>
-							</template>
-						</el-table-column>
-						<el-table-column prop="accedence_time" label="入职时间">
-							<template slot-scope="scope">
-								<div class="tabaccTIme" v-loading="scope.row.entryIf">
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="accedence_time" label="入职时间">
+              <template slot-scope="scope">
+                <div class="tabaccTIme" v-loading="scope.row.entryIf">
                   <el-date-picker
                     @change="entryclick(scope.row)"
                     clear-icon="el-icon-circle-close"
@@ -98,39 +83,36 @@
                     value-format="timestamp"
                     placeholder="选择日期时间"
                     :clearable="false"
-                    :picker-options="assistantOptions">
-                  </el-date-picker>
+                    :picker-options="assistantOptions"
+                  ></el-date-picker>
                 </div>
-							</template>
+              </template>
             </el-table-column>
-						<el-table-column label="启用积分管理">
-							<template slot="header" slot-scope="scope">
-								  <el-popover
-									placement="top-start"
-									width="300"
-									trigger="manual"
-									v-model="visible">
-									<div class="el-popover2">
-										<div class="title">提示 <i class="el-icon-info" style="margin-left: 5px;"></i></div>
-										<div style="margin-bottom: 10px;">在这里启用积分管理,即可进入系统</div>
-										<div class="flex-box">
-											<div class="flex-1"></div>
-											<el-button size="small" @click="visible_close()">我知道了</el-button>
-										</div>
-									</div>
-									<div slot="reference" class="popover" @click="visible=!visible">启用积分管理</div>
-								  </el-popover>
-							</template>
-							<template slot-scope="scope">
-								<div :class="[scope.row.is_official==1? 'switch-box':'']" @click="changeIs(scope.row.is_official, scope.row.id)">
-									<div class="switch"></div>
-								</div>
-							</template>
-						</el-table-column>
-						<template slot="empty">
-							<noData></noData>
-						</template>
-					</el-table>
+            <el-table-column label="启用积分管理">
+              <template slot="header" slot-scope="scope">
+                <el-popover placement="top-start" width="300" trigger="manual" v-model="visible">
+                  <div class="el-popover2">
+                    <div class="title">
+                      提示
+                      <i class="el-icon-info" style="margin-left: 5px;"></i>
+                    </div>
+                    <div style="margin-bottom: 10px;">在这里启用积分管理,即可进入系统</div>
+                    <div class="flex-box">
+                      <div class="flex-1"></div>
+                      <el-button size="small" @click="visible_close()">我知道了</el-button>
+                    </div>
+                  </div>
+                  <div slot="reference" class="popover" @click="visible = !visible">启用积分管理</div>
+                </el-popover>
+              </template>
+              <template slot-scope="scope">
+                <div :class="[scope.row.is_official == 1 ? 'switch-box' : '']" @click="changeIs(scope.row.is_official, scope.row.id)"><div class="switch"></div></div>
+              </template>
+            </el-table-column>
+            <template slot="empty">
+              <noData></noData>
+            </template>
+          </el-table>
           <el-pagination
             @size-change="handleSizeChange"
             @current-change="handleCurrentChange"
@@ -144,27 +126,21 @@
       </el-col>
     </el-row>
 
-		<el-dialog
-		title="设置是否参与排名"
-		:visible.sync="dialogVisible"
-		top="30vh"
-		width="520px"
-		:before-close="handleClose">
+    <el-dialog title="设置是否参与排名" :visible.sync="dialogVisible" top="30vh" width="520px" :before-close="handleClose">
       <div style="margin-left:20px;">
-        <el-radio v-for="(item,index) in radioLi" :key="index" v-model="radio" :label="item.id">
-          <span style="font-size:17px;">{{item.name}}</span>
-          <p style="font-size:14px;margin:8px 0 0 24px;">{{item.kam}}</p>
+        <el-radio v-for="(item, index) in radioLi" :key="index" v-model="radio" :label="item.id">
+          <span style="font-size:17px;">{{ item.name }}</span>
+          <p style="font-size:14px;margin:8px 0 0 24px;">{{ item.kam }}</p>
         </el-radio>
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false">取 消</el-button>
         <el-button type="primary" @click="setRanking" :disabled="rangLoad">确 定</el-button>
       </span>
-		</el-dialog>
+    </el-dialog>
   </div>
 </template>
 <script>
-
 import noData from '@/components/noData';
 import { _debounce } from '@/api/auth';
 export default {
@@ -176,39 +152,36 @@ export default {
     return {
       entryData: {
         userId: 0,
-        accedence_time: '',
+        accedence_time: ''
       },
-			is: 1,
-			no: 0,
-			page: 1,
-			perPage: 10,
-			total: 0,
-			info: {}, //公司信息
-			tips_show: true,
-			bmList: [],
-			userList: [],
-			class_type: '',
-			treedata: [1],
-			tableData: [],
-			keywords: '',
-			dept_id: 0,
+      is: 1,
+      no: 0,
+      page: 1,
+      perPage: 10,
+      total: 0,
+      info: {}, //公司信息
+      tips_show: true,
+      bmList: [],
+      userList: [],
+      class_type: '',
+      treedata: [1],
+      tableData: [],
+      keywords: '',
+      dept_id: 0,
+
+      tableToading: false,
+      tbLoading: false,
+      selectIds: [],
+      enable_loading: false,
+      visible: false,
+
+      ruleDeprt: false,
+      dialogVisible: false,
+      rankingtakePartInId: '',
+      radio: '1',
 
-			tableToading: false,
-			tbLoading: false,
-			selectIds: [],
-			enable_loading:false,
-			visible:false,
-			
-			ruleDeprt:false,
-			dialogVisible:false,
-			rankingtakePartInId:'',
-			radio: '1',
-			
-			rangLoad:false,
-			radioLi:[
-				{id:'1',name:'参与排名',kam:'在排名中展示此人'},
-				{id:'0',name:'不参与排名',kam:'排名不展示此人(自定义排名除外)'},
-      ],
+      rangLoad: false,
+      radioLi: [{ id: '1', name: '参与排名', kam: '在排名中展示此人' }, { id: '0', name: '不参与排名', kam: '排名不展示此人(自定义排名除外)' }],
       assistantOptions: {
         // disabledDate(time) {
         //   let date = new Date();
@@ -245,226 +218,237 @@ export default {
         //     }
         //   }
         // ]
-      },
+      }
     };
   },
-	watch: {
-		dept_id(val) {
-			this.getEmployee();
-    },
-	},
+  watch: {
+    dept_id(val) {
+      this.getEmployee();
+    }
+  },
   mounted() {
-		this.$nextTick(function() {
-			if (localStorage.getItem('rule')) {
-				this.tips_show = false;
-			} else {
-				this.tips_show = true;
-			}
-		});
+    this.$nextTick(function() {
+      if (localStorage.getItem('rule')) {
+        this.tips_show = false;
+      } else {
+        this.tips_show = true;
+      }
+    });
   },
   created() {
-		this.getInfo();
-		// this.getDepartment();
-		this.getEmployee();
+    this.getInfo();
+    // this.getDepartment();
+    this.getEmployee();
   },
-  
-	methods: {
-    entryclick(row){
-      console.log(row)
+
+  methods: {
+    entryclick(row) {
+      console.log(row);
       let data = {
         employee_id: row.id,
-        accedence_time: row.accedence_time/1000
-      }
-      row.entryIf = true
-      this.$http('post','/api/employee/accedence_time',data).then((res)=>{
-        if(res.data.code == 1){
-          
-        }
-      }).finally(()=>{
-        row.entryIf = false
-      })
+        accedence_time: row.accedence_time / 1000
+      };
+      row.entryIf = true;
+      this.$http('post', '/api/employee/accedence_time', data)
+        .then(res => {
+          if (res.data.code == 1) {
+          }
+        })
+        .finally(() => {
+          row.entryIf = false;
+        });
     },
-    entryTime(row){
-      console.log(row)
-      row.entryIf = true
+    entryTime(row) {
+      console.log(row);
+      row.entryIf = true;
     },
 
-		setRanking(){
-			this.rangLoad = true
-			let data = {
-				employee_id:this.rankingtakePartInId,
-				switch:Number(this.radio)
-			}
-			this.$http('post','/api/employee/ranking_switch',data).then((res)=>{
-				if(res.data.code == 1){
-					this.$message.success({ message: res.data.msg });
-					this.getEmployee()
-				}
-			}).finally(()=>{
-				this.dialogVisible = false
-				setTimeout(()=>{
-					this.rangLoad = false
-				},200)
-			})
-		},
-		rankingtakePartIn(id,is_ranking){
-			this.radio = is_ranking.toString()
-			this.rankingtakePartInId = id
-			this.dialogVisible = true
-		},
-		handleClose(done){
-			done()
-		},
-		//同步信息
-		tb() {
-      this.$http('get','/api/sync').then(res => {
-        if(res.data.code == 1){
+    setRanking() {
+      this.rangLoad = true;
+      let data = {
+        employee_id: this.rankingtakePartInId,
+        switch: Number(this.radio)
+      };
+      this.$http('post', '/api/employee/ranking_switch', data)
+        .then(res => {
+          if (res.data.code == 1) {
+            this.$message.success({ message: res.data.msg });
+            this.getEmployee();
+          }
+        })
+        .finally(() => {
+          this.dialogVisible = false;
+          setTimeout(() => {
+            this.rangLoad = false;
+          }, 200);
+        });
+    },
+    rankingtakePartIn(id, is_ranking) {
+      this.radio = is_ranking.toString();
+      this.rankingtakePartInId = id;
+      this.dialogVisible = true;
+    },
+    handleClose(done) {
+      done();
+    },
+    //同步信息
+    tb() {
+      this.$http('get', '/api/sync').then(res => {
+        if (res.data.code == 1) {
           this.$message.success({ message: '正在同步,请稍候刷新页面查看同步结果' });
-		      // this.getEmployee();
-		      // this.getInfo();
+          // this.getEmployee();
+          // this.getInfo();
         }
-      })
-			// this.$confirm('下次同步时间需在10分钟之后,是否同步?', '提示', {
-			//   confirmButtonText: '确定',
-			//   cancelButtonText: '取消',
-			//   type: 'warning'
-			// }).then(() => {
-			// 	this.tbLoading = true;
-			// 	this.$http('post','/api/ding/department_sync').then(res => {
-			// 		this.$message.success({ message: '同步成功' });
-			// 		this.dept_id=0;
-			// 		this.getInfo();
-			// 		this.getEmployee();
-			// 	}).finally(()=>{
-			// 		this.tbLoading = false;
-			// 	});
-			// });
-		},
-		//搜索
-		searchUser: _debounce(function() {
+      });
+      // this.$confirm('下次同步时间需在10分钟之后,是否同步?', '提示', {
+      //   confirmButtonText: '确定',
+      //   cancelButtonText: '取消',
+      //   type: 'warning'
+      // }).then(() => {
+      // 	this.tbLoading = true;
+      // 	this.$http('post','/api/ding/department_sync').then(res => {
+      // 		this.$message.success({ message: '同步成功' });
+      // 		this.dept_id=0;
+      // 		this.getInfo();
+      // 		this.getEmployee();
+      // 	}).finally(()=>{
+      // 		this.tbLoading = false;
+      // 	});
+      // });
+    },
+    //搜索
+    searchUser: _debounce(function() {
       this.page = 1;
       this.getEmployee();
     }),
-		//是否开通
-		changeIs(e, id) {
-			var url = e == 1 ? '/api/employee/disable' : '/api/employee/enable';
-			this.$http('post',url, { employee_id: [id] }).then(res => {
-				if (res) {
-					if(e==0){
-						this.$message.success({ message: '开启成功,可在"角色权限设置对应管理范围"' });
-					}else{
-						this.$message.success({ message: res.data.msg });
-					}
-					this.getEmployee();
-				}
-			});
-		},
-		//批量开通权限
-		participation() {
-			if(this.selectIds.length==0){
-				this.$message.error({ message: '请选择参与的人员!' });
-				return
-			}
-			
-			this.enable_loading=true;
-			this.$http('post','/api/employee/enable', { employee_id: this.selectIds }).then(res => {
-				if (res) {
-					this.$message.success({ message: '开启成功,可在"角色权限设置对应管理范围"' });
-					this.getEmployee();
-				}
-			}).finally(err=>{
-				this.enable_loading=false;
-			});
-		},
-		//获取公司信息
-		getInfo(is) {
-			this.ruleDeprt = true
-			// api/test?employee_id=155
-			this.$http('get','/api/site/info').then(res => {
-				this.info = res.data.data;
-				this.getDepartment(is);
-			});
-		},
-		//选择员工
-		handleSelectionChange(e) {
-			var arr = [];
-			for (var item in e) {
-				arr.push(e[item].id);
-			}
-			this.selectIds = arr;
-		},
+    //是否开通
+    changeIs(e, id) {
+      var url = e == 1 ? '/api/employee/disable' : '/api/employee/enable';
+      this.$http('post', url, { employee_id: [id] }).then(res => {
+        if (res) {
+          if (e == 0) {
+            this.$message.success({ message: '开启成功,可在"角色权限设置对应管理范围"' });
+          } else {
+            this.$message.success({ message: res.data.msg });
+          }
+          this.getEmployee();
+        }
+      });
+    },
+    //批量开通权限
+    participation() {
+      if (this.selectIds.length == 0) {
+        this.$message.error({ message: '请选择参与的人员!' });
+        return;
+      }
+
+      this.enable_loading = true;
+      this.$http('post', '/api/employee/enable', { employee_id: this.selectIds })
+        .then(res => {
+          if (res) {
+            this.$message.success({ message: '开启成功,可在"角色权限设置对应管理范围"' });
+            this.getEmployee();
+          }
+        })
+        .finally(err => {
+          this.enable_loading = false;
+        });
+    },
+    //获取公司信息
+    getInfo(is) {
+      this.ruleDeprt = true;
+      // api/test?employee_id=155
+      this.$http('get', '/api/site/info').then(res => {
+        this.info = res.data.data;
+        this.getDepartment(is);
+      });
+    },
+    //选择员工
+    handleSelectionChange(e) {
+      var arr = [];
+      for (var item in e) {
+        arr.push(e[item].id);
+      }
+      this.selectIds = arr;
+    },
     isSelectable: function(row, index) {
       return row.is_official != 1;
     },
-		//点击部门
-		handleNodeClick(e) {
-			this.page = 1;
-			this.dept_id = e.id;
-		},
-		//获取部门
-		getDepartment() {
-			this.ruleDeprt = true
-			this.$http('get','/api/department/tree').then(res => {
-				var list=[{
-					id:0,
-					name:this.info.name,
-					children:res.data.data.list
-				}]
-				this.bmList = list;
-			}).finally(()=>{
-				this.ruleDeprt = false
-			});
-		},
-		//获取员工
-		getEmployee() {
+    //点击部门
+    handleNodeClick(e) {
+      this.page = 1;
+      this.dept_id = e.id;
+    },
+    //获取部门
+    getDepartment() {
+      this.ruleDeprt = true;
+      this.$http('get', '/api/department/tree')
+        .then(res => {
+          var list = [
+            {
+              id: 0,
+              name: this.info.name,
+              children: res.data.data.list
+            }
+          ];
+          this.bmList = list;
+        })
+        .finally(() => {
+          this.ruleDeprt = false;
+        });
+    },
+    //获取员工
+    getEmployee() {
       this.tableToading = true;
       let params = {
         page: this.page,
         page_size: this.perPage,
         dept_id: this.dept_id,
         keywords: this.keywords
+      };
+      if (this.page == 0) {
+        params.page = this.page;
+      } else {
+        params.page = this.page - 1;
       }
-      if(this.page == 0) {
-        params.page = this.page
-      }else {
-        params.page = this.page - 1
-      }
-			this.$http('get','/api/employee/index', params).then(res => {
+      this.$http('get', '/api/employee/index', params)
+        .then(res => {  
         this.total = res.data.data.pageInfo.count;
-        let list = res.data.data.list
-        list.forEach((item)=>{
-          item.entryIf = false
-          item.accedence_time *= 1000
+          let list = res.data.data.list;
+          list.forEach(item => {
+            item.entryIf = false;
+            item.accedence_time *= 1000;
+          });
+          this.userList = list;
+          var visible = localStorage.getItem('visible');
+          if (!visible) {
+            this.visible = true;
+          }
         })
-        this.userList = list;
-				var visible=localStorage.getItem('visible');
-				if(!visible){
-					this.visible=true;
-				}
-			}).finally(err=>{
-				this.tableToading=false;
-			});
-		},
-		visible_close(){
-			localStorage.setItem('visible', 'true');
-			this.visible = false;
-		},
-		//关闭提示
-		tips_close() {
-			localStorage.setItem('rule', 'true');
-			this.tips_show = false;
-		},
-		handleSizeChange: function(val) {
-			this.perPage = val;
-			this.page = 1;
-			this.getEmployee();
-		},
-		//页码变更
-		handleCurrentChange: function(val) {
-			this.page = val;
-			this.getEmployee();
-		}
-	}
+        .finally(err => {
+          this.tableToading = false;
+        });
+    },
+    visible_close() {
+      localStorage.setItem('visible', 'true');
+      this.visible = false;
+    },
+    //关闭提示
+    tips_close() {
+      localStorage.setItem('rule', 'true');
+      this.tips_show = false;
+    },
+    handleSizeChange: function(val) {
+      this.perPage = val;
+      this.page = 1;
+      this.getEmployee();
+    },
+    //页码变更
+    handleCurrentChange: function(val) {
+      this.page = val;
+      this.getEmployee();
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>
@@ -617,7 +601,7 @@ el-tooltip {
 .architecture .RuleLeft .company_name {
   position: relative;
   display: block;
-  font-family: "Microsoft YaHei";
+  font-family: 'Microsoft YaHei';
   text-align: left;
   padding: 15px 28px 17px;
   cursor: pointer;
@@ -652,7 +636,7 @@ el-tooltip {
   text-overflow: ellipsis;
 }
 .architecture .RuleRight:after {
-  content: " ";
+  content: ' ';
   position: absolute;
   top: 0;
   left: 0;
@@ -665,7 +649,7 @@ el-tooltip {
   background: #fff;
 }
 .architecture .RuleRight .list_box /deep/ table {
-  font-family: "Microsoft YaHei";
+  font-family: 'Microsoft YaHei';
   width: 100% !important;
   /*max-width:1920px; */
 }
@@ -686,11 +670,7 @@ el-tooltip {
   font-size: 16px;
   padding: 6px 8px;
 }
-.architecture
-  .department_box
-  /deep/
-  .el-tree-node
-  .el-icon-caret-right.is-leaf {
+.architecture .department_box /deep/ .el-tree-node .el-icon-caret-right.is-leaf {
   color: transparent;
   cursor: default;
 }
@@ -728,52 +708,45 @@ el-tooltip {
   }
 }
 
-
-.switch{
-    margin: 0;
-    display: inline-block;
-    position: relative;
-    width: 40px;
-    height: 20px;
-    border: 1px solid #dcdfe6;
-    outline: none;
-    border-radius: 10px;
-    box-sizing: border-box;
-    background: #dcdfe6;
-    cursor: pointer;
-    transition: border-color .3s,background-color .3s;
-    vertical-align: middle;
+.switch {
+  margin: 0;
+  display: inline-block;
+  position: relative;
+  width: 40px;   height: 20px;
+  border: 1px solid #dcdfe6;
+  outline: none;   border-radius: 10px;
+  box-sizing: border-box;
+  background: #dcdfe6;   cursor: pointer;
+  transition: border-color 0.3s, background-color 0.3s;
+  vertical-align: middle;
 }
 .switch:after {
-    content: "";
-    position: absolute;
-    top: 1px;
-    left: 1px;
-    border-radius: 100%;
-    transition: all .3s;
-    width: 16px;
-    height: 16px;
-    background-color: #fff;
+  content: '';
+  position: absolute;
+  top: 1px;
+  left: 1px;   border-radius: 100%;
+  transition: all 0.3s;
+  width: 16px;
+  height: 16px;   background-color: #fff;
 }
 .switch-box .switch {
-    border-color: #409eff;
-    background-color: #409eff;
+  border-color: #409eff;
+  background-color: #409eff;
 }
-.switch-box .switch:after {
-    left: 100%;
-    margin-left: -17px;
+.switch-box .switch:after {   left: 100%;
+  margin-left: -17px;
 }
 
-/deep/ .tabaccTIme{
+/deep/ .tabaccTIme {
   width: 100px;
-  .el-input__inner{
+  .el-input__inner {
     border: 0;
     background-color: transparent;
     cursor: pointer;
     padding: 0;
     width: 100px;
   }
-  .el-input__prefix{
+  .el-input__prefix {
     display: none;
   }
 }

+ 1 - 1
src/views/login/index3.vue

@@ -55,7 +55,7 @@ export default {
       this.detalext(1)
     }else{
       console.log('无Token')
-      window.location.href = process.env.BASE_API;//重新授权
+      // window.location.href = process.env.BASE_API;//重新授权
     }
   },
   mounted() {},

+ 0 - 2
src/views/setting/integral_rule.vue

@@ -108,7 +108,6 @@
               <span style="display:block;margin-top:6px">规则表</span>
             </div>
             <el-button type="primary" style="margin-top:10px;">下载模版</el-button>
-
         </div>
         <div style="display:block;flex:1;" class="export_list">
             <span style="display:block;">2、上传填好的规则表</span>
@@ -140,7 +139,6 @@
               <span style="display:block;margin-top:6px">规则表</span>
             </div>
             <el-button type="primary" style="margin-top:10px;">导出</el-button>
-
         </div>
         <div style="display:block;flex:1;" class="export_list">
             <span style="display:block;">2、上传修改好的规则表</span>

+ 15 - 17
src/views/setting/set_role.vue

@@ -40,8 +40,8 @@
                       <el-button type="danger" @click="del_creator" v-show="table_list.length > 0">删除</el-button>
                       <el-button type="primary" @click="dialogFormVisible = true">添加</el-button>
                     </template>
-                    <template v-if="item_info.code != 'creator' && item_info.code != 'dept_manager'">
-                      <el-button type="danger" @click="del_btn" v-show="table_list.length != 0">删除</el-button>
+                    <template v-if="item_info.code != 'creator' && item_info.code != 'employee'">
+                      <el-button type="danger" @click="del_btn" v-show="table_list.length > 0">删除</el-button>
                       <el-button type="primary" @click="add_employee_show = true">添加</el-button>
                     </template>
 
@@ -54,6 +54,7 @@
                 </el-row>
                 <el-row>
                   <el-col :span="24">
+                    <!-- 创始人 -->
                     <el-table :data="table_list" v-show="item_info.code == 'creator'">
                       <el-table-column width="55" fixed v-if="table_list.length > 0 && isStart">
                         <template slot-scope="scope">
@@ -67,20 +68,12 @@
                         </template>
                       </el-table-column>
                     </el-table>
-
-                    <el-row :gutter="30" justify="center" v-show="table_list.length == 0 && item_info.code !== 'creator' && item_info.code !== 'employee'">
-                      <el-col :span="24" style="text-align: center;">
-                        <p><img src="static/images/nodata_default.png" width="200px" /></p>
-                        还没有{{ item_info.name }},
-                        <span style="color:#26A2FF;" @click="add_employee_show = true">去添加>></span>
-                      </el-col>
-                    </el-row>
-
+                    <!-- 管理者 -->
                     <el-table
                       :data="table_list"
                       class="tableListClass"
                       fit
-                      v-show="item_info.code !== 'creator' && item_info.code !== 'employee' && table_list !== null && table_list.length !== 0"
+                      v-show="item_info.code !== 'creator' && item_info.code !== 'employee' && table_list.length !== 0"
                       @selection-change="handleSelectionChange"
                     >
                       <el-table-column width="55" fixed>
@@ -257,7 +250,15 @@
                         </el-table-column>
                       </el-table-column>
                     </el-table>
-
+                    <!-- 提示 -->
+                    <el-row :gutter="30" justify="center" v-show="table_list.length == 0 && item_info.code !== 'creator' && item_info.code !== 'employee'">
+                      <el-col :span="24" style="text-align: center;">
+                        <p><img src="static/images/nodata_default.png" width="200px" /></p>
+                        还没有{{ item_info.name }},
+                        <span style="color:#26A2FF;" @click="add_employee_show = true">去添加>></span>
+                      </el-col>
+                    </el-row>
+                    <!-- 员工 -->
                     <center v-show="item_info.code == 'employee'" style="padding: 100px 0px;">未设置管理角色的人员,都是普通员工</center>
                   </el-col>
                 </el-row>
@@ -1349,10 +1350,7 @@ export default {
       let self = this;
       if (!self.radio) {
         if (bool) {
-          this.$message({
-            message: '请选择要删除的人员',
-            type: 'warning'
-          });
+          this.$message({message: '请选择要删除的人员',type: 'warning'});
           bool = false;
           setTimeout(() => {
             bool = true;

+ 5 - 6
src/views/statistics_new/integral_event.vue

@@ -609,12 +609,11 @@ export default {
           } else {
             this.$message({ type: 'error', message: res.data.msg });
           }
-        })
-        .finally(() => {
-          setTimeout(() => {
-            this.update_btn = false;
-          }, 3000);
-        });
+      }).finally(() => {
+        setTimeout(() => {
+          this.update_btn = false;
+        }, 3000);
+      });
     },
     handlePictureCardPreview(response) {
       if (response.code == 1) {

+ 73 - 136
src/views/statistics_new/integral_statistics.vue

@@ -2,22 +2,9 @@
   <div>
     <div class="integral_statistics_box">
       <el-row :gutter="10" style="margin-bottom: 20px;margin-right:8px;">
+        <el-col :span="5"><el-date-picker v-model="formData.month" type="month" placeholder="请选择月份" value-format="yyyy-MM" :clearable="false"></el-date-picker></el-col>
         <el-col :span="5">
-          <el-date-picker
-            v-model="formData.month"
-            type="month"
-            placeholder="请选择月份"
-            value-format="yyyy-MM"
-            :clearable="false"
-          ></el-date-picker>
-        </el-col>
-        <el-col :span="5">
-          <deptData
-            deptStyle="width:150px;left:200px;"
-            v-if="toPdept1 && toPdept1 != 0"
-            :refsName="$refs.dept1"
-            :toPdept="toPdept1"
-          ></deptData>
+          <deptData deptStyle="width:150px;left:200px;" v-if="toPdept1 && toPdept1 != 0" :refsName="$refs.dept1" :toPdept="toPdept1"></deptData>
           <el-cascader
             v-model="dept_name"
             :options="dept_tree"
@@ -30,30 +17,17 @@
             clearable
           >
             <template slot-scope="{ node, data }">
-              <span>
-                <WWOpenData
-                  type="departmentName"
-                  :openid="data.name"
-                ></WWOpenData>
-              </span>
+              <span><WWOpenData type="departmentName" :openid="data.name"></WWOpenData></span>
               <!-- <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> -->
             </template>
           </el-cascader>
         </el-col>
         <el-col :span="5" class="search">
-          <el-input
-            v-model="formData.keyword"
-            placeholder="输入同事姓名"
-            @keyup.enter.native="get_all_integral"
-          >
-            <el-button
-              slot="append"
-              @click="get_all_integral"
-              icon="el-icon-search"
-            ></el-button>
+          <el-input v-model="formData.keyword" placeholder="输入同事姓名" @keyup.enter.native="get_all_integral">
+            <el-button slot="append" @click="get_all_integral" icon="el-icon-search"></el-button>
           </el-input>
         </el-col>
-<!--        <el-col :offset="6" :span="3">
+        <!--        <el-col :offset="6" :span="3">
           <el-button
             class="company_intergral_button"
             @click="export_all"
@@ -65,29 +39,11 @@
         </el-col> -->
       </el-row>
 
-      <el-table
-        :data="all_integral_list"
-        style="width: 100%"
-        v-loading="loading"
-        @row-click="open_all_integral"
-      >
+      <el-table :data="all_integral_list" style="width: 100%" v-loading="loading" @row-click="open_all_integral">
         <el-table-column prop="employee_name" label="姓名" align="left">
           <template slot-scope="scope">
-            <span class="fl">
-              <userImage
-                :id="scope.row.employee_id"
-                width="50px"
-                height="50px"
-                :user_name="scope.row.employee_name"
-              ></userImage>
-            </span>
-            <span
-              style="margin-left: 10px; line-height: 50px; display: inline-block"
-              ><WWOpenData
-                type="userName"
-                :openid="scope.row.employee_name"
-              ></WWOpenData
-            ></span>
+            <span class="fl"><userImage :id="scope.row.employee_id" width="50px" height="50px" :user_name="scope.row.employee_name"></userImage></span>
+            <span style="margin-left: 10px; line-height: 50px; display: inline-block"><WWOpenData type="userName" :openid="scope.row.employee_name"></WWOpenData></span>
           </template>
         </el-table-column>
         <!-- <el-table-column prop="performance" label="绩效分" align="center">
@@ -99,16 +55,12 @@
         </el-table-column> -->
         <el-table-column prop="a" label="A分" align="center">
           <template slot-scope="scope">
-            <span :class="scope.row.a < 0 ? 'color_green' : ''">{{
-              scope.row.a
-            }}</span>
+            <span :class="scope.row.a < 0 ? 'color_green' : ''">{{ scope.row.a }}</span>
           </template>
         </el-table-column>
         <el-table-column prop="b" label="B分" align="center">
           <template slot-scope="scope">
-            <span :class="scope.row.b < 0 ? 'color_green' : ''">{{
-              scope.row.b
-            }}</span>
+            <span :class="scope.row.b < 0 ? 'color_green' : ''">{{ scope.row.b }}</span>
           </template>
         </el-table-column>
 
@@ -127,21 +79,13 @@
           layout="total, sizes, prev, pager, next"
           :page-size="pageLimit1"
           :total="total"
-        >
-        </el-pagination>
+        ></el-pagination>
       </center>
 
-      <el-drawer
-        :visible.sync="all_integral_show"
-        :before-close="drawer_close"
-        :with-header="false"
-      >
+      <el-drawer :visible.sync="all_integral_show" :before-close="drawer_close" :with-header="false">
         <div class="drawer_title">
-          <WWOpenData
-            type="userName"
-            :openid="all_integral_row.employee_name"
-          ></WWOpenData
-          >的积分
+          <WWOpenData type="userName" :openid="all_integral_row.employee_name"></WWOpenData>
+          的积分
         </div>
         <div style="padding: 30px">
           <el-row>
@@ -158,21 +102,16 @@
             <span class="title">没有对应的数据</span>
           </div>
         </div>
-        <div
-          id="chartLineBox"
-          v-loading="chartLoading"
-          v-show="!noChartData"
-          style="height: 300px;"
-        ></div>
+        <div id="chartLineBox" v-loading="chartLoading" v-show="!noChartData" style="height: 300px;"></div>
       </el-drawer>
     </div>
   </div>
 </template>
 <script>
-import { getToken } from "@/utils/auth";
-import echarts from "echarts";
-import season from "@/components/season";
-import noData from "@/components/noData";
+import { getToken } from '@/utils/auth';
+import echarts from 'echarts';
+import season from '@/components/season';
+import noData from '@/components/noData';
 
 export default {
   data() {
@@ -182,9 +121,9 @@ export default {
       loading: false,
       all_integral_list: null,
       formData: {
-        month: this.$moment().format("YYYY-MM"),
-        keyword: "",
-        dept_id: "",
+        month: this.$moment().format('YYYY-MM'),
+        keyword: '',
+        dept_id: '',
         page: 1,
         page_size: 10
       },
@@ -192,21 +131,21 @@ export default {
       dept_tree: [],
       dept_name: [],
       sort_checked: false,
-      point_types: JSON.parse(localStorage.getItem("SET_POINT_TYPES")),
+      point_types: JSON.parse(localStorage.getItem('SET_POINT_TYPES')),
       integral_ranking_list: [],
       all_integral_show: false,
       all_integral_row: {},
       chartLine: null,
-      radio: "1",
+      radio: '1',
       pageLimit1: 10,
       noChartData: false,
       chartLoading: false,
       toPdept1: 0,
 
-      deriveJobId: "",
+      deriveJobId: '',
       deriveJobIf: 0,
       deriveDis: false,
-      aherfUrl: ""
+      aherfUrl: ''
     };
   },
   components: { season, noData },
@@ -222,7 +161,7 @@ export default {
       this.all_integral_row = row;
       this.initEChartOption();
       this.$nextTick(() => {
-        this.chartLine = echarts.init(document.getElementById("chartLineBox"));
+        this.chartLine = echarts.init(document.getElementById('chartLineBox'));
       });
       this.get_Bdata();
     },
@@ -232,13 +171,13 @@ export default {
     },
     drawer_close() {
       this.all_integral_show = false;
-      this.radio = "1";
+      this.radio = '1';
     },
     get_all_integral() {
       let self = this;
       self.loading = true;
       self
-        .$http("get", "/api/integral/statistics/list", self.formData)
+        .$http('get', '/api/integral/statistics/list', self.formData)
         .then(res => {
           if (res.data.code == 1) {
             self.all_integral_list = res.data.data.list;
@@ -264,14 +203,14 @@ export default {
     },
     downloadResult() {
       if (this.deriveJobIf < 5) {
-        this.$http("get", "/api/download/result", {
+        this.$http('get', '/api/download/result', {
           job_id: this.deriveJobId
         }).then(res => {
           if (res.data.code == 1) {
             // window.open(res.data.data.url)
             // window.location.href = res.data.data.url
             this.aherfUrl = res.data.data.url;
-            this.deriveJobId = "";
+            this.deriveJobId = '';
             this.deriveDis = false;
             this.$nextTick(() => {
               this.$refs.aherfClick.click();
@@ -286,18 +225,18 @@ export default {
         });
       } else {
         this.deriveJobIf = 0;
-        this.deriveJobId = "";
+        this.deriveJobId = '';
         this.deriveDis = false;
-        this.aherfUrl = "";
-        this.$message.warning("导出超时");
+        this.aherfUrl = '';
+        this.$message.warning('导出超时');
       }
     },
     export_all() {
-      this.aherfUrl = "";
-      this.$confirm("确认导出统计报表?", "导出", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
+      this.aherfUrl = '';
+      this.$confirm('确认导出统计报表?', '导出', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       })
         .then(() => {
           this.deriveDis = true;
@@ -309,7 +248,7 @@ export default {
             data_type: 2,
             employee_id: this.$store.getters.user_info.id
           };
-          this.$http("get", "/api/download/list", params).then(res => {
+          this.$http('get', '/api/download/list', params).then(res => {
             if (res.data.code == 1) {
               this.deriveJobId = res.data.data.job_id;
               this.downloadResult();
@@ -324,17 +263,17 @@ export default {
       let token = this.$getToken ? this.$getToken : getToken();
       window.open(
         process.env.BASE_API +
-          "/api/download/list?month=" +
+          '/api/download/list?month=' +
           this.formData.month +
-          "&keyword=" +
+          '&keyword=' +
           this.formData.keyword +
-          "&dept_id=" +
+          '&dept_id=' +
           this.formData.dept_id +
-          "&async=0&data_type=2&employee_id=" +
+          '&async=0&data_type=2&employee_id=' +
           this.$store.getters.user_info.id +
-          "&token=" +
+          '&token=' +
           token,
-        "_blank"
+        '_blank'
       );
     },
     initEChartOption() {
@@ -342,27 +281,27 @@ export default {
         tooltip: { show: false },
         grid: {
           containLabel: true,
-          top: "4%",
-          right: "4%",
-          bottom: "5%",
-          left: "7%"
+          top: '4%',
+          right: '4%',
+          bottom: '5%',
+          left: '7%'
         },
         xAxis: {
-          type: "category",
+          type: 'category',
           boundaryGap: false,
-          axisLine: { lineStyle: { color: "#eee" } },
-          axisLabel: { color: "#333" }
+          axisLine: { lineStyle: { color: '#eee' } },
+          axisLabel: { color: '#333' }
         },
         yAxis: {
-          position: "right",
-          axisLine: { lineStyle: { color: "#eee" } },
-          axisLabel: { color: "#333" },
-          type: "value",
-          splitLine: { lineStyle: { color: "#eee" } }
+          position: 'right',
+          axisLine: { lineStyle: { color: '#eee' } },
+          axisLabel: { color: '#333' },
+          type: 'value',
+          splitLine: { lineStyle: { color: '#eee' } }
         },
         series: {
-          type: "line",
-          lineStyle: { normal: { color: "#26A2FF" } }
+          type: 'line',
+          lineStyle: { normal: { color: '#26A2FF' } }
         }
       };
     },
@@ -371,11 +310,11 @@ export default {
       let self = this;
       let month = self.formData.month;
       if (!month) {
-        month = self.$moment().format("YYYY-MM");
+        month = self.$moment().format('YYYY-MM');
       }
       self.chartLoading = true;
       self
-        .$http("get", "/api/integral/statistics/a", {
+        .$http('get', '/api/integral/statistics/a', {
           employee_id: self.all_integral_row.employee_id,
           month: month
         })
@@ -407,11 +346,11 @@ export default {
       let self = this;
       let month = self.formData.month;
       if (!month) {
-        month = self.$moment().format("YYYY-MM");
+        month = self.$moment().format('YYYY-MM');
       }
       self.chartLoading = true;
       self
-        .$http("get", "/api/integral/statistics/b", {
+        .$http('get', '/api/integral/statistics/b', {
           employee_id: self.all_integral_row.employee_id,
           month: month
         })
@@ -443,11 +382,11 @@ export default {
       let self = this;
       let month = self.formData.month;
       if (!month) {
-        month = self.$moment().format("YYYY-MM");
+        month = self.$moment().format('YYYY-MM');
       }
       self.chartLoading = true;
       self
-        .$http("get", "/api/integral/statistics/performance", {
+        .$http('get', '/api/integral/statistics/performance', {
           employee_id: self.all_integral_row.employee_id,
           month: month
         })
@@ -499,10 +438,8 @@ export default {
     }
   },
   mounted() {
-    if (localStorage.getItem("dept_tree")) {
-      this.dept_tree = this.getTreeData(
-        JSON.parse(localStorage.getItem("dept_tree"))
-      );
+    if (localStorage.getItem('dept_tree')) {
+      this.dept_tree = this.getTreeData(JSON.parse(localStorage.getItem('dept_tree')));
     }
     this.get_all_integral();
   },
@@ -522,11 +459,11 @@ export default {
         this.get_JXdata();
       }
     },
-    "formData.month"(val, old_val) {
+    'formData.month'(val, old_val) {
       this.formData.page = 1;
       this.get_all_integral();
     },
-    "formData.dept_id"(val, old_val) {
+    'formData.dept_id'(val, old_val) {
       if (!val) {
         this.formData.dept_id = 0;
       }
@@ -585,7 +522,7 @@ export default {
       padding-right: 5px;
 
       &:after {
-        content: "";
+        content: '';
         position: absolute;
         margin-top: -2px;
         top: 35%;
@@ -602,7 +539,7 @@ export default {
       padding-left: 12px;
 
       &:after {
-        content: "";
+        content: '';
         position: absolute;
         margin-top: -2px;
         top: 35%;

+ 1 - 2
src/views/workbench/approval_list.vue

@@ -53,8 +53,7 @@
                   scope.row.source_type == 4 ? '绩效工作' :
                   ''
                 }}
-                </span
-              >
+                </span>
               <!-- <span class="tableTitle" v-show="scope.row.source_type == 1"
                 ><WWOpenData type="userName" :openid="scope.row.employee_name"></WWOpenData>的积分任务</span
               >

+ 1 - 1
src/views/workbench/grade/award_punish.vue

@@ -206,7 +206,7 @@
           </el-col>
           <el-col :span="20" v-else-if="item.key == '收益人'">
             <WWOpenData type="userName" :openid="item.value"></WWOpenData>
-					</el-col>
+			</el-col>
           <el-col :span="20" v-else-if="item.key == '奖扣目标'">
             <WWOpenData type="userName" :openid="item.value"></WWOpenData>
 					</el-col>