Commit 3ffcbeb3 authored by denghr's avatar denghr

权限管理

parent 2c3e19de
......@@ -137,3 +137,10 @@ export function getGroups() {
});
}
export function listAll() {
return fetch({
url: '/api/admin/group/list_all',
method: 'get'
});
}
......@@ -347,6 +347,12 @@ export const asyncRouterMap = [{
component: _import('vehicle/vehicleSchedulManage/vehicleRecords'),
name: '车辆排班记录',
authority: 'vehicleRecords'
},
{
path: 'dispatchApply',
component: _import('vehicle/dispatchApply/index'),
name: '调度申请管理',
authority: 'dispatchApply'
}
]
},
......
......@@ -81,14 +81,21 @@
</el-select>
</el-form-item>
<el-form-item label="所属角色" prop="members">
<el-select v-model="form.members" multiple filterable placeholder="请选择" :loading="loading" :remote-method="remoteGroupsMethod" remote>
<el-autocomplete
class="inline-input"
v-model="membersName"
:fetch-suggestions="querySearch"
placeholder="请选择"
@select="handleSelect2"
></el-autocomplete>
<!-- <el-select v-model="form.members" multiple filterable placeholder="请选择" :loading="loading" :remote-method="remoteGroupsMethod" remote>
<el-option
v-for="item in myGroups"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-select> -->
</el-form-item>
<el-form-item label="数据权限" prop="dataState">
<el-checkbox-group v-model="form.dataLimit" >
......@@ -134,7 +141,8 @@ import {
import {
fetchTree,
getUserGroups,
getCurrentGroups
getCurrentGroups,
listAll
} from 'api/admin/group/index';
import {getAllBranchCompanyByZoneId} from "../../../api/order/rentVehicle";
......@@ -142,6 +150,7 @@ export default {
name: 'user',
data() {
return {
membersName:'',//角色
form: {
username: undefined,
name: undefined,
......@@ -250,6 +259,7 @@ export default {
},
tableKey: 0,
allBranchCompany: [],//所有分公司列表
list_All:[]
}
},
created() {
......@@ -261,6 +271,9 @@ export default {
getAllCompany(codeAndBranchCompany => {
this.allCompanies = codeAndBranchCompany;
});
listAll().then(response => {
this.list_All = response;
})
this.remoteGroupsMethod('');
// getCurrentGroups().then(result => {
// this.myGroups = result.data;
......@@ -308,6 +321,10 @@ export default {
this.form.companyId = item.id;
this.form.companyName = item.name;
},
// 角色
handleSelect2(item){
this.form.members = item.id;
},
/**
* 获取后台用户管理列表数据
* */
......@@ -448,7 +465,7 @@ export default {
},
querySearch(queryString, cb) {
let selectArry = [];
this.allBranchCompany.map(function(item){
this.list_All.map(function(item){
item.value = item.name;
selectArry.push(item);
});
......
......@@ -29,7 +29,7 @@
<el-select class="filter-item" v-model="listQuery.status" placeholder="请选择状态">
<!--"0--删除"+"1--创建订单" +"2--取消" +"3--待付款" +"4--待出行" +"5--出行中(进行中)" +"6--已完成"-->
<el-option :key="null" label="全部订单" :value="null" ></el-option>
<el-option :key="3" label="待支付" :value="3"></el-option>
<el-option :key="3" label="待付款" :value="3"></el-option>
<el-option :key="4" label="待出行" :value="4"></el-option>
<el-option :key="5" label="出行中" :value="5"></el-option>
<el-option :key="6" label="已完成" :value="6"></el-option>
......@@ -110,7 +110,7 @@
<el-button size="small" v-if="scope.row.status >=4" type="success" @click="handleHandoverOrderVehicle(scope.row)">交车记录</el-button>
<el-button size="small" v-if="scope.row.status == 6" type="success" @click="handleReturnOrderVehicle(scope.row)">还车记录</el-button>
<el-button size="small" v-if="scope.row.status > 3" type="success" @click="handleRefundVehicle(scope.row)">押金记录</el-button>
<el-button size="small" v-if="scope.row.status == 6" type="success" @click="illegalInquiry(scope.row)">违章查询</el-button>
<el-button size="small" v-if="scope.row.status == 6&&order_btn_order_violcation_save" type="success" @click="illegalInquiry(scope.row)">违章查询</el-button>
</template>
</el-table-column>
</el-table>
......@@ -376,12 +376,14 @@
handover:false,
returnVehicle: false,
refundshow:false,//退款信息
vehicleDetail:true //交还车信息,默认全部显示
vehicleDetail:true, //交还车信息,默认全部显示
order_btn_order_violcation_save:false
}
},
created() {
this.getList();
this.btn_del = this.elements['branchCompany/stockApply:btn_delete'];
this.order_btn_order_violcation_save = this.elements['order:btn_order_violcation_save'];
},
computed: {
...mapGetters([
......
......@@ -320,9 +320,9 @@
<el-table-column align="center" label="操作" width="500">
<template scope="scope">
<el-button v-if="vehicleInfo_btn_edit" size="small" type="success" @click="handleUpdate(scope.row)">编辑
<el-button size="small" type="success" @click="handleUpdate(scope.row)">{{vehicleInfo_btn_edit?"编辑":"查看"}}
</el-button>
<el-button v-if="scope.row.status == 1" size="small" type="success" @click="departureHandler(scope.row)">出车
<el-button v-if="scope.row.status == 1&&vehicleInfo_btn_ride" size="small" type="success" @click="departureHandler(scope.row)">出车
</el-button>
<el-button v-if="scope.row.status == 4" size="small" type="success" @click="arrivalHandler(scope.row)">收车
</el-button>
......@@ -349,7 +349,7 @@
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" size="small" v-popover:popover5>删除</el-button>
<el-button type="danger" size="small" v-popover:popover5 v-if="vehicleInfo_btn_ret">删除</el-button>
</template>
</el-table-column>
......@@ -599,7 +599,7 @@
<div slot="footer" class="dialog-footer">
<el-button @click="cancel('form')">取 消</el-button>
<el-button v-if="dialogStatus=='create'" type="primary" @click="create('form')">确 定</el-button>
<el-button v-else type="primary" @click="update('form')">确 定</el-button>
<el-button type="primary" @click="update('form')" v-if="dialogStatus=='update'&&vehicleInfo_btn_edit">确 定</el-button>
</div>
</el-dialog>
......@@ -1062,9 +1062,6 @@
curBookedInfo3Month: undefined,
curBookedInfo: undefined,
dialogStatus: '',
vehicleInfo_btn_edit: false,
vehicleInfo_btn_add: false,
vehicleInfo_btn_apply: false,
allCompanies: {},
allCompaniesArr: [],
textMap: {
......@@ -1104,6 +1101,11 @@
allUpkeepItems: null,
allZoneArr:[],//全部片区
provinceRegions: [],//片区下省份数据
vehicleInfo_btn_edit: false,//编辑
vehicleInfo_btn_add: false,//新增
vehicleInfo_btn_apply: false,//申请预定
vehicleInfo_btn_ride:false,//出车
vehicleInfo_btn_ret:false,//删除
}
},
created() {
......@@ -1122,6 +1124,8 @@
this.vehicleInfo_btn_edit = this.elements['vehicleInfo:btn_edit'];
this.vehicleInfo_btn_add = this.elements['vehicleInfo:btn_add'];
this.vehicleInfo_btn_apply = this.elements['vehicleInfo:btn_apply'];
this.vehicleInfo_btn_ride = this.elements['vehicleInfo:btn_ride'];
this.vehicleInfo_btn_ret = this.elements['vehicleInfo:btn_ret'];
},
computed: {
...mapGetters([
......
......@@ -16,7 +16,7 @@
</el-select>
</el-form-item>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" v-if="vehicle_warning_msg_btn_add" style="margin-left: 10px;"
<el-button class="filter-item" v-if="vehicleWarningMsg_btn_add" style="margin-left: 10px;"
@click="handleCreate"
type="primary" icon="edit">添加
</el-button>
......@@ -67,9 +67,9 @@
<el-table-column align="center" label="操作" width="100">
<template scope="scope">
<el-button v-if="scope.row.status == 1" size="small" type="success" @click="handleDeal(scope.row)">处理
<el-button v-if="scope.row.status == 1&&vehicleInfo_btn_upkeep" size="small" type="success" @click="handleDeal(scope.row)">处理
</el-button>
<el-button v-if="scope.row.status == 5" size="small" type="success" @click="upkeepEndHandler(scope.row)">
<el-button v-if="scope.row.status == 5&&vehicleInfo_btn_upkeepEnd" size="small" type="success" @click="upkeepEndHandler(scope.row)">
保养结束
</el-button>
</template>
......@@ -199,8 +199,9 @@
allUpkeepItems: null,
dialogStatus: undefined,
tableKey: 0,
vehicle_warning_msg_btn_add: false,
vehicle_warning_msg_btn_deal: false
vehicleWarningMsg_btn_add: false,//增加自定义预警
vehicleInfo_btn_upkeep: false,//处理预警消息
vehicleInfo_btn_upkeepEnd: false,//保养结束
}
},
created() {
......@@ -215,8 +216,9 @@
getAllUpkeepItem().then(response => {
this.allUpkeepItems = response.data;
});
this.vehicle_warning_msg_btn_add = this.elements['vehicleWarningMsg:btn_add'];
this.vehicle_warning_msg_btn_deal = this.elements['vehicleWarningMsg:btn_deal'];
this.vehicleWarningMsg_btn_add=this.elements['vehicleWarningMsg:btn_add'];//增加自定义预警
this.vehicleInfo_btn_upkeep = this.elements['vehicleInfo:btn_upkeep'];//处理预警消息
this.vehicleInfo_btn_upkeepEnd= this.elements['vehicleInfo:btn_upkeepEnd'];//保养结束
},
computed: {
...mapGetters([
......
......@@ -31,7 +31,7 @@
</el-form>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" style="margin-left: 10px;" @click="handleCreate"
type="primary" icon="edit">添加
type="primary" icon="edit" v-if="vehicleTypeList_btn_add">添加
</el-button>
</div>
<el-table :key='tableKey' :data="list" border fit highlight-current-row
......@@ -76,7 +76,7 @@
</el-table-column>
<el-table-column align="center" width="200" label="操作">
<template scope="scope">
<el-button v-if="tourManage_btn_edit" size="small" type="success" @click="handleUpdate(scope.row)">编辑
<el-button size="small" type="success" @click="handleUpdate(scope.row)">{{vehicleTypeList_btn_edit?'编辑':'查看'}}
</el-button>
<el-popover
ref="popover5"
......@@ -89,7 +89,7 @@
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" size="small" v-popover:popover5>删除</el-button>
<el-button type="danger" size="small" v-popover:popover5 v-if="vehicleTypeList_btn_del">删除</el-button>
</template>
</el-table-column>
</el-table>
......@@ -100,7 +100,7 @@
</div>
</div>
<!-- 车型编辑 -->
<oneType v-if="oneTypeDialogVisible" :oneRow="oneRow" :title="modalTitle" v-on:oneDialogEvent = "oneDialogEvent" :brandlist="brandlist" :numberList="numberList"></oneType>
<oneType v-if="oneTypeDialogVisible" :oneRow="oneRow" :vehicleTypeList_btn_edit="vehicleTypeList_btn_edit" :title="modalTitle" v-on:oneDialogEvent = "oneDialogEvent" :brandlist="brandlist" :numberList="numberList"></oneType>
</div>
</template>
......@@ -171,8 +171,6 @@
takeALieTheNumber: undefined,//乘卧数量
},
inline: true,
tourManage_btn_edit: false,//编辑
tourManage_btn_add: false,//添加
vehicleInfo_btn_apply: false,
allCompanies: {},
allCompaniesArr: [],
......@@ -182,15 +180,19 @@
},
tableKey: 0,
departureDialogVisible: false,
arrivalDialogVisible: false
arrivalDialogVisible: false,
vehicleTypeList_btn_add: false,//添加
vehicleTypeList_btn_edit: false,//编辑
vehicleTypeList_btn_del: false,//删除
}
},
created() {
this.getList();
this.getNumberList();//获取全部乘卧数量
this.getLabels();//获取全部品牌标签
this.tourManage_btn_edit = true;//this.elements['tourManage:btn_edit'];
this.tourManage_btn_add = true;//this.elements['tourManage:btn_add'];
this.vehicleTypeList_btn_add=this.elements['vehicleTypeList:btn_add'];//添加
this.vehicleTypeList_btn_edit=this.elements['vehicleTypeList:btn_edit'];//编辑
this.vehicleTypeList_btn_del=this.elements['vehicleTypeList:btn_del'];//删除
},
computed: {
...mapGetters([
......
......@@ -160,7 +160,7 @@
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" v-if="title=='创建'" @click="create()">确 定</el-button>
<el-button type="primary" v-if="title=='编辑'" @click="update()">确 定</el-button>
<el-button type="primary" v-if="title=='编辑'&&vehicleTypeList_btn_edit" @click="update()">确 定</el-button>
</div>
<!--配置弹框-->
......@@ -230,7 +230,7 @@ import UE from '../../modal/Ueditor';//百度ue富文本
import ElRadio from "../../../../node_modules/element-ui/packages/radio/src/radio.vue";
export default {
props: ["oneRow", "title", "brandlist", "numberList"],
props: ["oneRow", "title", "brandlist", "numberList","vehicleTypeList_btn_edit"],
name: 'upkeepDialog',
components: {
ElRadio,
......
......@@ -2,7 +2,7 @@
<div class="app-container calendar-list-container" v-loading.body="showLoadingBody">
<div class="filter-container" ref="filter-container">
<el-button class="filter-item" style="margin-left: 10px;" @click="handleCreate"
type="primary" icon="edit">添加
type="primary" icon="edit" v-if="vehicleTypeLabel_btn_save">添加
</el-button>
</div>
<el-table
......@@ -37,19 +37,19 @@
</el-table-column>
<el-table-column width="200" align="center" label="筛选条件">
<template scope="scope">
<el-button size="mini" type="text" @click="startUsingChange(scope.row)" v-if="scope.row.parent.startUsing==1" ><i style="color: #208ee1;font-size:24px;" class="el-icon-star-on el-icon--right"></i></el-button>
<el-button size="mini" type="text" @click="startUsingChange(scope.row)" v-else ><i style="font-size:24px;" class="el-icon-star-off el-icon--right"></i></el-button>
<el-button size="mini" type="text" @click="startUsingChange(scope.row)" v-if="scope.row.parent.startUsing==1&&vehicleTypeLabel_btn_screen" ><i style="color: #208ee1;font-size:24px;" class="el-icon-star-on el-icon--right"></i></el-button>
<el-button size="mini" type="text" @click="startUsingChange(scope.row)" v-if="scope.row.parent.startUsing==0&&vehicleTypeLabel_btn_screen" ><i style="font-size:24px;" class="el-icon-star-off el-icon--right"></i></el-button>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="是否多选">
<template scope="scope">
<el-button size="mini" type="text" @click="setIsMore(scope.row)" v-if="scope.row.parent.isMore==1" ><i style="color: #208ee1;font-size:24px;" class="el-icon-star-on el-icon--right"></i></el-button>
<el-button size="mini" type="text" @click="setIsMore(scope.row)" v-else ><i style="font-size:24px;" class="el-icon-star-off el-icon--right"></i></el-button>
<el-button size="mini" type="text" @click="setIsMore(scope.row)" v-if="scope.row.parent.isMore==1&&vehicleTypeLabel_btn_multipleSelection" ><i style="color: #208ee1;font-size:24px;" class="el-icon-star-on el-icon--right"></i></el-button>
<el-button size="mini" type="text" @click="setIsMore(scope.row)" v-if="scope.row.parent.isMore==0&&vehicleTypeLabel_btn_multipleSelection" ><i style="font-size:24px;" class="el-icon-star-off el-icon--right"></i></el-button>
</template>
</el-table-column>
<el-table-column align="center" width="200" label="操作">
<template scope="scope">
<el-button size="small" type="success" @click="handleUpdate(scope.row)">编辑
<el-button size="small" type="success" @click="handleUpdate(scope.row)">{{vehicleTypeLabel_btn_save?'编辑':'查看'}}
</el-button>
<el-popover
ref="popover5"
......@@ -62,7 +62,7 @@
<el-button type="primary" size="mini" @click="deleteHandler(scope.row)">确定</el-button>
</div>
</el-popover>
<el-button type="danger" v-if="scope.row.parent.id != 1 && scope.row.parent.id!= 14" size="small" v-popover:popover5>删除</el-button>
<el-button type="danger" v-if="scope.row.parent.id != 1 && scope.row.parent.id!= 14&&vehicleTypeLabel_btn_del" size="small" v-popover:popover5>删除</el-button>
</template>
</el-table-column>
</el-table>
......@@ -129,7 +129,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelHandel">取 消</el-button>
<el-button type="primary" @click="update('form')">确 定</el-button>
<el-button type="primary" @click="update('form')" v-if="vehicleTypeLabel_btn_save">确 定</el-button>
</div>
</el-dialog>
</div>
......@@ -238,12 +238,19 @@
listLoading: true,
inline: true,
rankDialogVisible: false,//排序弹框
vehicleTypeLabel_btn_save:false,
vehicleTypeLabel_btn_del:false,
vehicleTypeLabel_btn_multipleSelection:false,
vehicleTypeLabel_btn_screen:false,
}
},
created() {
this.getList();
this.banner_btn_edit = true;//this.elements['tourManage:btn_edit'];
this.banner_btn_add = true;//this.elements['tourManage:btn_add'];
this.vehicleTypeLabel_btn_save=this.elements['vehicleTypeLabel:btn_save'];
this.vehicleTypeLabel_btn_del=this.elements['vehicleTypeLabel:btn_del'];
this.vehicleTypeLabel_btn_multipleSelection=this.elements['vehicleTypeLabel:btn_multipleSelection'];
this.vehicleTypeLabel_btn_screen=this.elements['vehicleTypeLabel:btn_screen'];
},
computed: {
...mapGetters([
......
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