系统管理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 state.topbarRouters = routes
}, },
SET_SIDEBAR_ROUTERS: (state, routes) => { SET_SIDEBAR_ROUTERS: (state, routes) => {
console.log('==SET_SIDEBAR_ROUTERS==:',routes) // console.log('==SET_SIDEBAR_ROUTERS==:',routes)
state.sidebarRouters = routes state.sidebarRouters = routes
}, },
}, },

View File

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

View File

@ -5,6 +5,7 @@
</div> </div>
</template> </template>
<script> <script>
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
export default { export default {
name: "StatusBtn2", name: "StatusBtn2",
props: { props: {
@ -15,7 +16,14 @@ export default {
}, },
computed: { computed: {
state() { 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 <el-table-column
prop="name" prop="name"
label="部门名称" label="部门名称"
width="260"></el-table-column> min-width="260"></el-table-column>
<el-table-column <el-table-column
prop="leader" prop="leader"
label="负责人" label="负责人"
:formatter="userNicknameFormat" :formatter="userNicknameFormat"
width="120" /> min-width="120" />
<el-table-column prop="sort" label="排序" width="200"></el-table-column> <el-table-column prop="sort" label="排序" width="200"></el-table-column>
<el-table-column prop="status" label="状态" width="100"> <el-table-column prop="status" label="状态" width="100">
<template v-slot="scope"> <template v-slot="scope">
@ -37,7 +37,7 @@
label="创建时间" label="创建时间"
align="center" align="center"
prop="createTime" prop="createTime"
width="200"> min-width="200">
<template v-slot="scope"> <template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
@ -45,32 +45,38 @@
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
width="160"
class-name="small-padding fixed-width"> class-name="small-padding fixed-width">
<template v-slot="scope"> <template v-slot="scope">
<el-button <el-button
size="mini"
type="text" 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)" @click="handleAdd(scope.row)"
v-hasPermi="['system:dept:create']"> v-hasPermi="['system:dept:create']">
新增 新增
</el-button> </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 <el-button
v-if="scope.row.parentId !== 0" v-if="scope.row.parentId !== 0"
size="mini"
type="text" type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:dept:delete']"> v-hasPermi="['system:dept:delete']">
删除 <svg-icon icon-class="table_delete"></svg-icon>
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -117,9 +123,9 @@
style="width: 100%"> style="width: 100%">
<el-option <el-option
v-for="item in users" v-for="item in users"
:key="parseInt(item.id)" :key="item.id"
:label="item.nickname" :label="item.nickname"
:value="parseInt(item.id)" /> :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -316,7 +322,7 @@ export default {
return '未设置'; return '未设置';
} }
for (const user of this.users) { for (const user of this.users) {
if (row.leaderUserId === user.id) { if (row.leaderUserId == user.id) {
return user.nickname; return user.nickname;
} }
} }

View File

@ -32,10 +32,23 @@
</el-table-column> </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">
<template v-slot="scope"> <template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button
v-hasPermi="['system:dict:update']">修改</el-button> type="text"
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:dict:delete']">删除</el-button> 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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -33,12 +33,25 @@
<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" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width='100'>
<template v-slot="scope"> <template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button
v-hasPermi="['system:dict:update']">修改</el-button> type="text"
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:dict:delete']">删除</el-button> 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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -52,31 +52,36 @@
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
width="160"
class-name="small-padding fixed-width"> class-name="small-padding fixed-width">
<template v-slot="scope"> <template v-slot="scope">
<el-button <el-button
size="mini"
type="text" 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)" @click="handleAdd(scope.row)"
v-hasPermi="['system:menu:create']"> v-hasPermi="['system:menu:create']">
新增 新增
</el-button> </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 <el-button
size="mini"
type="text" type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:menu:delete']"> v-hasPermi="['system:menu:delete']">
删除 <svg-icon icon-class="table_delete"></svg-icon>
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>

View File

@ -27,12 +27,25 @@
<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" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width='100'>
<template v-slot="scope"> <template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" <el-button
v-hasPermi="['system:post:update']">修改</el-button> type="text"
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:post:delete']">删除</el-button> 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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

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