Commit 6027da9b by lei

1

parent 307db5b4
......@@ -20,6 +20,7 @@
"vue-i18n": "^9.2.2"
},
"devDependencies": {
"@types/md5": "^2.3.2",
"axios": "^0.24.0",
"cross-env": "^7.0.3",
"fontmin": "^0.9.9",
......@@ -2296,6 +2297,12 @@
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.182.tgz",
"integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q=="
},
"node_modules/@types/md5": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@types/md5/-/md5-2.3.2.tgz",
"integrity": "sha512-v+JFDu96+UYJ3/UWzB0mEglIS//MZXgRaJ4ubUPwOM0gvLc/kcQ3TWNYwENEK7/EcXGQVrW8h/XqednSjBd/Og==",
"dev": true
},
"node_modules/@types/minimist": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz",
......@@ -15392,6 +15399,12 @@
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.182.tgz",
"integrity": "sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q=="
},
"@types/md5": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@types/md5/-/md5-2.3.2.tgz",
"integrity": "sha512-v+JFDu96+UYJ3/UWzB0mEglIS//MZXgRaJ4ubUPwOM0gvLc/kcQ3TWNYwENEK7/EcXGQVrW8h/XqednSjBd/Og==",
"dev": true
},
"@types/minimist": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz",
......
......@@ -10,6 +10,7 @@
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@types/md5": "^2.3.2",
"axios": "^0.24.0",
"cross-env": "^7.0.3",
"fontmin": "^0.9.9",
......
......@@ -4,7 +4,6 @@ import {
MenuItem as TMenuItem,
Button as TButton,
Header as Theader,
Footer as TFooter,
Content as TContent,
Layout as Tlayout,
Input as TInput,
......@@ -22,7 +21,6 @@ import {
RadioGroup as TRadioGroup,
RadioButton as TRadioButton,
InputNumber as TInputNumber,
DatePicker as TDatePicker,
TimePicker as TTimePicker,
Row as TRow,
Col as TCol,
......@@ -36,7 +34,6 @@ const components = [
TMenuItem,
TButton,
Theader,
TFooter,
TContent,
Tlayout,
TInput,
......@@ -54,7 +51,6 @@ const components = [
TRadioGroup,
TRadioButton,
TInputNumber,
TDatePicker,
TTimePicker,
TRow,
TCol,
......
......@@ -13,11 +13,11 @@
@Close="closeDialog"
>
<template #header>
{{ $t('tooltip.DataFilter') }}
{{ $t("tooltip.DataFilter") }}
</template>
<template #body>
<div class="start-time">
<span class="label"> {{ $t('tooltip.startTime') }}</span>
<span class="label"> {{ $t("tooltip.startTime") }}</span>
<div class="chose-time">
<t-date-picker
v-model:value="StartDate"
......@@ -43,10 +43,10 @@
</template>
<template #footer>
<t-button class="Cancel-btn" @click="closeDialog">{{
$t('user.Cancel')
$t("user.Cancel")
}}</t-button>
<t-button class="Confirm-btn" @click="submit">{{
$t('user.Confirm')
$t("user.Confirm")
}}</t-button>
</template>
</t-dialog>
......@@ -55,15 +55,16 @@
</template>
<script lang="ts" setup>
import { MessagePlugin } from 'tdesign-vue-next';
import { useI18n } from 'vue-i18n';
import Timefilter from '/public/images/svg/analysis/timefilter.svg';
import { MessagePlugin } from "tdesign-vue-next";
import { useI18n } from "vue-i18n";
import Timefilter from "/public/images/svg/analysis/timefilter.svg";
import { DatePicker as TDatePicker } from "tdesign-vue-next";
const route = useRoute();
const emit = defineEmits(['change']);
const emit = defineEmits(["change"]);
const { t } = useI18n();
const visible = ref(false);
const StartDate = ref('');
const StartTime = ref('');
const StartDate = ref("");
const StartTime = ref("");
// 转换后的时间戳
const Timestamp = ref(0);
const openDialog = () => {
......@@ -79,12 +80,12 @@ const changeText = () => {
if (visible.value) {
onInterval = window.setInterval(() => {
let dom = document.querySelector(
'.t-time-picker__panel-section-footer'
".t-time-picker__panel-section-footer"
);
if (dom) {
let child = dom.children;
if (child.length) {
child[0].children[0].textContent = t('common.confirm');
child[0].children[0].textContent = t("common.confirm");
}
if (onInterval) {
window.clearInterval(onInterval);
......@@ -106,17 +107,17 @@ watch(
changeText();
}
);
const onTimeChange = (value) => {
const onTimeChange = (value: any) => {
if (StartDate.value && value) {
// 拼接日期并转换为时间戳
let date = new Date(StartDate.value + ' ' + StartTime.value);
let date = new Date(StartDate.value + " " + StartTime.value);
Timestamp.value = date.valueOf();
}
};
const submit = () => {
if (!StartDate.value || !StartTime.value) {
MessagePlugin.closeAll();
MessagePlugin.warning(t('tooltip.startTime'));
MessagePlugin.warning(t("tooltip.startTime"));
return;
}
onTimeChange(1);
......@@ -124,11 +125,11 @@ const submit = () => {
let date = new Date();
if (date.valueOf() < Timestamp.value) {
MessagePlugin.closeAll();
MessagePlugin.warning(t('tooltip.Cannotexceed'));
MessagePlugin.warning(t("tooltip.Cannotexceed"));
return;
}
if (Timestamp.value) {
emit('change', Timestamp.value);
emit("change", Timestamp.value);
closeDialog();
}
};
......@@ -177,7 +178,7 @@ const submit = () => {
}
.start-time {
font-size: 16px;
font-family: 'Medium';
font-family: "Medium";
.label {
width: 94px;
white-space: nowrap;
......
......@@ -3,11 +3,11 @@
<div class="left-box">
<div class="des-content">
<logoSvg></logoSvg>
<span>{{ $t('footer.Introduce') }} </span>
<span>{{ $t("footer.Introduce") }} </span>
</div>
</div>
<div class="center-box">
<span>{{ $t('footer.JoinUs') }}</span>
<span>{{ $t("footer.JoinUs") }}</span>
<div class="icons-box">
<a
v-for="item in FooterImg"
......@@ -22,7 +22,7 @@
</div>
<div class="right-box">
<div class="right-box-child">
<span class="right-title">{{ $t('footer.ContactUs') }}</span>
<span class="right-title">{{ $t("footer.ContactUs") }}</span>
<div class="right-email-tg">
<emailSvg></emailSvg>
<span>dexfilter@gmail.com</span>
......@@ -36,15 +36,15 @@
</div>
</template>
<script lang="ts" setup>
import { tgUrl, FooterImg } from '@/utils/open';
import logoSvg from '/public/images/svg/footer/footerLogo.svg';
import emailSvg from '/public/images/svg/footer/email.svg';
import tgSvg from '/public/images/svg/footer/tg.svg';
import { tgUrl, FooterImg } from "@/utils/open";
import logoSvg from "/public/images/svg/footer/footerLogo.svg";
import emailSvg from "/public/images/svg/footer/email.svg";
import tgSvg from "/public/images/svg/footer/tg.svg";
</script>
<style lang="less" scoped>
@import '@/style/variables.less';
@import '@/style/flex.less';
@import "@/style/variables.less";
@import "@/style/flex.less";
.s-footer {
width: 100%;
height: 250px;
......@@ -64,7 +64,7 @@ import tgSvg from '/public/images/svg/footer/tg.svg';
}
span {
display: inline-block;
font-family: 'Regular';
font-family: "Regular";
}
}
}
......@@ -76,7 +76,7 @@ import tgSvg from '/public/images/svg/footer/tg.svg';
font-weight: bold;
color: black;
font-size: @font-size-xl;
font-family: 'bold';
font-family: "bold";
}
.icons-box {
height: calc(100% - 100px);
......@@ -103,10 +103,10 @@ import tgSvg from '/public/images/svg/footer/tg.svg';
font-weight: bold;
color: black;
font-size: @font-size-xl;
font-family: 'bold';
font-family: "bold";
}
.right-email-tg {
font-family: 'Regular';
font-family: "Regular";
display: flex;
align-items: center;
cursor: pointer;
......
......@@ -132,7 +132,7 @@ const topList = ref([]);
const isLoading = ref(false);
const isFirst = ref(true);
const darg = () => {
let dom = document.getElementById("search-token-list");
let dom: any = document.getElementById("search-token-list");
if (dom !== null) {
dom.addEventListener("scroll", () => {
let domHeight = dom.scrollHeight;
......@@ -237,9 +237,9 @@ watch(
}
);
// 搜索结果过滤
const resultFilter = (list) => {
const resultFilter = (list: any) => {
let newList = list;
newList.forEach((item, index) => {
newList.forEach((item: any) => {
if (item.name.length >= 20) {
item.name = item.name.substring(0, 20) + "...";
}
......@@ -264,7 +264,7 @@ const resultFilter = (list) => {
if (!res) {
item.isStar = false;
} else {
JSON.parse(res).forEach((label, index) => {
JSON.parse(res).forEach((label: any) => {
if (label.hash === item.tb_name) {
item.isStar = true;
}
......@@ -280,7 +280,7 @@ const getPopularList = async () => {
isLoading.value = true;
let res: any = await request.get("/score");
if (res.list.length) {
res.list.forEach((item: PopularItem) => {
res.list.forEach((item: any) => {
// 增加一个带省略号的格式
item.filterPool =
item.pool.substring(0, 4) +
......
......@@ -5,13 +5,13 @@
</t-header>
<t-content class="s-layout-content narrow-scrollbar" id="layout-scroll">
<slot name="content"></slot>
<t-footer class="s-layout-footer">
<div class="s-layout-footer">
<slot name="footer">
<ClientOnly>
<Footer v-if="route.meta.footer"></Footer>
</ClientOnly>
</slot>
</t-footer>
</div>
</t-content>
</t-layout>
</template>
......@@ -24,12 +24,4 @@ const route = useRoute();
<style lang="less">
@import "@/style/layout.less";
// @media screen and (max-width: 1550px) {
// .t-layout {
// transform: scale(0.9);
// width: 100%;
// height: 100%;
// transform-origin: 0 0;
// }
// }
</style>
......@@ -104,7 +104,7 @@ const showPsw = ref(false);
const form = ref(null);
const router = useRouter();
const onSubmit = async ({ validateResult }) => {
const onSubmit = async ({ validateResult }: any) => {
if (validateResult === true) {
let params: FormData = {
email: formData.value.email,
......
......@@ -206,7 +206,7 @@ const FORM_RULES = {
{ validator: repasswordValidator },
],
};
const onSubmit = async ({ validateResult }) => {
const onSubmit = async ({ validateResult }: any) => {
if (validateResult === true) {
if (!formData.value.checked) {
MessagePlugin.error("请同意用户隐私政策");
......
......@@ -124,7 +124,7 @@ const INITIAL_DATA = {
const formData = ref({ ...INITIAL_DATA });
const showPsw = ref(false);
const showPsw2 = ref(false);
const form = ref(null);
const form = ref<any>(null);
const router = useRouter();
//发送验证码
......@@ -155,7 +155,7 @@ const sendVerfiyCode = async () => {
};
// 数据校验
const repasswordValidator = (value) => {
const repasswordValidator = (value: any) => {
if (formData.value.password === value) {
return { result: true };
} else {
......
......@@ -312,7 +312,7 @@ const gotoDetail = (value) => {
};
// 监听按钮点击事件,切换样式
const monitor = computed((value) => {
return function (value) {
return function (value: any) {
return defaBtn.value === value;
};
});
......
......@@ -13,7 +13,7 @@
@Click="submit(option.value)"
class="custom_button_back_border"
>
{{ $t('Customized.submit') }}
{{ $t("Customized.submit") }}
</t-button>
</div>
</template>
......@@ -32,11 +32,11 @@
</div>
<div v-show="option.value === 'ts'" class="custom-chose-date-time">
<div class="custom-chose-date-time_tips">
<div class="label">{{ $t('TableList.filtertimetiplabel') }}</div>
<div class="value">{{ $t('TableList.filtertimetipvalue') }}</div>
<div class="label">{{ $t("TableList.filtertimetiplabel") }}</div>
<div class="value">{{ $t("TableList.filtertimetipvalue") }}</div>
</div>
<div class="custom-chose-date-box">
<div class="label">{{ $t('TableList.filterDate') }}</div>
<div class="label">{{ $t("TableList.filterDate") }}</div>
<t-date-picker
v-model:value="CurDate"
:placeholder="$t('TableList.Seletdate')"
......@@ -48,7 +48,7 @@
/>
</div>
<div class="custom-chose-time-box">
<div class="label">{{ $t('TableList.filterTime') }}</div>
<div class="label">{{ $t("TableList.filterTime") }}</div>
<t-time-picker
v-model="time1"
:popupProps="{
......@@ -95,13 +95,14 @@
</template>
<script lang="ts" setup>
import { MessagePlugin } from 'tdesign-vue-next';
import { useI18n } from 'vue-i18n';
import { MessagePlugin } from "tdesign-vue-next";
import { useI18n } from "vue-i18n";
import { DatePicker as TDatePicker } from "tdesign-vue-next";
const props = defineProps({
visible: Boolean,
option: Object as any,
});
const emit = defineEmits(['update:visible']);
const emit = defineEmits(["update:visible"]);
const dialogVisible = ref(false);
// input最大值最小值-number类型
const inputV = reactive({
......@@ -109,10 +110,10 @@ const inputV = reactive({
max: null,
});
// 日期选择
const CurDate = ref('');
const CurDate = ref("");
// 具体时间的选择
const time1 = ref('');
const time2 = ref('');
const time1 = ref("");
const time2 = ref("");
const choseTime = ref([0, 0]);
// 记录上次的筛选条件
const hisfilter = reactive({
......@@ -138,7 +139,7 @@ watch(
() => props.visible,
(v) => {
dialogVisible.value = v;
if (v && props.option && props.option.value !== 'ts') {
if (v && props.option && props.option.value !== "ts") {
// 监听打开事件,将对应的筛选条件放入input
inputV.min = hisfilter[props.option.value].min;
inputV.max = hisfilter[props.option.value].max;
......@@ -146,31 +147,31 @@ watch(
}
);
const closeDialog = () => {
emit('update:visible', {
emit("update:visible", {
visible: false,
value: {
type: 'close',
type: "close",
},
});
};
const submit = (value) => {
if (value !== 'ts') {
if (value !== "ts") {
if (!inputV.min || !inputV.max) {
MessagePlugin.closeAll();
MessagePlugin.warning(i18n.t('MessagePlugin.fillcompletely'));
MessagePlugin.warning(i18n.t("MessagePlugin.fillcompletely"));
return;
} else if (inputV.min > inputV.max) {
MessagePlugin.closeAll();
MessagePlugin.warning(i18n.t('MessagePlugin.maximumCannot'));
MessagePlugin.warning(i18n.t("MessagePlugin.maximumCannot"));
return;
}
// 提交前记录本次筛选条件
hisfilter[props.option.value].min = inputV.min;
hisfilter[props.option.value].max = inputV.max;
emit('update:visible', {
emit("update:visible", {
visible: false,
value: {
type: 'filter-self',
type: "filter-self",
min: inputV.min,
max: inputV.max,
filterName: props.option.title,
......@@ -182,25 +183,25 @@ const submit = (value) => {
if (choseTime.value[0] == 0 || choseTime.value[1] == 0) {
// 时间戳有一个为0就不能请求
MessagePlugin.closeAll();
MessagePlugin.warning(i18n.t('MessagePlugin.selectTime'));
MessagePlugin.warning(i18n.t("MessagePlugin.selectTime"));
} else if (
choseTime.value[1] - choseTime.value[0] > 1000 * 60 * 60 ||
choseTime.value[0] - choseTime.value[1] > 1000 * 60 * 60
) {
MessagePlugin.closeAll();
MessagePlugin.warning(i18n.t('MessagePlugin.timehour'));
MessagePlugin.warning(i18n.t("MessagePlugin.timehour"));
} else if (
typeof choseTime.value[0] !== 'number' ||
typeof choseTime.value[1] !== 'number'
typeof choseTime.value[0] !== "number" ||
typeof choseTime.value[1] !== "number"
) {
MessagePlugin.closeAll();
MessagePlugin.warning(i18n.t('MessagePlugin.selectTime'));
MessagePlugin.warning(i18n.t("MessagePlugin.selectTime"));
} else {
// 通过
emit('update:visible', {
emit("update:visible", {
visible: false,
value: {
type: 'filter-time',
type: "filter-time",
from: choseTime.value[0],
to: choseTime.value[1],
},
......@@ -212,7 +213,7 @@ const submit = (value) => {
const onTimeChange = (value) => {
if (CurDate.value && value) {
// 拼接日期并转换为时间戳
let date = new Date(CurDate.value + ' ' + time1.value);
let date = new Date(CurDate.value + " " + time1.value);
choseTime.value[0] = date.valueOf();
}
};
......@@ -220,14 +221,14 @@ const onTimeChange = (value) => {
const onTimeChange2 = (value) => {
if (CurDate.value && value) {
// 拼接日期并转换为时间戳
let date = new Date(CurDate.value + ' ' + time2.value);
let date = new Date(CurDate.value + " " + time2.value);
choseTime.value[1] = date.valueOf();
}
};
</script>
<style lang="less" scoped>
@import '@/style/flex.less';
@import "@/style/flex.less";
// 隐藏时间选择组件的部分按钮
.custom_chose_time_popup {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment