Commit 3bd06417 authored by zhanglongbao's avatar zhanglongbao

Initial commit

parents
Pipeline #644 canceled with stages
# 接口域名
VITE_APP_BASE_URL = 'http://work-order-test.linanquan.com'
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
{
"htmlWhitespaceSensitivity": "strict",
"bracketSameLine": true,
"tabWidth": 4
}
# Vue 3 + TypeScript + Vite
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
export {}
declare global {
}
/* eslint-disable */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
Avatar: typeof import('./src/components/avatar/index.vue')['default']
copy: typeof import('./src/components/widget/field/input copy/index.vue')['default']
Date_time: typeof import('./src/components/widget/field/date_time/index.vue')['default']
Date_time_range: typeof import('./src/components/widget/field/date_time_range/index.vue')['default']
Dd: typeof import('./src/components/name/dd.vue')['default']
Dept: typeof import('./src/components/widget/field/dept/index.vue')['default']
File: typeof import('./src/components/widget/field/file/index.vue')['default']
Image: typeof import('./src/components/widget/field/image/index.vue')['default']
Input: typeof import('./src/components/widget/field/input/index.vue')['default']
Multiline: typeof import('./src/components/widget/field/multiline/index.vue')['default']
Name: typeof import('./src/components/name/index.vue')['default']
Number: typeof import('./src/components/widget/field/number/index.vue')['default']
Parting_line: typeof import('./src/components/widget/field/parting_line/index.vue')['default']
Popup: typeof import('./src/components/popup/index.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
Select: typeof import('./src/components/select/index.vue')['default']
Select_time: typeof import('./src/components/select_time/index.vue')['default']
Select_user_dept: typeof import('./src/components/select_user_dept/index.vue')['default']
Single_choice: typeof import('./src/components/widget/field/single_choice/index.vue')['default']
User: typeof import('./src/components/widget/field/user/index.vue')['default']
User_dept_list: typeof import('./src/components/user_dept_list/index.vue')['default']
User_list: typeof import('./src/components/user_list/index.vue')['default']
VanButton: typeof import('vant/es')['Button']
VanCheckbox: typeof import('vant/es')['Checkbox']
VanDatePicker: typeof import('vant/es')['DatePicker']
VanPicker: typeof import('vant/es')['Picker']
VanPopup: typeof import('vant/es')['Popup']
VanStepper: typeof import('vant/es')['Stepper']
VanTimePicker: typeof import('vant/es')['TimePicker']
Widget: typeof import('./src/components/widget/index.vue')['default']
Wx: typeof import('./src/components/name/wx.vue')['default']
}
}
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue + TS</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
{
"name": "jisu_gongdan_phone",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc -b && vite build",
"preview": "vite preview"
},
"dependencies": {
"axios": "^1.7.5",
"dingtalk-jsapi": "^3.0.38",
"pinia": "^2.2.2",
"smooth-signature": "^1.0.15",
"vant": "^4.9.4",
"vue": "^3.4.37",
"vue-router": "^4.4.3"
},
"devDependencies": {
"@types/node": "^22.5.0",
"@types/sortablejs": "^1.15.8",
"@vant/auto-import-resolver": "^1.2.1",
"@vitejs/plugin-vue": "^5.1.2",
"less": "^4.2.0",
"typescript": "^5.5.3",
"unplugin-auto-import": "^0.18.2",
"unplugin-vue-components": "^0.27.4",
"vite": "^5.4.1",
"vue-tsc": "^2.0.29"
}
}
This diff is collapsed.
<template>
<router-view v-slot="{ Component }">
<component :is="Component" />
</router-view>
</template>
<script setup lang="ts"></script>
<style lang="less" scoped></style>
import axios from "axios";
import { getToken, getUrlKey } from "@/utils/public";
import { login } from "@/utils/container/index";
import { showToast } from "vant";
const http = axios.create({
baseURL: "/api",
timeout: 5000,
});
http.interceptors.request.use((config) => {
const token = getToken();
config.data = {
arg: {
...(config.data || {}),
token,
},
meta: {
app_id: getUrlKey("corp_id") || undefined,
},
};
return config;
});
http.interceptors.response.use((response) => {
if (response.status == 200) {
if (response.data.code == 1000) {
showToast({ message: "登陆过期", position: "top" });
login();
}
if (![0, 1000].includes(response.data.code)) {
showToast({ message: response.data.msg, position: "top" });
}
return response.data;
}
});
interface ResponseData {
code: number;
msg: string;
data: any;
}
export default {
post(...params: any[]): Promise<ResponseData> {
return http.post.apply(null, params as any) as Promise<ResponseData>;
},
};
import platform from "./methods/platform";
import user from "./methods/user";
import system from "./methods/system";
import form from "./methods/form";
import customer from "./methods/customer";
import product from "./methods/product";
import oss from "./methods/oss";
import order from "./methods/order";
import log from "./methods/log";
import power from "./methods/power";
export default {
platform,
user,
system,
form,
customer,
product,
oss,
order,
log,
power,
};
import http from "../axios";
interface CustomerList {
page: number;
size: number;
form_id: string;
labels?: string[];
key_word?: string;
where?: string;
ids?: string[];
}
export default {
// 客户标签
listCustomerLabel() {
return http.post("/order.customer/listCustomerLabel");
},
// 删除客户标签
deleteCustomerLabel(params: { ids: string[] }) {
return http.post("/order.customer/deleteCustomerLabel", params);
},
// 添加客户标签
saveCustomLabel(params: {
label_name: string;
label_color: string;
label_icon: string;
}) {
return http.post("/order.customer/saveCustomLabel", params);
},
// 新建/修改客户
saveCustomInfo(params: any) {
return http.post("/order.customer/saveCustomInfo", params);
},
// 客户列表
listCustomInfo(params: CustomerList) {
return http.post("/order.customer/listCustomInfo", params);
},
// 删除客户
deleteCustomInfo(params: { ids: string[]; form_id: string }) {
return http.post("/order.customer/deleteCustomInfo", params);
},
// 客户统计
getCustomCount(params: { form_id: string }) {
return http.post("/order.customer/getCustomCount", params);
},
// 客户详情
CustomDetail(params: { id: string; form_id: string }) {
return http.post("/order.customer/CustomDetail", params);
},
// 客户关联的产品
getCustomerProducts(params: { customer_id: string; form_id: string }) {
return http.post("/order.customer/getCustomerProducts", params);
},
// 客户日志
getCustomerLog(params: { id: string; form_id: string }) {
return http.post("/order.log/getCustomerLog", params);
},
// 获取客户配置
getCompanyCustomer() {
return http.post("/order.customer/getCompanyCustomer");
},
// 修改客户配置
setCompanyCustomer(params: any) {
return http.post("/order.customer/setCompanyCustomer", params);
},
};
import http from "../axios";
export default {
// 获取表单类型列表
TemplateLists(params: { template_type?: number[]; form_ids?: string[] }) {
return http.post("/order.form/TemplateLists", params);
},
// 获取工单类类型详情
FormDetail(params: { id: string }) {
return http.post("/order.form/FromDetail", params);
},
// 更新表单
FormUpdate(params: { form_ids: string[] }) {
return http.post("/order.form/FormUpdate", { cover: 1, ...params });
},
// 更新所有表单
UpdateCompanyForm() {
return http.post("/order.form/UpdateCompanyForm", { cover: 1 });
},
// 修改表单
TemplateEdit(params: FormDetail) {
return http.post("/order.form/formAdd", params);
},
// 表单禁用/启用
DisableTemplate(params: { id: string; action_type: 1 | 2 }) {
return http.post("/order.form/DisableTemplate", params);
},
// 获取form_id对应的表单数据
GetFormData(params: { form_id: string; page: number; size: number }) {
return http.post("/order.form/GetFormData", params);
},
// 获取省市区地址
GetAddress() {
return http.post("/order.form/GetAddress");
},
// 获取表单工作流
listFlowNode(params: { form_id: string }) {
return http.post("/order.form/listFlowNode", params);
},
// 修改表单工作流
updateFlowNode(params: { form_id: string; data: any[] }) {
return http.post("/order.form/updateFlowNode", params);
},
};
import http from "../axios";
export default {
// 查询日志列表
getLogById(params: any) {
return http.post("/order.log/getLogById", params);
},
};
import http from "../axios";
export default {
// 获取工单状态数量
getOrderStatusCount() {
return http.post("/order.order/getOrderStatusCount");
},
// 工单列表
listOrder(params: { form_id?: string; where?: string }) {
return http.post("/order.order/listOrder", params);
},
// 工单列表
deleteOrder(params: { form_id: string; id: string }) {
return http.post("/order.order/deleteOrder", params);
},
// 新建/修改工单
saveOrder(params: any) {
return http.post("/order.order/saveOrder", params);
},
// 工单详情
orderDetail(params: { form_id: string; id: string }) {
return http.post("/order.order/orderDetail", params);
},
// 指派工单
assignOrder(params: {
form_id: string;
id: string;
fuze_user: string;
xietong_user: string;
}) {
return http.post("/order.order/assignOrder", params);
},
// 接单
receiveOrder(params: { form_id: string; id: string }) {
return http.post("/order.order/receiveOrder", params);
},
// 开始
startOrder(params: { form_id: string; id: string }) {
return http.post("/order.order/startOrder", params);
},
// 完成
finishOrder(params: { form_id: string; id: string; data: any }) {
return http.post("/order.order/finishOrder", params);
},
// 评价
evaluateOrder(params: { form_id: string; id: string; data: any }) {
return http.post("/order.order/evaluateOrder", params);
},
// 保存回执/评价内容
saveTemplateData(params: { form_id: string; order_id: string; data: any }) {
return http.post("/order.order_template/saveTemplateData", params);
},
// 获取回执/评价内容
getTemplateData(params: { form_id: string; order_id: string }) {
return http.post("/order.order_template/getTemplateData", params);
},
// 工单标签
listOrderLabel(params: { keyword?: string; page: number; size: number }) {
return http.post("/order.order/listOrderLabel", params);
},
};
import http from "../axios";
export default {
// 获取oss配置
getOssConfig() {
return http.post("/order.file/getOssConfig");
},
// 文件签名
getSignByMap(params: any) {
return http.post("/order.file/getSignByMap", params);
},
};
import http from "../axios";
export default {
// 钉钉登陆
loginByAuthCode(params: { auth_code: string; relate_corp_id: string }) {
return http.post("/order.platform-dingtalk/loginByAuthCode", params);
},
};
import http from "../axios";
export default {
// 角色列表
PartList(params: {
page: number;
size: number;
is_system?: number;
part_name?: string;
}) {
return http.post("/order.power/PartList", params);
},
// 删除角色
DeletePart(params: { id: string }) {
return http.post("/order.power/DeletePart", params);
},
// 修改/新建角色
CreatePart(params: {
id?: string;
part_name: string;
is_system: number;
user_ids: string[];
part_power: any;
}) {
return http.post("/order.power/CreatePart", params);
},
};
import http from "../axios";
export default {
// 产品列表
listProduct(params: { page: number; size: number; [k: string]: any }) {
return http.post("/order.product/listProduct", params);
},
// 新增/修改产品
saveProduct(params: any) {
return http.post("/order.product/saveProduct", params);
},
// 删除产品
deleteProduct(params: { ids: string[]; form_id: string }) {
return http.post("/order.product/deleteProduct", params);
},
// 产品统计
getClassifyCount(params: { form_id: string }) {
return http.post("/order.product/getClassifyCount", params);
},
// 产品详情
productDetail(params: { id: string; form_id: string }) {
return http.post("/order.product/productDetail", params);
},
// 获取产品的二维码
getProductQrcode(params: { product_id: string }) {
return http.post("/order.product/getProductQrcode", params);
},
// 产品动态
getProductLog(params: { id: string; form_id: string }) {
return http.post("/order.log/getProductLog", params);
},
// 设置产品其他配置
setCompanyProduct(params: any) {
return http.post("/order.product/setCompanyProduct", params);
},
// 获取产品其他配置
getCompanyProduct() {
return http.post("/order.product/getCompanyProduct");
},
/** ——————————产品分类—————————— */
// 新增/修改产品分类
saveClassify(params: {
id?: string;
classify_name: string;
_parent_id?: string;
}) {
return http.post("/order.product/saveClassify", params);
},
// 删除产品分类
deleteClassify(params: { ids: string[] }) {
return http.post("/order.product/deleteClassify", params);
},
// 产品分类列表
listClassify(params: { _parent_id?: string; keyword?: string }) {
return http.post("/order.product/listClassify", params);
},
/** ——————————产品二维码—————————— */
// 二维码列表
listQrcode() {
return http.post("/order.product/listQrcode");
},
// 二维码列表
deleteQrcode(params: { ids: string[] }) {
return http.post("/order.product/deleteQrcode", params);
},
// 创建/修改二维码
saveQrcode(params: {
id?: string;
product_id?: string;
show_number?: number;
show_company?: number;
show_logo?: number;
qrcode_number?: string;
}) {
return http.post("/order.product/saveQrcode", params);
},
// 二维码详情
detailQrcode(params: { ids: string[] }) {
return http.post("/order.product/detailQrcode", params);
},
// 批量生成二维码
batchCreate(params: {
show_number: number;
show_company: number;
show_logo: number;
count: number;
}) {
return http.post("/order.product/batchCreate", params);
},
// 批量下载二维码
batchDownload(params: { ids: string[] }) {
return http.post("/order.product/batchDownload", params);
},
// 获取二维码设置
getQrCodeWindow(params: { form_id: string }) {
return http.post("/order.product/getQrCodeWindow", params);
},
// 二维码设置
setQrCodeWindow(params: {
form_id: string;
back_ground: string;
show_customer_fields: string[];
show_product_fields: string[];
buttons: {
button_name: string;
order_form_id: string;
button_order_type: string;
}[];
}) {
return http.post("/order.product/setQrCodeWindow", params);
},
};
import http from "../axios";
export default {
// 生产唯一id
createId() {
return http.post("/order.code/createId");
},
};
import http from "../axios";
export default {
// 根据token获取用户信息
getByToken() {
return http.post("/order.user/getByToken");
},
// 获取部门
getDeptByParentId(params: { _parent_id?: string }) {
return http.post("/order.department/getDeptByParentId", params);
},
// 获取部门下的人员
getUsersByDeptId(params: { id: string }) {
return http.post("/order.department/getUsersByDeptId", {
page: 1,
size: 9999,
need_children: 0,
...params,
});
},
// 启用/禁用人员
usersUnuse(params: { users: string[]; state: 0 | 1 }) {
return http.post("/order.user/usersUnuse", params);
},
// 修改用户信息
updateUser(params: {
user_id: string;
phone: string;
team_ids: string[];
role_ids: string[];
}) {
return http.post("/order.user/updateUser", params);
},
// 离职/复职人员
usersLeave(params: { users: string[]; state: 0 | 1 }) {
return http.post("/order.user/usersLeave", params);
},
// 查看所有团队
listTeam() {
return http.post("/order.team/listTeam");
},
// 新增团队
insertTeam(params: { _parent_id?: string; [k: string]: any }) {
return http.post("/order.team/insertTeam", params);
},
// 修改团队
updateTeam(params: { id: string; [k: string]: any }) {
return http.post("/order.team/updateTeam", params);
},
// 删除团队
deleteTeam(params: { ids: string[] }) {
return http.post("/order.team/deleteTeam", params);
},
// 查询企业下的人员信息
getByCorpId(params: {
dept_ids?: string[];
team_ids?: string[];
on_job?: number;
status?: number;
name?: string;
}) {
return http.post("/order.user/getByCorpId", params);
},
// 工作状态
listWorkStatus() {
return http.post("/order.user/listWorkStatus");
},
// 新增工作状态
addWorkStatus(params: { name: string; color: string }) {
return http.post("/order.user/addWorkStatus", params);
},
// 删除工作状态
deleteWorkStatus(params: { ids: string[] }) {
return http.post("/order.user/deleteWorkStatus", params);
},
// 修改我的工作状态
updateMyWorkStatus(params: { work_status_id: string }) {
return http.post("/order.user/updateMyWorkStatus", params);
},
// 获取我的工作状态
getMyWorkStatus() {
return http.post("/order.user/getMyWorkStatus");
},
};
:root {
font-size: 15px;
--blue: #1779fc; // 蓝色
--orange: #f5a034; // 橘色
--light_orange: #fef4e8; // 淡橘色
--green: #22a37d; // 绿色
--gray: #595a5d; // 灰色
--light_gray: #999999; // 淡灰色
--hover_blue: #eef7ff; // hover色
--border_color: #eaeaea; // 边框颜色
--navbar_height: 50px; // tabs高度
/* 背景色 */
--bg_gray: #f5f6f8;
--bg_green: #e6f4f1;
/* icon颜色 */
--icon_gray: #b7b8c0;
}
body {
width: 100vw;
height: 100vh;
box-sizing: border-box;
}
// 必填
.required {
color: red;
margin-right: 4px;
}
// tabs菜单样式
.tabs {
display: flex;
align-items: center;
padding: 0 20px;
height: 100%;
span {
margin-right: 20px;
position: relative;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
min-width: 50px;
user-select: none;
cursor: pointer;
&.active {
color: var(--blue);
&::after {
content: "";
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 40px;
height: 4px;
background-color: var(--blue);
}
}
}
}
// 按钮
.button_group {
display: flex;
align-items: center;
& + .button {
margin-left: 10px;
}
.button {
border-radius: 0;
position: relative;
}
.button + .button {
margin-left: 0;
}
.button:nth-of-type(1) {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.button:nth-last-of-type(1) {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
.button:not(:nth-last-of-type(1))::after {
content: "";
position: absolute;
right: 0;
top: 6px;
bottom: 6px;
width: 1px;
background-color: white;
}
}
.button {
--btn_bg_color: var(--blue);
--btn_color: white;
--btn_height: 29px;
color: var(--btn_color);
background-color: var(--btn_bg_color);
padding: 0 10px;
border-radius: 4px;
cursor: pointer;
user-select: none;
font-size: 12px;
box-sizing: border-box;
height: var(--btn_height);
line-height: var(--btn_height);
display: inline-block;
text-align: center;
&:hover {
opacity: 0.8;
}
i {
margin-right: 4px;
}
& + .button {
margin-left: 10px;
}
// 颜色
&.green {
--btn_bg_color: #46998b;
}
&.red {
--btn_bg_color: red;
}
&.gray {
--btn_bg_color: #a7a7a7;
}
&.orange {
--btn_bg_color: var(var(--orange));
}
// 样式
&.text {
color: var(--btn_bg_color);
background-color: transparent;
font-size: 14px;
padding: 0;
&:hover {
text-decoration: underline;
}
}
&.plain {
border: 1px solid var(--btn_bg_color);
color: var(--btn_bg_color);
background-color: transparent;
}
}
// 标签
.tags {
display: flex;
flex-wrap: wrap;
.tag {
color: var(--color);
background-color: var(--bg_color);
padding: 0 10px;
display: flex;
align-items: center;
border-radius: 4px;
margin: 4px 6px 4px 0;
height: 26px;
position: relative;
flex-shrink: 0;
i:not(.active, .remove) {
margin-right: 6px;
}
.active {
margin-left: 4px;
cursor: pointer;
}
.remove {
position: absolute;
right: -4px;
top: -4px;
color: var(--gray);
cursor: pointer;
display: none;
&:hover {
color: var(--blue);
}
}
&:hover .remove {
display: inline-block;
}
&.add {
cursor: pointer;
color: var(--blue);
background-color: var(--hover_blue);
}
}
}
// 状态
.status {
display: inline-block;
height: 24px;
width: 50px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 5px;
font-size: 12px;
}
// 圆点
.round {
width: var(--size);
height: var(--size);
border-radius: 50%;
background-color: var(--bg_color);
position: relative;
display: inline-block;
&::after {
content: "";
position: absolute;
width: var(--small_size);
height: var(--small_size);
background-color: var(--color);
border-radius: 50%;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
}
// 无数据
.empty {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.cursor {
cursor: pointer;
color: var(--blue);
}
}
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}
body {
line-height: 1;
}
ol,
ul {
list-style: none;
}
blockquote,
q {
quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
content: "";
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
input,
textarea {
border: none;
outline: none;
}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 173.51 195.2"><defs><style>.cls-1{fill:#0096f7;}.cls-2{fill:#0275b5;}.cls-3{fill:#f26c38;}.cls-4{fill:#fff;}</style></defs><title>doc</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path class="cls-1" d="M119.86,0H31.92C14.3,0,0,13.79,0,30.8V164.4c0,17,14.29,30.8,31.93,30.8H141.58c17.63,0,31.93-13.79,31.93-30.8V51.76a25.67,25.67,0,0,0-7.94-18.49L139,7.66A27.6,27.6,0,0,0,119.86,0Zm0,0"/><path class="cls-2" d="M165.56,33.27,139,7.66A27.43,27.43,0,0,0,125.08.49V29.23c0,9.13,7.67,16.53,17.12,16.53h30.58a25.91,25.91,0,0,0-7.22-12.48Z"/><path class="cls-3" d="M96.7,105.41"/><path class="cls-2" d="M129.5,69a5.5,5.5,0,0,0-5.23-5.23h0c-2-.2-5.44.27-6.31,5.54l-8.43,50.92L94.67,68.32c-1.25-3.75-3.8-4.54-5.72-4.54-3.3,0-5.48,1.67-6.13,4.6l-14.57,51L60,69.39a6.31,6.31,0,0,0-2-4.47,5.71,5.71,0,0,0-4.33-1.14C50.34,64.12,48.34,66,48,69v.16a18.52,18.52,0,0,0,.3,3.05h0v0a6.58,6.58,0,0,0,.12.74h0c.07.25.25.61.39,1.19l10.55,58.22c.94,4.08,3.6,6.24,7.6,6.24h0l.86,0c4.19,0,6.86-2.16,7.72-6.2l13.2-47.81L102,132.48c1.23,4.32,4.18,6.46,8.53,6.17,4.32,0,7-2.27,7.67-6.3l11-58.3a43.4,43.4,0,0,0,.4-4.87Z"/><path class="cls-4" d="M124.6,67.25A5.5,5.5,0,0,0,119.37,62h0c-2-.2-5.44.27-6.31,5.54l-8.43,50.92L89.77,66.56C88.52,62.8,86,62,84.05,62c-3.3,0-5.48,1.67-6.13,4.6l-14.57,51-8.28-50a6.31,6.31,0,0,0-2-4.47A5.71,5.71,0,0,0,48.74,62c-3.3.33-5.3,2.19-5.64,5.24v.16a18.52,18.52,0,0,0,.3,3.05h0v0a6.58,6.58,0,0,0,.12.74h0c.07.25.25.61.39,1.19l10.55,58.22c.94,4.08,3.6,6.24,7.6,6.24h0l.86,0c4.19,0,6.86-2.16,7.72-6.2L83.86,82.9l13.21,47.83c1.23,4.32,4.18,6.46,8.53,6.17,4.32,0,7-2.27,7.67-6.3l11-58.3a43.4,43.4,0,0,0,.4-4.87Z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 173.51 195.2"><defs><style>.cls-1{fill:#6f50b2;}.cls-2{fill:#493189;}.cls-3{fill:#f26c38;}.cls-4{fill:#fff;}</style></defs><title>dwg</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path class="cls-1" d="M119.86,0H31.92C14.3,0,0,13.79,0,30.8V164.4c0,17,14.29,30.8,31.93,30.8H141.58c17.63,0,31.93-13.79,31.93-30.8V51.76a25.67,25.67,0,0,0-7.94-18.49L139,7.66A27.6,27.6,0,0,0,119.86,0Zm0,0"/><path class="cls-2" d="M165.56,33.27,139,7.66A27.43,27.43,0,0,0,125.08.49V29.23c0,9.13,7.67,16.53,17.12,16.53h30.58a25.91,25.91,0,0,0-7.22-12.48Z"/><path class="cls-3" d="M96.7,105.41"/><path class="cls-2" d="M32.89,81.37H21c-2.65,0-4.1,1.46-4.1,4.1v42.7c0,2.65,1.46,4.1,4.1,4.1H34c13.61-.74,20.88-9.38,21.62-25.76C54.87,90.39,47.23,81.93,32.89,81.37Zm14.51,25.15c-.52,12.37-5.37,18.56-14.83,18.91H24.8V88.23H32C42,88.57,47.05,94.58,47.41,106.52Z"/><path class="cls-2" d="M110.25,80.84h0c-1.31-.13-3.59.18-4.18,3.69l-6,36L89.62,83.85c-.83-2.5-2.52-3-3.79-3a3.74,3.74,0,0,0-4.07,3.06l-10.3,36L65.61,84.59a4.22,4.22,0,0,0-1.32-3,4.24,4.24,0,0,0-6.61,2.72v.09A13.34,13.34,0,0,0,58,87l.07.21a2.15,2.15,0,0,1,.18.44l7.32,40.46a4.88,4.88,0,0,0,5.1,4.18h0c3.14.21,5.13-1.25,5.75-4.14l9.31-33.7L95,128.14c.78,2.73,2.57,4.16,5.17,4.16l.53,0c3,0,4.74-1.47,5.17-4.22l7.58-40.32a29.89,29.89,0,0,0,.28-3.35v-.1A3.64,3.64,0,0,0,110.25,80.84Z"/><path class="cls-2" d="M158.87,103.72a5.24,5.24,0,0,0-4.15-1.27H144.48c-2.47,0-3.83,1.27-3.83,3.65a3.88,3.88,0,0,0,3.83,3.75h7.79v1.76c-.86,9-5.2,13.57-13.17,14.09-9.65-.34-14.59-6.53-15.12-18.82.7-12.21,5.56-18.4,14.82-18.92a18.06,18.06,0,0,1,10.33,3.64c1.8,1.2,3.07,1.76,4.06,1.76h0A3.87,3.87,0,0,0,157,89.62l0-.24-.11-.22c-2.48-5.15-8.46-7.95-17.85-8.32-14.5.75-22.32,9.47-23.25,25.95v.11c1.11,16.29,8.66,24.84,22.48,25.4,14.37,0,21.75-8.11,21.94-24.06A5.69,5.69,0,0,0,158.87,103.72Z"/><path class="cls-4" d="M30.05,78.37H18.13c-2.65,0-4.1,1.46-4.1,4.1v42.7c0,2.65,1.46,4.1,4.1,4.1h13c13.61-.74,20.88-9.38,21.62-25.76C52,87.39,44.38,78.93,30.05,78.37Zm14.51,25.15c-.52,12.37-5.37,18.56-14.83,18.91H22V85.23h7.22C39.18,85.57,44.21,91.58,44.56,103.52Z"/><path class="cls-4" d="M107.41,77.84h0c-1.31-.13-3.59.18-4.18,3.69l-6,36L86.78,80.85c-.83-2.5-2.52-3-3.79-3a3.74,3.74,0,0,0-4.07,3.06l-10.3,36L62.76,81.59a4.22,4.22,0,0,0-1.32-3,4.24,4.24,0,0,0-6.61,2.72v.09a13.34,13.34,0,0,0,.29,2.6l.07.21a2.15,2.15,0,0,1,.18.44l7.32,40.46a4.88,4.88,0,0,0,5.1,4.18h0c3.14.21,5.13-1.25,5.75-4.14l9.31-33.7,9.31,33.71c.78,2.73,2.57,4.16,5.17,4.16l.53,0c3,0,4.74-1.47,5.17-4.22l7.58-40.32a29.89,29.89,0,0,0,.28-3.35v-.1A3.64,3.64,0,0,0,107.41,77.84Z"/><path class="cls-4" d="M156,100.72a5.24,5.24,0,0,0-4.15-1.27H141.63c-2.47,0-3.83,1.27-3.83,3.65a3.88,3.88,0,0,0,3.83,3.75h7.79v1.76c-.86,9-5.2,13.57-13.17,14.09-9.65-.34-14.59-6.53-15.12-18.82.7-12.21,5.56-18.4,14.82-18.92a18.06,18.06,0,0,1,10.33,3.64c1.8,1.2,3.07,1.76,4.06,1.76h0a3.87,3.87,0,0,0,3.74-3.74l0-.24-.11-.22c-2.48-5.15-8.46-7.95-17.85-8.32-14.5.75-22.32,9.47-23.25,25.95v.11c1.11,16.29,8.66,24.84,22.48,25.4,14.37,0,21.75-8.11,21.94-24.06A5.69,5.69,0,0,0,156,100.72Z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 173.51 195.2"><defs><style>.cls-1{fill:#9f9d9f;}.cls-2{fill:#6d6b6c;}.cls-3{fill:#f26c38;}.cls-4{fill:#fff;}</style></defs><title>未知</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path class="cls-1" d="M119.86,0H31.92C14.3,0,0,13.79,0,30.8V164.4c0,17,14.29,30.8,31.93,30.8H141.58c17.63,0,31.93-13.79,31.93-30.8V51.76a25.67,25.67,0,0,0-7.94-18.49L139,7.66A27.6,27.6,0,0,0,119.86,0Zm0,0"/><path class="cls-2" d="M165.56,33.27,139,7.66A27.43,27.43,0,0,0,125.08.49V29.23c0,9.13,7.67,16.53,17.12,16.53h30.58a25.91,25.91,0,0,0-7.22-12.48Z"/><path class="cls-3" d="M96.7,105.41"/><path class="cls-2" d="M81.27,126.41H81c-4.09.34-6.52,2.78-6.85,6.86v.26c.34,4.16,2.82,6.45,7,6.45s6.64-2.29,7-6.44v-.27C87.79,129.19,85.35,126.76,81.27,126.41Z"/><path class="cls-2" d="M105.15,81.35c-1.19-13-9.23-20.08-23.92-21H81c-13.24,1.18-20.71,7.09-22.2,17.56l0,.23c0,3.89,2.14,6.22,6,6.57h.14c2.34,0,4.23-1.58,5.61-4.68l.06-.15c1.7-5.12,5.13-7.61,10.47-7.63C88,72.81,91.49,76,92,82.39c0,5.6-2.79,8.78-8.76,10-4.85,1.21-6.3,2.24-7,2.91-.91.91-1.3,2.61-1.3,5.7v12c0,4.18,2.25,6.58,6.16,6.58s6.16-2.4,6.16-6.58v-9.53c11.56-2.88,17.57-10.28,17.86-22v-.18Z"/><path class="cls-4" d="M78.34,123.93h-.27c-4.09.34-6.52,2.78-6.85,6.86v.26c.34,4.16,2.82,6.45,7,6.45s6.64-2.29,7-6.44v-.27C84.85,126.71,82.41,124.28,78.34,123.93Z"/><path class="cls-4" d="M102.21,78.87c-1.19-13-9.23-20.08-23.92-21h-.24C64.82,59.09,57.35,65,55.86,75.47l0,.23c0,3.89,2.14,6.22,6,6.57H62c2.34,0,4.23-1.58,5.61-4.68l.06-.15c1.7-5.12,5.13-7.61,10.47-7.63,6.93.52,10.41,3.72,10.92,10.09,0,5.6-2.79,8.78-8.76,10-4.85,1.21-6.3,2.24-7,2.91-.91.91-1.3,2.61-1.3,5.7v12c0,4.18,2.25,6.58,6.16,6.58s6.16-2.4,6.16-6.58V101c11.56-2.88,17.57-10.28,17.86-22v-.18Z"/></g></g></svg>
\ No newline at end of file
import doc from "./doc.svg";
import dwg from "./dwg.svg";
import file from "./file.svg";
import pdf from "./pdf.svg";
import ppt from "./ppt.svg";
import psd from "./psd.svg";
import rar from "./rar.svg";
import video from "./video.svg";
import xlsx from "./xlsx.svg";
import zip from "./zip.svg";
export default {
doc,
dwg,
file,
pdf,
ppt,
psd,
rar,
video,
xlsx,
zip,
};
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 173.51 195.2"><defs><style>.cls-1{fill:#f55a5b;}.cls-2{fill:#cc373e;}.cls-3{fill:#f26c38;}.cls-4{fill:#fff;}</style></defs><title>pdf</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path class="cls-1" d="M119.86,0H31.92C14.3,0,0,13.79,0,30.8V164.4c0,17,14.29,30.8,31.93,30.8H141.58c17.63,0,31.93-13.79,31.93-30.8V51.76a25.67,25.67,0,0,0-7.94-18.49L139,7.66A27.6,27.6,0,0,0,119.86,0Zm0,0"/><path class="cls-2" d="M165.56,33.27,139,7.66A27.43,27.43,0,0,0,125.08.49V29.23c0,9.13,7.67,16.53,17.12,16.53h30.58a25.91,25.91,0,0,0-7.22-12.48Z"/><path class="cls-3" d="M96.7,105.41"/><path class="cls-2" d="M107.45,63.72h-45c-3.93,0-6.19,2.25-6.19,6.19v62.5c0,3.44,2.11,5.41,5.8,5.41s5.8-2,5.8-5.41V106.18h37.25c3.68,0,5.8-2,5.8-5.41v-.15A5.84,5.84,0,0,0,105.26,95H67.86v-20H107.6a5.82,5.82,0,0,0,5.64-5.64v-.15C113.25,65.69,111.14,63.72,107.45,63.72Z"/><path class="cls-4" d="M103.45,60.55h-45c-3.93,0-6.19,2.25-6.19,6.19v62.5c0,3.44,2.11,5.41,5.8,5.41s5.8-2,5.8-5.41V103h37.25c3.68,0,5.8-2,5.8-5.41v-.15a5.84,5.84,0,0,0-5.64-5.64H63.86v-20H103.6a5.82,5.82,0,0,0,5.64-5.64V66C109.25,62.52,107.14,60.55,103.45,60.55Z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 173.51 195.2"><defs><style>.cls-1{fill:#f98950;}.cls-2{fill:#f26c38;}.cls-3{fill:#fff;}</style></defs><title>ppt</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path class="cls-1" d="M119.86,0H31.92C14.3,0,0,13.79,0,30.8V164.4c0,17,14.29,30.8,31.93,30.8H141.58c17.63,0,31.93-13.79,31.93-30.8V51.76a25.67,25.67,0,0,0-7.94-18.49L139,7.66A27.6,27.6,0,0,0,119.86,0Zm0,0"/><path class="cls-2" d="M165.56,33.27,139,7.66A27.43,27.43,0,0,0,125.08.49V29.23c0,9.13,7.67,16.53,17.12,16.53h30.58a25.91,25.91,0,0,0-7.22-12.48Z"/><path class="cls-2" d="M98.69,63H59a5.34,5.34,0,0,0-5.42,5.24v66a5.43,5.43,0,0,0,10.84,0V116.87H98.7c15.4,0,27.91-12.08,27.91-26.94S114.09,63,98.69,63Zm0,43.43H64.43v-33H98.7c9.41,0,17.07,7.4,17.07,16.48S108.11,106.42,98.69,106.42Z"/><path class="cls-2" d="M96.7,105.41"/><path class="cls-3" d="M96.69,59.38H57a5.33,5.33,0,0,0-5.42,5.23v66a5.43,5.43,0,0,0,10.84,0V113.26H96.69c15.4,0,27.92-12.08,27.92-26.94S112.09,59.38,96.69,59.38Zm0,43.41H62.44v-33H96.69c9.42,0,17.08,7.4,17.08,16.48s-7.66,16.48-17.08,16.48Zm0,0"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 173.51 195.2"><defs><style>.cls-1{fill:#3555a5;}.cls-2{fill:#1a3772;}.cls-3{fill:#f26c38;}.cls-4{fill:#fff;}</style></defs><title>psd</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path class="cls-1" d="M119.86,0H31.92C14.3,0,0,13.79,0,30.8V164.4c0,17,14.29,30.8,31.93,30.8H141.58c17.63,0,31.93-13.79,31.93-30.8V51.76a25.67,25.67,0,0,0-7.94-18.49L139,7.66A27.6,27.6,0,0,0,119.86,0Zm0,0"/><path class="cls-2" d="M165.56,33.27,139,7.66A27.43,27.43,0,0,0,125.08.49V29.23c0,9.13,7.67,16.53,17.12,16.53h30.58a25.91,25.91,0,0,0-7.22-12.48Z"/><path class="cls-3" d="M96.7,105.41"/><path class="cls-2" d="M70.75,95.05V95C69.87,83.13,63.21,76.8,51,76.14H37.08c-3.08,0-4.77,1.69-4.77,4.77v50.26c0,2.67,1.58,4.14,4.46,4.14s4.46-1.47,4.46-4.14V113.95H51.31c11.8-1.09,18.34-7.42,19.44-18.81Zm-9.23,0c-.41,6.75-3.89,10.23-10.65,10.62H41.22V84.11h9.34C57.53,84.3,61.11,87.88,61.52,95Z"/><path class="cls-2" d="M91.44,99.44h0C84.37,97.09,80.8,94.23,80.8,91c.37-4.5,3.05-6.87,8.11-7.25a15,15,0,0,1,7.61,2,6.81,6.81,0,0,0,3.79,1.42c2.61-.26,4-1.73,4-4.14l0-.27c-1.19-4.26-6.1-6.66-15-7.33h-.14c-10.55.66-16.57,5.92-17.89,15.63v.14c0,7.14,5.4,12.64,16.07,16.34,7.47,2.56,11.26,5.73,11.26,9.33-.58,6.82-4.18,10.32-10.94,10.71a18.69,18.69,0,0,1-9.24-3,8.25,8.25,0,0,0-3.64-1.39c-1.55,0-4.14.62-4.14,4.77l0,.27c1.19,4.28,6.73,6.57,17,7,12.68-.44,19.56-6.67,20.44-18.59C108.13,109.16,102.51,103.35,91.44,99.44Z"/><path class="cls-2" d="M131.35,76.14H117.49c-3.08,0-4.77,1.69-4.77,4.77v49.63c0,3.08,1.69,4.77,4.77,4.77h15.13c15.81-.86,24.27-10.91,25.13-29.94C156.9,86.62,148,76.79,131.35,76.14Zm16.87,29.23c-.61,14.38-6.25,21.57-17.24,22h-9V84.11h8.39C142,84.51,147.81,91.49,148.22,105.37Z"/><path class="cls-4" d="M67.42,91.41v-.08c-.88-11.84-7.54-18.17-19.79-18.83H33.75c-3.08,0-4.77,1.69-4.77,4.77v50.26c0,2.67,1.58,4.14,4.46,4.14s4.46-1.47,4.46-4.14V110.31H48c11.8-1.09,18.34-7.42,19.44-18.81Zm-9.23,0c-.41,6.75-3.89,10.23-10.65,10.62H37.89V80.46h9.34C54.19,80.66,57.78,84.24,58.19,91.4Z"/><path class="cls-4" d="M88.11,95.8h0C81,93.44,77.47,90.59,77.46,87.4c.37-4.5,3.05-6.87,8.11-7.25a15,15,0,0,1,7.61,2A6.81,6.81,0,0,0,97,83.6c2.61-.26,4-1.73,4-4.14l0-.27c-1.19-4.26-6.1-6.66-15-7.33h-.14c-10.55.66-16.57,5.92-17.89,15.63v.14c0,7.14,5.4,12.64,16.07,16.34,7.47,2.56,11.26,5.73,11.26,9.33-.58,6.82-4.18,10.32-10.94,10.71a18.69,18.69,0,0,1-9.24-3,8.25,8.25,0,0,0-3.64-1.39c-1.55,0-4.14.62-4.14,4.77l0,.27c1.19,4.28,6.73,6.57,17,7,12.68-.44,19.56-6.67,20.44-18.59C104.8,105.52,99.18,99.71,88.11,95.8Z"/><path class="cls-4" d="M128,72.5H114.16c-3.08,0-4.77,1.69-4.77,4.77V126.9c0,3.08,1.69,4.77,4.77,4.77h15.13c15.81-.86,24.27-10.91,25.13-29.94C153.56,83,144.68,73.15,128,72.5Zm16.87,29.23c-.61,14.38-6.25,21.57-17.24,22h-9V80.46H127C138.63,80.87,144.48,87.85,144.89,101.73Z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 173.51 195.2"><defs><style>.cls-1{fill:#efa630;}.cls-2{fill:#9e5c0d;}.cls-3{fill:#f26c38;}.cls-4{fill:#fff;}</style></defs><title>rar</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path class="cls-1" d="M119.86,0H31.92C14.3,0,0,13.79,0,30.8V164.4c0,17,14.29,30.8,31.93,30.8H141.58c17.63,0,31.93-13.79,31.93-30.8V51.76a25.67,25.67,0,0,0-7.94-18.49L139,7.66A27.6,27.6,0,0,0,119.86,0Zm0,0"/><path class="cls-2" d="M165.56,33.27,139,7.66A27.43,27.43,0,0,0,125.08.49V29.23c0,9.13,7.67,16.53,17.12,16.53h30.58a25.91,25.91,0,0,0-7.22-12.48Z"/><path class="cls-3" d="M96.7,105.41"/><path class="cls-2" d="M32.68,136.33c2.87,0,4.46-1.47,4.46-4.14V112.76l20.28,22a5.23,5.23,0,0,0,3.85,1.55c3.6,0,4.14-2,4.14-3.2a5.24,5.24,0,0,0-1.52-3.81L47.18,110.88h.95c10.61-.66,16.11-6.49,16.33-17.31v-.11c-.89-9.94-7-15.42-18.27-16.3H33c-3.08,0-4.77,1.69-4.77,4.77v50.26C28.22,134.86,29.8,136.33,32.68,136.33Zm4.46-32.79V85.13h8.67c6,.39,9.18,3.28,9.75,8.77.09,3.36-.65,5.87-2.22,7.43s-4.08,2.31-7.46,2.22Z"/><path class="cls-2" d="M70.06,136.33c3,0,4-1.59,4.4-2.86L78,123.76h25.28l3.26,9.76a4.44,4.44,0,0,0,4.38,2.81c3.88,0,4.46-2.2,4.46-3.51a8.78,8.78,0,0,0-1-3.86L96.45,81.61c-1.22-4.2-3.92-5.08-6-5.08-2.76,0-4.77,1.7-6,5L66.94,129a8.78,8.78,0,0,0-1,3.85v.12C66.19,135.12,67.66,136.33,70.06,136.33ZM80.9,115.79l9.74-27.54,9.74,27.54Z"/><path class="cls-2" d="M123.15,136.33c2.87,0,4.46-1.47,4.46-4.14V112.76l20.28,22a5.23,5.23,0,0,0,3.85,1.55c3.6,0,4.14-2,4.14-3.2a5.27,5.27,0,0,0-1.53-3.83l-16.69-18.42h.95c10.61-.66,16.11-6.49,16.33-17.31v-.11c-.89-9.94-7-15.42-18.27-16.3H123.46c-3.08,0-4.77,1.69-4.77,4.77v50.26C118.69,134.86,120.27,136.33,123.15,136.33Zm4.46-32.79V85.13h8.67c6,.39,9.18,3.28,9.75,8.77.09,3.36-.65,5.87-2.22,7.43s-4.08,2.31-7.46,2.22Z"/><path class="cls-4" d="M29.47,133c2.87,0,4.46-1.47,4.46-4.14V109.38l20.28,22A5.23,5.23,0,0,0,58.06,133c3.6,0,4.14-2,4.14-3.2a5.24,5.24,0,0,0-1.52-3.81L44,107.51h.95C55.54,106.84,61,101,61.26,90.19v-.11c-.89-9.94-7-15.42-18.27-16.3H29.79c-3.08,0-4.77,1.69-4.77,4.77v50.26C25,131.48,26.6,133,29.47,133Zm4.46-32.79V81.75H42.6c6,.39,9.18,3.28,9.75,8.77.09,3.36-.65,5.87-2.22,7.43s-4.08,2.31-7.46,2.22Z"/><path class="cls-4" d="M66.85,133c3,0,4-1.59,4.4-2.86l3.53-9.71h25.28l3.26,9.76a4.44,4.44,0,0,0,4.38,2.81c3.88,0,4.46-2.2,4.46-3.51a8.78,8.78,0,0,0-1-3.86L93.25,78.24c-1.22-4.2-3.92-5.08-6-5.08-2.76,0-4.77,1.7-6,5L63.73,125.59a8.78,8.78,0,0,0-1,3.85v.12C63,131.75,64.46,133,66.85,133Zm10.84-20.53,9.74-27.54,9.74,27.54Z"/><path class="cls-4" d="M119.94,133c2.87,0,4.46-1.47,4.46-4.14V109.38l20.28,22a5.23,5.23,0,0,0,3.85,1.55c3.6,0,4.14-2,4.14-3.2a5.27,5.27,0,0,0-1.53-3.83l-16.69-18.42h.95c10.61-.66,16.11-6.49,16.33-17.31v-.11c-.89-9.94-7-15.42-18.27-16.3H120.25c-3.08,0-4.77,1.69-4.77,4.77v50.26C115.48,131.48,117.07,133,119.94,133Zm4.46-32.79V81.75h8.67c6,.39,9.18,3.28,9.75,8.77.09,3.36-.65,5.87-2.22,7.43s-4.08,2.31-7.46,2.22Z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 173.51 195.2"><defs><style>.cls-1{fill:#0a9ecc;}.cls-2{fill:#046c77;}.cls-3{fill:#f26c38;}.cls-4{fill:#fff;}</style></defs><title>资源 56</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path class="cls-1" d="M119.86,0H31.92C14.3,0,0,13.79,0,30.8V164.4c0,17,14.29,30.8,31.93,30.8H141.58c17.63,0,31.93-13.79,31.93-30.8V51.76a25.67,25.67,0,0,0-7.94-18.49L139,7.66A27.6,27.6,0,0,0,119.86,0Zm0,0"/><path class="cls-2" d="M165.56,33.27,139,7.66A27.43,27.43,0,0,0,125.08.49V29.23c0,9.13,7.67,16.53,17.12,16.53h30.58a25.91,25.91,0,0,0-7.22-12.48Z"/><path class="cls-3" d="M96.7,105.41"/><path class="cls-2" d="M125.59,82.84a39.33,39.33,0,1,0-8.41,43.07A39.32,39.32,0,0,0,125.59,82.84Zm-20,19.75-25,16.63a3.76,3.76,0,0,1-2.29.68,4.23,4.23,0,0,1-4.16-4.16V82.45l0-.49a4.16,4.16,0,0,1,6.21-3.12l.15.09,25.19,16.8a4.23,4.23,0,0,1-.08,6.87Z"/><path class="cls-4" d="M121.54,80.8a39.33,39.33,0,1,0-8.41,43.07A39.32,39.32,0,0,0,121.54,80.8ZM102.73,99.6l-25,16.63a3.76,3.76,0,0,1-2.29.68,4.23,4.23,0,0,1-4.16-4.16V79.45l0-.49a4.16,4.16,0,0,1,6.21-3.12l.15.09,25.19,16.8a4.23,4.23,0,0,1-.08,6.87Z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 173.51 195.2"><defs><style>.cls-1{fill:#1cb771;}.cls-2{fill:#04894a;}.cls-3{fill:#f26c38;}.cls-4{fill:#fff;}</style></defs><title>xlsx</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path class="cls-1" d="M119.86,0H31.92C14.3,0,0,13.79,0,30.8V164.4c0,17,14.29,30.8,31.93,30.8H141.58c17.63,0,31.93-13.79,31.93-30.8V51.76a25.67,25.67,0,0,0-7.94-18.49L139,7.66A27.6,27.6,0,0,0,119.86,0Zm0,0"/><path class="cls-2" d="M165.56,33.27,139,7.66A27.43,27.43,0,0,0,125.08.49V29.23c0,9.13,7.67,16.53,17.12,16.53h30.58a25.91,25.91,0,0,0-7.22-12.48Z"/><path class="cls-3" d="M96.7,105.41"/><path class="cls-2" d="M117.21,127.19l-25-28.58L112.75,75.4a5.41,5.41,0,0,0-8.1-7.17L85,90.4,65.51,68.1a5.41,5.41,0,0,0-8.14,7.12L77.8,98.57,52.62,127a5.42,5.42,0,0,0,.47,7.63h0a5.42,5.42,0,0,0,7.63-.47L85,106.77l24.09,27.54a5.41,5.41,0,0,0,8.14-7.12Z"/><path class="cls-4" d="M113.75,124.45l-25-28.58,20.54-23.21a5.41,5.41,0,0,0-8.1-7.17L81.57,87.66,62.06,65.37a5.41,5.41,0,0,0-8.14,7.12L74.34,95.83,49.16,124.28a5.42,5.42,0,0,0,.47,7.63h0a5.42,5.42,0,0,0,7.63-.47L81.52,104l24.09,27.54a5.41,5.41,0,0,0,8.14-7.12Z"/></g></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 173.51 195.2"><defs><style>.cls-1{fill:#d6519a;}.cls-2{fill:#a82f77;}.cls-3{fill:#f26c38;}.cls-4{fill:#fff;}</style></defs><title>zip</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><path class="cls-1" d="M119.86,0H31.92C14.3,0,0,13.79,0,30.8V164.4c0,17,14.29,30.8,31.93,30.8H141.58c17.63,0,31.93-13.79,31.93-30.8V51.76a25.67,25.67,0,0,0-7.94-18.49L139,7.66A27.6,27.6,0,0,0,119.86,0Zm0,0"/><path class="cls-2" d="M165.56,33.27,139,7.66A27.43,27.43,0,0,0,125.08.49V29.23c0,9.13,7.67,16.53,17.12,16.53h30.58a25.91,25.91,0,0,0-7.22-12.48Z"/><path class="cls-3" d="M92.7,105.41"/><path class="cls-2" d="M79.19,137.77c2.87,0,4.46-1.47,4.46-4.14,0-1.43-.58-3.83-4.46-3.83h-27L80.61,87.12C82.29,84.95,83,83.29,82.69,82s-1-3.39-4.76-3.39H46.83c-4.15,0-4.77,2.4-4.77,3.83s.62,4.14,4.77,4.14H70.72L42.2,129.36a8.8,8.8,0,0,0-1.39,4.27c0,1.4.65,3.81,5.08,4.14Z"/><path class="cls-2" d="M97.15,133.63V82.74c0-3.08-1.58-4.77-4.46-4.77s-4.46,1.69-4.46,4.77v50.89c0,2.67,1.58,4.14,4.46,4.14S97.15,136.3,97.15,133.63Z"/><path class="cls-2" d="M123.22,78.6H109.34c-3.08,0-4.77,1.69-4.77,4.77v50.26c0,2.67,1.58,4.14,4.46,4.14s4.46-1.47,4.46-4.14V116.41h10.09c11.8-1.09,18.34-7.42,19.44-18.8v-.17C142.13,85.59,135.47,79.26,123.22,78.6Zm10.57,18.9c-.41,6.75-3.89,10.23-10.65,10.62h-9.65V86.57h9.34C129.79,86.76,133.38,90.34,133.79,97.5Z"/><path class="cls-4" d="M75.49,134.47c2.87,0,4.46-1.47,4.46-4.14,0-1.43-.58-3.83-4.46-3.83h-27L76.91,83.83C78.59,81.65,79.25,80,79,78.69s-1-3.39-4.76-3.39H43.13c-4.15,0-4.77,2.4-4.77,3.83s.62,4.14,4.77,4.14H67L38.5,126.07a8.8,8.8,0,0,0-1.39,4.27c0,1.4.65,3.81,5.08,4.14Z"/><path class="cls-4" d="M93.45,130.33V79.44c0-3.08-1.58-4.77-4.46-4.77s-4.46,1.69-4.46,4.77v50.89c0,2.67,1.58,4.14,4.46,4.14S93.45,133,93.45,130.33Z"/><path class="cls-4" d="M119.52,75.3H105.64c-3.08,0-4.77,1.69-4.77,4.77v50.26c0,2.67,1.58,4.14,4.46,4.14s4.46-1.47,4.46-4.14V113.11h10.09c11.8-1.09,18.34-7.42,19.44-18.8v-.17C138.43,82.3,131.77,76,119.52,75.3Zm10.57,18.9c-.41,6.75-3.89,10.23-10.65,10.62h-9.65V83.27h9.34C126.09,83.47,129.68,87,130.09,94.21Z"/></g></g></svg>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<template>
<div
class="avatar"
:style="{
width: size,
height: size,
borderRadius: round ? '50%' : '5px',
}">
<img :src="src" v-if="src" />
<nameComp v-else :name="name!" :length="2" />
</div>
</template>
<script setup lang="ts">
interface Props {
src: string;
name: string;
size?: string;
round?: boolean;
}
withDefaults(defineProps<Props>(), {
size: "34px",
name: "",
src: "",
round: true,
});
</script>
<style lang="less" scoped>
.avatar {
display: flex;
align-items: center;
justify-content: center;
background-color: var(--blue);
border-radius: 50%;
color: white;
overflow: hidden;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
</style>
<template>
<span>{{ name }}</span>
</template>
<script setup>
const props = defineProps({
name: String, // 人名
});
</script>
<style lang="less" scoped>
span {
white-space: nowrap;
}
</style>
<template>
<component v-bind="$attrs" :is="renderCom" :name="show_name" />
</template>
<script setup lang="ts">
import { computed } from "vue";
// import WxComp from "./wx.vue";
import DdComp from "./dd.vue";
interface Props {
name: string;
length?: number;
}
const props = defineProps<Props>();
const renderCom = computed(() => DdComp);
const show_name = computed(() => {
if (props.length) {
return props.name.slice(0, props.length);
} else {
return props.name;
}
});
</script>
<template>
<ww-open-data ref="wwEl" :type="type" :openid="name" />
</template>
<script setup lang="ts">
import { shallowRef, watch, nextTick, onMounted } from "vue";
const props = defineProps({
type: {
type: String,
default: "userName",
},
name: String,
});
const wwEl = shallowRef();
watch(
() => props.name,
() => {
nextTick(() => {
// WWOpenData.bind(wwEl.value);
});
}
);
onMounted(() => {
// WWOpenData.bind(wwEl.value);
});
</script>
<template>
<van-popup
v-model:show="show"
:round="round"
:position="position"
@closed="emit('closed')">
<div class="popup_header" v-if="show_header">
<span class="title">{{ title }}</span>
<span
class="button plain"
v-if="show_cancel"
@click="emit('cancel')">
取消
</span>
<span class="button" v-if="show_confirm" @click="emit('confirm')">
确认
</span>
</div>
<slot />
</van-popup>
</template>
<script setup lang="ts">
import { ref, onMounted } from "vue";
import { PopupPosition } from "vant";
interface PopupProps {
round?: boolean;
position?: PopupPosition;
show_header?: boolean;
title?: string;
show_cancel?: boolean;
show_confirm?: boolean;
}
withDefaults(defineProps<PopupProps>(), {
position: "bottom",
height: "30%",
round: true,
show_header: true,
show_cancel: true,
show_confirm: true,
});
const emit = defineEmits(["confirm", "cancel", "closed"]);
const show = ref(false);
onMounted(() => {
show.value = true;
});
defineExpose({
show,
});
</script>
<style lang="less" scoped>
.popup_header {
display: flex;
align-items: center;
padding: 14px;
box-sizing: border-box;
.title {
flex: 1;
font-size: 16px;
font-weight: bold;
}
}
</style>
import { createApp } from "vue";
import Comp from "./index.vue";
import type { Props } from "./index.vue";
export const $select = (options: Props) => {
const container = document.createElement("div");
options.onHide = () => {
vm.unmount();
document.body.removeChild(container);
container.remove();
};
const vm = createApp(Comp, options as any);
vm.mount(container);
document.body.appendChild(container);
};
<template>
<popupComp
ref="popup_comp"
:title="title"
@closed="onHide"
@cancel="close"
@confirm="confirm">
<van-picker v-model="data" :show-toolbar="false" :columns="options" />
</popupComp>
</template>
<script setup lang="ts">
import popupComp from "@/components/popup/index.vue";
import { ref } from "vue";
export interface Props {
value?: string;
title?: string;
options: { text: string; value: string }[];
onHide?(): void;
onConfirm?(value: string): void;
}
const props = withDefaults(defineProps<Props>(), {});
const popup_comp = ref();
const data = ref<string[]>(props.value ? [props.value] : []);
const close = () => {
popup_comp.value.show = false;
};
const confirm = () => {
props.onConfirm?.(data.value[0]);
close();
};
</script>
<style lang="less" scoped></style>
import { createApp } from "vue";
import Comp from "./index.vue";
import type { Props } from "./index.vue";
export const $selectTime = (options: Props) => {
const container = document.createElement("div");
options.onHide = () => {
vm.unmount();
document.body.removeChild(container);
container.remove();
};
const vm = createApp(Comp, options as any);
vm.mount(container);
document.body.appendChild(container);
};
<template>
<popupComp
ref="popup_comp"
:title="title"
@confirm="confirm"
@closed="onHide"
@cancel="close">
<div class="date_time">
<div class="header" v-if="type == 'time'">
<span
class="day"
:class="{ active: active_tab == 'date' }"
@click="active_tab = 'date'">
{{ show_date }}
</span>
<span
class="time"
:class="{ active: active_tab == 'time' }"
@click="active_tab = 'time'">
{{ show_time }}
</span>
</div>
<div class="content">
<van-date-picker
v-if="active_tab == 'date'"
v-model="date"
:show-toolbar="false" />
<van-time-picker
v-if="active_tab == 'time'"
v-model="time"
:show-toolbar="false"
:columns-type="['hour', 'minute', 'second']" />
</div>
</div>
</popupComp>
</template>
<script setup lang="ts">
import popupComp from "@/components/popup/index.vue";
import { computed, ref } from "vue";
export interface Props {
title?: string;
onHide?(): void;
type?: "date" | "time";
onConfirm?(time: string): void;
}
const props = withDefaults(defineProps<Props>(), {
type: "date",
title: "选择时间",
});
const active_tab = ref("date");
const date = ref([]);
const show_date = computed(() => date.value.join("-"));
const time = ref(["00", "00", "00"]);
const show_time = computed(() => time.value.join(":"));
const popup_comp = ref();
const close = () => {
popup_comp.value.show = false;
};
const confirm = () => {
let value = show_date.value;
if (props.type == "time") {
value += " " + show_time.value;
}
props.onConfirm?.(value);
close();
};
</script>
<style lang="less" scoped>
.date_time {
display: flex;
flex-direction: column;
.header {
display: flex;
padding: 0 20px;
margin-bottom: 20px;
span {
flex: 1;
border: 1px solid var(--border_color);
height: 30px;
border-radius: 4px;
padding: 0 10px;
display: flex;
align-items: center;
&.active {
border-color: var(--blue);
color: var(--blue);
}
}
span:nth-of-type(1) {
margin-right: 14px;
}
}
}
</style>
import { computed, ref } from "vue";
import api from "@/api";
import { showToast } from "vant";
import { Team } from "@/utils/hook";
/**
* 获取 部门/人员列表
*/
export interface DeptInfo {
dept_name: string;
id: string;
parent_id?: string;
have_children: boolean;
[k: string]: any;
}
export interface UserInfo {
id: string;
avatar: string;
nickname: string;
phone: string;
departments: { dept_name: string; id: string }[];
character: any[];
roles: any[];
team_id: Team[];
[k: string]: any;
}
interface Config {
type: ["user" | "dept"]; // 类型
key: string; // 返回的key
title?: string; // 显示的标题
size?: number; // 最多选中数量
show_default_text?: string; // 默认显示文字
value?: any[]; // 选中的数据
}
export interface Props {
title?: string; // 弹窗标题
mask?: boolean; // 是否显示黑色model框
class?: string;
config: Config[];
onHide?(): void; // 关闭
onConfirm?(list: { [k: string]: (DeptInfo | UserInfo)[] }): void; // 确认
}
export const useUserList = (props: Props) => {
// 根部门
const rootDept = ref<DeptInfo>({} as DeptInfo);
// 选中菜单项
const tabs = ref("");
// 当前部门id 1:默认企业下根部门/人员
const nowDept = ref<DeptInfo>({} as DeptInfo);
// 部门列表 (key:上级部门id value:部门列表)
const depts = ref<{ [k: string]: DeptInfo[] }>({});
// 所有部门
const allDepts = computed<DeptInfo[]>(() => {
return Object.values(depts.value).flat(1);
});
// 人员列表 (key:上级部门id value:部门下的人员列表)
const users = ref<{ [k: string]: UserInfo[] }>({});
// 选中选择的项
const select_item = ref<Config>({} as Config);
// 选中的部门/人员列表
const selectedList = ref<{ [k: string]: any[] }>({});
// 是否有选择人员
const needSelectUser = computed(() =>
select_item.value.type!.includes("user")
);
// 是否有选择部门
const needSelectDept = computed(() =>
select_item.value.type!.includes("dept")
);
// 修改选中项
const changeSelectItem = (item: Config) => {
select_item.value = {
...item,
size: item.size || 1000,
};
tabs.value = item.type[0];
};
/**
* 根据父级部门id获取子部门
* @param id
*/
const getId2Dept = async (dept_id: string) => {
if (depts.value[dept_id] != undefined) return;
const msg: any = await api.user.getDeptByParentId({
_parent_id: dept_id,
});
if (msg.code == 0) {
depts.value[dept_id] = msg.data.data || [];
}
};
/**
* 根据父级部门id获取人员
* @param dept_id
*/
const getId2User = async (dept_id: string) => {
if (users.value[dept_id] != undefined) return;
const msg: any = await api.user.getUsersByDeptId({
id: dept_id,
});
if (msg.code == 0) {
users.value[dept_id] = msg.data.data || [];
}
};
/**
* 改变选中部门
* @param dept object
*/
const changeNowDept = async (dept: DeptInfo) => {
nowDept.value = dept;
await getId2Dept(dept.id);
await getId2User(dept.id);
};
/** 获取根部门 */
const getRootDept = async () => {
const msg = await api.user.getDeptByParentId({});
if (msg.code == 0) {
rootDept.value = msg.data.data[0];
await changeNowDept(rootDept.value);
}
};
/** 展示内容 */
// 获取部门的子部门
const getDept = (dept_id: string) => {
return depts.value[dept_id] || [];
};
// 获取部门的成员
const getUsers = (dept_id: string) => {
return users.value[dept_id] || [];
};
// 获取面包屑
const getBreadCrumbs = (dept_id: string): DeptInfo[] => {
if (dept_id == rootDept.value.id || !rootDept.value.id) return [];
const dept = allDepts.value.find((it) => it.id == dept_id)!;
return [...getBreadCrumbs(dept!.parent_id!), dept];
};
// 选中/取消 部门/人员
const select = (user_or_dept: { id: string }) => {
if (isSelected(user_or_dept)) {
const index = selectedList.value[select_item.value.key].findIndex(
(it) => it.id == user_or_dept.id
);
selectedList.value[select_item.value.key].splice(index, 1);
} else {
if (select_item.value.size == 1) {
selectedList.value[select_item.value.key] = [user_or_dept];
}
if (
selectedList.value[select_item.value.key].length <
select_item.value.size!
) {
selectedList.value[select_item.value.key].push(user_or_dept);
}
}
console.log("selectedList", selectedList.value);
clearSearch();
};
// 是否选中部门/人员
const isSelected = (user_or_dept: { id: string }) => {
return !!selectedList.value[select_item.value.key].find(
(it) => it.id == user_or_dept.id
);
};
// 是否显示全选
const show_all_select = (dept_id: string) => {
if (needSelectDept.value && depts.value[dept_id]?.length) {
return true;
}
if (needSelectUser.value && users.value[dept_id]?.length) {
return true;
}
return false;
};
// 全选
const allSelected = (dept_id: string) => {
// 取消全选
if (isAllSelected(dept_id)) {
if (needSelectDept.value) {
depts.value[dept_id].forEach((it) => select(it));
}
if (needSelectUser.value) {
users.value[dept_id].forEach((it) => select(it));
}
} else {
// 全部选中
if (needSelectDept.value) {
// 超出限制
if (
selectedList.value[select_item.value.key].length +
depts.value[dept_id].length >
select_item.value.size!
) {
showToast({
message: "全选超出数量限制,请手动选择",
position: "top",
});
return;
}
depts.value[dept_id].forEach((it) => {
if (!isSelected(it)) {
select(it);
}
});
}
if (needSelectUser.value) {
// 超出限制
if (
selectedList.value[select_item.value.key].length +
users.value[dept_id].length >
select_item.value.size!
) {
showToast({
message: "全选超出数量限制,请手动选择",
position: "top",
});
return;
}
users.value[dept_id].forEach((it) => {
if (!isSelected(it)) {
select(it);
}
});
}
}
};
// 是否全选
const isAllSelected = (dept_id: string) => {
const deptAllSelected = needSelectDept.value
? depts.value[dept_id]?.every?.((it) => isSelected(it))
: true;
const userAllSelected = needSelectUser.value
? users.value[dept_id]?.every?.((it) => isSelected(it))
: true;
return deptAllSelected && userAllSelected;
};
// 清空
const clearSelected = () => {
selectedList.value = props.config.reduce((pre: any, now) => {
pre[now.key] = [];
return pre;
}, {});
};
// 是否是部门
const isDept = (user_or_dept: any) => {
return !!user_or_dept.dept_name;
};
// 搜索
const search_name = ref("");
const search_dept = ref<DeptInfo[]>([]);
const search_user = ref<UserInfo[]>([]);
const getDeptUser = async () => {
if (!search_name.value) {
clearSearch();
return;
}
};
const clearSearch = () => {
search_name.value = "";
search_dept.value = [];
search_user.value = [];
};
return {
tabs,
rootDept,
nowDept,
allDepts,
depts,
users,
changeNowDept,
getDept,
getUsers,
getBreadCrumbs,
select,
isSelected,
isDept,
selectedList,
isAllSelected,
show_all_select,
allSelected,
needSelectUser,
needSelectDept,
search_name,
getDeptUser,
search_dept,
search_user,
clearSearch,
clearSelected,
getRootDept,
getId2Dept,
select_item,
changeSelectItem,
};
};
import { createApp } from "vue";
import Comp from "./index.vue";
import { initApp } from "@/utils/init";
import { Props } from "./hook";
export const $selectUserDept = (options: Props) => {
const container = document.createElement("div");
options.onHide = () => {
vm.unmount();
document.body.removeChild(container);
container.remove();
};
const vm = createApp(Comp, options as any);
initApp(vm);
vm.mount(container);
document.body.appendChild(container);
};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
export const login = async () => {};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment