|
|
@@ -73,6 +73,26 @@ import {
|
|
|
import { mapGetters } from "vuex";
|
|
|
|
|
|
/**
|
|
|
+ * 分类数据类型定义
|
|
|
+ * @typedef {Object} CategoryItem
|
|
|
+ * @property {number} id - 分类ID
|
|
|
+ * @property {string} name - 分类名称
|
|
|
+ * @property {number} sortOrder - 排序
|
|
|
+ * @property {number} orgId - 组织ID
|
|
|
+ * @property {string} orgCode - 组织编码
|
|
|
+ * @property {string} orgName - 组织名称
|
|
|
+ * @property {number} isSystem - 是否系统分类 (0-否, 1-是)
|
|
|
+ * @property {string} remark - 备注
|
|
|
+ * @property {number} createUser - 创建用户ID
|
|
|
+ * @property {number} createDept - 创建部门ID
|
|
|
+ * @property {string|null} createTime - 创建时间
|
|
|
+ * @property {number|null} updateUser - 更新用户ID
|
|
|
+ * @property {string|null} updateTime - 更新时间
|
|
|
+ * @property {number} status - 状态 (0-禁用, 1-启用)
|
|
|
+ * @property {number} isDeleted - 是否删除 (0-否, 1-是)
|
|
|
+ */
|
|
|
+
|
|
|
+/**
|
|
|
* 分类表单数据类型
|
|
|
* @typedef {Object} CategoryForm
|
|
|
* @property {number} [id] - 分类ID(编辑时存在)
|
|
|
@@ -101,7 +121,7 @@ export default {
|
|
|
/** @type {CategoryForm} 表单数据 */
|
|
|
form: {},
|
|
|
|
|
|
- /** @type {Array<import('@/api/announcement/category').CategoryItem>} 选中的行数据 */
|
|
|
+ /** @type {Array<CategoryItem>} 选中的行数据 */
|
|
|
selectionList: [],
|
|
|
|
|
|
/** @type {QueryParams} 查询条件 */
|
|
|
@@ -110,7 +130,7 @@ export default {
|
|
|
/** @type {boolean} 表格加载状态 */
|
|
|
loading: true,
|
|
|
|
|
|
- /** @type {Array<import('@/api/announcement/category').CategoryItem>} 表格数据 */
|
|
|
+ /** @type {Array<CategoryItem>} 表格数据 */
|
|
|
data: [],
|
|
|
|
|
|
/** @type {Object} 表格配置选项 */
|
|
|
@@ -326,7 +346,7 @@ export default {
|
|
|
|
|
|
/**
|
|
|
* 状态变更处理
|
|
|
- * @param {import('@/api/announcement/category').CategoryItem} row - 行数据
|
|
|
+ * @param {CategoryItem} row - 行数据
|
|
|
*/
|
|
|
handleStatusChange(row) {
|
|
|
const statusText = row.status === 1 ? '启用' : '禁用';
|
|
|
@@ -391,7 +411,7 @@ export default {
|
|
|
|
|
|
/**
|
|
|
* 行删除回调
|
|
|
- * @param {import('@/api/announcement/category').CategoryItem} row - 行数据
|
|
|
+ * @param {CategoryItem} row - 行数据
|
|
|
* @param {number} index - 行索引
|
|
|
*/
|
|
|
rowDel(row, index) {
|
|
|
@@ -481,7 +501,7 @@ export default {
|
|
|
|
|
|
/**
|
|
|
* 选择变化回调
|
|
|
- * @param {Array<import('@/api/announcement/category').CategoryItem>} list - 选中的行数据列表
|
|
|
+ * @param {Array<CategoryItem>} list - 选中的行数据列表
|
|
|
*/
|
|
|
selectionChange(list) {
|
|
|
this.selectionList = list;
|