完善后台用户添加和公司管理接口
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
<el-table-column type="selection" align="center" width="40"></el-table-column>
|
||||
<el-table-column type="index" align="center" label="序号" width="50"></el-table-column>
|
||||
<template #logo="scope">
|
||||
<el-image class="logoCell" :src="scope.row.logo"></el-image>
|
||||
<el-image class="logoCell" :src="scope.row.logo" fit="contain"></el-image>
|
||||
</template>
|
||||
<template #active_status="scope">
|
||||
<el-switch :size="size" v-model="scope.row.active_status" @change="changeSwitch($event, scope.row)" :loading="scope.row.$switch_status" :active-value="true" :inactive-value="false"></el-switch>
|
||||
@@ -141,7 +141,7 @@ export default {
|
||||
//删除
|
||||
async table_del(row){
|
||||
const reqData = {id: row.id};
|
||||
const res = await this.$API.demo.post.post(reqData);
|
||||
const res = await this.$API.system.company.delete.post(reqData);
|
||||
if(res.code == 200){
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success("删除成功")
|
||||
@@ -195,6 +195,7 @@ export default {
|
||||
.logoCell{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
height: 20px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="titleMap[mode]" v-model="visible" :width="580" destroy-on-close draggable @closed="$emit('closed')">
|
||||
<el-dialog :title="titleMap[mode]" v-model="visible" :width="640" destroy-on-close draggable @closed="$emit('closed')">
|
||||
<el-scrollbar height="460px" style="padding: 0 20px;">
|
||||
<el-form :model="form" :rules="rules" ref="dialogForm" label-width="140px">
|
||||
<div class="dialogBoxTitle"><span class="make"></span><span class="name">企业信息</span></div>
|
||||
@@ -32,13 +32,13 @@
|
||||
<div class="dialogBoxTitle"><span class="make"></span><span class="name">企业管理员信息</span></div>
|
||||
<el-form-item label="负责人/联系方式" prop="status">
|
||||
<el-row justify="space-between">
|
||||
<el-col :span="7">
|
||||
<el-col :span="5">
|
||||
<el-input v-model="form.owner" placeholder="公司负责人"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-input v-model="form.mobile" placeholder="联系方式"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-col :span="10">
|
||||
<el-input v-model="form.email" placeholder="邮箱地址"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -110,13 +110,14 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.getCompanyTypeSelect(true);
|
||||
},
|
||||
methods: {
|
||||
//显示
|
||||
open(mode='add'){
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
|
||||
return this
|
||||
},
|
||||
//加载树数据
|
||||
@@ -149,13 +150,29 @@ export default {
|
||||
})
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data){
|
||||
this.form.id = data.id
|
||||
this.form.label = data.label
|
||||
this.form.status = data.status
|
||||
this.form.sort = data.sort
|
||||
this.form.parentId = data.parentId
|
||||
this.form.remark = data.remark
|
||||
async setData(data) {
|
||||
let params = {
|
||||
id:data.id
|
||||
}
|
||||
|
||||
const res = await this.$API.system.company.info.post(params);
|
||||
if(res.code == 200){
|
||||
this.form.id = res.data.id;
|
||||
this.form.domain = res.data.domain;
|
||||
this.form.company_type = res.data.company_type;
|
||||
this.form.name = res.data.name;
|
||||
this.form.full_name = res.data.full_name;
|
||||
this.form.address = res.data.address;
|
||||
this.form.email = res.data.platform_user && res.data.platform_user.email?res.data.platform_user.email:'';
|
||||
this.form.logo = res.data.logo;
|
||||
this.form.doc_url = [];
|
||||
this.form.owner = res.data.owner;
|
||||
this.form.mobile = res.data.mobile;
|
||||
this.form.admin_access = res.data.admin_access;
|
||||
this.form.password = res.data.password;
|
||||
this.form.remark = res.data.remark;
|
||||
this.form.accord = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user