jiminglei 1 year ago
parent de81020e37
commit 1c1208419a
  1. 5
      psdc-ui/src/api/emonitor/api.js
  2. 37
      psdc-ui/src/views/bigview/index.vue
  3. 29
      psdc-ui/src/views/system/device/index.vue
  4. 1076
      psdc-ui/src/views/system/model/index.vue

@ -133,3 +133,8 @@ export function setKey2(data) {
return request.post('system/secret/key/upKeyData',data)
}
//模型测试
export function modelTest(data) {
return request.post('system/model/getReport',data)
}

@ -27,7 +27,8 @@
<div class="tex">有效期至</div>
<el-date-picker
v-model="value1"
type="date"
type="datetime"
:picker-options="pickerOptions"
placeholder="选择日期">
</el-date-picker>
</div>
@ -70,6 +71,11 @@ const value = ref('')
const result = ref('')
const inputs = ref([])
const keyList = ref([])
const pickerOptions = ref(
{ //
format: 'yyyy-MM-dd HH:mm:ss', //
valueStrictly: true, //
}, )
watch(() => value.value,(newVale,oldValue) => {
@ -90,14 +96,27 @@ watch(() => value2.value,(newVale,oldValue) => {
onMounted(()=>{
let d = new Date();
let today = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate();
let time = d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds();
console.log(today + " " + time);
value1.value= today+ " " + time
value1.value= today
console.log(new Date())
getKey().then((res)=>{
keyList.value= res.data
value.value= res.data[0].key
})
})
function convertISODate(isoString) {
let date = new Date(isoString);
let year = date.getFullYear();
let month = ("0" + (date.getMonth() + 1)).slice(-2);
let day = ("0" + date.getDate()).slice(-2);
let hour = ("0" + date.getHours()).slice(-2);
let minute = ("0" + date.getMinutes()).slice(-2);
let second = ("0" + date.getSeconds()).slice(-2);
return year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
}
function addInput() {
if(inputs.value.length==0){
if(input1.value){
@ -190,16 +209,8 @@ function delInput() {
}
function toResult(){
const dateString = value1.value;
const date = new Date(dateString);
const formattedDate = date.toLocaleString('zh-CN', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit'
});
let formattedDate = convertISODate(value1.value);
console.log(formattedDate)
if(inputs.value.length==0){
if(input1.value){
resultKey(

@ -100,7 +100,8 @@
<el-form-item label="有效期至:" >
<el-date-picker
v-model="addForm1.time"
type="date"
type="datetime"
:picker-options="pickerOptions"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
@ -141,6 +142,11 @@ onMounted(()=>{
KeyList()
getSyList()
})
const pickerOptions = ref(
{ //
format: 'yyyy-MM-dd HH:mm:ss', //
valueStrictly: true, //
}, )
/** 筛选处理 */
const data = reactive({
items:[
@ -349,20 +355,21 @@ function handleXg(dat) {
title1.value = "修改密钥";
open1.value = true;
};
function convertISODate(isoString) {
let date = new Date(isoString);
let year = date.getFullYear();
let month = ("0" + (date.getMonth() + 1)).slice(-2);
let day = ("0" + date.getDate()).slice(-2);
let hour = ("0" + date.getHours()).slice(-2);
let minute = ("0" + date.getMinutes()).slice(-2);
let second = ("0" + date.getSeconds()).slice(-2);
return year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
}
function submitForm1() {
for (let i in addForm1.cpuId){
addForm1.cpuId[i]=addForm1.cpuId[i].value
}
const dateString = addForm1.time;
const date = new Date(dateString);
const formattedDate = date.toLocaleString('zh-CN', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit'
});
let formattedDate = convertISODate(addForm1.time);
setKey2({
"id": addForm1.id,
"cpuIds": addForm1.cpuId,

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save