Skip to content

Commit

Permalink
Merge pull request eee555#59 from putianyi889/patch-44
Browse files Browse the repository at this point in the history
代码整理
  • Loading branch information
eee555 authored Jul 10, 2024
2 parents ce89a08 + 5aaf229 commit 8a9bcda
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 120 deletions.
11 changes: 3 additions & 8 deletions front_end/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,7 @@
</div>
</div>
<el-footer style="margin: auto">
<el-text style="vertical-align: middle">Copyright @ 2023 </el-text>
<el-link href="http://fff666.top">元扫雷网 fff666.top</el-link>
<el-text style="vertical-align: middle"> 版权所有 </el-text>
<el-link href="https://beian.miit.gov.cn/">苏ICP备2023056839号-1</el-link>
<span style="width: 12px; display: inline-block"></span>
<el-link href="https://beian.mps.gov.cn/#/query/webSearch?code=32020602001691" rel="noreferrer"
target="_blank">苏公网安备32020602001691</el-link>
<Footer />
</el-footer>
</el-container>
</div>
Expand All @@ -76,8 +70,9 @@

<script setup lang="ts">
import { ref, onMounted, computed } from "vue";
import LanguagePicker from "./components/LanguagePicker.vue";
import LanguagePicker from "./components/widgets/LanguagePicker.vue";
import Login from "./components/Login.vue";
import Footer from "./components/Footer.vue";
// import { LoginStatus } from "@/utils/common/structInterface"
import useCurrentInstance from "@/utils/common/useCurrentInstance";
import { useLocalStore, useUserStore } from "./store";
Expand Down
11 changes: 11 additions & 0 deletions front_end/src/components/Footer.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<template>
<el-row>
<el-text style="vertical-align: middle">Copyright @ 2023 </el-text>
<el-link href="http://fff666.top">元扫雷网 fff666.top</el-link>
<el-text style="vertical-align: middle"> 版权所有 </el-text>
<el-link href="https://beian.miit.gov.cn/">苏ICP备2023056839号-1</el-link>
<span style="width: 12px; display: inline-block"></span>
<el-link href="https://beian.mps.gov.cn/#/query/webSearch?code=32020602001691" rel="noreferrer"
target="_blank">苏公网安备32020602001691</el-link>
</el-row>
</template>
22 changes: 0 additions & 22 deletions front_end/src/components/dialogs/Thanks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,7 @@ const t = useI18n();
const centerDialogVisible = ref(false);
onMounted(() => {
})
</script>


<style></style>









Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ import { useColorMode } from '@vueuse/core';
const t = useI18n()
const { system, store } = useColorMode()
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ const changeLanguage = (value: any) => {
height: 0px;
cursor: pointer;
}
</style>
</style>
65 changes: 65 additions & 0 deletions front_end/src/utils/common/structInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,70 @@ export interface Record {
path_id: number,
}

export interface UserProfile {
userms__designators: Array<String>;
userms__video_num_limit: Number;
username: String;
first_name: String;
last_name: String;
email: String;
realname: String;
signature: String;
country: String;
is_banned: Boolean;
left_realname_n: Number;
left_avatar_n: Number;
left_signature_n: Number;
}

interface ExtendedVideoStat {
left: number,
right: number,
double: number,
cl: number,
left_s: number,
right_s: number,
double_s: number,
cl_s: number,
path: number,
flag: number,
flag_s: number,
stnb: number,
rqp: number,
ioe: number,
thrp: number,
corr: number,
ce: number,
ce_s: number,
op: number,
isl: number,
cell0: number,
cell1: number,
cell2: number,
cell3: number,
cell4: number,
cell5: number,
cell6: number,
cell7: number,
cell8: number,
}

interface VideoStat {
level: string,
mode: string,
timems: number,
bbbv: number,
bvs: number,
designator: string,
review_code: number,
}

export interface GeneralFile {
uid: number,
id: number,
filename: string,
file: File,
status: string,
videostat: VideoStat | null,
extstat: ExtendedVideoStat | null,
}
1 change: 0 additions & 1 deletion front_end/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export function simple_formatter(f: Function): Function{
}

import { ComponentCustomProperties } from "vue";
import { generalNotification } from "./system/status";
export async function approve(proxy: ComponentCustomProperties & Record<string, any>, id: number) {
var status;
await proxy.$axios.get('video/approve?ids=[' + id + ']').then(function (response) {
Expand Down
3 changes: 1 addition & 2 deletions front_end/src/views/SettingView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ const store = useUserStore()
const local = useLocalStore()
const t = useI18n()
import { UseDark } from '@vueuse/components';
import DarkMode from '@/components/DarkMode.vue'
import DarkMode from '@/components/widgets/DarkMode.vue'
</script>
17 changes: 1 addition & 16 deletions front_end/src/views/StaffView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import useCurrentInstance from '@/utils/common/useCurrentInstance';
import { generalNotification } from '@/utils/system/status';
import { UserProfile } from '@/utils/common/structInterface';
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
Expand All @@ -36,22 +37,6 @@ const userfield = ref("");
const uservalue = ref("");
const descriptionitems = ["username", "first_name", "last_name", "email", "realname", "country", "is_banned", "left_realname_n", "left_avatar_n", "left_signature_n"]
interface UserProfile {
userms__designators: Array<String>;
userms__video_num_limit: Number;
username: String;
first_name: String;
last_name: String;
email: String;
realname: String;
signature: String;
country: String;
is_banned: Boolean;
left_realname_n: Number;
left_avatar_n: Number;
left_signature_n: Number;
}
const userprofile = ref<UserProfile>({
userms__designators: [],
userms__video_num_limit: 0,
Expand Down
70 changes: 1 addition & 69 deletions front_end/src/views/UploadView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
<script lang="ts" setup>
// 上传录像的页面
import { ref } from 'vue'
import { GeneralFile } from '@/utils/common/structInterface';
import useCurrentInstance from "@/utils/common/useCurrentInstance";
const { proxy } = useCurrentInstance();
import type { UploadInstance, UploadProps, UploadUserFile, UploadRawFile, UploadFile, UploadFiles, UploadRequestOptions } from 'element-plus'
Expand All @@ -80,58 +81,6 @@ const data = defineProps({
const extfields = ['left', 'right', 'double', 'cl', 'left_s', 'right_s', 'double_s', 'cl_s', 'path', 'flag', 'flag_s', 'stnb', 'rqp', 'ioe', 'thrp', 'corr', 'ce', 'ce_s', 'op', 'isl', 'cell0', 'cell1', 'cell2', 'cell3', 'cell4', 'cell5', 'cell6', 'cell7', 'cell8']
interface ExtendedVideoStat {
left: number,
right: number,
double: number,
cl: number,
left_s: number,
right_s: number,
double_s: number,
cl_s: number,
path: number,
flag: number,
flag_s: number,
stnb: number,
rqp: number,
ioe: number,
thrp: number,
corr: number,
ce: number,
ce_s: number,
op: number,
isl: number,
cell0: number,
cell1: number,
cell2: number,
cell3: number,
cell4: number,
cell5: number,
cell6: number,
cell7: number,
cell8: number,
}
interface VideoStat {
level: string,
mode: string,
timems: number,
bbbv: number,
bvs: number,
designator: string,
review_code: number,
}
interface GeneralFile {
uid: number,
id: number,
filename: string,
file: File,
status: string,
videostat: VideoStat | null,
extstat: ExtendedVideoStat | null,
}
const video_msgs = ref<GeneralFile[]>([])
const fileList = ref<UploadUserFile[]>([])
Expand Down Expand Up @@ -346,23 +295,6 @@ const get_ext_stat = (aa: any) => {


<style>
/* input:invalid {
outline: 2px solid rgb(167, 11, 11);
border-radius: 3px;
} */
.upload_video {
font-size: 20px;
border-radius: 8px;
border: 1px dashed rgb(120, 120, 120);
width: 61%;
margin: auto;
margin-top: 10px;
padding: 12px;
background-color: rgb(244, 244, 244);
text-align: center;
}
.el-row {
margin-bottom: 0px;
}
Expand Down

0 comments on commit 8a9bcda

Please sign in to comment.