diff --git a/psdc-ui/src/api/emonitor/api.js b/psdc-ui/src/api/emonitor/api.js index ca2a1e9..2a1aaca 100644 --- a/psdc-ui/src/api/emonitor/api.js +++ b/psdc-ui/src/api/emonitor/api.js @@ -112,7 +112,24 @@ export function setKey(data) { export function getKey() { return request.get('system/key/selAll') } -//修改私钥 +//生成密钥 export function resultKey(data) { return request.post('system/key/getKey',data) -} \ No newline at end of file +} + + +//密钥管理 +//密钥分页查询 +export function getKeyList2(data) { + return request.post('system/secret/key/byPage',data) +} + +//删除密钥 +export function deleteKey2(data) { + return request.post('system/secret/key/delById',data) +} +//修改密钥 +export function setKey2(data) { + return request.post('system/secret/key/upKeyData',data) +} + diff --git a/psdc-ui/src/views/bigview/index.vue b/psdc-ui/src/views/bigview/index.vue index b87e0f2..cc2d602 100644 --- a/psdc-ui/src/views/bigview/index.vue +++ b/psdc-ui/src/views/bigview/index.vue @@ -8,24 +8,14 @@
私钥:
- - - - + +
cpuid:
- - - - @@ -73,14 +63,12 @@ import { ElMessage } from 'element-plus' import {ref, onMounted, watch,reactive} from 'vue' import {useRouter} from "vue-router"; const router = useRouter(); -const input1 = ref('BFEBFBFF00090672') -const input2 = ref('BFEBFBFF000806EA') +const input1 = ref('') const value1 = ref('') const value2 = ref('') const value = ref('') const result = ref('') -const inputs = ref([ -]) +const inputs = ref([]) const keyList = ref([]) @@ -112,8 +100,8 @@ onMounted(()=>{ }) function addInput() { if(inputs.value.length==0){ - if(input1.value && input2.value){ - if(inputs.value.length<3){ + if(input1.value){ + if(inputs.value.length<4){ inputs.value.push({ value: '' }); }else { ElMessage({ @@ -128,8 +116,8 @@ function addInput() { }) } }else if (inputs.value.length==1){ - if(input1.value && input2.value && inputs.value[0].value){ - if(inputs.value.length<3){ + if(input1.value && inputs.value[0].value){ + if(inputs.value.length<4){ inputs.value.push({ value: '' }); }else { ElMessage({ @@ -145,8 +133,8 @@ function addInput() { } } else if (inputs.value.length==2){ - if(input1.value && input2.value && inputs.value[0].value && inputs.value[1].value){ - if(inputs.value.length<3){ + if(input1.value && inputs.value[0].value && inputs.value[1].value){ + if(inputs.value.length<4){ inputs.value.push({ value: '' }); }else { ElMessage({ @@ -162,8 +150,25 @@ function addInput() { } } else if (inputs.value.length==3){ - if(input1.value && input2.value && inputs.value[0].value && inputs.value[1].value && inputs.value[2].value){ - if(inputs.value.length<3){ + if(input1.value && inputs.value[0].value && inputs.value[1].value && inputs.value[2].value){ + if(inputs.value.length<4){ + inputs.value.push({ value: '' }); + }else { + ElMessage({ + message: 'cpuId最多可添加5个', + type: 'warning', + }) + } + }else { + ElMessage({ + message: 'cpuId输入框不能为空', + type: 'error', + }) + } + } + else if (inputs.value.length==4){ + if(input1.value && inputs.value[0].value && inputs.value[1].value && inputs.value[2].value && inputs.value[3].value){ + if(inputs.value.length<4){ inputs.value.push({ value: '' }); }else { ElMessage({ @@ -196,12 +201,11 @@ function toResult(){ second: '2-digit' }); if(inputs.value.length==0){ - if(input1.value && input2.value){ + if(input1.value){ resultKey( { "cpuIds": [ input1.value, - input2.value, ], "key": value.value, "expiration": formattedDate, @@ -220,12 +224,11 @@ function toResult(){ }else if (inputs.value.length==1){ - if(input1.value && input2.value && inputs.value[0].value){ + if(input1.value && inputs.value[0].value){ resultKey( { "cpuIds": [ input1.value, - input2.value, inputs.value[0].value, ], "key": value.value, @@ -244,12 +247,11 @@ function toResult(){ } } else if (inputs.value.length==2){ - if(input1.value && input2.value && inputs.value[0].value && inputs.value[1].value){ + if(input1.value && inputs.value[0].value && inputs.value[1].value){ resultKey( { "cpuIds": [ input1.value, - input2.value, inputs.value[0].value, inputs.value[1].value, ], @@ -269,15 +271,40 @@ function toResult(){ } } else if (inputs.value.length==3){ - if(input1.value && input2.value && inputs.value[0].value && inputs.value[1].value && inputs.value[2].value){ + if(input1.value && inputs.value[0].value && inputs.value[1].value && inputs.value[2].value){ + resultKey( + { + "cpuIds": [ + input1.value, + inputs.value[0].value, + inputs.value[1].value, + inputs.value[2].value, + ], + "key": value.value, + "expiration": formattedDate, + "companyname": value2.value + } + ).then((res)=>{ + ElMessage({type:"success",message:'生成成功!'}) + result.value=res.key + }) + }else { + ElMessage({ + message: 'cpuId输入框不能为空', + type: 'error', + }) + } + } + else if (inputs.value.length==4){ + if(input1.value && inputs.value[0].value && inputs.value[1].value && inputs.value[2].value && inputs.value[3].value){ resultKey( { "cpuIds": [ input1.value, - input2.value, inputs.value[0].value, inputs.value[1].value, inputs.value[2].value, + inputs.value[3].value, ], "key": value.value, "expiration": formattedDate, diff --git a/psdc-ui/src/views/system/cl/index.vue b/psdc-ui/src/views/system/cl/index.vue index 287dd5b..59413b5 100644 --- a/psdc-ui/src/views/system/cl/index.vue +++ b/psdc-ui/src/views/system/cl/index.vue @@ -19,7 +19,7 @@
- + @@ -32,17 +32,14 @@ - + v-model:page="currentPage" + v-model:limit="pageSize" + @pagination="KeyList" + />
@@ -156,10 +153,11 @@ function handleCheckedCitiesChange(value) { function KeyList(){ getKeyList({ "keyUnit": data.sceneCode, - "pageCurrent": 1, - "pageSize": 10 + "pageCurrent": currentPage.value, + "pageSize": pageSize.value }).then((res)=>{ data.timingList=res.data + data.total=res.page.pageTotalRow }) } /** 数据表格处理 */ @@ -170,32 +168,10 @@ const small = ref(false) const background = ref(false) const disabled = ref(false) const handleSizeChange = (val) => { - console.log(`${val}`) - getTb({ - "sceneCode": data.sceneCode, - - "pageNum": currentPage.value, - - "pageSize": pageSize.value - }).then((res)=>{ - console.log(res) - data.timingList=res.rows - data.total=res.total - }) + KeyList() } const handleCurrentChange = (val) => { - console.log(`${val}`) - getTb({ - "sceneCode": data.sceneCode, - - "pageNum": currentPage.value, - - "pageSize": pageSize.value - }).then((res)=>{ - console.log(res) - data.timingList=res.rows - data.total=res.total - }) + KeyList() } @@ -373,7 +349,7 @@ const { queryParams } = toRefs(data); .dev_control_table{ position: relative; width: 100%; - min-height: 745px; + min-height: 730px; background-color: #2F3D8A; } .taber{ @@ -393,10 +369,7 @@ const { queryParams } = toRefs(data); border-radius: 2px; } ::v-deep .el-pagination{ - position: absolute; - bottom: 10px; - left: 50%; - transform: translateX(-50%); + transform: translateX(-10%); } ::v-deep .el-pagination__total{ color: #f3ffff; @@ -416,8 +389,6 @@ const { queryParams } = toRefs(data); ::v-deep .el-checkbox { width: 560px; } -//::v-deep .el-dialog:not(.is-fullscreen){ -// width: auto; -//} + diff --git a/psdc-ui/src/views/system/device/index.vue b/psdc-ui/src/views/system/device/index.vue index 0a088d0..02e92bc 100644 --- a/psdc-ui/src/views/system/device/index.vue +++ b/psdc-ui/src/views/system/device/index.vue @@ -3,162 +3,63 @@ - - - - - + + + + 搜索 重置 - 新增 - - - 导入 - - - 导出 +
- - - - - - - - - - - - - -