fast()用户表权限重置
parent
a9867574c7
commit
b54a374c11
|
@ -9,6 +9,14 @@ export function listEnterprise(query) {
|
|||
})
|
||||
}
|
||||
|
||||
export function lists(data) {
|
||||
return request({
|
||||
url: '/goods/enterprise/lists',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询企业详细
|
||||
export function getEnterprise(id) {
|
||||
return request({
|
||||
|
@ -20,7 +28,7 @@ export function getEnterprise(id) {
|
|||
// 新增企业
|
||||
export function addEnterprise(data) {
|
||||
return request({
|
||||
url: '/goods/enterprise/enterprise',
|
||||
url: '/goods/enterprise',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
|
@ -29,7 +37,7 @@ export function addEnterprise(data) {
|
|||
// 修改企业
|
||||
export function updateEnterprise(data) {
|
||||
return request({
|
||||
url: '/goods/enterprise/enterprise',
|
||||
url: '/goods/enterprise',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
|
@ -52,3 +60,11 @@ export function delEnterprise(id) {
|
|||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function sysUsers(data) {
|
||||
return request({
|
||||
url: '/goods/enterprise/sysUsers/',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-descriptions class="margin-top" title="企业详情" :data="enterprise" :column="3" :size="size" border>
|
||||
<span v-if="enterprise == null">
|
||||
|
||||
</span>
|
||||
<span v-else>
|
||||
<span v-if="enterprise.authentication != 1 ">
|
||||
<h2>企业信息尚未完善,请先补充完善后通知管理员审核</h2>
|
||||
<el-button @click="bulk">通知补充企业信息</el-button>
|
||||
</span>
|
||||
<span v-else>
|
||||
<el-descriptions class="margin-top" title="企业详情" :data="enterprise" :column="3" :size="size" border>
|
||||
<el-descriptions-item label="企业名称">{{enterprise.enterpriseName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="法定代表人">{{enterprise.legalPerson}}</el-descriptions-item>
|
||||
<el-descriptions-item label="企业联系方式">{{enterprise.contactPhone}}</el-descriptions-item>
|
||||
|
@ -16,6 +25,9 @@
|
|||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{enterprise.remark}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -39,6 +51,9 @@ export default {
|
|||
watch: {},
|
||||
// 方法集合",
|
||||
methods: {
|
||||
bulk() {
|
||||
alert("信息已发送,等待处理")
|
||||
},
|
||||
getInfo() {
|
||||
listEnterprise().then(res => {
|
||||
this.enterprise = res.data
|
||||
|
|
|
@ -1,8 +1,24 @@
|
|||
<template>
|
||||
<div></div>
|
||||
<div>
|
||||
<el-table :data="appearIc">
|
||||
<el-table-column prop="userName" label="用户账号"></el-table-column>
|
||||
<el-table-column prop="nickName" label="用户昵称"></el-table-column>
|
||||
<el-table-column prop="email" label="用户邮箱"></el-table-column>
|
||||
<el-table-column prop="phonenumber" label="手机号码"></el-table-column>
|
||||
<el-table-column prop="firm" label="绑定企业">
|
||||
<span slot-scope="scope">
|
||||
<span v-for="end in enterprise">
|
||||
<span v-if="end.id == scope.row.firm">{{end.enterpriseName}}</span>
|
||||
</span>
|
||||
</span>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { sysUsers, lists } from '@/api/goods/enterprise'
|
||||
// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
// 例如:import 《组件名称》 from '《组件路径》,
|
||||
export default {
|
||||
|
@ -11,17 +27,30 @@ export default {
|
|||
props: {},
|
||||
data() {
|
||||
// 这里存放数据"
|
||||
|
||||
return {}
|
||||
return {
|
||||
//企业管理账号
|
||||
appearIc:[],
|
||||
enterprise: []
|
||||
}
|
||||
},
|
||||
// 计算属性 类似于data概念",
|
||||
computed: {},
|
||||
// 监控data中的数据变化",
|
||||
watch: {},
|
||||
// 方法集合",
|
||||
methods: {},
|
||||
methods: {
|
||||
getInfo() {
|
||||
sysUsers().then(res => {
|
||||
this.appearIc = res.data
|
||||
})
|
||||
lists().then(res => {
|
||||
this.enterprise = res.data
|
||||
})
|
||||
}
|
||||
},
|
||||
// 生命周期 - 创建完成(可以访问当前this实例)",
|
||||
created() {
|
||||
this.getInfo()
|
||||
},
|
||||
// 生命周期 - 挂载完成(可以访问DOM元素)",
|
||||
mounted() {
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['goods:enterprise:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
@ -53,7 +52,6 @@
|
|||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['goods:enterprise:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
@ -63,7 +61,6 @@
|
|||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['goods:enterprise:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
|
@ -118,20 +115,21 @@
|
|||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['goods:enterprise:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['goods:enterprise:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="认证">
|
||||
<span slot-scope="scope">
|
||||
<el-button @click="authentications(scope.row.id)">企业认证</el-button>
|
||||
<span v-if="scope.row.authentication == 0">
|
||||
<el-button type="text" @click="authentications(scope.row.id)">企业认证</el-button>
|
||||
</span>
|
||||
|
||||
</span>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -249,10 +247,14 @@ export default {
|
|||
this.reset();
|
||||
},
|
||||
// 企业认证
|
||||
authentications(id) {
|
||||
authentication(id).then(res => {
|
||||
this.getList()
|
||||
})
|
||||
authentications: function (id) {
|
||||
if (confirm("确认企业信息已完善?"))
|
||||
{
|
||||
authentication(id).then(res => {
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
// 例如:import 《组件名称》 from '《组件路径》,
|
||||
export default {
|
||||
// import引入的组件需要注入到对象中才能使用"
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
// 这里存放数据"
|
||||
|
||||
return {}
|
||||
},
|
||||
// 计算属性 类似于data概念",
|
||||
computed: {},
|
||||
// 监控data中的数据变化",
|
||||
watch: {},
|
||||
// 方法集合",
|
||||
methods: {},
|
||||
// 生命周期 - 创建完成(可以访问当前this实例)",
|
||||
created() {
|
||||
},
|
||||
// 生命周期 - 挂载完成(可以访问DOM元素)",
|
||||
mounted() {
|
||||
},
|
||||
beforeCreate() {
|
||||
}, // 生命周期 - 创建之前",
|
||||
beforeMount() {
|
||||
}, // 生命周期 - 挂载之前",
|
||||
beforeUpdate() {
|
||||
}, // 生命周期 - 更新之前",
|
||||
updated() {
|
||||
}, // 生命周期 - 更新之后",
|
||||
beforeDestroy() {
|
||||
}, // 生命周期 - 销毁之前",
|
||||
destroyed() {
|
||||
}, // 生命周期 - 销毁完成",
|
||||
activated() {
|
||||
} // 如果页面有keep-alive缓存功能,这个函数会触发",
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue