Compare commits

..

No commits in common. "c56e4e560884947903694de17a2300e3e589ee91" and "1cb7051a5e3d5f6e58619f15326a7ff2f1f1e21d" have entirely different histories.

5 changed files with 34 additions and 162 deletions

View file

@ -1,7 +1,6 @@
<!DOCTYPE html>
<html lang="zh-cmn">
<head>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>K5Web</title>
@ -22,114 +21,10 @@
background-color: var(--color-text-3);
}
</style>
<style>
#loading-mask {
position: fixed;
left: 0;
top: 0;
height: 100%;
width: 100%;
background: #fff;
user-select: none;
z-index: 9999;
overflow: hidden;
}
.loading-wrapper {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -100%);
}
.loading-dot {
animation: antRotate 1.2s infinite linear;
transform: rotate(45deg);
position: relative;
display: inline-block;
font-size: 64px;
width: 64px;
height: 64px;
box-sizing: border-box;
}
.loading-dot i {
width: 22px;
height: 22px;
position: absolute;
display: block;
background-color: #1890ff;
border-radius: 100%;
transform: scale(0.75);
transform-origin: 50% 50%;
opacity: 0.3;
animation: antSpinMove 1s infinite linear alternate;
}
.loading-dot i:nth-child(1) {
top: 0;
left: 0;
}
.loading-dot i:nth-child(2) {
top: 0;
right: 0;
-webkit-animation-delay: 0.4s;
animation-delay: 0.4s;
}
.loading-dot i:nth-child(3) {
right: 0;
bottom: 0;
-webkit-animation-delay: 0.8s;
animation-delay: 0.8s;
}
.loading-dot i:nth-child(4) {
bottom: 0;
left: 0;
-webkit-animation-delay: 1.2s;
animation-delay: 1.2s;
}
@keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg);
}
}
@-webkit-keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg);
}
}
@keyframes antSpinMove {
to {
opacity: 1;
}
}
@-webkit-keyframes antSpinMove {
to {
opacity: 1;
}
}
</style>
<script src="serial.js"></script>
</head>
<body>
<div id="app">
<div id="loading-mask">
<div class="loading-wrapper">
<span class="loading-dot loading-dot-spin"><i></i><i></i><i></i><i></i></span>
</div>
</div>
</div>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</body>
</html>

Binary file not shown.

View file

@ -29,8 +29,6 @@ import localeUserSetting from '@/views/user/setting/locale/en-US';
import localeSettings from './en-US/settings';
export default {
'On': 'On',
'Off': 'Off',
'menu.dashboard': 'CPS',
'menu.cps.channel': 'Channel',
'menu.cps.settings': 'Settings',

View file

@ -29,8 +29,6 @@ import localeUserSetting from '@/views/user/setting/locale/zh-CN';
import localeSettings from './zh-CN/settings';
export default {
'On': '开',
'Off': '关',
'menu.dashboard': '写频',
'menu.cps.channel': '信道管理',
'menu.cps.settings': '设置管理',

View file

@ -102,7 +102,7 @@
</template>
<script lang="ts" setup>
import { ref, computed, reactive, onMounted, onBeforeMount } from 'vue';
import { ref, computed, reactive, onMounted } from 'vue';
import { useRoute } from 'vue-router';
import { Input, Select } from 'tdesign-vue-next';
import useLoading from '@/hooks/loading';
@ -120,9 +120,7 @@
const state = {
bandwidthOption: {'0': '25KHz', '1': '12.5KHz'},
modeOption: {'0': 'FM', '1': 'AM', '2': 'USB'},
powerOptionEng: {'0': 'Low', '1': 'Med', '2': 'High'},
powerOption: {'0': '低', '1': '中', '2': '高'},
toneOptionEng: {'1':'Tone','2':'DTCS(N)','3':'DTCS(I)'},
toneOption: {'1':'亚音频','2':'数字亚音','3':'反向数字亚音'},
CTCSSOption: [67.0, 69.3, 71.9, 74.4, 77.0, 79.7, 82.5, 85.4,
88.5, 91.5, 94.8, 97.4, 100.0, 103.5, 107.2, 110.9,
@ -143,7 +141,6 @@
731, 732, 734, 743, 754],
stepOption: [2.50, 5.00, 6.25, 10.00, 12.50, 25.00, 8.33, 0.01, 0.05, 0.10, 0.25, 0.50, 1.00, 1.25, 9.00, 15.00, 20.00, 30.00, 50.00, 100.00, 125.00, 200.00, 250.00, 500.00],
scrambOption: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"],
pttidOptionEng: ['UP CODE', 'DOWW CODE', 'UP+DOWN Code', 'APOLLO QUINDAR'],
pttidOption: ['上线码', '下线码', '上线+下线码', 'Quindar码']
}
@ -167,14 +164,6 @@
const route = useRoute();
onBeforeMount(()=>{
if(t('menu.dashboard') == 'CPS'){
state.powerOption = state.powerOptionEng
state.toneOption = state.toneOptionEng
state.pttidOption = state.pttidOptionEng
}
})
onMounted(async ()=>{
if(route.query.url){
const packet = await fetch(route.query.url)
@ -229,13 +218,13 @@
renderData[i - 2]['step'] = parseFloat(workbook.Sheets.Sheet1['M' + i]?.w)
}
if(workbook.Sheets.Sheet1['N' + i]?.w){
renderData[i - 2]['reverse'] = workbook.Sheets.Sheet1['N' + i]?.w == t('On') ? true : false
renderData[i - 2]['reverse'] = workbook.Sheets.Sheet1['N' + i]?.w == '开' ? true : false
}
if(workbook.Sheets.Sheet1['O' + i]?.w){
renderData[i - 2]['scramb'] = parseFloat(workbook.Sheets.Sheet1['O' + i]?.w)
}
if(workbook.Sheets.Sheet1['P' + i]?.w){
renderData[i - 2]['busy'] = workbook.Sheets.Sheet1['P' + i]?.w == t('On') ? true : false
renderData[i - 2]['busy'] = workbook.Sheets.Sheet1['P' + i]?.w == '开' ? true : false
}
if(workbook.Sheets.Sheet1['Q' + i]?.w){
renderData[i - 2]['pttid'] = workbook.Sheets.Sheet1['Q' + i]?.w
@ -244,7 +233,7 @@
renderData[i - 2]['mode'] = Object.keys(state.modeOption).find(key=>state.modeOption[key]==workbook.Sheets.Sheet1['R' + i]?.w)
}
if(workbook.Sheets.Sheet1['S' + i]?.w){
renderData[i - 2]['dtmf'] = workbook.Sheets.Sheet1['S' + i]?.w == t('On') ? true : false
renderData[i - 2]['dtmf'] = workbook.Sheets.Sheet1['S' + i]?.w == '开' ? true : false
}
if(workbook.Sheets.Sheet1['T' + i]?.w){
if(workbook.Sheets.Sheet1['T' + i]?.w.split(',').indexOf('I') >= 0){
@ -788,21 +777,13 @@
const downloadExcelTemplate = () => {
const a = document.createElement('a');
a.href = '/K5Channel.xlsx';
if(t('menu.dashboard') == 'CPS'){
a.href = '/K5Channel_EN.xlsx';
}
a.download = 'K5Channel.xlsx';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
};
const saveExcelChannel = async () => {
let template = undefined;
if(t('menu.dashboard') == 'CPS'){
template = await fetch('/K5Channel_EN.xlsx');
}else{
template = await fetch('/K5Channel.xlsx');
}
const template = await fetch('/K5Channel.xlsx');
const workbook = xlsxRead(await template.arrayBuffer());
const worksheet = workbook.Sheets[workbook.SheetNames[0]];
for(let i = 2; i < 202; i++){
@ -856,7 +837,7 @@
}
if(cstate.renderData[i - 2]?.reverse){
worksheet['N' + i] = {}
worksheet['N' + i].v = cstate.renderData[i - 2]?.reverse == true ? t('On') : t('Off')
worksheet['N' + i].v = cstate.renderData[i - 2]?.reverse == true ? '开' : '关'
}
if(cstate.renderData[i - 2]?.scramb){
worksheet['O' + i] = {}
@ -864,7 +845,7 @@
}
if(cstate.renderData[i - 2]?.busy){
worksheet['P' + i] = {}
worksheet['P' + i].v = cstate.renderData[i - 2]?.busy == true ? t('On') : t('Off')
worksheet['P' + i].v = cstate.renderData[i - 2]?.busy == true ? '开' : '关'
}
if(cstate.renderData[i - 2]?.pttid){
worksheet['Q' + i] = {}
@ -876,7 +857,7 @@
}
if(cstate.renderData[i - 2]?.dtmf){
worksheet['S' + i] = {}
worksheet['S' + i].v = cstate.renderData[i - 2]?.dtmf == true ? t('On') : t('Off')
worksheet['S' + i].v = cstate.renderData[i - 2]?.dtmf == true ? '开' : '关'
}
if(cstate.renderData[i - 2]?.scanlist){
worksheet['T' + i] = {}
@ -940,13 +921,13 @@
renderData[i - 2]['step'] = parseFloat(workbook.Sheets.Sheet1['M' + i]?.w)
}
if(workbook.Sheets.Sheet1['N' + i]?.w){
renderData[i - 2]['reverse'] = workbook.Sheets.Sheet1['N' + i]?.w == t('On') ? true : false
renderData[i - 2]['reverse'] = workbook.Sheets.Sheet1['N' + i]?.w == '开' ? true : false
}
if(workbook.Sheets.Sheet1['O' + i]?.w){
renderData[i - 2]['scramb'] = parseFloat(workbook.Sheets.Sheet1['O' + i]?.w)
}
if(workbook.Sheets.Sheet1['P' + i]?.w){
renderData[i - 2]['busy'] = workbook.Sheets.Sheet1['P' + i]?.w == t('On') ? true : false
renderData[i - 2]['busy'] = workbook.Sheets.Sheet1['P' + i]?.w == '开' ? true : false
}
if(workbook.Sheets.Sheet1['Q' + i]?.w){
renderData[i - 2]['pttid'] = workbook.Sheets.Sheet1['Q' + i]?.w
@ -955,7 +936,7 @@
renderData[i - 2]['mode'] = Object.keys(state.modeOption).find(key=>state.modeOption[key]==workbook.Sheets.Sheet1['R' + i]?.w)
}
if(workbook.Sheets.Sheet1['S' + i]?.w){
renderData[i - 2]['dtmf'] = workbook.Sheets.Sheet1['S' + i]?.w == t('On') ? true : false
renderData[i - 2]['dtmf'] = workbook.Sheets.Sheet1['S' + i]?.w == '开' ? true : false
}
if(workbook.Sheets.Sheet1['T' + i]?.w){
if(workbook.Sheets.Sheet1['T' + i]?.w.split(',').indexOf('I') >= 0){