GitBucket
4.6.0
Toggle navigation
Sign in
Files
Branches
1
Tags
Issues
Pull Requests
Labels
Milestones
Wiki
08335
/
hivui-platform-template
hivui平台项目模板
Browse code
@中文描述: 增加工具类
@升级登记:1 @同步后端:0 @同步数据库:0 @同步配置:0 @向下兼容:1
master
1 parent
069b318
commit
3f6a4729dcbe027a82199bc47b1508c16a2180d0
hhb
authored
on 30 Nov 2023
Showing
1 changed file
project/hivuiBirt/funclib/UserOperateUtil.js
Ignore Space
Show notes
View
project/hivuiBirt/funclib/UserOperateUtil.js
0 → 100644
/** * 用户操作工具类 * import { PushUtil } from "@/funclib/PushUtil" * * @author hhb * @date 2023-11-23 */ import axios from "@/funclib/AxiosUtil"; import { $CONST } from "@/funclib/ConstUtil"; const modelFilePath = '/platf/useroperate/entity/SysUseroperate.xml' export const UserOperateUtil = { // 查询操作表数据 getData(url,key, userId, type) { let param ={} let __body = {}; let cdion = { join: "and", items: [ { sign:"eq", name:"FKEY", dataType:"String", value:key, enable: true, }, { sign:"eq", name:"FUSERID", dataType:"String", value:userId, enable: true, }, { sign:"eq", name:"FTYPE", dataType:"String", value:type || 'pagecontrolstate', enable: true, }, ]} __body[$CONST.QUERYCDIONS] = cdion; // 附加数据集模型路径 param[$CONST.MODELFILEPATH] = modelFilePath; if(!param.pageSize){ param.pageSize = -1 } // 附加__body参数包 param[$CONST.__BODY] = JSON.stringify(__body); return axios.post(url, param).then(res =>{ let data = res[$CONST.DATAPACK]?.rows return data }).catch(e =>{ return false }) }, save(url, key, userId, type, obj){ let param ={} let data = { modelFilePath:modelFilePath, data:[ { $state: "rsOverride", FKEY: key, FUSERID: userId, FTYPE: type, FVALUE: obj } ] } param[$CONST.__BODY] = JSON.stringify([data]); axios.post(url, param).then(res =>{ }).catch(e =>{ }) } };
Show line notes below