mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
优化界面工作展示完成
This commit is contained in:
parent
f99192f48b
commit
41935748dc
@ -3,28 +3,50 @@
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div class="row">
|
||||
<div class="col-md-4 border-right">
|
||||
<div class="col-md-4 border-right padding-0">
|
||||
<div class="text-center">公司信息</div>
|
||||
<div>青海开机公司</div>
|
||||
<div>青海开机公司</div>
|
||||
<div>青海开机公司</div>
|
||||
<div>青海开机公司</div>
|
||||
<div>青海开机公司</div>
|
||||
<div>青海开机公司</div>
|
||||
|
||||
<div>青海开机公司</div>
|
||||
<div>青海开机公司</div>
|
||||
<div>青海开机公司</div>
|
||||
<div>青海开机公司</div>
|
||||
<div>青海开机公司</div>
|
||||
<div class=" staff padding padding-top-xs">
|
||||
<div class=" padding overflow-hidden"
|
||||
:class="{'select':selectStaffInfo.curCompanyId == item.orgId}"
|
||||
v-for="(item,index) in selectStaffInfo.companys" @click="_changeCompany(item)">
|
||||
<span>
|
||||
<i class="fa fa-building-o margin-right-xs" aria-hidden="true"></i>
|
||||
{{item.orgName}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 border-right">
|
||||
<div class="col-md-4 border-right padding-0">
|
||||
<div class="text-center">部门信息</div>
|
||||
<div class="padding-left staff padding padding-top-xs">
|
||||
<div class=" padding overflow-hidden"
|
||||
:class="{'select':selectStaffInfo.curDepartmentId == item.orgId}"
|
||||
v-for="(item,index) in selectStaffInfo.departments" @click="_changeDepartment(item)">
|
||||
<span>
|
||||
<i class="fa fa-sitemap margin-right-xs" aria-hidden="true"></i>
|
||||
{{item.orgName}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-4 padding-0">
|
||||
<div class="text-center">员工信息</div>
|
||||
<div class="padding-left staff padding padding-top-xs">
|
||||
<div class=" padding overflow-hidden"
|
||||
:class="{'select':selectStaffInfo.curStaffId == item.staffId}"
|
||||
v-for="(item,index) in selectStaffInfo.staffs"
|
||||
@click="_changeStaff(item)"
|
||||
>
|
||||
<span>
|
||||
<i class="fa fa-user margin-right-xs" aria-hidden="true"></i>
|
||||
{{item.name}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
(function (vc) {
|
||||
|
||||
var default_row = 50;
|
||||
vc.extends({
|
||||
data: {
|
||||
selectStaffInfo: {
|
||||
@ -8,37 +8,52 @@
|
||||
describle: '',
|
||||
companys: [],
|
||||
departments: [],
|
||||
staffs: []
|
||||
staffs: [],
|
||||
curCompanyId: '',
|
||||
curDepartmentId: '',
|
||||
curStaffId: '',
|
||||
curStaffName: '',
|
||||
staff: {}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
$that._initSelectStaffInfo();
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('selectStaff','openStaff',function(){
|
||||
vc.on('selectStaff', 'openStaff', function (_staff) {
|
||||
//查询公司信息
|
||||
$that._initOrg(2, '');
|
||||
$('#selectStaffModel').modal('show');
|
||||
})
|
||||
$that.staff = _staff;
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
_initSelectStaffInfo: function () {
|
||||
$('.dropdown li a').click(function () {
|
||||
console.log(this);
|
||||
title = $(this).attr("data-title");
|
||||
id = $(this).attr("data-index");
|
||||
$("#select-title").text(title);
|
||||
$("#category_id").val(id);
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
_changeCompany: function (_e) {
|
||||
console.log(_e);
|
||||
_changeCompany: function (item) {
|
||||
$that.selectStaffInfo.curCompanyId = item.orgId;
|
||||
//查询部门
|
||||
$that._initOrg(3, $that.selectStaffInfo.curCompanyId);
|
||||
},
|
||||
_initOrg:function(_orgLevel,_parentOrgId){
|
||||
_changeDepartment: function (item) {
|
||||
$that.selectStaffInfo.curDepartmentId = item.orgId;
|
||||
//查询部门
|
||||
$that.loadStaff();
|
||||
},
|
||||
_changeStaff: function (item) {
|
||||
console.log('selectStaff',item);
|
||||
$that.staff.staffId = item.userId;
|
||||
$that.staff.staffName = item.userName;
|
||||
$('#selectStaffModel').modal('hide');
|
||||
},
|
||||
_initOrg: function (_orgLevel, _parentOrgId) {
|
||||
var param = {
|
||||
params: {
|
||||
page:1,
|
||||
row:100,
|
||||
page: 1,
|
||||
row: 100,
|
||||
orgLevel: _orgLevel,
|
||||
parentOrgId: _parentOrgId
|
||||
}
|
||||
@ -50,19 +65,60 @@
|
||||
param,
|
||||
function (json, res) {
|
||||
var _orgManageInfo = JSON.parse(json);
|
||||
if(_orgLevel == 1){
|
||||
if (_orgLevel == 2) {
|
||||
$that.selectStaffInfo.companys = _orgManageInfo.orgs;
|
||||
}else if(_orgLevel == 2){
|
||||
if (_orgManageInfo.orgs.length < 1) {
|
||||
return;
|
||||
}
|
||||
$that.selectStaffInfo.curCompanyId = _orgManageInfo.orgs[0].orgId
|
||||
//查询部门
|
||||
$that._initOrg(3, $that.selectStaffInfo.curCompanyId);
|
||||
} else if (_orgLevel == 3) {
|
||||
$that.selectStaffInfo.departments = _orgManageInfo.orgs;
|
||||
}else{
|
||||
if (_orgManageInfo.orgs.length < 1) {
|
||||
return;
|
||||
}
|
||||
$that.selectStaffInfo.curDepartmentId = _orgManageInfo.orgs[0].orgId
|
||||
//查询部门
|
||||
$that.loadStaff();
|
||||
} else {
|
||||
$that.selectStaffInfo.staffs = _orgManageInfo.orgs;
|
||||
}
|
||||
|
||||
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
loadStaff: function () {
|
||||
var param = {
|
||||
params: {
|
||||
page: 1,
|
||||
rows: default_row,
|
||||
row: default_row,
|
||||
orgId: $that.selectStaffInfo.curDepartmentId
|
||||
}
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.get('staff',
|
||||
'loadData',
|
||||
param,
|
||||
function (json) {
|
||||
var _staffInfo = JSON.parse(json);
|
||||
$that.selectStaffInfo.staffs = _staffInfo.staffs;
|
||||
|
||||
if (_staffInfo.staffs.length < 1) {
|
||||
return;
|
||||
}
|
||||
$that.selectStaffInfo.curStaffId = _staffInfo.staffs[0].orgId
|
||||
}, function () {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@ -1747,5 +1747,50 @@ table.table-mail tr td {
|
||||
border-left:1px solid #e7eaec;
|
||||
}
|
||||
|
||||
.select{
|
||||
color: #1ab394;
|
||||
}
|
||||
|
||||
.overflow-hidden{
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.staff{
|
||||
overflow-y:auto;
|
||||
height:400px
|
||||
}
|
||||
|
||||
.staff div span{
|
||||
cursor: pointer;
|
||||
background: #ffffff;
|
||||
transition-duration: 0.5s;
|
||||
}
|
||||
.staff div span:hover{
|
||||
font-size: 20px;
|
||||
color: #1ab394;
|
||||
}
|
||||
|
||||
|
||||
.staff::-webkit-scrollbar {/*滚动条整体样式*/
|
||||
width: 4px; /*高宽分别对应横竖滚动条的尺寸*/
|
||||
height: 4px;
|
||||
}
|
||||
.staff::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
||||
background: rgba(0,0,0,0.2);
|
||||
}
|
||||
.staff::-webkit-scrollbar-track {/*滚动条里面轨道*/
|
||||
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
||||
border-radius: 0;
|
||||
background: rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.staff div{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -34,8 +34,8 @@
|
||||
<label class="col-form-label">第{{index+1}}步</label>
|
||||
</div>
|
||||
<div >
|
||||
<a id="dLabel" role="button" class="btn btn-white" data-target="#" href="javascript:;" @click="chooseStaff()">
|
||||
<span id="select-title">选择员工</span> <span class="caret"></span>
|
||||
<a id="dLabel" role="button" class="btn btn-white" data-target="#" href="javascript:;" @click="chooseStaff(item)">
|
||||
<span id="select-title">{{item.staffId == '' ? '选择员工':item.staffName}}</span> <span class="caret"></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="margin-left" @click="chooseType(item)">
|
||||
@ -66,8 +66,8 @@
|
||||
<label class="col-form-label"></label>
|
||||
</div>
|
||||
<div>
|
||||
<a id="dLabel" role="button" class="btn btn-white" data-target="#" href="javascript:;" @click="chooseStaff()">
|
||||
<span id="select-title">选择员工</span> <span class="caret"></span>
|
||||
<a id="dLabel" role="button" class="btn btn-white" data-target="#" href="javascript:;" @click="chooseStaff(subItem)">
|
||||
<span id="select-title">{{subItem.staffId == '' ? '选择员工':subItem.staffName}}</span> <span class="caret"></span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@ -157,8 +157,9 @@
|
||||
}
|
||||
$that.workflowSettingInfo.steps.push(_step);
|
||||
},
|
||||
chooseStaff: function () {
|
||||
vc.emit('selectStaff','openStaff',{})
|
||||
chooseStaff: function (item) {
|
||||
console.log(item);
|
||||
vc.emit('selectStaff','openStaff',item);
|
||||
},
|
||||
_goBack: function () {
|
||||
vc.getBack();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user