提交 85664d58 authored 作者: hejie's avatar hejie

ci: 🎡 修改目录结构

上级 81598b93
......@@ -118,11 +118,11 @@ module.exports = function (plop) {
// path: `../src/views/{{lowerCase name}}/utils//rule.ts`,
// templateFile: "./view/utils/rule.hbs"
// });
// actions.push({
// type: "add",
// path: `../src/views/{{lowerCase name}}/utils//types.ts`,
// templateFile: "./view/utils/types.hbs"
// });
actions.push({
type: "add",
path: `../src/views/{{lowerCase name}}/types.ts`,
templateFile: "./view/types.hbs"
});
}
// 生成components文件夹
// if (data.hasComp) {
......
......@@ -6,7 +6,7 @@ import ReCol from "@/components/ReCol";
// 从当前目录的 utils/rule 文件导入表单验证规则
import { formRules } from "@/utils/rules//rule";
// 从当前目录的 utils/types 文件导入表单属性类型
import { FormProps } from "@/types/types";
import { FormProps } from "../types";
// 从当前目录的 hooks 文件导入公共 Hook
import { usePublicHooks } from "@/hooks/hooks";
......
......@@ -7,7 +7,7 @@ import { getDeptList, addDept, deleteDept, updateDept } from "@/api/systems";
import { usePublicHooks } from "@/hooks/hooks";
import { addDialog } from "@/components/ReDialog";
import { reactive, ref, onMounted, h } from "vue";
import type { FormItemProps } from "@/types/types";
import type { FormItemProps } from "./types";
import { cloneDeep, isAllEmpty, deviceDetection } from "@pureadmin/utils";
export function useDept() {
const form = reactive({
......
......@@ -6,7 +6,7 @@ import ReCol from "@/components/ReCol";
// 从当前目录的 utils/rule 文件导入表单验证规则
import { formRules } from "@/utils/rules//rule";
// 从当前目录的 utils/types 文件导入表单属性类型
import { FormProps } from "@/types/types";
import { FormProps } from "../types";
// 从当前目录的 hooks 文件导入公共 Hook
import { usePublicHooks } from "@/hooks/hooks";
......
......@@ -7,7 +7,7 @@ import { getDeptList, addDept, deleteDept, updateDept } from "@/api/systems";
import { usePublicHooks } from "@/hooks/hooks";
import { addDialog } from "@/components/ReDialog";
import { reactive, ref, onMounted, h } from "vue";
import type { FormItemProps } from "@/types/types";
import type { FormItemProps } from "./types";
import { cloneDeep, isAllEmpty, deviceDetection } from "@pureadmin/utils";
export function useDept() {
const form = reactive({
......
/**
* 部门表单单项属性接口
* 定义了部门表单中每个字段的类型和属性,用于规范部门相关表单数据的结构。
*/
interface FormItemProps {
/**
* 上级部门选项列表
* 每个选项是一个键值对对象,键为字符串类型,值为任意类型。
*/
higherDeptOptions: Record<string, unknown>[];
/**
* 上级部门 ID
* 用于标识当前部门所属的上级部门,为数字类型。
*/
parentId: number;
/**
* 部门名称
* 用于存储部门的具体名称,为字符串类型。
*/
name: string;
/**
* 部门负责人
* 记录部门负责人的姓名,为字符串类型。
*/
principal: string;
/**
* 联系电话
* 可以是字符串或数字类型,用于存储部门的联系电话。
*/
phone: string | number;
/**
* 邮箱地址
* 用于存储部门的联系邮箱,为字符串类型。
*/
email: string;
/**
* 排序值
* 用于对部门进行排序,为数字类型。
*/
sort: number;
/**
* 部门状态
* 用数字表示部门的状态,如启用、停用等。
*/
status: number;
/**
* 备注信息
* 用于存储关于部门的额外说明信息,为字符串类型。
*/
remark: string;
/**
* 部门 ID
* 可选属性,用于唯一标识一个部门,为数字类型。
*/
id?: number;
}
/**
* 部门表单属性接口
* 包含一个部门表单单项属性对象,用于规范整个部门表单的数据结构。
*/
interface FormProps {
/**
* 表单内联数据
* 包含部门表单各项属性的对象,类型为 FormItemProps。
*/
formInline: FormItemProps;
}
/**
* 导出部门表单单项属性和表单属性类型
* 方便在其他文件中引用这些类型,确保数据类型的一致性。
*/
export type { FormItemProps, FormProps };
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论