{"_id":"@antu-toolkit/netoffice","_rev":"2-46c5531dfc486eb9fce16aee1066658e","name":"@antu-toolkit/netoffice","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@antu-toolkit/netoffice","version":"0.0.1","keywords":["workflow","netoffice","vue2","element-ui"],"author":{"name":"chenyuanyu"},"license":"Apache-2.0","_id":"@antu-toolkit/netoffice@0.0.1","maintainers":[{"name":"chenyuanyu","email":"1597028892@qq.com"}],"homepage":"http://sc.supermap.com/chenyuanyu/antu-toolkit-ui","dist":{"shasum":"6b1902f6aee5e09abdeb2ae37b6fc0f8aa3fb636","tarball":"https://registry.npmjs.org/@antu-toolkit/netoffice/-/netoffice-0.0.1.tgz","fileCount":27,"integrity":"sha512-7sNpOv2pBuhKUPD4HqY47PfLSCDNgcnGKZZ/jbGma29nICqUeb7P4m2GWsU9V05iL3+WSHUlx48642+s4KGBVw==","signatures":[{"sig":"MEYCIQDSIAZ29Q3kaWAzNm1REYhVLg2rPWLNK/pQcq9ai708/wIhAK+BLYVx60Gcn9C0k1WWfIRVMB3KZX/RgvrxlTDGW5aK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":378270},"main":"lib/netoffice.umd.min.js","_from":"file:antu-toolkit-netoffice-0.0.1.tgz","private":false,"scripts":{"build":"vue-cli-service build --target lib --name netoffice src/index.js"},"_npmUser":{"name":"chenyuanyu","email":"1597028892@qq.com"},"_resolved":"C:\\Users\\antucd\\AppData\\Local\\Temp\\f7c7ac7b561c43b2ed34d0bc9e1417cd\\antu-toolkit-netoffice-0.0.1.tgz","_integrity":"sha512-7sNpOv2pBuhKUPD4HqY47PfLSCDNgcnGKZZ/jbGma29nICqUeb7P4m2GWsU9V05iL3+WSHUlx48642+s4KGBVw==","repository":{"url":"http://sc.supermap.com/chenyuanyu/antu-toolkit-ui.git","type":"git"},"_npmVersion":"10.8.2","description":"工作流组件库","directories":{},"_nodeVersion":"20.19.4","dependencies":{"axios":"^1.6.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^2.7.16","less":"^4.5.1","v-viewer":"^1.7.4","viewerjs":"1.9.0","element-ui":"^2.15.14","less-loader":"^8.1.1","@vue/cli-service":"~5.0.0","vue-template-compiler":"^2.7.16"},"peerDependencies":{"vue":"^2.7.16","element-ui":"^2.15.14"},"_npmOperationalInternal":{"tmp":"tmp/netoffice_0.0.1_1772703166197_0.5261391056400209","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@antu-toolkit/netoffice","version":"0.0.2","private":false,"description":"工作流组件库","main":"lib/netoffice.umd.min.js","keywords":["workflow","netoffice","vue2","element-ui"],"author":{"name":"chenyuanyu"},"license":"Apache-2.0","peerDependencies":{"vue":"^2.7.16","element-ui":"^2.15.14"},"dependencies":{"axios":"^1.6.0"},"devDependencies":{"@vue/cli-service":"~5.0.0","less":"^4.5.1","less-loader":"^8.1.1","vue":"^2.7.16","element-ui":"^2.15.14","v-viewer":"^1.7.4","viewerjs":"1.9.0","vue-template-compiler":"^2.7.16"},"homepage":"http://sc.supermap.com/chenyuanyu/antu-toolkit-ui","repository":{"type":"git","url":"http://sc.supermap.com/chenyuanyu/antu-toolkit-ui.git"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build":"vue-cli-service build --target lib --name netoffice src/index.js"},"_id":"@antu-toolkit/netoffice@0.0.2","_integrity":"sha512-5OrRc/5fa6yIFsBdmROclf+P6c4K5Zu9XAAQykRRyIAbdsYX9ILF/em2JXDezNWhjtyIa05YlLNT+ZMfMwxxtw==","_resolved":"C:\\Users\\antucd\\AppData\\Local\\Temp\\c120fce4397920a51ccbec1c0011fdec\\antu-toolkit-netoffice-0.0.2.tgz","_from":"file:antu-toolkit-netoffice-0.0.2.tgz","_nodeVersion":"20.19.4","_npmVersion":"10.8.2","dist":{"integrity":"sha512-5OrRc/5fa6yIFsBdmROclf+P6c4K5Zu9XAAQykRRyIAbdsYX9ILF/em2JXDezNWhjtyIa05YlLNT+ZMfMwxxtw==","shasum":"47917e13b0aef4711788c51b51ad1f89a209f04c","tarball":"https://registry.npmjs.org/@antu-toolkit/netoffice/-/netoffice-0.0.2.tgz","fileCount":27,"unpackedSize":381182,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDB/F+qeIZOvqnfONXAQs8ySWiA8DDZFAdfTVnUpkg/xwIhALlz6YkwhuMHqqhwA2m4OmFLixXEDD+ojSEIvqlF7bmt"}]},"_npmUser":{"name":"chenyuanyu","email":"1597028892@qq.com"},"directories":{},"maintainers":[{"name":"chenyuanyu","email":"1597028892@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/netoffice_0.0.2_1773969057002_0.2852455995922736"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-05T09:32:46.088Z","modified":"2026-03-20T01:10:57.319Z","0.0.1":"2026-03-05T09:32:46.367Z","0.0.2":"2026-03-20T01:10:57.193Z"},"author":{"name":"chenyuanyu"},"license":"Apache-2.0","homepage":"http://sc.supermap.com/chenyuanyu/antu-toolkit-ui","keywords":["workflow","netoffice","vue2","element-ui"],"repository":{"type":"git","url":"http://sc.supermap.com/chenyuanyu/antu-toolkit-ui.git"},"description":"工作流组件库","maintainers":[{"name":"chenyuanyu","email":"1597028892@qq.com"}],"readme":"# @antu-toolkit/netoffice\r\n\r\n工作流组件库，基于 Vue 2.7 + Element UI 开发，提供完整的业务办理流程弹窗功能。\r\n\r\n## 功能特性\r\n\r\n- 📋 表单资源管理 - 支持制式表单、自定义组件、外部链接\r\n- 📎 附件管理 - 支持附件上传、下载、预览、删除\r\n- 🔄 流程办理 - 支持提交、回退、流转记录查看\r\n- 👥 用户选择 - 支持单流向/多流向提交，岗位内提交\r\n- 🔐 权限控制 - 细粒度的操作权限控制\r\n\r\n## 安装\r\n\r\n### NPM 安装\r\n\r\n```bash\r\nnpm install @antu-toolkit/netoffice\r\n# 或\r\nyarn add @antu-toolkit/netoffice\r\n# 或\r\npnpm add @antu-toolkit/netoffice\r\n```\r\n\r\n### 依赖要求\r\n\r\n1. 引用 **netovue.css**、**netovue.umd.js**\r\n2. 引用 **jQuery**\r\n3. 依赖\r\n\r\n```json\r\n{\r\n    \"vue\": \"^2.7.16\",\r\n    \"element-ui\": \"^2.15.14\"\r\n}\r\n```\r\n\r\n## 使用方式\r\n\r\n### 方式一：完整引入（推荐）\r\n\r\n```javascript\r\nimport Vue from 'vue'\r\nimport ElementUI from 'element-ui'\r\nimport NetOffice from '@antu-toolkit/netoffice'\r\nimport '@antu-toolkit/netoffice/lib/netoffice.css'\r\n\r\nVue.use(ElementUI)\r\nVue.use(NetOffice)\r\n```\r\n\r\n### 方式二：按需引入\r\n\r\n```javascript\r\nimport {WorkflowDialog} from '@antu-toolkit/netoffice'\r\nimport '@antu-toolkit/netoffice/lib/netoffice.css'\r\n\r\nexport default {\r\n    components: {\r\n        WorkflowDialog\r\n    }\r\n}\r\n```\r\n\r\n### 方式三：浏览器直接引入\r\n\r\n```html\r\n<!DOCTYPE html>\r\n<html>\r\n<head>\r\n    <!-- 引入 Element UI 样式 -->\r\n    <link rel=\"stylesheet\" href=\"https://unpkg.com/element-ui/lib/theme-chalk/index.css\">\r\n    <!-- 引入 netovue.css -->\r\n    <link rel=\"stylesheet\" href=\"./netoffice/netovue.css\">\r\n    <!-- 引入组件库样式 -->\r\n    <link rel=\"stylesheet\" href=\"./lib/netoffice.css\">\r\n</head>\r\n<body>\r\n    <div id=\"app\">\r\n        <workflow-dialog\r\n                :visible.sync=\"visible\"\r\n                :iid=\"iid\"\r\n                :wid=\"wid\"\r\n                :wiid=\"wiid\"\r\n        />\r\n    </div>\r\n\r\n    <!-- 引入 Vue -->\r\n    <script src=\"https://unpkg.com/vue@2.7.16/dist/vue.js\"></script>\r\n    <!-- 引入 Element UI -->\r\n    <script src=\"https://unpkg.com/element-ui/lib/index.js\"></script>\r\n    <!-- 引入 jQuery -->\r\n    <script src=\"https://unpkg.com/jquery/dist/jquery.js\"></script>\r\n    <!-- 引入 netovue.umd.js -->\r\n    <script src=\"./netoffice/netovue.umd.js\"></script>\r\n    <!-- 引入组件库 -->\r\n    <script src=\"./lib/netoffice.umd.js\"></script>\r\n\r\n    <script>\r\n        new Vue({\r\n            el: '#app',\r\n            data: {\r\n                visible: true,\r\n                iid: 'your-iid',\r\n                wid: 'your-wid',\r\n                wiid: 'your-wiid'\r\n            }\r\n        })\r\n    </script>\r\n</body>\r\n</html>\r\n```\r\n\r\n## 组件 API\r\n\r\n### WorkflowDialog 工作流弹窗\r\n\r\n工作流办理的核心组件，集成表单资源、附件管理、流程办理等功能。\r\n\r\n#### Attributes\r\n\r\n| 参数         | 说明      | 类型      | 可选值 | 默认值    | 必填 |\r\n|------------|---------|---------|-----|--------|----|\r\n| visible    | 是否显示弹窗  | Boolean | —   | false  | 是  |\r\n| title      | 弹窗标题    | String  | —   | \"业务办理\" | 否  |\r\n| iid        | 流程实例ID  | String  | —   | —      | 是  |\r\n| wid        | 工作流定义ID | String  | —   | —      | 是  |\r\n| wiid       | 工作项实例ID | String  | —   | ''     | 否  |\r\n| stepCtrlId | 步骤控制ID  | String  | —   | ''     | 否  |\r\n\r\n#### Events\r\n\r\n| 事件名           | 说明            | 回调参数                                   |\r\n|---------------|---------------|----------------------------------------|\r\n| before-submit | 提交前触发，可用于表单校验 | (iid, wiid, params, {resolve, reject}) |\r\n| after-submit  | 提交后触发         | (iid, wiid, params)                    |\r\n| close         | 弹窗关闭时触发       | —                                      |\r\n\r\n#### 方法\r\n\r\n通过 `ref` 可以调用组件内部方法：\r\n\r\n```vue\r\n\r\n<template>\r\n    <workflow-dialog ref=\"workflowRef\" .../>\r\n</template>\r\n\r\n<script>\r\n    export default {\r\n        methods: {\r\n            // 保存当前打开的资源\r\n            handleSave() {\r\n                this.$refs.workflowRef.saveOpenedResourceData()\r\n            }\r\n        }\r\n    }\r\n</script>\r\n```\r\n\r\n## 使用示例\r\n\r\n### 基础用法\r\n\r\n```vue\r\n\r\n<template>\r\n    <div>\r\n        <el-button @click=\"openDialog\">打开工作流</el-button>\r\n\r\n        <workflow-dialog\r\n            :visible.sync=\"dialogVisible\"\r\n            :iid=\"instanceId\"\r\n            :wid=\"workflowId\"\r\n            :wiid=\"workItemId\"\r\n            title=\"业务办理\"\r\n            @before-submit=\"handleBeforeSubmit\"\r\n            @after-submit=\"handleAfterSubmit\"\r\n            @close=\"handleClose\"\r\n        />\r\n    </div>\r\n</template>\r\n\r\n<script>\r\n    export default {\r\n        data() {\r\n            return {\r\n                dialogVisible: false,\r\n                instanceId: 'xxx',\r\n                workflowId: 'xxx',\r\n                workItemId: 'xxx'\r\n            }\r\n        },\r\n        methods: {\r\n            openDialog() {\r\n                this.dialogVisible = true\r\n            },\r\n            handleBeforeSubmit(iid, wiid, params, {resolve, reject}) {\r\n                // 执行表单校验\r\n                const valid = this.validateForm()\r\n                if (valid) {\r\n                    resolve() // 继续提交\r\n                } else {\r\n                    reject() // 阻止提交\r\n                }\r\n            },\r\n            handleAfterSubmit(iid, wiid, params) {\r\n                // 提交成功后的回调\r\n                this.$message.success('提交成功')\r\n            },\r\n            handleClose() {\r\n                console.log('弹窗已关闭')\r\n            },\r\n            validateForm() {\r\n                // 自定义校验逻辑\r\n                return true\r\n            }\r\n        }\r\n    }\r\n</script>\r\n```\r\n\r\n## 环境变量配置\r\n\r\n组件库依赖以下环境变量：\r\n\r\n| 变量名                              | 说明              | 示例                         |\r\n|----------------------------------|-----------------|----------------------------|\r\n| `VUE_APP_BASE_API`               | 接口基础路径          | `./`                       |\r\n| `VUE_APP_FILE_GATEWAY_KEY`       | 文件网关业务类型        | `default`                  |\r\n| `VUE_APP_FILE_GATEWAY_ZONE_CODE` | 文件网关区域代码        | `zone`                     |\r\n| `VUE_APP_FastDFS`                | FastDFS 文件服务器地址 | `http://file.example.com/` |\r\n\r\n## 注意事项\r\n\r\n1. **必须引入 Element UI**：组件库基于 Element UI 开发，使用前需确保已正确引入\r\n2. **Cookie 依赖**：组件内部通过 `token` 和 `userId` Cookie 进行身份认证\r\n3. **样式覆盖**：组件使用 `/deep/` 深度选择器，如需自定义样式请注意优先级\r\n4. **表单组件约定**：\r\n    - 制式表单组件需实现 `submitData(callback, isSave)` 方法\r\n    - 自定义组件需实现 `saveData(callback)` 方法\r\n    - Iframe 页面通过 `postMessage` 接收 `saveData` 命令\r\n\r\n## 更新日志\r\n\r\n### 0.0.1\r\n\r\n- 初始版本发布\r\n- 实现工作流弹窗基础功能\r\n- 支持表单资源、附件管理、流程办理\r\n\r\n## License\r\n\r\n[Apache-2.0](LICENSE)","readmeFilename":"README.md"}