Commit 0cd5fdc5 by xiaohai

stay up

parent 9ca12d8b
<template>
<div class="employee-table">
<el-table
height="495"
@selection-change="selectMember"
@row-click="linkToDetail"
:data="tableData">
<template v-for="prop in headList">
<el-table-column
:key="prop"
v-if="prop == 'selection'"
type="selection"
width="42">
</el-table-column>
<el-table-column
:key="prop"
v-if="prop == 'name'"
label="姓名"
>
<template slot-scope="scope">
<span>{{scope.row.name}}</span>
<span v-if="scope.row.isManager == 1" class="is-manager">部门负责人</span>
</template>
</el-table-column>
<el-table-column
:key="prop"
v-if="prop == 'phoneNumber'"
label="手机号"
prop="phoneNumber"
></el-table-column>
<el-table-column
:key="prop"
v-if="prop == 'positionName'"
label="职位"
prop="positionName"
></el-table-column>
<el-table-column
:key="prop"
v-if="prop == 'activationStatus'"
label="状态"
>
<template slot-scope="scope">
<div class="status-icon" :class="scope.row.activationStatus == 1 ? 'is-active' : ''">
<i class="iconfont icon-shouji"></i>
</div>
</template>
</el-table-column>
</template>
</el-table>
</div>
</template>
<script>
export default {
name: "employee-table",
props: {
employeeList: {
type: Array,
default() {
return [];
}
},
headList: {
type: Array,
default() {
return ["name", "phoneNumber", "positionName", "activationStatus"];
}
}
},
methods: {
/**
* table选择员工
*/
selectMember(selection) {
this.$emit("selectMember", selection);
},
/**
* 跳转至员工详情
*/
linkToDetail(row) {
console.log(row);
window.location.href = "#/employee?employeeClerkId="+row.employeeClerkId;
}
},
computed: {
tableData() {
let arr = [];
this.employeeList.forEach(clerk => {
arr.push(clerk.ext.employeeClerk);
});
return arr;
}
}
};
</script>
<style lang="scss">
.el-table .cell .is-manager {
display: inline-block;
font-size: 10px;
color: #fff;
width:56px;
height:13px;
text-align: center;
line-height: 15px;
background:rgba(247,203,39,1);
border-radius:2px;
}
.el-table tr {
cursor: pointer;
}
</style>
......@@ -4,7 +4,7 @@
<a href="#/storeInfo">
<el-button type="primary">添加门店</el-button>
</a>
<a><el-button>批量导入/导出</el-button></a>
<a :href="'#/storeIo?importCode=store&departmentId='+departmentId+'&showChildMember='+showChildMember*1+'&brandId='+brandId"><el-button>批量导入/导出</el-button></a>
<el-button type="danger" plain @click="delStores" :disabled="disabledDel">批量删除</el-button>
<el-button class="J_show-children" size="small"><el-checkbox class="m-r-10" v-model="showChildMember" @change="setChildMemberShow"></el-checkbox><a class="a-href">显示子成员</a></el-button>
</div>
......@@ -68,6 +68,14 @@ export default {
default() {
return [];
}
},
departmentId: {
type: [String, Number],
default: ""
},
brandId: {
type: [String, Number],
default: ""
}
},
data() {
......
......@@ -75,6 +75,11 @@ export const constantRouterMap = [
component: _import('contacts','addGroup')
},
{
path: '/storeIo',
name: '门店导入/导出',
component: _import('contacts','storeIo')
},
{
path: '/storeInfo',
name: '编辑门店',
component: _import('contacts','storeInfo')
......
......@@ -24,7 +24,7 @@
<a :href="'#/employee?addnew=1&departmentId='+groupInfo.departmentId">
<el-button type="primary">添加成员</el-button>
</a>
<a :href="'#/employeeIo?importCode=employee&departmentId='+groupInfo.departmentId"><el-button>批量导入/导出</el-button></a>
<a :href="'#/employeeIo?importCode=employee&departmentId='+groupInfo.departmentId+'&showChildMember='+showChildMember*1"><el-button>批量导入/导出</el-button></a>
<el-button type="danger" plain @click="delMembers" :disabled="disabledDel">批量删除</el-button>
<el-button class="J_show-children"><el-checkbox class="m-r-10" v-model="showChildMember" @change="setChildMemberShow"></el-checkbox><a class="a-href">显示子成员</a></el-button>
</div>
......
......@@ -44,7 +44,7 @@
<script>
import searchMenu from "components/contacts/searchMenu";
import employeeInfo from "components/contacts/employeeInfo";
import employeeList from "components/contacts/employeeList";
import employeeList from "components/contacts/share/employeeList";
import { getRequest, postRequest, postJsonRequest, postJson } from '@/api/api';
export default {
name: "administrativeEstrutura",
......@@ -206,7 +206,7 @@
let _this = this;
let params = {
sharedContactGroupId: _this.groupInfo.departmentId,
findChildren: _this.showChildMember * 1,
findChildren: _this.showChildMember,
};
// params = JSON.stringify(params);
postJson("/haoban-manage-web/shared-contact/find-shared-member", params)
......
......@@ -45,7 +45,7 @@
</el-radio-group>
</div>
<template v-if="tableView == 1">
<store-view :tableData="storeList" @setChildMemberShow="setChildMemberShow"></store-view>
<store-view :tableData="storeList" @setChildMemberShow="setChildMemberShow" :departmentId="groupInfo.departmentId" :brandId="groupInfo.brandId"></store-view>
</template>
<template v-else>
<clerk-view :tableData="storeList" @setChildMemberShow="setChildMemberShow" @selectByStatus="selectByStatus" @selectByType="selectByType"></clerk-view>
......@@ -283,6 +283,7 @@ export default {
console.log(obj, node, "selection");
this.groupInfo.departmentId = obj.groupId;
this.groupInfo.groupName = obj.name;
this.groupInfo.brandId = obj.brandId
this.showEmployee = showEmployee;
this.groupInfo.hasPression = obj.hasPression;
this.groupInfo.level = obj.level;
......
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