用户操作权限添加
This commit is contained in:
@ -49,6 +49,7 @@
|
|||||||
"parser": "@babel/eslint-parser"
|
"parser": "@babel/eslint-parser"
|
||||||
},
|
},
|
||||||
"rules": {}
|
"rules": {}
|
||||||
|
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"> 1%",
|
"> 1%",
|
||||||
|
@ -24,11 +24,11 @@
|
|||||||
<!-- 开启底部安全区适配 -->
|
<!-- 开启底部安全区适配 -->
|
||||||
<van-number-keyboard safe-area-inset-bottom />
|
<van-number-keyboard safe-area-inset-bottom />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window._AMapSecurityConfig = {
|
window._AMapSecurityConfig = {
|
||||||
// serviceHost:'https://api.sinoassist.com/_AMapService',
|
serviceHost: 'https://api.sinoassist.com/_AMapService',
|
||||||
securityJsCode:'91ab1ebc492d5479a68b11527bd73dc9',
|
// 例如 :serviceHost:'http://1.1.1.1:80/_AMapService',
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="https://webapi.amap.com/maps?v=2.0&key=2560bbf04daef66c810c5e6a97e8c508&plugin=AMap.AutoComplete,AMap.PlaceSearch,AMap.Geolocation,AMap.Geocoder,AMap.Marker,AMap.Driving"></script>
|
<script src="https://webapi.amap.com/maps?v=1.4.15&key=2560bbf04daef66c810c5e6a97e8c508"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -170,4 +170,11 @@ export function pageList(data){
|
|||||||
contentType:'application/json',
|
contentType:'application/json',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//用户操作权限
|
||||||
|
export function userOperationPermissions(){
|
||||||
|
return request({
|
||||||
|
url:'/supplierAppV2/dispatchApp/user/userOperationPermissions',
|
||||||
|
method:'POST',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -25,6 +25,15 @@ export function getOrderDetail(data){
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 工单司机位置
|
||||||
|
export function showVehiclePositionInfo(data){
|
||||||
|
return request({
|
||||||
|
url:'/supplierAppV2/dispatchApp/order/showVehiclePositionInfo',
|
||||||
|
method:'POST',
|
||||||
|
contentType:'application/json',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
// 工单报备
|
// 工单报备
|
||||||
export function orderReporting(data){
|
export function orderReporting(data){
|
||||||
return request({
|
return request({
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
:safe-area-inset-top="true"
|
:safe-area-inset-top="true"
|
||||||
@click-left="goBack"
|
@click-left="goBack"
|
||||||
>
|
>
|
||||||
<template slot="right">
|
<template slot="right" v-if="permissonList.includes('driverAddBtn')">
|
||||||
<div class="rightWrap" @click="addDriver" >
|
<div class="rightWrap" @click="addDriver" >
|
||||||
<img src="@/assets/addImg.png" />
|
<img src="@/assets/addImg.png" />
|
||||||
<span class="addTxt">添加</span>
|
<span class="addTxt">添加</span>
|
||||||
@ -29,8 +29,8 @@
|
|||||||
<div class="name-status">
|
<div class="name-status">
|
||||||
<div class="namephone">{{ item.driverName }} / {{ item.driverPhone }}</div>
|
<div class="namephone">{{ item.driverName }} / {{ item.driverPhone }}</div>
|
||||||
<div class="twoBtn">
|
<div class="twoBtn">
|
||||||
<button class="del" @click="handleStatus(item)">{{ item.states?.label == '启用' ? '停用' : '启用' }}</button>
|
<button v-if="permissonList.includes('driverModifyBtn')" class="del" @click="handleStatus(item)">{{ item.states?.label == '启用' ? '停用' : '启用' }}</button>
|
||||||
<button class="revise" @click="updateDriver(item)">修改</button>
|
<button v-if="permissonList.includes('driverModifyBtn')" class="revise" @click="updateDriver(item)">修改</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="" style="display: flex">
|
<div class="" style="display: flex">
|
||||||
@ -62,7 +62,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
import {myMixins} from "@/utils/myMixins"
|
import {myMixins} from "@/utils/myMixins"
|
||||||
import {driverList,enableAction} from "@/api/mine"
|
import {driverList,enableAction,userOperationPermissions} from "@/api/mine"
|
||||||
export default {
|
export default {
|
||||||
name: "driverManage",
|
name: "driverManage",
|
||||||
mixins:[myMixins],
|
mixins:[myMixins],
|
||||||
@ -77,12 +77,14 @@ export default {
|
|||||||
count: 0,
|
count: 0,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
loading1: false,
|
loading1: false,
|
||||||
finished: false
|
finished: false,
|
||||||
|
permissonList:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
this.supplierType = urlParams.get('supplierType');
|
this.supplierType = urlParams.get('supplierType');
|
||||||
|
this.getPermissions();
|
||||||
// this.getDriverList()
|
// this.getDriverList()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
@ -129,6 +131,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async getPermissions(){
|
||||||
|
let res = await userOperationPermissions();
|
||||||
|
this.permissonList = res.data
|
||||||
|
// console.log("司机管理",this.permissonList.includes('driverAddBtn'))
|
||||||
|
|
||||||
|
},
|
||||||
async handleStatus(item){
|
async handleStatus(item){
|
||||||
if(item.states.code === 0){
|
if(item.states.code === 0){
|
||||||
this.states = 1
|
this.states = 1
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<div class="addressName">{{ item.address }}</div>
|
<div class="addressName">{{ item.address }}</div>
|
||||||
<div class="time">{{ item.toDoTime }} {{ item.userName }}</div>
|
<div class="time">{{ item.toDoTime }} {{ item.userName }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right" v-if="permissonList.includes('approve')">
|
||||||
<button class="nopass" @click="todoAudit(item ,2)">不通过</button>
|
<button class="nopass" @click="todoAudit(item ,2)">不通过</button>
|
||||||
<button class="pass" @click="todoAudit(item ,1)">通过</button>
|
<button class="pass" @click="todoAudit(item ,1)">通过</button>
|
||||||
</div>
|
</div>
|
||||||
@ -23,16 +23,18 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getToDoList, toDoAudit} from "@/api/order"
|
import {getToDoList, toDoAudit} from "@/api/order"
|
||||||
|
import {userOperationPermissions} from "@/api/mine"
|
||||||
export default {
|
export default {
|
||||||
name: "toDoList",
|
name: "toDoList",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
todolist: [],
|
todolist: [],
|
||||||
show: false
|
show: false,
|
||||||
|
permissonList:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.getPermissions()
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -45,6 +47,11 @@ export default {
|
|||||||
this.show = false
|
this.show = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async getPermissions(){
|
||||||
|
let res = await userOperationPermissions();
|
||||||
|
this.permissonList = res.data
|
||||||
|
// console.log("代办事项",this.permissonList.includes('approve'))
|
||||||
|
},
|
||||||
async todoAudit(item,type) {
|
async todoAudit(item,type) {
|
||||||
await toDoAudit({
|
await toDoAudit({
|
||||||
toDoId: item.toDoId,
|
toDoId: item.toDoId,
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
:safe-area-inset-top="true"
|
:safe-area-inset-top="true"
|
||||||
@click-left="goBack"
|
@click-left="goBack"
|
||||||
>
|
>
|
||||||
<template slot="right">
|
<template slot="right" v-if="permissonList.includes('vehicleAddBtn')">
|
||||||
<div class="rightWrap" @click="goPage('vehicleAdd')">
|
<div class="rightWrap" @click="goPage('vehicleAdd')">
|
||||||
<img src="@/assets/addImg.png" />
|
<img src="@/assets/addImg.png" />
|
||||||
<span class="addTxt">添加</span>
|
<span class="addTxt">添加</span>
|
||||||
@ -29,8 +29,8 @@
|
|||||||
<div class="carCode">
|
<div class="carCode">
|
||||||
<div class="codeLeft">{{item.plateNumber}} / {{item.vehicleTypeString}}</div>
|
<div class="codeLeft">{{item.plateNumber}} / {{item.vehicleTypeString}}</div>
|
||||||
<div class="twoBtn">
|
<div class="twoBtn">
|
||||||
<button class="del" @click="deleteItem(item.vehicleId)">删除</button>
|
<button v-if="permissonList.includes('vehicleAddBtn')" class="del" @click="deleteItem(item.vehicleId)">删除</button>
|
||||||
<button class="revise" @click="updateVehicle(item)">修改</button>
|
<button v-if="permissonList.includes('vehicleModifyBtn')" class="revise" @click="updateVehicle(item)">修改</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="carType">{{ item.serviceName }}</div>
|
<div class="carType">{{ item.serviceName }}</div>
|
||||||
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { myMixins} from "@/utils/myMixins";
|
import { myMixins} from "@/utils/myMixins";
|
||||||
import {supplierVehicleList,deleteVehicle} from "@/api/mine"
|
import {supplierVehicleList,deleteVehicle,userOperationPermissions} from "@/api/mine"
|
||||||
export default {
|
export default {
|
||||||
name: "vehicleManage",
|
name: "vehicleManage",
|
||||||
mixins:[myMixins],
|
mixins:[myMixins],
|
||||||
@ -65,11 +65,13 @@ export default {
|
|||||||
loading:false,
|
loading:false,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
loading1: false,
|
loading1: false,
|
||||||
finished: false
|
finished: false,
|
||||||
|
permissonList:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.getVehicleList();
|
// this.getVehicleList();
|
||||||
|
this.getPermissions();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
async onLoad(){
|
async onLoad(){
|
||||||
@ -104,6 +106,11 @@ export default {
|
|||||||
this.vehicleList = preList.concat(arr)
|
this.vehicleList = preList.concat(arr)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async getPermissions(){
|
||||||
|
let res = await userOperationPermissions();
|
||||||
|
this.permissonList = res.data
|
||||||
|
console.log("车辆管理",this.permissonList.includes('vehicleAddBtn','vehicleModifyBtn'))
|
||||||
|
},
|
||||||
deleteItem(id){//删除车辆
|
deleteItem(id){//删除车辆
|
||||||
this.show=true
|
this.show=true
|
||||||
this.id=id
|
this.id=id
|
||||||
|
@ -57,9 +57,9 @@
|
|||||||
<span class="allTxt">{{ item.accountStatus?.label }}</span>
|
<span class="allTxt">{{ item.accountStatus?.label }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="rightBtn">
|
<div class="rightBtn">
|
||||||
<button class="btn" v-if="queryType == 1" @click="handleAccounting(item)">记账</button>
|
<button class="btn" v-if="queryType == 1 && permissonList.includes('supplierRecordOperation')" @click="handleAccounting(item)">记账</button>
|
||||||
<button class="btn" v-if="queryType == 3" @click="handleAccounting(item)">{{item.accountStatus.code == 3 ? '重新记账' : '记账'}}</button>
|
<button class="btn" v-if="queryType == 3 && permissonList.includes('supplierRecordOperation')" @click="handleAccounting(item)">{{item.accountStatus.code == 3 ? '重新记账' : '记账'}}</button>
|
||||||
<button class="btn" v-if="queryType == 5" @click="handleAccounting(item)">重新记账</button>
|
<button class="btn" v-if="queryType == 5 && permissonList.includes('supplierRecordOperation')" @click="handleAccounting(item)">重新记账</button>
|
||||||
<button class="btn" v-if="queryType == 7" @click="goPageDetail(item)">查看详情</button>
|
<button class="btn" v-if="queryType == 7" @click="goPageDetail(item)">查看详情</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {myMixins} from "@/utils/myMixins"
|
import {myMixins} from "@/utils/myMixins"
|
||||||
import {accountRecordList} from "@/api/mine"
|
import {accountRecordList,userOperationPermissions} from "@/api/mine"
|
||||||
import {timeFormat} from "@/utils/common"
|
import {timeFormat} from "@/utils/common"
|
||||||
export default {
|
export default {
|
||||||
name: "workOrderReconciliation",
|
name: "workOrderReconciliation",
|
||||||
@ -93,6 +93,7 @@ export default {
|
|||||||
currentDate: new Date(),
|
currentDate: new Date(),
|
||||||
ymTime: '',//默认显示时间为当年当月
|
ymTime: '',//默认显示时间为当年当月
|
||||||
isLoading:"",
|
isLoading:"",
|
||||||
|
permissonList:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -100,6 +101,7 @@ export default {
|
|||||||
this.queryType=this.$route.params?.queryType || this.queryType
|
this.queryType=this.$route.params?.queryType || this.queryType
|
||||||
this.initIndex()
|
this.initIndex()
|
||||||
this.initSelectTime();
|
this.initSelectTime();
|
||||||
|
this.getPermissions();
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
@ -134,6 +136,12 @@ export default {
|
|||||||
this.orderList = res.data;
|
this.orderList = res.data;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async getPermissions(){
|
||||||
|
let res = await userOperationPermissions();
|
||||||
|
this.permissonList = res.data
|
||||||
|
console.log("1122",this.permissonList)
|
||||||
|
// console.log('工单对账',this.permissonList.includes('supplierRecordOperation'))
|
||||||
|
},
|
||||||
handleAccounting(item){
|
handleAccounting(item){
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'accountingView', // 目标路由的名称
|
name: 'accountingView', // 目标路由的名称
|
||||||
|
Reference in New Issue
Block a user