cellsysBase/cellsysIconType.js

63 lines
1.6 KiB
JavaScript
Raw Normal View History

2025-02-20 10:46:46 +08:00
import {CellsysType, EditTask, EditType, Query, QueryTask, QueryType} from './cellsysUtil.js';
2024-08-14 16:20:56 +08:00
class CellsysIconType {
constructor(params) {
this.cellsysType = CellsysType.CellsysIcon;
if (!params) { params = {} };
this.id = params.id;
this.name = params.name;
}
queryIconTypeList() {
let query = new Query();
let queryTask = new QueryTask(QueryType.IconType);
return queryTask.execute(query);
}
}
2025-02-20 10:46:46 +08:00
/**
* 新增图标类型
* @param {*} cellsysObject
*/
export function saveIconType(cellsysObject) {
let editTask = new EditTask(EditType.saveIconType)
editTask.addParam("_name", cellsysObject.name)
editTask.addParam("_sort", cellsysObject.sort)
return editTask.execute()
}
/**
* 更新图标类型
* @param {*} cellsysObject
*/
export function updateIconType(cellsysObject) {
let editTask = new EditTask(EditType.updateIconType)
editTask.addParam("_id", cellsysObject.id)
editTask.addParam("_name", cellsysObject.name)
editTask.addParam("_sort", cellsysObject.sort)
return editTask.execute()
}
/**
* 删除图标类型
* @param {*} cellsysObject
*/
export function deleteIconType(cellsysObject) {
let editTask = new EditTask(EditType.deleteIconType)
editTask.addParam("_id", cellsysObject.id)
return editTask.execute()
}
/**
* 排序图标
* @param {*} data
*/
export function sortIconTypes(data) {
let editTask = new EditTask(EditType.sortIconType)
editTask.addParam('_icon_types', data)
return editTask.execute()
}
2024-08-14 16:20:56 +08:00
export default CellsysIconType