Compare commits
No commits in common. '59642372c6bb81a2405020efdfb6cd9edffc6ea8' and '50aa26a040fb0d1d446f4924f646b9030ca2450c' have entirely different histories.
59642372c6
...
50aa26a040
18 changed files with 130 additions and 581 deletions
@ -1,38 +1,14 @@ |
|||||||
import request from "@/utils/request"; |
import request from '@/utils/request' |
||||||
|
|
||||||
export const login = (data: any) => { |
export const login = (data: any) => { |
||||||
return request({ |
return request({ |
||||||
url: "/sys/login", |
url: '/sys/login', |
||||||
method: "post", |
method: 'post', |
||||||
data, |
data |
||||||
}); |
}) |
||||||
}; |
|
||||||
export const getCode = (time: any) => { |
|
||||||
return request({ |
|
||||||
url: "/sys/randomImage/" + time, |
|
||||||
}); |
|
||||||
}; |
|
||||||
// 获取用户信息
|
|
||||||
export const getUserInfo = () => { |
|
||||||
return request({ |
|
||||||
url: "/sys/user/getUserInfo", |
|
||||||
method: "get", |
|
||||||
}); |
|
||||||
}; |
|
||||||
|
|
||||||
// 实验步骤
|
|
||||||
export const setStep = (params: any) => { |
|
||||||
return request({ |
|
||||||
url: "/experimentrecords/xnExperimentRecords/check", |
|
||||||
method: "get", |
|
||||||
params |
|
||||||
}) |
|
||||||
} |
|
||||||
// 获取步骤id
|
|
||||||
export const getStepId = () => { |
|
||||||
return request({ |
|
||||||
url: "/experimentrecords/xnExperimentRecords/getProcedureList", |
|
||||||
method: "get", |
|
||||||
|
|
||||||
}) |
|
||||||
} |
} |
||||||
|
export const getCode = (time: any) => { |
||||||
|
return request({ |
||||||
|
url: '/sys/randomImage/' + time, |
||||||
|
}) |
||||||
|
} |
Before Width: | Height: | Size: 44 KiB |
@ -1,12 +0,0 @@ |
|||||||
// 格式化时间 年月日时分秒
|
|
||||||
export function formatDate(date: any) { |
|
||||||
const year = date.getFullYear(); |
|
||||||
const month = String(date.getMonth() + 1).padStart(2, "0"); |
|
||||||
const day = String(date.getDate()).padStart(2, "0"); |
|
||||||
const hours = String(date.getHours()).padStart(2, "0"); |
|
||||||
const minutes = String(date.getMinutes()).padStart(2, "0"); |
|
||||||
const seconds = String(date.getSeconds()).padStart(2, "0");
|
|
||||||
console.log(`${year}-${month}-${day} ${hours}:${minutes}:${seconds}`); |
|
||||||
|
|
||||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
|
||||||
} |
|
@ -1,16 +0,0 @@ |
|||||||
import { setStep, getStepId } from "../api/index"; |
|
||||||
import settingStore from "../store/modules/setting"; |
|
||||||
import pinia from "@/store"; |
|
||||||
const useStore = settingStore(pinia); |
|
||||||
export const setStepEvent = async (step: number, controlsSt: string) => { |
|
||||||
let id: any = null; |
|
||||||
if (!useStore.stepIds) { |
|
||||||
const data: any = await getStepId(); |
|
||||||
useStore.stepIds = data.result.map((item: any) => item.id); |
|
||||||
id = useStore.stepIds[step - 1]; |
|
||||||
// return id;
|
|
||||||
await setStep({ id, controlsSt }); |
|
||||||
} else { |
|
||||||
await setStep({ id: useStore.stepIds[step - 1], controlsSt }); |
|
||||||
} |
|
||||||
}; |
|
@ -1,77 +0,0 @@ |
|||||||
<template> |
|
||||||
<div class="container"> |
|
||||||
<div class="main"> |
|
||||||
<!-- <pre><code ref="editor" class="edit-text html" contenteditable="true" @input="highlightCode">console.log('Hello, World!');</code></pre> --> |
|
||||||
<div class="edit-text" contenteditable="true" spellcheck="false"> |
|
||||||
<!-- <highlightjs ref="editor" :language="language" :code="code" v-model="code" contenteditable="true" @input="highlightCode"></highlightjs> --> |
|
||||||
oisafkahsdkjfhasdf sdfhkjsahfdlkjas \n /n sldhfkajshfd salkdhflkasf asfasdf |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="setting"> |
|
||||||
<el-button>保存</el-button> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
|
|
||||||
<script setup> |
|
||||||
import { onMounted, ref } from "vue"; |
|
||||||
|
|
||||||
import hljs from "highlight.js/lib/core"; |
|
||||||
|
|
||||||
const editor = ref(null); |
|
||||||
const code = ref('console.log("Hello, World!");'); |
|
||||||
const highlightCode = () => { |
|
||||||
const codeBlock = editor.value; |
|
||||||
console.log(codeBlock); |
|
||||||
|
|
||||||
if (codeBlock) { |
|
||||||
hljs.highlightElement(code); |
|
||||||
} |
|
||||||
}; |
|
||||||
|
|
||||||
onMounted(() => { |
|
||||||
// highlightCode(); |
|
||||||
}); |
|
||||||
</script> |
|
||||||
|
|
||||||
<style scoped> |
|
||||||
.container { |
|
||||||
width: 100%; |
|
||||||
height: 100vh; |
|
||||||
display: flex; |
|
||||||
justify-content: center; |
|
||||||
margin-top: 100px; |
|
||||||
/* position: relative; */ |
|
||||||
} |
|
||||||
|
|
||||||
.main { |
|
||||||
width: 1442px; |
|
||||||
height: 753px; |
|
||||||
background-color: pink; |
|
||||||
background: url("../../assets/images/idea.png") no-repeat; |
|
||||||
background-size: contain; |
|
||||||
background-position: center center; |
|
||||||
position: relative; |
|
||||||
} |
|
||||||
|
|
||||||
.edit-text { |
|
||||||
position: absolute; |
|
||||||
left: 410px; |
|
||||||
top: 60px; |
|
||||||
width: 700px; |
|
||||||
height: 670px; |
|
||||||
background-color: #1e1e1e; |
|
||||||
color: #fff; |
|
||||||
font-family: "Courier New", monospace; |
|
||||||
padding: 10px; |
|
||||||
border-radius: 5px; |
|
||||||
overflow: auto; |
|
||||||
outline: none; |
|
||||||
line-height: 30px; |
|
||||||
} |
|
||||||
.setting{ |
|
||||||
position: absolute; |
|
||||||
top: 20px; |
|
||||||
right: 100px; |
|
||||||
} |
|
||||||
</style> |
|
Loading…
Reference in new issue