系统管理bug

This commit is contained in:
朱菊兰 2025-01-07 14:27:13 +08:00
parent 30c45e6f74
commit 580a66549c
9 changed files with 108 additions and 51 deletions

View File

@ -23,7 +23,7 @@ const permission = {
state.topbarRouters = routes
},
SET_SIDEBAR_ROUTERS: (state, routes) => {
console.log('==SET_SIDEBAR_ROUTERS==:',routes)
// console.log('==SET_SIDEBAR_ROUTERS==:',routes)
state.sidebarRouters = routes
},
},

View File

@ -28,7 +28,6 @@ import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { deleteProgramTypeData } from '@/api/equipment/base/maintain/items'
import showDetail from './showDetail.vue'
import { publicFormatter } from '@/utils/dict';
export default {
name: 'PlanConfig',

View File

@ -5,6 +5,7 @@
</div>
</template>
<script>
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
export default {
name: "StatusBtn2",
props: {
@ -15,7 +16,14 @@ export default {
},
computed: {
state() {
return this.injectData.status === 1 ? "关闭" : "开启";
let label = ''
getDictDatas(DICT_TYPE.COMMON_STATUS).forEach((item) => {
if (parseInt(item.value) === this.injectData.status) {
label = item.label;
}
})
return label
// return this.injectData.status === 1 ? "" : "";
},
},
};

View File

@ -21,12 +21,12 @@
<el-table-column
prop="name"
label="部门名称"
width="260"></el-table-column>
min-width="260"></el-table-column>
<el-table-column
prop="leader"
label="负责人"
:formatter="userNicknameFormat"
width="120" />
min-width="120" />
<el-table-column prop="sort" label="排序" width="200"></el-table-column>
<el-table-column prop="status" label="状态" width="100">
<template v-slot="scope">
@ -37,7 +37,7 @@
label="创建时间"
align="center"
prop="createTime"
width="200">
min-width="200">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
@ -45,32 +45,38 @@
<el-table-column
label="操作"
align="center"
width="160"
class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:dept:update']">
修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-plus"
@click="handleAdd(scope.row)"
v-hasPermi="['system:dept:create']">
新增
</el-button>
<span
v-hasPermi="['system:dept:update']"
style="margin: 0 4px; font-size: 18px; color: #e5e7eb"
>|</span
>
<el-button
type="text"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:dept:update']">
<svg-icon icon-class="table_edit" style='font-size: 16px;'></svg-icon>
</el-button>
<span
v-if="scope.row.parentId !== 0"
v-hasPermi="['system:dept:delete']"
style="margin: 0 4px; font-size: 18px; color: #e5e7eb"
>|</span
>
<el-button
v-if="scope.row.parentId !== 0"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:dept:delete']">
删除
<svg-icon icon-class="table_delete"></svg-icon>
</el-button>
</template>
</el-table-column>
@ -117,9 +123,9 @@
style="width: 100%">
<el-option
v-for="item in users"
:key="parseInt(item.id)"
:key="item.id"
:label="item.nickname"
:value="parseInt(item.id)" />
:value="item.id" />
</el-select>
</el-form-item>
</el-col>
@ -316,7 +322,7 @@ export default {
return '未设置';
}
for (const user of this.users) {
if (row.leaderUserId === user.id) {
if (row.leaderUserId == user.id) {
return user.nickname;
}
}

View File

@ -32,10 +32,23 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['system:dict:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['system:dict:delete']">删除</el-button>
<el-button
type="text"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:dict:update']">
<svg-icon icon-class="table_edit" style='font-size: 16px;'></svg-icon>
</el-button>
<span
v-hasPermi="['system:dict:delete']"
style="margin: 0 4px; font-size: 18px; color: #e5e7eb"
>|</span
>
<el-button
type="text"
@click="handleDelete(scope.row)"
v-hasPermi="['system:dict:delete']">
<svg-icon icon-class="table_delete"></svg-icon>
</el-button>
</template>
</el-table-column>
</el-table>

View File

@ -33,12 +33,25 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width='100'>
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['system:dict:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['system:dict:delete']">删除</el-button>
<el-button
type="text"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:dict:update']">
<svg-icon icon-class="table_edit" style='font-size: 16px;'></svg-icon>
</el-button>
<span
v-hasPermi="['system:dict:delete']"
style="margin: 0 4px; font-size: 18px; color: #e5e7eb"
>|</span
>
<el-button
type="text"
@click="handleDelete(scope.row)"
v-hasPermi="['system:dict:delete']">
<svg-icon icon-class="table_delete"></svg-icon>
</el-button>
</template>
</el-table-column>
</el-table>

View File

@ -52,31 +52,36 @@
<el-table-column
label="操作"
align="center"
width="160"
class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:menu:update']">
修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-plus"
@click="handleAdd(scope.row)"
v-hasPermi="['system:menu:create']">
新增
</el-button>
<span
v-hasPermi="['system:menu:update']"
style="margin: 0 4px; font-size: 18px; color: #e5e7eb"
>|</span
>
<el-button
type="text"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:menu:update']">
<svg-icon icon-class="table_edit" style='font-size: 16px;'></svg-icon>
</el-button>
<span
v-hasPermi="['system:menu:delete']"
style="margin: 0 4px; font-size: 18px; color: #e5e7eb"
>|</span
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:menu:delete']">
删除
<svg-icon icon-class="table_delete"></svg-icon>
</el-button>
</template>
</el-table-column>

View File

@ -27,12 +27,25 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width='100'>
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['system:post:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['system:post:delete']">删除</el-button>
<el-button
type="text"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:post:update']">
<svg-icon icon-class="table_edit" style='font-size: 16px;'></svg-icon>
</el-button>
<span
v-hasPermi="['system:post:delete']"
style="margin: 0 4px; font-size: 18px; color: #e5e7eb"
>|</span
>
<el-button
type="text"
@click="handleDelete(scope.row)"
v-hasPermi="['system:post:delete']">
<svg-icon icon-class="table_delete"></svg-icon>
</el-button>
</template>
</el-table-column>
</el-table>

View File

@ -242,8 +242,8 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitRole"> </el-button>
<el-button @click="cancelRole"> </el-button>
<el-button type="primary" @click="submitRole"> </el-button>
</div>
</base-dialog>
</div>
@ -297,7 +297,7 @@ const tableProps = [
prop: 'dept',
label: '部门',
minWidth: 120,
filter: (item) => item.name || '',
filter: (item) => item?.name || '',
showOverflowtooltip: true,
},
{