# qms-rollup

> qms-js

Latest version **2.0.8** (published 2023-03-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install qms-rollup
pnpm add qms-rollup
yarn add qms-rollup
bun add qms-rollup
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.8 |
| Published | 2023-03-03 |
| First published | 2022-02-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 96.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | burgess-orange |
| Maintainers | weiwoyunying |

## Links

- npm: https://www.npmjs.com/package/qms-rollup
- npm.io page: https://npm.io/package/qms-rollup

## Recent versions

- 2.0.8 (latest) — 2023-03-03
- 2.0.7 — 2023-03-03
- 2.0.6 — 2023-02-27
- 2.0.5 — 2023-02-21
- 2.0.4 — 2023-02-21
- 2.0.3 — 2023-02-20
- 2.0.2 — 2023-02-17
- 2.0.1 — 2023-02-14
- 2.0.0 — 2023-02-14
- 1.0.18 — 2023-02-07
- 1.0.17 — 2023-02-07
- 1.0.16 — 2022-11-18
- 1.0.15 — 2022-06-09
- 1.0.14 — 2022-05-12
- 1.0.13 — 2022-03-25
- … 8 more at https://npm.io/package/qms-rollup/versions

## README

## 内网限制-npm

### 2.0.0版本不支持旧版__UNI__01E620B小程序

### 原npm

npm config set registry https://registry.npmjs.org 

### 国内镜像
npm config set registry https://registry.npm.taobao.org



## 安装依赖
npm install

## 编译代码
npm run build


## 业务场景使用说明
```
引入依赖包
npm install qms-test-rollup

import { BGYDataManagerPlugin } from 'qms-test-rollup'

<!-- 示例 -->
BGYDataManagerPlugin.executeSQL(selectsql).then(res1 => {
  // 业务逻辑
})
```

### aboutWkapi
```
let customParam = {
  clickTime: new Date().getTime(),
  endTime: '',
  catalogLevel: '一级分类',
  tabName: '首页',
  generalName: '区域首页',
  ru: '首页_区域首页_管理体检_安全质量风险',
  isJump: 1
}
// 接口调用后
customParam.endTime = new Date().getTime();
this.$aboutWkapi.personalInit(customParam);
```

### basedata

### BGYDataManagerPlugin
```
// 操作原生数据库
BGYDataManagerPlugin.executeSQL("select * from xxx") 

//重新触发离线队列
BGYDataManagerPlugin.reStartOfflineQueue() 

//图片预览(原生已下载的图片显示)
let params = {pathList:["/storage/..."],position:index}
BGYDataManagerPlugin.previewImage(params)

// 拍照
let params = {
	type(必传)(1.普通拍照。2.快慢拍。3。连拍（问题管理）。)
	sourceType(camera：type为1的拍照，album：type为1的相册，normal：type为2的普通拍照，snapshot：type为2的快排。为空不直接跳转)
	count(支持最大图片数，默认9)
	isWater(是否需要水印)
	projectName(项目名称)
}
BGYDataManagerPlugin.jumpToAlbum(params);  //[{ base64 压缩图的图片, realPath 原生图片存储路径 }]
// 失败 null

let params = {
	type(必传)(4.连拍（问题清单）)
	sourceType(camera：type为1的拍照，album：type为1的相册，normal：type为2的普通拍照，snapshot：type为2的快排。为空不直接跳转)
	count(支持最大图片数，默认9)
	isWater(是否需要水印)
	projectName(项目名称)
	isAddQuestion(是否问题图片，1或2)
	pathList(回显图片)
}
BGYDataManagerPlugin.jumpToAlbum(params,cb);  //{isEdit:0(保存)/1(编辑问题), pic:[{base64,realPath}]}
// 关闭和系统返回回参 {isEdit: -1,	pic:[{base64,realPath}] //有图片则回传图片，没图片则为[]}

// 上传图片 Array
BGYDataManagerPlugin.upload(files,cb)
// 回参
[{
	fileId: "37D1C45227754B25875386FFD6344BF4"
	fileName: "chucuola.jpg"
	saveType: "1"
	filePath: 服务端存储地址
	fileSize: 13571
	fileContentType: "image/jpg"
	localPath: 本地图片地址
}]
上传错误对象
[{
	localPath 本地图片路径
	errorReason 错误信息
}]

// 
BGYDataManagerPlugin.delete(file)

// 下载图片 Array
BGYDataManagerPlugin.download(file,cb)

// 小程序跳转小程序
BGYDataManagerPlugin.openNewProgram(params) // {id(跳转到的appid),url(跳转到的路径，如pages/demo/demo?test=true)}
```

### domain

### globalData
```
// 存储已选项目到storage
globalData.setSelectProject(data)

// 读取已选项目
globalData.getSelectProject()
```

### nativeApp
```
nativeApp.getAppUserInfo() // 获取app的登录信息-[promise的方式]
nativeApp.loginOut() // [native Event]退出登录
nativeApp.setLoginInfoCache() // 缓存app的登录信息
nativeApp.clearLoginInfoCache() // 清空app的登录缓存信息
nativeApp.clearBusinessCache() // 清空业务缓存
```

### user
```
user.getUserInfo()
const data = {
  "sessionId": res.sessionId,
  "access_token": res.access_token,
  "userId": res.userId,
  "tag": 'login',
  "userType": "bip"
}
user.setUserInfo(data) 

user.getUserObject()
// data: queryMyUserInfo接口返回数据
user.setUserObject(data)

user.getUserId() // 用户BIP
user.getSessionId() // SessionId
user.getAccessToken() // globalTokenId

// 用户
user.getUserRoleInfo() // return {orgLeve:min,roleType:max,roleId:roleobj[max]} orgLeve:最大的组织级别 roleType：最大级别预警审批角色 roleId:最大级别预警审批角色的roleId
```

### VThread
```
// 初始化
let thread=new BatchThread(callback)
// 按顺序add函数
thread.add((loop)=>{})
// 开始
thread.start()
```

### weblog
```
weblog.info(arg0,arg1,arg2,arg3,arg4,arg5)
weblog.debug(arg0,arg1,arg2,arg3,arg4,arg5)
weblog.error(arg0,arg1,arg2,arg3,arg4,arg5)
let config = {
  pageSize:20000,
  callback(rows){}
}
weblog.list(config)
```

---
_Source: https://npm.io/package/qms-rollup · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
