Commit 41278f3d authored by Mr.Tang's avatar Mr.Tang

角色管理操作修改 国内车型页面

parent d663358f
import request from '@/utils/request'
// 查询国内车型列表
export function listModel(query) {
return request({
url: '/control/model/list',
method: 'get',
params: query,
})
}
// 查询国内车型详细
export function getModel(id) {
return request({
url: '/control/model/' + id,
method: 'get',
})
}
// 新增国内车型
export function addModel(data) {
return request({
url: '/control/model',
method: 'post',
data: data,
})
}
// 修改国内车型
export function updateModel(data) {
return request({
url: '/control/model',
method: 'put',
data: data,
})
}
// 删除国内车型
export function delModel(id) {
return request({
url: '/control/model/' + id,
method: 'delete',
})
}
This diff is collapsed.
<template>
国际车型
</template>
<script>
export default {
name: 'index',
}
</script>
<style scoped>
</style>
<template> <template>
<div class="app-container"> <div class="app-container">
<div> <div>
<el-button type="primary" plain style="float: right;margin: 12px 0;border: 1px solid #0154fb;color: #0154fb;" @click="handleAdd">新建</el-button> <el-button style="float: right;margin: 12px 0;border: 1px solid #0154fb;color: #0154fb;" @click="handleAdd">新建</el-button>
</div> </div>
<el-table v-loading="loading" :data="unitList" @selection-change="handleSelectionChange" border> <el-table v-loading="loading" :data="unitList" @selection-change="handleSelectionChange" border>
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="submitForm">保 存</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
:inline="true" :inline="true"
label-width="68px" label-width="68px"
> >
<el-form-item label="角色名称" prop="roleName"> <el-form-item label="" prop="roleName">
<el-input <el-input
v-model="queryParams.roleName" v-model="queryParams.roleName"
placeholder="角色名称" placeholder="角色名称"
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
@keyup.enter="handleQuery" @keyup.enter="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="" prop="status">
<el-select <el-select
v-model="queryParams.status" v-model="queryParams.status"
placeholder="角色状态" placeholder="角色状态"
...@@ -32,28 +32,35 @@ ...@@ -32,28 +32,35 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery" style='background: #0154fb;'>查询</el-button> <el-button
type="primary"
icon="Search"
style="background: #0154fb"
@click="handleQuery"
>查询</el-button
>
<el-button icon="Refresh" @click="resetQuery">重置</el-button> <el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
<el-button <el-button
v-hasPermi="['system:role:add']" v-hasPermi="['system:role:add']"
type="primary" type="primary"
icon="Plus" icon="Plus"
style="float: right; background: #0154fb"
@click="handleAdd" @click="handleAdd"
style="float: right;background: #0154fb;" >新建角色</el-button
>新建角色</el-button> >
<!-- <el-button type="primary" plain @click="handleAdd">新建</el-button>--> <!-- <el-button type="primary" plain @click="handleAdd">新建</el-button>-->
</el-form> </el-form>
<!-- 表格数据 --> <!-- 表格数据 -->
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="roleList" :data="roleList"
border
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
border> >
<!-- <el-table-column type="selection" width="55" align="center" />--> <!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="序号" prop="roleId" width="120" align="center"/> <el-table-column label="序号" prop="roleId" width="120" align="center" />
<el-table-column <el-table-column
label="角色名称" label="角色名称"
prop="roleName" prop="roleName"
...@@ -68,7 +75,12 @@ ...@@ -68,7 +75,12 @@
width="150" width="150"
align="center" align="center"
/> />
<el-table-column label="显示顺序" prop="roleSort" width="100" align="center"/> <el-table-column
label="显示顺序"
prop="roleSort"
width="100"
align="center"
/>
<el-table-column label="角色状态" align="center" width="150" sortable> <el-table-column label="角色状态" align="center" width="150" sortable>
<template #default="scope"> <template #default="scope">
<el-switch <el-switch
...@@ -79,12 +91,24 @@ ...@@ -79,12 +91,24 @@
></el-switch> ></el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="200" sortable> <el-table-column
label="创建时间"
align="center"
prop="createTime"
width="200"
sortable
>
<template #default="scope"> <template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="修改时间" align="center" prop="updateTime" width="200" sortable> <el-table-column
label="修改时间"
align="center"
prop="updateTime"
width="200"
sortable
>
<template #default="scope"> <template #default="scope">
<span>{{ parseTime(scope.row.updateTime) }}</span> <span>{{ parseTime(scope.row.updateTime) }}</span>
</template> </template>
...@@ -106,7 +130,8 @@ ...@@ -106,7 +130,8 @@
type="primary" type="primary"
icon="Edit" icon="Edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>编辑</el-button> >编辑</el-button
>
</el-tooltip> </el-tooltip>
<el-tooltip <el-tooltip
v-if="scope.row.roleId !== 1" v-if="scope.row.roleId !== 1"
...@@ -119,9 +144,10 @@ ...@@ -119,9 +144,10 @@
type="primary" type="primary"
icon="CircleCheck" icon="CircleCheck"
@click="handleDataScope(scope.row)" @click="handleDataScope(scope.row)"
>分配菜单</el-button> >分配菜单</el-button
>
</el-tooltip> </el-tooltip>
<el-tooltip <!-- <el-tooltip
v-if="scope.row.roleId !== 1" v-if="scope.row.roleId !== 1"
content="分配用户" content="分配用户"
placement="top" placement="top"
...@@ -133,7 +159,7 @@ ...@@ -133,7 +159,7 @@
icon="User" icon="User"
@click="handleAuthUser(scope.row)" @click="handleAuthUser(scope.row)"
>分配用户</el-button> >分配用户</el-button>
</el-tooltip> </el-tooltip>-->
<el-tooltip <el-tooltip
v-if="scope.row.roleId !== 1" v-if="scope.row.roleId !== 1"
content="删除" content="删除"
...@@ -145,7 +171,8 @@ ...@@ -145,7 +171,8 @@
type="danger" type="danger"
icon="Delete" icon="Delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>删除</el-button> >删除</el-button
>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
...@@ -674,7 +701,7 @@ function cancelDataScope() { ...@@ -674,7 +701,7 @@ function cancelDataScope() {
getList() getList()
</script> </script>
<style scoped> <style scoped>
.addRoleBtn{ .addRoleBtn {
margin-left: 420px; margin-left: 420px;
margin-right: 0px; margin-right: 0px;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment