Browse Source

表单设计管理,底部快捷菜单管理

chenc 3 years ago
parent
commit
e3f77725bb

+ 26 - 1
src/api/api.js

@@ -112,6 +112,13 @@ const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', para
 const queryList=(params)=>getAction("/tbTableInfo/queryList",params)
 //修改
 const updateTbTableInfo=(params)=>putAction("/tbTableInfo/updateTbTableInfo",params)
+// 列表分页查询
+const getPageList = (params) => getAction('/tbTableInfo/getPageList', params)
+/**
+ * 删除
+ * @param {*} params {id:''}
+ */
+const scheduleDelete   = (params)=>deleteAction("/tbTableInfo/delete",params);
 
 //流程相关
 //批量保存显示列
@@ -119,6 +126,19 @@ const saveBuchColumnsShow = (params)=>postAction("/cdColumnsShow/saveBuchColumns
 //获取表单显示列
 const getColumnsShowList=(params)=>getAction("/cdColumnsShow/getColumnsShowList",params)
 
+//底部导航栏调用的接口
+/**根据当前人查询可设置为底部导航的菜单
+ *      let v_token = Vue.ls.get(ACCESS_TOKEN);
+        let params = {token:v_token};
+ * @param {*} params 
+ */
+const getUserPermissionByTokenBottom = (params)=>getAction("/sys/permission/getUserPermissionByTokenBottom",params);
+//根据登陆人查询底部快捷菜单
+const getListByCreateBy = (params)=>getAction("/system/bottomMenu/getListByCreateBy",params);
+//保存多条快捷菜单数据
+const addBatch = (params) => postAction('/system/bottomMenu/addBatch', params)
+
+
 export {
   // imgView,
   // doMian,
@@ -180,7 +200,12 @@ export {
   queryList,
   updateTbTableInfo,
   saveBuchColumnsShow,
-  getColumnsShowList
+  getColumnsShowList,
+  getPageList,
+  scheduleDelete,
+  getUserPermissionByTokenBottom,
+  getListByCreateBy,
+  addBatch
 }
 
 

+ 6 - 1
src/views/activiti/ProcessModelList.vue

@@ -60,7 +60,7 @@
 
     <!-- table区域-begin -->
     <a-table
-      :scroll="{x:2250,y:500}"
+      :scroll="{x:2450,y:500}"
       bordered
       ref="table"
       size="small"
@@ -75,6 +75,11 @@
           <span>{{i+1}}</span>
         </template>
       </a-table-column>
+      <a-table-column title="关联表单" data-index="businessTableName" :width="200" align="center" fixed="left">
+        <template slot-scope="t,r,i">
+          <span>{{t}}</span>
+        </template>
+      </a-table-column>
       <a-table-column title="流程名称" data-index="name" :width="200" align="center" fixed="left">
         <template slot-scope="t,r,i">
           <span>{{t}}</span>

+ 240 - 0
src/views/form-design/form-designer/list.vue

@@ -0,0 +1,240 @@
+<template>
+  <div>
+    <a-row :gutter="24">
+      <a-col :span="24">
+        <a-card>
+          <a-form layout="inline" @keyup.enter.native="query">
+            <a-row :gutter="24">
+              <a-col :md="6" :sm="8">
+                <a-form-item label="表单名称">
+                  <a-input placeholder="请输入表单名称" v-model="queryParam.text" />
+                </a-form-item>
+              </a-col>
+
+              <a-col :md="6" :sm="8">
+                <a-form-item label="表名">
+                  <a-input placeholder="请输入表名" v-model="queryParam.businessTable" />
+                </a-form-item>
+              </a-col>
+
+              <a-col :md="6" :sm="8">
+                <span style="float: left;overflow: hidden;">
+                  <a-button type="primary" @click="query" icon="search">查询</a-button>
+                  <a-button
+                    type="primary"
+                    @click="searchReset"
+                    icon="reload"
+                    style="margin-left: 8px"
+                  >重置</a-button>
+                </span>
+              </a-col>
+            </a-row>
+          </a-form>
+        </a-card>
+      </a-col>
+    </a-row>
+    <a-row :gutter="24">
+      <a-col :span="24">
+        <a-card style="margin-top:5px">
+          <!-- 操作按钮 -->
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <a-button @click="editFormsOnline" type="primary">在线编辑表单</a-button>
+            </a-col>
+          </a-row>
+          <!-- 数据表 -->
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <a-table
+                ref="table"
+                bordered
+                :columns="columns"
+                :dataSource="planList"
+                :pagination="pagination"
+                :rowKey="record => record.id"
+                @change="handleTableChange"
+                style="height:100%;margin-top:5px"
+              >
+                <span slot="type" slot-scope="text, record">
+                  <a-tag color="cyan" v-if="record.type=='1'">PC端</a-tag>
+                  <a-tag color="blue" v-if="record.type=='2'">钉钉端</a-tag>
+                </span>
+                <!-- 操作 -->
+                <span slot="operationSlot" slot-scope="text, record">
+                  <a href="javascript:void(0);" @click="edit(record)">编辑</a>
+                  <a-divider type="vertical" />
+
+                  <a-popconfirm
+                    title="确定删除吗?"
+                    ok-text="是"
+                    cancel-text="否"
+                    @confirm="deleteRow(record)"
+                  >
+                    <a href="javascript:void(0);" class="delRed">删除</a>
+                  </a-popconfirm>
+                </span>
+              </a-table>
+            </a-col>
+          </a-row>
+        </a-card>
+      </a-col>
+    </a-row>
+    <!-- 表单编辑器 -->
+    <a-drawer
+      title="编辑器"
+      width="100%"
+      style="top:0%;height: 100%;"
+      :visible="editorVisible"
+      @close="editFromClose"
+    >
+      <iframe
+        :src="editorJumpUrl"
+        width="100%"
+        height="800"
+        frameborder="0"
+        scrolling="auto"
+        id="iframename"
+        name="iframename"
+      ></iframe>
+      <div
+        :style="{
+          position: 'absolute',
+          right: 0,
+          bottom: 0,
+          width: '100%',
+          borderTop: '1px solid #e9e9e9',
+          padding: '10px 16px',
+          background: '#fff',
+          textAlign: 'right',
+          zIndex: 1,
+        }"
+      >
+        <a-popconfirm placement="leftBottom" title="是否关闭?" ok-text="是" cancel-text="否" @confirm="editFromClose">
+          <a-button :style="{ marginRight: '8px' }">关闭</a-button>
+        </a-popconfirm>
+      </div>
+    </a-drawer>
+  </div>
+</template>
+
+<script>
+import { getPageList, scheduleDelete } from '@/api/api'
+import { getEditorJumpUrl } from '../../../../url.config'
+import notification from 'ant-design-vue/es/notification'
+export default {
+  data() {
+    return {
+      queryParam: {
+        pageNo: 1
+      },
+      planList: [], // 列表数据
+      pagination: {
+        total: 0,
+        current: 0,
+        pageSize: 0
+      }, // 分页
+      // 表头
+      columns: [
+        {
+          title: '表单名称',
+          dataIndex: 'text',
+          align: 'left'
+        },
+        {
+          title: '表名',
+          dataIndex: 'businessTable',
+          align: 'left'
+        },
+        {
+          title: '表单类型',
+          dataIndex: 'type',
+          align: 'left',
+          scopedSlots: { customRender: 'type' }
+        },
+        {
+          title: '步骤描述',
+          dataIndex: 'stepMemo',
+          align: 'left'
+        },
+        {
+          title: '创建时间',
+          dataIndex: 'createTime',
+          align: 'left'
+        },
+        {
+          title: '操作',
+          dataIndex: 'operation',
+          scopedSlots: { customRender: 'operationSlot' },
+          align: 'left'
+        }
+      ],
+      editorJumpUrl: '',
+      editorVisible: false
+    }
+  },
+  created() {
+    this.getPageList()
+  },
+  methods: {
+    //查询按钮
+    query() {
+      this.queryParam.pageNo = 1
+      this.getPageList()
+    },
+    //重置按钮
+    searchReset() {
+      this.queryParam = { pageNo: 1 }
+    },
+    //初始查询
+    getPageList() {
+      getPageList(this.queryParam).then(res => {
+        if (res.success) {
+          this.planList = res.result.records
+          this.pagination = {
+            // 分页信息赋值
+            total: res.result.total,
+            current: res.result.current,
+            pageSize: res.result.size
+          }
+        }
+      })
+    },
+    // 分页、排序、筛选变化时触发
+    handleTableChange(pagination, filters, sorter) {
+      this.queryParam.pageNo = pagination.current
+      this.getPageList()
+    },
+    edit(record) {
+      this.editorVisible = true
+      // window.open(getEditorJumpUrl()+'/#/formDesign?tableName='+r.businessTable, '_blank')//测试地址
+      this.editorJumpUrl = getEditorJumpUrl() + '/#/formDesign?tableName=' + record.businessTable
+    },
+    //删除
+    deleteRow(record) {
+      scheduleDelete({ id: record.id }).then(response => {
+        if (response.success) {
+          notification.success({
+            message: '删除成功'
+          })
+          this.getPageList()
+        } else {
+          notification.success({
+            message: '删除失败',
+            description: response.message
+          })
+        }
+      })
+    },
+    editFormsOnline() {
+      //在线编辑表单
+      this.editorVisible = true
+      this.editorJumpUrl = getEditorJumpUrl() + '/#/formDesign'
+    },
+    //编辑表单弹框关闭按钮
+    editFromClose() {
+      this.editorVisible = false
+      this.editorJumpUrl = ''
+    }
+  }
+}
+</script>