微调
This commit is contained in:
@@ -30,5 +30,7 @@ export const deletePqErrSys = (params: string[]) => {
|
|||||||
return http.post(`/pqErrSys/delete`, params)
|
return http.post(`/pqErrSys/delete`, params)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//复制误差体系
|
||||||
|
export const copyPqErrSys = (params: ErrorSystem.ErrorSystemList) => {
|
||||||
|
return http.get(`/pqErrSys/copy?id=${params.id}`)
|
||||||
|
}
|
||||||
@@ -9,7 +9,8 @@ export const HOME_URL: string = "/home/index";
|
|||||||
export const LOGIN_URL: string = "/login";
|
export const LOGIN_URL: string = "/login";
|
||||||
|
|
||||||
// 默认主题颜色
|
// 默认主题颜色
|
||||||
export const DEFAULT_PRIMARY: string = "#003078";
|
//export const DEFAULT_PRIMARY: string = "#003078";
|
||||||
|
export const DEFAULT_PRIMARY: string = "#526ADE";
|
||||||
|
|
||||||
// 路由白名单地址(本地存在的路由 staticRouter.ts 中)
|
// 路由白名单地址(本地存在的路由 staticRouter.ts 中)
|
||||||
export const ROUTER_WHITE_LIST: string[] = ["/500"];
|
export const ROUTER_WHITE_LIST: string[] = ["/500"];
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
}
|
}
|
||||||
.el-menu-item:hover {
|
.el-menu-item:hover {
|
||||||
color: #fff; //一级导航划过颜色
|
color: #fff; //一级导航划过颜色
|
||||||
background-color: #5274a5 !important; //一级导航划过背景色
|
//background-color: #5274a5 !important; //一级导航划过背景色
|
||||||
|
background-color: #7588e5 !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
.el-sub-menu__hide-arrow {
|
.el-sub-menu__hide-arrow {
|
||||||
width: 65px;
|
width: 65px;
|
||||||
@@ -47,7 +49,9 @@
|
|||||||
}
|
}
|
||||||
.el-menu-item.is-active {
|
.el-menu-item.is-active {
|
||||||
color: #fff !important; //一级导航文字选中颜色
|
color: #fff !important; //一级导航文字选中颜色
|
||||||
background-color: #5274a5 !important; //一级导航选中背景色
|
//background-color: #5274a5 !important; //一级导航选中背景色
|
||||||
|
background-color: #7588e5 !important;
|
||||||
|
|
||||||
border-bottom: 0 !important;
|
border-bottom: 0 !important;
|
||||||
}
|
}
|
||||||
.el-sub-menu__title {
|
.el-sub-menu__title {
|
||||||
@@ -67,7 +71,9 @@
|
|||||||
color: #fff !important; //二级导航文字选中颜色
|
color: #fff !important; //二级导航文字选中颜色
|
||||||
// background-color: var(--el-color-primary) !important;
|
// background-color: var(--el-color-primary) !important;
|
||||||
// background-color: #5274a5 !important;//二级导航选中背景色
|
// background-color: #5274a5 !important;//二级导航选中背景色
|
||||||
background-color: #5274a5 !important;
|
|
||||||
|
background-color: #7588e5 !important;
|
||||||
|
|
||||||
border-bottom-color: var(--el-color-primary) !important;
|
border-bottom-color: var(--el-color-primary) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,10 +117,11 @@ const handelOpen = async (item: string) => {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
text-align: center;
|
text-align: right;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
a {
|
a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
margin-right: 25px; // 增加右边距
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,14 +33,19 @@ const handleClickMenu = (subItem: Menu.MenuOptions) => {
|
|||||||
// color: var(--el-menu-hover-text-color) !important;
|
// color: var(--el-menu-hover-text-color) !important;
|
||||||
// background-color: transparent !important;
|
// background-color: transparent !important;
|
||||||
color: #fff !important;//一级导航文字选中颜色
|
color: #fff !important;//一级导航文字选中颜色
|
||||||
background-color: #5274a5 !important; //一级导航选中背景色
|
//background-color: #5274a5 !important; //一级导航选中背景色
|
||||||
|
|
||||||
|
background-color: #7588e5 !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
.el-menu--collapse {
|
.el-menu--collapse {
|
||||||
.is-active {
|
.is-active {
|
||||||
.el-sub-menu__title {
|
.el-sub-menu__title {
|
||||||
color: #ffffff !important;
|
color: #ffffff !important;
|
||||||
// background-color: var(--el-color-primary) !important;
|
// background-color: var(--el-color-primary) !important;
|
||||||
background-color: #5274a5 !important;
|
//background-color: #5274a5 !important;
|
||||||
|
background-color: #7588e5 !important;
|
||||||
|
|
||||||
border-bottom: 0 !important;
|
border-bottom: 0 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,7 +58,9 @@ const handleClickMenu = (subItem: Menu.MenuOptions) => {
|
|||||||
// color: var(--el-menu-active-color) !important;
|
// color: var(--el-menu-active-color) !important;
|
||||||
// background-color: var(--el-menu-active-bg-color) !important;
|
// background-color: var(--el-menu-active-bg-color) !important;
|
||||||
color: #fff !important;//一级导航文字选中颜色
|
color: #fff !important;//一级导航文字选中颜色
|
||||||
background-color: #5274a5 !important; //一级导航选中背景色
|
//background-color: #5274a5 !important; //一级导航选中背景色
|
||||||
|
background-color: #7588e5 !important;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|||||||
@@ -65,5 +65,6 @@ const setupAll = async () => {
|
|||||||
|
|
||||||
//挂载app
|
//挂载app
|
||||||
setupAll().then(() => {
|
setupAll().then(() => {
|
||||||
|
|
||||||
app.mount('#app')
|
app.mount('#app')
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
<!-- 表格操作 -->
|
<!-- 表格操作 -->
|
||||||
<template #operation='scope'>
|
<template #operation='scope'>
|
||||||
<el-button v-auth.device="'view'" type='primary' link :icon='View' @click="openDialog('view', scope.row)">查看</el-button>
|
<el-button v-auth.device="'view'" type='primary' link :icon='View' @click="openDialog('view', scope.row)">查看</el-button>
|
||||||
|
<el-button v-auth.device="'view'" type='primary' link :icon='View' @click="copy(scope.row)">复制</el-button>
|
||||||
<el-button v-auth.device="'edit'" type='primary' link :icon='EditPen' @click="openDialog('edit', scope.row)">编辑</el-button>
|
<el-button v-auth.device="'edit'" type='primary' link :icon='EditPen' @click="openDialog('edit', scope.row)">编辑</el-button>
|
||||||
<el-button v-auth.device="'delete'" type='primary' link :icon='Delete' @click='handleDelete(scope.row)'>删除</el-button>
|
<el-button v-auth.device="'delete'" type='primary' link :icon='Delete' @click='handleDelete(scope.row)'>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -36,7 +37,8 @@ import ErrorSystemPopup from '@/views/machine/errorSystem/components/errorSystem
|
|||||||
import ErrorStandardPopup from '@/views/machine/errorSystem/components/errorStandardPopup.vue'
|
import ErrorStandardPopup from '@/views/machine/errorSystem/components/errorStandardPopup.vue'
|
||||||
import type { ErrorSystem } from '@/api/device/interface/error'
|
import type { ErrorSystem } from '@/api/device/interface/error'
|
||||||
import { useDictStore } from '@/stores/modules/dict'
|
import { useDictStore } from '@/stores/modules/dict'
|
||||||
import { getPqErrSysList, deletePqErrSys} from '@/api/device/error/index'
|
import { getPqErrSysList, deletePqErrSys,copyPqErrSys} from '@/api/device/error/index'
|
||||||
|
import { ElMessageBox } from 'element-plus'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'errorSystem'
|
name: 'errorSystem'
|
||||||
})
|
})
|
||||||
@@ -71,7 +73,7 @@ const columns = ref<ColumnProps<ErrorSystem.ErrorSystemList>[]>([
|
|||||||
search: { el: 'select', props: { filterable: true } },
|
search: { el: 'select', props: { filterable: true } },
|
||||||
fieldNames: { label: 'name', value: 'id' },
|
fieldNames: { label: 'name', value: 'id' },
|
||||||
},
|
},
|
||||||
{ prop: 'operation', label: '操作', fixed: 'right' ,width: 250,},
|
{ prop: 'operation', label: '操作', fixed: 'right' ,width: 300,},
|
||||||
])
|
])
|
||||||
|
|
||||||
// 打开 drawer(新增、编辑)
|
// 打开 drawer(新增、编辑)
|
||||||
@@ -86,19 +88,33 @@ const openDialog = (titleType: string, row: Partial<ErrorSystem.ErrorSystemList>
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 批量删除设备
|
// 批量误差体系
|
||||||
const batchDelete = async (id: string[]) => {
|
const batchDelete = async (id: string[]) => {
|
||||||
await useHandleData(deletePqErrSys, id, '删除所选误差体系')
|
await useHandleData(deletePqErrSys, id, '删除所选误差体系')
|
||||||
proTable.value?.clearSelection()
|
proTable.value?.clearSelection()
|
||||||
proTable.value?.getTableList()
|
proTable.value?.getTableList()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除设备
|
// 删除误差体系
|
||||||
const handleDelete = async (params: ErrorSystem.ErrorSystemList) => {
|
const handleDelete = async (params: ErrorSystem.ErrorSystemList) => {
|
||||||
await useHandleData(deletePqErrSys, [params.id], `删除【${params.name}】误差体系`)
|
await useHandleData(deletePqErrSys, [params.id], `删除【${params.name}】误差体系`)
|
||||||
proTable.value?.getTableList()
|
proTable.value?.getTableList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 复制误差体系
|
||||||
|
const copy = async (params: ErrorSystem.ErrorSystemList) => {
|
||||||
|
ElMessageBox.confirm('是否复制当前误差体系?', '提示', {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: 'warning',
|
||||||
|
draggable: true
|
||||||
|
}).then(async () => {
|
||||||
|
copyPqErrSys(params).then(() => {
|
||||||
|
proTable.value?.getTableList()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user