0.1.0 • Published 1 year ago

zzlq-process v0.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

ZZLQ-PROCESS 审批流程

主要应用于郑州路桥项目中审批模块


使用方法

1. 加入郑州路桥环境变量到本地存储中,用于打包以及不同环境下测试与打包,可在引入路由前加入

// 将环境变量加入缓存 
// 配合 zzlq-process 模块传递环境变量
localStorage.clear("env");
localStorage.set("env", JSON.stringify(process.env));

1. 入口 main.js 文件

// 注意项目组件根据 elementUI 构建界面,需引入 elementUI 模块
import zzlqProcess from 'zzlq-process'
Vue.use(zzlqProcess);

2. 参数说明

参数说明类型填写说明默认值
queryInfo审批流程的类型与中文名称必填Object{name:"公告管理",type:"notice"}
formBuilder表单相关必填String""
path路由地址(无特殊要求传递 $route.path必填String"/index"
userInfo用户信息(无特殊要求传递 $store.state.user )必填Object--

3. App.vue 使用示例:

<template>
    <div>
        <!-- 流程模块 -->
        <Process 
            :queryInfo="$route.query" 
            :formBuilder="$store.state.formBuilder"
            :path="$route.path"
            :userInfo="$store.state.user"
        />
    </div>
</template>

<script>
export default {
  created(){
    // 此处示例审批参数从地址 GET 传参中获取
    this.queryInfo = this.$route.query
  },
  data(){
    return{
      queryInfo:{ type: "overTimeApply", name: "加班申请" }
    }
  }
}
</script>

<style lang="sass">
</style>