mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-11-10 06:58:23 +08:00
feat: 新增simple-import-sort插件规范引入 (#464)
This commit is contained in:
parent
ba9a918d99
commit
d356020414
|
@ -17,7 +17,7 @@
|
||||||
"defineProps": "readonly",
|
"defineProps": "readonly",
|
||||||
"defineEmits": "readonly"
|
"defineEmits": "readonly"
|
||||||
},
|
},
|
||||||
"plugins": ["vue", "@typescript-eslint"],
|
"plugins": ["vue", "@typescript-eslint", "simple-import-sort"],
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"parser": "@typescript-eslint/parser",
|
"parser": "@typescript-eslint/parser",
|
||||||
"sourceType": "module",
|
"sourceType": "module",
|
||||||
|
@ -65,7 +65,9 @@
|
||||||
"@typescript-eslint/no-use-before-define": "off",
|
"@typescript-eslint/no-use-before-define": "off",
|
||||||
"@typescript-eslint/ban-ts-comment": "off",
|
"@typescript-eslint/ban-ts-comment": "off",
|
||||||
"@typescript-eslint/ban-types": "off",
|
"@typescript-eslint/ban-types": "off",
|
||||||
"class-methods-use-this": "off" // 因为AxiosCancel必须实例化而能静态化所以加的规则,如果有办法解决可以取消
|
"class-methods-use-this": "off", // 因为AxiosCancel必须实例化而能静态化所以加的规则,如果有办法解决可以取消
|
||||||
|
"simple-import-sort/imports": "error",
|
||||||
|
"simple-import-sort/exports": "error"
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { MockMethod } from 'vite-plugin-mock';
|
|
||||||
import Mock from 'mockjs';
|
import Mock from 'mockjs';
|
||||||
|
import { MockMethod } from 'vite-plugin-mock';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-import": "^2.26.0",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
"eslint-plugin-prettier": "^4.2.1",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
||||||
"eslint-plugin-vue": "^9.8.0",
|
"eslint-plugin-vue": "^9.8.0",
|
||||||
"eslint-plugin-vue-scoped-css": "^2.2.0",
|
"eslint-plugin-vue-scoped-css": "^2.2.0",
|
||||||
"husky": "^8.0.2",
|
"husky": "^8.0.2",
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
import { useSettingStore } from '@/store';
|
import { useSettingStore } from '@/store';
|
||||||
|
|
||||||
const store = useSettingStore();
|
const store = useSettingStore();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { request } from '@/utils/request';
|
|
||||||
import type { ProjectListResult, PurchaseListResult } from '@/api/model/detailModel';
|
import type { ProjectListResult, PurchaseListResult } from '@/api/model/detailModel';
|
||||||
|
import { request } from '@/utils/request';
|
||||||
|
|
||||||
const Api = {
|
const Api = {
|
||||||
PurchaseList: '/get-purchase-list',
|
PurchaseList: '/get-purchase-list',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { request } from '@/utils/request';
|
|
||||||
import type { CardListResult, ListResult } from '@/api/model/listModel';
|
import type { CardListResult, ListResult } from '@/api/model/listModel';
|
||||||
|
import { request } from '@/utils/request';
|
||||||
|
|
||||||
const Api = {
|
const Api = {
|
||||||
BaseList: '/get-list',
|
BaseList: '/get-list',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { request } from '@/utils/request';
|
|
||||||
import type { MenuListResult } from '@/api/model/permissionModel';
|
import type { MenuListResult } from '@/api/model/permissionModel';
|
||||||
|
import { request } from '@/utils/request';
|
||||||
|
|
||||||
const Api = {
|
const Api = {
|
||||||
MenuList: '/get-menu-list',
|
MenuList: '/get-menu-list',
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
import { DEFAULT_COLOR_OPTIONS } from '@/config/color';
|
import { DEFAULT_COLOR_OPTIONS } from '@/config/color';
|
||||||
|
|
||||||
const panelColor =
|
const panelColor =
|
||||||
|
|
|
@ -55,16 +55,16 @@
|
||||||
</t-card>
|
</t-card>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { PropType } from 'vue';
|
|
||||||
import {
|
import {
|
||||||
ShopIcon,
|
AddIcon,
|
||||||
CalendarIcon,
|
CalendarIcon,
|
||||||
ServiceIcon,
|
|
||||||
UserAvatarIcon,
|
|
||||||
LaptopIcon,
|
LaptopIcon,
|
||||||
MoreIcon,
|
MoreIcon,
|
||||||
AddIcon,
|
ServiceIcon,
|
||||||
|
ShopIcon,
|
||||||
|
UserAvatarIcon,
|
||||||
} from 'tdesign-icons-vue-next';
|
} from 'tdesign-icons-vue-next';
|
||||||
|
import type { PropType } from 'vue';
|
||||||
|
|
||||||
export interface CardProductType {
|
export interface CardProductType {
|
||||||
type: number;
|
type: number;
|
||||||
|
|
|
@ -10,12 +10,13 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
import Result403Icon from '@/assets/assets-result-403.svg?component';
|
import Result403Icon from '@/assets/assets-result-403.svg?component';
|
||||||
import Result404Icon from '@/assets/assets-result-404.svg?component';
|
import Result404Icon from '@/assets/assets-result-404.svg?component';
|
||||||
import Result500Icon from '@/assets/assets-result-500.svg?component';
|
import Result500Icon from '@/assets/assets-result-500.svg?component';
|
||||||
import ResultIeIcon from '@/assets/assets-result-ie.svg?component';
|
import ResultIeIcon from '@/assets/assets-result-ie.svg?component';
|
||||||
import ResultWifiIcon from '@/assets/assets-result-wifi.svg?component';
|
|
||||||
import ResultMaintenanceIcon from '@/assets/assets-result-maintenance.svg?component';
|
import ResultMaintenanceIcon from '@/assets/assets-result-maintenance.svg?component';
|
||||||
|
import ResultWifiIcon from '@/assets/assets-result-wifi.svg?component';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
bgUrl: String,
|
bgUrl: String,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import debounce from 'lodash/debounce';
|
import debounce from 'lodash/debounce';
|
||||||
import { onUnmounted, onMounted } from 'vue';
|
import { onMounted, onUnmounted } from 'vue';
|
||||||
|
|
||||||
interface WindowSizeOptions {
|
interface WindowSizeOptions {
|
||||||
immediate?: boolean;
|
immediate?: boolean;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ref, Ref, onUnmounted, onMounted } from 'vue';
|
|
||||||
import * as echarts from 'echarts/core';
|
import * as echarts from 'echarts/core';
|
||||||
|
import { onMounted, onUnmounted, Ref, ref } from 'vue';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* eChart hook
|
* eChart hook
|
||||||
|
|
|
@ -10,10 +10,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';
|
|
||||||
import type { ComputedRef } from 'vue';
|
import type { ComputedRef } from 'vue';
|
||||||
import { useTabsRouterStore } from '@/store';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
import FramePage from '@/layouts/frame/index.vue';
|
import FramePage from '@/layouts/frame/index.vue';
|
||||||
|
import { useTabsRouterStore } from '@/store';
|
||||||
|
|
||||||
// <suspense>标签属于实验性功能,请谨慎使用
|
// <suspense>标签属于实验性功能,请谨慎使用
|
||||||
// 如果存在需解决/page/1=> /page/2 刷新数据问题 请修改代码 使用activeRouteFullPath 作为key
|
// 如果存在需解决/page/1=> /page/2 刷新数据问题 请修改代码 使用activeRouteFullPath 作为key
|
||||||
|
|
|
@ -6,10 +6,11 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { CSSProperties, watch, ref, unref, computed } from 'vue';
|
|
||||||
import debounce from 'lodash/debounce';
|
import debounce from 'lodash/debounce';
|
||||||
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn';
|
import { computed, CSSProperties, ref, unref, watch } from 'vue';
|
||||||
|
|
||||||
import { prefix } from '@/config/global';
|
import { prefix } from '@/config/global';
|
||||||
|
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn';
|
||||||
import { useSettingStore } from '@/store';
|
import { useSettingStore } from '@/store';
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
|
|
|
@ -64,18 +64,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';
|
|
||||||
import type { PropType } from 'vue';
|
import type { PropType } from 'vue';
|
||||||
|
import { computed } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { useSettingStore } from '@/store';
|
|
||||||
import { getActive } from '@/router';
|
|
||||||
import { prefix } from '@/config/global';
|
|
||||||
import LogoFull from '@/assets/assets-logo-full.svg?component';
|
import LogoFull from '@/assets/assets-logo-full.svg?component';
|
||||||
|
import { prefix } from '@/config/global';
|
||||||
|
import { getActive } from '@/router';
|
||||||
|
import { useSettingStore } from '@/store';
|
||||||
import type { MenuRoute } from '@/types/interface';
|
import type { MenuRoute } from '@/types/interface';
|
||||||
|
|
||||||
|
import MenuContent from './MenuContent.vue';
|
||||||
import Notice from './Notice.vue';
|
import Notice from './Notice.vue';
|
||||||
import Search from './Search.vue';
|
import Search from './Search.vue';
|
||||||
import MenuContent from './MenuContent.vue';
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
theme: {
|
theme: {
|
||||||
|
|
|
@ -70,14 +70,15 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { nextTick, ref, computed } from 'vue';
|
import { computed, nextTick, ref } from 'vue';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { useSettingStore, useTabsRouterStore } from '@/store';
|
|
||||||
import { prefix } from '@/config/global';
|
import { prefix } from '@/config/global';
|
||||||
|
import { useSettingStore, useTabsRouterStore } from '@/store';
|
||||||
import type { TRouterInfo } from '@/types/interface';
|
import type { TRouterInfo } from '@/types/interface';
|
||||||
|
|
||||||
import LContent from './Content.vue';
|
|
||||||
import LBreadcrumb from './Breadcrumb.vue';
|
import LBreadcrumb from './Breadcrumb.vue';
|
||||||
|
import LContent from './Content.vue';
|
||||||
import LFooter from './Footer.vue';
|
import LFooter from './Footer.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
|
@ -11,9 +11,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';
|
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
|
import { computed } from 'vue';
|
||||||
|
|
||||||
import { usePermissionStore, useSettingStore } from '@/store';
|
import { usePermissionStore, useSettingStore } from '@/store';
|
||||||
|
|
||||||
import LHeader from './Header.vue';
|
import LHeader from './Header.vue';
|
||||||
|
|
||||||
const permissionStore = usePermissionStore();
|
const permissionStore = usePermissionStore();
|
||||||
|
|
|
@ -11,10 +11,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { storeToRefs } from 'pinia';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { storeToRefs } from 'pinia';
|
|
||||||
import { usePermissionStore, useSettingStore } from '@/store';
|
import { usePermissionStore, useSettingStore } from '@/store';
|
||||||
|
|
||||||
import LSideNav from './SideNav.vue';
|
import LSideNav from './SideNav.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
|
@ -25,10 +25,11 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="tsx">
|
<script setup lang="tsx">
|
||||||
import { computed } from 'vue';
|
|
||||||
import type { PropType } from 'vue';
|
import type { PropType } from 'vue';
|
||||||
import type { MenuRoute } from '@/types/interface';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
import { getActive } from '@/router';
|
import { getActive } from '@/router';
|
||||||
|
import type { MenuRoute } from '@/types/interface';
|
||||||
|
|
||||||
type ListItemType = MenuRoute & { icon?: string };
|
type ListItemType = MenuRoute & { icon?: string };
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { useNotificationStore } from '@/store';
|
import { useNotificationStore } from '@/store';
|
||||||
import type { NotificationItem } from '@/types/interface';
|
import type { NotificationItem } from '@/types/interface';
|
||||||
|
|
||||||
|
|
|
@ -16,19 +16,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onMounted } from 'vue';
|
|
||||||
import type { PropType } from 'vue';
|
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
import union from 'lodash/union';
|
import union from 'lodash/union';
|
||||||
|
import type { PropType } from 'vue';
|
||||||
|
import { computed, onMounted } from 'vue';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { useSettingStore } from '@/store';
|
|
||||||
import { prefix } from '@/config/global';
|
|
||||||
import pgk from '../../../package.json';
|
|
||||||
import type { MenuRoute } from '@/types/interface';
|
|
||||||
import { getActive, getRoutesExpanded } from '@/router';
|
|
||||||
|
|
||||||
import AssetLogo from '@/assets/assets-t-logo.svg?component';
|
|
||||||
import AssetLogoFull from '@/assets/assets-logo-full.svg?component';
|
import AssetLogoFull from '@/assets/assets-logo-full.svg?component';
|
||||||
|
import AssetLogo from '@/assets/assets-t-logo.svg?component';
|
||||||
|
import { prefix } from '@/config/global';
|
||||||
|
import { getActive, getRoutesExpanded } from '@/router';
|
||||||
|
import { useSettingStore } from '@/store';
|
||||||
|
import type { MenuRoute } from '@/types/interface';
|
||||||
|
|
||||||
|
import pgk from '../../../package.json';
|
||||||
import MenuContent from './MenuContent.vue';
|
import MenuContent from './MenuContent.vue';
|
||||||
|
|
||||||
const MIN_POINT = 992 - 1;
|
const MIN_POINT = 992 - 1;
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, unref, computed } from 'vue';
|
import { computed, defineComponent, unref } from 'vue';
|
||||||
import FrameContent from '../components/FrameContent.vue';
|
|
||||||
|
|
||||||
|
import FrameContent from '../components/FrameContent.vue';
|
||||||
import { useFrameKeepAlive } from './useFrameKeepAlive';
|
import { useFrameKeepAlive } from './useFrameKeepAlive';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { computed, toRaw, unref } from 'vue';
|
|
||||||
import uniqBy from 'lodash/uniqBy';
|
import uniqBy from 'lodash/uniqBy';
|
||||||
|
import { computed, toRaw, unref } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { useSettingStore, useTabsRouterStore } from '@/store';
|
import { useSettingStore, useTabsRouterStore } from '@/store';
|
||||||
import type { MenuRoute } from '@/types/interface';
|
import type { MenuRoute } from '@/types/interface';
|
||||||
|
|
||||||
|
|
|
@ -24,19 +24,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onMounted, watch } from 'vue';
|
import '@/style/layout.less';
|
||||||
import { storeToRefs } from 'pinia';
|
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
import { useSettingStore, useTabsRouterStore } from '@/store';
|
|
||||||
|
|
||||||
import SettingCom from './setting.vue';
|
import { storeToRefs } from 'pinia';
|
||||||
import LayoutHeader from './components/LayoutHeader.vue';
|
import { computed, onMounted, watch } from 'vue';
|
||||||
import LayoutContent from './components/LayoutContent.vue';
|
import { useRoute } from 'vue-router';
|
||||||
import LayoutSideNav from './components/LayoutSideNav.vue';
|
|
||||||
|
|
||||||
import { prefix } from '@/config/global';
|
import { prefix } from '@/config/global';
|
||||||
|
import { useSettingStore, useTabsRouterStore } from '@/store';
|
||||||
|
|
||||||
import '@/style/layout.less';
|
import LayoutContent from './components/LayoutContent.vue';
|
||||||
|
import LayoutHeader from './components/LayoutHeader.vue';
|
||||||
|
import LayoutSideNav from './components/LayoutSideNav.vue';
|
||||||
|
import SettingCom from './setting.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const settingStore = useSettingStore();
|
const settingStore = useSettingStore();
|
||||||
|
|
|
@ -92,21 +92,19 @@
|
||||||
</t-drawer>
|
</t-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, onMounted, watchEffect } from 'vue';
|
|
||||||
import { MessagePlugin } from 'tdesign-vue-next';
|
|
||||||
import type { PopupVisibleChangeContext } from 'tdesign-vue-next';
|
import type { PopupVisibleChangeContext } from 'tdesign-vue-next';
|
||||||
|
import { MessagePlugin } from 'tdesign-vue-next';
|
||||||
|
import { computed, onMounted, ref, watchEffect } from 'vue';
|
||||||
import useClipboard from 'vue-clipboard3';
|
import useClipboard from 'vue-clipboard3';
|
||||||
|
|
||||||
import { useSettingStore } from '@/store';
|
import SettingAutoIcon from '@/assets/assets-setting-auto.svg';
|
||||||
import Thumbnail from '@/components/thumbnail/index.vue';
|
|
||||||
import ColorContainer from '@/components/color/index.vue';
|
|
||||||
|
|
||||||
import STYLE_CONFIG from '@/config/style';
|
|
||||||
import { DEFAULT_COLOR_OPTIONS } from '@/config/color';
|
|
||||||
|
|
||||||
import SettingDarkIcon from '@/assets/assets-setting-dark.svg';
|
import SettingDarkIcon from '@/assets/assets-setting-dark.svg';
|
||||||
import SettingLightIcon from '@/assets/assets-setting-light.svg';
|
import SettingLightIcon from '@/assets/assets-setting-light.svg';
|
||||||
import SettingAutoIcon from '@/assets/assets-setting-auto.svg';
|
import ColorContainer from '@/components/color/index.vue';
|
||||||
|
import Thumbnail from '@/components/thumbnail/index.vue';
|
||||||
|
import { DEFAULT_COLOR_OPTIONS } from '@/config/color';
|
||||||
|
import STYLE_CONFIG from '@/config/style';
|
||||||
|
import { useSettingStore } from '@/store';
|
||||||
|
|
||||||
const settingStore = useSettingStore();
|
const settingStore = useSettingStore();
|
||||||
|
|
||||||
|
|
11
src/main.ts
11
src/main.ts
|
@ -1,12 +1,13 @@
|
||||||
import { createApp } from 'vue';
|
|
||||||
|
|
||||||
import TDesign from 'tdesign-vue-next';
|
|
||||||
import 'tdesign-vue-next/es/style/index.css';
|
import 'tdesign-vue-next/es/style/index.css';
|
||||||
import { store } from './store';
|
|
||||||
import router from './router';
|
|
||||||
import '@/style/index.less';
|
import '@/style/index.less';
|
||||||
import './permission';
|
import './permission';
|
||||||
|
|
||||||
|
import TDesign from 'tdesign-vue-next';
|
||||||
|
import { createApp } from 'vue';
|
||||||
|
|
||||||
import App from './App.vue';
|
import App from './App.vue';
|
||||||
|
import router from './router';
|
||||||
|
import { store } from './store';
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|
||||||
|
|
|
@ -35,17 +35,17 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, watch, ref, onUnmounted, nextTick, computed, onDeactivated } from 'vue';
|
import { LineChart, PieChart } from 'echarts/charts';
|
||||||
|
import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components';
|
||||||
import * as echarts from 'echarts/core';
|
import * as echarts from 'echarts/core';
|
||||||
import { TooltipComponent, LegendComponent, GridComponent } from 'echarts/components';
|
|
||||||
import { PieChart, LineChart } from 'echarts/charts';
|
|
||||||
import { CanvasRenderer } from 'echarts/renderers';
|
import { CanvasRenderer } from 'echarts/renderers';
|
||||||
import { useSettingStore } from '@/store';
|
import { computed, nextTick, onDeactivated, onMounted, onUnmounted, ref, watch } from 'vue';
|
||||||
import { LAST_7_DAYS } from '@/utils/date';
|
|
||||||
import { changeChartsTheme } from '@/utils/color';
|
|
||||||
|
|
||||||
import { getPieChartDataSet, getLineChartDataSet } from '../index';
|
import { useSettingStore } from '@/store';
|
||||||
|
import { changeChartsTheme } from '@/utils/color';
|
||||||
|
import { LAST_7_DAYS } from '@/utils/date';
|
||||||
|
|
||||||
|
import { getLineChartDataSet, getPieChartDataSet } from '../index';
|
||||||
|
|
||||||
echarts.use([TooltipComponent, LegendComponent, PieChart, GridComponent, LineChart, CanvasRenderer]);
|
echarts.use([TooltipComponent, LegendComponent, PieChart, GridComponent, LineChart, CanvasRenderer]);
|
||||||
|
|
||||||
|
|
|
@ -67,18 +67,18 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, watch, ref, onUnmounted, nextTick, computed } from 'vue';
|
|
||||||
|
|
||||||
import * as echarts from 'echarts/core';
|
|
||||||
import { TooltipComponent, LegendComponent, GridComponent } from 'echarts/components';
|
|
||||||
import { LineChart } from 'echarts/charts';
|
import { LineChart } from 'echarts/charts';
|
||||||
|
import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components';
|
||||||
|
import * as echarts from 'echarts/core';
|
||||||
import { CanvasRenderer } from 'echarts/renderers';
|
import { CanvasRenderer } from 'echarts/renderers';
|
||||||
import { useSettingStore } from '@/store';
|
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
|
||||||
import { LAST_7_DAYS } from '@/utils/date';
|
|
||||||
import { changeChartsTheme } from '@/utils/color';
|
|
||||||
|
|
||||||
// 导入样式
|
// 导入样式
|
||||||
import Trend from '@/components/trend/index.vue';
|
import Trend from '@/components/trend/index.vue';
|
||||||
|
import { useSettingStore } from '@/store';
|
||||||
|
import { changeChartsTheme } from '@/utils/color';
|
||||||
|
import { LAST_7_DAYS } from '@/utils/date';
|
||||||
|
|
||||||
import { constructInitDataset } from '../index';
|
import { constructInitDataset } from '../index';
|
||||||
|
|
||||||
echarts.use([TooltipComponent, LegendComponent, GridComponent, LineChart, CanvasRenderer]);
|
echarts.use([TooltipComponent, LegendComponent, GridComponent, LineChart, CanvasRenderer]);
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
// 导入样式
|
// 导入样式
|
||||||
import Trend from '@/components/trend/index.vue';
|
import Trend from '@/components/trend/index.vue';
|
||||||
|
|
||||||
import { SALE_TEND_LIST, BUY_TEND_LIST, SALE_COLUMNS, BUY_COLUMNS } from '../constants';
|
import { BUY_COLUMNS, BUY_TEND_LIST, SALE_COLUMNS, SALE_TEND_LIST } from '../constants';
|
||||||
|
|
||||||
const rehandleClickOp = (val: MouseEvent) => {
|
const rehandleClickOp = (val: MouseEvent) => {
|
||||||
console.log(val);
|
console.log(val);
|
||||||
|
|
|
@ -55,20 +55,19 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, watch, ref, onUnmounted, nextTick } from 'vue';
|
import { BarChart, LineChart } from 'echarts/charts';
|
||||||
|
|
||||||
import * as echarts from 'echarts/core';
|
import * as echarts from 'echarts/core';
|
||||||
import { LineChart, BarChart } from 'echarts/charts';
|
|
||||||
import { CanvasRenderer } from 'echarts/renderers';
|
import { CanvasRenderer } from 'echarts/renderers';
|
||||||
import { UsergroupIcon, FileIcon } from 'tdesign-icons-vue-next';
|
import { FileIcon, UsergroupIcon } from 'tdesign-icons-vue-next';
|
||||||
import { useSettingStore } from '@/store';
|
import { nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
|
||||||
import { changeChartsTheme } from '@/utils/color';
|
|
||||||
|
|
||||||
// 导入样式
|
// 导入样式
|
||||||
import Trend from '@/components/trend/index.vue';
|
import Trend from '@/components/trend/index.vue';
|
||||||
import { constructInitDashboardDataset } from '../index';
|
import { useSettingStore } from '@/store';
|
||||||
|
import { changeChartsTheme } from '@/utils/color';
|
||||||
|
|
||||||
import { PANE_LIST } from '../constants';
|
import { PANE_LIST } from '../constants';
|
||||||
|
import { constructInitDashboardDataset } from '../index';
|
||||||
|
|
||||||
echarts.use([LineChart, BarChart, CanvasRenderer]);
|
echarts.use([LineChart, BarChart, CanvasRenderer]);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
import { TChartColor } from '@/config/color';
|
import { TChartColor } from '@/config/color';
|
||||||
import { getChartListColor } from '@/utils/color';
|
|
||||||
import { getRandomArray } from '@/utils/charts';
|
import { getRandomArray } from '@/utils/charts';
|
||||||
|
import { getChartListColor } from '@/utils/color';
|
||||||
|
|
||||||
/** 首页 dashboard 折线图 */
|
/** 首页 dashboard 折线图 */
|
||||||
export function constructInitDashboardDataset(type: string) {
|
export function constructInitDashboardDataset(type: string) {
|
||||||
|
|
|
@ -18,10 +18,10 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import TopPanel from './components/TopPanel.vue';
|
|
||||||
import MiddleChart from './components/MiddleChart.vue';
|
import MiddleChart from './components/MiddleChart.vue';
|
||||||
import RankList from './components/RankList.vue';
|
|
||||||
import OutputOverview from './components/OutputOverview.vue';
|
import OutputOverview from './components/OutputOverview.vue';
|
||||||
|
import RankList from './components/RankList.vue';
|
||||||
|
import TopPanel from './components/TopPanel.vue';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
import { TChartColor } from '@/config/color';
|
import { TChartColor } from '@/config/color';
|
||||||
|
import { getDateArray, getRandomArray } from '@/utils/charts';
|
||||||
import { getChartListColor } from '@/utils/color';
|
import { getChartListColor } from '@/utils/color';
|
||||||
import { getRandomArray, getDateArray } from '@/utils/charts';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 散点图数据
|
* 散点图数据
|
||||||
|
|
|
@ -65,21 +65,20 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { nextTick, onMounted, onUnmounted, watch, computed, onDeactivated } from 'vue';
|
|
||||||
|
|
||||||
import * as echarts from 'echarts/core';
|
|
||||||
import { GridComponent, TooltipComponent, LegendComponent } from 'echarts/components';
|
|
||||||
import { LineChart, ScatterChart } from 'echarts/charts';
|
import { LineChart, ScatterChart } from 'echarts/charts';
|
||||||
|
import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components';
|
||||||
|
import * as echarts from 'echarts/core';
|
||||||
import { CanvasRenderer } from 'echarts/renderers';
|
import { CanvasRenderer } from 'echarts/renderers';
|
||||||
import ProductCard from '@/components/product-card/index.vue';
|
import { computed, nextTick, onDeactivated, onMounted, onUnmounted, watch } from 'vue';
|
||||||
|
|
||||||
import { getFolderLineDataSet, getScatterDataSet } from './index';
|
import ProductCard from '@/components/product-card/index.vue';
|
||||||
import { PANE_LIST_DATA, PRODUCT_LIST } from './constants';
|
import Trend from '@/components/trend/index.vue';
|
||||||
import { LAST_7_DAYS } from '@/utils/date';
|
|
||||||
import { useSettingStore } from '@/store';
|
import { useSettingStore } from '@/store';
|
||||||
import { changeChartsTheme } from '@/utils/color';
|
import { changeChartsTheme } from '@/utils/color';
|
||||||
|
import { LAST_7_DAYS } from '@/utils/date';
|
||||||
|
|
||||||
import Trend from '@/components/trend/index.vue';
|
import { PANE_LIST_DATA, PRODUCT_LIST } from './constants';
|
||||||
|
import { getFolderLineDataSet, getScatterDataSet } from './index';
|
||||||
|
|
||||||
echarts.use([GridComponent, LegendComponent, TooltipComponent, LineChart, ScatterChart, CanvasRenderer]);
|
echarts.use([GridComponent, LegendComponent, TooltipComponent, LineChart, ScatterChart, CanvasRenderer]);
|
||||||
|
|
||||||
|
|
|
@ -125,12 +125,13 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import { prefix } from '@/config/global';
|
|
||||||
import { BASE_INFO_DATA, TABLE_COLUMNS_DATA as columns, PRODUCT_LIST } from './constants';
|
|
||||||
import { getPurchaseList } from '@/api/detail';
|
import { getPurchaseList } from '@/api/detail';
|
||||||
|
import { prefix } from '@/config/global';
|
||||||
|
|
||||||
import Product from './components/Product.vue';
|
import Product from './components/Product.vue';
|
||||||
|
import { BASE_INFO_DATA, PRODUCT_LIST, TABLE_COLUMNS_DATA as columns } from './constants';
|
||||||
|
|
||||||
const data = ref([]);
|
const data = ref([]);
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { TChartColor } from '@/config/color';
|
import { TChartColor } from '@/config/color';
|
||||||
|
import { getDateArray, getRandomArray } from '@/utils/charts';
|
||||||
import { getChartListColor } from '@/utils/color';
|
import { getChartListColor } from '@/utils/color';
|
||||||
import { getRandomArray, getDateArray } from '@/utils/charts';
|
|
||||||
|
|
||||||
/** 平滑图数据 */
|
/** 平滑图数据 */
|
||||||
export function getSmoothLineDataSet({
|
export function getSmoothLineDataSet({
|
||||||
|
|
|
@ -77,20 +77,19 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, onUnmounted, ref, watch, computed } from 'vue';
|
|
||||||
|
|
||||||
import * as echarts from 'echarts/core';
|
|
||||||
import { TitleComponent, ToolboxComponent, TooltipComponent, GridComponent, LegendComponent } from 'echarts/components';
|
|
||||||
import { BarChart, LineChart } from 'echarts/charts';
|
import { BarChart, LineChart } from 'echarts/charts';
|
||||||
|
import { GridComponent, LegendComponent, TitleComponent, ToolboxComponent, TooltipComponent } from 'echarts/components';
|
||||||
|
import * as echarts from 'echarts/core';
|
||||||
import { CanvasRenderer } from 'echarts/renderers';
|
import { CanvasRenderer } from 'echarts/renderers';
|
||||||
import { useSettingStore } from '@/store';
|
import { computed, onMounted, onUnmounted, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { getSmoothLineDataSet, get2ColBarChartDataSet } from './index';
|
import { getProjectList } from '@/api/detail';
|
||||||
import { BASE_INFO_DATA, TABLE_COLUMNS as columns } from './constants';
|
import { prefix } from '@/config/global';
|
||||||
|
import { useSettingStore } from '@/store';
|
||||||
import { changeChartsTheme } from '@/utils/color';
|
import { changeChartsTheme } from '@/utils/color';
|
||||||
|
|
||||||
import { prefix } from '@/config/global';
|
import { BASE_INFO_DATA, TABLE_COLUMNS as columns } from './constants';
|
||||||
import { getProjectList } from '@/api/detail';
|
import { get2ColBarChartDataSet, getSmoothLineDataSet } from './index';
|
||||||
|
|
||||||
echarts.use([
|
echarts.use([
|
||||||
TitleComponent,
|
TitleComponent,
|
||||||
|
|
|
@ -57,12 +57,13 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue';
|
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { NOTIFICATION_TYPES } from '@/constants';
|
import { computed, ref } from 'vue';
|
||||||
import type { NotificationItem } from '@/types/interface';
|
|
||||||
import EmptyIcon from '@/assets/assets-empty.svg?component';
|
import EmptyIcon from '@/assets/assets-empty.svg?component';
|
||||||
|
import { NOTIFICATION_TYPES } from '@/constants';
|
||||||
import { useNotificationStore } from '@/store';
|
import { useNotificationStore } from '@/store';
|
||||||
|
import type { NotificationItem } from '@/types/interface';
|
||||||
|
|
||||||
const TAB_LIST = [
|
const TAB_LIST = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -164,9 +164,10 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
|
||||||
import { MessagePlugin } from 'tdesign-vue-next';
|
import { MessagePlugin } from 'tdesign-vue-next';
|
||||||
import { FORM_RULES, INITIAL_DATA, TYPE_OPTIONS, PARTY_A_OPTIONS, PARTY_B_OPTIONS } from './constants';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
import { FORM_RULES, INITIAL_DATA, PARTY_A_OPTIONS, PARTY_B_OPTIONS, TYPE_OPTIONS } from './constants';
|
||||||
|
|
||||||
const formData = ref({ ...INITIAL_DATA });
|
const formData = ref({ ...INITIAL_DATA });
|
||||||
|
|
||||||
|
|
|
@ -147,18 +147,18 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue';
|
import { Data, SubmitContext } from 'tdesign-vue-next';
|
||||||
|
import { computed, ref } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { SubmitContext, Data } from 'tdesign-vue-next';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
FORM_RULES,
|
|
||||||
NAME_OPTIONS,
|
|
||||||
TYPE_OPTIONS,
|
|
||||||
ADDRESS_OPTIONS,
|
ADDRESS_OPTIONS,
|
||||||
|
FORM_RULES,
|
||||||
INITIAL_DATA1,
|
INITIAL_DATA1,
|
||||||
INITIAL_DATA2,
|
INITIAL_DATA2,
|
||||||
INITIAL_DATA3,
|
INITIAL_DATA3,
|
||||||
|
NAME_OPTIONS,
|
||||||
|
TYPE_OPTIONS,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
|
|
||||||
const formData1 = ref({ ...INITIAL_DATA1 });
|
const formData1 = ref({ ...INITIAL_DATA1 });
|
||||||
|
|
|
@ -74,16 +74,16 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, computed } from 'vue';
|
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
import { SearchIcon } from 'tdesign-icons-vue-next';
|
import { SearchIcon } from 'tdesign-icons-vue-next';
|
||||||
import { MessagePlugin } from 'tdesign-vue-next';
|
import { MessagePlugin } from 'tdesign-vue-next';
|
||||||
|
import { computed, onMounted, ref } from 'vue';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { CONTRACT_STATUS, CONTRACT_TYPES, CONTRACT_PAYMENT_TYPES } from '@/constants';
|
|
||||||
import Trend from '@/components/trend/index.vue';
|
|
||||||
import { getList } from '@/api/list';
|
import { getList } from '@/api/list';
|
||||||
import { useSettingStore } from '@/store';
|
import Trend from '@/components/trend/index.vue';
|
||||||
import { prefix } from '@/config/global';
|
import { prefix } from '@/config/global';
|
||||||
|
import { CONTRACT_PAYMENT_TYPES, CONTRACT_STATUS, CONTRACT_TYPES } from '@/constants';
|
||||||
|
import { useSettingStore } from '@/store';
|
||||||
|
|
||||||
import { COLUMNS } from './constants';
|
import { COLUMNS } from './constants';
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { Data, FormRule, MessagePlugin, SubmitContext } from 'tdesign-vue-next';
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
import { MessagePlugin, FormRule, SubmitContext, Data } from 'tdesign-vue-next';
|
|
||||||
|
|
||||||
const INITIAL_DATA = {
|
const INITIAL_DATA = {
|
||||||
name: '',
|
name: '',
|
||||||
|
|
|
@ -68,12 +68,14 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, onMounted } from 'vue';
|
|
||||||
import { SearchIcon } from 'tdesign-icons-vue-next';
|
import { SearchIcon } from 'tdesign-icons-vue-next';
|
||||||
import { MessagePlugin } from 'tdesign-vue-next';
|
import { MessagePlugin } from 'tdesign-vue-next';
|
||||||
import ProductCard from '@/components/product-card/index.vue';
|
import { computed, onMounted, ref } from 'vue';
|
||||||
import DialogForm from './components/DialogForm.vue';
|
|
||||||
import { getCardList } from '@/api/list';
|
import { getCardList } from '@/api/list';
|
||||||
|
import ProductCard from '@/components/product-card/index.vue';
|
||||||
|
|
||||||
|
import DialogForm from './components/DialogForm.vue';
|
||||||
|
|
||||||
const INITIAL_DATA = {
|
const INITIAL_DATA = {
|
||||||
name: '',
|
name: '',
|
||||||
|
|
|
@ -105,20 +105,20 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, onMounted } from 'vue';
|
import { MessagePlugin, PageInfo, PrimaryTableCol, TableRowData } from 'tdesign-vue-next';
|
||||||
import { MessagePlugin, PrimaryTableCol, TableRowData, PageInfo } from 'tdesign-vue-next';
|
import { computed, onMounted, ref } from 'vue';
|
||||||
import Trend from '@/components/trend/index.vue';
|
|
||||||
import { getList } from '@/api/list';
|
|
||||||
import { useSettingStore } from '@/store';
|
|
||||||
import { prefix } from '@/config/global';
|
|
||||||
|
|
||||||
|
import { getList } from '@/api/list';
|
||||||
|
import Trend from '@/components/trend/index.vue';
|
||||||
|
import { prefix } from '@/config/global';
|
||||||
import {
|
import {
|
||||||
|
CONTRACT_PAYMENT_TYPES,
|
||||||
CONTRACT_STATUS,
|
CONTRACT_STATUS,
|
||||||
CONTRACT_STATUS_OPTIONS,
|
CONTRACT_STATUS_OPTIONS,
|
||||||
CONTRACT_TYPES,
|
|
||||||
CONTRACT_TYPE_OPTIONS,
|
CONTRACT_TYPE_OPTIONS,
|
||||||
CONTRACT_PAYMENT_TYPES,
|
CONTRACT_TYPES,
|
||||||
} from '@/constants';
|
} from '@/constants';
|
||||||
|
import { useSettingStore } from '@/store';
|
||||||
|
|
||||||
const store = useSettingStore();
|
const store = useSettingStore();
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,11 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
|
||||||
import { SearchIcon } from 'tdesign-icons-vue-next';
|
import { SearchIcon } from 'tdesign-icons-vue-next';
|
||||||
|
import { ref } from 'vue';
|
||||||
|
|
||||||
import { TREE_DATA } from './constants';
|
|
||||||
import CommonTable from '../components/CommonTable.vue';
|
import CommonTable from '../components/CommonTable.vue';
|
||||||
|
import { TREE_DATA } from './constants';
|
||||||
|
|
||||||
const filterByText = ref();
|
const filterByText = ref();
|
||||||
const filterText = ref();
|
const filterText = ref();
|
||||||
|
|
|
@ -79,11 +79,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import QrcodeVue from 'qrcode.vue';
|
||||||
|
import type { FormInstanceFunctions, FormRule } from 'tdesign-vue-next';
|
||||||
|
import { MessagePlugin } from 'tdesign-vue-next';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import QrcodeVue from 'qrcode.vue';
|
|
||||||
import { MessagePlugin } from 'tdesign-vue-next';
|
|
||||||
import type { FormInstanceFunctions, FormRule } from 'tdesign-vue-next';
|
|
||||||
import { useCounter } from '@/hooks';
|
import { useCounter } from '@/hooks';
|
||||||
import { useUserStore } from '@/store';
|
import { useUserStore } from '@/store';
|
||||||
|
|
||||||
|
|
|
@ -71,8 +71,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { FormRule, MessagePlugin } from 'tdesign-vue-next';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { MessagePlugin, FormRule } from 'tdesign-vue-next';
|
|
||||||
import { useCounter } from '@/hooks';
|
import { useCounter } from '@/hooks';
|
||||||
|
|
||||||
const INITIAL_DATA = {
|
const INITIAL_DATA = {
|
||||||
|
|
|
@ -30,10 +30,11 @@ export default {
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
import TdesignSetting from '@/layouts/setting.vue';
|
||||||
|
|
||||||
|
import LoginHeader from './components/Header.vue';
|
||||||
import Login from './components/Login.vue';
|
import Login from './components/Login.vue';
|
||||||
import Register from './components/Register.vue';
|
import Register from './components/Register.vue';
|
||||||
import LoginHeader from './components/Header.vue';
|
|
||||||
import TdesignSetting from '@/layouts/setting.vue';
|
|
||||||
|
|
||||||
const type = ref('login');
|
const type = ref('login');
|
||||||
const switchType = (val: string) => {
|
const switchType = (val: string) => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { TChartColor } from '@/config/color';
|
import { TChartColor } from '@/config/color';
|
||||||
|
import { getDateArray, getRandomArray } from '@/utils/charts';
|
||||||
import { getChartListColor } from '@/utils/color';
|
import { getChartListColor } from '@/utils/color';
|
||||||
import { getRandomArray, getDateArray } from '@/utils/charts';
|
|
||||||
|
|
||||||
/** 折线图数据 */
|
/** 折线图数据 */
|
||||||
export function getFolderLineDataSet({
|
export function getFolderLineDataSet({
|
||||||
|
|
|
@ -94,21 +94,22 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { nextTick, onMounted, onUnmounted, watch, computed } from 'vue';
|
|
||||||
import * as echarts from 'echarts/core';
|
|
||||||
import { GridComponent, TooltipComponent, LegendComponent } from 'echarts/components';
|
|
||||||
import { LineChart } from 'echarts/charts';
|
import { LineChart } from 'echarts/charts';
|
||||||
|
import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components';
|
||||||
|
import * as echarts from 'echarts/core';
|
||||||
import { CanvasRenderer } from 'echarts/renderers';
|
import { CanvasRenderer } from 'echarts/renderers';
|
||||||
import { useSettingStore } from '@/store';
|
import { computed, nextTick, onMounted, onUnmounted, watch } from 'vue';
|
||||||
|
|
||||||
import { LAST_7_DAYS } from '@/utils/date';
|
|
||||||
import { USER_INFO_LIST, TEAM_MEMBERS, PRODUCT_LIST } from './constants';
|
|
||||||
import { getFolderLineDataSet } from './index';
|
|
||||||
import ProductAIcon from '@/assets/assets-product-1.svg';
|
import ProductAIcon from '@/assets/assets-product-1.svg';
|
||||||
import ProductBIcon from '@/assets/assets-product-2.svg';
|
import ProductBIcon from '@/assets/assets-product-2.svg';
|
||||||
import ProductCIcon from '@/assets/assets-product-3.svg';
|
import ProductCIcon from '@/assets/assets-product-3.svg';
|
||||||
import ProductDIcon from '@/assets/assets-product-4.svg';
|
import ProductDIcon from '@/assets/assets-product-4.svg';
|
||||||
|
import { useSettingStore } from '@/store';
|
||||||
import { changeChartsTheme } from '@/utils/color';
|
import { changeChartsTheme } from '@/utils/color';
|
||||||
|
import { LAST_7_DAYS } from '@/utils/date';
|
||||||
|
|
||||||
|
import { PRODUCT_LIST, TEAM_MEMBERS, USER_INFO_LIST } from './constants';
|
||||||
|
import { getFolderLineDataSet } from './index';
|
||||||
|
|
||||||
echarts.use([GridComponent, TooltipComponent, LineChart, CanvasRenderer, LegendComponent]);
|
echarts.use([GridComponent, TooltipComponent, LineChart, CanvasRenderer, LegendComponent]);
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import { MessagePlugin } from 'tdesign-vue-next';
|
|
||||||
import NProgress from 'nprogress'; // progress bar
|
|
||||||
import 'nprogress/nprogress.css'; // progress bar style
|
import 'nprogress/nprogress.css'; // progress bar style
|
||||||
|
|
||||||
|
import NProgress from 'nprogress'; // progress bar
|
||||||
|
import { MessagePlugin } from 'tdesign-vue-next';
|
||||||
import { RouteRecordRaw } from 'vue-router';
|
import { RouteRecordRaw } from 'vue-router';
|
||||||
import { getPermissionStore, getUserStore } from '@/store';
|
|
||||||
import router from '@/router';
|
import router from '@/router';
|
||||||
|
import { getPermissionStore, getUserStore } from '@/store';
|
||||||
import { PAGE_NOT_FOUND_ROUTE } from '@/utils/route/constant';
|
import { PAGE_NOT_FOUND_ROUTE } from '@/utils/route/constant';
|
||||||
|
|
||||||
NProgress.configure({ showSpinner: false });
|
NProgress.configure({ showSpinner: false });
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { useRoute, createRouter, RouteRecordRaw, createWebHistory } from 'vue-router';
|
|
||||||
import uniq from 'lodash/uniq';
|
import uniq from 'lodash/uniq';
|
||||||
|
import { createRouter, createWebHistory, RouteRecordRaw, useRoute } from 'vue-router';
|
||||||
|
|
||||||
const env = import.meta.env.MODE || 'development';
|
const env = import.meta.env.MODE || 'development';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { DashboardIcon } from 'tdesign-icons-vue-next';
|
import { DashboardIcon } from 'tdesign-icons-vue-next';
|
||||||
import { shallowRef } from 'vue';
|
import { shallowRef } from 'vue';
|
||||||
|
|
||||||
import Layout from '@/layouts/index.vue';
|
import Layout from '@/layouts/index.vue';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { LogoutIcon } from 'tdesign-icons-vue-next';
|
import { LogoutIcon } from 'tdesign-icons-vue-next';
|
||||||
import { shallowRef } from 'vue';
|
import { shallowRef } from 'vue';
|
||||||
|
|
||||||
import Layout from '@/layouts/index.vue';
|
import Layout from '@/layouts/index.vue';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
|
|
|
@ -8,8 +8,8 @@ export { store };
|
||||||
|
|
||||||
export * from './modules/notification';
|
export * from './modules/notification';
|
||||||
export * from './modules/permission';
|
export * from './modules/permission';
|
||||||
export * from './modules/user';
|
|
||||||
export * from './modules/setting';
|
export * from './modules/setting';
|
||||||
export * from './modules/tabs-router';
|
export * from './modules/tabs-router';
|
||||||
|
export * from './modules/user';
|
||||||
|
|
||||||
export default store;
|
export default store;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
|
|
||||||
import type { NotificationItem } from '@/types/interface';
|
import type { NotificationItem } from '@/types/interface';
|
||||||
|
|
||||||
const msgData = [
|
const msgData = [
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { RouteRecordRaw } from 'vue-router';
|
import { RouteRecordRaw } from 'vue-router';
|
||||||
|
|
||||||
import router, { allRoutes } from '@/router';
|
import router, { allRoutes } from '@/router';
|
||||||
import { store } from '@/store';
|
import { store } from '@/store';
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { RouteRecordRaw } from 'vue-router';
|
import { RouteRecordRaw } from 'vue-router';
|
||||||
import router, { fixedRouterList, homepageRouterList } from '@/router';
|
|
||||||
import { store } from '@/store';
|
|
||||||
import { RouteItem } from '@/api/model/permissionModel';
|
import { RouteItem } from '@/api/model/permissionModel';
|
||||||
import { getMenuList } from '@/api/permission';
|
import { getMenuList } from '@/api/permission';
|
||||||
|
import router, { fixedRouterList, homepageRouterList } from '@/router';
|
||||||
|
import { store } from '@/store';
|
||||||
import { transformObjectToRoute } from '@/utils/route';
|
import { transformObjectToRoute } from '@/utils/route';
|
||||||
|
|
||||||
export const usePermissionStore = defineStore('permission', {
|
export const usePermissionStore = defineStore('permission', {
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
|
import keys from 'lodash/keys';
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { Color } from 'tvision-color';
|
import { Color } from 'tvision-color';
|
||||||
import keys from 'lodash/keys';
|
|
||||||
import { LIGHT_CHART_COLORS, DARK_CHART_COLORS } from '@/config/color';
|
import { DARK_CHART_COLORS, LIGHT_CHART_COLORS } from '@/config/color';
|
||||||
import { insertThemeStylesheet, generateColorMap } from '@/utils/color';
|
|
||||||
import STYLE_CONFIG from '@/config/style';
|
import STYLE_CONFIG from '@/config/style';
|
||||||
import { store } from '@/store';
|
import { store } from '@/store';
|
||||||
|
import { generateColorMap, insertThemeStylesheet } from '@/utils/color';
|
||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
...STYLE_CONFIG,
|
...STYLE_CONFIG,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import type { TRouterInfo, TTabRouterType } from '@/types/interface';
|
|
||||||
import { store } from '@/store';
|
import { store } from '@/store';
|
||||||
|
import type { TRouterInfo, TTabRouterType } from '@/types/interface';
|
||||||
|
|
||||||
const homeRoute: Array<TRouterInfo> = [
|
const homeRoute: Array<TRouterInfo> = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
|
|
||||||
import { TOKEN_NAME } from '@/config/global';
|
import { TOKEN_NAME } from '@/config/global';
|
||||||
import { store, usePermissionStore } from '@/store';
|
import { store, usePermissionStore } from '@/store';
|
||||||
|
|
||||||
|
|
3
src/types/interface.d.ts
vendored
3
src/types/interface.d.ts
vendored
|
@ -1,4 +1,5 @@
|
||||||
import { RouteRecordName, LocationQueryRaw } from 'vue-router';
|
import { LocationQueryRaw, RouteRecordName } from 'vue-router';
|
||||||
|
|
||||||
import STYLE_CONFIG from '@/config/style';
|
import STYLE_CONFIG from '@/config/style';
|
||||||
|
|
||||||
export interface MenuRoute {
|
export interface MenuRoute {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { Color } from 'tvision-color';
|
|
||||||
import * as echarts from 'echarts/core';
|
import * as echarts from 'echarts/core';
|
||||||
import trim from 'lodash/trim';
|
import trim from 'lodash/trim';
|
||||||
|
import { Color } from 'tvision-color';
|
||||||
|
|
||||||
import { TColorToken } from '@/config/color';
|
import { TColorToken } from '@/config/color';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
import axios, { AxiosRequestConfig, InternalAxiosRequestConfig, AxiosInstance, AxiosResponse, AxiosError } from 'axios';
|
import axios, { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from 'axios';
|
||||||
import { stringify } from 'qs';
|
|
||||||
import isFunction from 'lodash/isFunction';
|
|
||||||
import cloneDeep from 'lodash/cloneDeep';
|
import cloneDeep from 'lodash/cloneDeep';
|
||||||
import { CreateAxiosOptions } from './AxiosTransform';
|
import isFunction from 'lodash/isFunction';
|
||||||
import { AxiosCanceler } from './AxiosCancel';
|
import { stringify } from 'qs';
|
||||||
import { AxiosRequestConfigRetry, RequestOptions, Result } from '@/types/axios';
|
|
||||||
import { ContentTypeEnum } from '@/constants';
|
import { ContentTypeEnum } from '@/constants';
|
||||||
|
import { AxiosRequestConfigRetry, RequestOptions, Result } from '@/types/axios';
|
||||||
|
|
||||||
|
import { AxiosCanceler } from './AxiosCancel';
|
||||||
|
import { CreateAxiosOptions } from './AxiosTransform';
|
||||||
|
|
||||||
// Axios模块
|
// Axios模块
|
||||||
export class VAxios {
|
export class VAxios {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import type { AxiosRequestConfig, InternalAxiosRequestConfig, AxiosResponse, AxiosInstance } from 'axios';
|
import type { AxiosInstance, AxiosRequestConfig, AxiosResponse, InternalAxiosRequestConfig } from 'axios';
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
|
|
||||||
import type { RequestOptions, Result } from '@/types/axios';
|
import type { RequestOptions, Result } from '@/types/axios';
|
||||||
|
|
||||||
// 创建Axios选项
|
// 创建Axios选项
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
// axios配置 可自行根据项目进行更改,只需更改该文件即可,其他文件可以不动
|
// axios配置 可自行根据项目进行更改,只需更改该文件即可,其他文件可以不动
|
||||||
|
import type { AxiosInstance, InternalAxiosRequestConfig } from 'axios';
|
||||||
import isString from 'lodash/isString';
|
import isString from 'lodash/isString';
|
||||||
import merge from 'lodash/merge';
|
import merge from 'lodash/merge';
|
||||||
import type { AxiosInstance, InternalAxiosRequestConfig } from 'axios';
|
|
||||||
import type { AxiosTransform, CreateAxiosOptions } from './AxiosTransform';
|
|
||||||
import { VAxios } from './Axios';
|
|
||||||
import { joinTimestamp, formatRequestDate, setObjToUrlParams } from './utils';
|
|
||||||
import { TOKEN_NAME } from '@/config/global';
|
import { TOKEN_NAME } from '@/config/global';
|
||||||
import { ContentTypeEnum } from '@/constants';
|
import { ContentTypeEnum } from '@/constants';
|
||||||
|
|
||||||
|
import { VAxios } from './Axios';
|
||||||
|
import type { AxiosTransform, CreateAxiosOptions } from './AxiosTransform';
|
||||||
|
import { formatRequestDate, joinTimestamp, setObjToUrlParams } from './utils';
|
||||||
|
|
||||||
const env = import.meta.env.MODE || 'development';
|
const env = import.meta.env.MODE || 'development';
|
||||||
|
|
||||||
// 如果是mock模式 或 没启用直连代理 就不配置host 会走本地Mock拦截 或 Vite 代理
|
// 如果是mock模式 或 没启用直连代理 就不配置host 会走本地Mock拦截 或 Vite 代理
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import isString from 'lodash/isString';
|
|
||||||
import isObject from 'lodash/isObject';
|
import isObject from 'lodash/isObject';
|
||||||
|
import isString from 'lodash/isString';
|
||||||
|
|
||||||
const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss';
|
const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss';
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
import cloneDeep from 'lodash/cloneDeep';
|
import cloneDeep from 'lodash/cloneDeep';
|
||||||
import { shallowRef } from 'vue';
|
import { shallowRef } from 'vue';
|
||||||
|
|
||||||
import { RouteItem, RouteMeta } from '@/api/model/permissionModel';
|
import { RouteItem, RouteMeta } from '@/api/model/permissionModel';
|
||||||
import {
|
import {
|
||||||
BLANK_LAYOUT,
|
BLANK_LAYOUT,
|
||||||
LAYOUT,
|
|
||||||
IFRAME,
|
|
||||||
EXCEPTION_COMPONENT,
|
EXCEPTION_COMPONENT,
|
||||||
PARENT_LAYOUT,
|
IFRAME,
|
||||||
|
LAYOUT,
|
||||||
PAGE_NOT_FOUND_ROUTE,
|
PAGE_NOT_FOUND_ROUTE,
|
||||||
|
PARENT_LAYOUT,
|
||||||
} from '@/utils/route/constant';
|
} from '@/utils/route/constant';
|
||||||
|
|
||||||
// vite 3+ support dynamic import from node_modules
|
// vite 3+ support dynamic import from node_modules
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
import { ConfigEnv, UserConfig, loadEnv } from 'vite';
|
|
||||||
import { viteMockServe } from 'vite-plugin-mock';
|
|
||||||
import vue from '@vitejs/plugin-vue';
|
import vue from '@vitejs/plugin-vue';
|
||||||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
import vueJsx from '@vitejs/plugin-vue-jsx';
|
||||||
import svgLoader from 'vite-svg-loader';
|
|
||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import { ConfigEnv, loadEnv, UserConfig } from 'vite';
|
||||||
|
import { viteMockServe } from 'vite-plugin-mock';
|
||||||
|
import svgLoader from 'vite-svg-loader';
|
||||||
|
|
||||||
const CWD = process.cwd();
|
const CWD = process.cwd();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user