chore: 优化部分代码

This commit is contained in:
2024-11-14 21:59:22 +08:00
parent 011643226c
commit ce09f737c3
55 changed files with 58 additions and 63 deletions

View File

@@ -6,7 +6,7 @@
</a-spin>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import { type EChartsOption, graphic } from 'echarts'
import { useChart } from '@/hooks'
import { type DashboardChartCommonResp, getAnalysisTimeslot as getData } from '@/apis/common'

View File

@@ -8,7 +8,7 @@
</a-spin>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import type { EChartsOption } from 'echarts'
import { useChart } from '@/hooks'
import { type DashboardChartCommonResp, getAnalysisBrowser as getData } from '@/apis/common'

View File

@@ -37,7 +37,7 @@
</a-spin>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import { computed } from 'vue'
import { useChart } from '@/hooks'
import { useAppStore } from '@/stores'

View File

@@ -37,7 +37,7 @@
</a-spin>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import { computed } from 'vue'
import { useChart } from '@/hooks'
import { useAppStore } from '@/stores'

View File

@@ -37,7 +37,7 @@
</a-spin>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import { computed } from 'vue'
import { useChart } from '@/hooks'
import { useAppStore } from '@/stores'

View File

@@ -37,7 +37,7 @@
</a-spin>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import { computed } from 'vue'
import { useChart } from '@/hooks'
import { useAppStore } from '@/stores'

View File

@@ -20,7 +20,7 @@
</a-card>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import Pv from './Pv.vue'
import Ip from './Ip.vue'
import Demo1 from './Demo1.vue'

View File

@@ -25,7 +25,7 @@
</a-spin>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import type { EChartsOption } from 'echarts'
import { getAnalysisGeo as getData } from '@/apis/common/dashboard'
import { useChart } from '@/hooks'

View File

@@ -8,7 +8,7 @@
</a-spin>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import type { EChartsOption } from 'echarts'
import { useChart } from '@/hooks'
import { type DashboardChartCommonResp, getAnalysisModule as getData } from '@/apis/common'

View File

@@ -8,7 +8,7 @@
</a-spin>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import type { EChartsOption } from 'echarts'
import { useChart } from '@/hooks'
import { type DashboardChartCommonResp, getAnalysisOs as getData } from '@/apis/common'

View File

@@ -19,7 +19,7 @@
</a-carousel>
</template>
<script lang="ts" setup>
<script setup lang="ts">
const images = [
{
src: `https://continew.top/qrcode-text.jpg?${new Date().getTime()}`,

View File

@@ -103,7 +103,7 @@
</a-card>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import dayjs from 'dayjs'
import relativeTime from 'dayjs/plugin/relativeTime'
import axios, { type AxiosRequestConfig, type AxiosResponse } from 'axios'

View File

@@ -35,7 +35,7 @@
<NoticeDetailModal ref="NoticeDetailModalRef" />
</template>
<script lang="ts" setup>
<script setup lang="ts">
import { type DashboardNoticeResp, listDashboardNotice } from '@/apis'
import { useDict } from '@/hooks/app'
import NoticeDetailModal from '@/views/system/notice/NoticeDetailModal.vue'

View File

@@ -63,7 +63,7 @@
</a-card>
</template>
<script lang="ts" setup>
<script setup lang="ts">
const list = [
{
alias: 'ContiNew Admin',

View File

@@ -24,7 +24,7 @@
</a-card>
</template>
<script lang="ts" setup>
<script setup lang="ts">
const router = useRouter()
const links = [

View File

@@ -178,11 +178,6 @@ onMounted(() => {
cursor: pointer;
}
.captcha-container {
position: relative;
display: inline-block;
}
.overlay {
position: absolute;
top: 0;

View File

@@ -7,7 +7,7 @@
</div>
</template>
<script lang="ts" setup></script>
<script setup lang="ts"></script>
<style lang="scss" scoped>
.login-bg {

View File

@@ -67,7 +67,7 @@
</a-drawer>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import { type LogDetailResp, getLog } from '@/apis/monitor'
const dataId = ref('')

View File

@@ -14,7 +14,7 @@
</a-drawer>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import { useWindowSize } from '@vueuse/core'
import { type AppDetailResp, getApp } from '@/apis/open/app'
import { useDict } from '@/hooks/app'

View File

@@ -34,7 +34,7 @@
<VerifyModel ref="verifyModelRef" />
</template>
<script lang="ts" setup>
<script setup lang="ts">
import type { ModeItem } from '../type'
import VerifyModel from '../components/VerifyModel.vue'
import { useUserStore } from '@/stores'

View File

@@ -113,7 +113,7 @@
</a-form>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import { type FileItem, type FormInstance, Message, Modal, type RequestOption } from '@arco-design/web-vue'
import {
type OptionResp,

View File

@@ -56,7 +56,7 @@
</a-space>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import { useWindowSize } from '@vueuse/core'
import { type FormInstance, Message, Modal } from '@arco-design/web-vue'
import {

View File

@@ -9,7 +9,7 @@
</a-menu>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import type { DictResp } from '@/apis/system'
interface Props {

View File

@@ -13,7 +13,7 @@
</a-row>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import type { FormInstance } from '@arco-design/web-vue'
import type { FileItem } from '@/apis/system'

View File

@@ -2,7 +2,7 @@
<div id="videoId"></div>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import Player from 'xgplayer'
import type { FileItem } from '@/apis/system'

View File

@@ -65,7 +65,7 @@
</div>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import { type NoticeQuery, type NoticeResp, deleteNotice, listNotice } from '@/apis/system'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import { useTable } from '@/hooks'

View File

@@ -13,7 +13,7 @@
</a-modal>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import { ref } from 'vue'
import { Message } from '@arco-design/web-vue'
import { useWindowSize } from '@vueuse/core'

View File

@@ -51,7 +51,7 @@
</a-drawer>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import { useWindowSize } from '@vueuse/core'
import { type RoleDetailResp, getRole } from '@/apis/system'
import { useDept, useDict, useMenu } from '@/hooks/app'

View File

@@ -28,7 +28,7 @@
</a-drawer>
</template>
<script lang="ts" setup>
<script setup lang="ts">
import { useWindowSize } from '@vueuse/core'
import { type UserDetailResp, getUser } from '@/apis/system/user'

View File

@@ -58,13 +58,13 @@
</template>
<template #action="{ record }">
<a-space>
<a-link v-permission="['system:user:list']" @click="onDetail(record)">详情</a-link>
<a-link v-permission="['system:user:update']" @click="onUpdate(record)">修改</a-link>
<a-link v-permission="['system:user:list']" title="详情" @click="onDetail(record)">详情</a-link>
<a-link v-permission="['system:user:update']" title="修改" @click="onUpdate(record)">修改</a-link>
<a-link
v-permission="['system:user:delete']"
status="danger"
:title="record.isSystem ? '系统内置数据不能删除' : '删除'"
:disabled="record.isSystem"
:title="record.isSystem ? '系统内置数据不能删除' : '删除'"
@click="onDelete(record)"
>
删除
@@ -76,8 +76,8 @@
</template>
</a-button>
<template #content>
<a-doption v-permission="['system:user:resetPwd']" @click="onResetPwd(record)">重置密码</a-doption>
<a-doption v-permission="['system:user:updateRole']" @click="onUpdateRole(record)">分配角色</a-doption>
<a-doption v-permission="['system:user:resetPwd']" title="重置密码" @click="onResetPwd(record)">重置密码</a-doption>
<a-doption v-permission="['system:user:updateRole']" title="分配角色" @click="onUpdateRole(record)">分配角色</a-doption>
</template>
</a-dropdown>
</a-space>