mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-15 02:57:08 +08:00
chore: 优化部分代码
This commit is contained in:
@@ -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'
|
||||
|
@@ -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'
|
||||
|
@@ -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'
|
||||
|
@@ -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'
|
||||
|
@@ -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'
|
||||
|
@@ -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'
|
||||
|
@@ -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'
|
||||
|
@@ -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'
|
||||
|
@@ -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'
|
||||
|
@@ -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'
|
||||
|
@@ -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()}`,
|
||||
|
@@ -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'
|
||||
|
@@ -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'
|
||||
|
@@ -63,7 +63,7 @@
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
const list = [
|
||||
{
|
||||
alias: 'ContiNew Admin',
|
||||
|
@@ -24,7 +24,7 @@
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
const router = useRouter()
|
||||
|
||||
const links = [
|
||||
|
@@ -178,11 +178,6 @@ onMounted(() => {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.captcha-container {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup></script>
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.login-bg {
|
||||
|
@@ -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('')
|
||||
|
@@ -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'
|
||||
|
@@ -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'
|
||||
|
@@ -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,
|
||||
|
@@ -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 {
|
||||
|
@@ -9,7 +9,7 @@
|
||||
</a-menu>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import type { DictResp } from '@/apis/system'
|
||||
|
||||
interface Props {
|
||||
|
@@ -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'
|
||||
|
||||
|
@@ -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'
|
||||
|
||||
|
@@ -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'
|
||||
|
@@ -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'
|
||||
|
@@ -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'
|
||||
|
@@ -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'
|
||||
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user