This commit is contained in:
sjl
2024-12-04 20:00:15 +08:00
15 changed files with 118 additions and 84 deletions

View File

@@ -170,19 +170,19 @@ const testFatherPlanList: Dict[] = [
const sourceDataList: Dict[] = [
{
id: "1",
label: '标准源-福禄克-6100A',
label: '标准源-福禄克6100A-1',
},
{
id: "2",
label: '标准源-昂立-PF2',
label: '标准源-昂立PF2-1',
},
{
id: "3",
label: '标准源-丹迪克-DKLN1',
label: '标准源-丹迪克DKLN1-1',
},
{
id: "4",
label: '标准源-博电源-PQC600A',
label: '标准源-博电PQC600A-1',
},
{
id: "5",
@@ -206,46 +206,80 @@ const sourceDataList: Dict[] = [
const deviceDataList: Dict[] = [
{
id: "1",
label: '模拟装置1',
label: '240001',
},
{
id: "2",
label: '模拟装置2',
label: '240002',
},
{
id: "3",
label: '模拟装置3',
label: '240003',
},
{
id: "4",
label: '模拟装置4',
label: '240004',
},
{
id: "5",
label: '中电送检装置',
label: '240005',
},
{
id: "6",
label: '易司拓测试装置',
label: '240006',
},
{
id: "7",
label: '山大电力测试装置1',
label: '240007',
},
{
id: "8",
label: '山大电力测试装置2',
label: '240008',
},
]
// const deviceDataList: Dict[] = [
// {
// id: "1",
// label: '模拟装置1',
// },
// {
// id: "2",
// label: '模拟装置2',
// },
// {
// id: "3",
// label: '模拟装置3',
// },
// {
// id: "4",
// label: '模拟装置4',
// },
// {
// id: "5",
// label: '中电送检装置',
// },
// {
// id: "6",
// label: '易司拓测试装置',
// },
// {
// id: "7",
// label: '山大电力测试装置1',
// },
// {
// id: "8",
// label: '山大电力测试装置2',
// },
// ]
const planData = ref<Plan.PlanAndSourceBO[]>([
{
'id': '1',
'name': '检测计划1',
'name': '沧州110kV东光站装置送检',
'pattern':'1',
"source_Id" : ['1'],
"testSourceName":'标准源-福禄克-6100A',
"testSourceName":'标准源-福禄克6100A-1',
'dataSource_Id':['1'],
'dataSource_Ids':'实时数据',
'script_Id':'1',
@@ -256,13 +290,13 @@ const planData = ref<Plan.PlanAndSourceBO[]>([
},
{
'id': '2',
'name': '检测计划2',
'name': '邯郸2台安徽振兴终端送检',
'pattern':'1',
"source_Id" : ['5','6','7','8'],
"testSourceName":'高精度设备-PQV520-1',
'father_Plan_Id':'1',
'dataSource_Id':['5'],
'dataSource_Ids':'分钟统计数据CP95值',
'dataSource_Id':['1'],
'dataSource_Ids':'实时数据',
'script_Id':'2',
'error_Sys_Id':'2',
'test_State':'2',
@@ -274,14 +308,14 @@ const planData = ref<Plan.PlanAndSourceBO[]>([
},
{
'id': '3',
'name': '检测子计划3',
'name': '浙江分布式光伏电能质量试点',
'pattern':'1',
"source_Id" : ['3'],
"testSourceName":'标准源-丹迪克-DKLN1',
"testSourceName":'标准源-丹迪克DKLN1-1',
'father_Plan_Id':'1',
'dataSource_Id':['1'],
'dataSource_Ids':'实时数据',
'script_Id':'3',
'script_Id':'4',
'error_Sys_Id':'3',
'test_State':'1',
'report_State':'1',

View File

@@ -7,7 +7,7 @@
{
"id": 4,
"pid": 1,
"name": "邯郸220kV团城站等4座站电能质量检测"
"name": "邯郸220kV团城站电能质量检测"
},
{
"id": 5,
@@ -17,7 +17,7 @@
{
"id": 6,
"pid": 1,
"name": "深圳市中电软件有限公司委托送检"
"name": "深圳市中电公司委托送检"
}
],
"id": 1
@@ -28,17 +28,17 @@
{
"id": 7,
"pid": 2,
"name": "沧州220kV留古等4座变电站电能质量检测"
"name": "沧州220kV留古站电能质量检测"
},
{
"id": 8,
"pid": 2,
"name": "沧州供电公司110kV东光站等10台装置送检"
"name": "沧州110kV东光站装置送检"
},
{
"id": 9,
"pid": 2,
"name": "保定分布式光伏电能质量监测试点"
"name": "浙江分布式光伏电能质量试点"
}
],
"id": 2
@@ -54,7 +54,7 @@
{
"id": 11,
"pid": 3,
"name": "北京2024现场检测"
"name": "深圳2台中电终端委托送检"
}
],
"id": 3

View File

@@ -9,7 +9,7 @@
<!-- 表格 header 按钮 -->
<template #tableHeader='scope'>
<el-button v-auth.role="'add'" type='primary' :icon='CirclePlus' @click="openDrawer('新增角色')">新增</el-button>
<el-button v-auth.role="'batchDelete'" type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
<el-button v-auth.role="'delete'" type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
@click='batchDelete(scope.selectedListIds)'>
删除
</el-button>

View File

@@ -9,7 +9,7 @@
<!-- 表格 header 按钮 -->
<template #tableHeader='scope'>
<el-button v-auth.user="'add'" type='primary' :icon='CirclePlus' @click="openDialog('add')">新增</el-button>
<el-button v-auth.user="'batchDelete'" type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
<el-button v-auth.user="'delete'" type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
@click='batchDelete(scope.selectedListIds)'>
删除
</el-button>

View File

@@ -62,8 +62,8 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="出厂编号" prop="createId" placeholder="请输入出厂编号" :label-width="100">
<el-input v-model="formContent.createId" />
<el-form-item label="出厂编号" prop="createId" :label-width="100">
<el-input v-model="formContent.createId" placeholder="请输入出厂编号"/>
</el-form-item>
</el-col>
</el-row>
@@ -155,20 +155,20 @@
</el-form-item>
</el-col>
<el-col :span="8" v-if="IsPasswordShow">
<el-form-item label='识别码' prop='series' clearable placeholder="请输入识别码" :label-width="100">
<el-input v-model='formContent.series' show-password/>
<el-form-item label='识别码' prop='series' clearable :label-width="100">
<el-input v-model='formContent.series' placeholder="请输入识别码" show-password/>
</el-form-item>
</el-col>
<el-col :span="8" v-if="IsPasswordShow">
<el-form-item label='密钥' prop='devKey' clearable placeholder="请输入密钥" :label-width="100">
<el-input v-model='formContent.devKey' show-password/>
<el-form-item label='密钥' prop='devKey' clearable :label-width="100">
<el-input v-model='formContent.devKey' placeholder="请输入密钥" show-password/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24" v-if="DevIsShow">
<el-col :span="8">
<el-form-item label='样品编号' prop='sampleID' clearable placeholder="请输入样品编号" :label-width="100">
<el-input v-model='formContent.sampleID' />
<el-form-item label='样品编号' prop='sampleID' clearable :label-width="100">
<el-input v-model='formContent.sampleID' placeholder="请输入样品编号" />
</el-form-item>
</el-col>
<el-col :span="8">
@@ -251,12 +251,12 @@ const disabledDate = (time: Date) => {
devVolt:57.74,
devCurr:1,
manufacturer: '',
createDate: '',
createDate: dayjs().format('YYYY-MM-DD'),
createId: '',
hardwareVersion: '',
softwareVersion: '',
protocol: 'MMS',
ip: '',
ip: '192.168.1.200',
port: 102,
encryptionFlag: 1,
reCheckNum:0,
@@ -277,12 +277,12 @@ const disabledDate = (time: Date) => {
devVolt:57.74,
devCurr:1,
manufacturer: '',
createDate: '',
createDate: dayjs().format('YYYY-MM-DD'),
createId: '',
hardwareVersion: '',
softwareVersion: '',
protocol: 'MMS',
ip: '',
ip: '192.168.1.200',
port: 102,
encryptionFlag: 1,
reCheckNum:0,

View File

@@ -10,7 +10,7 @@
<template #tableHeader='scope'>
<el-button v-auth.device="'add'" type='primary' :icon='CirclePlus' @click="openDialog('add')">新增</el-button>
<el-button v-auth.device="'export'" type='primary' :icon='Upload' plain @click='downloadFile()'>导出</el-button>
<el-button v-auth.device="'import'" type='primary' :icon='Download' plain @click='importFile()'>导入</el-button>
<el-button v-auth.device="'import'" type='primary' :icon='Download' plain @click='importFile()' v-if='modeStore.currentMode === "比对式"'>导入</el-button>
<el-button v-auth.device="'delete'" type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
@click='batchDelete(scope.selectedListIds)'>
删除
@@ -69,19 +69,19 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
prop: 'name',
label: '设备名称',
search: { el: 'input' },
minWidth: 200,
minWidth: 180,
},
{
prop: 'devType',
label: '设备类型',
minWidth: 200,
minWidth: 180,
enum: dictStore.getDictData('Dev_Type'),
fieldNames: { label: 'name', value: 'id' },
},
{
prop: 'createDate',
label: '生产日期',
minWidth: 200,
minWidth: 180,
search: {
span: 2,
render: () => {
@@ -120,7 +120,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
enum: dictStore.getDictData('Dev_Manufacturers'),
search: { el: 'select', props: { filterable: true }, order: 1 },
fieldNames: { label: 'name', value: 'id' },
minWidth: 200,
minWidth: 190,
},
{ prop: 'operation', label: '操作', fixed: 'right', width: 200 },
])
@@ -162,10 +162,10 @@ const downloadFile = async () => {
searchParam.searchBeginTime = startDate.value;
searchParam.searchEndTime = endDate.value;
ElMessageBox.confirm('确认导出被检设备?', '温馨提示', { type: 'warning' }).then(() =>
useDownload(exportPqDev,'被检设备导出数据', proTable.value?.searchParam, false,'.xlsx'),
)
ElMessageBox.confirm('确认导出被检设备?', '温馨提示', { type: 'warning' }).then(() =>{
const patternId = dictStore.getDictData('Pattern').find(item=>item.name=== modeStore.currentMode)?.id//获取数据字典中对应的id
useDownload(exportPqDev,'被检设备导出数据', {...proTable.value?.searchParam,pattern:patternId}, false,'.xlsx')
})
}
//导入设备

View File

@@ -15,9 +15,9 @@
</template>
<!-- 表格操作 -->
<template #operation='scope'>
<el-button type='primary' link :icon='View' @click="openDialog('view', scope.row)">查看</el-button>
<el-button type='primary' link :icon='EditPen' @click="openDialog('edit', scope.row)">编辑</el-button>
<el-button type='primary' link :icon='Delete' @click='handleDelete(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="'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>
</template>
</ProTable>
</div>
@@ -74,9 +74,9 @@ const columns = ref<ColumnProps<ErrorSystem.ErrorSystemList>[]>([
// 打开 drawer(新增、编辑)
const openDialog = (titleType: string, row: Partial<ErrorSystem.ErrorSystemList> = {}) => {
if(titleType == 'view'){
errorStandardPopup.value?.open(row.name, row)
//errorStandardPopup.value?.open(row.name, row)
}else{
errorSystemPopup.value?.open(titleType, row)
//errorSystemPopup.value?.open(titleType, row)
}

View File

@@ -9,7 +9,7 @@
<!-- 表格 header 按钮 -->
<template #tableHeader='scope'>
<el-button v-auth.testScript="'add'" type='primary' :icon='CirclePlus' @click="openDialog('add')">新增</el-button>
<el-button v-auth.testScript="'batchDelete'" type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
<el-button v-auth.testScript="'delete'" type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
@click='batchDelete(scope.selectedListIds)'>
删除
</el-button>
@@ -112,9 +112,9 @@ const columns = reactive<ColumnProps<TestScript.ResTestScript>[]>([
// 打开 drawer(新增、编辑)
const openDialog = (titleType: string, row: Partial<TestScript.ResTestScript> = {}) => {
if(modeStore.currentMode == '比对式'){
comparisonPopup.value?.open(titleType, row)
//comparisonPopup.value?.open(titleType, row)
}else{
testScriptPopup.value?.open(titleType, row)
//testScriptPopup.value?.open(titleType, row)
}

View File

@@ -13,7 +13,7 @@
<template #tableHeader='scope'>
<el-button v-auth.testSource="'add'" type='primary' :icon='CirclePlus' @click="openDialog('add')">新增
</el-button>
<el-button v-auth.testSource="'batchDelete'" type='danger' :icon='Delete'
<el-button v-auth.testSource="'delete'" type='danger' :icon='Delete'
plain :disabled='!scope.isSelected' @click='batchDelete(scope.selectedListIds)'>
删除
</el-button>

View File

@@ -5,7 +5,7 @@
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="检测源名称" prop="name" >
<el-input v-model='formContent.name' placeholder="检测源类型+设备类型简称+数字"/>
<el-input v-model='formContent.name' placeholder="源类型+源型号+数字"/>
</el-form-item>
</el-col>
<el-col :span="8">
@@ -21,8 +21,8 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="标准源" prop="type">
<el-select v-model='formContent.type' placeholder="请选择检测源类型">
<el-form-item label="源类型" prop="type">
<el-select v-model='formContent.type' placeholder="请选择源类型">
<el-option
v-for="item in dictStore.getDictData('Pq_Source_Type')"
:key="item.id"

View File

@@ -9,7 +9,7 @@
<!-- 表格 header 按钮 -->
<template #tableHeader='scope'>
<el-button v-auth.testSource="'add'" type='primary' :icon='CirclePlus' @click="openDialog('add')">新增</el-button>
<el-button v-auth.testSource="'batchDelete'" type='danger' :icon='Delete'
<el-button v-auth.testSource="'delete'" type='danger' :icon='Delete'
plain :disabled='!scope.isSelected' @click='batchDelete(scope.selectedListIds)'>
删除
</el-button>

View File

@@ -47,20 +47,20 @@
const generateData = () => {
const data: Option[] = []
const states = [
'模拟装置1',
'模拟装置2',
'模拟装置3',
'模拟装置4',
'中电送检装置',
'易司拓测试装置',
'山大电力测试装置1',
'山大电力测试装置2',
'滚动条测试1',
'滚动条测试2',
'滚动条测试3',
'滚动条测试4',
'滚动条测试5',
'滚动条测试6',
'240001',
'240002',
'240003',
'240004',
'240005',
'240006',
'240007',
'240008',
'240009',
'240010',
'240011',
'240012',
'240013',
'240014',
]
const initials = ['CA', 'IL', 'MD', 'TX', 'FL', 'CO', 'CT', 'GT', 'IL', 'MD', 'TX', 'FL', 'CO', 'CT', 'GT']
states.forEach((city, index) => {
@@ -77,8 +77,8 @@
const generateValue = () => {
const data: number[] = []
const states = [
'山大电力测试装置1',
'山大电力测试装置2',
'240001',
'240002',
]
const initials = ['AB', 'CD']
states.forEach((city, index) => {

View File

@@ -9,7 +9,7 @@
<template #tableHeader="scope">
<el-button v-auth.dict="'show_add'" type="primary" :icon="CirclePlus" @click="openDialog('add')">新增</el-button>
<el-button v-auth.dict="'show_export'" type='primary' :icon='Download' plain @click="downloadFile">导出</el-button>
<el-button v-auth.dict="'show_batchDelete'" type="danger" :icon="Delete" plain :disabled="!scope.isSelected"
<el-button v-auth.dict="'show_delete'" type="danger" :icon="Delete" plain :disabled="!scope.isSelected"
@click="batchDelete(scope.selectedListIds)">
删除
</el-button>

View File

@@ -7,7 +7,7 @@
>
<template #tableHeader='scope'>
<el-button v-auth.dictPq="'add'" type='primary' :icon='CirclePlus' @click="openDialog('add')">新增</el-button>
<el-button v-auth.dictPq="'batchDelete'" type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
<el-button v-auth.dictPq="'delete'" type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
@click='batchDelete(scope.selectedListIds)'>
删除
</el-button>

View File

@@ -8,7 +8,7 @@
<template #tableHeader='scope'>
<el-button v-auth.dict="'add'" type='primary' :icon='CirclePlus' @click="openDialog('add')">新增</el-button>
<el-button v-auth.dict="'export'" type='primary' :icon='Download' plain @click='downloadFile()'>导出</el-button>
<el-button v-auth.dict="'batchDelete'" type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
<el-button v-auth.dict="'delete'" type='danger' :icon='Delete' plain :disabled='!scope.isSelected'
@click='batchDelete(scope.selectedListIds)'>
删除
</el-button>