LG88888888 3 years ago
parent
commit
6ef523b6fe

+ 10 - 5
.hbuilderx/launch.json

@@ -2,10 +2,15 @@
   // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
     "version": "0.0",
     "configurations": [{
-            "type": "uniCloud",
-            "default": {
-                "launchtype": "remote"
-            }
-        }
+     	"default" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"h5" : 
+     	{
+     		"launchtype" : "remote"
+     	},
+     	"type" : "uniCloud"
+     }
     ]
 }

+ 2 - 0
common/router/index.js

@@ -23,6 +23,8 @@ Vue.use(Router)
 		if (whiteList.indexOf(to.path) !== -1) {
 		  next()
 		}else{
+			uni.clearStorageSync()
+			 store.commit('SET_TOKEN',"");
 		  next({ path: '/pages/login/login'})
 		}
 	} 

+ 43 - 1
common/router/modules/routes.js

@@ -86,6 +86,13 @@ const routes = [
 	        title: '请假申请',
 	    },
 		},
+		{
+		    path: '/pages/sign/leaves',
+		    name: 'leaves',
+		    meta: {
+		        title: '请假申请',
+		    },
+			},
 		{
 		    path: '/pages/wages/wages',
 		    name: 'wages',
@@ -184,11 +191,39 @@ const routes = [
 		        title: '修改密码',
 		    },
 	},
+	{
+		    path: '/pages/organization/leaveorgz',
+		    name: 'leaveorgz',
+		    meta: {
+		        title: '考勤组织',
+		    },
+	},
 	{
 		    path: '/pages/organization/orgz',
 		    name: 'orgz',
 		    meta: {
-		        title: '组织',
+		        title: '考勤组织',
+		    },
+	},
+	{
+		    path: '/pages/organization/wagsorgz',
+		    name: 'wagsorgz',
+		    meta: {
+		        title: '薪资组织',
+		    },
+	},
+	{
+		    path: '/pages/sign/userwork',
+		    name: 'userwork',
+		    meta: {
+		        title: '薪资组织',
+		    },
+	},
+	{
+		    path: '/pages/organization/workorgz',
+		    name: 'workorgz',
+		    meta: {
+		        title: '排班组织',
 		    },
 	},
 	{
@@ -212,6 +247,13 @@ const routes = [
 		        title: '组织',
 		    },
 	},
+	{
+		    path: '/pages/sign/leaveemp',
+		    name: 'leaveemp',
+		    meta: {
+		        title: '组织',
+		    },
+	},
 	{
 		    path: '/pages/sign/empusersign',
 		    name: 'empusersign',

+ 450 - 0
components/xiaolu-tree/code.js

@@ -0,0 +1,450 @@
+
+import search from './search/index.vue'
+	/*
+	 *	已兼容h5和小程序端,其它端没测试过,估计问题不大,只需要改一下传值的方式
+	 * 
+	 *	如有问题可以加qq:122720267
+	 * 	
+	 *	使用该插件的朋友请给个好评,或者到git start一下
+	 *   git地址:https://github.com/LSZ579/xiaolu-tree-plugin.git
+	 *   插件市场地址: https://ext.dcloud.net.cn/plugin?id=2423
+	 * 
+	 */
+import api from '@/api/api.js'	
+export default {
+	name: "treeComponent",
+	data() {
+		return {
+			isre: false,
+			tree: Object.freeze(this.treeNone),
+			newNum: 0,
+			oldNum: 0,
+			orgText:null,
+			catchTreeNone: [...this.treeNone],
+			tree_stack: [1],
+			searchResult: [],
+			newCheckList: this.checkList,
+			scrollLeft: 999,
+			nodePathArray: []
+		}
+	},
+	components: {
+		search
+	},
+	computed: {
+		isSelect() {
+			return (item) => {
+				const checkList = this.newCheckList
+				if (checkList.length == 0) {
+					this.props.checkStrictly ? (item.bx = 0, item.qx = 0) : ''
+					return false
+				}
+				const i = checkList.findIndex(e => {
+					return item[this.keyCode] == e[this.keyCode]
+				}) > -1
+				return i && !item.qx
+			}
+		},
+		radioSelect() {
+			const list = this.newCheckList
+			return (item) => {
+				return list.length > 0 && item[this.keyCode] == list[0][this.keyCode]
+			}
+		},
+		keyCode() {
+			return this.keyValue
+		}
+	},
+	created() {
+		this.Init()
+		this.querydepartName()
+	},
+	methods: {
+		getImg(a){
+			var img='../../static/org.png';
+			if(a.user){
+			img='/static/avatar_boy.png';
+		}
+		var avat=a.avatar!=null? api.getFileAccessHttpUrl(a.avatar):img
+		return avat;	
+		},
+		querydepartName(){
+			this.$http.get('/sys/user/departList',{params:{}}).then(res=>{
+				console.log("res",res)
+				 this.orgText=res.data.orgName.departName;
+			}).catch(err => {
+				console.log(err);
+			});
+		},
+		querydepart(e){
+			this.$http.get('/sys/user/departList',{params:{departName:e}}).then(res=>{
+				console.log("res",res)
+				 this.orgText=res.data.orgName.departName;
+				 this.tree=res.data.departName;
+			}).catch(err => {
+				console.log(err);
+			});
+		},
+		// 初始化
+		Init() {
+			if (this.newCheckList.length !== 0) {
+				let {
+					tree_stack,
+					props,
+					catchTreeNone,
+					newCheckList
+				} = this
+				if (props.multiple) {
+					if (props.checkStrictly) {
+						this.checkAllChoose();
+					}
+				} else {
+					this.getNodeRoute(catchTreeNone, newCheckList[0][this.keyCode])
+					let arr = this.nodePathArray.reverse()
+					console.log(arr)
+					if (arr.length == 0) return
+					this.tree_stack = tree_stack.concat(arr);
+					this.tree = this.tree_stack[this.tree_stack.length - 1].children;
+				}
+			}
+		},
+		// 返回 类似 2016-01-02 格式的字符串
+		formatDate: function(year, month, day) {
+			var y = year
+			var m = month
+			if (m < 10) m = '0' + m
+			var d = day
+			if(day!=null &&day !=""){
+				if (d < 10) d = '0' + d
+				return y + '-' + m + '-' + d
+			}else{
+				return y + '-' + m 
+			}
+			
+			
+		},
+		handles(item){
+			uni.setStorageSync("id",item.id);
+			var orgType=uni.getStorageSync('orgType');
+			if(!item.user&&orgType==1){
+				this.$store.commit('SET_DEPARTID',item.id)
+				 this.$Router.push({name:'empsign'}) 
+			}else if (item.user&&orgType==1){
+				var date=new Date();
+				var currentYear = date.getFullYear()
+				var currentMonth = date.getMonth() + 1
+				var dates=this.formatDate(currentYear,currentMonth,1);
+				uni.setStorageSync("status",2);
+				uni.setStorageSync("date",dates);
+				 this.$Router.push({name:'usersign'})
+			}else if(orgType==2&&item.user){
+					this.$Router.push({name:'leaves'})
+			}else if(orgType==3&&item.user){
+					this.$Router.push({name:'wagesdetails'})
+			}else if(orgType==4&&item.user){
+					this.$Router.push({name:'userwork'})
+			}
+		},
+		// 点击项目处理
+		handleClick(item, index) {
+			let children = item[this.props.children]
+			 if (index > -1 && children && children.length > 0) {
+				this.toChildren(item)
+			} else if (this.props.multiple) {
+				this.checkboxChange(item, index, item.bx, item.qx)
+			} else {
+				this.checkbox(item, index)
+			}
+		},
+		// 获取路径
+		getPath() {
+			const {
+				keyCode,
+				tree_stack,
+				props
+			} = this
+			const path = [...tree_stack].map(e => {
+				const item = Object.assign({}, e)
+				delete item[props.children]
+				return item
+			})
+			return path.slice(1, path.length) || []
+		},
+		//多选
+		async checkboxChange(item, index, bx, qx) {
+			let that = this;
+			const {
+				props
+			} = that
+			if (!props.multiple) return;
+			let findIdex = that.newCheckList.findIndex(e => item[this.keyCode] == e[this.keyCode]);
+			const path = this.getPath()
+			if (findIdex > -1) { //反选
+				if (props.checkStrictly) { //关联子级
+					if (item.user) { //用户
+						that.newCheckList.splice(findIdex, 1)
+					} else { //非用户,取消所有下一级
+						that.getIdBydelete(item.children)
+					}
+				} else {
+					that.newCheckList.splice(findIdex, 1)
+				}
+			} else { //选中
+				if (!item.user && props.checkStrictly) { //选中下一级
+					if (qx || bx) { //取消下级
+						await that.getIdBydelete(item.children);
+						item.qx = 0;
+						item.bx = 0;
+					} else {
+						item.qx = 1;
+						item.bx = 0;
+						const {
+							id,
+							name,
+							user
+						} = item
+						const newObj = {
+							id,
+							name,
+							user
+						}
+						const pathList = this.tree_stack.length === 1 ? [newObj, ...path] : [...path, newObj]
+						await that.chooseChild(item.children, pathList);
+					}
+					this.$forceUpdate()
+					return
+				}
+				that.newCheckList.push({ ...item,
+					path
+				});
+			}
+		},
+		// 取消下一级的选中
+		getIdBydelete(arr) {
+			arr.forEach(e => {
+				if (e.user) {
+					for (var i = 0; i < this.newCheckList.length; i++) {
+						if (e[this.keyCode] == this.newCheckList[i][this.keyCode]) {
+							this.newCheckList.splice(i, 1)
+							break;
+						}
+					}
+				} else {
+					this.getIdBydelete(e.children)
+				}
+			})
+		},
+
+		// 关联下一级,选中
+		chooseChild(arr, path) {
+			let that = this;
+			const oldPath = [...path]
+			for (var i = 0, len = arr.length; i < len; i++) {
+				let item = arr[i];
+				if (item.user) {
+					that.newCheckList.push({ ...item,
+						path: oldPath
+					})
+				} else {
+					const newItem = { ...item
+					}
+					delete newItem[that.props.children]
+					const newPath = [...oldPath, newItem]
+					that.chooseChild(item.children, newPath)
+				}
+			}
+		},
+
+		// (tree为目标树,targetId为目标节点id) 
+		getNodeRoute(tree, targetId) {
+			for (let index = 0; index < tree.length; index++) {
+				if (tree[index].children) {
+					let endRecursiveLoop = this.getNodeRoute(tree[index].children, targetId)
+					if (endRecursiveLoop) {
+						this.nodePathArray.push(tree[index])
+						return true
+					}
+				}
+				if (tree[index][this.keyCode] === targetId) {
+					return true
+				}
+			}
+		},
+
+		//单选
+		checkbox(item, index) {
+			const path = this.getPath()
+			this.$set(this, 'newCheckList', [{ ...item,
+				path
+			}])
+		},
+		//到下一级
+		toChildren(item) {
+			if (item.user) return
+			var that = this;
+			uni.showLoading({
+				title: '加载中'
+			})
+			let children = that.props.children;
+			if (item[children].length > 0 && !(that.tree_stack[0][this.keyCode] == item[this.keyCode])) {
+				that.tree = item[children];
+				that.tree_stack.push(item);
+			}
+			this.$nextTick(() => {
+				uni.hideLoading()
+				this.scrollLeft += 200;
+			})
+			if (this.props.checkStrictly) this.checkAllChoose();
+		},
+		//搜索
+		confirmSearch(val) {
+			console.log(val);
+			this.searchResult = []
+			//this.search(this.catchTreeNone, val)
+			this.isre = true
+			this.tree_stack.splice(1, 1000)
+			uni.showLoading({
+				title: '正在查找'
+			})
+			setTimeout(() => {
+				this.tree =[];
+				this.querydepart(val);
+				//this.tree = this.searchResult
+				uni.hideLoading()
+			}, 300)
+		},
+		search(data, keyword) {
+			let that = this
+			let {label,children} = that.props
+			for (var i = 0, len = data.length; i < len; i++) {
+				if (data[i][label].indexOf(keyword) >= 0) {
+					that.searchResult.push(data[i])
+				}
+				if (!data[i].user && data[i][children].length > 0) {
+					that.search(data[i][children], keyword)
+				}
+			}
+		},
+
+		checkAllChoose() {
+			let o = false,
+				t = true;
+			this.tree.forEach((e, i) => {
+				if (!e.user) {
+					e.qx = o;
+					e.bx = o;
+					 this.computAllNumber(e.children);
+					// console.log(this.newNum,this.oldNum)
+					if (this.newNum != 0 && this.oldNum != 0) {
+						if (this.newNum == this.oldNum) {
+							e.qx = t;
+							e.bx = o;
+						} else {
+							e.qx = o;
+							e.bx = t;
+						}
+					}
+					if (this.newNum != 0 && this.oldNum == 0) {
+						this.$set(this.tree[i], 'bx', o);
+						this.$set(this.tree[i], 'qx', o);
+					}
+					this.$forceUpdate()
+					this.newNum = 0
+					this.oldNum = 0
+				}
+			})
+		},
+
+		computAllNumber(arr) {
+			for (let j = 0; j < arr.length; j++) {
+				var e = arr[j];
+				this.checkSum(e[this.keyCode])
+				if (e.user) {
+					this.newNum++;
+				} else {
+					this.computAllNumber(e.children)
+				}
+			}
+		},
+
+		checkSum(id) {
+			for (let i = 0; i < this.newCheckList.length; i++) {
+				if (id == this.newCheckList[i][this.keyCode]) {
+					this.oldNum++;
+					break
+				}
+			}
+		},
+
+		//返回其它层
+		backTree(item, index) {
+			let that = this,
+				tree_stack = that.tree_stack,
+				max = 300;
+			if (index === -1) {
+				that.tree = that.catchTreeNone
+				that.tree_stack.splice(1, max)
+				that.isre = false
+				that.$refs.sea.clears()
+			} else if (index === -2) {//搜索
+				that.tree = that.searchResult
+				that.tree_stack.splice(1, max)
+			} else {
+				if (tree_stack.length - index > 2) {
+					that.tree_stack.splice(index+1, max)
+				} else if (index !== tree_stack.length - 1) {
+					that.tree_stack.splice(tree_stack.length - 1, 1)
+				}
+				that.tree = item[that.props.children]
+			}
+			if (this.props.checkStrictly) this.checkAllChoose();
+			this.$forceUpdate()
+		},
+		backConfirm() {
+			this.$emit('sendValue', this.newCheckList, 'back')
+		}
+
+	},
+	props: {
+		treeNone: {
+			type: Array,
+			default: () => {
+				return []
+			}
+		},
+		//是否开启选中
+		isCheck: {
+			type: Boolean,
+			default: () => {
+				return false
+			}
+		},
+		checkList: {
+			type: Array,
+			default: () => []
+		},
+		parentList: {
+			type: Array,
+			default: () => []
+		},
+		searchIf: {
+			type: Boolean,
+			default: () => true
+		},
+		keyValue: {
+			type: String,
+			default: 'id',
+		},
+		props: {
+			type: Object,
+			default: () => {
+				return {
+					label: 'name',
+					children: 'children',
+					multiple: false,
+					checkStrictly: false, //不关联
+				}
+			}
+		}
+	},
+}

+ 342 - 0
components/xiaolu-tree/css/icon.css

@@ -0,0 +1,342 @@
+@font-face {
+  font-family: "iconfont"; /* Project id 2009600 */
+  src: url('https://at.alicdn.com/t/font_2009600_gpzp7pxtnw.woff2?t=1620633089023') format('woff2'),
+       url('https://at.alicdn.com/t/font_2009600_gpzp7pxtnw.woff?t=1620633089023') format('woff'),
+       url('https://at.alicdn.com/t/font_2009600_gpzp7pxtnw.ttf?t=1620633089023') format('truetype');
+}
+
+.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-banxuanzhongshousuo1-shi:before {
+  content: "\e682";
+}
+
+.icon-xuanzhong3:before {
+  content: "\e6bb";
+}
+
+.icon-weixuanzhong2:before {
+  content: "\e62e";
+}
+
+.icon-danxuanxuanzhong:before {
+  content: "\e631";
+}
+
+.icon-xuanzhong4:before {
+  content: "\e63e";
+}
+
+.icon-xuanzhong1:before {
+  content: "\e62d";
+}
+
+.icon-xuanzhong2:before {
+  content: "\e656";
+}
+
+.icon-selected:before {
+  content: "\e615";
+}
+
+.icon-weixuanzhong1:before {
+  content: "\e614";
+}
+
+.icon-xingzhuang6kaobei3-copy-copy:before {
+  content: "\e613";
+}
+
+.icon-radio-checked:before {
+  content: "\e63f";
+}
+
+.icon-huifu:before {
+  content: "\e619";
+}
+
+.icon-dizhi:before {
+  content: "\e64a";
+}
+
+.icon-kuaijiecaidan:before {
+  content: "\e60a";
+}
+
+.icon-z043:before {
+  content: "\e62f";
+}
+
+.icon-guanbi:before {
+  content: "\e607";
+}
+
+.icon-xuanze:before {
+  content: "\e623";
+}
+
+.icon-caidanzhaolinggan:before {
+  content: "\e616";
+}
+
+.icon-xitongshezhi:before {
+  content: "\e60c";
+}
+
+.icon-xitongshezhi1:before {
+  content: "\e633";
+}
+
+.icon-lunbo:before {
+  content: "\e692";
+}
+
+.icon-shuping:before {
+  content: "\e659";
+}
+
+.icon-tongzhi:before {
+  content: "\e641";
+}
+
+.icon-pinglunguanlishezhi:before {
+  content: "\e6ac";
+}
+
+.icon-icon:before {
+  content: "\e600";
+}
+
+.icon-liuyanguanli:before {
+  content: "\e61d";
+}
+
+.icon-xuanzhong:before {
+  content: "\e669";
+}
+
+.icon--:before {
+  content: "\e622";
+}
+
+.icon-tushu:before {
+  content: "\e604";
+}
+
+.icon-huishouzhan:before {
+  content: "\e61c";
+}
+
+.icon-yonghutouxiang:before {
+  content: "\e617";
+}
+
+.icon-liebiao:before {
+  content: "\e630";
+}
+
+.icon-fenlei:before {
+  content: "\e621";
+}
+
+.icon-tushu1:before {
+  content: "\e605";
+}
+
+.icon-tubiao-:before {
+  content: "\e620";
+}
+
+.icon-weixuanze:before {
+  content: "\e624";
+}
+
+.icon-tushujieyue:before {
+  content: "\e690";
+}
+
+.icon-lunbo1:before {
+  content: "\e6c5";
+}
+
+.icon-shanchu:before {
+  content: "\e67b";
+}
+
+.icon-lunbo2:before {
+  content: "\e61e";
+}
+
+.icon-huaban:before {
+  content: "\e663";
+}
+
+.icon-kehuan:before {
+  content: "\e608";
+}
+
+.icon-icon02:before {
+  content: "\e601";
+}
+
+.icon-huishouzhan1:before {
+  content: "\e612";
+}
+
+.icon-huishouzhan2:before {
+  content: "\e63d";
+}
+
+.icon-sousuo:before {
+  content: "\e62c";
+}
+
+.icon-xingzhuang:before {
+  content: "\e625";
+}
+
+.icon-lunbobankuai:before {
+  content: "\e61f";
+}
+
+.icon-shangchuan:before {
+  content: "\e602";
+}
+
+.icon-yonghu:before {
+  content: "\e761";
+}
+
+.icon-tongzhi1:before {
+  content: "\e603";
+}
+
+.icon-jingsong:before {
+  content: "\e65c";
+}
+
+.icon-fenlei1:before {
+  content: "\e6c6";
+}
+
+.icon-xieshupingicon:before {
+  content: "\e72d";
+}
+
+.icon-liuyan:before {
+  content: "\e626";
+}
+
+.icon-weixuanzhong:before {
+  content: "\e627";
+}
+
+.icon-youxiang:before {
+  content: "\e646";
+}
+
+.icon-lunboguanggao:before {
+  content: "\e6b3";
+}
+
+.icon-xuanze1:before {
+  content: "\e60d";
+}
+
+.icon-chushaixuanxiang:before {
+  content: "\e606";
+}
+
+.icon-liuyanguanli1:before {
+  content: "\e61a";
+}
+
+.icon-shanchu1:before {
+  content: "\e609";
+}
+
+.icon-huishouzhan3:before {
+  content: "\e642";
+}
+
+.icon-shangchuan1:before {
+  content: "\e823";
+}
+
+.icon-huishouzhan4:before {
+  content: "\e61b";
+}
+
+.icon-chuangzuo:before {
+  content: "\e8ad";
+}
+
+.icon-dianzan:before {
+  content: "\e8ae";
+}
+
+.icon-paihangbang:before {
+  content: "\e8b3";
+}
+
+.icon-shouye:before {
+  content: "\e8b9";
+}
+
+.icon-shoucang:before {
+  content: "\e8c6";
+}
+
+.icon-addApp:before {
+  content: "\e60b";
+}
+
+.icon-huishouzhan5:before {
+  content: "\e63a";
+}
+
+.icon-add1:before {
+  content: "\e60e";
+}
+
+.icon-shoucang1:before {
+  content: "\e60f";
+}
+
+.icon-canshutongji:before {
+  content: "\e618";
+}
+
+.icon-rizhiguanli:before {
+  content: "\e628";
+}
+
+.icon-shanchu2:before {
+  content: "\e629";
+}
+
+.icon-xinzeng:before {
+  content: "\e62a";
+}
+
+.icon-zhankailiebiao:before {
+  content: "\e62b";
+}
+
+.icon-xiala-copy:before {
+  content: "\e610";
+}
+
+.icon-shangla:before {
+  content: "\e64e";
+}
+
+.icon-xianxingshezhi:before {
+  content: "\e611";
+}

+ 119 - 0
components/xiaolu-tree/css/style.scss

@@ -0,0 +1,119 @@
+.flex_between_center {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+	}
+
+	.checkbox {
+		position: relative;
+		margin-left: 10rpx;
+		margin-right: 0px;
+		.color {
+			color: #00aaff;
+			background-color: #00aaff;
+		}
+		.txt {
+			font-size: 44rpx;
+			width: 100%;
+			height: 100%;
+			display: flex;
+		}
+	}
+	.checkBorder {
+		border: 1px solid #ecdee4;
+	}
+	.header {
+		width: 100%;
+		position: fixed;
+		background-color: #fff;
+		z-index: 9999;
+		.title {
+			height: 90rpx;
+			padding: 0 32rpx;
+			line-height: 90rpx;
+			font-size: 30rpx;
+			background-color: #f5f5f5;
+			color: #606064;
+		}
+	}
+	.iconclass {
+		display: inline-block;
+		margin: 0 12rpx;
+		color: #D0D4DB;
+		font-size: 28rpx;
+	}
+	.container-list {
+		overflow-y: scroll;
+		overflow-x: hidden;
+		padding-bottom: 160rpx;
+		padding-top: 200rpx;
+		.common {
+			background-color: #fff;
+			border-bottom: 1rpx solid #f4f4f4;
+			padding-left: 10rpx;
+			.content {
+				display: flex;
+				align-items: center;
+				height: 100rpx;
+				width: 100%;
+				padding: 15rpx 0;
+				position: relative;
+				font-size: 32rpx;
+				.lable-text{
+					margin-left: 2%;
+					font-size: 30rpx;
+					color: #5b5757;
+					width: 500rpx;
+					word-break: break-all;
+				}
+				.right {
+					position: absolute;
+					right: 30rpx;
+					color: #babdc3;
+					font-size: 32rpx;
+				}
+			}
+		}
+	}
+	.active {
+		color: #4297ED !important;
+	}
+	.none {
+		color: #666666;
+	}
+	.icon-selected{
+		color: #0095F2!important;
+		font-size: 40rpx!important;
+	}
+	.icons{
+		color: #0095F2!important;
+		font-size: 40rpx!important;
+	}
+	.inline-item {
+		display: inline-block
+	}
+	
+	.content-item{
+		display: flex;
+		position: relative;
+		align-items: center;
+	}
+	
+	.box_sizing {
+		-webkit-box-sizing: border-box;
+		-moz-box-sizing: border-box;
+		box-sizing: border-box;
+	}
+	
+	.btn {
+		position: fixed;
+		bottom: 0;
+		padding: 10px;
+		background-color: #fff;
+		width: 100%;
+	
+		.sureBtn {
+			background-color: #0095F2;
+			color: #fff;
+		}
+	}

+ 73 - 0
components/xiaolu-tree/search/index.vue

@@ -0,0 +1,73 @@
+<template>
+	<view class="tmp-box">
+		<view class='filterBox'>
+			<view class='filter-input'>
+				<text style="color: #b8b8b8;"  class="iconfont icon-sousuo filterImg"/>
+				<input class="text" type='text' v-model="inputVal" confirm-type="搜索"  placeholder='搜索'></input>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				inputVal: "",
+
+			};
+		},
+		watch:{
+			inputVal:{
+				handler(newVal, objVal) {
+				 this.handleFllter(newVal);
+		  },
+			}
+		},
+		methods: {
+			handleFllter(e) {
+				//console.log(e)
+				this.$emit("confirm", e)
+			},
+			clears(){
+				console.log(this.inputVal)
+				this.inputVal=""
+				console.log('清除了内容')
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.filterBox {
+		padding: 15rpx 32rpx;
+		background-color: #fff;
+		.filter-input {
+			height: 80rpx;
+			background-color: #eeeff0;
+			border-radius: 40rpx;
+			display: flex;
+			align-items: center;
+			
+			padding-left: 40rpx;
+			.filterImg {
+				width: 32rpx;
+				height: 32rpx;
+				margin-right: 20rpx;
+				margin-bottom: 5rpx;
+			}
+			.filterImgs {
+				width: 32rpx;
+				height: 32rpx;
+				
+			}
+			.text {
+				width: 84%;
+				background-color: #eeeff0;
+				font-size: 32rpx;
+				color: #000;
+			}
+		}
+	}
+	@import url("../css/icon.css");
+</style>

+ 51 - 0
components/xiaolu-tree/tree.vue

@@ -0,0 +1,51 @@
+<template>
+	<view>
+		<view class="header">
+			<search v-if="searchIf" ref="sea" @confirm="confirmSearch" />
+			<view class="title">
+				<scroll-view scroll-x style="width: 100%;white-space: nowrap;" :scroll-left="scrollLeft">
+					<view v-for="(item,index) in tree_stack" class="inline-item" :key="index">
+						<view class="inline-item" v-if="index==0" @click="backTree(item,-1)">
+							<text :class="[(index==tree_stack.length-1&&!isre)?'none':'active']">{{orgText}}</text>
+						</view>
+						<view class="inline-item" @click="backTree(item,index)" v-if="index!=0">
+							<i class="iconfont icon-z043 iconclass" />
+							<text :class="index==tree_stack.length-1?'none inline-ite':'active'">
+								{{item[props.label]}}
+							</text>
+						</view>
+					</view>
+				</scroll-view>
+			</view>
+		</view>
+		<view>
+			<view class="container-list">
+				<view class="common cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.1s'}]" v-for="(item, index) in tree"  :key="index">
+					<label class="content">
+					
+						<image  :src="getImg(item)" class="imgs"></image>
+						<view class="lable-text" @click="handles(item)">{{item[props.label]}}</view>
+						<view class="right" @click="handleClick(item,index)"><i v-if="item.children.length>0" class="iconfont icon-z043 iconclass" ></i></view>
+					</label>
+				</view>
+				
+			</view>
+		</view>
+		<!-- <view class="btn box_sizing">
+			<button class="sureBtn" type="primary" @click="backConfirm">确认</button>
+		</view> -->
+	</view>
+</template>
+
+<script src="./code.js" type="text/javascript"></script>
+<style lang="scss" scoped>
+	@import './css/style.scss';
+	@import url("./css/icon.css");
+	.imgs{
+		width: 40px;
+		height: 40px;
+		border-radius:5px 5px 5px 5px; 
+		margin-left: 1%;
+		
+	}
+</style>

+ 5 - 2
manifest.json

@@ -1,6 +1,6 @@
 {
     "name" : "即日办",
-    "appid" : "__UNI__44A8AB0",
+    "appid" : "__UNI__C537DC0",
     "description" : "",
     "versionName" : "2.2.22",
     "versionCode" : 233,
@@ -82,7 +82,7 @@
         }
     },
     "h5" : {
-        "title" : "zzy测试",
+        "title" : "格克测试",
         "domain" : "myhjdc.cn",
         "sdkConfigs" : {
             "maps" : {
@@ -90,6 +90,9 @@
                     "key" : ""
                 }
             }
+        },
+        "router" : {
+            "base" : "./"
         }
     }
 }

+ 24 - 0
pages.json

@@ -133,6 +133,14 @@
 			"path": "pages/sign/leave",
 			"style": {}
 		},
+		{
+			"path": "pages/sign/leaves",
+			"style": {}
+		},
+		{
+			"path": "pages/sign/userwork",
+			"style": {}
+		},
 		{
 			"path": "pages/wages/wages",
 			"style": {}
@@ -157,9 +165,21 @@
 			"path": "pages/team/usercore",
 			"style": {}
 		},
+		{
+			"path": "pages/organization/leaveorgz",
+			"style": {}
+		},
 		{
 			"path": "pages/organization/orgz",
 			"style": {}
+		},
+		{
+			"path": "pages/organization/workorgz",
+			"style": {}
+		},
+		{
+			"path": "pages/organization/wagsorgz",
+			"style": {}
 		},{
 			"path": "pages/team/teamuser",
 			"style": {}
@@ -172,6 +192,10 @@
 			"path": "pages/sign/empsign",
 			"style": {}
 		},
+		{
+			"path": "pages/sign/leaveemp",
+			"style": {}
+		},
 		{
 			"path": "pages/sign/empusersign",
 			"style": {}

+ 1 - 1
pages/common/exit.vue

@@ -34,7 +34,7 @@
 		},
 		onLoad: function (option) {
 			api.logout().then(res=>{
-				/* uni.clearStorageSync() */
+				uni.clearStorageSync() 
 				 store.commit('SET_TOKEN',"");
 			})
 		},

+ 0 - 132
pages/component/messageshow.vue

@@ -1,132 +0,0 @@
-<template>
-	<view class="m-item" :id="'message'+id">
-		<view class="m-left" @click="users(user.home.id)">
-			<image class="head_icon" :src="user.home.img" v-if="message.user=='home'"></image>
-		</view>
-		
-		<view class="m-content">
-			<view class="m-content-head" >
-				<view :class="'m-content-head-s-'+message.user" v-if="message.user=='home'">{{this.$store.getters.chatname}} {{message.date}}</view>
-				<view :class="'m-content-head-s-'+message.user" v-else>{{message.date}}   {{this.$store.getters.realname}} </view>
-				<view :class="'m-content-head-'+message.user">{{message.content}} </view>
-			</view>
-		</view>
-		<view class="m-right" @click="users(user.customer.id)">
-			<image class="head_icon" :src="user.customer.img" v-if="message.user=='customer'"></image>
-		</view>
-	</view>
-</template>
-
-<script>
-	import {
-		mapState
-	} from 'vuex'
-import api from '@/api/api'
-	export default {
-		data() {
-			return {
-				abosultPaht: "../../",
-				ats:"http://10.0.0.94:8080/jeecg-boot/sys/common/static/"
-				
-			}
-		},
-		methods:{
-			users:function(e){
-				this.$store.commit('SET_TEMUSERID',e);
-				this.$Router.push({name:'teamuser'})
-			}
-		},
-		props: ['message', 'id'],
-		computed: mapState(['user'])
-	}
-</script>
-
-<style>
-	.m-item {
-		display: flex;
-		flex-direction: row;
-		padding-top: 40px;
-	}
-	.m-left {
-		display: flex;
-		width: 80px;
-		justify-content: center;
-		align-items: flex-start;
-	}
-	.m-content {
-		display: flex;
-		flex: 1;
-		flex-direction: column;
-		justify-content: center;
-		word-break: break-all;
-		
-	}
-	.m-right {
-		display: flex;
-		width: 80px;
-		justify-content: center;
-		align-items: flex-start;
-	}
-	.head_icon {
-		width: 40px;
-		height: 40px;
-	}
-	.m-content-head {
-		position: relative;
-		
-	}
-	.m-content-head-right {
-		display: flex;
-		justify-content: flex-end;
-	}
-	.m-content-head-home {
-		text-align: left;
-		background: #1482d1;
-		border: 1px #1482d1 solid;
-		border-radius: 5px;
-		padding: 10px;
-		color: white;
-		width:fit-content;
-		
-	}
-	.m-content-head-home:before {
-		border: 15px solid transparent;
-		border-right: 15px solid #1482d1;
-		left: -26px;
-		width: 0;
-		height: 0;
-		top: 21px;
-		position: absolute;
-		content: ' '
-	}
-	.m-content-head-customer {
-		float: right;
-		border: 1px white solid;
-		background: white;
-		border-radius: 5px;
-		padding: 10px;
-		width:fit-content;
-	}
-	.m-content-head-customer:after {
-		border: 15px solid transparent;
-		border-left: 15px solid white;
-		top: 21px;
-		right: -26px;
-		width: 0;
-		height: 0;
-		position: absolute;
-		content: ' '
-	}
-	.m-content-head-s-home{
-		text-align: left;
-		padding: 0.5px;
-		
-		
-	}
-	.m-content-head-s-customer{
-		text-align: right;
-		padding: 0.5px;
-		
-		
-	}
-</style>

+ 17 - 19
pages/home/home.vue

@@ -32,21 +32,21 @@
 			</view>
 			
 			<view class=" bg-white grid col-3 padding-sm">
-				<view class="padding-sm animation-slide-bottom" :style="[{animationDelay: (index + 1)*0.1 + 's'}]" v-for="(item,index) in usList" :key="index" @tap="goPage(item.page)">
+				<view class="padding-sm animation-slide-bottom" :style="[{animationDelay: (index + 1)*0.1 + 's'}]" v-for="(item,index) in usList" :key="index" @tap="goPage(item.component)">
 					<view class="padding radius text-center shadow-blur solid-right ">
 						<!-- <image :src="item.icon"  mode="aspectFill" class="line2-icon"></image> -->
 						<view class="cu-avatar lg " 
 						 :style="{background: 'url(' + item.icon + ') no-repeat',backgroundSize:'95upx 95upx'}">
 						   <view class="cu-tag badge" v-if="getTtemDotInfo(item)">{{getTtemDotInfo(item)}}</view>
 						</view>
-						<view class="text-lg margin-top">{{item.title}}</view>
+						<view class="text-lg margin-top">{{item.name}}</view>
 					</view>
 				</view>
 				
 			</view>
 			</div>
 			<!-- 其他服务 -->
-			<div class="itemt">
+			<!-- <div class="itemt">
 			 <view class="cu-bar bg-white solid-bottom margin-top"  :style="[{animation: 'show 0.6s 1'}]">
 				<view class="action">
 					<text class='cuIcon-title text-yellow'></text>团队信息
@@ -60,7 +60,7 @@
 					</view>
 				</view>
 			</view> 
-			</div>
+			</div> -->
 		</div>
 </template>
 
@@ -82,7 +82,7 @@
 		},
 		data() {
 			return {
-				usList:us.data,
+				usList:null,
 				osList:os.data,
 				websock:'',
 				heartCheck:null,
@@ -92,15 +92,21 @@
 				dot:{
 				  mailHome:false
 				},
-				isshow:false
+				isshow:false,
+				url:'/sys/permission/qeryPerssion'
 			}
 		},
 		created(){
-			this.days()
-			
+			this.days();
+			this.queryPerssion();
 		},
 		methods: {
-			
+			queryPerssion(){
+				this.$http.get(this.url,{params:{userid:this.$store.getters.userid}}).then(res=>{
+					
+					this.usList=res.data;
+				})
+			},
 			days(){
 				var da=this.$store.getters.rzdate;
 				var dt=this.$store.getters.birthdate;
@@ -120,8 +126,7 @@
 			    this.loadCount(0);
 			},
 			goPage(page){
-			 	/* this.$router.push({name:'dome'}) */
-				 var org=this.$store.getters.orgCode;
+				
 				if(!page){
 					return false;
 				}
@@ -129,14 +134,7 @@
 				  this.msgCount = 0
 				}
 				this.dot[page]=false
-				/* if(page=="usersign" && org=="A01C294"){
-					this.$router.push({name:'empsign'})
-				}else if(page=="wages" && org=="A01C294"){
-					this.$router.push({name:'wagesuser'})
-				}else{ */
-					this.$router.push({name: page})
-				// }
-				
+					this.$router.push({name: page})	
 			},
 			initWebSocket: function () {
 				// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https

+ 115 - 0
pages/organization/borgTree.vue

@@ -0,0 +1,115 @@
+<template>
+    <view class="treetable">
+        <view style="display:table-caption !important;text-align:center !important;" >
+            <view class="kuang" @click.native.stop="selectedClick(treedata)">{{treedata.name}}{{treedata.userCount}}人</view>
+            <br/>
+            <span style="border-left:1px solid;height:10upx;"></span>
+        </view>
+        <view v-if="treedata.children && treedata.children.length > 1">
+            <view v-for=" index of treedata.children.length" :key="index">
+                <view class="treetable">
+                    <view>
+                        <view v-for="index2 of 2" :key="index2">
+                            <view v-if="((index+1)*2-(index2+1)%2 -1) == 0">
+                                <text style="visibility: hidden;">
+                                    1
+                                </text>
+                            </view>
+                            <!-- [注意]index+1  是v-for 的 of  in与Vue和Uniapp是不是一样?遍历下标是从0还是1开始 -->
+                            <view v-else-if="((index+1)*2-(index2+1)%2 -1) == 1" :style="lefttoplinestyle">
+                                <text style="visibility: hidden;">
+                                    1
+                                </text>
+                            </view>
+                            <view v-else-if="((index+1)*2-(index2+1)%2 -1) == treedata.children.length * 2 - 2" :style="righttoplinestyle">
+                                <text style="visibility: hidden;">
+                                    1
+                                </text>
+                            </view>
+                            <view v-else-if="((index+1)*2-(index2+1)%2 -1) == treedata.children.length * 2 - 1">
+                                <text style="visibility: hidden;">
+                                    1
+                                </text>
+                            </view>
+                            <view v-else-if="((index+1)*2-(index2+1)%2 -1) % 2 == 1" :style="lefttoplinestyle">
+                                <text style="visibility: hidden;">
+                                    1
+                                </text>
+                            </view>
+                            <view v-else-if="((index+1)*2-(index2+1)%2 -1) % 2 == 0" :style="toplinestyle">
+                                <text style="visibility: hidden;">
+                                    1
+                                </text>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </view>
+        <view>
+            <view v-for=" (children,index) in treedata.children" :key="index" style="vertical-align:top;text-align: center;">
+                <view v-if="!children.children || children.children.length == 0" class="kuang" @click.native.stop="selectedClick(children)">
+                    {{children.name}}{{children.userCount}}人
+                </view>
+                <borgTree ref="btree" v-else :treedata="children" @clickNode="selectedClick"></borgTree>
+            </view>
+
+        </view>
+    </view>
+</template>
+<script>
+   // import borgTree from '@/components/gld-tree/borg-tree-div.vue';
+    export default {
+        // components: {
+        //     borgTree
+        // },
+        name: "grp",
+        props: {
+            treedata: Object,
+        },
+        data() {
+            return {
+                lefttoplinestyle: "border-top:1px solid;border-left:1px solid;",
+                toplinestyle: "border-top:1px solid;",
+                righttoplinestyle: "border-top:1px solid;border-right:1px solid;"
+            }
+        },
+        created() {
+
+        },
+        methods: {
+            selectedClick(node) {
+                this.$emit("clickNode", node)
+            }
+        }
+    };
+</script>
+<style>
+    .kuang {
+        border-radius: 5px !important;
+        word-wrap: break-word;
+        display: inline-block !important;
+        padding: 10upx !important;
+        font-size: 28upx !important;
+        border: 1px solid #333333 !important;
+        margin: 0upx 8upx !important;
+        width: 1em;
+        /* min- 200upx !important; */
+    }
+
+    .treetable {
+        width: 100% ;
+        display: table;
+    }
+
+    .treetable > view {
+        display: table-row ;
+
+    }
+
+    .treetable > view > view {
+        display: table-cell ;
+        vertical-align: middle ;
+        text-align: center ;
+    }
+</style>

+ 114 - 0
pages/organization/leaveorgz.vue

@@ -0,0 +1,114 @@
+<template>
+	<view>
+		<cu-custom bgColor="bg-gradual-pink" :isBack="true">
+			<block slot="backText">返回</block>
+			<block slot="content">组织架构</block>
+		</cu-custom>
+		<xiaolu-tree  :checkList="checkList"  v-if="tree.length>0"  :props="prop" @sendValue="confirm"  :isCheck="true" :treeNone="tree"></xiaolu-tree>
+		
+	</view>
+</template>
+
+<script>
+	import api from '@/api/api'
+	import XiaoluTree from'@/components/xiaolu-tree/tree.vue'
+	export default {
+		components: {
+			XiaoluTree
+		},
+		data() {
+			return {
+				data:[],
+				userUrl:'/sys/user/departList',
+				departName:'',
+				orgName:'',
+				tree: [],
+				checkList: [],
+				backList: this.checkList,
+				prop:{
+				label: 'name',
+				children: 'children',
+				multiple:true,
+				},
+				max: 5,	
+			}
+			},
+			created(){
+				this.querydepartName()
+				uni.setStorageSync("orgType",2);
+			},
+			onLoad(option) {
+				 let { prop,arr } = option
+				 // #ifdef H5
+				let checkList = JSON.parse(decodeURIComponent(arr));
+				// #endif
+				// #ifdef MP-QQ||MP-WEIXIN||APP-NVUE||APP-PLUS
+				let checkList = JSON.parse(arr);
+				// #endif
+				this.prop = JSON.parse(prop)
+				this.checkList = checkList;
+				//this.tree=treeNode;//树形数据赋值
+				//this.querydepartName();
+			},
+			methods:{
+				confirm(val,back) {
+					if(back){
+						this.backConfirm(val)
+						return
+					}
+					this.backList = val;
+				},
+				
+				// 返回上一页传参
+				 backConfirm(val) {
+					uni.$emit('selectSuccess',{list:val})
+					uni.navigateBack();
+				},
+				
+				querydepartName(s){
+					this.$http.get(this.userUrl,{params:{departName:s}}).then(res=>{
+						console.log("res",res)
+						 this.tree=res.data.departName;
+						 //this.orgName=res.data.orgName;
+						
+					}).catch(err => {
+						console.log(err);
+					});
+				},
+			
+				
+			}
+			
+	}
+	
+	
+</script>
+
+<style>
+	.ins{
+		background-color: #F1F1F1;
+		width: 90%;
+		height: 30px;
+		margin:0 auto;
+		border-radius:5px 5px 5px 5px; 
+		margin-top: 20px;
+		
+	}
+	.s{
+		list-style-type:none;
+		margin-left: -40px;
+	}
+	
+	.imgs{
+		width: 15px;
+		height: 15px;
+		float: right;
+	}
+	
+	.top{
+		  background-color: #5677AC;
+		  width: 100%;
+		  height: 40px;
+		 
+	}
+</style>

+ 22 - 39
pages/organization/orgz.vue

@@ -1,71 +1,54 @@
 <template>
-	<div style="background-color: #FFFFFF;">
-		
+	<view>
 		<cu-custom bgColor="bg-gradual-pink" :isBack="true">
 			<block slot="backText">返回</block>
 			<block slot="content">组织架构</block>
 		</cu-custom>
-		<div class="ins">
-			<div style="height: 3px;"></div>
-			 <input  placeholder="🔍  搜索" style="text-align: center;" v-model="departName" />
-		</div>
-		<br>
-		<div style="height: 10px;width: 100%;background-color: #F1F1F1 ;"></div>
-		<div style="height: 10px;width: 100%;"></div>
-		<span style="margin-left: 20px; color:  #A3A7B1;">{{orgName.departName}}</span>
+		<xiaolu-tree  :checkList="checkList"  v-if="tree.length>0"  :props="prop" @sendValue="confirm"  :isCheck="true" :treeNone="tree"></xiaolu-tree>
 		
-		<view class="cu-list menu  radius" >
-		  <view class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.1s'}]" v-for='(item,index) in data'>
-		    <navigator class="content" @click="jump(item.departId)" hover-class="none">
-		     
-		      <text class="text-grey">{{item.orgCodeTxt}} ({{item.count}})</text>
-		   </navigator>
-		  </view> 
-					</view>
-	</div>
+	</view>
 </template>
 
 <script>
+	import XiaoluTree from'@/components/xiaolu-tree/tree.vue'
 	import api from '@/api/api'
 	export default {
+		components: {
+			XiaoluTree
+		},
 		data() {
 			return {
 				data:[],
 				userUrl:'/sys/user/departList',
 				departName:'',
-				orgName:''
+				orgName:'',
+				tree: [],
+				checkList: [],
+				backList: this.checkList,
+				prop:{
+				label: 'name',
+				children: 'children',
+				multiple:true,
+				},
+				max: 5,	
 			}
 			},
-			watch:{
-				departName:{
-					handler(newVal, objVal) {
-					 this.querydepartName(newVal);
-			  },
-				}
-			},
+			
 			created(){
 				this.querydepartName()
+				uni.setStorageSync("orgType",1);
 			},
 			methods:{
-				
-				jump(s){
-					console.log(s)
-					this.$store.commit('SET_DEPARTID',s)
-					 this.$Router.push({name:'teams'}) 
-				},
 				querydepartName(s){
 					this.$http.get(this.userUrl,{params:{departName:s}}).then(res=>{
 						console.log("res",res)
-						 this.data=res.data.departName;
-						 this.orgName=res.data.orgName;
+						 this.tree=res.data.departName;
 						
 					}).catch(err => {
 						console.log(err);
 					});
-				},
-				ret(){
-					this.$Router.push({name:'index'})
-				},
+				}
+				
 				
 			}
 			

+ 102 - 0
pages/organization/wagsorgz.vue

@@ -0,0 +1,102 @@
+<template>
+	<view>
+		<cu-custom bgColor="bg-gradual-pink" :isBack="true">
+			<block slot="backText">返回</block>
+			<block slot="content">组织架构</block>
+		</cu-custom>
+		<xiaolu-tree  :checkList="checkList"  v-if="tree.length>0"  :props="prop" @sendValue="confirm"  :isCheck="true" :treeNone="tree"></xiaolu-tree>
+		
+	</view>
+</template>
+
+<script>
+	import XiaoluTree from'@/components/xiaolu-tree/tree.vue'
+	import api from '@/api/api'
+	export default {
+		components: {
+			XiaoluTree
+		},
+		data() {
+			return {
+				data:[],
+				userUrl:'/sys/user/departList',
+				departName:'',
+				orgName:'',
+				tree: [],
+				checkList: [],
+				backList: this.checkList,
+				prop:{
+				label: 'name',
+				children: 'children',
+				multiple:true,
+				},
+				max: 5,	
+			}
+			},
+			watch:{
+				departName:{
+					handler(newVal, objVal) {
+					 this.querydepartName(newVal);
+			  },
+				}
+			},
+			created(){
+				this.querydepartName()
+				uni.setStorageSync("orgType",3);
+			},
+			methods:{
+				
+				jump(s){
+					console.log(s)
+					this.$store.commit('SET_DEPARTID',s)
+					 this.$Router.push({name:'wagesuser'}) 
+				},
+				querydepartName(s){
+					this.$http.get(this.userUrl,{params:{departName:s}}).then(res=>{
+						console.log("res",res)
+						 this.tree=res.data.departName;
+						// this.orgName=res.data.orgName;
+						
+					}).catch(err => {
+						console.log(err);
+					});
+				},
+				ret(){
+					this.$Router.push({name:'index'})
+				},
+				
+			}
+			
+	}
+	
+	
+</script>
+
+<style>
+	.ins{
+		background-color: #F1F1F1;
+		width: 90%;
+		height: 30px;
+		margin:0 auto;
+		border-radius:5px 5px 5px 5px; 
+		margin-top: 20px;
+		
+	}
+	.s{
+		list-style-type:none;
+		margin-left: -40px;
+	}
+	
+	.imgs{
+		width: 15px;
+		height: 15px;
+		float: right;
+	}
+	
+	.top{
+		  background-color: #5677AC;
+		  width: 100%;
+		  height: 40px;
+		 
+	}
+</style>

+ 87 - 0
pages/organization/workorgz.vue

@@ -0,0 +1,87 @@
+<template>
+	<view>
+		<cu-custom bgColor="bg-gradual-pink" :isBack="true">
+			<block slot="backText">返回</block>
+			<block slot="content">组织架构</block>
+		</cu-custom>
+		<xiaolu-tree  :checkList="checkList"  v-if="tree.length>0"  :props="prop" @sendValue="confirm"  :isCheck="true" :treeNone="tree"></xiaolu-tree>
+		
+	</view>
+</template>
+
+<script>
+	import XiaoluTree from'@/components/xiaolu-tree/tree.vue'
+	import api from '@/api/api'
+	export default {
+		components: {
+			XiaoluTree
+		},
+		data() {
+			return {
+				data:[],
+				userUrl:'/sys/user/departList',
+				departName:'',
+				orgName:'',
+				tree: [],
+				checkList: [],
+				backList: this.checkList,
+				prop:{
+				label: 'name',
+				children: 'children',
+				multiple:true,
+				},
+				max: 5,	
+			}
+			},
+			
+			created(){
+				this.querydepartName()
+				uni.setStorageSync("orgType",4);
+			},
+			methods:{
+				querydepartName(s){
+					this.$http.get(this.userUrl,{params:{departName:s}}).then(res=>{
+						console.log("res",res)
+						 this.tree=res.data.departName;
+						
+					}).catch(err => {
+						console.log(err);
+					});
+				}
+				
+				
+			}
+			
+	}
+	
+	
+</script>
+
+<style>
+	.ins{
+		background-color: #F1F1F1;
+		width: 90%;
+		height: 30px;
+		margin:0 auto;
+		border-radius:5px 5px 5px 5px; 
+		margin-top: 20px;
+		
+	}
+	.s{
+		list-style-type:none;
+		margin-left: -40px;
+	}
+	
+	.imgs{
+		width: 15px;
+		height: 15px;
+		float: right;
+	}
+	
+	.top{
+		  background-color: #5677AC;
+		  width: 100%;
+		  height: 40px;
+		 
+	}
+</style>

+ 194 - 62
pages/sign/empsign.vue

@@ -1,18 +1,20 @@
 <template>
-	<div style="background-color: #FFFFFF;">
+	<div >
 		<cu-custom bgColor="bg-gradual-pink" :isBack="true">
 			<block slot="backText">返回</block>
 			<block slot="content">考勤情况</block>
 		</cu-custom>
-		<div class="ins">
-			<div style="height: 3px;"></div>
-			 <input  placeholder="🔍  搜索" style="text-align: center;" v-model="name" />
-		</div>
-		<br>
+	<view class="tmp-box">
+		<view class='filterBox'>
+			<view class='filter-input'>
+				<text style="color: #b8b8b8;"  class="iconfont icon-sousuo filterImg"/>
+				<input class="text" type='text' v-model="name"  confirm-type="搜索"  placeholder='搜索'></input>
+			</view>
+		</view>
+	</view>
 		<div>
 			<div class='month'>
 				<ul style="list-style-type:none;">
-					<!--点击会触发pickpre函数,重新刷新当前日期 @click(vue v-on:click缩写) -->
 					<li class='arrow' @click='pickPre(currentYear,currentMonth)'>上个月</li>
 					<li class='year-month'>
 						<span class='choose-year'>{{ currentYear }}年</span>
@@ -23,33 +25,24 @@
 				<br>
 			</div>
 		</div>
-		<div style="width: 100%;height: 10px;background-color:#F1F1F1 ;"></div>
-		<view class="cu-list menu  radius" >
-		  <view class="cu-item "v-for='(item,index) in data'>
-		    <navigator class="content" @click="details(item.id)" hover-class="none">
-				<div style="margin-top: -15px;">
-		     <span class="imgs">
-		     	<image :src="item.avatar" class="imgs"></image>
-		     </span>	
-			 </div>
-		     <div style="margin-top: -40px;">
-				  <text style="margin-left: 20%;">{{item.realname}}</text>
-			 </div>
-			 <div style="margin-top: -25px;">
-			 				  <text class="text-grey" style="margin-left: 40%;">{{item.orgCodeTxt}}</text>
-			 </div>
-			 <div  style="margin-top: -25px;">
-				 <span style="float: right;color: #0081FF;font-size: 15px;" v-if='item.del=="2" ||item.del==2'>当月考勤正常</span>
-				 <span style="float: right;color: red;font-size: 15px;" v-if='item.del=="1" ||item.del==1'>当月考勤异常</span>
-				 
-			 </div>
-		   </navigator>
-		  </view> 
-					</view>
-
-		
-		
 		
+		<view>
+			<view class="container-list">
+				<view class="common cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.1s'}]" v-for='(item,index) in data'  :key="index">
+					<label class="content" @click="details(item.id)">
+					
+						<image :src="item.avatar" class="imgs"></image>
+						<view class="lable-text" >{{item.realname}}</view>
+						<!-- <text class="text-grey" >{{item.orgCodeTxt}}</text> -->
+			<view class="right">
+			<span style="color: #0081FF;font-size: 15px;" v-if='item.del=="2" ||item.del==2'>当月考勤正常</span>
+			<span style="color: red;font-size: 15px;" v-if='item.del=="1" ||item.del==1'>当月考勤异常</span>
+			</view>
+					</label>
+				</view>
+				
+			</view>
+		</view>
 	</div>
 </template>
 
@@ -74,7 +67,7 @@
 			},
 			created(){
 				this.initData(null)
-				this.query()
+				this.querys(this.name)
 			},
 			methods:{
 				initData: function(cur) {
@@ -103,7 +96,7 @@
 					var d = new Date(this.formatDate(year, month, 1))
 					d.setDate(0)
 					this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
-					this.query();
+					this.querys(this.name);
 				},
 				
 				pickNext: function(year, month) {
@@ -116,13 +109,17 @@
 					d.setDate(35)
 					
 					this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
-					this.query();
+					this.querys(this.name);
 					}
 				},
 				
 				// 返回 类似 2016-01-02 格式的字符串
 				formatDate: function(year, month, day) {
 					var y = year
+					if(month>12){
+						month=1;
+						y=year+1;
+					}
 					var m = month
 					if (m < 10) m = '0' + m
 					var d = day
@@ -137,8 +134,10 @@
 				},
 				details(item){
 					var date=this.formatDate(this.currentYear,this.currentMonth,1);
-					this.$store.commit('SET_NPMUSER',{id:item,date:date})
-					  this.$Router.push({name:'empusersign'})
+					uni.setStorageSync("status",2);
+					uni.setStorageSync("date",date);
+					uni.setStorageSync("id",item);
+					 this.$Router.push({name:'usersign'})
 				},
 				query(){
 					this.data=[];
@@ -165,7 +164,7 @@
 				querys(s){
 					this.data=[];
 					var date=this.formatDate(this.currentYear,this.currentMonth,1);
-						this.$http.get(this.userUrl,{params:{username:s,date:date}}).then(res=>{
+						this.$http.get(this.userUrl,{params:{username:s,date:date,depid:this.$store.getters.departId}}).then(res=>{
 							if(res.data.length>0){
 								for(var i=0;i<res.data.length;i++){
 									var s={
@@ -184,9 +183,7 @@
 							console.log(err);
 						}); 
 				},
-				ret(){
-					this.$Router.push({name:'index'})
-				}
+				
 				
 				
 			}
@@ -196,7 +193,7 @@
 	
 </script>
 
-<style>
+<style lang="scss" scoped>
 	.month ul {
 		margin: 0;
 		padding: 0;
@@ -242,31 +239,166 @@
 		color: #333333;
 		background: #ffffff;
 	}
-	.ins{
-		background-color: #F1F1F1;
-		width: 90%;
-		height: 30px;
-		margin:0 auto;
-		border-radius:5px 5px 5px 5px; 
-		margin-top: 10px;
-		
-	}
-	.s{
-		list-style-type:none;
-		margin-left: -40px;
-	}
+	
 	
 	.imgs{
 		width: 40px;
 		height: 40px;
 		border-radius:5px 5px 5px 5px; 
-		
+		margin-left: 1%;
 	}
-	.top{
-		  background-color: #5677AC;
-		  width: 100%;
-		  height: 40px;
-		 
+	
+	.filterBox {
+		padding: 15rpx 32rpx;
+		background-color: #fff;
+		.filter-input {
+			height: 80rpx;
+			background-color: #eeeff0;
+			border-radius: 40rpx;
+			display: flex;
+			align-items: center;
+			
+			padding-left: 40rpx;
+			.filterImg {
+				width: 32rpx;
+				height: 32rpx;
+				margin-right: 20rpx;
+				margin-bottom: 5rpx;
+			}
+			.filterImgs {
+				width: 32rpx;
+				height: 32rpx;
+				
+			}
+			.text {
+				width: 84%;
+				background-color: #eeeff0;
+				font-size: 32rpx;
+				color: #000;
+			}
+		}
 	}
 	
+	.flex_between_center {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+		}
+	
+		.checkbox {
+			position: relative;
+			margin-left: 10rpx;
+			margin-right: 0px;
+			.color {
+				color: #00aaff;
+				background-color: #00aaff;
+			}
+			.txt {
+				font-size: 44rpx;
+				width: 100%;
+				height: 100%;
+				display: flex;
+			}
+		}
+		.checkBorder {
+			border: 1px solid #ecdee4;
+		}
+		.header {
+			width: 100%;
+			position: fixed;
+			background-color: #fff;
+			z-index: 9999;
+			.title {
+				height: 90rpx;
+				padding: 0 32rpx;
+				line-height: 90rpx;
+				font-size: 30rpx;
+				background-color: #f5f5f5;
+				color: #606064;
+			}
+		}
+		.iconclass {
+			display: inline-block;
+			margin: 0 12rpx;
+			color: #D0D4DB;
+			font-size: 28rpx;
+		}
+		.container-list {
+			overflow-y: scroll;
+			overflow-x: hidden;
+			padding-bottom: 160rpx;
+			padding-top: 15rpx;
+			.common {
+				background-color: #fff;
+				border-bottom: 1rpx solid #f4f4f4;
+				padding-left: 10rpx;
+				.content {
+					display: flex;
+					align-items: center;
+					height: 70rpx;
+					width: 100%;
+					padding: 15rpx 0;
+					position: relative;
+					font-size: 32rpx;
+					.lable-text{
+						margin-left: 5%;
+						font-size: 30rpx;
+						color: #5b5757;
+						width: 500rpx;
+						word-break: break-all;
+					}
+					.right {
+						position: absolute;
+						right: 30rpx;
+						color: #babdc3;
+						font-size: 32rpx;
+					}
+				}
+			}
+		}
+		.active {
+			color: #4297ED !important;
+		}
+		.none {
+			color: #666666;
+		}
+		.icon-selected{
+			color: #0095F2!important;
+			font-size: 40rpx!important;
+		}
+		.icons{
+			color: #0095F2!important;
+			font-size: 40rpx!important;
+		}
+		.inline-item {
+			display: inline-block
+		}
+		
+		.content-item{
+			display: flex;
+			position: relative;
+			align-items: center;
+		}
+		
+		.box_sizing {
+			-webkit-box-sizing: border-box;
+			-moz-box-sizing: border-box;
+			box-sizing: border-box;
+		}
+		
+		.btn {
+			position: fixed;
+			bottom: 0;
+			padding: 10px;
+			background-color: #fff;
+			width: 100%;
+		
+			.sureBtn {
+				background-color: #0095F2;
+				color: #fff;
+			}
+		}
+	// @import '@/components/xiaolu-tree/css/style.scss';
+	@import url("@/components/xiaolu-tree/css/icon.css");
+	
 </style>

+ 3 - 4
pages/sign/leave.vue

@@ -11,7 +11,7 @@
 				{{datetime}}年度
 			</div>
 			<div style="text-align: center;margin-top: 10px;">
-				<span style="color: #93B5E9;">今年年假总天数:</span><span style="margin-left:10px ;font-size: 18px;color: #FFFFFF;">{{yearDay/24}}天</span>
+				<span style="color: #93B5E9;">年假总天数:</span><span style="margin-left:10px ;font-size: 18px;color: #FFFFFF;">{{yearDay/24}}天</span>
 				<span style="margin-left:10px;border-left: 2px solid #ccc;"></span>
 				<span style="margin-left:10px ;color: #93B5E9;">当前可用年假:</span><span style="margin-left:10px ;font-size: 18px;color: #FFFFFF;">{{availableDay/24}}天</span>
 			</div>
@@ -33,9 +33,8 @@
 			     <div>
 					  <div style="color: #9C9FAA;">
 					  	<span >{{s.startDate}}</span>
-					  	<span style="margin-left:5px;" v-if='s.start=="1"'>上午</span>
-					  	<span style="margin-left:5px;" v-if='s.start=="2"'>下午</span>
-					  	
+					
+				
 					  	<span style="margin-left:5px;">至</span>
 					  	<span style="margin-left:5px;">{{s.endDate}}</span>
 					  	

+ 207 - 0
pages/sign/leaveemp.vue

@@ -0,0 +1,207 @@
+<template>
+	<div style="background-color: #FFFFFF;">
+		<cu-custom bgColor="bg-gradual-pink" :isBack="true">
+			<block slot="backText">返回</block>
+			<block slot="content" >假期列表</block>
+		</cu-custom>
+		<div class="ins">
+			<div style="height: 3px;"></div>
+			 <input   placeholder="🔍  搜索" style="text-align: center;" v-model="name" />
+		</div>
+		
+		<br>
+		
+		<div style="width: 100%;height: 10px;background-color:#F1F1F1 ;"></div>
+		
+			<view class="cu-list menu  radius" >
+			  <view class="cu-item "v-for='(item,index) in data'>
+			    <navigator class="content" @click="details(item.id)" hover-class="none">
+					<div style="margin-top: -10px;">
+			     <span class="imgs">
+			     	<image :src="item.avatar" class="imgs"></image>
+			     </span>	
+				 </div>
+			     <div style="margin-top: -40px;">
+					  <text style="margin-left: 15%;">{{item.realname}}</text>
+				 </div>
+				 <div style="margin-top: -25px;">
+				 				  <text class="text-grey" style="margin-left: 35%;">{{item.orgCodeTxt}}</text>
+								 <!-- <text class="text-grey" >总假期:{{item.del/24}}(天)</text> -->
+<!-- 								  <text class="text-grey" style="margin-left: 15%;">剩余:{{item.del2/24}}(天)</text> -->
+				 </div>
+				 
+			   </navigator>
+			  </view> 
+						</view>
+	</div>
+</template>
+
+<script>
+	import api from '@/api/api'
+	export default {
+		data() {
+			return {
+				name:'',
+				data:[],
+				userUrl:'/sys/user/queryLeaveList'
+			}
+			},
+			watch:{
+				name:{
+					handler(newVal, objVal) {
+					 this.querys(newVal);
+			  },
+				}
+			},
+			created(){
+				this.querys(this.name)
+			},
+			methods:{
+				
+				// 返回 类似 2016-01-02 格式的字符串
+				formatDate: function(year, month, day) {
+					var y = year
+					var m = month
+					if (m < 10) m = '0' + m
+					var d = day
+					if(day!=null &&day !=""){
+						if (d < 10) d = '0' + d
+						return y + '-' + m + '-' + d
+					}else{
+						return y + '-' + m 
+					}
+					
+					
+				},
+				details(item){
+					this.$store.commit('SET_LEAVE',item);
+					  this.$Router.push({name:'leaves'})
+				},
+				query(){
+					this.data=[];
+					this.$http.get(this.userUrl,{params:{username:this.name}}).then(res=>{
+						if(res.data.length>0){
+								for(var i=0;i<res.data.length;i++){
+									var s={
+									id:res.data[i].id,
+									realname:res.data[i].realname,
+									avatar:(res.data[i].avatar && res.data[i].avatar.length > 0)? api.getFileAccessHttpUrl(res.data[i].avatar):'/static/avatar_boy.png',
+									orgCodeTxt:res.data[i].orgCodeTxt,
+									del:res.data[i].del2,
+									del2:res.data[i].del3
+								}
+							this.data.push(s)
+							}
+						}
+					}).catch(err => {
+						console.log(err);
+					}); 
+					
+				},
+				querys(s){
+					this.data=[];
+						this.$http.get(this.userUrl,{params:{username:s,depid:this.$store.getters.departId}}).then(res=>{
+							if(res.data.length>0){
+									for(var i=0;i<res.data.length;i++){
+										var s={
+										id:res.data[i].id,
+										realname:res.data[i].realname,
+										avatar:(res.data[i].avatar && res.data[i].avatar.length > 0)? api.getFileAccessHttpUrl(res.data[i].avatar):'/static/avatar_boy.png',
+										orgCodeTxt:res.data[i].orgCodeTxt,
+										del:res.data[i].del2,
+										del2:res.data[i].del3
+									}
+								this.data.push(s)
+								}
+							}
+						}).catch(err => {
+							console.log(err);
+						}); 
+				},
+				ret(){
+					this.$Router.push({name:'index'})
+				}
+				
+				
+			}
+			
+	}
+	
+	
+</script>
+
+<style>
+
+	.month ul {
+		margin: 0;
+		padding: 0;
+		display: flex;
+		justify-content: space-between;
+		height: 35px;
+	}
+	
+	.year-month {
+		display: flex;
+		align-items: center;
+		justify-content: space-around;
+		margin-top: 10px;
+	}
+	
+	.choose-month {
+		text-align: center;
+		font-size: 12px;
+	}
+	
+	.arrow {
+		padding: 15px;
+		color: #999999;
+	}
+	
+	.month ul li {
+		font-size: 12px;
+		text-transform: uppercase;
+		letter-spacing: 3px;
+	}
+	
+	#calendar {
+		font-size: 12px;
+		width: 100%;
+		margin: 0 auto;
+		box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.1),
+			0 1px 5px 0 rgba(0, 0, 0, 0.12);
+			
+	}
+	
+	.month {
+		width: 100%;
+		color: #333333;
+		background: #ffffff;
+	}
+	.ins{
+		background-color: #F1F1F1;
+		width: 90%;
+		height: 30px;
+		margin:0 auto;
+		border-radius:5px 5px 5px 5px; 
+		margin-top: 10px;
+		
+	}
+	.s{
+		list-style-type:none;
+		margin-left: -40px;
+	}
+	
+	.imgs{
+		width: 40px;
+		height: 40px;
+		border-radius:5px 5px 5px 5px; 
+		
+	}
+	.top{
+		  background-color: #5677AC;
+		  width: 100%;
+		  height: 40px;
+		 
+	}
+	
+</style>

+ 132 - 0
pages/sign/leaves.vue

@@ -0,0 +1,132 @@
+<template>
+	<div>
+	
+		<cu-custom bgColor="bg-gradual-pink" :isBack="true">
+			<block slot="backText">返回</block>
+			<block slot="content">我的假期</block>
+		</cu-custom>
+		<div class="panlen">
+			<div class="items">
+				<div style="height: 2px;"></div>
+				{{datetime}}年度
+			</div>
+			<div style="text-align: center;margin-top: 10px;">
+				<span style="color: #93B5E9;">年假总天数:</span><span style="margin-left:10px ;font-size: 18px;color: #FFFFFF;">{{yearDay}}天</span>
+				<span style="margin-left:10px;border-left: 2px solid #ccc;"></span>
+				<span style="margin-left:10px ;color: #93B5E9;">当前可用年假:</span><span style="margin-left:10px ;font-size: 18px;color: #FFFFFF;">{{availableDay}}天</span>
+			</div>
+		</div>
+		<div style="background-color: #FFFFFF;">
+			<div >
+				<div style="height: 50px;position: relative;">
+					
+					<text style="position: absolute;top: 30%;margin-left: 10px;">年假申请记录</text>
+				<!-- <strong style="position: absolute;top: 30%;font-size: 15px;">年假申请记录</strong> -->
+				
+				</div>
+				<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;"></div>
+				
+			<view class="cu-list  menu  radius" >
+			  <view class="cu-item " v-for="s in data">
+			    <navigator class="content"  hover-class="none">
+					<text>年假 ({{s.holidayCount/24}}天)</text>
+			     <div>
+					  <div style="color: #9C9FAA;">
+					  	<span >{{s.startDates}}</span>  	
+					  	<span style="margin-left:5px;">至</span>
+					  	<span style="margin-left:5px;">{{s.endDates}}</span>
+					  </div>
+				 </div>
+				 <div >
+					 <span style="float: right ;margin-top: -30px;color: #D6D6D6;" v-if='s.state=="2" ||s.state==2'>已通过</span>
+					 <span style="float: right ;color: #F09745;margin-top: -30px;" v-if='s.state=="1" ||s.state==1'>审批中</span>
+					 <span style="float: right ;color: #F09745;margin-top: -30px;" v-if='s.state=="3" ||s.state==3'>已驳回</span>
+					 <span style="float: right ;color: #F09745;margin-top: -30px;" v-if='s.state=="4" ||s.state==4'>已撤销</span>
+					 <span style="float: right ;color: #F09745;margin-top: -30px;" v-if='s.state=="5" ||s.state==5'>通过后撤销</span>
+					 <span style="float: right ;color: #F09745;margin-top: -30px;" v-if='s.state=="6" ||s.state==6'>已删除</span>
+				 </div>
+			   </navigator>
+			  </view> 
+			 
+						</view>
+				
+			</div>
+		</div>
+	</div>
+</template>
+
+<script>
+	import api from '@/api/api'
+	export default {
+			data() {
+				return {
+				userUrl:'/sys/weixin/myVacation',
+				datetime:null,
+				yearDay:null,
+				availableDay:null,
+				data:[],
+				}
+			},
+			created() {
+				var date=new Date();
+				this.datetime=date.getFullYear();
+				var id=this.$store.getters.userid;
+				var deptid=uni.getStorageSync('id');
+				if(deptid!=null&&deptid!=""){
+					id=deptid;
+				}
+				
+				this.$http.get(this.userUrl,{params:{userid:id}}).then(res=>{
+					console.log(res);
+					this.yearDay=res.data.vacations.nVacRete;
+					this.availableDay=res.data.vacations.nTotal;
+					if(""!=res.data.vacationsBody &&res.data.vacationsBody!=null){
+						this.data=res.data.vacationsBody;
+					}
+					
+					
+					
+				}).catch(err => {
+					console.log(err);
+				}); 
+				
+			},methods:{
+				
+					ret(){
+						this.$Router.push({name:'index'})
+					},
+				
+					
+				
+				}
+			}
+			
+		
+</script>
+
+<style>
+	.panlen{
+		width: 95%;
+		height: 100px;
+		border-radius:5px 5px 0 0; 
+		background-color: #3C7AD8;
+		margin:0 auto;
+		margin-top: 10px;
+	}
+	.items{
+		width: 70px;
+		height: 25px;
+		background-color: #EC770C;
+		border-radius:5px 0 5px 0;
+		text-align: center;
+		color: #FFFFFF;
+	}
+	
+	
+	.top{
+		  background-color: #5677AC;
+		  width: 100%;
+		  height: 40px;
+		 
+	}
+</style>

+ 49 - 40
pages/sign/usersign.vue

@@ -45,14 +45,14 @@
 						</span>
 						<span v-else @click="getDayTime(dayobject.day)">
 						<span class="act"  >{{ dayobject.day.getDate() }}</span>
-						<div style="margin-top: -10px;" v-if='SetDays!=[] &&SetDays.length>0' v-for='(dayobj,i) in SetDays'>
-							<strong  v-if='dayobj.iss == dayobject.day.getDate() && dayobj.is=="2" &&dayobject.day<=ToDay &&dayobject.day.getDay()!=0&&dayobject.day.getDay()!=6'  style="color: #4E6FE2;font-size: 20px;">.</strong>
-							<strong v-if='dayobj.iss == dayobject.day.getDate() && dayobj.is=="1" &&dayobject.day<=ToDay &&dayobject.day.getDay()!=0&&dayobject.day.getDay()!=6'  style="color: red;font-size: 20px;">.</strong>
+						<div style="margin-top: -10px;" v-if='SetDays!=[] &&SetDays.length>0 &&SetDays!=undefined ' v-for='(dayobj,i) in SetDays'>
+							<strong  v-if='dayobj.iss == dayobject.day.getDate() && dayobj.is=="2" &&dayobject.day<=ToDay'  style="color: #4E6FE2;font-size: 20px;">.</strong>
+							<strong v-if='dayobj.iss == dayobject.day.getDate() && dayobj.is=="1" &&dayobject.day<=ToDay'  style="color: red;font-size: 20px;">.</strong>
 							
 						</div>
-						<div style="margin-top: -10px;" v-if='SetDays==[] ||SetDays.length<1'>
-							<strong v-if='dayobject.day.getDay()!=0&&dayobject.day.getDay()!=6'  style="color: red;font-size: 20px;">.</strong>
-						</div>
+						<!-- <div style="margin-top: -10px;" v-if='SetDays==[] ||SetDays.length<1'>
+							<strong   style="color: red;font-size: 20px;">.</strong>
+						</div> -->
 						</span>
 					</span>
 				</li>
@@ -84,6 +84,7 @@
 				<ul class="steps">
 				    <li v-for="(item,index) in SetData" :key="item+index" :class="{'active':Steps===index}" >
 						{{item.userDate}} <span style="margin-left: 20px;">{{item.checkinType}}</span>
+						<span style="margin-left: 20px;">{{item.exceptionType}}</span>
 					</li> 
 					
 					 </ul>
@@ -93,34 +94,16 @@
 				<span style="height: 2px;width: 100%;background-color: #B4C3E0;"></span>
 				<br>
 				<span style="color: #9599A5;font-size: 15px;">
-					请假/外出记录:<span v-if='Setdds=="" || Setdds==null'>无</span>
+					请假/外出记录:<span v-if='Setdds==""&&Setdds==null'>无</span>
 					<br>
 					<br>
-					<span v-if='Setdds!=""&& Setdds!=null && Setdds.holidayType=="1"'>
-						年假&nbsp;&nbsp;({{Setdds.holidayCount/24}}天)
-					</span>
-					<span v-if='Setdds!="" && Setdds!=null &&Setdds.holidayType=="2"'>
-						事假&nbsp;&nbsp;({{Setdds.holidayCount/24}}天)
-					</span>
-					<span v-if='Setdds!="" && Setdds!=null &&Setdds.holidayType=="3"'>
-						病假&nbsp;&nbsp;({{Setdds.holidayCount/24}}天)
-					</span>
-					<span v-if='Setdds!="" && Setdds!=null &&Setdds.holidayType=="4"'>
-						调休假&nbsp;&nbsp;({{Setdds.holidayCount/24}}天)
-					</span>
-					<span v-if='Setdds!="" && Setdds!=null &&Setdds.holidayType=="5"'>
-						婚假&nbsp;&nbsp;({{Setdds.holidayCount/24}}天)
-					</span>
-					<span v-if='Setdds!="" && Setdds!=null &&Setdds.holidayType=="6"'>
-						产假&nbsp;&nbsp;({{Setdds.holidayCount/24}}天)
-					</span>
-					<span v-if='Setdds!="" && Setdds!=null &&Setdds.holidayType=="7"'>
-						陪产假&nbsp;&nbsp;({{Setdds.holidayCount/24}}天)
+					
+					<span v-if='Setdds!=""&&Setdds!=null'>
+						{{Setdds.holidayType}}&nbsp;&nbsp;({{Setdds.holidayCount}}小时)&nbsp;&nbsp;开始时间&nbsp;{{Setdds.startDates}}&nbsp;至&nbsp;{{Setdds.endDates}}
 					</span>
-					<span v-if='Setdds!="" && Setdds!=null &&Setdds.holidayType=="8"'>
-						其他&nbsp;&nbsp;({{Setdds.holidayCount/24}}天)
+					<span v-if='work!=""&&work!=null'>
+						加班&nbsp;&nbsp;({{work.duration}}小时)&nbsp;&nbsp;开始时间&nbsp;{{work.begin_date}}&nbsp;至&nbsp;{{work.end_date}}
 					</span>
-					
 				</span>
 				
 			</div>
@@ -150,12 +133,21 @@
 				Setdds:null,
 				count:'',
 				ToDay:new Date(),
+				state:'',
+				work:{}
 			}
 		},
 		created: function() {
 			// 在vue初始化时调用
-			this.initData(null)
-			this.querys(null)
+			var da=null;
+			var date=null;
+			this.state=uni.getStorageSync('status');
+			if(this.state==2||this.state=="2"){
+				da=uni.getStorageSync('date');
+				date=this.formatDate(this.currentYear,this.currentMonth,1);
+			}
+			this.initData(da)
+			this.querys(da)
 			
 		},
 		methods: {
@@ -215,6 +207,7 @@
 				
 			},
 			querys:function(s){
+				var userid=this.$store.getters.userid;
 				if(s!=null &&s!=""){
 					var date=this.formats(s);
 				}else{
@@ -222,15 +215,27 @@
 					var date=this.formats(t);
 				}
 				this.SetMdays=this.formatt(date);
-				this.$http.get(this.userUrl,{params:{userid:this.$store.getters.userid,date:date}}).then(res=>{
+				var ts=this.state;
+				if(this.state==2||this.state=="2"){
+					//userid=this.$store.getters.id;
+					userid=uni.getStorageSync('id');
+				}
+				
+				console.log(this.state)
+				this.$http.get(this.userUrl,{params:{userid:userid,date:date}}).then(res=>{
 					
 					this.SetData=res.data.date;
-					if(res.data.day.length>0&&res.data.day!=[]){
+					if(res.data.day.length>0&&res.data.day!=[]&&res.data.day!=undefined){
 						this.SetDays=res.data.day;
 					}
+					if(res.data.data!=null){
+					this.Setdds=res.data.data;	
+					}if(res.data.data==null){
+						this.Setdds="";
+					}
 					
-					this.Setdds=res.data.data;
 					this.count=res.data.count;
+					this.work=res.data.work;
 					console.log(res)
 				}).catch(err => {
 					console.log(err);
@@ -271,13 +276,13 @@
 			},
 
 			pickNext: function(year, month) {
-				var d = new Date(this.formatDate(year, month, 1))
-					var ds=this.formatDate(year, month, null);
+				var d = new Date(this.formatDate(year, month+1, 1))
+					var ds=this.formatDate(year, month, 0);
 					var nowDate = new Date();
-					var dt=this.formatDate(nowDate.getFullYear(),nowDate.getMonth(),null);
-					
+					var dt=this.formatDate(nowDate.getFullYear(),nowDate.getMonth(),0);
+					var ts=nowDate.getDate();
 					if(ds<=dt){
-					d.setDate(35)
+					//d.setDate(35)
 					this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
 					this.querys(d);
 				}
@@ -286,6 +291,10 @@
 			// 返回 类似 2016-01-02 格式的字符串
 			formatDate: function(year, month, day) {
 				var y = year
+				if(month>12){
+					month=1;
+					y=year+1;
+				}
 				var m = month
 				if (m < 10) m = '0' + m
 				var d = day

+ 354 - 0
pages/sign/userwork.vue

@@ -0,0 +1,354 @@
+<template>
+	<div >
+		<cu-custom bgColor="bg-gradual-pink" :isBack="true">
+			<block slot="backText">返回</block>
+			<block slot="content">排班信息</block>
+		</cu-custom>
+	
+		<div>
+			<div class='month'>
+				<ul style="list-style-type:none;">
+					<li class='arrow' @click='pickPre(currentYear,currentMonth)'>上个月</li>
+					<li class='year-month'>
+						<span class='choose-year'>{{ currentYear }}年</span>
+						<span class='choose-month'>{{ currentMonth }}月</span>
+					</li>
+					<li class='arrow' @click='pickNext(currentYear,currentMonth)'>下个月</li>
+				</ul>
+				<br>
+			</div>
+		</div>
+		
+		
+		<view>
+			<view class="container-list">
+				<view class="common cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.1s'}]" v-for='(item,index) in data'  :key="index">
+					<label class="content">
+						<view class="lable-text " style="font-size: 15px;margin-left: 10px;">{{item.name}}</view>
+						<view class="lable-text" style="font-size: 15px;">{{item.startDate}}</view>-
+						<view class="lable-text" style="font-size: 15px;">{{item.endDate}}</view>
+			<view class="lable-text">
+			<span style="font-size: 15px;">{{item.shiftDate}}</span>
+			</view>
+					</label>
+				</view>
+				
+			</view>
+		</view>
+	</div>
+</template>
+
+<script>
+	import api from '@/api/api'
+	export default {
+		data() {
+			return {
+				currentMonth: new Date().getMonth()+1,
+				currentYear: new Date().getFullYear(),
+				data:[],
+				userUrl:'/shift/shift/listShift'
+			}
+			},
+			
+			created(){
+				this.initData(null)
+				this.querys(this.name)
+			},
+			methods:{
+				initData: function(cur) {
+					// var leftcount = 0 // 存放剩余数量
+					var date
+					if (cur) {
+						date = new Date(cur)
+					} else {
+						var now = new Date()
+						var d = new Date(this.formatDate(now.getFullYear(), now.getMonth(), 1))
+						d.setDate(35)
+						date = new Date(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
+					}
+					
+					this.currentYear = date.getFullYear()
+					this.currentMonth = date.getMonth() + 1
+					
+					var str = this.formatDate(
+						this.currentYear,
+						this.currentMonth,
+						
+					)
+					
+				},
+				pickPre: function(year, month) {
+					var d = new Date(this.formatDate(year, month, 1))
+					d.setDate(0)
+					this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
+					this.querys();
+				},
+				
+				pickNext: function(year, month) {
+					var d = new Date(this.formatDate(year, month, 1))
+					var ds=this.formatDate(year, month, null);
+					var nowDate = new Date();
+					var dt=this.formatDate(nowDate.getFullYear(),nowDate.getMonth(),null);
+					
+					
+					d.setDate(35)
+					
+					this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
+					this.querys();
+					
+				},
+				
+				// 返回 类似 2016-01-02 格式的字符串
+				formatDate: function(year, month, day) {
+					var y = year
+					if(month>12){
+						month=1;
+						y=year+1;
+					}
+					var m = month
+					if (m < 10) m = '0' + m
+					var d = day
+					if(day!=null &&day !=""){
+						if (d < 10) d = '0' + d
+						return y + '-' + m + '-' + d
+					}else{
+						return y + '-' + m 
+					}
+					
+					
+				},
+				
+				querys(){
+					this.data=[];
+					var deptid=uni.getStorageSync('id');
+					var userid=this.$store.getters.userid;
+					if(deptid!=null&&deptid!=""){
+						userid=deptid;
+					}
+					var date=this.formatDate(this.currentYear,this.currentMonth,1);
+						this.$http.get(this.userUrl,{params:{userid:userid,date:date}}).then(res=>{
+							this.data=res.data;
+							
+						}).catch(err => {
+							console.log(err);
+						}); 
+				},
+				
+				
+				
+			}
+			
+	}
+	
+	
+</script>
+
+<style lang="scss" scoped>
+	.month ul {
+		margin: 0;
+		padding: 0;
+		display: flex;
+		justify-content: space-between;
+		height: 35px;
+	}
+	
+	.year-month {
+		display: flex;
+		align-items: center;
+		justify-content: space-around;
+		margin-top: 10px;
+	}
+	
+	.choose-month {
+		text-align: center;
+		font-size: 12px;
+	}
+	
+	.arrow {
+		padding: 15px;
+		color: #999999;
+	}
+	
+	.month ul li {
+		font-size: 12px;
+		text-transform: uppercase;
+		letter-spacing: 3px;
+	}
+	
+	#calendar {
+		font-size: 12px;
+		width: 100%;
+		margin: 0 auto;
+		box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.1),
+			0 1px 5px 0 rgba(0, 0, 0, 0.12);
+			
+	}
+	
+	.month {
+		width: 100%;
+		color: #333333;
+		background: #ffffff;
+	}
+	
+	
+	.imgs{
+		width: 40px;
+		height: 40px;
+		border-radius:5px 5px 5px 5px; 
+		margin-left: 1%;
+	}
+	
+	.filterBox {
+		padding: 15rpx 32rpx;
+		background-color: #fff;
+		.filter-input {
+			height: 80rpx;
+			background-color: #eeeff0;
+			border-radius: 40rpx;
+			display: flex;
+			align-items: center;
+			
+			padding-left: 40rpx;
+			.filterImg {
+				width: 32rpx;
+				height: 32rpx;
+				margin-right: 20rpx;
+				margin-bottom: 5rpx;
+			}
+			.filterImgs {
+				width: 32rpx;
+				height: 32rpx;
+				
+			}
+			.text {
+				width: 84%;
+				background-color: #eeeff0;
+				font-size: 32rpx;
+				color: #000;
+			}
+		}
+	}
+	
+	.flex_between_center {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+		}
+	
+		.checkbox {
+			position: relative;
+			margin-left: 10rpx;
+			margin-right: 0px;
+			.color {
+				color: #00aaff;
+				background-color: #00aaff;
+			}
+			.txt {
+				font-size: 44rpx;
+				width: 100%;
+				height: 100%;
+				display: flex;
+			}
+		}
+		.checkBorder {
+			border: 1px solid #ecdee4;
+		}
+		.header {
+			width: 100%;
+			position: fixed;
+			background-color: #fff;
+			z-index: 9999;
+			.title {
+				height: 90rpx;
+				padding: 0 32rpx;
+				line-height: 90rpx;
+				font-size: 30rpx;
+				background-color: #f5f5f5;
+				color: #606064;
+			}
+		}
+		.iconclass {
+			display: inline-block;
+			margin: 0 12rpx;
+			color: #D0D4DB;
+			font-size: 28rpx;
+		}
+		.container-list {
+			overflow-y: scroll;
+			overflow-x: hidden;
+			padding-bottom: 160rpx;
+			padding-top: 15rpx;
+			.common {
+				background-color: #fff;
+				border-bottom: 1rpx solid #f4f4f4;
+				padding-left: 10rpx;
+				.content {
+					display: flex;
+					align-items: center;
+					height: 70rpx;
+					width: 100%;
+					padding: 15rpx 0;
+					position: relative;
+					font-size: 32rpx;
+					.lable-text{
+						margin-left: 5%;
+						font-size: 30rpx;
+						color: #5b5757;
+						width: 500rpx;
+						word-break: break-all;
+					}
+					.right {
+						position: absolute;
+						right: 30rpx;
+						color: #babdc3;
+						font-size: 32rpx;
+					}
+				}
+			}
+		}
+		.active {
+			color: #4297ED !important;
+		}
+		.none {
+			color: #666666;
+		}
+		.icon-selected{
+			color: #0095F2!important;
+			font-size: 40rpx!important;
+		}
+		.icons{
+			color: #0095F2!important;
+			font-size: 40rpx!important;
+		}
+		.inline-item {
+			display: inline-block
+		}
+		
+		.content-item{
+			display: flex;
+			position: relative;
+			align-items: center;
+		}
+		
+		.box_sizing {
+			-webkit-box-sizing: border-box;
+			-moz-box-sizing: border-box;
+			box-sizing: border-box;
+		}
+		
+		.btn {
+			position: fixed;
+			bottom: 0;
+			padding: 10px;
+			background-color: #fff;
+			width: 100%;
+		
+			.sureBtn {
+				background-color: #0095F2;
+				color: #fff;
+			}
+		}
+	// @import '@/components/xiaolu-tree/css/style.scss';
+	@import url("@/components/xiaolu-tree/css/icon.css");
+	
+</style>

+ 0 - 165
pages/user/appzf.vue

@@ -1,165 +0,0 @@
-<template>
-	<view>
-		<cu-custom bgColor="bg-gradual-pink" :isBack="true">
-			<block slot="backText">返回</block>
-			<block slot="content">会员开通</block>
-		</cu-custom>
-		<scroll-view scroll-y class="page">
-			<image src="/static/bj001.jpeg " mode="widthFix" class="response">
-			</image>
-			
-			<view class="nav-list" >
-				<navigator hover-class="none" class="nav-li" navigateTo :class="'bg-'+item.color" 
-				 :style="[{width:'100%',animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]" v-for="(item,index) in elements" :key="index">
-					<view class="nav-name">{{item.title}}<view  class="cu-avatar round" :style="{margin:'20px',backgroundImage: 'url(' + item.cuIcon + ')'}"></view></view>
-					<ul>
-						<!-- <li>
-							<div class="card" @click="ts()">
-								<h2 style="color: #000000;text-align: center;margin-top: 15px;">半年vip</h2>
-								<div>
-									<h2 style="color: red;text-align: center;margin-top: 20px;">299元/半年</h2>
-								</div>
-								<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 25px;"></div>
-								<div>
-									<h3 style="color: red;text-align: center;margin-top: 20px;">50万套皮肤免费使用</h3>
-								</div>
-							</div>
-						</li>
-						<li>
-							<div class="card" @click="tss()">
-								<h2 style="color: #000000;text-align: center;margin-top: 15px;">永久vip</h2>
-								<div>
-									<h2 style="color: red;text-align: center;margin-top: 20px;">499元/终身</h2>
-								</div>
-								<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 25px;"></div>
-								<div>
-									<h3 style="color: red;text-align: center;margin-top: 20px;">百万套皮肤免费使用</h3>
-								</div>
-							</div>
-						</li> -->
-						<li>
-							<div class="tt">
-								 <view   style="margin-left: 20px;margin-top: 25px;">
-								<canvas  canvas-id="myQrcode"></canvas>
-								</view>
-							</div>
-							
-						</li>
-					</ul>
-					<view style="margin-left: 80px;margin-top: 10px;"><image src="../../static/zfb.png" style="width: 30px;height: 30px;"></image>
-						</view>
-						<view style="margin-left: 130px;margin-top: -35px;"><h3><span style="color: #0081FF;">支付宝支付</span></h3>
-						</view>
-					
-				</navigator>
-				
-			</view>
-			
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-	const qrCode = require('../../common/util/weapp-qrcode')
-	import api from '@/api/api'
-	export default {
-		name: 'user',
-		data() {
-			return {
-				elements: [{
-						title: '开通账号:  ',
-						name: 'exit',
-						color: 'cyan',
-						cuIcon: '',
-						
-					}
-				],
-				ul:'/sys/test/toPay',
-				ulr:'/sys/test/notify_url'
-				
-			}
-		},
-		created() {
-			 let avatar=(this.$store.getters.avatar && this.$store.getters.avatar.length > 0)? api.getFileAccessHttpUrl(this.$store.getters.avatar):'/static/avatar_boy.png'
-			this.elements[0].title+=this.$store.getters.realname;
-			this.elements[0].cuIcon=avatar;
-			this.appzf(3);
-			window.setInterval(() => {
-				this.hd();
-			  setTimeout(fun, 0)
-			}, 30000)
-		},
-		methods: {
-			ts:function(){
-				
-				this.appzf(3);
-			},
-			tss:function(){
-	
-				this.appzf(2);
-			},
-			initQrCode:function(s){
-							new qrCode('myQrcode', {
-								text: s,
-								width: 160,
-								height: 160,
-								colorDark: "#333333",
-								colorLight: "#FFFFFF",
-								correctLevel: qrCode.CorrectLevel.H
-							})
-						},
-
-			appzf:function(){
-				var obj="终身vip";
-				var jg="0.01";
-				this.$http.get(this.ul,{params:{subject:obj,money:jg}}).then(res=>{
-					console.log(res)
-					this.initQrCode(res.data.qrCode)
-					
-				}).catch(err => {
-					console.log(err);
-				}); 
-			},
-			hd:function(){
-				this.$http.post(this.ulr,{params:{}}).then(res=>{
-					console.log(res)
-				
-					
-				}).catch(err => {
-					console.log(err);
-				}); 
-			}
-		}
-	}
-</script>
-
-<style>
-	.card{
-		
-		 background-color: #FFFFFF; 
-		width: 150px;
-		height: 200px;
-		border-radius:10px 10px 10px 10px;
-		 border:3px solid  red; 
-		margin-top: 10px;
-		box-shadow:0 4px 8px 0 rgba(255, 255, 255, 0.2),0 6px 20px 0 rgba(255, 255, 255, 0.2);
-		
-		
-	}
-	
-	.tt{
-		margin-left: 20px;
-		margin-top: 70px;
-		width: 200px;
-		height: 200px;
-		background-color: #FFFFFF;
-		border-radius: 5px 5px 5px 5px;
-		border:1px solid  #0081FF;
-	}
-	ul li{
-		list-style-type:none;
-		
-		
-	}
-	
-</style>

+ 2 - 2
pages/user/people.vue

@@ -47,12 +47,12 @@
 		        <text class="text-grey">修改密码</text>
 		      </navigator>
 		    </view>
-		    <view class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.5s'}]">
+		   <!-- <view class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.5s'}]">
 				<navigator class="content"  hover-class="none" @click="dt()">
 				    <text class="cuIcon-forward text-cyan"></text>
 					<text class="text-grey">位置</text>
 				</navigator>
-		    </view>
+		    </view> -->
 			<view class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.7s'}]">
 				<navigator class="content" url="/pages/user/userexit" hover-class="none">
 				    <text class="cuIcon-exit text-cyan"></text>

+ 4 - 2
pages/user/suecss.vue

@@ -34,14 +34,16 @@
 		created() {
 			api.logout().then(res=>{
 				uni.clearStorageSync()
-				 
+				 store.commit('SET_TOKEN',"");
 			})
 		},
 		methods:{
 			
 			log:function(){
 				
-				 window.location.reload(); 
+				 uni.navigateTo({
+				 	url:'/pages/login/login'
+				 }) 
 			}
 		}
 		}

+ 0 - 170
pages/user/userchat.vue

@@ -1,170 +0,0 @@
-<script>
-	import chatInput from '../component/chatinput.vue';
-	import messageShow from '../component/messageshow.vue';
-	export default {
-		data() {
-			return {
-				style: {
-					pageHeight: 0,
-					contentViewHeight: 0,
-					footViewHeight: 90,
-					mitemHeight: 0,
-				},
-				scrollTop: 0,
-				messages: [{
-					user: 'home',
-					type: '', //input,content 
-					content: '你好',
-					date:this.getCurrentTime()
-				}]
-			}
-		},
-		components: {
-			chatInput,
-			messageShow
-		},
-		created: function () { 
-			this.initWebSocket();
-			const res = uni.getSystemInfoSync();
-			this.style.pageHeight = res.windowHeight;
-			this.style.contentViewHeight = res.windowHeight - uni.getSystemInfoSync().screenWidth / 750 * (100); //像素
-		},
-		methods: {
-			getCurrentTime:function(){
-        //获取当前时间并打印
-        var time='';
-      let yy = new Date().getFullYear();
-      let mm = new Date().getMonth()+1;
-      let dd = new Date().getDate();
-      let hh = new Date().getHours();
-      let mf = new Date().getMinutes()<10 ? '0'+new Date().getMinutes() : new Date().getMinutes();
-      let ss = new Date().getSeconds()<10 ? '0'+new Date().getSeconds() : new Date().getSeconds();
-      time = yy+'-'+mm+'-'+dd+' '+hh+':'+mf+':'+ss;
-       return time;
-    },
-			initWebSocket: function () {
-				// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
-				var userId = this.$store.getters.userid;
-				var sessionId=this.$store.getters.sessionId;
-				var url = this.$config.apiUrl.replace("https://","wss://").replace("http://","ws://")+"/websocket/"+userId+"/"+sessionId;
-				console.log('websocket url>>'+url);
-				this.websock = new WebSocket(url);
-				this.websock.onopen = this.websocketOnopen;
-				this.websock.onerror = this.websocketOnerror;
-				this.websock.onmessage = this.websocketOnmessage;
-				this.websock.onclose = this.websocketOnclose;
-				
-			},
-			websocketOnopen: function () {
-				console.log("WebSocket连接成功");
-				//心跳检测重置
-				//this.heartCheck.reset().start();
-			},
-			websocketOnerror: function () {
-				console.log("WebSocket连接发生错误");
-				this.reconnect();
-			},
-			websocketOnmessage: function (e) {
-				console.log("-----接收消息-------",e);
-				this.addMessage('home', e.data, false);
-				this.scrollToBottom();
-				
-					
-				//心跳检测重置
-				//this.heartCheck.reset().start();
-			},
-			websocketOnclose: function (e) {
-				console.log("connection closed (" + e.code + ")");
-				this.reconnect();
-			},
-			websocketSend:function(text) { // 数据发送
-				try {
-				  this.websock.send(text);
-				} catch (err) {
-				  console.log("send failed (" + err.code + ")");
-				}
-			},
-			getInputMessage: function (message) { //获取子组件的输入数据
-				// console.log(message);
-				this.addMessage('customer', message.content, false);
-				this.toRobot(message.content);
-			},
-			addMessage: function (user, content, hasSub, subcontent) {
-				var that = this;
-				that.messages.push({
-					user: user,
-					content: content,
-					date:this.getCurrentTime(),
-					hasSub: hasSub,
-					subcontent: subcontent
-				});
-			},
-			scrollToBottom: function () {
-				var that = this;
-				var query = uni.createSelectorQuery();
-				query.selectAll('.m-item').boundingClientRect();
-				query.select('#scrollview').boundingClientRect();
-
-				query.exec(function (res) {
-					that.style.mitemHeight = 0;
-					res[0].forEach(function (rect) {
-						// console.info(rect.height);
-						that.style.mitemHeight = that.style.mitemHeight + rect.height + 20;
-					});
-
-					if (that.style.mitemHeight > that.style.contentViewHeight) {
-						that.scrollTop = that.style.mitemHeight - that.style.contentViewHeight;
-					}
-				});
-			},
-			toRobot: function (info) {
-				var ToSendUserno=this.$store.getters.chatid;//接收人编号:4567
-				var message=info+"|"+ToSendUserno+"|"+this.$store.getters.userid//将要发送的信息和内容拼起来,以便于服务端知道消息要发给谁
-				this.websocketSend(message)
-				
-			}
-		}
-	}
-</script>
-<template>
-	<div>
-	<cu-custom bgColor="bg-gradual-pink" :isBack="true">
-		<block slot="backText">返回</block>
-		<block slot="content">{{this.$store.getters.chatname}}</block>
-	</cu-custom>
-	<view class="uni-column">
-		<view class="content" id="content" :style="{height:style.contentViewHeight+'px'}">
-			<scroll-view id="scrollview"   scroll-y="true" :style="{height:style.contentViewHeight+'px'}" :scroll-with-animation="true"
-			    :scroll-top="scrollTop">
-				<message-show v-for="(message,index) in messages" :key="index" v-bind:message="message" :id="index"></message-show>
-				<view id="bottom"></view>
-			</scroll-view>
-		</view>
-		<view class="foot">
-			<chat-input @send-message="getInputMessage" ></chat-input>
-		</view>
-	</view>
-	</div>
-</template>
-
-<style>
-	.uni-column {
-		display: flex;
-		flex-direction: column;
-		background-image: url(../../static/bj001.jpeg );
-	}
-	.content {
-
-		display: flex;
-		flex: 1;
-		
-		 
-	}
-	.foot {
-		position: fixed;
-		width: 100%;
-		left: 0px;
-		bottom: 0px;
-		overflow: hidden;
-	}
-</style>

+ 1 - 27
pages/user/userdetail.vue

@@ -122,33 +122,7 @@
 						<text class="text-grey">{{personalMsg.urgentPhone}}</text>
 					</view>
 				</view>
-				<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '1.5s'}]">
-					<view class="content">
-						<text class="text-grey">当前可用年假</text>
-					</view>
-					<view class="action">
-						<text class="text-grey">{{personalMsg.availableDay/24}}天</text>
-					</view>
-				</view>
-				<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '1.6s'}]">
-					<view class="content">
-						<text class="text-grey">当前剩余调休</text>
-					</view>
-					<view class="action">
-						<text class="text-grey">{{personalMsg.leaveDate}}小时</text>
-					</view>
-				</view>
-				<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '1.7s'}]">
-					<view class="content">
-						<text class="text-grey">考勤记录</text>
-					</view>
-					<view class="action">
-						<span style="float: right;" v-if='personalMsg.sum=="2"' @click="sign()">本月无异常</span>
-						 <span style="float: right;color: red;" v-if='personalMsg.sum=="1"' @click="sign()">
-							本月有异常
-						</span>
-					</view>
-				</view>
+				
 			</view>
 
 		</scroll-view>

+ 1 - 6
pages/user/userpwd.vue

@@ -79,14 +79,9 @@
 					 this.$tip.alert("邮箱不能为空");
 					return false;
 				}
-				if (!checkEmail.test(this.name)) {
-					this.$tip.alert('请输入正确的邮箱地址');
-					return false
-				}
-				
 			  this.$http.get(this.userUrl,{params:{email:this.name,type:1}}).then(res=>{
 				  console.log(res)
-			  	if (res.data.msg == "1") {
+			  	if (res.data != "0"&&res.data != 0) {
 			  		this.$tip.success('发送成功!')
 			  		this.times = 60;
 			  		this.show = false

+ 14 - 35
pages/wages/wages.vue

@@ -70,23 +70,22 @@
 			getCode() {
 
 				let checkEmail = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/;
-				/* if (this.name == "" || this.name == null) {
+				 if (this.name == "" || this.name == null) {
 					this.$tip.alert("邮箱不能为空");
 					return false;
 				}
-				if (!checkEmail.test(this.name)) {
+				/*if (!checkEmail.test(this.name)) {
 					this.$tip.alert('请输入正确的邮箱地址');
 					return false
 				} */
 
 				this.$http.get(this.userUrl, {
 					params: {
-						email: this.name,
-						type:0
+						email: this.name
 					}
 				}).then(res => {
 					console.log(res)
-					if (res.data.msg == "1") {
+					if (res.data!="0"&&res.data!=0) {
 						this.$tip.success('发送成功!')
 						this.times = 60;
 						this.show = false
@@ -107,57 +106,37 @@
 
 			},
 			save() {
-				this.$router.push({
-					name: 'wagesdetail'
-				});
-				/* if (this.name == "" || this.name == null) {
+				// this.$router.push({
+				// 	name: 'wagesdetail'
+				// });
+				if (this.name == "" || this.name == null) {
 					this.$tip.alert("邮箱不能为空");
 					return false;
 				}
 				if (this.code == null || this.code == "") {
 					this.$tip.alert("验证码不能为空");
 					return false;
-				} */
+				}
 
-			/* 	this.$http.get(this.emlCode, {
+				this.$http.get(this.emlCode, {
 					params: {
 						email: this.name,
-						code: this.code
+						emailCode: this.code
 					}
 				}).then(res => {
 					console.log(res)
-					if (res.data.msg == "1") {
+					if (res.data == "ok"||res.data ==ok) {
 						this.$router.push({
-							name: 'wagesdetail'
+							name: 'wagesdetails'
 						});
 						
-					} if(res.data.msg == "2") {
-						this.$tip.alert('邮箱或验证码错误!')
 					}else{
-						this.$tip.alert('验证码错误!')
+						this.$tip.alert('邮箱或验证码错误!')
 					}
 
 				}).catch(err => {
 					console.log(err);
 				});
- */
-
-
-				/* if (this.code == this.$store.getters.emilCode) {
-					this.$store.commit('SET_EMILCODE', "");
-					this.$router.push({
-						name: 'wagesdetail'
-					});
-				} else {
-					this.$tip.alert("验证码错误");
-					return false;
-				} */
-
-			},
-			ret() {
-				this.$Router.push({
-					name: 'index'
-				})
 			}
 
 		}

+ 150 - 80
pages/wages/wagesdetails.vue

@@ -1,26 +1,23 @@
 <template>
 	<div>
-	<!-- 	<div class="top" @click="ret()">
-			<div style="width: 10%;height: 5px;"></div>
-			<div style="margin-left: 10px;">
-			<span style="float: left;width: 20px;height: 20px;">
-				<image src="../../static/icon/fanhui3.png" style="width: 18px;height: 18px;"></image>
-			</span>	
-			<div style="margin-top: 5px;">
-			<span style="color: #FFFFFF;">返回</span>
-			</div>
-			</div>
-			<div style="text-align: center;margin-top: -22px;">
-			<span style="color: #FFFFFF;">薪资查询</span>
-			</div>
-		</div> -->
 		<cu-custom bgColor="bg-gradual-pink" :isBack="true">
 			<block slot="backText">返回</block>
 			<block slot="content">薪资查询</block>
 		</cu-custom>
+		<div class='month'>
+			<ul style="list-style-type:none;">
+				<li class='arrow' @click='pickPre(currentYear,currentMonth)'>上个月</li>
+				<li class='year-month'>
+					<span class='choose-year'>{{ currentYear }}年</span>
+					<span class='choose-month'>{{ currentMonth }}月</span>
+				</li>
+				<li class='arrow' @click='pickNext(currentYear,currentMonth)'>下个月</li>
+			</ul>
+			<br>
+		</div>
 		<div v-for='(item,index) in data'>
 		<div style="margin-top: 10px;margin-left: 20px;">
-			<strong style="font-size: 16px;" >{{wagesDate}}</strong>
+			<strong style="font-size: 16px;" >{{currentYear}}年{{ currentMonth }}月</strong>
 			<br>
 			<br>
 			<span style="color: #A3A7B1;">应发:&nbsp{{item.yingfa}}</span>
@@ -56,17 +53,17 @@
 					<div style="width: 10;height: 10px;"></div>
 					</li>
 					<li class="s">
-					<span class="fontColr">奖金提成</span>
+					<span class="fontColr">考勤工资</span>
 						<span style="width: 10px;height: 10px;" class="money"></span>
-					<span class="money">{{item.srBonus}}</span>
+					<span class="money">{{item.kqWages}}</span>
 					<br>
 					<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
 					<div style="width: 10;height: 10px;"></div>
 					</li>
 					<li class="s">
-					<span class="fontColr">补贴</span>	
+					<span class="fontColr">考勤天数</span>	
 					<span style="width: 10px;height: 10px;" class="money"></span>
-					<span class="money">{{item.srSubsidy}}</span>
+					<span class="money">{{item.kqCount}}</span>
 					<br>
 					<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
 					<div style="width: 10;height: 10px;"></div>
@@ -80,37 +77,23 @@
 					<div style="width: 10;height: 10px;"></div>
 					</li>
 					<li class="s">
-					<span class="fontColr">离职补偿金</span>	
-					<span style="width: 10px;height: 10px;" class="money"></span>
-					<span class="money">{{item.srQuit}}</span>
-					<br>
-					<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
-					<div style="width: 10;height: 10px;"></div>
-					</li>
-					<li class="s">
-					<span class="fontColr">固定奖金</span>	
+					<span class="fontColr">加班天数</span>	
 					<span style="width: 10px;height: 10px;" class="money"></span>
-					<span class="money">{{item.srGdBonus}}</span>
+					<span class="money">{{item.jbCount}}</span>
 					<br>
 					<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
 					<div style="width: 10;height: 10px;"></div>
 					</li>
 					<li class="s">
-					<span class="fontColr">年终奖</span>	
+					<span class="fontColr">高温费</span>	
 					<span style="width: 10px;height: 10px;" class="money"></span>
-					<span class="money">{{item.srYearBonus}}</span>
+					<span class="money">{{item.srGwWages}}</span>
 					<br>
 					<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
 					<div style="width: 10;height: 10px;"></div>
 					</li>
-					<li class="s">
-					<span class="fontColr">其他</span>	
-					<span style="width: 10px;height: 10px;" class="money"></span>
-					<span class="money">{{item.srOther}}</span>
-					<br>
-					<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
-					<br>
-					</li>
+					
+					
 				</ul>
 			</div>
 		</div>
@@ -127,7 +110,7 @@
 				<ul>
 					<li class="s">
 					<div style="width: 10;height: 10px;"></div>
-					<span class="fontColr">缺勤扣款</span>	
+					<span class="fontColr">病假扣款</span>	
 					<span style="width: 10px;height: 10px;" class="money"></span>
 					<span style="float: right;">{{item.kkLack}}</span>
 					<br>
@@ -135,13 +118,21 @@
 					<div style="width: 10;height: 10px;"></div>
 					</li>
 					<li class="s">
-					<span class="fontColr">其他扣款</span>	
+					<span class="fontColr">病假天数</span>	
 					<span style="width: 10px;height: 10px;" class="money"></span>
-					<span style="float: right;">{{item.kkOther}}</span>
+					<span style="float: right;">{{item.bjCount}}</span>
 					<br>
 					<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
 					<br>
 					</li>
+					<li class="s">
+					<br>
+					<strong >扣款合计</strong>	
+					<span style="width: 10px;height: 10px;" class="money"></span>
+					<span class="money">{{item.kkOther}}</span>
+					<br>
+					<br>
+					</li>
 				</ul>
 			</div>
 		</div>
@@ -275,43 +266,13 @@
 					<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
 					<div style="width: 10;height: 10px;"></div>
 					</li>
-					<li class="s">
-					<span class="fontColr">奖金税</span>	
-					<span style="width: 10px;height: 10px;" class="money"></span>
-					<span style="float: right;">{{item.sdBonus}}</span>
-					<br>
-					<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
-					<div style="width: 10;height: 10px;"></div>
-					</li>
-					<li class="s">
-					<span class="fontColr">其他</span>	
-					<span style="width: 10px;height: 10px;" class="money"></span>
-					<span style="float: right;">{{item.sdOther}}</span>
-					<br>
-					<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
-					<div style="width: 10;height: 10px;"></div>
-					</li>
+					
 				
 				</ul>
 			</div>
 		</div>
 		<br>
-		<div style="background-color: #FFFFFF;">
-			
-			<div>
-				<ul>
-					<li class="s">
-					<br>
-					<strong >实发工资</strong>	
-					<span style="width: 10px;height: 10px;" class="money"></span>
-					<span class="money">{{item.shifa}}</span>
-					<br>
-					<br>
-					</li>
-					
-				</ul>
-			</div>
-		</div>
+		
 		</div>
 	</div>
 </template>
@@ -322,18 +283,84 @@
 			return {
 				wagesDate:"",
 				data:[],
-				userUrl:'/salary/salaryCard/querySalary'
+				userUrl:'/salary/salaryCard/querySalary',
+				currentMonth: 1,
+				currentYear: 1970,
 			}
 			},
 			created(){
 				this.querywages()
+				this.initData()
 			},
 			methods:{
+				initData: function(cur) {
+					// var leftcount = 0 // 存放剩余数量
+					var date
+					if (cur) {
+						date = new Date(cur)
+					} else {
+						var now = new Date()
+						var d = new Date(this.formatDate(now.getFullYear(), now.getMonth(), 1))
+						d.setDate(35)
+						date = new Date(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
+					}
+					
+					this.currentYear = date.getFullYear()
+					this.currentMonth = date.getMonth() + 1
+					
+					var str = this.formatDate(
+						this.currentYear,
+						this.currentMonth,
+						
+					)
+					
+				},
+				pickPre: function(year, month) {
+					var d = new Date(this.formatDate(year, month, 1))
+					d.setDate(0)
+					this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
+					this.querywages()
+				},
+				
+				pickNext: function(year, month) {
+					var d = new Date(this.formatDate(year, month, 1))
+					var ds=this.formatDate(year, month, null);
+					var nowDate = new Date();
+					var dt=this.formatDate(nowDate.getFullYear(),nowDate.getMonth(),null);
+					
+					if(ds<=dt){
+					d.setDate(35)
+					this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
+					this.querywages()
+					}
+				},
+				
+				// 返回 类似 2016-01-02 格式的字符串
+				formatDate: function(year, month, day) {
+					var y = year
+					var m = month
+					if (m < 10) m = '0' + m
+					var d = day
+					if(day!=null &&day !=""){
+						if (d < 10) d = '0' + d
+						return y + '-' + m + '-' + d
+					}else{
+						return y + '-' + m 
+					}
+					
+					
+				},
 				querywages(){
-					this.$http.get(this.userUrl,{params:{userId:this.$store.getters.userid,date:this.$store.getters.wagesDate}}).then(res=>{
+					var id=this.$store.getters.userid;
+					var deptid=uni.getStorageSync('id');
+					if(deptid!=null&&deptid!=""){
+						id=deptid;
+					}
+					var date=this.formatDate(this.currentYear,this.currentMonth);
+					this.$http.get(this.userUrl,{params:{userId:id,date:date}}).then(res=>{
 						console.log("res",res)
 						 this.data=res.data.data;
-						this.wagesDate=this.formatt(this.data[0].wagesDate);
+						//this.wagesDate=this.formatt(this.data[0].wagesDate);
 						
 					}).catch(err => {
 						console.log(err);
@@ -350,15 +377,58 @@
 					  var currentdate = year +n+ month + seperator1;
 					  return currentdate;
 				},
-				ret(){
-					this.$Router.push({name:'wagesdetail'})
-				}
+				
 			}
 			}
 	
 </script>
 
 <style>
+	.month ul {
+		margin: 0;
+		padding: 0;
+		display: flex;
+		justify-content: space-between;
+		height: 35px;
+	}
+	
+	.year-month {
+		display: flex;
+		align-items: center;
+		justify-content: space-around;
+		margin-top: 10px;
+	}
+	
+	.choose-month {
+		text-align: center;
+		font-size: 12px;
+	}
+	
+	.arrow {
+		padding: 15px;
+		color: #999999;
+	}
+	
+	.month ul li {
+		font-size: 12px;
+		text-transform: uppercase;
+		letter-spacing: 3px;
+	}
+	
+	#calendar {
+		font-size: 12px;
+		width: 100%;
+		margin: 0 auto;
+		box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.1),
+			0 1px 5px 0 rgba(0, 0, 0, 0.12);
+			
+	}
+	
+	.month {
+		width: 100%;
+		color: #333333;
+		
+	}
 	.items{
 		margin-left: 20px;
 		color: #A3A7B1;

+ 62 - 51
pages/wages/wagesuser.vue

@@ -1,19 +1,5 @@
 <template>
 	<div style="background-color: #FFFFFF;">
-		<!-- <div class="top" @click="ret()">
-			<div style="width: 10%;height: 5px;"></div>
-			<div style="margin-left: 10px;">
-			<span style="float: left;width: 20px;height: 20px;">
-				<image src="../../static/icon/fanhui3.png" style="width: 18px;height: 18px;"></image>
-			</span>	
-			<div style="margin-top: 5px;">
-			<span style="color: #FFFFFF;">返回</span>
-			</div>
-			</div>
-			<div style="text-align: center;margin-top: -22px;">
-			<span style="color: #FFFFFF;">工资发放情况</span>
-			</div>
-		</div> -->
 		<cu-custom bgColor="bg-gradual-pink" :isBack="true">
 			<block slot="backText">返回</block>
 			<block slot="content" >工资发放情况</block>
@@ -23,10 +9,22 @@
 			 <input   placeholder="🔍  搜索" style="text-align: center;" v-model="name" />
 		</div>
 		<br>
-		<div>
+		<!-- <div class='month'>
+			<ul style="list-style-type:none;">
+				
+				<li class='arrow' @click='pickPre(currentYear,currentMonth)'>上个月</li>
+				<li class='year-month'>
+					<span class='choose-year'>{{ currentYear }}年</span>
+					<span class='choose-month'>{{ currentMonth }}月</span>
+				</li>
+				<li class='arrow' @click='pickNext(currentYear,currentMonth)'>下个月</li>
+			</ul>
+			<br>
+		</div> -->
+		<!-- <div>
 			<span style="color: #0081FF;margin-left: 20px;font-size: 18px;">工资发放情况</span>
 			<div style="width: 100%;height: 10px;"></div>
-		</div>
+		</div> -->
 		<div style="width: 100%;height: 10px;background-color:#F1F1F1 ;"></div>
 		
 			<view class="cu-list menu  radius" >
@@ -38,43 +36,16 @@
 			     </span>	
 				 </div>
 			     <div style="margin-top: -40px;">
-					  <text style="margin-left: 30%;">{{item.realname}}</text>
+					  <text style="margin-left: 20%;">{{item.realname}}</text>
 				 </div>
 				 <div style="margin-top: -25px;">
-				 				  <text class="text-grey" style="margin-left: 60%;">{{item.orgCodeTxt}}</text>
+				 				  <text class="text-grey" style="margin-left: 40%;">{{item.orgCodeTxt}}</text>
+<!-- 								  				 				  <text class="text-grey" style="margin-left: 10%;color: #0081FF;">8000.00¥</text> -->
 				 </div>
 				 
 			   </navigator>
 			  </view> 
 						</view>
-			<!-- <div style="margin-left: 10px;">
-			<ul>
-				<li class="s" v-for='(item,index) in data'  @click="details(item.id)">
-				<br>
-				<span class="imgs">
-					<image :src="item.avatar" class="imgs"></image>
-				</span>	
-				<div style="margin-left: 50px;margin-top: -40px;">
-					<div>
-						<h3>{{item.realname}}</h3>
-					</div>
-					<div style="margin-top: -27px;margin-left: 80px;">
-					<span style="margin-left: 15%;color: #0081FF;font-size: 15px;">{{item.orgCodeTxt}}</span>
-					<span style="float: right;width: 20px;height: 10px;"></span>
-					
-					</div>
-				</div>
-				<br>
-				<div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
-				
-				</li>
-				
-			</ul>
-			</div> -->
-		
-		
-		
-		
 	</div>
 </template>
 
@@ -83,6 +54,8 @@
 	export default {
 		data() {
 			return {
+				currentMonth: 1,
+				currentYear: 1970,
 				name:'',
 				data:[],
 				userUrl:'/sys/user/querywagesList'
@@ -96,14 +69,52 @@
 				}
 			},
 			created(){
-				
-				this.query()
+				this.initData()
+				this.querys(this.name)
 			},
 			methods:{
-				ss(){
-					this.$Router.push({name:'dome'})
+				initData: function(cur) {
+					// var leftcount = 0 // 存放剩余数量
+					var date
+					if (cur) {
+						date = new Date(cur)
+					} else {
+						var now = new Date()
+						var d = new Date(this.formatDate(now.getFullYear(), now.getMonth(), 1))
+						d.setDate(35)
+						date = new Date(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
+					}
+					
+					this.currentYear = date.getFullYear()
+					this.currentMonth = date.getMonth() + 1
+					
+					var str = this.formatDate(
+						this.currentYear,
+						this.currentMonth,
+						
+					)
+					
+				},
+				pickPre: function(year, month) {
+					var d = new Date(this.formatDate(year, month, 1))
+					d.setDate(0)
+					this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
+					this.querys(this.name);
 				},
 				
+				pickNext: function(year, month) {
+					var d = new Date(this.formatDate(year, month, 1))
+					var ds=this.formatDate(year, month, null);
+					var nowDate = new Date();
+					var dt=this.formatDate(nowDate.getFullYear(),nowDate.getMonth(),null);
+					
+					if(ds<=dt){
+					d.setDate(35)
+					
+					this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1))
+					this.querys(this.name);
+					}
+				},
 				// 返回 类似 2016-01-02 格式的字符串
 				formatDate: function(year, month, day) {
 					var y = year
@@ -146,7 +157,7 @@
 				},
 				querys(s){
 					this.data=[];
-						this.$http.get(this.userUrl,{params:{username:s}}).then(res=>{
+						this.$http.get(this.userUrl,{params:{username:s,depid:this.$store.getters.departId}}).then(res=>{
 							if(res.data.length>0){
 									for(var i=0;i<res.data.length;i++){
 										var s={

BIN
static/avatar_boy.png


BIN
static/avatar_boy2.png


BIN
static/org.png


BIN
static/work.png


+ 22 - 16
store/index.js

@@ -29,26 +29,25 @@ export default new Vuex.Store({
 	emilCode:sessionStorage.getItem('emilCode')||'',//邮箱验证码
 	chatname:sessionStorage.getItem('chatname')||'',//邮箱验证码
 	chatid:sessionStorage.getItem('chatid')||'',
-	user: {
-		home: {
-			id: sessionStorage.getItem('chatid'),
-			name: sessionStorage.getItem('chatname'),
-			img: sessionStorage.getItem('chatimg')
-		},
-		customer: {
-			id: sessionStorage.getItem('userid'),
-			name: sessionStorage.getItem('username'),
-			img: sessionStorage.getItem('avatar')
-		}
-	},
+	perssion:sessionStorage.getItem('perssion')||'',//菜单数据
+	leave:sessionStorage.getItem('leave')||'',//部门假期
+	status:sessionStorage.getItem('status')||'',//人员类别
 	
   },
   mutations: {
+	  SET_STATUS: (state, status) => {
+	  	sessionStorage.setItem('status',status)
+	    state.status = status
+	  },
 	  SET_USERID: (state, userid) => {
 	  	sessionStorage.setItem('userid',userid)
 	    state.userid = userid
 	  },
-	 
+	 SET_LEAVE: (state, leave) => {
+	 	sessionStorage.setItem('leave',leave)
+	   state.leave = leave
+	 },
+	 	 
 	  SET_CHAT: (state, {chatname,chatid,chatimg}) => {
 	  	sessionStorage.setItem('chatname',chatname)
 		sessionStorage.setItem('chatid',chatid)
@@ -118,7 +117,11 @@ export default new Vuex.Store({
 	SET_EMILCODE: (state,emilCode) => {
 		sessionStorage.setItem('emilCode',emilCode)
 	  state.emilCode = emilCode
-	}
+	},
+	SET_PERSSION:(state,perssion) => {
+		sessionStorage.setItem('perssion',perssion)
+	  state.perssion = perssion
+	},
   },
   actions: {
     // 登录
@@ -132,6 +135,7 @@ export default new Vuex.Store({
 			 let avatar=(userInfo.avatar && userInfo.avatar.length > 0)? api.getFileAccessHttpUrl(userInfo.avatar):'/static/avatar_boy.png'
 			uni.setStorageSync(ACCESS_TOKEN,result.token);
 			uni.setStorageSync(USER_INFO,userInfo);
+			commit('SET_PERSSION', result.permission)
             commit('SET_TOKEN', result.token)
 			commit('SET_SESSIONID', result.sessionId)
             commit('SET_AVATAR', avatar)
@@ -208,8 +212,10 @@ export default new Vuex.Store({
 	indexId:state => state.indexId,
 	user:state=>state.user,
 	chatname:state=>state.chatname,
-	chatid:state=>state.chatid
-	
+	chatid:state=>state.chatid,
+	perssion:state=>state.perssion,
+	leave:state=>state.leave,
+	status:state=>state.status
   },