fast()用户表权限重置

car_2
王熙朝 2024-05-28 22:31:07 +08:00
parent a9867574c7
commit b54a374c11
5 changed files with 126 additions and 17 deletions

View File

@ -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
})
}

View File

@ -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

View File

@ -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'
// jsjsjson,
// 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() {

View File

@ -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() {

View File

@ -0,0 +1,47 @@
<template>
<div></div>
</template>
<script>
// jsjsjson,
// 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>