微调下拉框,数据库字段
This commit is contained in:
@@ -3,8 +3,8 @@ import type {ErrorSystem} from "./interface"
|
||||
const errordata = ref<ErrorSystem.ErrorSystemList[]>([
|
||||
{
|
||||
id: '1',
|
||||
name: 'Q/GDW 1650.2- 2016',
|
||||
standard_Name:'',
|
||||
name: 'Q/GDW 1650.2-2016-A',
|
||||
standard_Name:'Q/GDW 1650.2-2016',
|
||||
standard_Time:'2016',
|
||||
dev_Level:'A级',
|
||||
enable:1,
|
||||
@@ -12,8 +12,8 @@ const errordata = ref<ErrorSystem.ErrorSystemList[]>([
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: 'Q/GDW 1650.2- 2021',
|
||||
standard_Name:'',
|
||||
name: 'Q/GDW 1650.2-2021-A',
|
||||
standard_Name:'Q/GDW 1650.2-2021',
|
||||
standard_Time:'2021',
|
||||
dev_Level:'A级',
|
||||
enable:1,
|
||||
@@ -21,8 +21,8 @@ const errordata = ref<ErrorSystem.ErrorSystemList[]>([
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
name: 'GBT 19862 - 2016',
|
||||
standard_Name:'',
|
||||
name: 'GBT 19862-2016-A',
|
||||
standard_Name:'GBT 19862-2016',
|
||||
standard_Time:'2016',
|
||||
dev_Level:'A级',
|
||||
enable:1,
|
||||
|
||||
@@ -7,7 +7,7 @@ export namespace ErrorSystem {
|
||||
standard_Name:string;//参照标准名称
|
||||
standard_Time:string;//标准推行时间
|
||||
dev_Level:string;//使用设备等级
|
||||
enable:number;//状态:0-不启用 1-启用
|
||||
enable?:number;//状态:0-不启用 1-启用
|
||||
state:number;//0-删除 1-正常
|
||||
create_By?:string;//创建用户
|
||||
create_Time?:string;//创建时间
|
||||
|
||||
@@ -62,7 +62,7 @@ const plandata = ref<Plan.PlanList[]>([
|
||||
'error_Sys_Id':'Q/GDW 10650.2 - 2021',
|
||||
'test_State':'检测完成',
|
||||
'report_State':'部分生成',
|
||||
'result':'符合',
|
||||
'result':'不符合',
|
||||
'state': 1,
|
||||
'create_By':'',
|
||||
'create_Time':'',
|
||||
|
||||
@@ -13,7 +13,7 @@ export namespace Resource {
|
||||
path:string;//路径
|
||||
icon?:string;//图标
|
||||
sort:number;//排序
|
||||
type:number;//资源类型0-菜单、1-按钮、2-公共资源、3-服务间调用资源
|
||||
type?:number;//资源类型0-菜单、1-按钮、2-公共资源、3-服务间调用资源
|
||||
remark?: string;//权限资源描述
|
||||
state:number;//权限资源状态
|
||||
create_By?:string;//创建人
|
||||
|
||||
@@ -7,7 +7,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
'pid':'0',
|
||||
'pids':'',
|
||||
'name': '检测计划',
|
||||
'code':'',
|
||||
'code':'route',
|
||||
'path':'/plan/planList/index',
|
||||
'icon':'',
|
||||
'sort':100,
|
||||
@@ -20,7 +20,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'0',
|
||||
pids:'',
|
||||
name: '台账管理',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/machine',
|
||||
icon:'',
|
||||
sort:100,
|
||||
@@ -32,11 +32,11 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'11',
|
||||
pids:'',
|
||||
name: '检测脚本',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/machine/testScript/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
type:0,
|
||||
type:1,
|
||||
remark: '检测脚本描述',
|
||||
state:1,
|
||||
},
|
||||
@@ -45,11 +45,11 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'22',
|
||||
pids:'',
|
||||
name: '被检设备',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
type:0,
|
||||
type:1,
|
||||
remark: '被检设备描述',
|
||||
state:1,
|
||||
},
|
||||
@@ -58,11 +58,11 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'23',
|
||||
pids:'',
|
||||
name: '误差体系',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
type:0,
|
||||
type:1,
|
||||
remark: '误差体系描述',
|
||||
state:1,
|
||||
},
|
||||
@@ -71,11 +71,11 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'24',
|
||||
pids:'',
|
||||
name: '检测源',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
type:0,
|
||||
type:1,
|
||||
remark: '检测源描述',
|
||||
state:1,
|
||||
}]
|
||||
@@ -85,7 +85,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'0',
|
||||
pids:'',
|
||||
name: '权限管理',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
@@ -97,7 +97,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'1',
|
||||
pids:'',
|
||||
name: '用户管理',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
@@ -110,7 +110,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'2',
|
||||
pids:'',
|
||||
name: '角色管理',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
@@ -123,7 +123,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'3',
|
||||
pids:'',
|
||||
name: '菜单管理',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
@@ -137,7 +137,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'0',
|
||||
pids:'',
|
||||
name: '系统配置',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
@@ -149,7 +149,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'1',
|
||||
pids:'',
|
||||
name: '通用配置',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
@@ -162,7 +162,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'2',
|
||||
pids:'',
|
||||
name: '数据字典',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
@@ -175,7 +175,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'3',
|
||||
pids:'',
|
||||
name: '报告模版',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
@@ -188,7 +188,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'4',
|
||||
pids:'',
|
||||
name: '版本注册',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
@@ -202,7 +202,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'0',
|
||||
pids:'',
|
||||
name: '日志管理',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
@@ -215,7 +215,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'0',
|
||||
pids:'',
|
||||
name: '统计分析',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
@@ -228,7 +228,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'0',
|
||||
pids:'',
|
||||
name: '示例',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
@@ -240,7 +240,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'1',
|
||||
pids:'',
|
||||
name: '普通表格',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
@@ -253,7 +253,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
pid:'1',
|
||||
pids:'',
|
||||
name: '表格树',
|
||||
code:'',
|
||||
code:'route',
|
||||
path:'/plan/planList/index',
|
||||
icon:'',
|
||||
sort:100,
|
||||
|
||||
@@ -45,22 +45,27 @@ const dictData: Dict[] = [
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
code: 'type',
|
||||
code: 'resourceType',
|
||||
label: '资源类型',
|
||||
children: [
|
||||
{
|
||||
id: "1",
|
||||
id: "0",
|
||||
label: '菜单',
|
||||
code: 0,
|
||||
},
|
||||
{
|
||||
id: "1",
|
||||
label: '按钮',
|
||||
code: 1,
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
label: '按钮',
|
||||
label: '公共资源',
|
||||
code: 2,
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
label: '公共资源',
|
||||
label: '服务间调用资源',
|
||||
code: 3,
|
||||
},
|
||||
],
|
||||
@@ -87,6 +92,128 @@ const dictData: Dict[] = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
code: 'roleType',
|
||||
label: '角色类型',
|
||||
children: [
|
||||
{
|
||||
id: "0",
|
||||
label: '超级管理员',
|
||||
code: 0,
|
||||
},
|
||||
{
|
||||
id: "1",
|
||||
label: '管理员',
|
||||
code: 1,
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
label: '普通角色',
|
||||
code: 2,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
code: 'roleType',
|
||||
label: '角色类型',
|
||||
children: [
|
||||
{
|
||||
id: "0",
|
||||
label: '超级管理员',
|
||||
code: 0,
|
||||
},
|
||||
{
|
||||
id: "1",
|
||||
label: '管理员',
|
||||
code: 1,
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
label: '普通角色',
|
||||
code: 2,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "5",
|
||||
code: 'planTestState',
|
||||
label: '检测状态',
|
||||
children: [
|
||||
{
|
||||
id: "0",
|
||||
label: '未检',
|
||||
code: '未检',
|
||||
},
|
||||
{
|
||||
id: "1",
|
||||
label: '检测中',
|
||||
code: '检测中',
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
label: '检测完成',
|
||||
code: '检测完成',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "6",
|
||||
code: 'errorLevel',
|
||||
label: '适用设备等级',
|
||||
children: [
|
||||
{
|
||||
id: "0",
|
||||
label: 'A级',
|
||||
code: "A级",
|
||||
},
|
||||
{
|
||||
id: "1",
|
||||
label: 'S级',
|
||||
code: 'S级',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "7",
|
||||
code: 'planReportState',
|
||||
label: '报告生成状态',
|
||||
children: [
|
||||
{
|
||||
id: "0",
|
||||
label: '未生成',
|
||||
code: "未生成",
|
||||
},
|
||||
{
|
||||
id: "1",
|
||||
label: '部分生成',
|
||||
code: '部分生成',
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
label: '全部生成',
|
||||
code: '全部生成',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "6",
|
||||
code: 'planResult',
|
||||
label: '检测结果',
|
||||
children: [
|
||||
{
|
||||
id: "0",
|
||||
label: '符合',
|
||||
code: "符合",
|
||||
},
|
||||
{
|
||||
id: "1",
|
||||
label: '不符合',
|
||||
code: '不符合',
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -12,10 +12,12 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-select v-model="formData.type" placeholder="请选择资源类型">
|
||||
<el-option label="菜单" :value="0"></el-option>
|
||||
<el-option label="按钮" :value="1"></el-option>
|
||||
<el-option label="公共资源" :value="2"></el-option>
|
||||
<el-option label="服务间调用资源" :value="3"></el-option>
|
||||
<el-option
|
||||
v-for="item in dictStore.getDictData('resourceType')"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="remark">
|
||||
@@ -35,6 +37,8 @@
|
||||
import { defineProps, defineEmits,watch,ref, type Ref } from 'vue';
|
||||
import { dialogSmall } from '@/utils/elementBind'
|
||||
import { ElMessage, FormInstance, FormItemRule } from 'element-plus'
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
const dictStore = useDictStore()
|
||||
const props = defineProps<{
|
||||
visible: boolean;
|
||||
dialogTitle: string;
|
||||
|
||||
@@ -93,20 +93,9 @@
|
||||
prop: 'type',
|
||||
label: '类型',
|
||||
width: 150,
|
||||
search: {
|
||||
render: ({searchParam}) => {
|
||||
return (
|
||||
<div class='flx-center'>
|
||||
<el-select placeholder="请选择" v-model={searchParam.type}>
|
||||
<el-option label="菜单" value="0"></el-option>
|
||||
<el-option label="按钮" value="1"></el-option>
|
||||
<el-option label="公共资源" value="2"></el-option>
|
||||
<el-option label="服务间调用资源" value="3"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
enum: dictStore.getDictData('resourceType'),
|
||||
search: { el: 'select', props: { filterable: true } },
|
||||
fieldNames: { label: 'label', value: 'code' },
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
@@ -134,7 +123,6 @@ const openAddDialog = () => {
|
||||
path:'',
|
||||
icon:'',
|
||||
sort:100,
|
||||
type:0,
|
||||
remark: '',
|
||||
state:1,
|
||||
children: [],
|
||||
|
||||
@@ -210,6 +210,7 @@ const openDrawer = (title: string, row: Partial<Role.RoleBO> = {}) => {
|
||||
}
|
||||
|
||||
rolePopupData.value = safeRow
|
||||
|
||||
} else if (title === '设置权限') {
|
||||
permissionUnitVisible.value = true
|
||||
permissionUnitTitle.value = title
|
||||
|
||||
@@ -25,8 +25,12 @@
|
||||
<el-col :span="9">
|
||||
<el-form-item label="适用设备等级" prop="dev_Level">
|
||||
<el-select v-model='formData.dev_Level' placeholder="请选择设备等级">
|
||||
<el-option label="A级" value="A级" />
|
||||
<el-option label="S级" value="S级" />
|
||||
<el-option
|
||||
v-for="item in dictStore.getDictData('errorLevel')"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -34,8 +38,8 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状态" prop="enable">
|
||||
<el-select v-model='formData.enable' placeholder="请选择状态">
|
||||
<el-option label="启用" value="启用" />
|
||||
<el-option label="停用" value="停用" />
|
||||
<el-option label="停用" :value="0" />
|
||||
<el-option label="启用" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -149,6 +153,8 @@
|
||||
import { dialogBig,dialogMiddle} from '@/utils/elementBind'
|
||||
//import IndicatorTypeDialog from "@/views/machine/errorSystem/components/IndicatorTypeDialog.vue"; // 导入子组件
|
||||
import {CirclePlus, Delete, EditPen,FolderOpened,CopyDocument} from '@element-plus/icons-vue'
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
const dictStore = useDictStore()
|
||||
const props = defineProps<{
|
||||
visible: boolean;
|
||||
dialogTitle: string;
|
||||
|
||||
@@ -91,7 +91,7 @@ const columns = ref<ColumnProps<ErrorSystem.ErrorSystemList>[]>([
|
||||
label: '误差体系名称',
|
||||
},
|
||||
{
|
||||
prop: 'Standard_Name',
|
||||
prop: 'standard_Name',
|
||||
label: '参照标准名称',
|
||||
},
|
||||
{
|
||||
@@ -104,7 +104,9 @@ const columns = ref<ColumnProps<ErrorSystem.ErrorSystemList>[]>([
|
||||
prop: 'dev_Level',
|
||||
label: '适用设备等级',
|
||||
width: 120,
|
||||
enum: dictStore.getDictData('errorLevel'),
|
||||
search: { el: 'select', props: { filterable: true } },
|
||||
fieldNames: { label: 'label', value: 'code' },
|
||||
},
|
||||
{ prop: 'operation', label: '操作', fixed: 'right' ,width: 300,},
|
||||
])
|
||||
@@ -124,8 +126,8 @@ const openAddDialog = () => {
|
||||
standard_Name:'',
|
||||
standard_Time:'',
|
||||
dev_Level:'',
|
||||
enable:1,
|
||||
state:1,
|
||||
|
||||
state:0,
|
||||
};
|
||||
dialogTitle.value = '新增误差体系';
|
||||
dialogFormVisible.value = true; // 打开对话框
|
||||
|
||||
@@ -49,6 +49,8 @@ import PlanDialog from "@/views/plan/planList/components/PlanDialog.vue"; // 导
|
||||
import Open from '@/views/plan/planList/components/PlanOpen.vue'
|
||||
import { useViewSize } from '@/hooks/useViewSize'
|
||||
import { useRouter } from "vue-router";
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
const dictStore = useDictStore()
|
||||
const { popupBaseView, viewWidth, viewHeight } = useViewSize()
|
||||
const openView = ref()
|
||||
const planData = planDataList
|
||||
@@ -100,19 +102,25 @@ const columns = reactive<ColumnProps<Plan.PlanList>[]>([
|
||||
prop: 'test_State',
|
||||
label: '检测状态',
|
||||
width: 100,
|
||||
search: { el: 'select', props: { filterable: true } },
|
||||
enum: dictStore.getDictData('planTestState'),
|
||||
search: { el: 'select', props: { filterable: true } },
|
||||
fieldNames: { label: 'label', value: 'code' },
|
||||
},
|
||||
{
|
||||
prop: 'report_State',
|
||||
label: '检测报告状态',
|
||||
width: 150,
|
||||
search: { el: 'select', props: { filterable: true } },
|
||||
enum: dictStore.getDictData('planReportState'),
|
||||
search: { el: 'select', props: { filterable: true } },
|
||||
fieldNames: { label: 'label', value: 'code' },
|
||||
},
|
||||
{
|
||||
prop: 'result',
|
||||
label: '检测结果',
|
||||
width: 100,
|
||||
search: { el: 'select', props: { filterable: true } },
|
||||
enum: dictStore.getDictData('planResult'),
|
||||
search: { el: 'select', props: { filterable: true } },
|
||||
fieldNames: { label: 'label', value: 'code' },
|
||||
},
|
||||
{
|
||||
prop: 'father_Plan_Id',
|
||||
|
||||
Reference in New Issue
Block a user