Commit bd97bf09 authored by 何鹏程's avatar 何鹏程

修改bug

parent 367df53c
......@@ -13,9 +13,8 @@ export const roleMixin = {
])
},
mounted() {
console.log(this.userInfo)
if (this.userInfo.roleId === 3) {
this.searchForm.area = this.userInfo.roleId
this.searchForm.area = this.userInfo.area
this.isRoleDisabled = true
}
}
......
......@@ -43,7 +43,7 @@
<div class="top-main">
<div class="box">
<div class="title">
车辆用途占比
车辆特殊用途占比
</div>
<EchartsPie
:dataList="vechieSpecialList"
......
......@@ -211,17 +211,17 @@
type="primary"
v-if="!scope.row.siteId && !checkPermission()"
@click="siteHandler(scope.row.id)"
>绑定{{scope.row.siteId}}站点</el-link>
<el-link
type="primary"
v-if="scope.row.siteId && !checkPermission()"
@click="unboundHandler(scope.row.id)"
>解绑</el-link>
>绑定站点</el-link>
<el-link
type="primary"
v-if="(scope.row.auditStatus === 1 || scope.row.auditStatus === 5) && checkPermission()"
@click="auditHandler(scope.row.id)"
>审核</el-link>
<el-link
type="primary"
v-if="scope.row.siteId && checkPermission() && !isRoleDisabled"
@click="unboundHandler(scope.row.id)"
>解绑</el-link>
</template>
</el-table-column>
</el-table>
......@@ -299,7 +299,7 @@ export default {
name: '车辆负责人',
key: 'vehicleManager',
sortable: false,
width: '200',
width: '100',
fixed: false
},
{
......@@ -332,6 +332,13 @@ export default {
sortable: false,
width: '100',
fixed: false
},
{
name: '所属站点',
key: 'siteName',
sortable: false,
width: '100',
fixed: false
}
],
body: [],
......
......@@ -115,6 +115,7 @@
>查看详情</el-link>
<el-link
type="primary"
:disabled="scope.row.patientType === 5"
@click="goDetail('update', scope.row)"
v-if="!checkPermission()"
>修改</el-link>
......
......@@ -78,6 +78,9 @@ export default {
rules: {
roleId: [
{ required: true, message: '请选择角色类型' },
],
area: [
{ required: true, message: '请选择管理区域' },
]
}
}
......
......@@ -141,24 +141,6 @@
<el-radio :label="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="区域"
prop="area"
>
<el-select
v-model="dataForm.area"
placeholder="请选择辖区"
style="width: 100%"
:clearable="true"
>
<el-option
v-for="item in areaList"
:label="item.name"
:key="item.id"
:value="item.val"
/>
</el-select>
</el-form-item>
</el-form>
<span
slot="footer"
......
......@@ -234,7 +234,7 @@ export default {
},
{
name: '管理区域',
key: 'area',
key: 'areaStr',
sortable: false,
width: '150',
fixed: false
......
......@@ -39,7 +39,7 @@ const staticRoute = [
const routeHandle = (map) => {
const routers = []
map.forEach(item => {
if(item.secondMenuList || item.secondMenuList.length > 0) {
if(item.secondMenuList && item.secondMenuList.length > 0) {
const children = []
item.secondMenuList.forEach(_item => {
children.push({
......
......@@ -5,5 +5,5 @@ import store from '@/store'
*/
export default function checkPermission() {
const userInfo = store.getters && store.getters.userInfo
return userInfo && userInfo.roleId && userInfo.roleId === 1
return userInfo && userInfo.roleId && (userInfo.roleId === 1 || userInfo.roleId === 3)
}
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