Commit f304d288 by cwq0219

员工

1 parent 767e3003
<!-- 配置管理 -->
<template>
<div class="config-employee">
<div class="config-employee config-config">
<div class="container">
<div class="MsgWrap powerlimt">
<span class="content-title">功能权限</span>
<span class="content-title">产品功能权限</span>
<div class="powerTreeWrap">
<div class="mainTitleWrap">
......@@ -144,11 +144,11 @@ export default {
.config-employee {
margin-bottom: 64px;
}
.config-employee .container {
.config-employee.config-config .container {
margin-top: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
padding: 0 20px;
.content-title {
display: inline-block;
position: relative;
......@@ -158,13 +158,13 @@ export default {
font-weight: 600;
color: #333333;
line-height: 48px;
padding-left: 20px;
// padding-left: 20px;
}
.powerlimt {
padding-bottom: 30px;
.powerTreeWrap {
background-color: #f4f6fc;
margin: 0 20px;
// margin: 0 20px;
border-radius: 4px;
min-height: 300px;
padding-top: 2px;
......@@ -200,6 +200,7 @@ export default {
background-color: #f4f6fc;
height: 40px;
width: 180px;
font-size: 14px;
line-height: 40px;
text-align: center;
border-radius: 2px;
......
<!-- 基本信息 -->
<template>
<div class="config-employee">
<div class="container">
<p class="edit-sub-title p-rl-20">员工基本信息</p>
<el-form label-width="140px" :inline="true">
<el-form-item class="basic-info" v-for="(item, index) in detailFormData" :key="index" :label="item.label + ':'">
<span class="txt-ellipsis" style="display: inline-block; width: 100%;" :title="info[item.name] || '-'">{{ info[item.name] || '-' }}</span>
<div class="config-employee config-info">
<div class="container edit-box">
<p class="edit-title">员工基本信息</p>
<el-form label-width="140px" :inline="true" style="margin: 32px 0 12px;">
<el-form-item class="basic-info" isEdit="true" v-for="(item, index) in detailFormData" :key="index" :label="item.label + ':'">
<span class="txt-ellipsis" style="display: inline-block; width: 100%; height: 28px;" :title="info[item.name] || '-'">{{ info[item.name] || '-' }}</span>
</el-form-item>
</el-form>
</div>
<div class="container">
<p class="edit-sub-title p-rl-20">可见下级商户</p>
<div class="container edit-box">
<p class="edit-title">可见下级商户</p>
<div class="config-mer-name">
<p class="txt-ellipsis" v-for="(item, index) in info.visibleInferiorMerName.split(',')" :key="index" :title="item">{{info.merchantName.indexOf(item) != -1 ? `${item}(本商户)` : item}}</p>
</div>
......@@ -84,10 +84,10 @@ export default {
margin-top: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
/* padding: 20px; */
}
.config-employee .p-rl-20 {
padding: 0 20px;
.config-employee .edit-box.container {
padding: 0 0 20px;
}
.config-employee .flex {
display: flex;
......@@ -114,12 +114,13 @@ export default {
}
.config-employee .edit-title {
font-size: 20px;
font-weight: bold;
color: #333333;
line-height: 38px;
height: 38px;
font-size: 16px;
font-weight: 600;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #e7eaec;
margin: 0 0;
padding: 0 20px;
}
.config-employee .edit-sub-title {
......@@ -147,7 +148,7 @@ export default {
.config-employee .config-mer-name {
font-size: 14px;
line-height: 20px;
margin: 21px 0 0 140px;
margin: 32px 0 0 140px;
min-height: 36px;
}
.config-employee .txt-ellipsis {
......@@ -159,8 +160,16 @@ export default {
.config-employee .basic-info {
margin-bottom: 0;
width: 48%;
height: 22px;
line-height: 22px;
margin-bottom: 24px;
}
.config-employee .basic-info .el-form-item__content {
width: calc(100% - 140px);
}
.config-info .el-form--inline .el-form-item__label,
.config-info .basic-info .el-form-item__content {
height: 22px;
line-height: 22px;
}
</style>
......@@ -2,7 +2,7 @@
<template>
<div class="config-employee">
<div class="container">
<p class="edit-sub-title p-rl-20">修改记录</p>
<!-- <p class="edit-sub-title p-rl-20">修改记录</p> -->
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<template slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">查看</el-button>
......@@ -136,25 +136,6 @@ export default {
display: flex;
justify-content: space-between;
}
.config-employee .edit-title {
font-size: 20px;
font-weight: bold;
color: #333333;
line-height: 38px;
height: 38px;
margin: 0 0;
}
.config-employee .edit-sub-title {
height: 48px;
line-height: 48px;
font-size: 16px;
color: #333333;
font-weight: 600;
border-bottom: 1px solid #e7eaec;
margin: 0 0;
}
.config-employee .filter-tree {
width: 360px;
max-height: 200px;
......
......@@ -56,7 +56,7 @@ export default {
}
}
</script>
<style scoped>
<style>
.config-employee {
margin-bottom: 64px;
}
......@@ -92,25 +92,6 @@ export default {
display: flex;
justify-content: space-between;
}
.config-employee .edit-title {
font-size: 20px;
font-weight: bold;
color: #333333;
line-height: 38px;
height: 38px;
margin: 0 0;
}
.config-employee .edit-sub-title {
height: 48px;
line-height: 48px;
font-size: 16px;
color: #333333;
font-weight: 600;
border-bottom: 1px solid #e7eaec;
margin: 0 0;
}
.config-employee .filter-tree {
width: 360px;
max-height: 200px;
......@@ -124,4 +105,14 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
}
.config-employee .el-tabs__header {
margin-bottom: 0;
}
.config-employee .el-tabs__nav-wrap:after {
opacity: 0;
}
.config-employee .el-tabs__item {
height: 20px !important;
line-height: 10px !important;
}
</style>
<template>
<div class="config-employee">
<div class="container" style="margin-top: 0">
<!-- <div class="container" style="margin-top: 0">
<p class="edit-title">{{ title }}</p>
</div>
<div class="container">
<p class="edit-sub-title p-rl-20">员工基本信息</p>
</div> -->
<div class="container edit-box">
<p class="edit-title">员工基本信息</p>
<glsx-combi-form
class="p-tr-20"
style="margin: 20px 20px 0 0;"
ref="editFormRef"
labelWidth="160px"
defaultWidth="320px"
@handleImgDelete="handleImgDelete"
:isBlock="isBlock"
:formRef="editChildRef"
:formObj="editForm"
:formData="editFormData"
:formRules="editRule"
isEdit="true"
>
<template slot="merchantId" slot-scope="item">
<span
......@@ -38,7 +39,7 @@
:value="subItem[item.scope.optionId]"
></el-option>
</el-select>
<!-- <select-page v-else :form="editForm" width="360" :targetItem="item.scope" @handleChange="handleChangeMerchant"></select-page> -->
<!-- <select-page v-else :form="editForm" width="320" :targetItem="item.scope" @handleChange="handleChangeMerchant"></select-page> -->
</template>
<template v-if="routeInfo.addOrEdit == 2" slot="passwordSlot">
<el-button class="m-l-10" type="primary" @click="handleResetPass">重置密码</el-button>
......@@ -49,7 +50,7 @@
</template>
<template slot="visibleInferiorMer" slot-scope="item">
<el-input
:style="{ width: item.width || '360px' }"
:style="{ width: item.width || '320px' }"
placeholder="可见商户"
v-model="filterText"
></el-input>
......@@ -73,7 +74,7 @@
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" @click="handleConfirm">确定</el-button>
<el-button type="primary" @click="handleCancel">取消</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
</div>
</div>
</template>
......@@ -158,7 +159,7 @@ export default {
name: 'merchantId',
// nameLabel: 'merchantName',
noClearable: true,
width: '360px',
width: '320px',
optionList: [],
optionId: 'id',
optionLabel: 'merchantName',
......@@ -168,14 +169,12 @@ export default {
{
label: '员工姓名',
name: 'staffName',
width: '360px',
type: 'input',
maxlength: 15
},
{
label: '登录手机号',
name: 'staffPhone',
width: '360px',
type: 'input',
placeholder: '请输入您有效的手机号作为登录账户',
maxlength: 11
......@@ -184,7 +183,6 @@ export default {
label: '登录密码',
name: 'password',
showPass: true,
width: '360px',
type: 'input',
maxlength: 15,
suffixSlot: 'passwordSlot'
......@@ -198,7 +196,6 @@ export default {
label: '角色权限',
name: 'roleIds',
type: 'select',
width: '360px',
optionList: [],
optionId: 'id',
optionLabel: 'roleName',
......@@ -228,14 +225,12 @@ export default {
{
label: '邮箱',
name: 'staffEmail',
width: '360px',
type: 'input',
maxlength: 30
},
{
label: '主要职务',
name: 'staffJob',
width: '360px',
type: 'input',
maxlength: 10
}
......@@ -455,10 +450,10 @@ export default {
margin-top: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
/* padding: 20px; */
}
.config-employee .p-rl-20 {
padding: 0 20px;
.config-employee .edit-box.container {
padding: 0 0 20px;
}
.config-employee .p-tr-20 {
padding: 20px 20px 0;
......@@ -489,15 +484,16 @@ export default {
}
.config-employee .edit-title {
font-size: 20px;
font-weight: bold;
color: #333333;
line-height: 38px;
height: 38px;
font-size: 16px;
font-weight: 600;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #e7eaec;
margin: 0 0;
padding: 0 20px;
}
.config-employee .edit-sub-title {
/* .config-employee .edit-sub-title {
height: 48px;
line-height: 48px;
font-size: 16px;
......@@ -505,9 +501,9 @@ export default {
font-weight: 600;
border-bottom: 1px solid #e7eaec;
margin: 0 0;
}
} */
.config-employee .filter-tree {
width: 360px;
width: 320px;
max-height: 200px;
overflow: scroll;
}
......
......@@ -3,17 +3,20 @@
<div class="glsx-combi-form">
<el-form :ref="formRef" :inline="true" :model="formObj" :label-width="labelWidth" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :class="{ 'no-label': !item.label, isBlock: isBlock }" :label="item.label ? item.label + ':' : ''" :prop="item.name">
<el-form-item v-if="!item.isHide" :key="index" :labelWidth="isEdit ? '144px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px': '30px', ...item.style }" :label="item.label" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
<span class="tips-icon"></span>
</el-tooltip>
{{ item.label ? ':' : '' }}
{{ item.label }}
</span>
<span v-else-if="!item.isHide && item.label" slot="label">
<span class="combi-form-label" :style="{ width: item.labelWidth ? (item.labelWidth + labelPaddingRight) + 'px' : '', 'padding-right': isEdit ? '12px' : (labelPaddingRight + 'px') }">{{ item.label }}</span>
</span>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
<div v-else-if="item.type === 'input'">
<el-input :placeholder="item.placeholder || '请输入' + item.label" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :style="{ width: item.width || 'auto' }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)"></el-input>
<el-input :placeholder="item.placeholder || '请输入' + item.label" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)"></el-input>
<slot :name="item.suffixSlot" :scope="item"></slot>
</div>
<!-- 选择-输入框 -->
......@@ -41,7 +44,7 @@
</template>
<!-- 选择框 -->
<div v-else-if="item.type === 'select'">
<el-select :style="{ width: item.width || '100%' }" v-model="formObj[item.name]" :clearable="item.isClear || false" :placeholder="'请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)">
<el-select :style="{ width: item.width || defaultWidth }" v-model="formObj[item.name]" :clearable="item.isClear || false" :placeholder="'请选择' + item.label" :filterable="!item.noFilter" :disabled="item.isDisabled" :no-data-text="item.noDataText || '无数据'" :multiple="item.multiple || false" :collapse-tags="item.collapseTags || true" @change="selectAddAttr($event, item)">
<el-option v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionLabel]" :value="subItem[item.optionId]" :disabled="subItem.isDisabled || false"></el-option>
</el-select>
<slot :name="item.suffixSlot" :scope="item"></slot>
......@@ -55,8 +58,8 @@
<p class="photo-top-tips">{{ item.topTips }}</p>
<div v-if="!item.isDisabled">
<div v-if="Array.isArray(formObj[item.name]) ? formObj[item.name].length < item.maxPhotoNum : !formObj[item.name]" class="activity-img img-w-h">
<div class="add">+</div>
<span class="number">{{ formObj[item.name].length }} / {{ item.maxPhotoNum }}</span>
<div class="add" :style="{ top: item.maxPhotoNum == 1 ? '50%' : '40%' }">+</div>
<span v-show="item.maxPhotoNum > 1" class="number">{{ formObj[item.name].length }} / {{ item.maxPhotoNum }}</span>
<input type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="activity-img img-w-h" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleImgChange(e, item)" />
</div>
</div>
......@@ -119,9 +122,22 @@ export default {
type: String,
default: 'formRef'
},
labelWidth: {
defaultWidth: {
type: String,
default: '85px'
default: '215px'
},
isEdit: {
type: Boolean,
default: false
},
labelWidth: {
type: Number,
// 默认是四个字符长度
default: 56
},
labelPaddingRight: {
type: Number,
default: 15
},
formData: {
type: Array,
......@@ -224,10 +240,17 @@ export default {
/* .glsx-combi-form .el-form-item {
width: 65%;
} */
.glsx-combi-form .no-label.el-form-item--small .el-form-item__content,
.el-form-item--small .el-form-item__label {
.glsx-combi-form .no-label.el-form-item--small .el-form-item__content {
width: 100%;
}
.glsx-combi-form .el-form-item--small.el-form-item {
margin: 0 30px 20px 0;
}
.glsx-combi-form .el-form-item--small .el-form-item__label {
padding: 0;
}
/* .glsx-combi-form .el-form-item--small .el-form-item__content {
width: calc(100% - 85px);
} */
......@@ -296,6 +319,7 @@ export default {
.glsx-combi-form .activity-img {
position: relative;
color: #999999;
background-color: #F7F7F7;
border: 1px dashed #d9d9d9;
cursor: pointer;
}
......
......@@ -6,10 +6,9 @@
</div>
<div class="container">
<div>
<glsx-combi-form ref="showSearch" labelWidth="90px" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData">
<!-- <template slot="merchantId" slot-scope="item">
<select-page :form="searchForm" width="200" :targetItem="item.scope" @handleChange="handleChangeMerchant"></select-page>
</template> -->
<glsx-combi-form ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData">
</glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData2">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
......@@ -82,7 +81,6 @@ export default {
label: '角色',
name: 'roleId',
type: 'select',
width: '160px',
optionList: [],
optionId: 'id',
optionLabel: 'roleName',
......@@ -92,18 +90,20 @@ export default {
label: '状态',
name: 'status',
type: 'select',
width: '110px',
optionList: [],
optionId: 'dictValue',
optionLabel: 'dictLabel',
optionsName: 'staffStatusList'
},
}
],
// 搜索2
searchFormData2: [
{
type: 'selectInput',
selectName: 'staffNameOrPhone',
isClear: true,
maxlength: 15,
inputWidth: '320px',
inputWidth: '286px',
selectWidth: '120px',
selectOption: [
{
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!