Commit e2cf254a by cwq0219

员工-查看

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