基于若依的ruoyi-nbcio流程管理系统一种简单的动态表单模拟测试实现(二)

简介: 基于若依的ruoyi-nbcio流程管理系统一种简单的动态表单模拟测试实现(二)

更多ruoyi-nbcio功能请看演示系统

gitee源代码地址

前后端代码: https://gitee.com/nbacheng/ruoyi-nbcio

演示地址:RuoYi-Nbcio后台管理系统

更多nbcio-boot功能请看演示系统

gitee源代码地址

后端代码: https://gitee.com/nbacheng/nbcio-boot

前端代码:https://gitee.com/nbacheng/nbcio-vue.git

在线演示(包括H5) : http://218.75.87.38:9888

这部分主要是讲前端

1、表单设计器的前端,添加两个,分别关联用户呢称与邮箱,如下:

2、生成的json包含字段名称与表名

3、模拟器的列表如下:

<!-- 列表标题与内容这个部分要根据配置动态根据主表信息来动态生成 -->
    <el-table v-loading="loading" :data="mainDataList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <div v-for="(item, i) in columnList">
        <el-table-column :label="item.__config__.label" align="center"
                         :width="item.style.width" :prop="item.__vModel__" />
      </div>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope"> <!-- 这个暂时固定,以后可根据配置动态生成按钮-->
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['workflow:flowConfig:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['workflow:flowConfig:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>

4、相应的数据调用

mounted() {
    const that = this;
    const formId =  that.$route.query && that.$route.query.formId;
    if (formId) {
      getForm(formId).then(res => {
        that.formConf = JSON.parse(res.data.content);
        console.log("getForm that.formConf",that.formConf);
        that.columnList = that.formConf.fields;
        console.log("getForm that.columnList",that.columnList);
        const tableName = that.formConf.mainTable;
        if(tableName) {
          getData(tableName).then(response => {
            console.log("getData response",response);
            that.mainDataList = response.data;
          })
        }
      })
    }
  },

5、效果图如下:


相关文章
|
2月前
|
移动开发 前端开发
基于若依的ruoyi-nbcio流程管理系统修复自定义业务表单的收回功能
基于若依的ruoyi-nbcio流程管理系统修复自定义业务表单的收回功能
25 1
|
2月前
基于若依的ruoyi-nbcio流程管理系统增加仿钉钉流程设计(七)
基于若依的ruoyi-nbcio流程管理系统增加仿钉钉流程设计(七)
26 1
基于若依的ruoyi-nbcio流程管理系统增加仿钉钉流程设计(七)
|
2月前
|
移动开发 前端开发
基于若依的ruoyi-nbcio流程管理系统自定义业务流程出现多个时相应的流程选择问题(二)
基于若依的ruoyi-nbcio流程管理系统自定义业务流程出现多个时相应的流程选择问题(二)
30 3
|
2月前
基于若依的ruoyi-nbcio流程管理系统增加仿钉钉流程设计(三)
基于若依的ruoyi-nbcio流程管理系统增加仿钉钉流程设计(三)
22 0
|
2月前
|
移动开发 前端开发
基于若依的ruoyi-nbcio流程管理系统一种简单的动态表单模拟测试实现(三)
基于若依的ruoyi-nbcio流程管理系统一种简单的动态表单模拟测试实现(三)
21 2
|
2月前
|
移动开发 前端开发
基于若依的ruoyi-nbcio流程管理系统一种简单的动态表单模拟测试实现(四)
基于若依的ruoyi-nbcio流程管理系统一种简单的动态表单模拟测试实现(四)
26 1
|
2月前
|
移动开发 前端开发 数据库
基于若依的ruoyi-nbcio流程管理系统一种简单的动态表单模拟测试实现(一)
基于若依的ruoyi-nbcio流程管理系统一种简单的动态表单模拟测试实现(一)
33 1
|
2月前
|
前端开发 数据库
基于若依的ruoyi-nbcio流程管理系统增加流程节点配置(二)
基于若依的ruoyi-nbcio流程管理系统增加流程节点配置(二)
32 1
|
2月前
|
移动开发 前端开发
基于若依的ruoyi-nbcio流程管理系统自定义业务实现一种简单的动态任务标题(续)
基于若依的ruoyi-nbcio流程管理系统自定义业务实现一种简单的动态任务标题(续)
22 1
|
2月前
|
移动开发 前端开发
基于若依的ruoyi-nbcio流程管理系统自定义业务实现一种简单的动态任务标题需求
基于若依的ruoyi-nbcio流程管理系统自定义业务实现一种简单的动态任务标题需求
35 1

热门文章

最新文章