npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mwpress

v1.0.4

Published

npm 7.21.0 node v16.8 nvm use 16.8

Downloads

279

Readme

环境

 npm 7.21.0
 node v16.8
 nvm use 16.8

启动

 npm i
 npm run start
 npm run build
 npm link

发布

1. 修改版本,修改package.json
    "version": "1.0.1"

2. 打包
    npm run build

3. 登录npm
    npm login

4. 发布
    npm publish

使用

  1. 引用插件

    npm i mwpress
  2. main.js中

    import mwpressSrcc from "mwpress";
    Vue.use(mwpressSrcc, {baseURL: "http://ip:port", , tokenValue: "Bearer xxxxxxxxxxxxxxx"});
  3. 方法的使用

        import { WorkflowModule } from "mwpress";
               
        let wm = new WorkflowModule();
       
        //获取工作流模板Id
        let tId = await wm.workflow_templateId(wm.WorkflowTemplateType.Task);
    
        // 获取工作流列表 - 我发起的
        let wListInitial = await wm.workflow_List(wm.UserWorkflowGroup.Initial);
    
        // 获取工作流列表 - 待审批的
        let wListWaiting = await wm.workflow_List(wm.UserWorkflowGroup.Waiting);
    
        // 获取工作流列表 - 我审批的
        let wListApproved = await wm.workflow_List(wm.UserWorkflowGroup.Approved);
    
        //创建工作流
        let flow = await wm.workflow_create("[流程名称]", "[意见]", "[流程模板Id]");
    
        // 删除工作流
        let dFlag = await wm.workflow_remove("[流程Id]", "[意见]");
    
        // 通过工作流
        let tFlag = await wm.workflow_stepnext("[流程Id]", "[意见]");
    
        // 退回工作流
        let bFlag = await wm.workflow_stepback("[流程Id]", "[意见]");
    
        //获取审核记录
        let record = await wm.workflow_record("[流程Id]");
    
        // 获取所有节点
        let nodeArr = await wm.workflow_nodes("[流程Id]");
    
        // 获取活动节点
        let nodeActive = await wm.workflow_nodes_active("[流程Id]");

组件

  1. 审核意见

    <work-record></work-record>

    属性配置

    | 属性 | 类型 | 默认值 | 必填 | 参考 | | ----------------- | ------ | ------ | -----| ------------------------------------------------------- |
    | workflowId | Guid | "" | Y |14996f89-d6a7-4ae7-a20b-1c6a76e7b2b9 | | dataColumns_commit_prop | Array | [] | N |[{title: "用户",dataIndex: "userName"},{},{},{},{}] | | data_commit_prop | Array | [] | N |[{userName: "张总",comments: "无",time: "2022/12/22"}] |

    方法

    | 方法名 | 参数 | 默认值 | 必填 | 参考 | | ----------------- | ------ | ------ | ----- | ------------------------------------------------------- |
    | fun_refresh_data | 无 | | |await this.$refs.workRecord.fun_refresh_data(); |

    示例

    alt text

  2. 流程进度

    <work-speed :workflowId="workflowId"></work-speed>

    属性配置

    | 属性 | 类型 | 默认值 | 必填 | 参考 | | ----------------- | ------ | ------ | -----| ------------------------------------------------------- |
    | workflowId | Guid | "" | Y |14996f89-d6a7-4ae7-a20b-1c6a76e7b2b9 |

    方法

    | 方法名 | 参数 | 默认值 | 必填 | 参考 | | ----------------- | ------ | ------ | ----- | ------------------------------------------------------- |
    | fun_refresh_data | 无 | | |await this.$refs.workSpeed.fun_refresh_data(); |

    示例

    alt text

  3. 流程列表

    <work-list ></work-list>

    属性配置

    | 属性 | 类型 | 默认值 | 必填 | 参考 | 值范围 | | ----------------- | ------ | ------ | -----| ---------------- | ------------------------------- |
    | groupVal | String | "" | Y |2 | WorkflowModule.UserWorkflowGroup |

    方法属性

    | 方法名 | 参数 | 默认值 | 参考 | 参考 | | ----------------- | ------ | ------ | ---------------- | ----------------------------------------------- | | fun_choose_item_callback | item | null | [] | v-on="{ fun_choose_item: fun_choose_item }" |

    方法

    | 方法名 | 参数 | 类型 | 默认值 | 必填 | 参考 | | ----------------- | ------ | ------ | ------ | ----- | ------------------------------------------------------- |
    | fun_choose_item | itemId | Guid | "" | Y |this.$refs.workSpeed.fun_choose_item(itemId); | | fun_refresh_data | | | | |await this.$refs.workSpeed.fun_refresh_data( ); |

    示例 alt text

  4. 流程按钮

    <work-operation ></work-operation>

    属性配置

    | 属性 | 类型 | 默认值 | 必填 | 参考 | 说明 |
    | ----------------- | ------ | ------ | -----| ---------------- | ---------------- | | workflowId | Guid | "" | Y | 14996f89-d6a7-4ae7-a20b-1c6a76e7b2b9 | | | isShowCreate | Boolean | false | N | false | |
    | isShowNext | Boolean | true | N | true | |
    | isShowBack | Boolean | true | N | true | |
    | isShowRemove | Boolean | true | N | true | |
    | removeFunExpress | {} | | N | :removeFunExpress="{ funPrefix:removePrefix, funSuffix: removeExpand } | funPrefix:异步方法:方法执行前调用,funSuffix: 异步方法:方法执行后调用 |
    | nextFunExpress |{} | | N | :nextFunExpress="{ funPrefix:removePrefix,funSuffix: removeExpand } | funPrefix:异步方法:方法执行前调用,funSuffix: 异步方法:方法执行后调用 |
    | backFunExpress | {} | | N | :backFunExpress="{ funPrefix:removePrefix,funSuffix: removeExpand } | funPrefix:异步方法:方法执行前调用,funSuffix: 异步方法:方法执行后调用 |

    方法

    | 方法名 | 参数 | 类型 | 默认值 | 必填 | 参考 | | ----------------- | ------ | ------ | ------ | ----- | ------------------------------------------------------- |
    | fun_choose_item | itemId | Guid | "" | Y |this.$refs.workSpeed.fun_choose_item(itemId); |
    | fun_refresh_data | 无 | | | |await this.$refs.workRecord.fun_refresh_data(); |

    示例

    alt text