Commit 116f0064 authored by 黄奎's avatar 黄奎

页面修改

parent 1b634083
......@@ -19,7 +19,6 @@ let downloadExcelEasy = {
let data = [tableH];
// 组装表格内容
dataSource.forEach((x,index)=>{
console.log(index);
let obj = [];
obj.push(x.LineName+" ");
obj.push(x.TCNUM);
......@@ -42,21 +41,9 @@ let downloadExcelEasy = {
const ws = XLSX.utils.aoa_to_sheet(data);
ws['!cols'] = wscols;
ws['!rows'] = [];
// colName.forEach((x,index)=>{
// wscols.push({wpx: 100})
// });
// dataSource.forEach((x,index)=>{
// if(index===dataSource.length)
// ws['!rows'].push({ hpx:30 });
// else
// ws['!rows'].push({});
// });
const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, xlsxName);
var dataInfo = wb.Sheets[wb.SheetNames[0]];
console.log(data[0].length);
console.log(colName.length);
// return
data[0].forEach((x,i)=>{
dataInfo[colName[i]+'1'].s={
fill: { fgColor: { rgb: "#ffff00"}},
......@@ -74,12 +61,9 @@ let downloadExcelEasy = {
}
}
});
console.log(dataInfo);
// return
XLSX.writeFile(wb, xlsxName + ".xlsx")
},
countColumn: function (data) {
console.log(data.length)
let list = [];
let col = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
data.forEach((item , index)=> {
......@@ -88,7 +72,6 @@ let downloadExcelEasy = {
}else if (index > 25 && index < 52) {
list.push('A'+col[index-col.length])
}else if (index > 51 && index < 78) {
console.log(index-(col.length*2));
list.push('B'+col[index-(col.length*2)])
}
});
......
......@@ -191,11 +191,10 @@ var lunarCalendar = {
return { isLeap, year, lunarmonth, lunarDay };
},
/**
* 传入阳历年月日获得详细的公历、农历object信息 <=>Array
* 传入阳历年月日获得详细的公历、农历object信息 lunarCalendar.initLunar(1987,11)<=>Array
* @param y solar year
* @param m solar month
* @return Array
* @eg:console.log(lunarCalendar.initLunar(1987,11));
*/
initLunar: function (yearStr, monthStr, dayNum) {
//年份限定、上限
......
......@@ -365,11 +365,9 @@ export default {
this.loading = true;
this.apipost("line_post_GetLineEmployeeList",this.msg, res => {
if (res.data.resultCode == 1) {
this.loading = false;
this.loading = false;
this.DataList = res.data.data.pageData;
this.total=res.data.data.count;
console.log("this.DataList",this.DataList)
}else{
this.Error(res.data.message)
}
......
......@@ -151,7 +151,6 @@
this.Loading = false;
if (res.data.resultCode == 1) {
this.DataList = res.data.data.HotelOrderListReport;
console.log("this.DataList",this.DataList)
} else {
this.Error(res.data.message);
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -449,84 +449,12 @@
handleExceed(file, fileList) {
this.$message.warning('一次最多选择5个文件!')
return
//console.log(files[0])
// let Md5Arr=[]
// let fileArr=[]
// let that=this
// let path="/Upload/Temporary/"
// for(let i=0;i<files.length;i++){
//
// if(files[i].size>1024*1024*100){
// this.$message.warning('文件大小不能超过100M!')
// return
// }
//
// browserMD5File(files[i], function (err, md5) {
// Md5Arr.push(md5);
// if(Md5Arr.length==files.length){
// that.apipost('user_cloud_ValidataMD5Sign',{md5Sign:Md5Arr},res=>{
// if(res.data.resultCode == 1) {
// res.data.data.forEach((item,index)=>{
// files[index].md5Sign=item.md5Sign
// files[index].Status=item.Status
// })
// //console.log(files)
// for (let i=0;i<files.length;i++) {
// console.log(files[i])
// that.uploadFile(path,files[i],x=>{
// console.log(x.res)
// })
// }
//
// }else{}
// },err=>{})
// }
//
// });
// }
// this.apipost('user_cloud_ValidataMD5Sign',{md5Sign:Md5Arr},res=>{
// if(res.data.resultCode == 1) {
// console.log(res.data)
// }else{}
// },err=>{})
// },
// getFileMd5(files){
// let Md5Arr=[]
// let _string=''
// console.log(typeof Md5Arr)
// for(let i=0;i<files.length;i++){
// let lsOk = false
// browserMD5File(files[i], function (err, md5) {
// _string+='md5'+','
// lsOk =true;
// console.log(1)
// });
//
// }
// console.log(Md5Arr)
// return Md5Arr
// },
//
// validataMd5Sign(Md5Arr){
// let jsonMsg={md5Sign:[_arr]}
// this.apipost('user_cloud_ValidataMD5Sign',jsonMsg,res=>{
// if(res.data.resultCode == 1) {
// console.log(res.data)
// }else{}
// },err=>{})
},
uploadFileBtn(file) { //上传
//console.log(fileList)
if(file.file.size > 1024 * 1024 * 100) {
this.$message.warning('文件大小不能超过100M!')
return
}
// browserMD5File(file.file, function (err, md5) {
// console.log(md5);
// });
let that = this
let newArr = [];
newArr.push(file.file)
......@@ -542,7 +470,6 @@
FileSize: fileSize,
FolderId: this.msg.ParentId
})
//console.log(this.saveMsg);
that.apipost('user_cloud_SaveFile', this.saveMsg, res => {
if(res.data.resultCode == 1) {
this.$message.success(res.data.message);
......@@ -556,25 +483,17 @@
});
},
dowloadSingle() {
//console.log(this.notFileList)
let objKey = [];
this.list.forEach(item => {
if(item.DataType == 2) {
for(let i = 0; i < this.notFileList.length; i++) {
if(this.notFileList[i] == item.Id) {
//objKey.push(item.FilePath);
let reg = /^http(s)?:\/\/(.*?)\//
this.downloadFileRename(item.FilePath.replace(reg,''),item.FolderName);
}
}
}
})
// console.log(objKey)
// return
// objKey.forEach(item => {
// this.downloadFile(item)
// })
// return
},
downloadOne(obj){
if(obj.DataType==0){
......@@ -685,7 +604,6 @@
let fileList = []
let notFileList = []
let confirmMsg = ''
console.log(obj)
if(obj.DataType == 0) { //文件夹
fileList.push(obj.Id)
confirmMsg = '删除文件夹后,分享和子文件将被删除,是否删除?'
......@@ -750,7 +668,6 @@
}, err => {})
},
openShareOneDialog(obj) {
console.log(obj)
if(obj.DataType==0){
this.fileList=[]
this.notFileList=[]
......@@ -803,12 +720,10 @@
},
getDepartment() { //部门
this.apipost('app_get_GetCompanyDepartmentListTree', {}, res => {
console.log(res.data.data)
this.departmentList = res.data.data
}, err => {})
},
DepartmentListNodeChange(data,checked){
//console.log(data)
if(checked){
this.ckdDepartmentList.push({name:data.DepartmentName,id:data.DepartmentId})
this.ckdDepartmentListId.push(data.DepartmentId)
......@@ -831,7 +746,6 @@
getRole() { //岗位
this.apipost('WorkFlow_get_GetCompanyDepartMentPost', {}, res => {
this.roleList = res.data.data
//console.log(this.roleList)
}, err => {})
},
roleListNodeChange(data,checked){
......@@ -852,18 +766,15 @@
this.ckdRoleList.splice(this.ckdRoleList.findIndex(item => item.id === id), 1)
this.ckdRoleListId.splice(this.ckdRoleListId.findIndex(item => item === id), 1)
//删除相同id
console.log(this.ckdRoleListId)
this.$refs.treeRole.setCheckedKeys(this.ckdRoleListId);
},
getMenber() { //员工
this.apipost('WorkFlow_get_GetCompanyDepartMentEmployee', {}, res => {
this.menberList = res.data.data
console.log(this.menberList)
}, err => {})
},
MenberListNodeChange(data,checked){
console.log(data)
if(data.Type == 2 &&checked){
this.ckdMenberList.push({name:data.DepartmentName,id:data.DepartmentId})
this.ckdMenberListId.push(data.DepartmentId)
......@@ -936,7 +847,6 @@
this.msg.FolderName = this.srearchKey ;
this.apipost('user_cloud_GetFolderList', this.msg, res => {
if(res.data.resultCode == 1) {
console.log(res.data.data.data)
this.list = res.data.data.data
this.NavigationList = res.data.data.Navigation
this.isCkedAll = false
......@@ -952,10 +862,6 @@
}
if(item.DataType == 2) {
this.WjId.push(item.Id)
// let fileType=item.FolderName.substring(item.FolderName.lastIndexOf('.')+1,item.FolderName.length).toUpperCase()
// if('GIF|JPG|JPEG|PNG|BMP'.indexOf(fileType)!=-1){
// this.picObj.push(item.FilePath)
// }
let fileType=item.FolderName.substring(item.FolderName.lastIndexOf('.')+1,item.FolderName.length).toLowerCase()
item.icons=this.loadFileICON(fileType)
}
......@@ -973,7 +879,6 @@
this.apipost('user_cloud_GetFolderTreeList', {}, res => {
if(res.data.resultCode == 1) {
this.fileTreeList = res.data.data
console.log(res.data.data)
} else {}
}, err => {})
},
......
......@@ -196,9 +196,7 @@
if(res.data.resultCode==1){
this.list=res.data.data.pageData;
this.total=res.data.data.count;
//console.log(this.list)
this.loading=false
this.loading=false
}else{}
},err=>{})
},
......
......@@ -149,13 +149,11 @@
getCompany() {
this.apipost('admin_get_BranchGetList', this.getCompanyMsg, res => {
if (res.data.resultCode == 1) {
//console.log(res.data.data)
if (this.outerVisible) {
this.layerCompanyList = res.data.data;
} else {
this.companyList = res.data.data;
}
//console.log(this.layerCompanyList)
} else {
}
}, err => {
......@@ -169,7 +167,6 @@
} else {
this.departMentList = res.data.data;
}
//console.log(this.departMentList)
} else {
}
}, err => {
......@@ -182,7 +179,6 @@
this.DataList = res.data.data.pageData
this.total = res.data.data.count
this.loading = false
// console.log(this.DataList)
} else {
}
}, err => {
......@@ -198,11 +194,8 @@
} else {
this.$message.error(res.data.message)
}
}, err => {
console.log(err)
})
},
updateData(index, id) {
this.addMsg.PostId = id
......
......@@ -340,7 +340,6 @@
}, res => {
if(res.data.resultCode == 1) {
this.loading=false;
console.log(res.data.data.askList)
this.askListType = res.data.data.TemplateType
this.TemplateTypeName = res.data.data.TemplateTypeName
this.askList = res.data.data.askList
......@@ -373,7 +372,6 @@
this.apipost('WorkFlow_get_GetDepartMentEmployee', {}, res => {
if(res.data.resultCode == 1) {
this.userList = res.data.data
//console.log(_this.$refs.treeUser.setCheckedKeys)
_this.$refs.treeUser.setCheckedKeys(_arr);
}
}, err => {})
......@@ -414,12 +412,9 @@
this.dialogTitle = '选择岗位';
this.apipost('WorkFlow_get_GetDepartMentPost', {}, res => {
this.roleList = res.data.data
//console.log(this.roleList)
}, err => {})
},
handleNodeChange1(data, checked) {
//myAuditUserList
//console.log(data)
data.IsCheck = checked;
if(data.Type == 2 && data.IsCheck) { //是员工且选中
let isExsit = false
......@@ -458,10 +453,8 @@
}
}
}
// console.log(this.myAuditUserList1)
},
handleNodeChange(data, checked) {
// console.log(data)
data.IsCheck = checked;
if(data.Type == 2 && data.IsCheck) { //是员工且选中
let isExsit = false
......@@ -499,10 +492,8 @@
}
}
}
//console.log(this.memberSetCheckedKeys)
},
mySetCheckedKeys(id) {
//console.log(this.memberSetCheckedKeys)
if(this.memberSetCheckedKeys.length == 0)
return
if(id == -1) {
......@@ -518,29 +509,22 @@
},
checkedRole(data, checked) {
data.IsCheck = checked;
//console.log(data.Disabled,checked)
//this.$refs.treeRole.setCheckedKeys([]);
if(data.Disabled == false && data.IsCheck) {
this.showRole = [];
//this.$refs.treeRole.setCheckedKeys([data.DepartmentId]);
this.showRole.push({
DepartmentName: data.DepartmentName,
Id: data.DepartmentId
})
console.log(this.showRole)
}
},
deleteItem(sort) {
//console.log(sort)
this.myAuditList.splice(this.myAuditList.findIndex(item => item.Sort === sort), 1)
//console.log(this.myAuditList)
},
getItemValue(obj, index) {
this.addBtn = false;
this.updateItemIndex = index;
this.updateItem = obj;
console.log(obj)
this.showLayer();
this.approvalType = obj.AuditType;
if(obj.AuditType == 1) {
......@@ -557,12 +541,9 @@
})
this.memberSetCheckedKeys.push(item.EmployeeId)
})
//this.$refs.tree.setCheckedKeys(this.memberSetCheckedKeys);
}
if(obj.AuditType == 3) {
this.zgObj.AuditWay = obj.AuditWay;
//console.log(this.showRole)
this.showRole = [];
this.showRole.push({
DepartmentName: obj.AuditDescription
......@@ -571,8 +552,6 @@
},
saveUpdateNode() {
// this.myAuditList.splice(this.updateItemIndex,1)
//console.log(this.updateItem)
let zg = {}
if(this.approvalType == 1) {
zg.AuditType = 1;
......@@ -590,7 +569,6 @@
zg.AuditDescription = '直接主管'
}
this.myAuditList[this.updateItemIndex] = zg;
//this.myAuditList.push(zg);
}
if(this.approvalType == 2) { //指定成员
let Au = this.showMember;
......@@ -621,7 +599,6 @@
return
}
this.myAuditList[this.updateItemIndex] = zg;
//console.log(zg.AuditUserList)
}
if(this.approvalType == 3) { //岗位
zg.AuditType = 3;
......@@ -637,14 +614,11 @@
}
this.myAuditList[this.updateItemIndex] = zg;
}
// console.log(this.myAuditList)
this.closeLayer()
},
deleteRole() {
this.showRole = [];
//this.showRole.length=0;
//this.showRole=null;
},
changeValue(value) {
this.tempChosenId = value
......@@ -700,7 +674,6 @@
}
this.myAuditList.push(zg);
console.log(zg.AuditUserList)
}
if(this.approvalType == 3) { //岗位
zg.AuditType = 3;
......@@ -752,7 +725,6 @@
this.addMsg.AuditUserList = this.myAuditUserList;
this.ConditionSortList = [],
this.addMsg.AskforleaveType = '[' + this.AskforleaveTypeArr.toString() + ']'
console.log(this.addMsg)
this.loading = true;
this.apipost('WorkFlow_post_SetOtherCondition', this.addMsg, res => {
if(res.data.resultCode == 1) {
......
......@@ -358,7 +358,6 @@
this.apipost('WorkFlow_get_GetDepartMentEmployee', {}, res => {
if(res.data.resultCode == 1) {
this.userList = res.data.data
//console.log(_this.$refs.treeUser.setCheckedKeys)
_this.$refs.treeUser.setCheckedKeys(_arr);
}
}, err => {})
......@@ -399,7 +398,6 @@
this.askList = res.data.data.aftList;
this.askListType = res.data.data.TemplateType
this.addMsg.Sort = res.data.data.Sort
// console.log(this.askListType)
let _arr = res.data.data.AskforleaveType.substring(1, res.data.data.AskforleaveType.length - 1).split(",")
let _arr1 = []
_arr.forEach(item => {
......@@ -421,13 +419,9 @@
this.myAuditList = res.data.data.AuditList
this.myAuditUserList = res.data.data.AuditUserList
this.myAuditUserList1 = JSON.parse(JSON.stringify(this.myAuditUserList))
//console.log(this.myAuditUserList1)
this.myAuditUserList1.forEach(item => {
this.sysUserKeys.push(item.EmployeeId)
})
// console.log(this.sysUserKeys)
// this.myAuditUserList1= res.data.data.AuditUserList
} else {}
}, error => {})
},
......@@ -443,12 +437,9 @@
this.dialogTitle = '选择岗位';
this.apipost('WorkFlow_get_GetDepartMentPost', {}, res => {
this.roleList = res.data.data
//console.log(this.roleList)
}, err => {})
},
handleNodeChange1(data, checked) {
//myAuditUserList
//console.log(data)
data.IsCheck = checked;
if(data.Type == 2 && data.IsCheck) { //是员工且选中
let isExsit = false
......@@ -487,10 +478,8 @@
}
}
}
// console.log(this.myAuditUserList1)
},
handleNodeChange(data, checked) {
// console.log(data)
data.IsCheck = checked;
if(data.Type == 2 && data.IsCheck) { //是员工且选中
let isExsit = false
......@@ -528,10 +517,8 @@
}
}
}
//console.log(this.memberSetCheckedKeys)
},
mySetCheckedKeys(id) {
//console.log(this.memberSetCheckedKeys)
if(this.memberSetCheckedKeys.length == 0)
return
if(id == -1) {
......@@ -547,29 +534,21 @@
},
checkedRole(data, checked) {
data.IsCheck = checked;
//console.log(data.Disabled,checked)
//this.$refs.treeRole.setCheckedKeys([]);
if(data.Disabled == false && data.IsCheck) {
this.showRole = [];
//this.$refs.treeRole.setCheckedKeys([data.DepartmentId]);
this.showRole.push({
DepartmentName: data.DepartmentName,
Id: data.DepartmentId
})
//console.log(this.showRole)
}
},
deleteItem(sort) {
//console.log(sort)
this.myAuditList.splice(this.myAuditList.findIndex(item => item.Sort === sort), 1)
//console.log(this.myAuditList)
},
getItemValue(obj, index) {
this.addBtn = false;
this.updateItemIndex = index;
this.updateItem = obj;
console.log(obj)
this.showLayer();
this.approvalType = obj.AuditType;
if(obj.AuditType == 1) {
......@@ -586,12 +565,9 @@
})
this.memberSetCheckedKeys.push(item.EmployeeId)
})
//this.$refs.tree.setCheckedKeys(this.memberSetCheckedKeys);
}
if(obj.AuditType == 3) {
this.zgObj.AuditWay = obj.AuditWay;
//console.log(this.showRole)
this.showRole = [];
this.showRole.push({
DepartmentName: obj.AuditDescription
......@@ -600,8 +576,6 @@
},
saveUpdateNode() {
// this.myAuditList.splice(this.updateItemIndex,1)
//console.log(this.updateItem)
let zg = {}
if(this.approvalType == 1) {
zg.AuditType = 1;
......@@ -650,7 +624,6 @@
return
}
this.myAuditList[this.updateItemIndex] = zg;
//console.log(zg.AuditUserList)
}
if(this.approvalType == 3) { //岗位
zg.AuditType = 3;
......@@ -666,14 +639,12 @@
}
this.myAuditList[this.updateItemIndex] = zg;
}
// console.log(this.myAuditList)
this.closeLayer()
},
deleteRole() {
this.showRole = [];
//this.showRole.length=0;
//this.showRole=null;
},
changeValue(value) {
this.tempChosenId = value
......@@ -729,7 +700,6 @@
}
this.myAuditList.push(zg);
console.log(zg.AuditUserList)
}
if(this.approvalType == 3) { //岗位
zg.AuditType = 3;
......@@ -779,7 +749,6 @@
this.addMsg.AuditUserList = this.myAuditUserList;
this.ConditionSortList = [],
this.addMsg.AskforleaveType = '[' + this.AskforleaveTypeArr.toString() + ']'
console.log(this.addMsg)
this.loading = true;
this.apipost('WorkFlow_post_SetOtherCondition', this.addMsg, res => {
if(res.data.resultCode == 1) {
......
......@@ -64,7 +64,6 @@ export default {
},
methods: {
getList(obj) {
console.log("地图返回结果:", obj);
this.isdisable = true;
this.dataList.lat = obj.lat;
this.dataList.lng = obj.lng;
......
......@@ -243,9 +243,7 @@ export default{
google.maps.event.addListener(_this.map, 'click', function (event) { // 地图点击事件 获取经纬度
geocoder.geocode({ 'location': event.latLng }, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
console.log(results[0].geometry.location.lat(), results[0].geometry.location.lng());
} else {
console.log("对不起没有找到相关的地理位置信息,请点击地图上的准确位置,进行定位!");
}
});
});
......
......@@ -1459,10 +1459,7 @@ export default {
let x = this.sysMsgList[i];
if (x.IMID === item.to) {
if (x.unread != item.unread) {
// console.log(x)
// console.log(item)
tempCount = 1;
// this.refreshSysNoteDate()
}
x.unread = item.unread;
x.lastMsgShow = item.lastMsg.text;
......@@ -1522,7 +1519,6 @@ export default {
item.updateTimeShow = util.formatDate(item.updateTime, true);
}
if (item.unread > 0) {
// console.log(item)
if (this.unReadMsgId.indexOf(item.lastMsg.idServer) == -1) {
if (!this.isFirst) {
this.msgGet(item);
......@@ -1534,18 +1530,10 @@ export default {
this.enterChat(item)
}
}
// else if(this.currentSession.id && item.lastMsg.sessionId==this.currentSession.id){
// if(item.lastMsg.tip && item.lastMsg.tip=='抖了一下'){
// this.dou()
// }
// }
// console.log(item.lastMsg)
return item;
});
this.hasNewMsg = tempCount;
this.isFirstLoad = false;
// this.allSsionList = JSON.parse(JSON.stringify(sessionlist));
return sessionlist;
},
sessionId() {
......@@ -1636,7 +1624,6 @@ export default {
}
};
document.addEventListener(visibilityChangeEvent, onVisibilityChange);
// console.log('initIM',this.firstMenuList.indexOf('IM'))
if(!localStorage.menu){
this.$store.dispatch("connect");
}else{
......@@ -1759,7 +1746,6 @@ export default {
msg,
res => {
if (res.data.resultCode == 1) {
// console.log('res.data.datares.data.datares.data.data',res)
this.NewSaleRnkInfo = res.data.data
let New = this.NewSaleRnkInfo.StartDateMonth + this.NewSaleRnkInfo.StartDateDay
let arr = localStorage.saleRnkInfo ? JSON.parse(localStorage.saleRnkInfo) : []
......@@ -1898,7 +1884,6 @@ export default {
let t=0;
let c=0;
this.douTimer = setInterval(()=>{
// console.log('come in ..........')
if(t==0)
this.$refs.resizeBox._data.top=y+2
if(t==2)
......@@ -1923,7 +1908,6 @@ export default {
}
},
LogSetReadStatus(s) {
console.log(s)
this.apipost(
"SystemLog_post_LogSetReadStatus",
{ LogId: s.ID },
......@@ -1971,7 +1955,6 @@ export default {
);
if (add) {
this.msgList.push(x);
// console.log(this.msgList)
}
});
if (!add) {
......@@ -3763,7 +3746,6 @@ export default {
}
});
n.onshow = function() {
//console.log("通知显示了!");
};
n.onclick = function(e) {
//可以直接通过实例的方式获取data内自定义的数据
......@@ -3775,10 +3757,8 @@ export default {
n.close();
};
n.onclose = function() {
//console.log("用户点击关闭");
};
n.onerror = function(err) {
//console.log("出错了,小伙子在检查一下吧");
throw err;
};
setTimeout(() => {
......
<style>
.per_title{font-size: 14px; color: #333; border-left: 3px solid #E95252; height: 14px; line-height: 14px; margin: 40px 0; padding-left: 15px;}
.mentTable{background: #BCBCBC; width: 100%; font-size: 14px; }
.mentTable td{background: #fff; height: 30px;}
.per_first_menu{overflow: hidden;}
.per_first_menu li{float: left; margin-right: 30px; position: relative; cursor: pointer; background: #fff; color: #999; width: 80px; font-size: 12px; height: 60px; padding: 10px 0; border-radius: 4px; text-align: center;}
.per_first_menu li.FirsrMenuCked{background: #E95252; color: #f1f1f1;}
.per_first_menu li i{font-size: 30px; line-height: 35px;}
.per_detail_menu{width: 100%; height: 300px; padding: 20px; margin: 40px 0; background: #fff; border-radius: 8px;}
.per_secondMenu{height: auto; overflow: hidden; margin-bottom: 20px;}
.per_secondMenu li{float: left; height: 24px; font-size:12px; cursor: pointer; padding: 0 30px; position: relative;}
.per_secondMenu li>div{width: 0; height: 3px; background: #F26262; margin: 5px auto 0;}
.per_secondMenu li:hover>div{width: 17px; transition: width .3s;}
.per_secondMenu li.per_secondLevelCked>div{width: 17px;}
.per_secondMenu li .liSplit{ height: 12px; width: 1px; background: #DCDFE6; position: absolute; right: 0; top: 2px;}
.per_thirdMenu li{float: left; margin: 0 50px 50px 0; width: 80px; cursor: pointer; height: 85px; padding:15px 10px 0; position: relative; font-size: 12px; color: #666; text-align: center; border-radius: 4px; background: #EBEBEB;}
.per_thirdMenu li i{position: absolute; bottom: 10px; right: 10px; font-size: 20px;}
.per_SaveBtn{float: right; margin-top: 50px; margin-left: 15px;}
.per_thirdMenu li.thirdLevelMenuCked{background: #E95252; color: #f1f1f1;}
.per_firstLevelCkbox{position: absolute!important;right:3px; top: 0;}
.per_thirdLevelAllCked{float: right;}
.per_title {
font-size: 14px;
color: #333;
border-left: 3px solid #E95252;
height: 14px;
line-height: 14px;
margin: 40px 0;
padding-left: 15px;
}
.mentTable {
background: #BCBCBC;
width: 100%;
font-size: 14px;
}
.mentTable td {
background: #fff;
height: 30px;
}
.per_first_menu {
overflow: hidden;
}
.per_first_menu li {
float: left;
margin-right: 30px;
position: relative;
cursor: pointer;
background: #fff;
color: #999;
width: 80px;
font-size: 12px;
height: 60px;
padding: 10px 0;
border-radius: 4px;
text-align: center;
}
.per_first_menu li.FirsrMenuCked {
background: #E95252;
color: #f1f1f1;
}
.per_first_menu li i {
font-size: 30px;
line-height: 35px;
}
.per_detail_menu {
width: 100%;
height: 300px;
padding: 20px;
margin: 40px 0;
background: #fff;
border-radius: 8px;
}
.per_secondMenu {
height: auto;
overflow: hidden;
margin-bottom: 20px;
}
.per_secondMenu li {
float: left;
height: 24px;
font-size: 12px;
cursor: pointer;
padding: 0 30px;
position: relative;
}
.per_secondMenu li>div {
width: 0;
height: 3px;
background: #F26262;
margin: 5px auto 0;
}
.per_secondMenu li:hover>div {
width: 17px;
transition: width .3s;
}
.per_secondMenu li.per_secondLevelCked>div {
width: 17px;
}
.per_secondMenu li .liSplit {
height: 12px;
width: 1px;
background: #DCDFE6;
position: absolute;
right: 0;
top: 2px;
}
.per_thirdMenu li {
float: left;
margin: 0 50px 50px 0;
width: 80px;
cursor: pointer;
height: 85px;
padding: 15px 10px 0;
position: relative;
font-size: 12px;
color: #666;
text-align: center;
border-radius: 4px;
background: #EBEBEB;
}
.per_thirdMenu li i {
position: absolute;
bottom: 10px;
right: 10px;
font-size: 20px;
}
.per_SaveBtn {
float: right;
margin-top: 50px;
margin-left: 15px;
}
.per_thirdMenu li.thirdLevelMenuCked {
background: #E95252;
color: #f1f1f1;
}
.per_firstLevelCkbox {
position: absolute !important;
right: 3px;
top: 0;
}
.per_thirdLevelAllCked {
float: right;
}
</style>
<template>
<div>
<div class="per_title">权限设置</div>
<div class="per_first_menu">
<ul>
<li v-model="item.IsShow" v-for="(item,index) in MenuList" @click="getSecondLevelMenu(index)" :class="{FirsrMenuCked:index==firstLevel}" >
<i :class="[fontPub,item.icon]"></i><br/>{{item.MenuName}}
<el-checkbox :indeterminate="item.choseParent" class="per_firstLevelCkbox" type="checkbox" :value="item.IsShow" v-model="item.IsShow"
@change="firstCheckAll" v-bind:checked="item.IsShow" ></el-checkbox>
</li>
<input type="button" value="保存" class="normalBtn per_SaveBtn" @click="updateMenu()"/>
<!-- <input type="button" value="返回" class="hollowFixedBtn per_SaveBtn" @click="goback"/>-->
</ul>
</div>
<div class="per_detail_menu">
<div class="per_secondMenu" v-if="MenuList.length>0 && MenuList[firstLevel].ChildMenu!=null">
<li v-model="item.IsShow" :class="{per_secondLevelCked:index==secondLevel}" v-for="(item,index) in MenuList[firstLevel].ChildMenu" @click="getThirdLevelMenu(index)">{{item.MenuName}}<div></div><span class="liSplit"></span></li>
<el-checkbox class='per_thirdLevelAllCked' @change='checkedAll($event)' v-model='secondChkAllState'>全选</el-checkbox>
</div>
<div class="per_thirdMenu" v-if="MenuList.length>0 && MenuList[firstLevel].ChildMenu!=null">
<li v-model="item.IsShow" @click="thirdLevelMenuCked(item)" :class="{thirdLevelMenuCked:item.IsShow}" v-for="(item,index) in MenuList[firstLevel].ChildMenu[secondLevel].ChildMenu">{{item.MenuName}}<i :class="[fontPub,item.icon]"></i></li>
</div>
</div>
<div class="per_title">功能管理</div>
<div class="per_first_menu">
<ul>
<li v-model="item.IsShow" v-for="(item,index) in actionList" @click="item.IsShow = !item.IsShow;" >
<i :class="[fontPub,item.icon]"></i><br/>{{item.ActionName}}
<el-checkbox class="per_firstLevelCkbox" type="checkbox" :value="item.IsShow" v-model="item.IsShow"
v-bind:checked="item.IsShow" ></el-checkbox>
</li>
<input type="button" value="保存" class="normalBtn per_SaveBtn" @click="saveAction()"/>
</ul>
</div>
</div>
<div>
<div class="per_title">权限设置</div>
<div class="per_first_menu">
<ul>
<li v-model="item.IsShow" v-for="(item,index) in MenuList" @click="getSecondLevelMenu(index)"
:class="{FirsrMenuCked:index==firstLevel}">
<i :class="[fontPub,item.icon]"></i><br />{{item.MenuName}}
<el-checkbox :indeterminate="item.choseParent" class="per_firstLevelCkbox" type="checkbox"
:value="item.IsShow" v-model="item.IsShow" @change="firstCheckAll" v-bind:checked="item.IsShow">
</el-checkbox>
</li>
<input type="button" value="保存" class="normalBtn per_SaveBtn" @click="updateMenu()" />
<!-- <input type="button" value="返回" class="hollowFixedBtn per_SaveBtn" @click="goback"/>-->
</ul>
</div>
<div class="per_detail_menu">
<div class="per_secondMenu" v-if="MenuList.length>0 && MenuList[firstLevel].ChildMenu!=null">
<li v-model="item.IsShow" :class="{per_secondLevelCked:index==secondLevel}"
v-for="(item,index) in MenuList[firstLevel].ChildMenu" @click="getThirdLevelMenu(index)">{{item.MenuName}}
<div></div><span class="liSplit"></span></li>
<el-checkbox class='per_thirdLevelAllCked' @change='checkedAll($event)' v-model='secondChkAllState'>全选
</el-checkbox>
</div>
<div class="per_thirdMenu" v-if="MenuList.length>0 && MenuList[firstLevel].ChildMenu!=null">
<li v-model="item.IsShow" @click="thirdLevelMenuCked(item)" :class="{thirdLevelMenuCked:item.IsShow}"
v-for="(item,index) in MenuList[firstLevel].ChildMenu[secondLevel].ChildMenu">{{item.MenuName}}<i
:class="[fontPub,item.icon]"></i></li>
</div>
</div>
<div class="per_title">功能管理</div>
<div class="per_first_menu">
<ul>
<li v-model="item.IsShow" v-for="(item,index) in actionList" @click="item.IsShow = !item.IsShow;">
<i :class="[fontPub,item.icon]"></i><br />{{item.ActionName}}
<el-checkbox class="per_firstLevelCkbox" type="checkbox" :value="item.IsShow" v-model="item.IsShow"
v-bind:checked="item.IsShow"></el-checkbox>
</li>
<input type="button" value="保存" class="normalBtn per_SaveBtn" @click="saveAction()" />
</ul>
</div>
</div>
</template>
<script>
export default {
data() {
return {
fontPub:'iconfont',
MenuList:[],
thirdLevelMenu:[],
msg:{
VersionsId:0
},
updateMsg:{
VersionsId:0,
Permission:[],
},
firstLevel:0,
secondLevel:0,
secondChkAllState:false,
//功能菜单
actionList:[],
}
},
mounted() {
this.updateMsg.VersionsId=this.msg.VersionsId = this.$route.query.id
let sysId=this.$route.query.sysId
this.getMenu();
this.getActionMenu();
},
methods: {
getActionMenu() {
this.apipost("admin_get_GetVersionsPermissionAction", this.updateMsg, res => {
if(res.data.resultCode == 1) {
//console.log(res.data.data)
let tempList=res.data.data;
this.actionList = tempList;
}else{}
}, err => {})
},
getMenu() {
this.apipost("admin_get_GetVersionsPermission", this.updateMsg, res => {
if(res.data.resultCode == 1) {
//console.log(res.data.data)
let tempList=res.data.data
tempList.forEach(x=>{
if(x.ParentId==0){
let menuStyle=JSON.parse(x.MenuStyle)
x.icon=menuStyle.icon
x.color=menuStyle.color
x.choseParent=false
this.initParentChk(x)
this.MenuList.push(x)
//console.log(x)
}
})
//console.log(this.MenuList)
}else{}
}, err => {})
},
updateMenu() {
this.MenuList.forEach(x=>{
//console.log(x.IsShow)
})
this.updateMsg.Permission=[]
this.getCkdId(this.MenuList);
// console.log(this.updateMsg.Permission)
// return;
this.apipost("admin_post_UpdateVersionsPermission", this.updateMsg, res => {
//console.log(res.data)
if(res.data.resultCode == 1) {
this.$message.success('保存成功!')
//console.log(this.updateMsg.Permission)
}else{
this.$message.error('保存失败!')
}
}, err => {})
},
//保存功能管理
saveAction() {
this.updateMsg.Permission=[]
this.getCkdActionId(this.actionList);
this.apipost("admin_post_UpdateVersionsPermissionAction", this.updateMsg, res => {
if(res.data.resultCode == 1) {
this.$message.success('保存成功!')
}else{
this.$message.error('保存失败!')
}
}, err => {})
},
getSecondLevelMenu(index){
// this.MenuList[this.firstLevel].ChildMenu.forEach(item=>{
// item.secondChoseParent=false;
// })
this.firstLevel=index;
this.secondLevel=0;
this.threeChange();
this.getThirdLevelMenu(0);
},
getThirdLevelMenu(index){ //三级菜单
this.secondLevel=index;
this.MenuList[this.firstLevel].ChildMenu[index].ChildMenu.forEach(x=>{
let menuStyle=JSON.parse(x.MenuStyle)
x.icon=menuStyle.icon
x.color=menuStyle.color
this.thirdLevelMenu.push(x)
})
this.threeChange()
console.log(this.thirdLevelMenu)
},
thirdLevelMenuCked(item){
item.IsShow=!item.IsShow
this.threeChange()
},
firstCheckAll(){
this.MenuList[this.firstLevel].ChildMenu.forEach(x=>{
x.IsShow=this.MenuList[this.firstLevel].IsShow
x.ChildMenu.forEach((item,index)=>{
item.IsShow=x.IsShow
})
})
this.MenuList[this.firstLevel].choseParent=false
this.threeChange()
},
checkedAll(){
let thirdMenuLength=this.MenuList[this.firstLevel].ChildMenu[this.secondLevel].ChildMenu.length;
let chkNo=0;
this.MenuList[this.firstLevel].ChildMenu[this.secondLevel].ChildMenu.forEach((item)=>{
if(item.IsShow==true)
chkNo++
})
if(chkNo==thirdMenuLength){
this.MenuList[this.firstLevel].ChildMenu[this.secondLevel].ChildMenu.forEach((item)=>{
item.IsShow=false
})
}else{
this.MenuList[this.firstLevel].ChildMenu[this.secondLevel].ChildMenu.forEach((item)=>{
item.IsShow=true
})
}
this.threeChange()
},
threeChange(){
let chkCount=0
let count=0
this.MenuList[this.firstLevel].ChildMenu.forEach((x,i)=>{
let secondCheckCount=0
x.ChildMenu.forEach((item,index)=>{
count++
if(item.IsShow){
chkCount++
secondCheckCount++
}
})
if(this.secondLevel==i){
if(x.ChildMenu.length>0){
console.log(x.ChildMenu.length==secondCheckCount)
this.secondChkAllState=x.ChildMenu.length==secondCheckCount
} else
this.secondChkAllState=false
}
x.IsShow=secondCheckCount>0
})
this.MenuList[this.firstLevel].IsShow=chkCount>0
this.MenuList[this.firstLevel].choseParent=chkCount>0&&chkCount<count
},
initParentChk(p){
console.log(p)
if(!p.ChildMenu || p.ChildMenu.length==0||p.ChildMenu)
return
let chkCount=0
let count=0
p.ChildMenu.forEach(x=>{
x.ChildMenu.forEach((item,index)=>{
count++
if(item.IsShow){
chkCount++
}
})
})
p.choseParent=chkCount>0&&chkCount<count
p.IsShow=chkCount>0
},
getCkdId(array){
array.forEach(x=>{
//console.log(x.IsShow)
if(x.IsShow==1||x.IsShow==true){
this.updateMsg.Permission.push(x.MenuId)
if(x.ChildMenu){
this.getCkdId(x.ChildMenu)
}
}
})
},
//过滤获取功能管理id
getCkdActionId(array){
array.forEach(x=>{
if(x.IsShow==1||x.IsShow==true){
this.updateMsg.Permission.push(x.Id);
}
})
},
goback(){
history.back(-1)
}
}
}
</script>
export default {
data() {
return {
fontPub: 'iconfont',
MenuList: [],
thirdLevelMenu: [],
msg: {
VersionsId: 0
},
updateMsg: {
VersionsId: 0,
Permission: [],
},
firstLevel: 0,
secondLevel: 0,
secondChkAllState: false,
//功能菜单
actionList: [],
}
},
mounted() {
this.updateMsg.VersionsId = this.msg.VersionsId = this.$route.query.id
let sysId = this.$route.query.sysId
this.getMenu();
this.getActionMenu();
},
methods: {
getActionMenu() {
this.apipost("admin_get_GetVersionsPermissionAction", this.updateMsg, res => {
if (res.data.resultCode == 1) {
let tempList = res.data.data;
this.actionList = tempList;
} else {}
}, err => {})
},
getMenu() {
this.apipost("admin_get_GetVersionsPermission", this.updateMsg, res => {
if (res.data.resultCode == 1) {
let tempList = res.data.data
tempList.forEach(x => {
if (x.ParentId == 0) {
let menuStyle = JSON.parse(x.MenuStyle)
x.icon = menuStyle.icon
x.color = menuStyle.color
x.choseParent = false
this.initParentChk(x)
this.MenuList.push(x)
}
})
} else {}
}, err => {})
},
updateMenu() {
this.MenuList.forEach(x => {})
this.updateMsg.Permission = []
this.getCkdId(this.MenuList);
this.apipost("admin_post_UpdateVersionsPermission", this.updateMsg, res => {
if (res.data.resultCode == 1) {
this.$message.success('保存成功!')
} else {
this.$message.error('保存失败!')
}
}, err => {})
},
//保存功能管理
saveAction() {
this.updateMsg.Permission = []
this.getCkdActionId(this.actionList);
this.apipost("admin_post_UpdateVersionsPermissionAction", this.updateMsg, res => {
if (res.data.resultCode == 1) {
this.$message.success('保存成功!')
} else {
this.$message.error('保存失败!')
}
}, err => {})
},
getSecondLevelMenu(index) {
this.firstLevel = index;
this.secondLevel = 0;
this.threeChange();
this.getThirdLevelMenu(0);
},
getThirdLevelMenu(index) { //三级菜单
this.secondLevel = index;
this.MenuList[this.firstLevel].ChildMenu[index].ChildMenu.forEach(x => {
let menuStyle = JSON.parse(x.MenuStyle)
x.icon = menuStyle.icon
x.color = menuStyle.color
this.thirdLevelMenu.push(x)
})
this.threeChange()
},
thirdLevelMenuCked(item) {
item.IsShow = !item.IsShow
this.threeChange()
},
firstCheckAll() {
this.MenuList[this.firstLevel].ChildMenu.forEach(x => {
x.IsShow = this.MenuList[this.firstLevel].IsShow
x.ChildMenu.forEach((item, index) => {
item.IsShow = x.IsShow
})
})
this.MenuList[this.firstLevel].choseParent = false
this.threeChange()
},
checkedAll() {
let thirdMenuLength = this.MenuList[this.firstLevel].ChildMenu[this.secondLevel].ChildMenu.length;
let chkNo = 0;
this.MenuList[this.firstLevel].ChildMenu[this.secondLevel].ChildMenu.forEach((item) => {
if (item.IsShow == true)
chkNo++
})
if (chkNo == thirdMenuLength) {
this.MenuList[this.firstLevel].ChildMenu[this.secondLevel].ChildMenu.forEach((item) => {
item.IsShow = false
})
} else {
this.MenuList[this.firstLevel].ChildMenu[this.secondLevel].ChildMenu.forEach((item) => {
item.IsShow = true
})
}
this.threeChange()
},
threeChange() {
let chkCount = 0
let count = 0
this.MenuList[this.firstLevel].ChildMenu.forEach((x, i) => {
let secondCheckCount = 0
x.ChildMenu.forEach((item, index) => {
count++
if (item.IsShow) {
chkCount++
secondCheckCount++
}
})
if (this.secondLevel == i) {
if (x.ChildMenu.length > 0) {
this.secondChkAllState = x.ChildMenu.length == secondCheckCount
} else
this.secondChkAllState = false
}
x.IsShow = secondCheckCount > 0
})
this.MenuList[this.firstLevel].IsShow = chkCount > 0
this.MenuList[this.firstLevel].choseParent = chkCount > 0 && chkCount < count
},
initParentChk(p) {
if (!p.ChildMenu || p.ChildMenu.length == 0 || p.ChildMenu)
return
let chkCount = 0
let count = 0
p.ChildMenu.forEach(x => {
x.ChildMenu.forEach((item, index) => {
count++
if (item.IsShow) {
chkCount++
}
})
})
p.choseParent = chkCount > 0 && chkCount < count
p.IsShow = chkCount > 0
},
getCkdId(array) {
array.forEach(x => {
if (x.IsShow == 1 || x.IsShow == true) {
this.updateMsg.Permission.push(x.MenuId)
if (x.ChildMenu) {
this.getCkdId(x.ChildMenu)
}
}
})
},
//过滤获取功能管理id
getCkdActionId(array) {
array.forEach(x => {
if (x.IsShow == 1 || x.IsShow == true) {
this.updateMsg.Permission.push(x.Id);
}
})
},
goback() {
history.back(-1)
}
}
}
</script>
......@@ -98,17 +98,14 @@ export function sendChatroomFileMsg ({state, commit}, obj) {
type,
fileInput,
uploadprogress: function (data) {
// console.log(data.percentageText)
},
uploaderror: function () {
console && console.log('上传失败')
},
uploaddone: function (error, file) {
// console.log(error);
// console.log(file);
},
beforesend: function (msg) {
// console && console.log('正在发送消息, id=', msg);
},
done: function (error, msg) {
onSendMsgDone(error, msg)
......
......@@ -9,7 +9,6 @@ import store from '../'
import {onChatroomMsgs} from './chatroomMsgs'
// let sdkPath = '@/sdk/' + config.sdk
// console.log(sdkPath)
// const SDK = require(sdkPath)
// 切换聊天室之前需要断开连接,原因是移动端不断累积连接实例,消息并发较大时会有性能问题
......
......@@ -182,17 +182,16 @@ export function sendFileMsg ({state, commit}, obj) {
type,
fileInput,
uploadprogress: function (data) {
// console.log(data.percentageText)
},
uploaderror: function () {
console && console.log('上传失败')
},
uploaddone: function (error, file) {
// console.log(error);
// console.log(file);
},
beforesend: function (msg) {
// console && console.log('正在发送消息, id=', msg);
},
done: function (error, msg) {
onSendMsgDone(error, msg)
......@@ -218,17 +217,16 @@ export function sendDataUrlMsg ({state, commit}, obj) {
dataURL: dataURL,
custom: JSON.stringify(otherMsg),
uploadprogress: function (data) {
// console.log(data.percentageText)
},
uploaderror: function () {
console && console.log('上传失败')
},
uploaddone: function (error, file) {
// console.log(error);
// console.log(file);
},
beforesend: function (msg) {
// console && console.log('正在发送消息, id=', msg);
},
done: function (error, msg) {
onSendMsgDone(error, msg)
......@@ -282,10 +280,8 @@ export function sendRobotMsg ({state, commit}, obj) {
// 发送消息已读回执
export function sendMsgReceipt ({state, commit}) {
//console.log('in..................................')
// 如果有当前会话
let currSessionId = store.state.currSessionId
//console.log(currSessionId)
if (currSessionId) {
// 只有点对点消息才发已读回执
if (util.parseSession(currSessionId).scene === 'p2p') {
......
......@@ -25,14 +25,12 @@ function updateSessionAccount (sessions) {
// onSessions只在初始化完成后回调
export function onSessions (sessions) {
updateSessionAccount(sessions)
console.log("执行了...")
store.commit('updateSessions', sessions)
}
export function onUpdateSession (session) {
let sessions = [session]
updateSessionAccount(sessions)
//console.log(session)
store.commit('updateSessions', sessions)
}
......@@ -97,7 +95,6 @@ export function resetCurrSession ({state, commit}) {
if(!nim){
return;
}
console.log('重置了..................')
nim.resetCurrSession()
commit('updateCurrSessionMsgs', {
type: 'destroy'
......
......@@ -51,12 +51,10 @@ export function onDismissTeam(obj) {
}
export function onUpdateTeam(team) {
console.log('in.............')
onTeams(team)
}
export function onTeamNotificationMsg({state, commit}, msg) {
// console.log('aaaaaaaaaaa')
if (msg.attach.type === 'updateTeam' && msg.attach.team) {
store.commit('updateTeamInfo', msg.attach.team)
}
......
......@@ -213,7 +213,6 @@ export default {
let lastMsgIndex = tempMsgs.length - 1
for (let i = lastMsgIndex; i >= 0; i--) {
let currMsg = tempMsgs[i]
console.log(idClient, currMsg.idClient, currMsg.text)
if (idClient === currMsg.idClient) {
state.msgs[sessionId].splice(i, 1, msg)
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment