Commit e2cf254a by cwq0219

员工-查看

1 parent 36bed85e
......@@ -4,25 +4,27 @@
<div class="container">
<p class="edit-sub-title p-rl-20">员工基本信息</p>
<el-form label-width="140px">
<el-form-item style="margin-bottom: 0;" v-for="(item, index) in detailFormDaata" :key="index" :label="item.label + ':'">
<el-form-item style="margin-bottom: 0;" v-for="(item, index) in detailFormData" :key="index" :label="item.label + ':'">
<span>{{ info[item.name] || '无' }}</span>
</el-form-item>
</el-form>
</div>
<div class="container">
<p class="edit-sub-title p-rl-20">可见下级商户</p>
<div class="config-mer-name">
<p class="mer-txt" v-for="(item, index) in info.visibleInferiorMerName.split(',')" :key="index">{{item}}</p>
</div>
</div>
</div>
</template>
<script>
// import { getDetailInfoApi } from '@/api/modules/employee'
export default {
name: 'info',
data() {
return {
info: {},
detailFormDaata: [{
detailFormData: [{
label: '姓名',
name: 'staffName'
}, {
......@@ -133,4 +135,15 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
}
.config-employee .config-mer-name {
font-size: 14px;
line-height: 20px;
margin: 21px 0 0 140px;
min-height: 36px;
}
.config-employee .config-mer-name .mer-txt {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>
......@@ -34,7 +34,7 @@ export default {
title: '新增员工',
titleObj: {
1: '新增员工',
2: '编辑员工'
2: '修改员工'
},
footerLeft: '0',
footerWidth: '0',
......@@ -191,6 +191,7 @@ export default {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
this.title = this.titleObj[this.routeInfo.addOrEdit]
this.getAllMerchantList()
this.routeInfo.addOrEdit != 1 ? this.getInfo() : ''
},
......@@ -219,7 +220,7 @@ export default {
visibleInferiorMer: res.visibleInferiorMer,
roleIds: res.roleIds[0],
merchantImg: res.merchantFileResponse ? res.merchantFileResponse.fileUrl : '',
fileName: res.merchantFileResponse ? res.merchantFileResponse.fileName : ''
fileName: res.merchantFileResponse ? res.merchantFileResponse.fileName : ''
}
this.handleChangeMerchant(this.editForm.merchantId, true)
})
......@@ -301,6 +302,11 @@ export default {
})
delete params.merchantImg
delete params.fileName
} else {
params.merchantFileRequest = JSON.stringify({
fileName: '',
fileUrl: ''
})
}
console.log(params)
var apiName = this.routeInfo.addOrEdit == 1 ? 'addEmployeeApi' : 'updateEmployeeApi'
......@@ -324,7 +330,7 @@ export default {
}
}
</script>
<style scoped>
<style>
.config-employee {
margin-bottom: 64px;
}
......@@ -385,15 +391,10 @@ export default {
max-height: 200px;
overflow: scroll;
}
.config-employee .el-checkbox:last-of-type {
margin-right: 8px;
}
.config-employee .filter-tree .el-tree-node__label {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-left: 8px;
}
/* .config-employee .el-checkbox:last-of-type {
margin-right: 8px !important;
} */
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!