feat: 🚀 订阅功能
29
src/App.vue
Normal file
@@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<el-config-provider :locale="locale" :size="assemblySize" :button="buttonConfig">
|
||||
<router-view></router-view>
|
||||
</el-config-provider>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, computed } from "vue";
|
||||
|
||||
import { useTheme } from "@/hooks/useTheme";
|
||||
import { ElConfigProvider } from "element-plus";
|
||||
|
||||
import { useGlobalStore } from "@/stores/modules/global";
|
||||
|
||||
import zhCn from "element-plus/es/locale/lang/zh-cn";
|
||||
|
||||
const globalStore = useGlobalStore();
|
||||
|
||||
// init theme
|
||||
const { initTheme } = useTheme();
|
||||
initTheme();
|
||||
const locale = ref(zhCn);
|
||||
|
||||
// element assemblySize
|
||||
const assemblySize = computed(() => globalStore.assemblySize);
|
||||
|
||||
// element button config
|
||||
const buttonConfig = reactive({ autoInsertSpace: false });
|
||||
</script>
|
||||
3
src/api/config/servicePort.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// 后端微服务模块前缀
|
||||
export const PORT1 = "/api";
|
||||
export const PORT2 = "/hooks";
|
||||
47
src/api/helper/axiosCancel.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
// ? 暂未使用,目前使用全局 Loading 来控制重复请求
|
||||
import { CustomAxiosRequestConfig } from "../index";
|
||||
import qs from "qs";
|
||||
|
||||
// 声明一个 Map 用于存储每个请求的标识 和 取消函数
|
||||
let pendingMap = new Map<string, AbortController>();
|
||||
|
||||
// 序列化参数
|
||||
export const getPendingUrl = (config: CustomAxiosRequestConfig) =>
|
||||
[config.method, config.url, qs.stringify(config.data), qs.stringify(config.params)].join("&");
|
||||
|
||||
export class AxiosCanceler {
|
||||
/**
|
||||
* @description: 添加请求
|
||||
* @param {Object} config
|
||||
* @return void
|
||||
*/
|
||||
addPending(config: CustomAxiosRequestConfig) {
|
||||
// 在请求开始前,对之前的请求做检查取消操作
|
||||
this.removePending(config);
|
||||
const url = getPendingUrl(config);
|
||||
const controller = new AbortController();
|
||||
config.signal = controller.signal;
|
||||
pendingMap.set(url, controller);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 移除请求
|
||||
* @param {Object} config
|
||||
*/
|
||||
removePending(config: CustomAxiosRequestConfig) {
|
||||
const url = getPendingUrl(config);
|
||||
// 如果在 pending 中存在当前请求标识,需要取消当前请求
|
||||
const controller = pendingMap.get(url);
|
||||
controller && controller.abort();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 清空所有pending
|
||||
*/
|
||||
removeAllPending() {
|
||||
pendingMap.forEach(controller => {
|
||||
controller && controller.abort();
|
||||
});
|
||||
pendingMap.clear();
|
||||
}
|
||||
}
|
||||
43
src/api/helper/checkStatus.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
/**
|
||||
* @description: 校验网络请求状态码
|
||||
* @param {Number} status
|
||||
* @return void
|
||||
*/
|
||||
export const checkStatus = (status: number) => {
|
||||
switch (status) {
|
||||
case 400:
|
||||
ElMessage.error("请求失败!请您稍后重试");
|
||||
break;
|
||||
case 401:
|
||||
ElMessage.error("登录失效!请您重新登录");
|
||||
break;
|
||||
case 403:
|
||||
ElMessage.error("当前账号无权限访问!");
|
||||
break;
|
||||
case 404:
|
||||
ElMessage.error("你所访问的资源不存在!");
|
||||
break;
|
||||
case 405:
|
||||
ElMessage.error("请求方式错误!请您稍后重试");
|
||||
break;
|
||||
case 408:
|
||||
ElMessage.error("请求超时!请您稍后重试");
|
||||
break;
|
||||
case 500:
|
||||
ElMessage.error("服务异常!");
|
||||
break;
|
||||
case 502:
|
||||
ElMessage.error("网关错误!");
|
||||
break;
|
||||
case 503:
|
||||
ElMessage.error("服务不可用!");
|
||||
break;
|
||||
case 504:
|
||||
ElMessage.error("网关超时!");
|
||||
break;
|
||||
default:
|
||||
ElMessage.error("请求失败!");
|
||||
}
|
||||
};
|
||||
125
src/api/index.ts
Normal file
@@ -0,0 +1,125 @@
|
||||
import axios, { AxiosInstance, AxiosError, AxiosRequestConfig, InternalAxiosRequestConfig, AxiosResponse } from "axios";
|
||||
//endLoading
|
||||
import { showFullScreenLoading, tryHideFullScreenLoading } from "@/config/serviceLoading";
|
||||
import { usePathUrl } from "@/hooks/usePathUrl";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { ResultData } from "@/api/interface";
|
||||
import { ResultEnum } from "@/enums/httpEnum";
|
||||
import { checkStatus } from "./helper/checkStatus";
|
||||
import { useUserStore } from "@/stores/modules/user";
|
||||
import router from "@/routers";
|
||||
|
||||
//loading控制
|
||||
export interface CustomAxiosRequestConfig extends InternalAxiosRequestConfig {
|
||||
noLoading?: boolean;
|
||||
}
|
||||
|
||||
//计步器
|
||||
// let setUp: number = 0;
|
||||
const config = {
|
||||
// 默认地址请求地址,可在 .env.** 文件中修改
|
||||
baseURL: (import.meta.env.VITE_APP_API_BASEURL + import.meta.env.VITE_APP_API_VERSION) as string,
|
||||
// 设置超时时间
|
||||
timeout: ResultEnum.TIMEOUT as number,
|
||||
// 跨域时候允许携带凭证
|
||||
withCredentials: true
|
||||
};
|
||||
|
||||
class RequestHttp {
|
||||
service: AxiosInstance;
|
||||
public constructor(config: AxiosRequestConfig) {
|
||||
// instantiation
|
||||
this.service = axios.create(config);
|
||||
|
||||
/**
|
||||
* @description 请求拦截器
|
||||
* 客户端发送请求 -> [请求拦截器] -> 服务器
|
||||
* token校验(JWT) : 接受服务器返回的 token,存储到 vuex/pinia/本地储存当中
|
||||
*/
|
||||
this.service.interceptors.request.use(
|
||||
(config: CustomAxiosRequestConfig) => {
|
||||
const userStore = useUserStore();
|
||||
// 当前请求不需要显示 loading,在 api 服务中通过指定的第三个参数: { noLoading: true } 来控制
|
||||
config.noLoading || showFullScreenLoading();
|
||||
|
||||
if (config.headers && typeof config.headers.set === "function") {
|
||||
config.headers.set("authorization", `${"Bearer" + " " + userStore.newUserToken}`);
|
||||
}
|
||||
|
||||
return config;
|
||||
},
|
||||
(error: AxiosError) => {
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* @description 响应拦截器
|
||||
* 服务器换返回信息 -> [拦截统一处理] -> 客户端JS获取到信息
|
||||
*/
|
||||
this.service.interceptors.response.use(
|
||||
(response: AxiosResponse) => {
|
||||
const { data } = response;
|
||||
// const userStore = useUserStore();
|
||||
tryHideFullScreenLoading();
|
||||
// 登陆失效
|
||||
if (data.code == 401) {
|
||||
ElMessage.error(data.msg || data.message);
|
||||
// getUcOffline();
|
||||
location.href = usePathUrl();
|
||||
return Promise.reject(data);
|
||||
}
|
||||
if (data.code === 504) {
|
||||
ElMessage.error("请求超时!请您稍后重试");
|
||||
}
|
||||
//0正常,1非正常
|
||||
if (data.code == 1) {
|
||||
ElMessage.error(data.msg);
|
||||
}
|
||||
|
||||
// 成功请求(在页面上除非特殊情况,否则不用处理失败逻辑)
|
||||
return data;
|
||||
},
|
||||
async (error: AxiosError) => {
|
||||
const { response } = error;
|
||||
|
||||
tryHideFullScreenLoading();
|
||||
|
||||
// 请求超时 && 网络错误单独判断,没有 response
|
||||
if (error.message.indexOf("timeout") !== -1) ElMessage.error("请求超时!请您稍后重试");
|
||||
if (error.message.indexOf("Network Error") !== -1) ElMessage.error("网络错误!请您稍后重试");
|
||||
// 根据服务器响应的错误状态码,做不同的处理
|
||||
if (response) {
|
||||
checkStatus(response.status);
|
||||
if (response.status === 401) {
|
||||
location.href = usePathUrl();
|
||||
}
|
||||
}
|
||||
// 服务器结果都没有返回(可能服务器错误可能客户端断网),断网处理:可以跳转到断网页面
|
||||
if (!window.navigator.onLine) router.replace("/500");
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 常用请求方法封装
|
||||
*/
|
||||
get<T>(url: string, params?: object, _object = {}): Promise<ResultData<T>> {
|
||||
return this.service.get(url, { params, ..._object });
|
||||
}
|
||||
post<T>(url: string, params?: object | string, _object = {}): Promise<ResultData<T>> {
|
||||
return this.service.post(url, params, _object);
|
||||
}
|
||||
put<T>(url: string, params?: object, _object = {}): Promise<ResultData<T>> {
|
||||
return this.service.put(url, params, _object);
|
||||
}
|
||||
delete<T>(url: string, params?: any, _object = {}): Promise<ResultData<T>> {
|
||||
return this.service.delete(url, { params, ..._object });
|
||||
}
|
||||
download(url: string, params?: object, _object = {}): Promise<BlobPart> {
|
||||
return this.service.post(url, params, { ..._object, responseType: "blob" });
|
||||
}
|
||||
}
|
||||
|
||||
export default new RequestHttp(config);
|
||||
19
src/api/interface/global.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
// 全局模块
|
||||
export namespace Global {
|
||||
//供应链
|
||||
export interface ResSupplier {
|
||||
id: number;
|
||||
code: string;
|
||||
name: string;
|
||||
disable: boolean;
|
||||
}
|
||||
|
||||
//用户
|
||||
export interface ResUserList {
|
||||
id: number;
|
||||
code: null;
|
||||
name: string;
|
||||
number: number;
|
||||
disable: boolean;
|
||||
}
|
||||
}
|
||||
7
src/api/interface/index.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Global } from "./global";
|
||||
import { User } from "./user";
|
||||
import { Login } from "./login";
|
||||
import { Result, ResultData } from "./result";
|
||||
import { ResPage, ReqPage } from "./page";
|
||||
import { Upload } from "./upload";
|
||||
export type { Global, User, Login, ResultData, Result, ResPage, ReqPage, Upload };
|
||||
61
src/api/interface/login.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
// 登录模块
|
||||
export interface Dept {
|
||||
id: number;
|
||||
deptCode: string;
|
||||
deptName: string;
|
||||
managerId: null;
|
||||
}
|
||||
|
||||
export namespace Login {
|
||||
//登录要传的参数
|
||||
export interface ReqLoginCode {
|
||||
code: string;
|
||||
}
|
||||
//登录返回的参数
|
||||
interface Dept {
|
||||
id: number;
|
||||
deptCode: string;
|
||||
deptName: string;
|
||||
managerId: null;
|
||||
}
|
||||
export interface ResLogin {
|
||||
isSuccess: boolean;
|
||||
message: string;
|
||||
status: number;
|
||||
data: {
|
||||
accessToken: {
|
||||
token: string;
|
||||
phpToken: string;
|
||||
tokenType: string;
|
||||
refreshToken: string;
|
||||
expired: string;
|
||||
};
|
||||
signedIn: boolean;
|
||||
userInfo: {
|
||||
seesionId: string;
|
||||
ucId: number;
|
||||
depts: Dept[];
|
||||
staffId: number;
|
||||
staff_code: string;
|
||||
business_code: null;
|
||||
avatar: null;
|
||||
closed: number;
|
||||
createdAt: string;
|
||||
email: null;
|
||||
mobile: string;
|
||||
nickname: string;
|
||||
roleId: string;
|
||||
signinAt: string;
|
||||
updatedAt: string;
|
||||
companyId: number;
|
||||
companyName: string;
|
||||
orgId: number;
|
||||
supplierId: null;
|
||||
supplierName: null;
|
||||
customerId: null;
|
||||
customerName: null;
|
||||
identity: number;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
15
src/api/interface/page.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
//分页
|
||||
import { Result } from "./result";
|
||||
// 分页响应参数
|
||||
export interface ResPage<T = any> extends Result {
|
||||
data: {
|
||||
list: T[];
|
||||
total: number;
|
||||
};
|
||||
}
|
||||
|
||||
// 分页请求参数
|
||||
export interface ReqPage {
|
||||
pageNum: number;
|
||||
size: number;
|
||||
}
|
||||
12
src/api/interface/result.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
// 请求响应参数(不包含data)
|
||||
export interface Result {
|
||||
isSuccess: boolean;
|
||||
message: string;
|
||||
status: number;
|
||||
}
|
||||
|
||||
// 请求响应参数(包含data)
|
||||
export interface ResultData<T = any> extends Result {
|
||||
[x: string]: any;
|
||||
data: T;
|
||||
}
|
||||
6
src/api/interface/upload.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
// 文件上传模块
|
||||
export namespace Upload {
|
||||
export interface ResFileUrl {
|
||||
fileUrl: string;
|
||||
}
|
||||
}
|
||||
44
src/api/interface/user.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
// 用户管理模块
|
||||
export namespace User {
|
||||
// 获取组织list
|
||||
export interface ResUserOrgs {
|
||||
id: number;
|
||||
orgCode: string;
|
||||
name: string;
|
||||
orgType: string;
|
||||
standardCoin: string;
|
||||
standardCoinId: number;
|
||||
autoDetaultStockId: number;
|
||||
disable: boolean;
|
||||
}
|
||||
export interface ResUserDept {
|
||||
id: number;
|
||||
name: string;
|
||||
pid: number;
|
||||
managerId: null;
|
||||
disable: boolean;
|
||||
children: ResUserDept[];
|
||||
}
|
||||
export interface ResWarehouse {
|
||||
id: number;
|
||||
name: string;
|
||||
code: null;
|
||||
contacts: string;
|
||||
contactsId: number;
|
||||
useOrgId: null;
|
||||
customerWarehouseTag: boolean;
|
||||
tempTransferWarehouse: number;
|
||||
defaultReplenishCustomer: number;
|
||||
customerId: number;
|
||||
stockType: number;
|
||||
disable: boolean;
|
||||
}
|
||||
//获取组织下的用户
|
||||
export interface ResUserList {
|
||||
id: number;
|
||||
code: null;
|
||||
name: string;
|
||||
number: number;
|
||||
disable: boolean;
|
||||
}
|
||||
}
|
||||
25
src/api/modules/antiCode.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import http from "@/api";
|
||||
import { ResPage } from "@/api/interface/index";
|
||||
/**
|
||||
* @name 防伪码模块
|
||||
*/
|
||||
//防伪码记录列表
|
||||
export const getListApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SecurityNumber/GetGenerateRecordList`, params);
|
||||
};
|
||||
//生成防伪码
|
||||
export const getGenerateSecurityNumberApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SecurityNumber/Generate`, params);
|
||||
};
|
||||
//防伪码下载列表 getDownListApi
|
||||
export const getDownListApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SecurityNumber/GetList`, params);
|
||||
};
|
||||
//下载
|
||||
export const getDownAllApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SecurityNumber/Export`, params);
|
||||
};
|
||||
//选择下载
|
||||
export const getDownApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SecurityNumber/Export`, params);
|
||||
};
|
||||
110
src/api/modules/barCode.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
import http from "@/api";
|
||||
import { ResPage } from "@/api/interface/index";
|
||||
/**
|
||||
* @name 打印产品条码模块
|
||||
*/
|
||||
//产品条码生成记录列表
|
||||
export const getListApi = (params: Record<string, any>) => {
|
||||
// console.log(params);
|
||||
// return {
|
||||
// isSuccess: true,
|
||||
// message: "Success",
|
||||
// status: 200,
|
||||
// totalCount: 1,
|
||||
// data: [
|
||||
// {
|
||||
// id: 17372,
|
||||
// specifications: "ORICO-H7013-U3-AD-EU-BK-BP",
|
||||
// materialNumber: "G01-43-552867",
|
||||
// materialName: "7口USB3.0集线器",
|
||||
// barCode: "6936761881968",
|
||||
// purchaseBillNo: "ceshi1224",
|
||||
// generateComplete: "已完成",
|
||||
// number: 300,
|
||||
// printNumber: 0,
|
||||
// downLoadNumber: 300,
|
||||
// useNumber: 2,
|
||||
// creator: "admin",
|
||||
// createTime: "2024-12-24 10:27:04",
|
||||
// generateCompleteTime: "2024-12-24 10:27:05",
|
||||
// supplierOrOrg: "深圳市元创时代科技有限公司",
|
||||
// isUpdateMaterial: false,
|
||||
// isTwo: 2
|
||||
// }
|
||||
// ]
|
||||
// };
|
||||
return http.post<ResPage<any>>(`SerialNumber/GetGenerateRecordList`, params);
|
||||
};
|
||||
//产品条码列表
|
||||
export const getCodeListApi = (params: Record<string, any>) => {
|
||||
// console.log(params);
|
||||
// return {
|
||||
// totalCount: 300,
|
||||
// data: [
|
||||
// {
|
||||
// materialNumber: "G01-43-552867",
|
||||
// materialName: "7口USB3.0集线器",
|
||||
// specifications: "ORICO-H7013-U3-AD-EU-BK-BP",
|
||||
// old_Specifications: "",
|
||||
// barCode: "6936761881968",
|
||||
// serialNumber: "10FC-616M3R",
|
||||
// twoSerialNumber: "10FC-616M3R-two",
|
||||
// numberCode: "241224000417",
|
||||
// id: 202593401,
|
||||
// number: 300,
|
||||
// isUse: false,
|
||||
// isUseStr: "否",
|
||||
// box: "",
|
||||
// creator: "admin",
|
||||
// createTime: "2024-12-24 10:27:05",
|
||||
// printNumber: 0,
|
||||
// downLoadNumber: 1,
|
||||
// printTime: "",
|
||||
// downLoadTime: "2025-01-08 16:11:39",
|
||||
// isEnablePrint: true
|
||||
// },
|
||||
// {
|
||||
// materialNumber: "G01-43-552867",
|
||||
// materialName: "7口USB3.0集线器",
|
||||
// specifications: "ORICO-H7013-U3-AD-EU-BK-BP",
|
||||
// old_Specifications: "",
|
||||
// barCode: "6936761881968",
|
||||
// serialNumber: "10FC-616M3Q",
|
||||
// twoSerialNumber: "10FC-616M3R-two",
|
||||
// numberCode: "241224000416",
|
||||
// id: 202593400,
|
||||
// number: 300,
|
||||
// isUse: false,
|
||||
// isUseStr: "否",
|
||||
// box: "",
|
||||
// creator: "admin",
|
||||
// createTime: "2024-12-24 10:27:05",
|
||||
// printNumber: 0,
|
||||
// downLoadNumber: 1,
|
||||
// printTime: "",
|
||||
// downLoadTime: "2025-01-08 16:11:39",
|
||||
// isEnablePrint: true
|
||||
// }
|
||||
// ],
|
||||
// isSuccess: true,
|
||||
// status: 200,
|
||||
// message: "Success"
|
||||
// };
|
||||
return http.post<ResPage<any>>(`SerialNumber/GetList`, params);
|
||||
};
|
||||
//转换规格型号 SerialNumber/UpdateMaterial
|
||||
export const getUpdateMaterialApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/UpdateMaterial`, params);
|
||||
};
|
||||
//产品条码列表下载
|
||||
export const getSerialNumberDownLoadApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/Export`, params);
|
||||
};
|
||||
//生成条码
|
||||
export const generateBarCodeApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/Generate`, params);
|
||||
};
|
||||
//打印
|
||||
export const getPrintListCodeApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/Print`, params);
|
||||
};
|
||||
48
src/api/modules/boxCode.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import http from "@/api";
|
||||
import { ResPage } from "@/api/interface/index";
|
||||
//箱信息列表
|
||||
export const getListApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/GetList`, params);
|
||||
};
|
||||
//生成箱碼
|
||||
export const getBoxGenerateApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/Generate`, params);
|
||||
};
|
||||
//裝箱保存
|
||||
export const getSaveBoxApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/Save`, params, { noLoading: false });
|
||||
};
|
||||
//打印
|
||||
export const getPrintBoxApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/Print`, params);
|
||||
};
|
||||
//刪除 /
|
||||
export const getDeleteBoxApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/Delete`, params);
|
||||
};
|
||||
//清空
|
||||
export const getClearBoxApi = (params: any) => {
|
||||
return http.get<ResPage<any>>(`Box/Clear`, params);
|
||||
};
|
||||
//根据箱号获取箱信息
|
||||
export const getBoxByNoApi = (params: any) => {
|
||||
return http.get<ResPage<any>>(`Box/GetBoxByNo`, params, {
|
||||
noLoading: true
|
||||
});
|
||||
};
|
||||
//根据序列号获取序列号信息
|
||||
export const getSerialNumberApi = (params: any) => {
|
||||
return http.get<ResPage<any>>(`SerialNumber/Get`, params);
|
||||
};
|
||||
//根据箱号去获取序列号
|
||||
export const getSerialNumberByBoxIdApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`SerialNumber/GetByBoxId`, params, { noLoading: true });
|
||||
};
|
||||
//重新装箱
|
||||
export const getBoxRestartApi = (params: any) => {
|
||||
return http.post<ResPage<any>>(`Box/Restart`, params);
|
||||
};
|
||||
//开始装箱时间接口 Box/BeginCarton
|
||||
export const getBeginCartonApi = (params: any) => {
|
||||
return http.get<ResPage<any>>(`Box/BeginCarton`, params);
|
||||
};
|
||||
14
src/api/modules/boxMark.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
//箱唛
|
||||
import http from "@/api";
|
||||
import { ResPage } from "@/api/interface/index";
|
||||
|
||||
//箱唛列表
|
||||
export const getBoxMarkListApi = (params: Record<string, any>) => {
|
||||
return http.post<ResPage<any>>(`BoxMark/GetList`, params);
|
||||
};
|
||||
//生成箱唛
|
||||
export const getMaterialListApi = (params: any) => {
|
||||
console.log(params);
|
||||
// return http.get<any>(`SysConfig/GetMaterialList?speci=${encodeURIComponent(speci)}`);
|
||||
return [];
|
||||
};
|
||||
9
src/api/modules/exportList.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import http from "@/api";
|
||||
// 导出列表
|
||||
export const getListApi = (params: Record<string, any>) => {
|
||||
return http.get<any>(`exports`, params);
|
||||
};
|
||||
//状态
|
||||
export const getExportTypesApi = () => {
|
||||
return http.get<any>(`export/types`);
|
||||
};
|
||||
10
src/api/modules/foundationMaterial.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import http from "@/api";
|
||||
|
||||
/**
|
||||
* @name 全局模块(在公司下面的数据)
|
||||
*/
|
||||
|
||||
//物料分页列表
|
||||
export const getMaterialListApi = (params: any) => {
|
||||
return http.get<any>(`material`, params);
|
||||
};
|
||||
26
src/api/modules/global.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import http from "@/api";
|
||||
|
||||
/**
|
||||
* @name 全局模块(在公司下面的数据)
|
||||
*/
|
||||
|
||||
//获取供应商
|
||||
export const getSupplierApi = (params: any) => {
|
||||
return http.get<any>(`basicinfo/suppliers`, params);
|
||||
};
|
||||
//組織
|
||||
export const getOrgsApi = () => {
|
||||
return http.get<any>(`basicinfo/orgs`);
|
||||
};
|
||||
//客戶
|
||||
export const getCustomersApi = (params: any) => {
|
||||
return http.get<any>(`basicinfo/customers`, params);
|
||||
};
|
||||
//用户(订阅账号)
|
||||
export const getUsersApi = (params: any) => {
|
||||
return http.get<any>(`user/list`, params);
|
||||
};
|
||||
//品线
|
||||
export const getProductLinesApi = (params: any) => {
|
||||
return http.get<any>(`basicinfo/productlines`, params);
|
||||
};
|
||||
18
src/api/modules/inspection.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import http from "@/api";
|
||||
|
||||
/**
|
||||
* @name 全局模块(在公司下面的数据)
|
||||
*/
|
||||
|
||||
//质检单列表
|
||||
export const getQualityInspectListApi = (params: any) => {
|
||||
return http.get<any>(`quality_inspect`, params);
|
||||
};
|
||||
//刷新 /admapi/quality_inspect/reload
|
||||
export const getQualityInspectReloadApi = (params: any) => {
|
||||
return http.get<any>(`quality_inspect/reload`, params);
|
||||
};
|
||||
//导出
|
||||
export const getQualityInspectExportApi = (params: any) => {
|
||||
return http.get<any>(`quality_inspect/export`, params);
|
||||
};
|
||||
32
src/api/modules/login.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { ResultData, Login } from "@/api/interface/index";
|
||||
// import authMenuList from "@/assets/json/authMenuList.json";
|
||||
import http from "@/api";
|
||||
|
||||
/**
|
||||
* @name 登录模块
|
||||
*/
|
||||
// 用户登录
|
||||
export const loginApi = (params: Login.ReqLoginCode) => {
|
||||
return http.get<ResultData<Login.ResLogin>>(`/user/signin/${params}`);
|
||||
// 正常 post json 请求 ==> application/json
|
||||
// return http.post<Login.ResLogin>(PORT1 + `/login`, params, { noLoading: true }); // 控制当前请求不显示 loading
|
||||
// return http.post<Login.ResLogin>(PORT1 + `/login`, {}, { params }); // post 请求携带 query 参数 ==> ?username=admin&password=123456
|
||||
// return http.post<Login.ResLogin>(PORT1 + `/login`, qs.stringify(params)); // post 请求携带表单参数 ==> application/x-www-form-urlencoded
|
||||
// return http.get<Login.ResLogin>(PORT1 + `/login?${qs.stringify(params, { arrayFormat: "repeat" })}`); // get 请求可以携带数组等复杂参数
|
||||
};
|
||||
|
||||
// 获取菜单列表
|
||||
export const getAuthMenuListApi = () => {
|
||||
console.log("触发了吗");
|
||||
return http.get<any>(`/user/permissions`, {}, { noLoading: true });
|
||||
// return authMenuList;
|
||||
};
|
||||
|
||||
// 用户退出登录
|
||||
export const logoutApi = () => {
|
||||
return http.get(`/user/signout`);
|
||||
};
|
||||
|
||||
// export const LoginOutSingleApi = () => {
|
||||
// return http.get(`/Login/LoginOutSingle`);
|
||||
// };
|
||||
5
src/api/modules/operationButtons.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import http from "@/api";
|
||||
//按钮提交,通过请求接口来区分就可以了
|
||||
export const operationButtonsApi = (url: string, params: any) => {
|
||||
return http.post<any>(url, params);
|
||||
};
|
||||
23
src/api/modules/subscribe.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import http from "@/api";
|
||||
|
||||
//订阅信息单列表 /admapi/subscribe
|
||||
export const getSubscribeListApi = (params: any) => {
|
||||
return http.get<any>(`subscribe`, params);
|
||||
};
|
||||
//新增
|
||||
export const getSubscribeAddApi = (params: any) => {
|
||||
return http.post<any>(`subscribe`, params);
|
||||
};
|
||||
//详情
|
||||
export const getSubscribeDetailsApi = (params: any) => {
|
||||
return http.get<any>(`subscribe/${params}`);
|
||||
};
|
||||
//更新
|
||||
export const getSubscribeUpdateApi = (id: any, params: any) => {
|
||||
console.log(params, "=params=");
|
||||
return http.post<any>(`subscribe/${id}`, params);
|
||||
};
|
||||
//删除
|
||||
export const getSubscribeDelApi = (params: any) => {
|
||||
return http.delete<any>(`subscribe/${params}`);
|
||||
};
|
||||
6
src/api/modules/subscription.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import http from "@/api";
|
||||
|
||||
//获取客户下拉列表(纯客户信息 不包含组织信息)
|
||||
export const getCustomersNoOrgApi = (id: any) => {
|
||||
return http.get<any>(`SysConfig/GetCustomersNoOrg/${id}`);
|
||||
};
|
||||
48
src/api/modules/test.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
//测试
|
||||
// import http from "@/api";
|
||||
// import { ResPage } from "@/api/interface/index";
|
||||
|
||||
//列表
|
||||
export const getBoxMarkListApi = () => {
|
||||
return {
|
||||
totalCount: 1,
|
||||
isSuccess: true,
|
||||
message: "Success",
|
||||
status: 200,
|
||||
data: [
|
||||
{
|
||||
id: 11573,
|
||||
detailsId: 30059,
|
||||
billNo: "RKRW00011573",
|
||||
status: "部分入库",
|
||||
sourceBillNo: "SCHB00054706",
|
||||
type: "生产入库",
|
||||
supplier: "",
|
||||
org: "深圳市元创时代科技有限公司",
|
||||
specifications: "",
|
||||
materialNumber: "G01-11-579493",
|
||||
materialName: "",
|
||||
factoryPrice: 0,
|
||||
stock: "wms仓库02",
|
||||
accruedQty: 50,
|
||||
receiveQty: 20,
|
||||
realityQty: 20,
|
||||
receiver: "尹芳丽wms",
|
||||
receiveTime: "2025-08-13 17:45:39",
|
||||
shelfer: "尹芳丽wms",
|
||||
shelfTime: "2025-08-13 17:46:23",
|
||||
remark: null,
|
||||
createTime: "2025-08-13 15:12:30",
|
||||
isRepeal: "否",
|
||||
saleBillNo: " "
|
||||
}
|
||||
]
|
||||
};
|
||||
//http.post<ResPage<any>>(`BoxMark/GetList`, params);
|
||||
};
|
||||
// //生成箱唛
|
||||
// export const getMaterialListApi = (speci: any) => {
|
||||
// console.log(speci);
|
||||
// // return http.get<any>(`SysConfig/GetMaterialList?speci=${encodeURIComponent(speci)}`);
|
||||
// return [];
|
||||
// };
|
||||
18
src/api/modules/upload.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Upload } from "@/api/interface/index";
|
||||
import { PORT1 } from "@/api/config/servicePort";
|
||||
import http from "@/api";
|
||||
|
||||
/**
|
||||
* @name 文件上传模块
|
||||
*/
|
||||
// 图片上传
|
||||
export const uploadImg = (formData: any) => {
|
||||
//params: FormData
|
||||
let url = import.meta.env.VITE_APP_API_BASEURL + import.meta.env.VITE_APP_API_VERSION + "/Upload?type=material&name=";
|
||||
return http.post<any>(url, formData);
|
||||
};
|
||||
|
||||
// 视频上传
|
||||
export const uploadVideo = (params: FormData) => {
|
||||
return http.post<Upload.ResFileUrl>(PORT1 + `/file/upload/video`, params);
|
||||
};
|
||||
466
src/assets/fonto/demo.css
Normal file
@@ -0,0 +1,466 @@
|
||||
/* Logo 字体 */
|
||||
@font-face {
|
||||
font-family: "iconfont logo";
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
|
||||
}
|
||||
.logo {
|
||||
font-family: "iconfont logo";
|
||||
font-size: 160px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* tabs */
|
||||
.nav-tabs {
|
||||
position: relative;
|
||||
}
|
||||
.nav-tabs .nav-more {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
color: #666666;
|
||||
}
|
||||
#tabs {
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
}
|
||||
#tabs li {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
margin-bottom: -1px;
|
||||
font-size: 16px;
|
||||
line-height: 40px;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
#tabs .active {
|
||||
color: #222222;
|
||||
border-bottom-color: #ff0000;
|
||||
}
|
||||
.tab-container .content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 页面布局 */
|
||||
.main {
|
||||
width: 960px;
|
||||
padding: 30px 100px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.main .logo {
|
||||
height: 110px;
|
||||
margin-top: -50px;
|
||||
margin-bottom: 30px;
|
||||
overflow: hidden;
|
||||
line-height: 1;
|
||||
color: #333333;
|
||||
text-align: left;
|
||||
*zoom: 1;
|
||||
}
|
||||
.main .logo a {
|
||||
font-size: 160px;
|
||||
color: #333333;
|
||||
}
|
||||
.helps {
|
||||
margin-top: 40px;
|
||||
}
|
||||
.helps pre {
|
||||
padding: 20px;
|
||||
margin: 10px 0;
|
||||
overflow: auto;
|
||||
background-color: #fffdef;
|
||||
border: solid 1px #e7e1cd;
|
||||
}
|
||||
.icon_lists {
|
||||
width: 100% !important;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
.icon_lists li {
|
||||
width: 100px;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
list-style: none !important;
|
||||
cursor: default;
|
||||
}
|
||||
.icon_lists li .code-name {
|
||||
line-height: 1.2;
|
||||
}
|
||||
.icon_lists .icon {
|
||||
display: block;
|
||||
height: 100px;
|
||||
margin: 10px auto;
|
||||
font-size: 42px;
|
||||
line-height: 100px;
|
||||
color: #333333;
|
||||
transition: font-size 0.25s linear, width 0.25s linear;
|
||||
transition: font-size 0.25s linear, width 0.25s linear;
|
||||
transition: font-size 0.25s linear, width 0.25s linear;
|
||||
}
|
||||
.icon_lists .icon:hover {
|
||||
font-size: 100px;
|
||||
}
|
||||
.icon_lists .svg-icon {
|
||||
/* 通过设置 font-size 来改变图标大小 */
|
||||
width: 1em;
|
||||
|
||||
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
|
||||
normalize.css 中也包含这行 */
|
||||
overflow: hidden;
|
||||
|
||||
/* 图标和文字相邻时,垂直对齐 */
|
||||
vertical-align: -0.15em;
|
||||
|
||||
/* 通过设置 color 来改变 SVG 的颜色/fill */
|
||||
fill: currentColor;
|
||||
}
|
||||
.icon_lists li .name,
|
||||
.icon_lists li .code-name {
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
/* markdown 样式 */
|
||||
.markdown {
|
||||
font-size: 14px;
|
||||
line-height: 1.8;
|
||||
color: #666666;
|
||||
}
|
||||
.highlight {
|
||||
line-height: 1.5;
|
||||
}
|
||||
.markdown img {
|
||||
max-width: 100%;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.markdown h1 {
|
||||
margin-bottom: 24px;
|
||||
font-weight: 500;
|
||||
line-height: 40px;
|
||||
color: #404040;
|
||||
}
|
||||
.markdown h2,
|
||||
.markdown h3,
|
||||
.markdown h4,
|
||||
.markdown h5,
|
||||
.markdown h6 {
|
||||
margin: 1.6em 0 0.6em;
|
||||
clear: both;
|
||||
font-weight: 500;
|
||||
color: #404040;
|
||||
}
|
||||
.markdown h1 {
|
||||
font-size: 28px;
|
||||
}
|
||||
.markdown h2 {
|
||||
font-size: 22px;
|
||||
}
|
||||
.markdown h3 {
|
||||
font-size: 16px;
|
||||
}
|
||||
.markdown h4 {
|
||||
font-size: 14px;
|
||||
}
|
||||
.markdown h5 {
|
||||
font-size: 12px;
|
||||
}
|
||||
.markdown h6 {
|
||||
font-size: 12px;
|
||||
}
|
||||
.markdown hr {
|
||||
height: 1px;
|
||||
margin: 16px 0;
|
||||
clear: both;
|
||||
background: #e9e9e9;
|
||||
border: 0;
|
||||
}
|
||||
.markdown p {
|
||||
margin: 1em 0;
|
||||
}
|
||||
.markdown>p,
|
||||
.markdown>blockquote,
|
||||
.markdown>.highlight,
|
||||
.markdown>ol,
|
||||
.markdown>ul {
|
||||
width: 80%;
|
||||
}
|
||||
.markdown ul>li {
|
||||
list-style: circle;
|
||||
}
|
||||
.markdown>ul li,
|
||||
.markdown blockquote ul>li {
|
||||
padding-left: 4px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.markdown>ul li p,
|
||||
.markdown>ol li p {
|
||||
margin: 0.6em 0;
|
||||
}
|
||||
.markdown ol>li {
|
||||
list-style: decimal;
|
||||
}
|
||||
.markdown>ol li,
|
||||
.markdown blockquote ol>li {
|
||||
padding-left: 4px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.markdown code {
|
||||
padding: 0 5px;
|
||||
margin: 0 3px;
|
||||
background: #eeeeee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.markdown strong,
|
||||
.markdown b {
|
||||
font-weight: 600;
|
||||
}
|
||||
.markdown>table {
|
||||
width: 95%;
|
||||
margin-bottom: 24px;
|
||||
empty-cells: show;
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #e9e9e9;
|
||||
}
|
||||
.markdown>table th {
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.markdown>table th,
|
||||
.markdown>table td {
|
||||
padding: 8px 16px;
|
||||
text-align: left;
|
||||
border: 1px solid #e9e9e9;
|
||||
}
|
||||
.markdown>table th {
|
||||
background: #F7F7F7;
|
||||
}
|
||||
.markdown blockquote {
|
||||
padding-left: 0.8em;
|
||||
margin: 1em 0;
|
||||
font-size: 90%;
|
||||
color: #999999;
|
||||
border-left: 4px solid #e9e9e9;
|
||||
}
|
||||
.markdown blockquote p {
|
||||
margin: 0;
|
||||
}
|
||||
.markdown .anchor {
|
||||
margin-left: 8px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
.markdown .waiting {
|
||||
color: #cccccc;
|
||||
}
|
||||
.markdown h1:hover .anchor,
|
||||
.markdown h2:hover .anchor,
|
||||
.markdown h3:hover .anchor,
|
||||
.markdown h4:hover .anchor,
|
||||
.markdown h5:hover .anchor,
|
||||
.markdown h6:hover .anchor {
|
||||
display: inline-block;
|
||||
opacity: 1;
|
||||
}
|
||||
.markdown>br,
|
||||
.markdown>p>br {
|
||||
clear: both;
|
||||
}
|
||||
.hljs {
|
||||
display: block;
|
||||
padding: 0.5em;
|
||||
overflow-x: auto;
|
||||
color: #333333;
|
||||
background: white;
|
||||
}
|
||||
.hljs-comment,
|
||||
.hljs-meta {
|
||||
color: #969896;
|
||||
}
|
||||
.hljs-string,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-strong,
|
||||
.hljs-emphasis,
|
||||
.hljs-quote {
|
||||
color: #df5000;
|
||||
}
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-type {
|
||||
color: #a71d5d;
|
||||
}
|
||||
.hljs-literal,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-attribute {
|
||||
color: #0086b3;
|
||||
}
|
||||
.hljs-section,
|
||||
.hljs-name {
|
||||
color: #63a35c;
|
||||
}
|
||||
.hljs-tag {
|
||||
color: #333333;
|
||||
}
|
||||
.hljs-title,
|
||||
.hljs-attr,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #795da3;
|
||||
}
|
||||
.hljs-addition {
|
||||
color: #55a532;
|
||||
background-color: #eaffea;
|
||||
}
|
||||
.hljs-deletion {
|
||||
color: #bd2c00;
|
||||
background-color: #ffecec;
|
||||
}
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* 代码高亮 */
|
||||
|
||||
/* PrismJS 1.15.0
|
||||
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
|
||||
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
hyphens: none;
|
||||
hyphens: none;
|
||||
hyphens: none;
|
||||
hyphens: none;
|
||||
line-height: 1.5;
|
||||
color: black;
|
||||
text-align: left;
|
||||
text-shadow: 0 1px white;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
tab-size: 4;
|
||||
tab-size: 4;
|
||||
tab-size: 4;
|
||||
white-space: pre;
|
||||
background: none;
|
||||
word-spacing: normal;
|
||||
}
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
@media print {
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
:not(pre)>code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f5f2f0;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre)>code[class*="language-"] {
|
||||
padding: .1em;
|
||||
white-space: normal;
|
||||
border-radius: .3em;
|
||||
}
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: slategray;
|
||||
}
|
||||
.token.punctuation {
|
||||
color: #999999;
|
||||
}
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #990055;
|
||||
}
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #669900;
|
||||
}
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #9a6e3a;
|
||||
background: hsl(0deg 0% 100% / 50%);
|
||||
}
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #0077aa;
|
||||
}
|
||||
.token.function,
|
||||
.token.class-name {
|
||||
color: #DD4A68;
|
||||
}
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #ee9900;
|
||||
}
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
1612
src/assets/fonto/demo_index.html
Normal file
263
src/assets/fonto/iconfont.css
Normal file
@@ -0,0 +1,263 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 2863944 */
|
||||
src: url('iconfont.woff2?t=1700032659797') format('woff2'),
|
||||
url('iconfont.woff?t=1700032659797') format('woff'),
|
||||
url('iconfont.ttf?t=1700032659797') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-fahuochuku:before {
|
||||
content: "\e670";
|
||||
}
|
||||
|
||||
.icon-shouhuoruku:before {
|
||||
content: "\e671";
|
||||
}
|
||||
|
||||
.icon-qitakuneicaozuo:before {
|
||||
content: "\e672";
|
||||
}
|
||||
|
||||
.icon-pandian:before {
|
||||
content: "\e673";
|
||||
}
|
||||
|
||||
.icon-baobiao1:before {
|
||||
content: "\e674";
|
||||
}
|
||||
|
||||
.icon-shouqiicon:before {
|
||||
content: "\e66e";
|
||||
}
|
||||
|
||||
.icon-zhankaiicon:before {
|
||||
content: "\e66a";
|
||||
}
|
||||
|
||||
.icon-kelong:before {
|
||||
content: "\e66b";
|
||||
}
|
||||
|
||||
.icon-baocun1:before {
|
||||
content: "\e66c";
|
||||
}
|
||||
|
||||
.icon-riliicon:before {
|
||||
content: "\e66d";
|
||||
}
|
||||
|
||||
.icon-tianjia1:before {
|
||||
content: "\e65e";
|
||||
}
|
||||
|
||||
.icon-fuzhi:before {
|
||||
content: "\e65d";
|
||||
}
|
||||
|
||||
.icon-guanbi1:before {
|
||||
content: "\e65b";
|
||||
}
|
||||
|
||||
.icon-bianji1:before {
|
||||
content: "\e65a";
|
||||
}
|
||||
|
||||
.icon-shuiwuguanli:before {
|
||||
content: "\e649";
|
||||
}
|
||||
|
||||
.icon-chengbenguanli:before {
|
||||
content: "\e645";
|
||||
}
|
||||
|
||||
.icon-yingshoukuanguanli:before {
|
||||
content: "\e642";
|
||||
}
|
||||
|
||||
.icon-zijinguanli:before {
|
||||
content: "\e643";
|
||||
}
|
||||
|
||||
.icon-feiyongguanli:before {
|
||||
content: "\e644";
|
||||
}
|
||||
|
||||
.icon-chunaguanli:before {
|
||||
content: "\e646";
|
||||
}
|
||||
|
||||
.icon-zichanguanli:before {
|
||||
content: "\e647";
|
||||
}
|
||||
|
||||
.icon-zongzhang:before {
|
||||
content: "\e648";
|
||||
}
|
||||
|
||||
.icon-yingfukuanguanli:before {
|
||||
content: "\e64a";
|
||||
}
|
||||
|
||||
.icon-caiwu:before {
|
||||
content: "\e641";
|
||||
}
|
||||
|
||||
.icon-daochu1:before {
|
||||
content: "\e63f";
|
||||
}
|
||||
|
||||
.icon-renminbi:before {
|
||||
content: "\e63b";
|
||||
}
|
||||
|
||||
.icon-xiazaiweikong:before {
|
||||
content: "\e63a";
|
||||
}
|
||||
|
||||
.icon-shanchu:before {
|
||||
content: "\e639";
|
||||
}
|
||||
|
||||
.icon-daochu:before {
|
||||
content: "\e636";
|
||||
}
|
||||
|
||||
.icon-xiadan:before {
|
||||
content: "\e637";
|
||||
}
|
||||
|
||||
.icon-piliang:before {
|
||||
content: "\e638";
|
||||
}
|
||||
|
||||
.icon-zhexiantu:before {
|
||||
content: "\e635";
|
||||
}
|
||||
|
||||
.icon-gengduo:before {
|
||||
content: "\e631";
|
||||
}
|
||||
|
||||
.icon-chenggong:before {
|
||||
content: "\e630";
|
||||
}
|
||||
|
||||
.icon-shijing:before {
|
||||
content: "\e62f";
|
||||
}
|
||||
|
||||
.icon-xinxi:before {
|
||||
content: "\e62e";
|
||||
}
|
||||
|
||||
.icon-renwuweikong:before {
|
||||
content: "\e62d";
|
||||
}
|
||||
|
||||
.icon-liulanjiluweikong:before {
|
||||
content: "\e62c";
|
||||
}
|
||||
|
||||
.icon-qingchu:before {
|
||||
content: "\e62b";
|
||||
}
|
||||
|
||||
.icon-zuobian:before {
|
||||
content: "\e629";
|
||||
}
|
||||
|
||||
.icon-youbian:before {
|
||||
content: "\e62a";
|
||||
}
|
||||
|
||||
.icon-xuanzhong:before {
|
||||
content: "\e628";
|
||||
}
|
||||
|
||||
.icon-shuangjiantoushouqi-shang:before {
|
||||
content: "\e626";
|
||||
}
|
||||
|
||||
.icon-shuangjiantouzhankai-xia:before {
|
||||
content: "\e627";
|
||||
}
|
||||
|
||||
.icon-shuaxin:before {
|
||||
content: "\e625";
|
||||
}
|
||||
|
||||
.icon-tianjia:before {
|
||||
content: "\e624";
|
||||
}
|
||||
|
||||
.icon-baocun:before {
|
||||
content: "\e623";
|
||||
}
|
||||
|
||||
.icon-you-zhankaigengduo:before {
|
||||
content: "\e61d";
|
||||
}
|
||||
|
||||
.icon-zuo-zhankaigengduo:before {
|
||||
content: "\e61e";
|
||||
}
|
||||
|
||||
.icon-xia-zhankai:before {
|
||||
content: "\e61f";
|
||||
}
|
||||
|
||||
.icon-guanbi:before {
|
||||
content: "\e620";
|
||||
}
|
||||
|
||||
.icon-baobiao:before {
|
||||
content: "\e612";
|
||||
}
|
||||
|
||||
.icon-caigou:before {
|
||||
content: "\e613";
|
||||
}
|
||||
|
||||
.icon-cangku:before {
|
||||
content: "\e614";
|
||||
}
|
||||
|
||||
.icon-shengchan:before {
|
||||
content: "\e615";
|
||||
}
|
||||
|
||||
.icon-xiaoshou:before {
|
||||
content: "\e616";
|
||||
}
|
||||
|
||||
.icon-tiaoma:before {
|
||||
content: "\e617";
|
||||
}
|
||||
|
||||
.icon-wuliao:before {
|
||||
content: "\e618";
|
||||
}
|
||||
|
||||
.icon-weiwai:before {
|
||||
content: "\e619";
|
||||
}
|
||||
|
||||
.icon-gongyingshang:before {
|
||||
content: "\e61a";
|
||||
}
|
||||
|
||||
.icon-shezhi:before {
|
||||
content: "\e61b";
|
||||
}
|
||||
|
||||
.icon-a-211:before {
|
||||
content: "\e61c";
|
||||
}
|
||||
|
||||
1
src/assets/fonto/iconfont.js
Normal file
443
src/assets/fonto/iconfont.json
Normal file
@@ -0,0 +1,443 @@
|
||||
{
|
||||
"id": "2863944",
|
||||
"name": "OPS",
|
||||
"font_family": "iconfont",
|
||||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "38127193",
|
||||
"name": "发货出库",
|
||||
"font_class": "fahuochuku",
|
||||
"unicode": "e670",
|
||||
"unicode_decimal": 58992
|
||||
},
|
||||
{
|
||||
"icon_id": "38127192",
|
||||
"name": "收货入库",
|
||||
"font_class": "shouhuoruku",
|
||||
"unicode": "e671",
|
||||
"unicode_decimal": 58993
|
||||
},
|
||||
{
|
||||
"icon_id": "38127191",
|
||||
"name": "其他库内操作",
|
||||
"font_class": "qitakuneicaozuo",
|
||||
"unicode": "e672",
|
||||
"unicode_decimal": 58994
|
||||
},
|
||||
{
|
||||
"icon_id": "38127190",
|
||||
"name": "盘点",
|
||||
"font_class": "pandian",
|
||||
"unicode": "e673",
|
||||
"unicode_decimal": 58995
|
||||
},
|
||||
{
|
||||
"icon_id": "38127189",
|
||||
"name": "报表",
|
||||
"font_class": "baobiao1",
|
||||
"unicode": "e674",
|
||||
"unicode_decimal": 58996
|
||||
},
|
||||
{
|
||||
"icon_id": "36084927",
|
||||
"name": "收起icon",
|
||||
"font_class": "shouqiicon",
|
||||
"unicode": "e66e",
|
||||
"unicode_decimal": 58990
|
||||
},
|
||||
{
|
||||
"icon_id": "36084853",
|
||||
"name": "展开icon",
|
||||
"font_class": "zhankaiicon",
|
||||
"unicode": "e66a",
|
||||
"unicode_decimal": 58986
|
||||
},
|
||||
{
|
||||
"icon_id": "36084854",
|
||||
"name": "克隆",
|
||||
"font_class": "kelong",
|
||||
"unicode": "e66b",
|
||||
"unicode_decimal": 58987
|
||||
},
|
||||
{
|
||||
"icon_id": "36084855",
|
||||
"name": "保存",
|
||||
"font_class": "baocun1",
|
||||
"unicode": "e66c",
|
||||
"unicode_decimal": 58988
|
||||
},
|
||||
{
|
||||
"icon_id": "36084856",
|
||||
"name": "日历icon",
|
||||
"font_class": "riliicon",
|
||||
"unicode": "e66d",
|
||||
"unicode_decimal": 58989
|
||||
},
|
||||
{
|
||||
"icon_id": "32937331",
|
||||
"name": "添加",
|
||||
"font_class": "tianjia1",
|
||||
"unicode": "e65e",
|
||||
"unicode_decimal": 58974
|
||||
},
|
||||
{
|
||||
"icon_id": "32936674",
|
||||
"name": "复制",
|
||||
"font_class": "fuzhi",
|
||||
"unicode": "e65d",
|
||||
"unicode_decimal": 58973
|
||||
},
|
||||
{
|
||||
"icon_id": "31372064",
|
||||
"name": "关闭",
|
||||
"font_class": "guanbi1",
|
||||
"unicode": "e65b",
|
||||
"unicode_decimal": 58971
|
||||
},
|
||||
{
|
||||
"icon_id": "31254227",
|
||||
"name": "编辑",
|
||||
"font_class": "bianji1",
|
||||
"unicode": "e65a",
|
||||
"unicode_decimal": 58970
|
||||
},
|
||||
{
|
||||
"icon_id": "28767114",
|
||||
"name": "税务管理",
|
||||
"font_class": "shuiwuguanli",
|
||||
"unicode": "e649",
|
||||
"unicode_decimal": 58953
|
||||
},
|
||||
{
|
||||
"icon_id": "28758569",
|
||||
"name": "成本管理",
|
||||
"font_class": "chengbenguanli",
|
||||
"unicode": "e645",
|
||||
"unicode_decimal": 58949
|
||||
},
|
||||
{
|
||||
"icon_id": "28756346",
|
||||
"name": "应收款管理",
|
||||
"font_class": "yingshoukuanguanli",
|
||||
"unicode": "e642",
|
||||
"unicode_decimal": 58946
|
||||
},
|
||||
{
|
||||
"icon_id": "28756347",
|
||||
"name": "资金管理",
|
||||
"font_class": "zijinguanli",
|
||||
"unicode": "e643",
|
||||
"unicode_decimal": 58947
|
||||
},
|
||||
{
|
||||
"icon_id": "28756349",
|
||||
"name": "费用管理",
|
||||
"font_class": "feiyongguanli",
|
||||
"unicode": "e644",
|
||||
"unicode_decimal": 58948
|
||||
},
|
||||
{
|
||||
"icon_id": "28756351",
|
||||
"name": "出纳管理",
|
||||
"font_class": "chunaguanli",
|
||||
"unicode": "e646",
|
||||
"unicode_decimal": 58950
|
||||
},
|
||||
{
|
||||
"icon_id": "28756352",
|
||||
"name": "资产管理",
|
||||
"font_class": "zichanguanli",
|
||||
"unicode": "e647",
|
||||
"unicode_decimal": 58951
|
||||
},
|
||||
{
|
||||
"icon_id": "28756353",
|
||||
"name": "总账",
|
||||
"font_class": "zongzhang",
|
||||
"unicode": "e648",
|
||||
"unicode_decimal": 58952
|
||||
},
|
||||
{
|
||||
"icon_id": "28756355",
|
||||
"name": "应付款管理",
|
||||
"font_class": "yingfukuanguanli",
|
||||
"unicode": "e64a",
|
||||
"unicode_decimal": 58954
|
||||
},
|
||||
{
|
||||
"icon_id": "28442176",
|
||||
"name": "财务",
|
||||
"font_class": "caiwu",
|
||||
"unicode": "e641",
|
||||
"unicode_decimal": 58945
|
||||
},
|
||||
{
|
||||
"icon_id": "28373960",
|
||||
"name": "导出",
|
||||
"font_class": "daochu1",
|
||||
"unicode": "e63f",
|
||||
"unicode_decimal": 58943
|
||||
},
|
||||
{
|
||||
"icon_id": "28043356",
|
||||
"name": "人民币",
|
||||
"font_class": "renminbi",
|
||||
"unicode": "e63b",
|
||||
"unicode_decimal": 58939
|
||||
},
|
||||
{
|
||||
"icon_id": "27909200",
|
||||
"name": "下载为空",
|
||||
"font_class": "xiazaiweikong",
|
||||
"unicode": "e63a",
|
||||
"unicode_decimal": 58938
|
||||
},
|
||||
{
|
||||
"icon_id": "26973680",
|
||||
"name": "删除",
|
||||
"font_class": "shanchu",
|
||||
"unicode": "e639",
|
||||
"unicode_decimal": 58937
|
||||
},
|
||||
{
|
||||
"icon_id": "26955368",
|
||||
"name": "导出",
|
||||
"font_class": "daochu",
|
||||
"unicode": "e636",
|
||||
"unicode_decimal": 58934
|
||||
},
|
||||
{
|
||||
"icon_id": "26955369",
|
||||
"name": "下单",
|
||||
"font_class": "xiadan",
|
||||
"unicode": "e637",
|
||||
"unicode_decimal": 58935
|
||||
},
|
||||
{
|
||||
"icon_id": "26955370",
|
||||
"name": "批量",
|
||||
"font_class": "piliang",
|
||||
"unicode": "e638",
|
||||
"unicode_decimal": 58936
|
||||
},
|
||||
{
|
||||
"icon_id": "26954331",
|
||||
"name": "折线图",
|
||||
"font_class": "zhexiantu",
|
||||
"unicode": "e635",
|
||||
"unicode_decimal": 58933
|
||||
},
|
||||
{
|
||||
"icon_id": "25254824",
|
||||
"name": "更多",
|
||||
"font_class": "gengduo",
|
||||
"unicode": "e631",
|
||||
"unicode_decimal": 58929
|
||||
},
|
||||
{
|
||||
"icon_id": "25181240",
|
||||
"name": "成功",
|
||||
"font_class": "chenggong",
|
||||
"unicode": "e630",
|
||||
"unicode_decimal": 58928
|
||||
},
|
||||
{
|
||||
"icon_id": "25181198",
|
||||
"name": "示警",
|
||||
"font_class": "shijing",
|
||||
"unicode": "e62f",
|
||||
"unicode_decimal": 58927
|
||||
},
|
||||
{
|
||||
"icon_id": "25181181",
|
||||
"name": "信息",
|
||||
"font_class": "xinxi",
|
||||
"unicode": "e62e",
|
||||
"unicode_decimal": 58926
|
||||
},
|
||||
{
|
||||
"icon_id": "25176785",
|
||||
"name": "任务为空",
|
||||
"font_class": "renwuweikong",
|
||||
"unicode": "e62d",
|
||||
"unicode_decimal": 58925
|
||||
},
|
||||
{
|
||||
"icon_id": "25176783",
|
||||
"name": "浏览记录为空",
|
||||
"font_class": "liulanjiluweikong",
|
||||
"unicode": "e62c",
|
||||
"unicode_decimal": 58924
|
||||
},
|
||||
{
|
||||
"icon_id": "25162308",
|
||||
"name": "清除",
|
||||
"font_class": "qingchu",
|
||||
"unicode": "e62b",
|
||||
"unicode_decimal": 58923
|
||||
},
|
||||
{
|
||||
"icon_id": "25148507",
|
||||
"name": "左边",
|
||||
"font_class": "zuobian",
|
||||
"unicode": "e629",
|
||||
"unicode_decimal": 58921
|
||||
},
|
||||
{
|
||||
"icon_id": "25148508",
|
||||
"name": "右边",
|
||||
"font_class": "youbian",
|
||||
"unicode": "e62a",
|
||||
"unicode_decimal": 58922
|
||||
},
|
||||
{
|
||||
"icon_id": "25100884",
|
||||
"name": "选中",
|
||||
"font_class": "xuanzhong",
|
||||
"unicode": "e628",
|
||||
"unicode_decimal": 58920
|
||||
},
|
||||
{
|
||||
"icon_id": "25097364",
|
||||
"name": "双箭头收起-上",
|
||||
"font_class": "shuangjiantoushouqi-shang",
|
||||
"unicode": "e626",
|
||||
"unicode_decimal": 58918
|
||||
},
|
||||
{
|
||||
"icon_id": "25097365",
|
||||
"name": "双箭头展开-下",
|
||||
"font_class": "shuangjiantouzhankai-xia",
|
||||
"unicode": "e627",
|
||||
"unicode_decimal": 58919
|
||||
},
|
||||
{
|
||||
"icon_id": "25097087",
|
||||
"name": "刷新",
|
||||
"font_class": "shuaxin",
|
||||
"unicode": "e625",
|
||||
"unicode_decimal": 58917
|
||||
},
|
||||
{
|
||||
"icon_id": "25097062",
|
||||
"name": "添加",
|
||||
"font_class": "tianjia",
|
||||
"unicode": "e624",
|
||||
"unicode_decimal": 58916
|
||||
},
|
||||
{
|
||||
"icon_id": "25097053",
|
||||
"name": "保存",
|
||||
"font_class": "baocun",
|
||||
"unicode": "e623",
|
||||
"unicode_decimal": 58915
|
||||
},
|
||||
{
|
||||
"icon_id": "24910721",
|
||||
"name": "右-展开更多",
|
||||
"font_class": "you-zhankaigengduo",
|
||||
"unicode": "e61d",
|
||||
"unicode_decimal": 58909
|
||||
},
|
||||
{
|
||||
"icon_id": "24910731",
|
||||
"name": "左-展开更多",
|
||||
"font_class": "zuo-zhankaigengduo",
|
||||
"unicode": "e61e",
|
||||
"unicode_decimal": 58910
|
||||
},
|
||||
{
|
||||
"icon_id": "24910740",
|
||||
"name": "下-展开",
|
||||
"font_class": "xia-zhankai",
|
||||
"unicode": "e61f",
|
||||
"unicode_decimal": 58911
|
||||
},
|
||||
{
|
||||
"icon_id": "24910742",
|
||||
"name": "关闭",
|
||||
"font_class": "guanbi",
|
||||
"unicode": "e620",
|
||||
"unicode_decimal": 58912
|
||||
},
|
||||
{
|
||||
"icon_id": "24903722",
|
||||
"name": "报表",
|
||||
"font_class": "baobiao",
|
||||
"unicode": "e612",
|
||||
"unicode_decimal": 58898
|
||||
},
|
||||
{
|
||||
"icon_id": "24903723",
|
||||
"name": "采购",
|
||||
"font_class": "caigou",
|
||||
"unicode": "e613",
|
||||
"unicode_decimal": 58899
|
||||
},
|
||||
{
|
||||
"icon_id": "24903733",
|
||||
"name": "仓库",
|
||||
"font_class": "cangku",
|
||||
"unicode": "e614",
|
||||
"unicode_decimal": 58900
|
||||
},
|
||||
{
|
||||
"icon_id": "24903735",
|
||||
"name": "生产",
|
||||
"font_class": "shengchan",
|
||||
"unicode": "e615",
|
||||
"unicode_decimal": 58901
|
||||
},
|
||||
{
|
||||
"icon_id": "24903736",
|
||||
"name": "销售",
|
||||
"font_class": "xiaoshou",
|
||||
"unicode": "e616",
|
||||
"unicode_decimal": 58902
|
||||
},
|
||||
{
|
||||
"icon_id": "24903737",
|
||||
"name": "条码",
|
||||
"font_class": "tiaoma",
|
||||
"unicode": "e617",
|
||||
"unicode_decimal": 58903
|
||||
},
|
||||
{
|
||||
"icon_id": "24903738",
|
||||
"name": "物料",
|
||||
"font_class": "wuliao",
|
||||
"unicode": "e618",
|
||||
"unicode_decimal": 58904
|
||||
},
|
||||
{
|
||||
"icon_id": "24903739",
|
||||
"name": "委外",
|
||||
"font_class": "weiwai",
|
||||
"unicode": "e619",
|
||||
"unicode_decimal": 58905
|
||||
},
|
||||
{
|
||||
"icon_id": "24903740",
|
||||
"name": "供应商",
|
||||
"font_class": "gongyingshang",
|
||||
"unicode": "e61a",
|
||||
"unicode_decimal": 58906
|
||||
},
|
||||
{
|
||||
"icon_id": "24903741",
|
||||
"name": "设置",
|
||||
"font_class": "shezhi",
|
||||
"unicode": "e61b",
|
||||
"unicode_decimal": 58907
|
||||
},
|
||||
{
|
||||
"icon_id": "24903806",
|
||||
"name": "211",
|
||||
"font_class": "a-211",
|
||||
"unicode": "e61c",
|
||||
"unicode_decimal": 58908
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
src/assets/fonto/iconfont.ttf
Normal file
BIN
src/assets/fonto/iconfont.woff
Normal file
BIN
src/assets/fonto/iconfont.woff2
Normal file
BIN
src/assets/fonts/DIN.otf
Normal file
BIN
src/assets/fonts/MetroDF.ttf
Normal file
BIN
src/assets/fonts/YouSheBiaoTiHei.ttf
Normal file
14
src/assets/fonts/font.scss
Normal file
@@ -0,0 +1,14 @@
|
||||
@font-face {
|
||||
font-family: YouSheBiaoTiHei;
|
||||
src: url("./YouSheBiaoTiHei.ttf");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: MetroDF;
|
||||
src: url("./MetroDF.ttf");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: DIN;
|
||||
src: url("./DIN.Otf");
|
||||
}
|
||||
38
src/assets/iconfont/iconfont.scss
Normal file
@@ -0,0 +1,38 @@
|
||||
@font-face {
|
||||
font-family: iconfont; /* Project id 2667653 */
|
||||
src: url("iconfont.ttf?t=1663324025864") format("truetype");
|
||||
}
|
||||
.iconfont {
|
||||
font-family: iconfont !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
cursor: pointer;
|
||||
}
|
||||
.icon-xiaoxi::before {
|
||||
font-size: 21.2px;
|
||||
content: "\e61f";
|
||||
}
|
||||
.icon-zhuti::before {
|
||||
font-size: 22.4px;
|
||||
content: "\e638";
|
||||
}
|
||||
.icon-sousuo::before {
|
||||
content: "\e611";
|
||||
}
|
||||
.icon-contentright::before {
|
||||
content: "\e8c9";
|
||||
}
|
||||
.icon-contentleft::before {
|
||||
content: "\e8ca";
|
||||
}
|
||||
.icon-fangda::before {
|
||||
content: "\e826";
|
||||
}
|
||||
.icon-suoxiao::before {
|
||||
content: "\e641";
|
||||
}
|
||||
.icon-zhongyingwen::before {
|
||||
content: "\e8cb";
|
||||
}
|
||||
BIN
src/assets/iconfont/iconfont.ttf
Normal file
1
src/assets/icons/xianxingdaoyu.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M574 342.8m-38.3 0a38.3 38.3 0 1 0 76.6 0 38.3 38.3 0 1 0-76.6 0Z" fill="#F2B843" /><path d="M627 697c15.2-20.7 45.3-294-45-383.3-3-6.1-0.4-13.5 5.7-16.5 6.2-3 13.5-0.5 16.5 5.7C689.8 370.2 719.9 573 705.1 697H627z" fill="#EA800C" /><path d="M617.8 307.4m-38.3 0a38.3 38.3 0 1 0 76.6 0 38.3 38.3 0 1 0-76.6 0Z" fill="#F2B843" /><path d="M608 272.5L461 502.8c-33.6-47.5-37.2-112.5-3.9-164.6 33.2-52.1 93.7-76.2 150.9-65.7z" fill="#3DC38A" /><path d="M742.5 132.3L569.9 299.8c-19.2-47.5-9.1-103.9 29.9-141.8 39.1-37.9 95.8-46.3 142.7-25.7z" fill="#2F9B77" /><path d="M608.7 289.2l-239.6 21.1c15.1-49 58.5-86.4 112.7-91.1 54.2-4.8 103.5 24.4 126.9 70z" fill="#2F9B77" /><path d="M594.7 269.9L408.5 168.4c35-28.6 85.2-34.8 127.3-11.9 42.1 23 64 68.6 58.9 113.4z" fill="#3DC38A" /><path d="M825.5 331.8l-271.4-31.4c28-51 84.9-82.7 146.3-75.6 61.3 7 109.5 51 125.1 107z" fill="#3DC38A" /><path d="M75.3 868.9c0-86.5 104.3-173 233-173s233 86.5 233 173h-466z" fill="#2F9B77" /><path d="M938.2 868.9c0-116.2-130.9-232.3-292.3-232.3S353.5 752.7 353.5 868.9h584.7z" fill="#3DC38A" /><path d="M858.9 701.5c-28.1-23.1-60.4-41.4-95.9-54.3-14.5-5.3-29.3-9.5-44.3-12.8 0.2-51.3-5.5-106.3-16.2-155.9-11.9-54.8-29.5-101.6-51.2-136.3 5.6-5.3 9.7-11.8 12.2-19.1l160.8 18.6c0.4 0 0.8 0.1 1.2 0.1 2.9 0 5.7-1.3 7.6-3.5 2.2-2.5 2.9-6 2-9.2-8.3-29.8-25.1-56.3-48.5-76.7-24-20.9-53.5-33.9-85.1-37.5-9.7-1.1-19.3-1.3-28.9-0.7l76.8-74.6c2.4-2.3 3.5-5.7 2.9-8.9-0.6-3.3-2.8-6-5.8-7.4-52.3-23-112.6-12.1-153.7 27.7-7.2 7-13.6 14.7-19.1 23.1-9.4-10.5-20.6-19.4-33.1-26.2-44.7-24.3-99-19.2-138.4 12.9-2.6 2.1-3.9 5.4-3.6 8.7s2.2 6.3 5.2 7.9l62.5 34c-50.2 9.8-91.2 46.2-106.6 96-1 3.2-0.3 6.6 1.8 9.2 1.9 2.4 4.8 3.7 7.8 3.7h0.9l94.5-8.3c-5.8 6.4-11 13.3-15.8 20.8-17.2 26.9-25.7 57.9-24.7 89.7 1 31 11 60.8 28.9 86 1.9 2.7 4.9 4.2 8.2 4.2h0.2c3.3-0.1 6.4-1.8 8.2-4.6L549 383.9c7.5 4.6 16.1 7.1 25.2 7.1 13.4 0 25.9-5.5 34.8-14.7 27.2 70.9 29.2 175.3 21.8 250.6-34.9 1.5-69.1 8.3-101.8 20.2-35.5 12.9-67.8 31.2-95.9 54.3-3.2 2.6-6.3 5.3-9.4 8.1-35.7-15.5-75.4-23.6-115.1-23.6-63.1 0-123.8 19.9-170.9 56.1-45.8 35.3-72.1 81.5-72.1 126.9 0 5.5 4.5 10 10 10h862.9c5.5 0 10-4.5 10-10-0.3-59.7-32.8-120.7-89.6-167.4z m-226.2-370c-3.3 2.1-7 3.4-10.9 3.9-1-6.4-3.2-12.5-6.5-17.9l27.6 3.2c-2.3 4.4-5.8 8.1-10.2 10.8z m66.6-96.8c27.6 3.2 53.3 14.5 74.3 32.7 16.6 14.5 29.4 32.4 37.5 52.6l-152.7-17.7c-0.4-0.1-0.8-0.2-1.2-0.2-0.4 0-0.8-0.1-1.2-0.1l-65.3-7.6c-1-0.3-2-0.4-2.9-0.3l-5.5-0.6c-0.1 0-0.2-0.1-0.3-0.1-0.7-0.1-1.3-0.2-2-0.2l-8.8-1c5.3-7.5 11.3-14.5 18-20.8 0.5-0.4 1-0.8 1.4-1.3 8.7-8 18.4-14.9 29.1-20.5 8-4.2 16.4-7.6 24.9-10.2 0.5-0.1 0.9-0.2 1.4-0.4 17-4.8 35.1-6.4 53.3-4.3z m-92.5-69.4c31.5-30.5 76.2-41.2 117.4-29l-87 84.4c-9.3 2.9-18.4 6.6-27.1 11.2-2.2 1.2-4.3 2.4-6.5 3.6-2.8-15.7-8.5-30.8-17-44.4 5.5-9.5 12.3-18.2 20.2-25.8z m-75.8 0.1c14.4 7.9 26.4 18.6 35.7 31.9 10.5 15.1 16.8 32.7 18.4 51-1.2 1-2.5 2-3.6 3l-74-40.3c-0.8-0.7-1.8-1.2-2.8-1.5l-77.2-42.1c31.3-18.8 70.6-20 103.5-2z m-48.2 63.8c5.2-0.5 10.3-0.6 15.4-0.4l68.2 37.1c-5.1 5.7-9.9 11.8-14.2 18.2l-60 5.3-108.1 9.5c17.8-39.1 55-66 98.7-69.7zM461.2 484c-24.3-43.9-23-97.5 4.5-140.6 8.5-13.4 19-24.9 31.3-34.4l48.3-4.2s0 0.1 0.1 0.1c1.5 3 4.4 5 7.7 5.3l17.8 2.1-32.1 50.3c-0.6 0.7-1 1.4-1.4 2.2L461.2 484zM574 371c-5.2 0-10.1-1.4-14.4-3.9l29.3-45.9 1.1-1.8c7.6 5.2 12.4 13.9 12.4 23.4v2.1c-0.1 1.8-0.5 3.8-1.1 6.1-0.2 0.6-0.4 1.1-0.6 1.7-4.2 10.9-14.8 18.3-26.7 18.3z m47.8-15.5c4.3-0.3 8.6-1.3 12.6-2.7 20.5 32.6 37.2 77.3 48.6 129.9 10.2 47.1 15.7 99.1 15.8 148-15.9-2.5-31.9-3.8-48.1-4 2.7-28.8 5.6-76.5 1.8-130.4-4-57.6-14.3-104.8-30.7-140.8zM149.6 757.9c43.6-33.5 99.9-52 158.7-52 34.2 0 68.3 6.5 99.4 18.8-38.4 40-61.1 87.2-63.9 134.2h-258c3.6-35.9 26.4-72.2 63.8-101z m391.7 101H363.8c3.4-50.5 32.8-101.8 81.7-142 26.4-21.7 56.6-38.8 90-50.9 35.4-12.8 72.5-19.4 110.4-19.4 37.9 0 75 6.5 110.3 19.4 33.4 12.1 63.6 29.3 90 50.9 48.9 40.2 78.2 91.5 81.6 142H541.3z" fill="#4D3500" /></svg>
|
||||
|
After Width: | Height: | Size: 4.1 KiB |
1
src/assets/icons/xianxingdiqiu.svg
Normal file
|
After Width: | Height: | Size: 10 KiB |
1
src/assets/icons/xianxingditu.svg
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
1
src/assets/icons/xianxingfanchuan.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M489.6 541.1V166l283.5 375.1H489.6" fill="#3DC38A" /><path d="M489.6 101.3l-323.2 491h323.2z" fill="#F2B843" /><path d="M489.6 715.7c-16.3 0-29.6-13.2-29.6-29.6V95c0-16.3 13.2-29.6 29.6-29.6 16.3 0 29.6 13.2 29.6 29.6v591.1c-0.1 16.3-13.3 29.6-29.6 29.6z" fill="#EA800C" /><path d="M489.6 608.4H145.3c-16.3 0-29.6-13.2-29.6-29.6 0-16.3 13.2-29.6 29.6-29.6h344.3c16.3 0 29.6 13.2 29.6 29.6-0.1 16.3-13.3 29.6-29.6 29.6z" fill="#EA800C" /><path d="M783.8 557.2H503.1c-16.3 0-29.6-13.2-29.6-29.6 0-16.3 13.2-29.6 29.6-29.6h280.7c16.3 0 29.6 13.2 29.6 29.6 0 16.3-13.3 29.6-29.6 29.6z" fill="#EA800C" /><path d="M752.4 759.8l-67-88.8c-7.9-10.5-20.3-16.7-33.5-16.7H302c-18.3 0-34.5 11.9-40 29.3l-25 76.2h515.4z" fill="#2F9B77" /><path d="M920.8 704.6c15.6-0.8 26.8 14.8 21.1 29.3l-54.5 138.8-28.6 72.8H133.7L81.5 775c-4.1-13.4 5.5-27 19.4-27.8l143.3-7.5 676.6-35.1z" fill="#3DC38A" /><path d="M802.3 791.8m-27 0a27 27 0 1 0 54 0 27 27 0 1 0-54 0Z" fill="#F2B843" /><path d="M947.5 707.7c-6.3-8.7-16.4-13.6-27.2-13.1l-196.8 10.2-30-39.9c-9.8-12.9-25.3-20.6-41.5-20.6H529.2v-77.1h254.7c21.8 0 39.6-17.8 39.6-39.6S805.7 488 783.9 488h-38.3L529.2 201.7V95c0-21.8-17.8-39.6-39.6-39.6S450 73.2 450 95v48.2L189.3 539.3h-44c-21.8 0-39.6 17.8-39.6 39.6s17.8 39.6 39.6 39.6H450v25.8H302c-22.7 0-42.6 14.6-49.5 36.2l-16.2 49.6-135.9 7.1c-9.7 0.6-18.5 5.5-24.1 13.5-5.6 8-7.1 17.9-4.3 27.2l52.2 170.5c1.3 4.2 5.2 7.1 9.6 7.1h725.1c4.1 0 7.8-2.5 9.3-6.3l28.6-72.8 54.5-138.8c3.8-10 2.4-21.2-3.8-29.9zM720.5 488H529.2V234.9L720.5 488zM450 179.6v359.7H213.3L450 179.6z m20 428.8c0-5.5-4.5-10-10-10-0.5 0-0.9 0-1.3 0.1H145.3c-10.8 0-19.6-8.8-19.6-19.6s8.8-19.6 19.6-19.6H460c5.5 0 10-4.5 10-10V95c0-10.8 8.8-19.6 19.6-19.6s19.6 8.8 19.6 19.6v403c0 5.5 4.5 10 10 10h264.7c10.8 0 19.6 8.8 19.6 19.6s-8.8 19.6-19.6 19.6H519.2c-5.5 0-10 4.5-10 10v87.1H470v-35.9z m-198.5 78.3s0-0.1 0 0c4.3-13.4 16.5-22.4 30.5-22.4h350c9.9 0 19.5 4.8 25.5 12.7l21.9 29.1L257.7 729l13.8-42.3z m661.1 43.5L878.1 869 852 935.5H141.1l-50-163.4c-1-3.4-0.5-7 1.6-9.9 2-2.9 5.3-4.8 8.8-5l141.5-7.4h0.6c0.6 0 1.1-0.1 1.7-0.1l473.6-24.6h0.7l201.7-10.5c4-0.2 7.6 1.5 9.9 4.8 2.3 3.2 2.8 7.2 1.4 10.8z" fill="#4D3500" /><path d="M802.3 754.8c-20.4 0-37 16.6-37 37s16.6 37 37 37 37-16.6 37-37-16.6-37-37-37z m0 54c-9.4 0-17-7.6-17-17s7.6-17 17-17 17 7.6 17 17-7.6 17-17 17z" fill="#4D3500" /></svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
1
src/assets/icons/xianxingfeiji.svg
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
1
src/assets/icons/xianxinglvhangriji.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M252.8 862.9h-73.4c-6.8 0-12.4-5.6-12.4-12.4V134.4c0-6.8 5.6-12.4 12.4-12.4h73.4l5.3 6.8v728.8l-5.3 5.3z" fill="#F2B843" /><path d="M338.5 942l-42.9-18.1-42.8 18.1v-79.1l7.5-5.3h71.3l7 5.3-0.1 79.1z" fill="#EA800C" /><path d="M844.6 327.9h-40.7l-5.3-5.8v-93.3l5.3-7.2h40.7c6.8 0 12.4 5.6 12.4 12.4v81.5c0 6.9-5.6 12.4-12.4 12.4z" fill="#F2B843" /><path d="M844.6 540.5h-40.7l-5.3-7.3v-90.6l5.3-8.4h40.7c6.8 0 12.4 5.6 12.4 12.4v81.5c0 6.8-5.6 12.4-12.4 12.4z" fill="#EA800C" /><path d="M844.6 753h-40.7l-5.3-6.7v-92.1l5.3-7.5h40.7c6.8 0 12.4 5.6 12.4 12.4v81.5c0 6.8-5.6 12.4-12.4 12.4z" fill="#2F9B77" /><path d="M791.8 862.9h-539V122h539.1c6.7 0 12 5.4 12 12v716.8c0 6.7-5.4 12.1-12.1 12.1z" fill="#3DC38A" /><path d="M680.3 661.1H343.7c-14 0-25.5-11.5-25.5-25.5s11.5-25.5 25.5-25.5h336.6c14 0 25.5 11.5 25.5 25.5s-11.5 25.5-25.5 25.5zM680.3 779.8H343.7c-14 0-25.5-11.5-25.5-25.5s11.5-25.5 25.5-25.5h336.6c14 0 25.5 11.5 25.5 25.5s-11.5 25.5-25.5 25.5z" fill="#2F9B77" /><path d="M594.8 511.1c-79.2 45.7-180.5 18.6-226.3-60.6S350 270 429.2 224.2s180.5-18.6 226.3 60.6 18.5 180.6-60.7 226.3z" fill="#3DC38A" /><path d="M523.7 318.1c-1.2 0.3-3.5 0.9-4.5 1.7-1.2 1 0.7 2.3 0 2.9-1.2 1-2.1 2.7-4.7 2.6-5.5-0.3-13.9-7.5-19-10.2 8.1-8.3-4.7-9.6-9.7-9.1-6.5 0.5-17.7 0-23.5 3.2-4.1 2.3-9.5 11.7-12.8 15.5-4.6 5.2-9.1 9.8-12.1 16-10.9 23 5.9 49.4 32.2 46.3 7.3-0.9 14.9-5.5 21.4 0.6 4.8 4.5 2.3 8.7 3.5 13.9 1.1 4.5 6.1 7.3 7.8 11.4 3.3 7.9 1.2 12.9-1.1 20.2-3.1 9.6 4.9 21 8 30.2 1.6 4.7 6.1 17.7 10.7 19.8 7.1 3.2 18.1-6.4 22.4-11.6 3.3-4.1 2.2-8.2 4.4-12 2.4-4.1 5.4-5.3 7.1-10.6 1.8-5.7 3.7-7.1 7.5-11.3 6.2-6.7 5.2-10.6 2.7-18.6-5.1-16.5 13.5-24.2 21.8-36.3 8.7-12.6-8.2-8.4-14.8-12.8-6.8-4.4-9.8-12.9-13.1-19.9s-6-17.5-11.4-23.3c-4.2-4.3-16.9-6.4-22.8-8.6zM609.2 428.8c-2.6 8.9-5.3 17.8-7.9 26.7-1.8 6.2-8.4 26.6-17.5 13.6-3.5-5-0.6-11.4 1.3-16 2.4-5.8-0.9-8.7 0.9-14.1 2-6.2 10-6.4 13.8-10.8 2.7-3 4.3-7.9 6.2-11.5 1 4 2.1 8.1 3.2 12.1z" fill="#F2B843" /><path d="M655.4 284.9c-28.5-49.4-78.7-78.5-131.6-82.4l-21.6 27.2-46.4 16.3-12.5 30.2 19.2 26.9 2-5.7c3.4-9.5 12.4-15.8 22.5-15.8h31.7l36.4 12.8 12.5 12v7.6l17.4 33.4 5.1-1.9c11-4 20.9-10.4 29.2-18.7l-4.2-6.3c-1.4-2 0.1-4.7 2.5-4.7h10.2c3 0 5.8 1.3 7.7 3.6l8.3 9.7c0.8 0.9 1.4 2 1.8 3.1l9.1 25.2 4.4-4.4c2.7-2.7 4.1-6.5 4.2-10.4 0-3.1 1.4-6.1 3.7-8.2l3.4-3c0.8-0.8 1.8-1.4 2.8-1.8-3.6-15.3-9.5-30.4-17.8-44.7zM407.6 291.3l7.9-8.5c5.8-6.2 7.4-15.2 4.2-23-3.4-8.3-10.9-13.6-19.2-14.8-29.2 26.5-47.4 62.2-52.6 100 6.2 5.4 12.6 11.2 12.6 11.7-0.1 1 23.2-2.9 23.2-2.9l-12-17.5 17.2-12.3 18.7-32.7zM423.8 456.4c7.5-2.4 11.6-10.4 9.1-17.9l-2.1-6.6c-0.9-2.9-0.9-5.9 0-8.8 2.7-8.1-2.4-16.8-10.8-18.4l-16.8-3.3-30.6-23.2-25.3 8.2c2.5 21.9 9.4 43.7 21.2 64.1 10.9 18.8 24.9 34.7 41 47.4l7.5-39.3 6.8-2.2z" fill="#2F9B77" /><path d="M844.6 337.9c12.4 0 22.4-10 22.4-22.4V234c0-12.4-10-22.4-22.4-22.4h-30.7V134c0-12.1-9.9-22-22-22H179.4c-12.4 0-22.4 10-22.4 22.4v716.1c0 12.4 10 22.4 22.4 22.4h63.4V942c0 3.4 1.7 6.5 4.5 8.3 2.8 1.9 6.3 2.2 9.4 0.9l38.9-16.5 39 16.5c1.2 0.5 2.6 0.8 3.9 0.8 1.9 0 3.9-0.6 5.5-1.7 2.8-1.9 4.5-5 4.5-8.3v-69.1h443.3c12.2 0 22.1-9.9 22.1-22.1V763h30.7c12.4 0 22.4-10 22.4-22.4v-81.5c0-12.4-10-22.4-22.4-22.4h-30.7v-86.2h30.7c12.4 0 22.4-10 22.4-22.4v-81.5c0-12.4-10-22.4-22.4-22.4h-30.7v-86.3h30.7z m0-106.3c1.3 0 2.4 1.1 2.4 2.4v81.5c0 1.3-1.1 2.4-2.4 2.4h-30.7v-86.3h30.7zM177 850.5V134.4c0-1.3 1.1-2.4 2.4-2.4h63.4v720.9h-63.4c-1.3 0-2.4-1.1-2.4-2.4z m151.5 76.4l-29-12.2c-2.5-1-5.3-1-7.8 0l-28.9 12.2v-54h65.7v54z m465.4-76.1c0 1.2-0.9 2.1-2.1 2.1h-529V132h529.1c1.1 0 2 0.9 2 2v716.8z m50.7-194.1c1.3 0 2.4 1.1 2.4 2.4v81.5c0 1.4-1 2.4-2.4 2.4h-30.7v-86.3h30.7z m0-212.5c1.3 0 2.4 1.1 2.4 2.4v81.5c0 1.3-1.1 2.4-2.4 2.4h-30.7v-86.3h30.7z" fill="#4D3500" /><path d="M680.3 600.1H343.7c-19.6 0-35.5 15.9-35.5 35.5s15.9 35.5 35.5 35.5h336.6c19.6 0 35.5-15.9 35.5-35.5s-15.9-35.5-35.5-35.5z m0 51H343.7c-8.5 0-15.5-7-15.5-15.5s7-15.5 15.5-15.5h336.6c8.5 0 15.5 7 15.5 15.5s-7 15.5-15.5 15.5zM680.3 718.8H343.7c-19.6 0-35.5 15.9-35.5 35.5s15.9 35.5 35.5 35.5h336.6c19.6 0 35.5-15.9 35.5-35.5s-15.9-35.5-35.5-35.5z m0 51H343.7c-8.5 0-15.5-7-15.5-15.5s7-15.5 15.5-15.5h336.6c8.5 0 15.5 7 15.5 15.5s-7 15.5-15.5 15.5zM512.3 543.2c29.8 0 59.9-7.6 87.5-23.5 40.6-23.4 69.7-61.3 81.9-106.7 12.2-45.4 6-92.7-17.5-133.3-23.5-40.6-61.4-69.7-106.7-81.8-45.3-12.1-92.7-5.9-133.3 17.6-40.6 23.5-69.7 61.4-81.9 106.7-12.2 45.3-6 92.7 17.5 133.3 32.6 56.3 91.7 87.7 152.5 87.7zM361.6 327.4c10.8-40.2 36.6-73.7 72.6-94.6 24-13.9 50.6-20.9 77.6-20.9 13.5 0 27.1 1.8 40.5 5.4 40.2 10.8 73.7 36.5 94.6 72.5 20.8 36 26.3 77.9 15.5 118.1-10.8 40.2-36.6 73.7-72.6 94.5-74.3 42.9-169.7 17.3-212.6-56.9-20.8-36-26.4-77.9-15.6-118.1z" fill="#4D3500" /></svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
1
src/assets/icons/xianxingtianqiyubao.svg
Normal file
|
After Width: | Height: | Size: 13 KiB |
1
src/assets/icons/xianxingxiangjipaizhao.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M72 440.5h880v286.2H72z" fill="#F2B843" /><path d="M72 726.6V834c0 19.8 16 35.8 35.8 35.8h808.5c19.8 0 35.8-16 35.8-35.8V726.6H72zM916.2 297.4H708.7L647 174.1c-6.1-12.1-18.5-19.8-32-19.8H408.9c-13.5 0-25.9 7.7-32 19.8l-61.7 123.3h-64.4v-35.8c0-19.8-16-35.8-35.8-35.8h-35.8c-19.8 0-35.8 16-35.8 35.8v35.8h-35.8c-19.8 0-35.8 16-35.8 35.8v107.3h880V333.1c0.2-19.7-15.8-35.7-35.6-35.7z" fill="#3DC38A" /><path d="M726.6 583.5c0 118.3-95.9 214.6-214.6 214.6-118.8 0-214.6-96.4-214.6-214.6 0-118.3 95.9-214.6 214.6-214.6 118.8 0 214.6 96.4 214.6 214.6z" fill="#EA800C" /><path d="M512 440.5c78.9 0 143.1 64.2 143.1 143.1S590.9 726.7 512 726.7s-143.1-64.2-143.1-143.1S433.1 440.5 512 440.5z" fill="#FFFFFF" /><path d="M773.1 386.8c9.9 0 17.9-8 17.9-17.9s-8-17.9-17.9-17.9-17.9 8-17.9 17.9c0.1 9.9 8.1 17.9 17.9 17.9zM565.7 207.9H458.3c-9.9 0-17.9 8-17.9 17.9s8 17.9 17.9 17.9h107.3c9.9 0 17.9-8 17.9-17.9s-8-17.9-17.8-17.9zM512 744.5c88.8 0 161-72.2 161-161s-72.2-161-161-161-161 72.2-161 161 72.2 161 161 161z m0-286.2c69 0 125.2 56.2 125.2 125.2S581 708.7 512 708.7s-125.2-56.2-125.2-125.2S443 458.3 512 458.3z" fill="#2F9B77" /><path d="M440.5 601.4c9.9 0 17.9-8 17.9-17.9 0-29.6 24.1-53.7 53.7-53.7 9.9 0 17.9-8 17.9-17.9s-8-17.9-17.9-17.9c-49.3 0-89.4 40.1-89.4 89.4-0.1 10 7.9 18 17.8 18z" fill="#3DC38A" /><path d="M844.7 386.8h35.8c9.9 0 17.9-8 17.9-17.9s-8-17.9-17.9-17.9h-35.8c-9.9 0-17.9 8-17.9 17.9s8 17.9 17.9 17.9z" fill="#2F9B77" /><path d="M773.1 396.8c15.4 0 27.9-12.5 27.9-27.9S788.5 341 773.1 341s-27.9 12.5-27.9 27.9v0.1c0.2 15.3 12.7 27.8 27.9 27.8z m0-35.8c4.4 0 7.9 3.5 7.9 7.9s-3.5 7.9-7.9 7.9c-4.3 0-7.8-3.6-7.9-8 0-4.3 3.6-7.8 7.9-7.8zM458.3 253.7h107.3c15.4 0 27.9-12.5 27.9-27.9s-12.5-27.9-27.8-27.9H458.3c-15.4 0-27.9 12.5-27.9 27.9s12.5 27.9 27.9 27.9z m0-35.8h107.4c4.3 0 7.8 3.5 7.8 7.9s-3.5 7.9-7.9 7.9H458.3c-4.4 0-7.9-3.5-7.9-7.9s3.5-7.9 7.9-7.9zM512 754.5c94.3 0 171-76.7 171-171s-76.7-171-171-171-171 76.7-171 171 76.7 171 171 171z m0-322c83.3 0 151 67.7 151 151s-67.7 151-151 151-151-67.7-151-151 67.7-151 151-151z" fill="#4D3500" /><path d="M512 718.7c74.5 0 135.2-60.7 135.2-135.2S586.5 448.3 512 448.3 376.8 509 376.8 583.5 437.5 718.7 512 718.7z m0-250.4c63.5 0 115.2 51.7 115.2 115.2S575.5 698.7 512 698.7 396.8 647 396.8 583.5 448.5 468.3 512 468.3z" fill="#4D3500" /><path d="M468.4 583.5c0-24.1 19.6-43.7 43.7-43.7 15.4 0 27.9-12.5 27.9-27.9S527.5 484 512.1 484c-54.8 0-99.4 44.6-99.4 99.4-0.1 7.5 2.8 14.5 8 19.8 5.3 5.3 12.3 8.2 19.8 8.2 15.4 0 27.9-12.5 27.9-27.9z m-35.7 0s0-0.1 0 0c0-43.9 35.6-79.5 79.4-79.5 4.4 0 7.9 3.5 7.9 7.9s-3.5 7.9-7.9 7.9c-35.1 0-63.7 28.6-63.7 63.7 0 4.4-3.5 7.9-7.9 7.9-2.1 0-4.1-0.8-5.6-2.3-1.4-1.5-2.2-3.5-2.2-5.6zM844.7 396.8h35.8c15.4 0 27.9-12.5 27.9-27.9S895.9 341 880.5 341h-35.8c-15.4 0-27.9 12.5-27.9 27.9s12.5 27.9 27.9 27.9z m0-35.8h35.8c4.4 0 7.9 3.5 7.9 7.9s-3.5 7.9-7.9 7.9h-35.8c-4.4 0-7.9-3.5-7.9-7.9s3.5-7.9 7.9-7.9z" fill="#4D3500" /><path d="M916.5 287.3H715.2l-58.9-117.8c-7.8-15.6-23.5-25.3-40.9-25.3H409.1c-17.4 0-33.1 9.7-40.9 25.3l-58.9 117.8H261v-25.8c0-25.3-20.5-45.8-45.8-45.8h-35.8c-25.3 0-45.8 20.5-45.8 45.8v25.8h-25.8c-25.3 0-45.8 20.5-45.8 45.8V834c0 25.1 20.5 45.7 45.8 45.8h808.4c25.3 0 45.8-20.5 45.8-45.8V442.8c0.2-0.8 0.3-1.6 0.3-2.4V333.1c0-25.3-20.5-45.8-45.8-45.8z m-737.1-51.6h35.8c14.2 0 25.8 11.6 25.8 25.8v25.9h-87.4v-25.9c0-14.2 11.6-25.8 25.8-25.8zM82 450.5h249.1c-27.5 37.3-43.7 83.3-43.7 133 0 49.8 16.3 95.8 43.8 133.1H82V450.5z m430-71.6c112.8 0 204.6 91.8 204.6 204.6S624.8 788.1 512 788.1s-204.6-91.8-204.6-204.6S399.2 378.9 512 378.9zM942 834c0 14.2-11.6 25.8-25.8 25.8H107.9C93.6 859.7 82 848.2 82 834v-97.4h265.8c41 44 99.4 71.5 164.2 71.5s123.1-27.5 164.2-71.5H942V834z m0-117.4H692.8c27.5-37.3 43.8-83.3 43.8-133.1 0-49.7-16.3-95.7-43.7-133H942v266.1z m0.3-286.2H676.2c-41-44-99.4-71.5-164.2-71.5s-123.2 27.6-164.3 71.6H82v-97.4c0-14.2 11.6-25.8 25.8-25.8h34.4c0.4 0.1 0.9 0.1 1.3 0.1h108c0.5 0 0.9 0 1.3-0.1h62.6c3.8 0 7.2-2.1 8.9-5.5L386 178.5c4.4-8.8 13.3-14.3 23.1-14.3h206.2c9.8 0 18.7 5.5 23.1 14.3l61.7 123.3c1.7 3.4 5.2 5.5 8.9 5.5h207.5c14.2 0 25.8 11.6 25.8 25.8v97.3z" fill="#4D3500" /></svg>
|
||||
|
After Width: | Height: | Size: 4.3 KiB |
1
src/assets/icons/xianxingxiarilengyin.svg
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
1
src/assets/icons/xianxingyoulun.svg
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
1
src/assets/icons/xianxingzijiayou.svg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
src/assets/images/403.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/images/404.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
src/assets/images/500.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
src/assets/images/cs.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
src/assets/images/excel.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
33
src/assets/images/login_bg.svg
Normal file
@@ -0,0 +1,33 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" baseProfile="full" width="100%" height="100%" viewBox="0 0 1400 800">
|
||||
|
||||
<rect x="1300" y="400" rx="40" ry="40" width="150" height="150" stroke="rgb(129, 201, 149)" fill="rgb(129, 201, 149)">
|
||||
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="35s" type="rotate" from="0 1450 550" to="360 1450 550" repeatCount="indefinite"/>
|
||||
</rect>
|
||||
|
||||
<path d="M 100 350 A 150 150 0 1 1 400 350 Q400 370 380 370 L 250 370 L 120 370 Q100 370 100 350" fill="#a2b3ff">
|
||||
<animateMotion path="M 800 -200 L 800 -300 L 800 -200" dur="20s" begin="0s" repeatCount="indefinite"/>
|
||||
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="30s" type="rotate" values="0 210 530 ; -30 210 530 ; 0 210 530" keyTimes="0 ; 0.5 ; 1" repeatCount="indefinite"/>
|
||||
</path>
|
||||
|
||||
<circle cx="150" cy="150" r="180" stroke="#85FFBD" fill="#85FFBD">
|
||||
<animateMotion path="M 0 0 L 40 20 Z" dur="5s" repeatCount="indefinite"/>
|
||||
</circle>
|
||||
|
||||
<!-- 三角形 -->
|
||||
<path d="M 165 580 L 270 580 Q275 578 270 570 L 223 483 Q220 480 217 483 L 165 570 Q160 578 165 580" fill="#a2b3ff">
|
||||
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="35s" type="rotate" from="0 210 530" to="360 210 530" repeatCount="indefinite"/>
|
||||
</path>
|
||||
|
||||
<!-- <circle cx="1200" cy="600" r="30" stroke="rgb(241, 243, 244)" fill="rgb(241, 243, 244)">-->
|
||||
<!-- <animateMotion path="M 0 0 L -20 40 Z" dur="9s" repeatCount="indefinite"/>-->
|
||||
<!-- </circle>-->
|
||||
|
||||
<path d="M 100 350 A 40 40 0 1 1 180 350 L 180 430 A 40 40 0 1 1 100 430 Z" fill="#3054EB">
|
||||
<animateMotion path="M 140 390 L 180 360 L 140 390" dur="20s" begin="0s" repeatCount="indefinite"/>
|
||||
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="30s" type="rotate" values="0 140 390; -60 140 390; 0 140 390" keyTimes="0 ; 0.5 ; 1" repeatCount="indefinite"/>
|
||||
</path>
|
||||
|
||||
<rect x="400" y="600" rx="40" ry="40" width="100" height="100" stroke="rgb(129, 201, 149)" fill="#3054EB">
|
||||
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="35s" type="rotate" from="-30 550 750" to="330 550 750" repeatCount="indefinite"/>
|
||||
</rect>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/assets/images/login_left.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
src/assets/images/login_left1.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
src/assets/images/login_left2.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
src/assets/images/login_left3.png
Normal file
|
After Width: | Height: | Size: 109 KiB |
BIN
src/assets/images/login_left4.png
Normal file
|
After Width: | Height: | Size: 150 KiB |
BIN
src/assets/images/login_left5.png
Normal file
|
After Width: | Height: | Size: 275 KiB |
BIN
src/assets/images/logo.png
Normal file
|
After Width: | Height: | Size: 933 B |
1
src/assets/images/logo.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>
|
||||
|
After Width: | Height: | Size: 276 B |
BIN
src/assets/images/msg01.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
src/assets/images/msg02.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
src/assets/images/msg03.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
src/assets/images/msg04.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
src/assets/images/msg05.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
src/assets/images/notData.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/assets/images/reviewed_ico.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
src/assets/images/welcome.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
8
src/assets/json/authButtonList.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"code": 200,
|
||||
"data": {
|
||||
"useProTable": ["add", "batchAdd", "export", "batchDelete", "status"],
|
||||
"authButton": ["add", "edit", "delete", "import", "export"]
|
||||
},
|
||||
"msg": "成功"
|
||||
}
|
||||
280
src/assets/json/authMenuList.json
Normal file
@@ -0,0 +1,280 @@
|
||||
{
|
||||
"code": 200,
|
||||
"data": [
|
||||
{
|
||||
"id": 1,
|
||||
"path": "/index",
|
||||
"name": "home",
|
||||
"component": "/home/index",
|
||||
"hidden": true,
|
||||
"type":1,
|
||||
"children":[
|
||||
],
|
||||
"meta": {
|
||||
"icon": "",
|
||||
"title": "首页",
|
||||
"isKeepAlive": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 77123114,
|
||||
"name": "foundation",
|
||||
"type":1,
|
||||
"path": "/foundation",
|
||||
"component": "/foundation",
|
||||
"icon": "",
|
||||
"redirect": "",
|
||||
"hidden": false,
|
||||
"meta": {
|
||||
"title": "基础",
|
||||
"icon": "icon-shouhuoruku"
|
||||
},
|
||||
"children":[
|
||||
{
|
||||
"id": 7711667,
|
||||
"name": "foundationSet",
|
||||
"type":1,
|
||||
"pid":77123114,
|
||||
"path": "/foundation/set",
|
||||
"component": "/foundation/set",
|
||||
"icon": "",
|
||||
"redirect": "",
|
||||
"hidden": false,
|
||||
"meta": {
|
||||
"title": "基础设置",
|
||||
"icon": "icon-shouhuoruku"
|
||||
},
|
||||
"children":[
|
||||
|
||||
{
|
||||
"id": 443323235133,
|
||||
"name": "foundationSetMaterial",
|
||||
"type":1,
|
||||
"pid":77123114,
|
||||
"path": "/foundation/set/material/index",
|
||||
"component": "/foundation/set/material/index",
|
||||
"icon": "",
|
||||
"redirect": "",
|
||||
"hidden": false,
|
||||
"children":[
|
||||
{
|
||||
"id": 4433321212532,
|
||||
"pid":443323235133,
|
||||
"module": 25,
|
||||
"title": "导出",
|
||||
"name": "foundationSetMaterialBtnExport",
|
||||
"path": "",
|
||||
"component": "foundationSetMaterialBtnExport",
|
||||
"icon": "",
|
||||
"redirect": "",
|
||||
"sort": 1,
|
||||
"type": 0,
|
||||
"hidden": true,
|
||||
"closed": false,
|
||||
"disable": false,
|
||||
"children": [],
|
||||
"meta": {
|
||||
"title": "导出",
|
||||
"icon": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 4433321212533,
|
||||
"pid":443323235133,
|
||||
"module": 25,
|
||||
"title": "刷新",
|
||||
"name": "foundationSetMaterialBtnRefresh",
|
||||
"path": "",
|
||||
"component": "foundationSetMaterialBtnRefresh",
|
||||
"icon": "",
|
||||
"redirect": "",
|
||||
"sort": 1,
|
||||
"type": 0,
|
||||
"hidden": true,
|
||||
"closed": false,
|
||||
"disable": false,
|
||||
"children": [],
|
||||
"meta": {
|
||||
"title": "刷新",
|
||||
"icon": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"title": "物料列表",
|
||||
"icon": "icon-shouhuoruku"
|
||||
}
|
||||
}
|
||||
]
|
||||
},{
|
||||
"id": 7711669,
|
||||
"name": "foundationSubscribe",
|
||||
"type":1,
|
||||
"pid":77123114,
|
||||
"path": "/foundation/subscribe",
|
||||
"component": "/foundation/subscribe",
|
||||
"icon": "",
|
||||
"redirect": "",
|
||||
"hidden": false,
|
||||
"meta": {
|
||||
"title": "订阅设置",
|
||||
"icon": "icon-shouhuoruku"
|
||||
},
|
||||
"children":[
|
||||
{
|
||||
"id": 77116691,
|
||||
"name": "foundationSubscribeList",
|
||||
"type":1,
|
||||
"pid":7711669,
|
||||
"path": "/foundation/subscribe/list/index",
|
||||
"component": "/foundation/subscribe/list/index",
|
||||
"icon": "",
|
||||
"redirect": "",
|
||||
"hidden": false,
|
||||
"meta": {
|
||||
"title": "订阅列表",
|
||||
"icon": "icon-shouhuoruku"
|
||||
},
|
||||
"children":[
|
||||
{
|
||||
"id": 4433522223,
|
||||
"pid":77116691,
|
||||
"module": 254,
|
||||
"title": "新增",
|
||||
"name": "foundationSubscribeListBtnAdd",
|
||||
"path": "",
|
||||
"component": "foundationSubscribeListBtnAdd",
|
||||
"icon": "",
|
||||
"redirect": "",
|
||||
"sort": 1,
|
||||
"type": 0,
|
||||
"hidden": true,
|
||||
"closed": false,
|
||||
"disable": false,
|
||||
"children": [],
|
||||
"meta": {
|
||||
"title": "新增",
|
||||
"icon": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 443352222,
|
||||
"pid":77116691,
|
||||
"module": 25,
|
||||
"title": "删除",
|
||||
"name": "foundationSubscribeListBtnDel",
|
||||
"path": "",
|
||||
"component": "foundationSubscribeListBtnDel",
|
||||
"icon": "",
|
||||
"redirect": "",
|
||||
"sort": 1,
|
||||
"type": 0,
|
||||
"hidden": true,
|
||||
"closed": false,
|
||||
"disable": false,
|
||||
"children": [],
|
||||
"meta": {
|
||||
"title": "删除",
|
||||
"icon": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 771166911,
|
||||
"name": "foundationSubscribeListAdd",
|
||||
"type":1,
|
||||
"pid":7711669,
|
||||
"path": "/foundation/subscribe/list/add",
|
||||
"component": "/foundation/subscribe/list/add",
|
||||
"icon": "",
|
||||
"redirect": "",
|
||||
"hidden": true,
|
||||
"meta": {
|
||||
"title": "新增订阅",
|
||||
"icon": "icon-shouhuoruku"
|
||||
},
|
||||
"children":[]
|
||||
},
|
||||
{
|
||||
"id": 7711669111,
|
||||
"name": "foundationSubscribeListDetails",
|
||||
"type":1,
|
||||
"pid":7711669,
|
||||
"path": "/foundation/subscribe/list/details",
|
||||
"component": "/foundation/subscribe/list/details",
|
||||
"icon": "",
|
||||
"redirect": "",
|
||||
"hidden": true,
|
||||
"meta": {
|
||||
"title": "订阅详情",
|
||||
"icon": "icon-shouhuoruku"
|
||||
},
|
||||
"children":[]
|
||||
},
|
||||
{
|
||||
"id": 77116691111,
|
||||
"name": "foundationSubscribeWarehousing",
|
||||
"type":1,
|
||||
"pid":7711669,
|
||||
"path": "/foundation/subscribe/warehousing/index",
|
||||
"component": "/foundation/subscribe/warehousing/index",
|
||||
"icon": "",
|
||||
"redirect": "",
|
||||
"hidden": false,
|
||||
"meta": {
|
||||
"title": "入库单列表",
|
||||
"icon": "icon-shouhuoruku"
|
||||
},
|
||||
"children":[
|
||||
{
|
||||
"id": 44333212125323,
|
||||
"pid":77116691111,
|
||||
"module": 25,
|
||||
"title": "导出",
|
||||
"name": "foundationSubscribeWarehousingBtnExport",
|
||||
"path": "",
|
||||
"component": "foundationSubscribeWarehousingBtnExport",
|
||||
"icon": "",
|
||||
"redirect": "",
|
||||
"sort": 1,
|
||||
"type": 0,
|
||||
"hidden": true,
|
||||
"closed": false,
|
||||
"disable": false,
|
||||
"children": [],
|
||||
"meta": {
|
||||
"title": "导出",
|
||||
"icon": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 443332121253355,
|
||||
"pid":77116691111,
|
||||
"module": 25,
|
||||
"title": "刷新",
|
||||
"name": "foundationSubscribeWarehousingBtnRefresh",
|
||||
"path": "",
|
||||
"component": "foundationSubscribeWarehousingBtnRefresh",
|
||||
"icon": "",
|
||||
"redirect": "",
|
||||
"sort": 1,
|
||||
"type": 0,
|
||||
"hidden": true,
|
||||
"closed": false,
|
||||
"disable": false,
|
||||
"children": [],
|
||||
"meta": {
|
||||
"title": "刷新",
|
||||
"icon": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"msg": "成功"
|
||||
}
|
||||
1782
src/assets/json/authMenuList3.json
Normal file
70
src/auto-import.d.ts
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-auto-import
|
||||
export {}
|
||||
declare global {
|
||||
const EffectScope: typeof import("vue")["EffectScope"];
|
||||
const ElMessageBox: typeof import("element-plus/es")["ElMessageBox"];
|
||||
const computed: typeof import("vue")["computed"];
|
||||
const createApp: typeof import("vue")["createApp"];
|
||||
const customRef: typeof import("vue")["customRef"];
|
||||
const defineAsyncComponent: typeof import("vue")["defineAsyncComponent"];
|
||||
const defineComponent: typeof import("vue")["defineComponent"];
|
||||
const effectScope: typeof import("vue")["effectScope"];
|
||||
const getCurrentInstance: typeof import("vue")["getCurrentInstance"];
|
||||
const getCurrentScope: typeof import("vue")["getCurrentScope"];
|
||||
const h: typeof import("vue")["h"];
|
||||
const inject: typeof import("vue")["inject"];
|
||||
const isProxy: typeof import("vue")["isProxy"];
|
||||
const isReactive: typeof import("vue")["isReactive"];
|
||||
const isReadonly: typeof import("vue")["isReadonly"];
|
||||
const isRef: typeof import("vue")["isRef"];
|
||||
const markRaw: typeof import("vue")["markRaw"];
|
||||
const nextTick: typeof import("vue")["nextTick"];
|
||||
const onActivated: typeof import("vue")["onActivated"];
|
||||
const onBeforeMount: typeof import("vue")["onBeforeMount"];
|
||||
const onBeforeRouteLeave: typeof import("vue-router")["onBeforeRouteLeave"];
|
||||
const onBeforeRouteUpdate: typeof import("vue-router")["onBeforeRouteUpdate"];
|
||||
const onBeforeUnmount: typeof import("vue")["onBeforeUnmount"];
|
||||
const onBeforeUpdate: typeof import("vue")["onBeforeUpdate"];
|
||||
const onDeactivated: typeof import("vue")["onDeactivated"];
|
||||
const onErrorCaptured: typeof import("vue")["onErrorCaptured"];
|
||||
const onMounted: typeof import("vue")["onMounted"];
|
||||
const onRenderTracked: typeof import("vue")["onRenderTracked"];
|
||||
const onRenderTriggered: typeof import("vue")["onRenderTriggered"];
|
||||
const onScopeDispose: typeof import("vue")["onScopeDispose"];
|
||||
const onServerPrefetch: typeof import("vue")["onServerPrefetch"];
|
||||
const onUnmounted: typeof import("vue")["onUnmounted"];
|
||||
const onUpdated: typeof import("vue")["onUpdated"];
|
||||
const provide: typeof import("vue")["provide"];
|
||||
const reactive: typeof import("vue")["reactive"];
|
||||
const readonly: typeof import("vue")["readonly"];
|
||||
const ref: typeof import("vue")["ref"];
|
||||
const resolveComponent: typeof import("vue")["resolveComponent"];
|
||||
const shallowReactive: typeof import("vue")["shallowReactive"];
|
||||
const shallowReadonly: typeof import("vue")["shallowReadonly"];
|
||||
const shallowRef: typeof import("vue")["shallowRef"];
|
||||
const toRaw: typeof import("vue")["toRaw"];
|
||||
const toRef: typeof import("vue")["toRef"];
|
||||
const toRefs: typeof import("vue")["toRefs"];
|
||||
const toValue: typeof import("vue")["toValue"];
|
||||
const triggerRef: typeof import("vue")["triggerRef"];
|
||||
const unref: typeof import("vue")["unref"];
|
||||
const useAttrs: typeof import("vue")["useAttrs"];
|
||||
const useCssModule: typeof import("vue")["useCssModule"];
|
||||
const useCssVars: typeof import("vue")["useCssVars"];
|
||||
const useLink: typeof import("vue-router")["useLink"];
|
||||
const useRoute: typeof import("vue-router")["useRoute"];
|
||||
const useRouter: typeof import("vue-router")["useRouter"];
|
||||
const useSlots: typeof import("vue")["useSlots"];
|
||||
const watch: typeof import("vue")["watch"];
|
||||
const watchEffect: typeof import("vue")["watchEffect"];
|
||||
const watchPostEffect: typeof import("vue")["watchPostEffect"];
|
||||
const watchSyncEffect: typeof import("vue")["watchSyncEffect"];
|
||||
}
|
||||
// for type re-export
|
||||
declare global {
|
||||
// @ts-ignore
|
||||
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from "vue";
|
||||
}
|
||||
55
src/components.d.ts
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
export {}
|
||||
|
||||
declare module "vue" {
|
||||
export interface GlobalComponents {
|
||||
ElAside: typeof import("element-plus/es")["ElAside"];
|
||||
ElAutocomplete: typeof import("element-plus/es")["ElAutocomplete"];
|
||||
ElBreadcrumb: typeof import("element-plus/es")["ElBreadcrumb"];
|
||||
ElBreadcrumbItem: typeof import("element-plus/es")["ElBreadcrumbItem"];
|
||||
ElButton: typeof import("element-plus/es")["ElButton"];
|
||||
ElCheckbox: typeof import("element-plus/es")["ElCheckbox"];
|
||||
ElContainer: typeof import("element-plus/es")["ElContainer"];
|
||||
ElDatePicker: typeof import("element-plus/es")["ElDatePicker"];
|
||||
ElDialog: typeof import("element-plus/es")["ElDialog"];
|
||||
ElDrawer: typeof import("element-plus/es")["ElDrawer"];
|
||||
ElDropdown: typeof import("element-plus/es")["ElDropdown"];
|
||||
ElDropdownItem: typeof import("element-plus/es")["ElDropdownItem"];
|
||||
ElDropdownMenu: typeof import("element-plus/es")["ElDropdownMenu"];
|
||||
ElForm: typeof import("element-plus/es")["ElForm"];
|
||||
ElFormItem: typeof import("element-plus/es")["ElFormItem"];
|
||||
ElHeader: typeof import("element-plus/es")["ElHeader"];
|
||||
ElIcon: typeof import("element-plus/es")["ElIcon"];
|
||||
ElInput: typeof import("element-plus/es")["ElInput"];
|
||||
ElInputNumber: typeof import("element-plus/es")["ElInputNumber"];
|
||||
ElMain: typeof import("element-plus/es")["ElMain"];
|
||||
ElMenu: typeof import("element-plus/es")["ElMenu"];
|
||||
ElMenuItem: typeof import("element-plus/es")["ElMenuItem"];
|
||||
ElOption: typeof import("element-plus/es")["ElOption"];
|
||||
ElPagination: typeof import("element-plus/es")["ElPagination"];
|
||||
ElScrollbar: typeof import("element-plus/es")["ElScrollbar"];
|
||||
ElSelect: typeof import("element-plus/es")["ElSelect"];
|
||||
ElSubMenu: typeof import("element-plus/es")["ElSubMenu"];
|
||||
ElSwitch: typeof import("element-plus/es")["ElSwitch"];
|
||||
ElTable: typeof import("element-plus/es")["ElTable"];
|
||||
ElTableColumn: typeof import("element-plus/es")["ElTableColumn"];
|
||||
ElTabPane: typeof import("element-plus/es")["ElTabPane"];
|
||||
ElTabs: typeof import("element-plus/es")["ElTabs"];
|
||||
ElTag: typeof import("element-plus/es")["ElTag"];
|
||||
ElTooltip: typeof import("element-plus/es")["ElTooltip"];
|
||||
IEpArrowDown: typeof import("~icons/ep/arrow-down")["default"];
|
||||
IEpCircleClose: typeof import("~icons/ep/circle-close")["default"];
|
||||
IEpFolderDelete: typeof import("~icons/ep/folder-delete")["default"];
|
||||
IEpFullScreen: typeof import("~icons/ep/full-screen")["default"];
|
||||
IEpRefresh: typeof import("~icons/ep/refresh")["default"];
|
||||
IEpRemove: typeof import("~icons/ep/remove")["default"];
|
||||
IEpSearch: typeof import("~icons/ep/search")["default"];
|
||||
IEpSwitchButton: typeof import("~icons/ep/switch-button")["default"];
|
||||
RouterLink: typeof import("vue-router")["RouterLink"];
|
||||
RouterView: typeof import("vue-router")["RouterView"];
|
||||
}
|
||||
}
|
||||
373
src/components/DetailsSearch/index.vue
Normal file
@@ -0,0 +1,373 @@
|
||||
<template>
|
||||
<div class="search-box1" ref="searchRef">
|
||||
<el-form
|
||||
ref="ruleFormRef"
|
||||
:model="_searchResult"
|
||||
:inline="props.inline ? false : true"
|
||||
class="form-box"
|
||||
:show-message="false"
|
||||
style="height: 100%; font-size: 14px"
|
||||
>
|
||||
<template v-for="item in formData" :key="item.prop">
|
||||
<el-form-item
|
||||
:label="item.label"
|
||||
:prop="item.prop"
|
||||
:label-width="labelWidth || '81px'"
|
||||
:rules="item.rules"
|
||||
:error="item.error"
|
||||
:show-message="item.showMessage ? item.showMessage : false"
|
||||
:inline-message="item.inlineMessage"
|
||||
:style="item.style ? item.style : 'margin-right:8px;position: relative;'"
|
||||
:required="item.required"
|
||||
:class="item.class ? item.class : 'form-item'"
|
||||
>
|
||||
<template v-if="item.type === 'input'">
|
||||
<el-input
|
||||
v-model.trim="_searchResult[`${item.prop}`]"
|
||||
:placeholder="item.placeholder"
|
||||
:disabled="item.disabled"
|
||||
:maxlength="item.maxLength ? item.maxLength : 255"
|
||||
@input="valueVerify(item)"
|
||||
>
|
||||
</el-input>
|
||||
</template>
|
||||
<template v-if="item.type === 'inputs'">
|
||||
<el-input
|
||||
v-model.trim="_searchResult[`${item.startProp}`]"
|
||||
:placeholder="item.startPlaceholder"
|
||||
:disabled="item.startDisabled"
|
||||
maxlength="255"
|
||||
style="width: 144px !important"
|
||||
@input="valueVerifyInputs(item)"
|
||||
/>
|
||||
<span style="margin: 0 3px">-</span>
|
||||
<el-input
|
||||
v-model.trim="_searchResult[`${item.endProp}`]"
|
||||
:placeholder="item.endPlaceholder"
|
||||
:disabled="item.endDisabled"
|
||||
maxlength="255"
|
||||
style="width: 144px !important"
|
||||
@input="valueVerifyInputs(item)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template v-if="item.type === 'select'">
|
||||
<el-select
|
||||
v-model="_searchResult[`${item.prop}`]"
|
||||
:placeholder="item.placeholder"
|
||||
clearable
|
||||
:disabled="item.disabled"
|
||||
>
|
||||
<el-option
|
||||
v-for="options in item.options"
|
||||
:label="options.label"
|
||||
:value="options.value"
|
||||
:key="options.label"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
|
||||
<template v-if="item.type === 'date'">
|
||||
<el-date-picker
|
||||
:disabled="item.disabled"
|
||||
v-model="_searchResult[`${item.prop}`]"
|
||||
:type="item.type"
|
||||
:placeholder="item.placeholder"
|
||||
format="YYYY-MM-DD"
|
||||
:style="item.style"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</template>
|
||||
<template v-if="item.type === 'selectRemote' || item.type === 'selectRemoteUser'">
|
||||
<el-select
|
||||
v-model="_searchResult[`${item.prop}`]"
|
||||
:placeholder="item.placeholder"
|
||||
clearable
|
||||
remote
|
||||
reserve-keyword
|
||||
filterable
|
||||
ref="slectRef1"
|
||||
class="m-2 select"
|
||||
remote-show-suffix
|
||||
:remote-method="
|
||||
(query:any) => {
|
||||
remoteMethod(
|
||||
query,
|
||||
item
|
||||
);
|
||||
}
|
||||
"
|
||||
:disabled="item.disabled"
|
||||
>
|
||||
<el-option
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
v-for="option in item.options"
|
||||
:key="option.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
<!-- 多选带模糊搜索 -->
|
||||
<template v-if="item.type === 'selectMultiple'">
|
||||
<el-select
|
||||
v-model="_searchResult[`${item.prop}`]"
|
||||
multiple
|
||||
filterable
|
||||
@remove-tag="handleRomoveTag(item)"
|
||||
:disabled="item.disabled"
|
||||
:placeholder="item.placeholder"
|
||||
>
|
||||
<!-- 循环渲染选项:label 为显示文本,value 为实际提交值 -->
|
||||
<el-option
|
||||
v-for="option in item.options"
|
||||
:key="option.value"
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template
|
||||
v-if="item.type === 'selectMultipleRemoteCustomersNames' || item.type === 'selectProductLinesRemote'"
|
||||
>
|
||||
<el-select
|
||||
v-model="_searchResult[`${item.prop}`]"
|
||||
:placeholder="item.placeholder"
|
||||
remote
|
||||
multiple
|
||||
filterable
|
||||
class="m-2 select"
|
||||
remote-show-suffix
|
||||
@clear="handleSelectClear(item.prop)"
|
||||
:remote-method="(query:any)=> handleSelectMultipleRemote(query, item)"
|
||||
:disabled="item.disabled"
|
||||
>
|
||||
<el-option
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
v-for="option in item.options"
|
||||
:key="option.label"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="Search">
|
||||
import { ref } from "vue";
|
||||
import { FormInstance } from "element-plus";
|
||||
import { getCustomersApi, getUsersApi, getProductLinesApi } from "@/api/modules/global";
|
||||
import { integerRexg, numberDecimalSeparatorRexg } from "@/utils/regexp/index";
|
||||
const ruleFormRef = ref<FormInstance>();
|
||||
const props = defineProps<{
|
||||
formData: any[];
|
||||
labelWidth?: string;
|
||||
ruleForm: Record<string, any>;
|
||||
style?: string;
|
||||
inline?: Boolean;
|
||||
getSearchValue?: () => void;
|
||||
selectMultipleRemoveTag?: () => void;
|
||||
setRuleFormValue?: () => void;
|
||||
}>();
|
||||
|
||||
let _searchResult = computed(() => {
|
||||
return props.ruleForm;
|
||||
});
|
||||
|
||||
const emits = defineEmits<{
|
||||
(e: "getSearchValue", result: Record<string, any>): void;
|
||||
(e: "setMaterialList", result: Record<string, any>): void;
|
||||
(e: "setRuleFormValue", result: Record<string, any>): void;
|
||||
(e: "selectMultipleRemoveTag", result: Record<string, any>): void;
|
||||
}>();
|
||||
|
||||
const handleRomoveTag = (item: any) => {
|
||||
emits("selectMultipleRemoveTag", { item, org_number: _searchResult.value.org_number });
|
||||
};
|
||||
|
||||
//客戶
|
||||
const getCustomers = async (keywords: any, item: any) => {
|
||||
let org_number = _searchResult.value.org_number.join(",");
|
||||
const result: any = await getCustomersApi({ keywords, org_number });
|
||||
if (result?.code === 0) {
|
||||
const { data } = result;
|
||||
if (Array.isArray(data) && data.length) {
|
||||
let options: any = [];
|
||||
data.forEach((item: any) => {
|
||||
options.push({
|
||||
value: item.customer_number,
|
||||
label: item.customer_name
|
||||
});
|
||||
});
|
||||
item.options = options;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//品线
|
||||
const getProductLines = async (keywords: any, item: any) => {
|
||||
const result: any = await getProductLinesApi({ keywords });
|
||||
if (result?.code === 0) {
|
||||
const { data } = result;
|
||||
if (Array.isArray(data) && data.length) {
|
||||
let options: any = [];
|
||||
data.forEach((item: any) => {
|
||||
options.push({
|
||||
value: item,
|
||||
label: item
|
||||
});
|
||||
});
|
||||
item.options = options;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//订阅账号
|
||||
const getUsers = async (keywords: any, item: any) => {
|
||||
const result: any = await getUsersApi({ keywords });
|
||||
if (result?.code === 0) {
|
||||
const { data } = result;
|
||||
if (Array.isArray(data) && data.length) {
|
||||
let options: any = [];
|
||||
data.forEach((item: any) => {
|
||||
options.push({
|
||||
value: item.dduid,
|
||||
label: item.realname
|
||||
});
|
||||
});
|
||||
item.options = options;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//远程搜索多选
|
||||
const handleSelectMultipleRemote = (query: any, item: any) => {
|
||||
if (!query) {
|
||||
return;
|
||||
}
|
||||
let valClone = query.replace(/^\s*|\s*$/g, "");
|
||||
if (!valClone) {
|
||||
return;
|
||||
}
|
||||
//客户
|
||||
if (item.type === "selectMultipleRemoteCustomersNames") {
|
||||
getCustomers(valClone, item);
|
||||
}
|
||||
if (item.type === "selectProductLinesRemote") {
|
||||
getProductLines(valClone, item);
|
||||
}
|
||||
};
|
||||
const remoteMethod = async (query: any, item: any) => {
|
||||
if (!query) {
|
||||
return;
|
||||
}
|
||||
let valClone = query.replace(/^\s*|\s*$/g, "");
|
||||
if (!valClone) {
|
||||
return;
|
||||
}
|
||||
if (item.type === "selectRemoteUser") {
|
||||
getUsers(valClone, item);
|
||||
}
|
||||
};
|
||||
const handleSelectClear = (prop: any) => {
|
||||
console.log("会触发吗?", prop);
|
||||
};
|
||||
//input输入验证
|
||||
const valueVerify = (item: any) => {
|
||||
//只能输入整数
|
||||
if (item.reg === "integerRexg") {
|
||||
let value = integerRexg(_searchResult.value[item.prop]);
|
||||
_searchResult.value[item.prop] = value;
|
||||
}
|
||||
if (item.reg === "numberDecimalSeparatorRexg") {
|
||||
let value = numberDecimalSeparatorRexg(_searchResult.value[item.prop]);
|
||||
_searchResult.value[item.prop] = value;
|
||||
}
|
||||
emits("getSearchValue", {
|
||||
val: _searchResult.value,
|
||||
prop: item.prop
|
||||
});
|
||||
};
|
||||
|
||||
const valueVerifyInputs = (item: any) => {
|
||||
//只能输入整数
|
||||
if (item.reg === "integerRexg") {
|
||||
let value = integerRexg(_searchResult.value[item.startProp]);
|
||||
_searchResult.value[item.startProp] = value;
|
||||
}
|
||||
|
||||
emits("getSearchValue", {
|
||||
val: _searchResult.value,
|
||||
prop: item.prop
|
||||
});
|
||||
};
|
||||
// const handleSelectMultipleClear = (item: any) => {
|
||||
// console.log(item, "===========>");
|
||||
// };
|
||||
</script>
|
||||
<style lang="scss" scope>
|
||||
.search-box1 {
|
||||
position: relative;
|
||||
display: flex;
|
||||
min-width: 1280px;
|
||||
padding: 16px;
|
||||
background: #ffffff;
|
||||
border-radius: 6px;
|
||||
|
||||
// 单据头用的样式
|
||||
.form-box {
|
||||
// width: 85%;
|
||||
.form-item {
|
||||
width: 392px !important;
|
||||
|
||||
// height: 32px;
|
||||
// 原代码有 height: 32px !important; 这会导致子元素高度超出后被遮盖
|
||||
height: auto !important; // 改为自动高度
|
||||
min-height: 32px; // 保留最小高度,未选择时对齐
|
||||
margin-bottom: 8px !important;
|
||||
.el-form-item__label {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
.el-select {
|
||||
width: 392px;
|
||||
}
|
||||
.el-form-item--default {
|
||||
width: 392px;
|
||||
}
|
||||
}
|
||||
.form-item1 {
|
||||
width: 594px !important;
|
||||
|
||||
// height: 32px;
|
||||
// 原代码有 height: 32px !important; 这会导致子元素高度超出后被遮盖
|
||||
height: auto !important; // 改为自动高度
|
||||
min-height: 32px; // 保留最小高度,未选择时对齐
|
||||
margin-bottom: 8px !important;
|
||||
.el-form-item__label {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
.el-select {
|
||||
width: 594px;
|
||||
}
|
||||
.el-form-item--default {
|
||||
width: 594px;
|
||||
}
|
||||
}
|
||||
.form-item2 {
|
||||
width: 494px !important;
|
||||
}
|
||||
|
||||
margin-bottom: 8px !important;
|
||||
}
|
||||
}
|
||||
.el-form-item--default .el-form-item__label {
|
||||
height: 32px;
|
||||
margin-bottom: 8px;
|
||||
|
||||
// font-size: 12px;
|
||||
line-height: 32px;
|
||||
color: rgb(92 92 92 / 100%);
|
||||
}
|
||||
</style>
|
||||
58
src/components/DetailsSearch/interface/index.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
export interface formDataIProps {
|
||||
reg?: any;
|
||||
prop?: string;
|
||||
label?: string;
|
||||
isShow?: boolean;
|
||||
maxLength?: any;
|
||||
value?: any; //默认值
|
||||
bomList?: any;
|
||||
placeholder?: string;
|
||||
labelWidth?: string;
|
||||
class?: string;
|
||||
urlType?: string;
|
||||
rules?: any;
|
||||
error?: string;
|
||||
showMessage?: boolean;
|
||||
inlineMessage?: boolean;
|
||||
size?: string;
|
||||
style?: string;
|
||||
autosize?: any;
|
||||
inputWidth?: string;
|
||||
brIndex?: number;
|
||||
endDisabled?: any;
|
||||
endProp?: any;
|
||||
optionProps?: any;
|
||||
startDisabled?: any;
|
||||
startProp?: any;
|
||||
rgx?: any;
|
||||
isTxt?: any;
|
||||
type:
|
||||
| "input"
|
||||
| "textarea"
|
||||
| "select"
|
||||
| "datetimepicker"
|
||||
| "date"
|
||||
| "daterange"
|
||||
| "radio"
|
||||
| "checked"
|
||||
| "cascader"
|
||||
| "selectRemote"
|
||||
| "selectRemote1"
|
||||
| "selectRemote2"
|
||||
| "selectRemote3"
|
||||
| "inputs"
|
||||
| "selectMultiple"
|
||||
| "customCondition";
|
||||
options?: any;
|
||||
startPlaceholder?: string;
|
||||
endPlaceholder?: string;
|
||||
defaultTime?: any;
|
||||
radios?: any;
|
||||
checkeds?: any;
|
||||
isCopy?: boolean;
|
||||
required?: boolean;
|
||||
disabled?: boolean;
|
||||
formClass?: string;
|
||||
isNumber?: boolean;
|
||||
ruleForm?: any;
|
||||
}
|
||||
20
src/components/ErrorMessage/403.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div class="not-container">
|
||||
<img src="@/assets/images/403.png" class="not-img" alt="403" />
|
||||
<div class="not-detail">
|
||||
<h2>403</h2>
|
||||
<h4>抱歉,您无权访问该页面~🙅♂️🙅♀️</h4>
|
||||
<el-button type="primary" @click="router.push(HOME_URL)"> 返回首页 </el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="403">
|
||||
import { HOME_URL } from "@/config";
|
||||
import { useRouter } from "vue-router";
|
||||
const router = useRouter();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
</style>
|
||||
20
src/components/ErrorMessage/404.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div class="not-container">
|
||||
<img src="@/assets/images/404.png" class="not-img" alt="404" />
|
||||
<div class="not-detail">
|
||||
<h2>404</h2>
|
||||
<h4>抱歉,您访问的页面不存在~🤷♂️🤷♀️</h4>
|
||||
<el-button type="primary" @click="router.push(HOME_URL)"> 返回首页 </el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="404">
|
||||
import { HOME_URL } from "@/config";
|
||||
import { useRouter } from "vue-router";
|
||||
const router = useRouter();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
</style>
|
||||
20
src/components/ErrorMessage/500.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div class="not-container">
|
||||
<img src="@/assets/images/500.png" class="not-img" alt="500" />
|
||||
<div class="not-detail">
|
||||
<h2>500</h2>
|
||||
<h4>抱歉,您的网络不见了~🤦♂️🤦♀️</h4>
|
||||
<el-button type="primary" @click="router.push(HOME_URL)"> 返回首页 </el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="500">
|
||||
import { HOME_URL } from "@/config";
|
||||
import { useRouter } from "vue-router";
|
||||
const router = useRouter();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
</style>
|
||||
32
src/components/ErrorMessage/index.scss
Normal file
@@ -0,0 +1,32 @@
|
||||
.not-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.not-img {
|
||||
margin-right: 120px;
|
||||
}
|
||||
.not-detail {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
h2,
|
||||
h4 {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
h2 {
|
||||
font-size: 60px;
|
||||
color: var(--el-text-color-primary);
|
||||
}
|
||||
h4 {
|
||||
margin: 30px 0 20px;
|
||||
font-size: 19px;
|
||||
font-weight: normal;
|
||||
color: var(--el-text-color-regular);
|
||||
}
|
||||
.el-button {
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
123
src/components/Form/components/FormItem.vue
Normal file
@@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<div class="card content-box">
|
||||
<el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="140px">
|
||||
<el-form-item label="Activity name" prop="name">
|
||||
<el-input v-model="ruleForm.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Activity phone" prop="phone">
|
||||
<el-input v-model="ruleForm.phone" placeholder="Activity phone" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Activity zone" prop="region">
|
||||
<el-select v-model="ruleForm.region" placeholder="Activity zone">
|
||||
<el-option label="Zone one" value="shanghai" />
|
||||
<el-option label="Zone two" value="beijing" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="Activity time" required>
|
||||
<el-form-item prop="date1">
|
||||
<el-date-picker v-model="ruleForm.date1" type="date" placeholder="Pick a date" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<el-col class="text-center" :span="1">
|
||||
<span class="text-gray-500">-</span>
|
||||
</el-col>
|
||||
<el-form-item prop="date2">
|
||||
<el-time-picker v-model="ruleForm.date2" placeholder="Pick a time" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<el-form-item label="Instant delivery" prop="delivery">
|
||||
<el-switch v-model="ruleForm.delivery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Resources" prop="resource">
|
||||
<el-radio-group v-model="ruleForm.resource">
|
||||
<el-radio label="Sponsorship" />
|
||||
<el-radio label="Venue" />
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="Activity form" prop="desc">
|
||||
<el-input v-model="ruleForm.desc" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm(ruleFormRef)"> Create </el-button>
|
||||
<el-button @click="resetForm(ruleFormRef)"> Reset </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="dynamicForm">
|
||||
import { reactive, ref } from "vue";
|
||||
import { checkPhoneNumber } from "@/utils/eleValidate";
|
||||
import type { FormInstance, FormRules } from "element-plus";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
const ruleFormRef = ref<FormInstance>();
|
||||
const ruleForm = reactive({
|
||||
name: "",
|
||||
phone: "",
|
||||
region: "",
|
||||
date1: "",
|
||||
date2: "",
|
||||
delivery: false,
|
||||
resource: "",
|
||||
desc: ""
|
||||
});
|
||||
|
||||
const rules = reactive<FormRules>({
|
||||
name: [
|
||||
{ required: true, message: "Please input Activity name", trigger: "blur" },
|
||||
{ min: 3, max: 5, message: "Length should be 3 to 5", trigger: "blur" }
|
||||
],
|
||||
phone: [{ required: true, validator: checkPhoneNumber, trigger: "blur" }],
|
||||
region: [
|
||||
{
|
||||
required: true,
|
||||
message: "Please select Activity zone",
|
||||
trigger: "change"
|
||||
}
|
||||
],
|
||||
date1: [
|
||||
{
|
||||
type: "date",
|
||||
required: true,
|
||||
message: "Please pick a date",
|
||||
trigger: "change"
|
||||
}
|
||||
],
|
||||
date2: [
|
||||
{
|
||||
type: "date",
|
||||
required: true,
|
||||
message: "Please pick a time",
|
||||
trigger: "change"
|
||||
}
|
||||
],
|
||||
resource: [
|
||||
{
|
||||
required: true,
|
||||
message: "Please select activity resource",
|
||||
trigger: "change"
|
||||
}
|
||||
],
|
||||
desc: [{ required: true, message: "Please input activity form", trigger: "blur" }]
|
||||
});
|
||||
|
||||
const submitForm = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return;
|
||||
await formEl.validate((valid, fields) => {
|
||||
if (valid) {
|
||||
ElMessage.success("提交的数据为 : " + JSON.stringify(ruleForm));
|
||||
} else {
|
||||
console.log("error submit!", fields);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const resetForm = (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return;
|
||||
formEl.resetFields();
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
</style>
|
||||
87
src/components/Form/index.vue
Normal file
@@ -0,0 +1,87 @@
|
||||
<template>
|
||||
<div class="card content-box">
|
||||
<el-form :model="_ruleForm" :rules="_rules" label-width="140px" ref="ruleFormRef">
|
||||
<template v-for="item in formData" :key="item.prop">
|
||||
<el-form-item :label="item.label" :prop="item.prop" :limit="1">
|
||||
<template v-if="item.type === 'uploadImgs'">
|
||||
<UploadImgs
|
||||
v-model:file-list="_ruleForm[`${item.prop}`]"
|
||||
height="140px"
|
||||
width="140px"
|
||||
border-radius="50%"
|
||||
>
|
||||
<template #empty>
|
||||
<el-icon><Picture /></el-icon>
|
||||
<span>请上传图片</span>
|
||||
</template>
|
||||
<template #tip> 图片大小不能超过 5M </template>
|
||||
</UploadImgs>
|
||||
</template>
|
||||
|
||||
<template v-if="item.type === 'input'">
|
||||
<el-input :placeholder="item.placeholder" v-model.trim="_ruleForm[`${item.prop}`]" />
|
||||
</template>
|
||||
<template v-if="item.type === 'select'">
|
||||
<el-select
|
||||
v-model="_ruleForm[`${item.prop}`]"
|
||||
:placeholder="item.placeholder"
|
||||
clearable
|
||||
style="width: 224px"
|
||||
>
|
||||
<el-option
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
v-for="option in item.options"
|
||||
:key="option.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<el-form-item style="margin-top: 20px">
|
||||
<el-button type="primary" @click="submitForm(ruleFormRef)"> 提交 </el-button>
|
||||
<el-button @click="resetForm(ruleFormRef)">重置 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { FormInstance, FormRules } from "element-plus";
|
||||
import { ElMessage } from "element-plus";
|
||||
// import UploadImgs from "@/components/Upload/Imgs.vue";
|
||||
interface IProps {
|
||||
ruleForm: { [key: string]: any };
|
||||
formData: any[];
|
||||
rules: FormRules;
|
||||
submitForm: () => void;
|
||||
resetForm: () => void;
|
||||
}
|
||||
const ruleFormRef = ref<FormInstance>();
|
||||
const props = defineProps<IProps>();
|
||||
//将传递过来的值设置为响应式,这样就可以做一些输入的控制,props是单向的
|
||||
const _ruleForm = computed(() => props.ruleForm);
|
||||
// 接收 rules 并设置为响应式,必须要为响应式的,否则失效
|
||||
const _rules = ref(props.rules);
|
||||
//点击按钮验证,如果验证过来,可以将值传递到父组件
|
||||
const submitForm = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return;
|
||||
await formEl.validate((valid, fields) => {
|
||||
if (valid) {
|
||||
ElMessage.success("提交的数据为 : " + JSON.stringify(_ruleForm.value));
|
||||
} else {
|
||||
console.log("error submit!", fields);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const resetForm = (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return;
|
||||
formEl.resetFields();
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
// @import "./index.scss";
|
||||
</style>
|
||||
189
src/components/FormTable/index.vue
Normal file
@@ -0,0 +1,189 @@
|
||||
<template>
|
||||
<div class="detailsTable">
|
||||
<el-table :data="tableData" :border="true" ref="tableRef" :height="height ? height : 340" :row-style="rowStyle">
|
||||
<template v-for="item in columns" :key="item.prop">
|
||||
<el-table-column
|
||||
:prop="item.prop"
|
||||
:fixed="item.fixed"
|
||||
:align="item.align ? item.align : 'center'"
|
||||
:label="item.label"
|
||||
:width="item.width ? item.width : 'auto'"
|
||||
v-show="item.show"
|
||||
:sortable="item.sortable"
|
||||
:showOverflowTooltip="!item.formType"
|
||||
>
|
||||
<template #header v-if="item.isHeaderIcon">
|
||||
<span class="iconfont icon-bianji1 iconfont-mg" style="font-size: 12px">
|
||||
{{ item.label }}
|
||||
</span>
|
||||
<span
|
||||
style="display: inline-block; margin-left: 4px; line-height: 20px; color: #f56c6c"
|
||||
v-if="item.required"
|
||||
>*</span
|
||||
>
|
||||
<el-tooltip effect="dark" :content="item.tooltip" placement="top" v-if="item.tooltip">
|
||||
<el-icon style="cursor: pointer"><QuestionFilled /></el-icon>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
|
||||
<template #default="scope" v-if="item.formType === 'inputNumber'">
|
||||
<el-input-number
|
||||
:min="1"
|
||||
:max="1000"
|
||||
:controls="false"
|
||||
style="width: 125px"
|
||||
v-model.trim="scope.row[item.prop]"
|
||||
:disabled="tableData[scope.$index].disabled"
|
||||
:placeholder="item.placeholder"
|
||||
:maxlength="item.maxLength"
|
||||
step-strictly
|
||||
@keyup.enter="handleEnterInput(item, scope.$index)"
|
||||
></el-input-number>
|
||||
</template>
|
||||
<template #default="scope" v-if="item.formType === 'checkbox'">
|
||||
<el-checkbox v-model="scope.row[item.prop]" @change="handleCheckBox(scope.row, scope.$index)" />
|
||||
</template>
|
||||
<template #default="scope" v-if="item.formType === 'input'">
|
||||
<el-input
|
||||
:style="item.width ? item.width : 'width:125px'"
|
||||
v-model.trim="scope.row[item.prop]"
|
||||
:disabled="tableData[scope.$index].disabled"
|
||||
:placeholder="item.placeholder"
|
||||
:maxlength="item.maxLength"
|
||||
@input="verificationInput(item, scope.$index)"
|
||||
@keyup.enter="handleEnterInput(item, scope.$index)"
|
||||
ref="inputRef"
|
||||
></el-input>
|
||||
</template>
|
||||
<!-- 这个是有远程功能的 -->
|
||||
<template #default="scope" v-if="item.formType === 'selectRemote'">
|
||||
<el-select
|
||||
:placeholder="item.placeholder"
|
||||
filterable
|
||||
remote
|
||||
clearable
|
||||
style="width: 280px"
|
||||
v-model.trim="scope.row[item.prop]"
|
||||
class="m-2 select"
|
||||
:disabled="tableData[scope.$index].disabled"
|
||||
remote-show-suffix
|
||||
:loading="loading"
|
||||
@clear="clear(scope.$index)"
|
||||
:remote-method="(query:any)=>{
|
||||
remoteMethod(query,item.prop,scope.$index)
|
||||
}"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in item.options[scope.$index]"
|
||||
:key="option.materialNumber"
|
||||
:label="option.specifications"
|
||||
:value="option.idConvertBar"
|
||||
@click="handleRemoteClick(item, scope.$index)"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
|
||||
<!-- 最后一列的按钮 这是一个具名插槽 -->
|
||||
<template #default="scope" v-if="item.prop === 'operation'">
|
||||
<slot name="operation" v-bind="scope"></slot>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="FormTable">
|
||||
// import { cloneDeep } from "lodash-es";
|
||||
import { ElTable, ElTableColumn } from "element-plus";
|
||||
import { QuestionFilled } from "@element-plus/icons-vue";
|
||||
const props = defineProps<{
|
||||
columns: any;
|
||||
rowStyle?: (params: any) => void;
|
||||
isStatus?: boolean;
|
||||
tableData?: any;
|
||||
height?: number;
|
||||
getRemoteData?: (params: any) => void;
|
||||
verificationInput?: (params: any) => void;
|
||||
handleKeyupEnterInputValue?: (params: any) => void;
|
||||
handleClear?: (params: any) => void;
|
||||
handleCheckEmit?: (prams: any) => void;
|
||||
loading?: any;
|
||||
}>();
|
||||
|
||||
console.log(props, "=========props===========");
|
||||
const emits = defineEmits<{
|
||||
(e: "getRemoteData", params: any): void;
|
||||
(e: "verificationInput", params: any): void;
|
||||
(e: "handleRemoteClickValue", params: any): void;
|
||||
(e: "handleKeyupEnterInputValue", params: any): void;
|
||||
(e: "handleClear", params: any): void;
|
||||
(e: "handleCheckEmit", params: any): void;
|
||||
}>();
|
||||
//表格实例
|
||||
const tableRef = ref<any>(null);
|
||||
const inputRef = ref<any>(null);
|
||||
const selectRemote1Ref = ref<any>(null);
|
||||
|
||||
//远程搜索
|
||||
const remoteMethod = async (val: any, prop: string, index: number) => {
|
||||
emits("getRemoteData", {
|
||||
val,
|
||||
prop,
|
||||
index
|
||||
});
|
||||
};
|
||||
const handleCheckBox = (row: any, index: number) => {
|
||||
emits("handleCheckEmit", {
|
||||
index
|
||||
});
|
||||
};
|
||||
//表单输入验证函数
|
||||
const verificationInput = (item: any, index: number) => {
|
||||
const { prop } = item;
|
||||
emits("verificationInput", {
|
||||
prop,
|
||||
index
|
||||
});
|
||||
};
|
||||
const handleRemoteClick = (item: any, index: number) => {
|
||||
emits("handleRemoteClickValue", { item, index });
|
||||
};
|
||||
const handleEnterInput = (item: any, index: number) => {
|
||||
console.log("1232323");
|
||||
emits("handleKeyupEnterInputValue", {
|
||||
item,
|
||||
index
|
||||
});
|
||||
};
|
||||
const clear = (index: any) => {
|
||||
emits("handleClear", {
|
||||
index
|
||||
});
|
||||
console.log(index);
|
||||
};
|
||||
// 暴露给父组件的参数和方法(外部需要什么,都可以从这里暴露出去)
|
||||
defineExpose({
|
||||
element: tableRef,
|
||||
inputElement: inputRef,
|
||||
selectRemoteElement: selectRemote1Ref
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep(.table-box .el-table .el-table__header .el-table__cell > .cell) {
|
||||
.cell {
|
||||
display: flex !important;
|
||||
}
|
||||
}
|
||||
::v-deep(.el-table__row td) {
|
||||
div {
|
||||
white-space: wrap;
|
||||
}
|
||||
}
|
||||
::v-deep(.el-table__body-wrapper .el-table__body) {
|
||||
min-height: 51px !important;
|
||||
max-height: 90% !important;
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
</style>
|
||||
68
src/components/Grid/components/GridItem.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<div v-show="isShow" :style="style">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts" name="GridItem">
|
||||
import { computed, inject, Ref, ref, useAttrs, watch } from "vue";
|
||||
import { BreakPoint, Responsive } from "../interface/index";
|
||||
|
||||
type Props = {
|
||||
offset?: number;
|
||||
span?: number;
|
||||
suffix?: boolean;
|
||||
xs?: Responsive;
|
||||
sm?: Responsive;
|
||||
md?: Responsive;
|
||||
lg?: Responsive;
|
||||
xl?: Responsive;
|
||||
};
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
offset: 0,
|
||||
span: 1,
|
||||
suffix: false,
|
||||
xs: undefined,
|
||||
sm: undefined,
|
||||
md: undefined,
|
||||
lg: undefined,
|
||||
xl: undefined
|
||||
});
|
||||
|
||||
const attrs = useAttrs() as { index: string };
|
||||
const isShow = ref(true);
|
||||
|
||||
// 注入断点
|
||||
const breakPoint = inject<Ref<BreakPoint>>("breakPoint", ref("xl"));
|
||||
const shouldHiddenIndex = inject<Ref<number>>("shouldHiddenIndex", ref(-1));
|
||||
watch(
|
||||
() => [shouldHiddenIndex.value, breakPoint.value],
|
||||
n => {
|
||||
if (!!attrs.index) {
|
||||
isShow.value = !(n[0] !== -1 && parseInt(attrs.index) >= Number(n[0]));
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const gap = inject("gap", 0);
|
||||
const cols = inject("cols", ref(4));
|
||||
const style = computed(() => {
|
||||
let span = props[breakPoint.value]?.span ?? props.span;
|
||||
let offset = props[breakPoint.value]?.offset ?? props.offset;
|
||||
if (props.suffix) {
|
||||
return {
|
||||
gridColumnStart: cols.value - span - offset + 1,
|
||||
gridColumnEnd: `span ${span + offset}`,
|
||||
marginLeft: offset !== 0 ? `calc(((100% + ${gap}px) / ${span + offset}) * ${offset})` : "unset"
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
gridColumn: `span ${span + offset > cols.value ? cols.value : span + offset}/span ${
|
||||
span + offset > cols.value ? cols.value : span + offset
|
||||
}`,
|
||||
marginLeft: offset !== 0 ? `calc(((100% + ${gap}px) / ${span + offset}) * ${offset})` : "unset"
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
167
src/components/Grid/index.vue
Normal file
@@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<div :style="style">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="Grid">
|
||||
import {
|
||||
ref,
|
||||
watch,
|
||||
useSlots,
|
||||
computed,
|
||||
provide,
|
||||
onBeforeMount,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
onDeactivated,
|
||||
onActivated,
|
||||
VNodeArrayChildren,
|
||||
VNode
|
||||
} from "vue";
|
||||
import type { BreakPoint } from "./interface/index";
|
||||
|
||||
type Props = {
|
||||
cols?: number | Record<BreakPoint, number>;
|
||||
collapsed?: boolean;
|
||||
collapsedRows?: number;
|
||||
gap?: [number, number] | number;
|
||||
};
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
cols: () => ({ xs: 1, sm: 2, md: 2, lg: 3, xl: 4 }),
|
||||
collapsed: false,
|
||||
collapsedRows: 1,
|
||||
gap: 0
|
||||
});
|
||||
|
||||
onBeforeMount(() => props.collapsed && findIndex());
|
||||
onMounted(() => {
|
||||
resize({ target: { innerWidth: window.innerWidth } } as unknown as UIEvent);
|
||||
window.addEventListener("resize", resize);
|
||||
});
|
||||
onActivated(() => {
|
||||
resize({ target: { innerWidth: window.innerWidth } } as unknown as UIEvent);
|
||||
window.addEventListener("resize", resize);
|
||||
});
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener("resize", resize);
|
||||
});
|
||||
onDeactivated(() => {
|
||||
window.removeEventListener("resize", resize);
|
||||
});
|
||||
|
||||
// 监听屏幕变化
|
||||
const resize = (e: UIEvent) => {
|
||||
let width = (e.target as Window).innerWidth;
|
||||
switch (!!width) {
|
||||
case width < 768:
|
||||
breakPoint.value = "xs";
|
||||
break;
|
||||
case width >= 768 && width < 992:
|
||||
breakPoint.value = "sm";
|
||||
break;
|
||||
case width >= 992 && width < 1200:
|
||||
breakPoint.value = "md";
|
||||
break;
|
||||
case width >= 1200 && width < 1920:
|
||||
breakPoint.value = "lg";
|
||||
break;
|
||||
case width >= 1920:
|
||||
breakPoint.value = "xl";
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
// 注入 gap 间距
|
||||
provide("gap", Array.isArray(props.gap) ? props.gap[0] : props.gap);
|
||||
|
||||
// 注入响应式断点
|
||||
let breakPoint = ref<BreakPoint>("xl");
|
||||
provide("breakPoint", breakPoint);
|
||||
|
||||
// 注入要开始折叠的 index
|
||||
const hiddenIndex = ref(-1);
|
||||
provide("shouldHiddenIndex", hiddenIndex);
|
||||
|
||||
// 注入 cols
|
||||
const gridCols = computed(() => {
|
||||
if (typeof props.cols === "object") return props.cols[breakPoint.value] ?? props.cols;
|
||||
return props.cols;
|
||||
});
|
||||
provide("cols", gridCols);
|
||||
|
||||
// 寻找需要开始折叠的字段 index
|
||||
const slots = useSlots().default!();
|
||||
|
||||
const findIndex = () => {
|
||||
let fields: VNodeArrayChildren = [];
|
||||
let suffix: VNode | null = null;
|
||||
slots.forEach((slot: any) => {
|
||||
// suffix
|
||||
if (typeof slot.type === "object" && slot.type.name === "GridItem" && slot.props?.suffix !== undefined) suffix = slot;
|
||||
// slot children
|
||||
if (typeof slot.type === "symbol" && Array.isArray(slot.children)) fields.push(...slot.children);
|
||||
});
|
||||
|
||||
// 计算 suffix 所占用的列
|
||||
let suffixCols = 0;
|
||||
if (suffix) {
|
||||
suffixCols =
|
||||
((suffix as VNode).props![breakPoint.value]?.span ?? (suffix as VNode).props?.span ?? 1) +
|
||||
((suffix as VNode).props![breakPoint.value]?.offset ?? (suffix as VNode).props?.offset ?? 0);
|
||||
}
|
||||
try {
|
||||
let find = false;
|
||||
fields.reduce((prev = 0, current, index) => {
|
||||
prev +=
|
||||
((current as VNode)!.props![breakPoint.value]?.span ?? (current as VNode)!.props?.span ?? 1) +
|
||||
((current as VNode)!.props![breakPoint.value]?.offset ?? (current as VNode)!.props?.offset ?? 0);
|
||||
if (Number(prev) > props.collapsedRows * gridCols.value - suffixCols) {
|
||||
hiddenIndex.value = index;
|
||||
find = true;
|
||||
throw "find it";
|
||||
}
|
||||
return prev;
|
||||
}, 0);
|
||||
if (!find) hiddenIndex.value = -1;
|
||||
} catch (e) {
|
||||
// console.warn(e);
|
||||
}
|
||||
};
|
||||
|
||||
// 断点变化时 执行 findIndex
|
||||
watch(
|
||||
() => breakPoint.value,
|
||||
() => {
|
||||
if (props.collapsed) findIndex();
|
||||
}
|
||||
);
|
||||
|
||||
// 监听 collapsed
|
||||
watch(
|
||||
() => props.collapsed,
|
||||
value => {
|
||||
if (value) return findIndex();
|
||||
hiddenIndex.value = -1;
|
||||
}
|
||||
);
|
||||
|
||||
// 设置间距
|
||||
const gridGap = computed(() => {
|
||||
if (typeof props.gap === "number") return `${props.gap}px`;
|
||||
if (Array.isArray(props.gap)) return `${props.gap[1]}px ${props.gap[0]}px`;
|
||||
return "unset";
|
||||
});
|
||||
|
||||
// 设置 style
|
||||
const style = computed(() => {
|
||||
return {
|
||||
display: "grid",
|
||||
gridGap: gridGap.value,
|
||||
gridTemplateColumns: `repeat(${gridCols.value}, minmax(0, 1fr))`
|
||||
};
|
||||
});
|
||||
|
||||
defineExpose({ breakPoint });
|
||||
</script>
|
||||
6
src/components/Grid/interface/index.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export type BreakPoint = "xs" | "sm" | "md" | "lg" | "xl";
|
||||
|
||||
export type Responsive = {
|
||||
span?: number;
|
||||
offset?: number;
|
||||
};
|
||||
3
src/components/ImportExcel/index.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
.upload {
|
||||
width: 80%;
|
||||
}
|
||||
151
src/components/ImportExcel/index.vue
Normal file
@@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" :title="`批量添加${parameter.title}`" :destroy-on-close="true" width="580px" draggable>
|
||||
<el-form class="drawer-multiColumn-form" label-width="100px">
|
||||
<el-form-item label="模板下载 :">
|
||||
<el-button type="primary" :icon="Download" @click="downloadTemp"> 点击下载 </el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件上传 :">
|
||||
<el-upload
|
||||
action="#"
|
||||
class="upload"
|
||||
:drag="true"
|
||||
:limit="excelLimit"
|
||||
:multiple="true"
|
||||
:show-file-list="true"
|
||||
:http-request="uploadExcel"
|
||||
:before-upload="beforeExcelUpload"
|
||||
:on-exceed="handleExceed"
|
||||
:on-success="excelUploadSuccess"
|
||||
:on-error="excelUploadError"
|
||||
:accept="parameter.fileType!.join(',')"
|
||||
>
|
||||
<slot name="empty">
|
||||
<el-icon class="el-icon--upload">
|
||||
<upload-filled />
|
||||
</el-icon>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
</slot>
|
||||
<template #tip>
|
||||
<slot name="tip">
|
||||
<div class="el-upload__tip">
|
||||
请上传 .xls , .xlsx 标准格式文件,文件最大为 {{ parameter.fileSize }}M
|
||||
</div>
|
||||
</slot>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据覆盖 :">
|
||||
<el-switch v-model="isCover" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="ImportExcel">
|
||||
import { ref } from "vue";
|
||||
import { useDownload } from "@/hooks/useDownload";
|
||||
import { Download } from "@element-plus/icons-vue";
|
||||
import { ElNotification, UploadRequestOptions, UploadRawFile } from "element-plus";
|
||||
|
||||
export interface ExcelParameterProps {
|
||||
title: string; // 标题
|
||||
fileSize?: number; // 上传文件的大小
|
||||
fileType?: File.ExcelMimeType[]; // 上传文件的类型
|
||||
tempApi?: (params: any) => Promise<any>; // 下载模板的Api
|
||||
importApi?: (params: any) => Promise<any>; // 批量导入的Api
|
||||
getTableList?: () => void; // 获取表格数据的Api
|
||||
}
|
||||
|
||||
// 是否覆盖数据
|
||||
const isCover = ref(false);
|
||||
// 最大文件上传数
|
||||
const excelLimit = ref(1);
|
||||
// dialog状态
|
||||
const dialogVisible = ref(false);
|
||||
// 父组件传过来的参数
|
||||
const parameter = ref<ExcelParameterProps>({
|
||||
title: "",
|
||||
fileSize: 5,
|
||||
fileType: ["application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]
|
||||
});
|
||||
|
||||
// 接收父组件参数
|
||||
const acceptParams = (params: ExcelParameterProps) => {
|
||||
parameter.value = { ...parameter.value, ...params };
|
||||
dialogVisible.value = true;
|
||||
};
|
||||
|
||||
// Excel 导入模板下载
|
||||
const downloadTemp = () => {
|
||||
if (!parameter.value.tempApi) return;
|
||||
useDownload(parameter.value.tempApi, `${parameter.value.title}模板`);
|
||||
};
|
||||
|
||||
// 文件上传
|
||||
const uploadExcel = async (param: UploadRequestOptions) => {
|
||||
let excelFormData = new FormData();
|
||||
excelFormData.append("file", param.file);
|
||||
excelFormData.append("isCover", isCover.value as unknown as Blob);
|
||||
await parameter.value.importApi!(excelFormData);
|
||||
parameter.value.getTableList && parameter.value.getTableList();
|
||||
dialogVisible.value = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 文件上传之前判断
|
||||
* @param file 上传的文件
|
||||
* */
|
||||
const beforeExcelUpload = (file: UploadRawFile) => {
|
||||
const isExcel = parameter.value.fileType!.includes(file.type as File.ExcelMimeType);
|
||||
const fileSize = file.size / 1024 / 1024 < parameter.value.fileSize!;
|
||||
if (!isExcel)
|
||||
ElNotification({
|
||||
title: "温馨提示",
|
||||
message: "上传文件只能是 xls / xlsx 格式!",
|
||||
type: "warning"
|
||||
});
|
||||
if (!fileSize)
|
||||
setTimeout(() => {
|
||||
ElNotification({
|
||||
title: "温馨提示",
|
||||
message: `上传文件大小不能超过 ${parameter.value.fileSize}MB!`,
|
||||
type: "warning"
|
||||
});
|
||||
}, 0);
|
||||
return isExcel && fileSize;
|
||||
};
|
||||
|
||||
// 文件数超出提示
|
||||
const handleExceed = () => {
|
||||
ElNotification({
|
||||
title: "温馨提示",
|
||||
message: "最多只能上传一个文件!",
|
||||
type: "warning"
|
||||
});
|
||||
};
|
||||
|
||||
// 上传错误提示
|
||||
const excelUploadError = () => {
|
||||
ElNotification({
|
||||
title: "温馨提示",
|
||||
message: `批量添加${parameter.value.title}失败,请您重新上传!`,
|
||||
type: "error"
|
||||
});
|
||||
};
|
||||
|
||||
// 上传成功提示
|
||||
const excelUploadSuccess = () => {
|
||||
ElNotification({
|
||||
title: "温馨提示",
|
||||
message: `批量添加${parameter.value.title}成功!`,
|
||||
type: "success"
|
||||
});
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
acceptParams
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./index.scss";
|
||||
</style>
|
||||
67
src/components/Loading/index.scss
Normal file
@@ -0,0 +1,67 @@
|
||||
.loading-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.loading-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 98px;
|
||||
}
|
||||
}
|
||||
.dot {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
font-size: 32px;
|
||||
transform: rotate(45deg);
|
||||
animation: ant-rotate 1.2s infinite linear;
|
||||
}
|
||||
.dot i {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background-color: var(--el-color-primary);
|
||||
border-radius: 100%;
|
||||
opacity: 0.3;
|
||||
transform: scale(0.75);
|
||||
transform-origin: 50% 50%;
|
||||
animation: ant-spin-move 1s infinite linear alternate;
|
||||
}
|
||||
.dot i:nth-child(1) {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.dot i:nth-child(2) {
|
||||
top: 0;
|
||||
right: 0;
|
||||
animation-delay: 0.4s;
|
||||
}
|
||||
.dot i:nth-child(3) {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
animation-delay: 0.8s;
|
||||
}
|
||||
.dot i:nth-child(4) {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
animation-delay: 1.2s;
|
||||
}
|
||||
|
||||
@keyframes ant-rotate {
|
||||
to {
|
||||
transform: rotate(405deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes ant-spin-move {
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
13
src/components/Loading/index.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div class="loading-box">
|
||||
<div class="loading-wrap">
|
||||
<span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="Loading"></script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./index.scss";
|
||||
</style>
|
||||
66
src/components/PermissionButton/index.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<!-- 按钮组模式 -->
|
||||
<div class="permission-button-group">
|
||||
<template v-for="(btn, index) in props.buttons" :key="index">
|
||||
<!-- 过滤无权限的按钮 -->
|
||||
<el-button
|
||||
v-permissionDirective="btn.permission"
|
||||
v-bind="btn.props"
|
||||
:customClass="btn.class"
|
||||
:disabled="btn.disabled"
|
||||
@click="handleButtonClick(btn, $event)"
|
||||
>
|
||||
<template #default>
|
||||
{{ btn.text }}
|
||||
<slot :name="btn.name" />
|
||||
</template>
|
||||
</el-button>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
// 定义按钮属性类型
|
||||
interface ButtonProps {
|
||||
// 按钮文本
|
||||
text?: string;
|
||||
// 按钮名称(用于插槽和标识)
|
||||
name?: string;
|
||||
// 按钮权限标识(支持单个或多个)
|
||||
permission?: string | string[];
|
||||
// Element Plus 按钮原生属性
|
||||
props?: Record<string, any>;
|
||||
// 自定义类名
|
||||
class?: string;
|
||||
// 是否禁用
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
// 组件属性
|
||||
const props = defineProps<{
|
||||
// 按钮组配置(按钮组模式用)
|
||||
buttons?: ButtonProps[];
|
||||
}>();
|
||||
|
||||
// 处理按钮组点击事件
|
||||
const handleButtonClick = (btn: ButtonProps, event: Event) => {
|
||||
// 触发组件的统一点击事件(携带按钮信息)
|
||||
emit("handleButtonClickCallback", btn, event);
|
||||
};
|
||||
|
||||
// 组件事件
|
||||
const emit = defineEmits<{
|
||||
(e: "handleButtonClickCallback", btn: ButtonProps, event: Event): void;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.permission-button {
|
||||
/* 单个按钮的基础样式 */
|
||||
}
|
||||
.permission-button-group {
|
||||
/* 按钮组的基础样式 */
|
||||
display: inline-flex;
|
||||
gap: 4px;
|
||||
}
|
||||
</style>
|
||||
45
src/components/ProTable/components/ColSetting.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<!-- 列设置 -->
|
||||
<el-drawer v-model="drawerVisible" title="列设置" size="450px">
|
||||
<div class="table-main">
|
||||
<el-table :data="colSetting" :border="true" row-key="prop" default-expand-all :tree-props="{ children: '_children' }">
|
||||
<el-table-column prop="label" align="center" label="列名" />
|
||||
<el-table-column v-slot="scope" prop="isShow" align="center" label="显示">
|
||||
<el-switch v-model="scope.row.isShow"></el-switch>
|
||||
</el-table-column>
|
||||
<el-table-column v-slot="scope" prop="sortable" align="center" label="排序">
|
||||
<el-switch v-model="scope.row.sortable"></el-switch>
|
||||
</el-table-column>
|
||||
<template #empty>
|
||||
<div class="table-empty">
|
||||
<img src="@/assets/images/notData.png" alt="notData" />
|
||||
<div>暂无可配置列</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="ColSetting">
|
||||
import { ref } from "vue";
|
||||
import { ColumnProps } from "@/components/ProTable/interface";
|
||||
|
||||
defineProps<{ colSetting: ColumnProps[] }>();
|
||||
|
||||
const drawerVisible = ref<boolean>(false);
|
||||
|
||||
const openColSetting = () => {
|
||||
drawerVisible.value = true;
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
openColSetting
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.cursor-move {
|
||||
cursor: move;
|
||||
}
|
||||
</style>
|
||||
12
src/components/ProTable/components/Empty.vue
Normal file
@@ -0,0 +1,12 @@
|
||||
<template>
|
||||
<div class="table-empty">
|
||||
<slot name="empty">
|
||||
<img src="@/assets/images/notData.png" alt="notData" />
|
||||
<div>暂无数据</div>
|
||||
</slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Empty"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
37
src/components/ProTable/components/Pagination.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<!-- 分页组件 -->
|
||||
<el-pagination
|
||||
:background="true"
|
||||
:current-page="pageable.page"
|
||||
:page-size="pageable.size"
|
||||
:page-sizes="sizes"
|
||||
:total="pageable.total_size"
|
||||
layout="slot,sizes, total,prev,pager, next,jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<span style="font-size: 12px">
|
||||
<span>共选中</span>
|
||||
<span style="margin: 0 5px; color: #4178d5"> {{ length ? length : 0 }}</span>
|
||||
<span>行 </span>
|
||||
</span>
|
||||
</el-pagination>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="Pagination">
|
||||
interface Pageable {
|
||||
page: number;
|
||||
size: number;
|
||||
total_size: number;
|
||||
}
|
||||
//size
|
||||
interface PaginationProps {
|
||||
pageable: Pageable;
|
||||
handleSizeChange: (size: number) => void;
|
||||
handleCurrentChange: (currentPage: number) => void;
|
||||
length: number;
|
||||
sizes: any;
|
||||
}
|
||||
|
||||
defineProps<PaginationProps>();
|
||||
</script>
|
||||
90
src/components/ProTable/components/TableColumn.vue
Normal file
@@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<RenderTableColumn v-bind="column" />
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx" name="TableColumn">
|
||||
import { inject, ref, useSlots } from "vue";
|
||||
import { ColumnProps, RenderScope, HeaderRenderScope } from "@/components/ProTable/interface";
|
||||
import { filterEnum, formatValue, handleProp, handleRowAccordingToProp } from "@/utils";
|
||||
|
||||
defineProps<{ column: ColumnProps }>();
|
||||
|
||||
const slots = useSlots();
|
||||
|
||||
const enumMap = inject("enumMap", ref(new Map()));
|
||||
|
||||
// 渲染表格数据
|
||||
const renderCellData = (item: ColumnProps, scope: RenderScope<any>) => {
|
||||
return enumMap.value.get(item.prop) && item.isFilterEnum
|
||||
? filterEnum(handleRowAccordingToProp(scope.row, item.prop!), enumMap.value.get(item.prop)!, item.fieldNames)
|
||||
: formatValue(handleRowAccordingToProp(scope.row, item.prop!));
|
||||
};
|
||||
|
||||
// 获取 tag 类型
|
||||
const getTagType = (item: ColumnProps, scope: RenderScope<any>) => {
|
||||
return filterEnum(handleRowAccordingToProp(scope.row, item.prop!), enumMap.value.get(item.prop), item.fieldNames, "tag");
|
||||
};
|
||||
|
||||
const RenderTableColumn = (item: ColumnProps) => {
|
||||
return (
|
||||
<>
|
||||
{item.isShow && (
|
||||
<el-table-column
|
||||
{...item}
|
||||
align={item.align ?? "center"}
|
||||
showOverflowTooltip={item.showOverflowTooltip ?? item.prop !== "operation"}
|
||||
>
|
||||
{{
|
||||
default: (scope: RenderScope<any>) => {
|
||||
if (item._children) return item._children.map(child => RenderTableColumn(child));
|
||||
if (item.render) return item.render(scope);
|
||||
if (slots[handleProp(item.prop!)]) return slots[handleProp(item.prop!)]!(scope);
|
||||
if (item.tag) return <el-tag type={getTagType(item, scope)}>{renderCellData(item, scope)}</el-tag>;
|
||||
return renderCellData(item, scope);
|
||||
},
|
||||
header: (scope: HeaderRenderScope<any>) => {
|
||||
if (item.headerRender) return item.headerRender(scope);
|
||||
if (slots[`${handleProp(item.prop!)}Header`]) return slots[`${handleProp(item.prop!)}Header`]!(scope);
|
||||
return item.label;
|
||||
}
|
||||
}}
|
||||
</el-table-column>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
</script>
|
||||
<style scope lang="scss">
|
||||
.color-a {
|
||||
color: #909399;
|
||||
}
|
||||
.color-b {
|
||||
color: #409eff;
|
||||
}
|
||||
.color-c {
|
||||
color: #67c23a;
|
||||
}
|
||||
.color-d {
|
||||
color: #e6a23c;
|
||||
}
|
||||
|
||||
// .label {
|
||||
// width: 100%;
|
||||
// border-right: 1px solid #ced1d9;
|
||||
// }
|
||||
|
||||
// .table-main .el-table .el-table__header .el-table__cell > .cell {
|
||||
// width: 100%;
|
||||
// height: 18px;
|
||||
// border-right: 1px solid #ced1d9;
|
||||
// }
|
||||
// .table-main .el-table .el-table__header .el-table__cell:first-child > .cell {
|
||||
// border-right: none;
|
||||
// }
|
||||
// .table-main .el-table .el-table__header .el-table__cell:last-child > .cell {
|
||||
// border-right: none;
|
||||
// }
|
||||
// .el-table.is-scrolling-left th.el-table-fixed-column--left {
|
||||
// background-color: #f5f7fa;
|
||||
// }
|
||||
</style>
|
||||
217
src/components/ProTable/index.vue
Normal file
@@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<!-- 表格内容 card -->
|
||||
<div :class="!isBoxClass ? '' : 'card table-main'">
|
||||
<!-- 查询表单 card -->
|
||||
<!-- <SearchForm
|
||||
v-show="isShowSearch"
|
||||
:search="search"
|
||||
:reset="reset"
|
||||
:formData="formData"
|
||||
:search-param="searchParam"
|
||||
:search-col="searchCol"
|
||||
/> -->
|
||||
<slot name="search"></slot>
|
||||
<!-- 表格头部 操作按钮 -->
|
||||
<div class="table-header">
|
||||
<div class="header-button-lf">
|
||||
<slot
|
||||
name="tableHeader"
|
||||
:selected-list-ids="selectedListIds"
|
||||
:selected-list="selectedList"
|
||||
:is-selected="isSelected"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表格主体 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
v-bind="$attrs"
|
||||
:data="data ?? tableData"
|
||||
:border="border"
|
||||
:row-key="
|
||||
row => {
|
||||
return routeName === 'boxCode' || routeName === 'boxMarkIndex' ? row.detailId + '' + row.id : row.id;
|
||||
}
|
||||
"
|
||||
@selection-change="selectionChange"
|
||||
:style="!isBoxClass ? 'height: 400px; overflow-y: auto' : ''"
|
||||
>
|
||||
<!-- 默认插槽 -->
|
||||
<slot></slot>
|
||||
<template v-for="item in tableColumns" :key="item">
|
||||
<!-- selection || index || expand -->
|
||||
<el-table-column
|
||||
v-if="item.type && ['selection', 'index', 'expand'].includes(item.type)"
|
||||
v-bind="item"
|
||||
:align="item.align ?? 'center'"
|
||||
:reserve-selection="item.type == 'selection'"
|
||||
>
|
||||
<template v-if="item.type == 'expand'" #default="scope">
|
||||
<component :is="item.render" v-bind="scope" v-if="item.render"> </component>
|
||||
<slot v-else :name="item.type" v-bind="scope"></slot>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- other -->
|
||||
<TableColumn v-if="!item.type && item.prop && item.isShow" :column="item">
|
||||
<template v-for="slot in Object.keys($slots)" #[slot]="scope">
|
||||
<slot :name="slot" v-bind="scope"></slot>
|
||||
</template>
|
||||
</TableColumn>
|
||||
</template>
|
||||
<!-- 插入表格最后一行之后的插槽 -->
|
||||
<template #append>
|
||||
<slot name="append"> </slot>
|
||||
</template>
|
||||
<!-- 无数据 -->
|
||||
<template #empty>
|
||||
<div class="table-empty">
|
||||
<slot name="empty">
|
||||
<img src="@/assets/images/notData.png" alt="notData" />
|
||||
<div>暂无数据</div>
|
||||
</slot>
|
||||
</div>
|
||||
</template>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<slot name="pagination">
|
||||
<Pagination
|
||||
v-if="pagination"
|
||||
:pageable="pageable"
|
||||
:handle-size-change="handleSizeChange"
|
||||
:handle-current-change="handleCurrentChange"
|
||||
:length="selectedList.length"
|
||||
:sizes="sizes"
|
||||
/>
|
||||
</slot>
|
||||
</div>
|
||||
<!-- 列设置 -->
|
||||
<ColSetting v-if="toolButton" ref="colRef" v-model:col-setting="colSetting" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="ProTable">
|
||||
// import SearchForm from "@/components/SearchForm/index.vue";
|
||||
// /watch
|
||||
import { ref, provide, onMounted, toRef } from "vue";
|
||||
import { ElTable } from "element-plus";
|
||||
import { useTable } from "@/hooks/useTable";
|
||||
import { useSelection } from "@/hooks/useSelection";
|
||||
// import { BreakPoint } from "@/components/Grid/interface";
|
||||
import { ColumnProps } from "@/components/ProTable/interface";
|
||||
// import SearchForm from "@/components/SearchForm/index.vue";
|
||||
import Pagination from "./components/Pagination.vue";
|
||||
import ColSetting from "./components/ColSetting.vue";
|
||||
import TableColumn from "./components/TableColumn.vue";
|
||||
const $router = useRouter();
|
||||
const routeName: any = ref($router.currentRoute.value.name);
|
||||
export interface ProTableProps {
|
||||
columns: ColumnProps[]; // 列配置项 ==> 必传
|
||||
// formData?: any[];
|
||||
isBoxClass?: boolean;
|
||||
data?: any[]; // 静态 table data 数据,若存在则不会使用 requestApi 返回的 data ==> 非必传
|
||||
requestApi?: (params: any) => Promise<any>; // Promise<any>; // 请求表格数据的 api ==> 非必传
|
||||
requestAuto?: boolean; // 是否自动执行请求 api ==> 非必传(默认为true)
|
||||
requestError?: (params: any) => void; // 表格 api 请求错误监听 ==> 非必传
|
||||
dataCallback?: (data: any) => any; // 返回数据的回调函数,可以对数据进行处理 ==> 非必传
|
||||
title?: string; // 表格标题,目前只在打印的时候用到 ==> 非必传
|
||||
pagination?: boolean; // 是否需要分页组件 ==> 非必传(默认为true)
|
||||
initParam?: any; // 初始化请求参数 ==> 非必传(默认为{})
|
||||
orgCode?: any; //组织ID,组织id改变时,重新请求数据
|
||||
border?: boolean; // 是否带有纵向边框 ==> 非必传(默认为true)
|
||||
toolButton?: boolean; // 是否显示表格功能按钮 ==> 非必传(默认为true)
|
||||
rowKey?: string; // 行数据的 Key,用来优化 Table 的渲染,当表格数据多选时,所指定的 id ==> 非必传(默认为 id)
|
||||
// searchCol?: number | Record<BreakPoint, number>; // 表格搜索项 每列占比配置 ==> 非必传 { xs: 1, sm: 2, md: 2, lg: 3, xl: 4 }
|
||||
sizes?: any;
|
||||
}
|
||||
|
||||
// 接受父组件参数,配置默认值
|
||||
const props = withDefaults(defineProps<ProTableProps>(), {
|
||||
formData: () => [],
|
||||
columns: () => [],
|
||||
requestAuto: true,
|
||||
pagination: true,
|
||||
initParam: {},
|
||||
isBoxClass: true,
|
||||
border: true,
|
||||
toolButton: true,
|
||||
// rowKey: `id${index}`,
|
||||
// searchCol: () => ({ xs: 1, sm: 2, md: 2, lg: 3, xl: 4 }),
|
||||
sizes: [1, 2, 3, 4]
|
||||
});
|
||||
|
||||
// 是否显示搜索模块
|
||||
// const isShowSearch = ref(true);
|
||||
// 表格 DOM 元素
|
||||
const tableRef = ref<InstanceType<typeof ElTable>>();
|
||||
const newValInitParams = toRef(props, "initParam");
|
||||
// 表格多选 Hooks
|
||||
const { selectionChange, selectedList, selectedListIds, isSelected } = useSelection(props.rowKey);
|
||||
|
||||
// 清空选中数据列表
|
||||
const clearSelection = () => tableRef.value!.clearSelection();
|
||||
// 表格操作 Hooks
|
||||
const { tableData, pageable, getTableList, handleSizeChange, handleCurrentChange } = useTable(
|
||||
routeName.value,
|
||||
props.requestApi,
|
||||
newValInitParams,
|
||||
props.pagination,
|
||||
props.requestError,
|
||||
clearSelection
|
||||
);
|
||||
// 初始化请求
|
||||
onMounted(() => props.requestAuto && getTableList());
|
||||
|
||||
// 接收 columns 并设置为响应式
|
||||
const tableColumns = ref<ColumnProps[]>(props.columns);
|
||||
|
||||
// 定义 enumMap 存储 enum 值(避免异步请求无法格式化单元格内容 || 无法填充搜索下拉选择)
|
||||
const enumMap = ref(new Map<string, { [key: string]: any }[]>());
|
||||
provide("enumMap", enumMap);
|
||||
const setEnumMap = async (col: ColumnProps) => {
|
||||
if (!col.enum) return;
|
||||
// 如果当前 enum 为后台数据需要请求数据,则调用该请求接口,并存储到 enumMap
|
||||
if (typeof col.enum !== "function") return enumMap.value.set(col.prop!, col.enum!);
|
||||
const { data } = await col.enum();
|
||||
enumMap.value.set(col.prop!, data);
|
||||
};
|
||||
|
||||
// 扁平化 columns
|
||||
const flatColumnsFunc = (columns: ColumnProps[], flatArr: ColumnProps[] = []) => {
|
||||
columns.forEach(async col => {
|
||||
if (col._children?.length) flatArr.push(...flatColumnsFunc(col._children));
|
||||
flatArr.push(col);
|
||||
|
||||
// 给每一项 column 添加 isShow && isFilterEnum 默认属性
|
||||
col.isShow = col.isShow ?? true;
|
||||
col.isFilterEnum = col.isFilterEnum ?? true;
|
||||
|
||||
// 设置 enumMap
|
||||
setEnumMap(col);
|
||||
});
|
||||
return flatArr.filter(item => !item._children?.length);
|
||||
};
|
||||
|
||||
// flatColumns
|
||||
const flatColumns = ref<ColumnProps[]>();
|
||||
flatColumns.value = flatColumnsFunc(tableColumns.value);
|
||||
|
||||
// 列设置 ==> 过滤掉不需要设置的列
|
||||
const colRef = ref();
|
||||
const colSetting = tableColumns.value!.filter(
|
||||
item => !["selection", "index", "expand"].includes(item.type!) && item.prop !== "operation" && item.isShow
|
||||
);
|
||||
|
||||
// 暴露给父组件的参数和方法(外部需要什么,都可以从这里暴露出去)
|
||||
defineExpose({
|
||||
element: tableRef,
|
||||
tableData,
|
||||
pageable,
|
||||
getTableList,
|
||||
handleSizeChange,
|
||||
handleCurrentChange,
|
||||
clearSelection,
|
||||
enumMap,
|
||||
isSelected,
|
||||
selectedList,
|
||||
selectedListIds
|
||||
});
|
||||
</script>
|
||||