Commit 6027da9b by lei

1

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