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

@ -100,7 +100,8 @@
<el-form-item label="有效期至:" > <el-form-item label="有效期至:" >
<el-date-picker <el-date-picker
v-model="addForm1.time" v-model="addForm1.time"
type="date" type="datetime"
:picker-options="pickerOptions"
placeholder="选择日期"> placeholder="选择日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -141,6 +142,11 @@ onMounted(()=>{
KeyList() KeyList()
getSyList() getSyList()
}) })
const pickerOptions = ref(
{ //
format: 'yyyy-MM-dd HH:mm:ss', //
valueStrictly: true, //
}, )
/** 筛选处理 */ /** 筛选处理 */
const data = reactive({ const data = reactive({
items:[ items:[
@ -349,20 +355,21 @@ function handleXg(dat) {
title1.value = "修改密钥"; title1.value = "修改密钥";
open1.value = true; 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() { function submitForm1() {
for (let i in addForm1.cpuId){ for (let i in addForm1.cpuId){
addForm1.cpuId[i]=addForm1.cpuId[i].value addForm1.cpuId[i]=addForm1.cpuId[i].value
} }
const dateString = addForm1.time; let formattedDate = convertISODate(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'
});
setKey2({ setKey2({
"id": addForm1.id, "id": addForm1.id,
"cpuIds": addForm1.cpuId, "cpuIds": addForm1.cpuId,

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