浏览代码

表单、模板、流程增加标记定制化功能

cfort 2 年之前
父节点
当前提交
58829ec287

+ 4 - 3
src/assets/styles/components/card-list.scss

@@ -154,9 +154,10 @@
 
     .ibps-card-list__item-symbol {
       position: absolute;
-      top: 60px;
-      left: 53px;
-      text-align: center;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%, -50%);
+    //   text-align: center;
       font-size: 40px;
 
       i {

+ 6 - 3
src/business/platform/bpmn/setting/bpmn-setting/mixins/addRecord.js

@@ -17,7 +17,7 @@ export default {
                 if (!data.length) {
                     return
                 }
-                const { bao_biao_lu_jing_, fu_jian_nei_rong_, shi_fou_zi_biao_, guan_lian_zi_duan, ti_jiao_kuai_zhao, bo_hui_kuai_zhao_ } = data[0]
+                const { bao_biao_lu_jing_, fu_jian_nei_rong_, shi_fou_zi_biao_, guan_lian_zi_duan, ti_jiao_kuai_zhao, bo_hui_kuai_zhao_, is_custom_ } = data[0]
                 Object.assign(this, {
                     bao_biao_lu_jing_,
                     fu_jian_nei_rong_,
@@ -25,7 +25,8 @@ export default {
                     guan_lian_zi_duan,
                     liu_cheng_xuan_ze: id,
                     ti_jiao_kuai_zhao,
-                    bo_hui_kuai_zhao_
+                    bo_hui_kuai_zhao_,
+                    is_custom_
                 })
             })
         },
@@ -49,6 +50,7 @@ export default {
                     shi_fou_zi_biao_: this.shi_fou_zi_biao_,
                     ti_jiao_kuai_zhao: this.ti_jiao_kuai_zhao,
                     bo_hui_kuai_zhao_: this.bo_hui_kuai_zhao_,
+                    is_custom_: this.is_custom_,
                     gui_dang_lei_xing: 'process'
                 }]
             }
@@ -72,7 +74,8 @@ export default {
                             guan_lian_zi_duan: this.guan_lian_zi_duan,
                             shi_fou_zi_biao_: this.shi_fou_zi_biao_,
                             ti_jiao_kuai_zhao: this.ti_jiao_kuai_zhao,
-                            bo_hui_kuai_zhao_: this.bo_hui_kuai_zhao_
+                            bo_hui_kuai_zhao_: this.bo_hui_kuai_zhao_,
+                            is_custom_: this.is_custom_
                         }
                     }
                 ]

+ 10 - 2
src/business/platform/bpmn/setting/bpmn-setting/types/global.vue

@@ -41,7 +41,7 @@
                     :data="variables"
                 />
             </el-collapse-item> -->
-            <el-collapse-item title="流程归档设置" name="varSetting">
+            <el-collapse-item title="流程设置" name="varSetting">
                 <div style="margin-left:5%;">
                     报表路径(以半角','分割):<el-input v-model="bao_biao_lu_jing_" placeholder="报表路径" type="textarea" rows="5" />
                     附件字段名(多字段以半角','分割 多个数据表以'.'分割):<el-input v-model="fu_jian_nei_rong_" placeholder="附件字段" />
@@ -60,6 +60,13 @@
                         active-value="是"
                         inactive-value="否"
                     />
+                    <br>
+                    是否定制化:
+                    <el-switch
+                        v-model="is_custom_"
+                        active-value="是"
+                        inactive-value="否"
+                    />
                 </div>
 
                 <el-button type="success" plain style="margin: 5px; float: right;" @click="addRecord">保存 / 修改</el-button>
@@ -100,7 +107,8 @@ export default {
             liu_cheng_xuan_ze: '',
             guan_lian_zi_duan: '',
             ti_jiao_kuai_zhao: '否',
-            bo_hui_kuai_zhao_: '否'
+            bo_hui_kuai_zhao_: '否',
+            is_custom_: '否'
         }
     },
     computed: {

+ 72 - 21
src/views/platform/data/dataTemplate/list.vue

@@ -1,5 +1,5 @@
 <template>
-    <div>
+    <div class="data-template-def">
         <ibps-card-list
             ref="crud"
             :title="title"
@@ -52,27 +52,27 @@
             </template>
 
             <template slot="item-symbol" slot-scope="scope">
-                <template v-if="scope.data.type === 'default'">
-                    <i
-                        class="symbol-icon "
-                        :class="scope.data.showType === 'list'?'ibps-icon-table':(scope.data.showType === 'tree'?'ibps-icon-tree':'ibps-icon-puzzle-piece')"
-                    />
-                </template>
-                <template v-else-if="scope.data.type === 'dialog'">
-                    <span class="ibps-icon-stack symbol-icon " style="font-size:0.55em;">
-
-                        <i class="ibps-icon-window-maximize ibps-icon-stack-2x" />
+                <div :class="scope.data.typeId === 'custom' ? 'is-mark' : ''">
+                    <template v-if="scope.data.type === 'default'">
                         <i
-                            :class=" scope.data.showType === 'list'?'ibps-icon-table':(scope.data.showType === 'tree'?'ibps-icon-tree':'ibps-icon-puzzle-piece')"
-                            class="ibps-icon-stack-1x"
-                            style="top: 5px;"
+                            class="symbol-icon "
+                            :class="scope.data.showType === 'list'?'ibps-icon-table':(scope.data.showType === 'tree'?'ibps-icon-tree':'ibps-icon-puzzle-piece')"
                         />
-                    </span>
-                </template>
-                <template v-else>
-                    <i class="symbol-icon ibps-icon-database" />
-                </template>
-
+                    </template>
+                    <template v-else-if="scope.data.type === 'dialog'">
+                        <span class="ibps-icon-stack symbol-icon " style="font-size:0.55em;">
+                            <i class="ibps-icon-window-maximize ibps-icon-stack-2x" />
+                            <i
+                                :class=" scope.data.showType === 'list'?'ibps-icon-table':(scope.data.showType === 'tree'?'ibps-icon-tree':'ibps-icon-puzzle-piece')"
+                                class="ibps-icon-stack-1x"
+                                style="top: 5px;"
+                            />
+                        </span>
+                    </template>
+                    <template v-else>
+                        <i class="symbol-icon ibps-icon-database" />
+                    </template>
+                </div>
             </template>
         </ibps-card-list>
         <!-- 导入数据 -->
@@ -199,7 +199,24 @@ export default {
                     actions: [
                         { key: 'preview', label: '预览', icon: 'el-icon-view' },
                         { key: 'edit', label: '编辑', icon: 'ibps-icon-edit' },
-                        { key: 'remove', label: '删除', icon: 'ibps-icon-remove' }
+                        { key: 'remove', label: '删除', icon: 'ibps-icon-remove' },
+                        {
+                            key: 'mark',
+                            label: '标记定制',
+                            icon: 'ibps-icon-bookmark',
+                            divided: true,
+                            hidden: (row, index) => {
+                                return row.typeId === 'custom'
+                            }
+                        },
+                        {
+                            key: 'unmark',
+                            label: '取消定制',
+                            icon: 'ibps-icon-bookmark-o',
+                            hidden: (row, index) => {
+                                return row.typeId !== 'custom'
+                            }
+                        }
                     ]
                 }
             },
@@ -309,6 +326,12 @@ export default {
                 case 'copy':// 复制
                     this.handleCopy(data.id)
                     break
+                case 'mark':// 标记定制化
+                    this.handleMark(data.key, command)
+                    break
+                case 'unmark':// 取消标记定制化
+                    this.handleMark(data.key, command)
+                    break
             }
         },
         handleImport () {
@@ -367,7 +390,35 @@ export default {
             }).catch(() => {
                 // this.dialogLoading = false
             })
+        },
+        handleMark (dataTemplateKey, command) {
+            const updateParams = {
+                tableName: 'ibps_data_template_def',
+                updList: [
+                    {
+                        where: {
+                            key_: dataTemplateKey
+                        },
+                        param: {
+                            type_id_: command === 'mark' ? 'custom' : ''
+                        }
+                    }
+                ]
+            }
+            this.$common.request('update', updateParams).then(() => {
+                this.$message.success('操作成功!')
+                this.search()
+            })
         }
     }
 }
 </script>
+<style lang="scss" scoped>
+    .data-template-def {
+        .is-mark {
+            .symbol-icon i {
+                color: #ff4040 !important;
+            }
+        }
+    }
+</style>

+ 394 - 330
src/views/platform/form/formDef/list.vue

@@ -1,113 +1,113 @@
 <template>
-  <div>
-    <ibps-card-list
-      ref="crud"
-      :title="title"
-      :height="height"
-      :data="listData"
-      :pagination="pagination"
-      :pk-key="pkKey"
-      :toolbars="listConfig.toolbars"
-      :search-form="listConfig.searchForm"
-      :columns="listConfig.columns"
-      :row-handle="listConfig.rowHandle"
-      :loading="loading"
-      :create-text="createText"
-      @action-event="handleAction"
-      @sort-change="handleSortChange"
-      @pagination-change="handlePaginationChange"
-    >
-      <template slot="east">
-        <ibps-type-tree
-          :width="width"
-          :height="treeHeight"
-          title="表单分类"
-          position="east"
-          category-key="BO_TYPE"
-          :has-contextmenu="true"
-          @node-click="handleNodeClick"
-          @expand-collapse="handleExpandCollapse"
-        />
-      </template>
-      <template slot="searchForm">
-        <el-form class="search-form" inline @keyup.enter.native.stop="search">
-          <el-form-item>
-            <el-input v-model="searchField" placeholder="请输入" clearable class="input-with-select">
-              <el-select slot="prepend" v-model="searchName" placeholder="请选择">
-                <el-option label="表单名称" value="Q^name_^SL" />
-                <el-option label="表单key" value="Q^key_^SL" />
-              </el-select>
-              <el-button slot="append" icon="el-icon-search" @click="search" />
-            </el-input>
-          </el-form-item>
+    <div class="form-def">
+        <ibps-card-list
+            ref="crud"
+            :title="title"
+            :height="height"
+            :data="listData"
+            :pagination="pagination"
+            :pk-key="pkKey"
+            :toolbars="listConfig.toolbars"
+            :search-form="listConfig.searchForm"
+            :columns="listConfig.columns"
+            :row-handle="listConfig.rowHandle"
+            :loading="loading"
+            :create-text="createText"
+            @action-event="handleAction"
+            @sort-change="handleSortChange"
+            @pagination-change="handlePaginationChange"
+        >
+            <template slot="east">
+                <ibps-type-tree
+                    :width="width"
+                    :height="treeHeight"
+                    title="表单分类"
+                    position="east"
+                    category-key="BO_TYPE"
+                    :has-contextmenu="true"
+                    @node-click="handleNodeClick"
+                    @expand-collapse="handleExpandCollapse"
+                />
+            </template>
+            <template slot="searchForm">
+                <el-form class="search-form" inline @keyup.enter.native.stop="search">
+                    <el-form-item>
+                        <el-input v-model="searchField" placeholder="请输入" clearable class="input-with-select">
+                            <el-select slot="prepend" v-model="searchName" placeholder="请选择">
+                                <el-option label="表单名称" value="Q^name_^SL" />
+                                <el-option label="表单key" value="Q^key_^SL" />
+                            </el-select>
+                            <el-button slot="append" icon="el-icon-search" @click="search" />
+                        </el-input>
+                    </el-form-item>
 
-          <el-form-item>
-            <ibps-toolbar
-              :actions="listConfig.toolbars"
-              @action-event="handleActionEvent"
-            />
-          </el-form-item>
-        </el-form>
-      </template>
-      <template slot="item-symbol" slot-scope="scope">
-        <i
-          :class="scope.data.mode == 'bo'?'ibps-icon-table':'ibps-icon-list-alt'"
-          class="symbol-icon"
-        />
-      </template>
-    </ibps-card-list>
+                    <el-form-item>
+                        <ibps-toolbar
+                            :actions="listConfig.toolbars"
+                            @action-event="handleActionEvent"
+                        />
+                    </el-form-item>
+                </el-form>
+            </template>
+            <template slot="item-symbol" slot-scope="scope">
+                <i
+                    :class="getItemClass(scope.data)"
+                    class="symbol-icon"
+                />
+            </template>
+        </ibps-card-list>
 
-    <!-- 导入表单定义 -->
-    <import-form
-      :id="editId"
-      :visible="importFormVisible"
-      @callback="search"
-      @close="visible => importFormVisible = visible"
-    />
-    <!-- 新建表单定义 -->
-    <create-form
-      :title="createText"
-      :type-id="typeId"
-      :visible="dialogFormVisible"
-      @callback="search"
-      @close="visible => dialogFormVisible = visible"
-    />
-    <!-- 复制表单定义 -->
-    <copy-form
-      :id="editId"
-      :visible="copyDialogFormVisible"
-      @callback="search"
-      @close="visible => copyDialogFormVisible = visible"
-    />
-    <!-- 表单权限 -->
-    <form-rights
-      ref="formRights"
-      :title="createText"
-      :visible="rightsDialogFormVisible"
-      :form-key="formKey"
-      is-save
-      @close="visible => rightsDialogFormVisible = visible"
-    />
-    <!-- 表单设置 -->
-    <form-builder
-      :id="editId"
-      :visible="formbuilderDialogVisible"
-      @callback="search"
-      @close="visible => formbuilderDialogVisible = visible"
-    />
-    <!-- 表单渲染 -->
-    <formrender-preview
-      :visible="formrenderDialogVisible"
-      :form-key="formKey"
-      @close="visible => formrenderDialogVisible = visible"
-    />
-    <!-- 表单打印 -->
-    <form-print
-      :visible="formPrintDialogVisible"
-      :form-key="formKey"
-      @close="visible => formPrintDialogVisible = visible"
-    />
-  </div>
+        <!-- 导入表单定义 -->
+        <import-form
+            :id="editId"
+            :visible="importFormVisible"
+            @callback="search"
+            @close="visible => importFormVisible = visible"
+        />
+        <!-- 新建表单定义 -->
+        <create-form
+            :title="createText"
+            :type-id="typeId"
+            :visible="dialogFormVisible"
+            @callback="search"
+            @close="visible => dialogFormVisible = visible"
+        />
+        <!-- 复制表单定义 -->
+        <copy-form
+            :id="editId"
+            :visible="copyDialogFormVisible"
+            @callback="search"
+            @close="visible => copyDialogFormVisible = visible"
+        />
+        <!-- 表单权限 -->
+        <form-rights
+            ref="formRights"
+            :title="createText"
+            :visible="rightsDialogFormVisible"
+            :form-key="formKey"
+            is-save
+            @close="visible => rightsDialogFormVisible = visible"
+        />
+        <!-- 表单设置 -->
+        <form-builder
+            :id="editId"
+            :visible="formbuilderDialogVisible"
+            @callback="search"
+            @close="visible => formbuilderDialogVisible = visible"
+        />
+        <!-- 表单渲染 -->
+        <formrender-preview
+            :visible="formrenderDialogVisible"
+            :form-key="formKey"
+            @close="visible => formrenderDialogVisible = visible"
+        />
+        <!-- 表单打印 -->
+        <form-print
+            :visible="formPrintDialogVisible"
+            :form-key="formKey"
+            @close="visible => formPrintDialogVisible = visible"
+        />
+    </div>
 </template>
 <script>
 import { queryPageList, remove, exportFile } from '@/api/platform/form/formDef'
@@ -116,237 +116,301 @@ import fecha from '@/utils/fecha'
 import FixHeight from '@/mixins/height'
 
 export default {
-  components: {
-    'ibps-type-tree': () => import('@/business/platform/cat/type/tree'),
-    'ibps-card-list': () => import('@/components/ibps-card-list'),
-    'create-form': () => import('./create'),
-    'copy-form': () => import('./copy'),
-    'import-form': () => import('./import'),
-    'form-rights': () => import('@/business/platform/form/form-rights'),
-    'form-builder': () => import('@/business/platform/form/formbuilder/dialog'),
-    'formrender-preview': () => import('@/business/platform/form/formrender/preview/index'),
-    'form-print': () => import('../formPrint/list')
-  },
-  mixins: [FixHeight],
-  data() {
-    return {
-      width: 220,
-      height: 500,
-      title: '表单管理',
-      createText: '创建表单',
-      query: '',
-      typeId: '',
-      pkKey: 'id', // 主键  如果主键不是pk需要传主键
-      loading: false,
-      dialogFormVisible: false,
-      copyDialogFormVisible: false,
-      rightsDialogFormVisible: false,
-      formbuilderDialogVisible: false,
-      formrenderDialogVisible: false,
-      importFormVisible: false,
-      formPrintDialogVisible: false,
+    components: {
+        'ibps-type-tree': () => import('@/business/platform/cat/type/tree'),
+        'ibps-card-list': () => import('@/components/ibps-card-list'),
+        'create-form': () => import('./create'),
+        'copy-form': () => import('./copy'),
+        'import-form': () => import('./import'),
+        'form-rights': () => import('@/business/platform/form/form-rights'),
+        'form-builder': () => import('@/business/platform/form/formbuilder/dialog'),
+        'formrender-preview': () => import('@/business/platform/form/formrender/preview/index'),
+        'form-print': () => import('../formPrint/list')
+    },
+    mixins: [FixHeight],
+    data () {
+        return {
+            width: 220,
+            height: 500,
+            title: '表单管理',
+            createText: '创建表单',
+            query: '',
+            typeId: '',
+            pkKey: 'id', // 主键  如果主键不是pk需要传主键
+            loading: false,
+            dialogFormVisible: false,
+            copyDialogFormVisible: false,
+            rightsDialogFormVisible: false,
+            formbuilderDialogVisible: false,
+            formrenderDialogVisible: false,
+            importFormVisible: false,
+            formPrintDialogVisible: false,
 
-      editId: '',
-      formKey: '',
-      searchField: '',
-      searchName: 'Q^name_^SL',
+            editId: '',
+            formKey: '',
+            searchField: '',
+            searchName: 'Q^name_^SL',
 
-      listData: [],
-      listConfig: {
-        // 查询条件
-        searchForm: { prop: 'Q^name_^SL', label: '表单名称' },
-        // 工具栏
-        toolbars: [
-          { key: 'import' },
-          { key: 'export' }
-        ],
+            listData: [],
+            listConfig: {
+                // 查询条件
+                searchForm: { prop: 'Q^name_^SL', label: '表单名称' },
+                // 工具栏
+                toolbars: [
+                    { key: 'import' },
+                    { key: 'export' }
+                ],
 
-        // 表格字段配置
-        columns: [
-          { prop: 'name', label: '表单名称' }
-        ],
-        // 管理列
-        rowHandle: {
-          actions: [
-            { key: 'preview', label: '预览', icon: 'el-icon-view' },
-            { key: 'edit', label: '编辑', icon: 'ibps-icon-edit', divided: true },
-            { key: 'remove', label: '删除', icon: 'ibps-icon-remove' },
-            { key: 'copy', label: '复制', icon: 'ibps-icon-copy' },
-            { key: 'rights', label: '表单权限', icon: 'ibps-icon-cog', divided: true },
-            { key: 'print', label: '表单打印', icon: 'ibps-icon-print' }
-          ]
+                // 表格字段配置
+                columns: [
+                    { prop: 'name', label: '表单名称' }
+                ],
+                // 管理列
+                rowHandle: {
+                    actions: [
+                        { key: 'preview', label: '预览', icon: 'el-icon-view' },
+                        { key: 'edit', label: '编辑', icon: 'ibps-icon-edit', divided: true },
+                        { key: 'remove', label: '删除', icon: 'ibps-icon-remove' },
+                        { key: 'copy', label: '复制', icon: 'ibps-icon-copy' },
+                        { key: 'rights', label: '表单权限', icon: 'ibps-icon-cog', divided: true },
+                        { key: 'print', label: '表单打印', icon: 'ibps-icon-print' },
+                        {
+                            key: 'mark',
+                            label: '标记定制',
+                            icon: 'ibps-icon-bookmark',
+                            divided: true,
+                            hidden: (row, index) => {
+                                return row.typeId === 'custom'
+                            }
+                        },
+                        {
+                            key: 'unmark',
+                            label: '取消定制',
+                            icon: 'ibps-icon-bookmark-o',
+                            hidden: (row, index) => {
+                                return row.typeId !== 'custom'
+                            }
+                        }
+                    ]
+                }
+            },
+            pagination: {},
+            sorts: {}
         }
-      },
-      pagination: {},
-      sorts: {}
-    }
-  },
-  computed: {
-    treeHeight() {
-      return this.height - 75
-    }
-  },
-  created() {
-    this.loadData()
-  },
-  methods: {
-    // 加载数据
-    loadData() {
-      this.loading = true
-      queryPageList(this.getSearcFormData()).then(response => {
-        ActionUtils.handleListData(this, response.data)
-        this.loading = false
-      }).catch(() => {
-        this.loading = false
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getSearcFormData() {
-      const params = {}
-      if (this.$utils.isNotEmpty(this.searchField)) {
-        params[this.searchName] = this.searchField
-      }
-      if (this.$utils.isNotEmpty(this.typeId)) {
-        params['Q^TYPE_ID_^S'] = this.typeId
-      }
-
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    /**
-     * 处理分页事件
-     */
-    handlePaginationChange(page) {
-      ActionUtils.setPagination(this.pagination, page)
-      this.loadData()
-    },
-    /**
-     * 处理排序
-     */
-    handleSortChange(sort) {
-      ActionUtils.setSorts(this.sorts, sort)
-      this.loadData()
-    },
-    /**
-     * 查询
-     */
-    search() {
-      this.loadData()
     },
-    /**
-     * @description 处理按钮的事件 【包含增删改查】
-     * @param {*} buttonKey
-     * @param {*} position
-     * @param {*} data
-     */
-    handleActionEvent(action, position, data, index) {
-      const buttonKey = action.key
-      let selection = []
-      if (this.$refs.crud) {
-        selection = this.$refs.crud.getSelectedIds()
-      }
-      this.handleAction(buttonKey, position, selection, data)
-    },
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case 'search':// 查询
-          ActionUtils.setFirstPagination(this.pagination)
-          this.search()
-          break
-        case 'add':// 添加
-          this.dialogFormVisible = true
-          break
-        case 'edit':// 编辑
-          this.handleEdit(selection)
-          break
-        case 'remove':// 删除
-          ActionUtils.removeRecord(selection).then((ids) => {
-            this.handleRemove(ids)
-          }).catch(() => { })
-          break
-        case 'import':// 导入
-          this.handleImport()
-          break
-        case 'export':// 导出
-          ActionUtils.selectedMultiRecord(selection).then((ids) => {
-            this.handleExport(ids)
-          }).catch(() => { })
-          break
-        case 'preview':// 预览
-          this.handlePreview(data.key)
-          break
-        case 'copy':// 复制
-          this.handleCopy(selection)
-          break
-        case 'rights':// 权限
-          this.createText = '表单权限'
-          this.handleFormRights(data.key)
-          this.$nextTick(() => { this.$refs['formRights'].getFormData() })
-          break
-        case 'print':// 打印
-          this.handlePrint(data.key)
-          break
-      }
-    },
-    handleImport() {
-      this.importFormVisible = true
-    },
-    handleExport(ids) {
-      const loading = this.$loading('导出中...')
-      exportFile({ formDefIds: ids }).then((response) => {
-        loading.close()
-        if (!response) {
-          return
+    computed: {
+        treeHeight () {
+            return this.height - 75
         }
-
-        ActionUtils.exportFile(
-          response.data,
-          'formDef_' + fecha.formatDate('yyyyMMddHHmmss') + '.zip'
-        )
-      }).catch(() => {
-        loading.close()
-      })
-    },
-    handleEdit(id) {
-      this.formbuilderDialogVisible = true
-      this.editId = id
-    },
-    /**
-     * 处理删除
-     */
-    handleRemove(ids) {
-      remove({ formDefIds: ids }).then(response => {
-        ActionUtils.removeSuccessMessage()
-        this.search()
-      }).catch(() => {})
-    },
-    handleNodeClick(typeId) {
-      this.typeId = typeId
-      this.loadData()
-    },
-    handleExpandCollapse(isExpand) {
-      this.width = isExpand ? 200 : 30
     },
-    handlePreview(formKey) {
-      this.formrenderDialogVisible = true
-      this.formKey = formKey
+    created () {
+        this.loadData()
     },
-    handleCopy(id) {
-      this.copyDialogFormVisible = true
-      this.editId = id
-    },
-    handleFormRights(formKey) {
-      this.rightsDialogFormVisible = true
-      this.formKey = formKey
-    },
-    handlePrint(formKey) {
-      this.formPrintDialogVisible = true
-      this.formKey = formKey
+    methods: {
+        // 加载数据
+        loadData () {
+            console.log(this.getSearcFormData())
+            this.loading = true
+            queryPageList(this.getSearcFormData()).then(response => {
+                ActionUtils.handleListData(this, response.data)
+                this.loading = false
+            }).catch(() => {
+                this.loading = false
+            })
+        },
+        /**
+         * 获取格式化参数
+         */
+        getSearcFormData () {
+            const params = {}
+            if (this.$utils.isNotEmpty(this.searchField)) {
+                params[this.searchName] = this.searchField
+            }
+            if (this.$utils.isNotEmpty(this.typeId)) {
+                params['Q^TYPE_ID_^S'] = this.typeId
+            }
+
+            return ActionUtils.formatParams(params, this.pagination, this.sorts)
+        },
+        getItemClass ({ typeId, mode }) {
+            const baseClass = 'symbol-icon'
+            let typeClass = ''
+            if (typeId === 'custom') {
+                typeClass = 'ibps-icon-table is-mark'
+                return baseClass + ' ' + typeClass
+            }
+
+            if (mode === 'bo') {
+                typeClass = 'ibps-icon-table'
+                return baseClass + ' ' + typeClass
+            }
+            typeClass = 'ibps-icon-list-alt'
+            return baseClass + ' ' + typeClass
+        },
+        /**
+         * 处理分页事件
+         */
+        handlePaginationChange (page) {
+            ActionUtils.setPagination(this.pagination, page)
+            this.loadData()
+        },
+        /**
+         * 处理排序
+         */
+        handleSortChange (sort) {
+            ActionUtils.setSorts(this.sorts, sort)
+            this.loadData()
+        },
+        /**
+         * 查询
+         */
+        search () {
+            this.loadData()
+        },
+        /**
+         * @description 处理按钮的事件 【包含增删改查】
+         * @param {*} buttonKey
+         * @param {*} position
+         * @param {*} data
+         */
+        handleActionEvent (action, position, data, index) {
+            const buttonKey = action.key
+            let selection = []
+            if (this.$refs.crud) {
+                selection = this.$refs.crud.getSelectedIds()
+            }
+            console.log(buttonKey, position, selection, data)
+            this.handleAction(buttonKey, position, selection, data)
+        },
+        handleAction (command, position, selection, data) {
+            console.log(command, position, selection, data)
+            switch (command) {
+                case 'search':// 查询
+                    ActionUtils.setFirstPagination(this.pagination)
+                    this.search()
+                    break
+                case 'add':// 添加
+                    this.dialogFormVisible = true
+                    break
+                case 'edit':// 编辑
+                    this.handleEdit(selection)
+                    break
+                case 'remove':// 删除
+                    ActionUtils.removeRecord(selection).then((ids) => {
+                        this.handleRemove(ids)
+                    }).catch(() => { })
+                    break
+                case 'import':// 导入
+                    this.handleImport()
+                    break
+                case 'export':// 导出
+                    ActionUtils.selectedMultiRecord(selection).then((ids) => {
+                        this.handleExport(ids)
+                    }).catch(() => { })
+                    break
+                case 'preview':// 预览
+                    this.handlePreview(data.key)
+                    break
+                case 'copy':// 复制
+                    this.handleCopy(selection)
+                    break
+                case 'rights':// 权限
+                    this.createText = '表单权限'
+                    this.handleFormRights(data.key)
+                    this.$nextTick(() => { this.$refs['formRights'].getFormData() })
+                    break
+                case 'print':// 打印
+                    this.handlePrint(data.key)
+                    break
+                case 'mark':// 标记定制化
+                    this.handleMark(data.key, command)
+                    break
+                case 'unmark':// 取消标记定制化
+                    this.handleMark(data.key, command)
+                    break
+            }
+        },
+        handleImport () {
+            this.importFormVisible = true
+        },
+        handleExport (ids) {
+            const loading = this.$loading('导出中...')
+            exportFile({ formDefIds: ids }).then((response) => {
+                loading.close()
+                if (!response) {
+                    return
+                }
+
+                ActionUtils.exportFile(
+                    response.data,
+                    'formDef_' + fecha.formatDate('yyyyMMddHHmmss') + '.zip'
+                )
+            }).catch(() => {
+                loading.close()
+            })
+        },
+        handleEdit (id) {
+            this.formbuilderDialogVisible = true
+            this.editId = id
+        },
+        /**
+         * 处理删除
+         */
+        handleRemove (ids) {
+            remove({ formDefIds: ids }).then(response => {
+                ActionUtils.removeSuccessMessage()
+                this.search()
+            }).catch(() => {})
+        },
+        handleNodeClick (typeId) {
+            this.typeId = typeId
+            this.loadData()
+        },
+        handleExpandCollapse (isExpand) {
+            this.width = isExpand ? 200 : 30
+        },
+        handlePreview (formKey) {
+            this.formrenderDialogVisible = true
+            this.formKey = formKey
+        },
+        handleCopy (id) {
+            this.copyDialogFormVisible = true
+            this.editId = id
+        },
+        handleFormRights (formKey) {
+            this.rightsDialogFormVisible = true
+            this.formKey = formKey
+        },
+        handlePrint (formKey) {
+            this.formPrintDialogVisible = true
+            this.formKey = formKey
+        },
+        handleMark (formKey, command) {
+            const updateParams = {
+                tableName: 'ibps_form_def',
+                updList: [
+                    {
+                        where: {
+                            key_: formKey
+                        },
+                        param: {
+                            type_id_: command === 'mark' ? 'custom' : ''
+                        }
+                    }
+                ]
+            }
+            this.$common.request('update', updateParams).then(() => {
+                this.$message.success('操作成功!')
+                this.search()
+            })
+        }
     }
-  }
 }
 </script>
+<style lang="scss" scoped>
+    .form-def {
+        .is-mark {
+            color: #ff4040 !important;
+        }
+    }
+</style>