Kaynağa Gözat

调整部分列表操作按钮排序,隐藏流程、数据表发布新版按钮

cfort 1 yıl önce
ebeveyn
işleme
7c4cb6338b

+ 1 - 1
src/views/platform/bo/boDef/edit/index.vue

@@ -15,7 +15,7 @@
         <div slot="title" style="padding-left: 20px;" class="el-dialog--left">
             <el-button icon="el-icon-circle-close" @click="closeDialog()">关闭</el-button>
             <el-button v-if="!readonly" type="primary" icon="ibps-icon-save" @click="handleSave('save')">保存</el-button>
-            <el-button v-if="formId&&!readonly&&entrance!=='moreVersions'" icon="ibps-icon-release" type="primary" @click="handleSave('deploy')">发布新版本</el-button>
+            <!-- <el-button v-if="formId&&!readonly&&entrance!=='moreVersions'" icon="ibps-icon-release" type="primary" @click="handleSave('deploy')">发布新版本</el-button> -->
         </div>
         <ibps-layout ref="layout">
             <div slot="west">

+ 3 - 2
src/views/platform/bo/boDef/list.vue

@@ -180,6 +180,7 @@ export default {
                 // 管理列
                 rowHandle: {
                     actions: [
+                        { key: 'remove' },
                         {
                             key: 'genBoTable',
                             label: '生成表',
@@ -191,6 +192,7 @@ export default {
                         {
                             key: 'synBoTable',
                             label: '同步表结构',
+                            type: 'warning',
                             icon: 'ibps-icon-exchange',
                             hidden: (row, index) => {
                                 return row.boType !== 'out'
@@ -205,8 +207,7 @@ export default {
                             }
                         },
                         { key: 'edit' },
-                        { key: 'remove' },
-                        { key: 'detail' }
+                        { key: 'detail', type: 'info' }
                     ]
                 }
             },

+ 1 - 1
src/views/platform/bpmn/bpmDef/design.vue

@@ -17,7 +17,7 @@
             </template>
             <template v-else>
                 <el-button type="primary" icon="ibps-icon-save" class="ibps-ml-5" @click="handleSave(true,false)">保存</el-button>
-                <el-button type="primary" icon="ibps-icon-clipboard" class="ibps-ml-5" @click="handleSave(true,true)">发布新版本</el-button>
+                <!-- <el-button type="primary" icon="ibps-icon-clipboard" class="ibps-ml-5" @click="handleSave(true,true)">发布新版本</el-button> -->
             </template>
             <el-upload
                 ref="upload"

+ 36 - 32
src/views/platform/bpmn/bpmDef/list.vue

@@ -203,29 +203,24 @@ export default {
                 rowHandle: {
                     actions: [
                         {
-                            key: 'start',
-                            label: '启动',
-                            icon: 'ibps-icon-send',
-                            hidden: (rowData, index) => {
-                                return !(rowData.authorizeRight && rowData.authorizeRight.managementStart === 'Y' && rowData.status === 'deploy')
+                            key: 'remove',
+                            hidden: function (rowData, index) {
+                                return !(rowData.authorizeRight && rowData.authorizeRight.managementDel === 'Y')
                             }
                         },
                         {
-                            key: 'copy',
-                            label: '复制',
-                            icon: 'ibps-icon-copy'
-                        },
-                        {
-                            key: 'deploy',
-                            label: '发布',
-                            icon: 'ibps-icon-paper-plane',
-                            hidden: (rowData, index) => {
-                                return !(rowData.status === 'draft')
+                            key: 'clear',
+                            label: '清除数据',
+                            type: 'warning',
+                            icon: 'ibps-icon-trash',
+                            hidden: function (rowData, index) {
+                                return !(rowData.authorizeRight && rowData.authorizeRight.managementClean === 'Y')
                             }
                         },
                         {
                             key: 'suspend',
                             label: '挂起',
+                            type: 'info',
                             icon: 'ibps-icon-square',
                             hidden: function (rowData, index) {
                                 return !(rowData.authorizeRight && rowData.authorizeRight.managementStart === 'Y' && rowData.status === 'deploy')
@@ -234,31 +229,31 @@ export default {
                         {
                             key: 'recover',
                             label: '恢复',
+                            type: 'info',
                             icon: 'ibps-icon-reply',
                             hidden: function (rowData, index) {
                                 return !(rowData.authorizeRight && rowData.authorizeRight.managementStart === 'Y' && rowData.status === 'suspend')
                             }
                         },
                         {
-                            key: 'setting',
-                            label: '设置',
-                            icon: 'ibps-icon-cogs',
-                            hidden: function (rowData, index) {
-                                return !(rowData.authorizeRight && rowData.authorizeRight.managementSet === 'Y' && rowData.status !== 'draft')
-                            }
+                            key: 'copy',
+                            label: '复制',
+                            icon: 'ibps-icon-copy'
                         },
                         {
-                            key: 'design',
-                            label: '设计',
-                            icon: 'ibps-icon-share-alt',
-                            hidden: function (rowData, index) {
-                                return !(rowData.authorizeRight && rowData.authorizeRight.managementEdit === 'Y')
+                            key: 'deploy',
+                            label: '发布',
+                            icon: 'ibps-icon-paper-plane',
+                            hidden: (rowData, index) => {
+                                return !(rowData.status === 'draft')
                             }
                         },
                         {
-                            key: 'remove',
+                            key: 'setting',
+                            label: '设置',
+                            icon: 'ibps-icon-cogs',
                             hidden: function (rowData, index) {
-                                return !(rowData.authorizeRight && rowData.authorizeRight.managementDel === 'Y')
+                                return !(rowData.authorizeRight && rowData.authorizeRight.managementSet === 'Y' && rowData.status !== 'draft')
                             }
                         },
                         {
@@ -281,11 +276,20 @@ export default {
                             }
                         },
                         {
-                            key: 'clear',
-                            label: '清除数据',
-                            icon: 'ibps-icon-trash',
+                            key: 'design',
+                            label: '设计',
+                            icon: 'ibps-icon-share-alt',
                             hidden: function (rowData, index) {
-                                return !(rowData.authorizeRight && rowData.authorizeRight.managementClean === 'Y')
+                                return !(rowData.authorizeRight && rowData.authorizeRight.managementEdit === 'Y')
+                            }
+                        },
+                        {
+                            key: 'start',
+                            label: '启动',
+                            type: 'success',
+                            icon: 'ibps-icon-send',
+                            hidden: (rowData, index) => {
+                                return !(rowData.authorizeRight && rowData.authorizeRight.managementStart === 'Y' && rowData.status === 'deploy')
                             }
                         }
                     ]

+ 271 - 271
src/views/platform/data/dataset/list.vue

@@ -1,53 +1,53 @@
 <template>
-  <ibps-layout ref="layout">
-    <div slot="west">
-      <ibps-type-tree
-        :width="width"
-        :height="height"
-        :has-contextmenu="true"
-        title="数据集分类"
-        category-key="BO_TYPE"
-        @treeData="treeData"
-        @node-click="handleNodeClick"
-        @expand-collapse="handleExpandCollapse"
-      />
-    </div>
-    <ibps-crud
-      ref="crud"
-      :style="{ marginLeft: width+'px' }"
-      :height="height"
-      :data="listData"
-      :toolbars="listConfig.toolbars"
-      :search-form="listConfig.searchForm"
-      :pk-key="pkKey"
-      :columns="listConfig.columns"
-      :row-handle="listConfig.rowHandle"
-      :pagination="pagination"
-      :loading="loading"
-      :index-row="false"
-      @action-event="handleAction"
-      @sort-change="handleSortChange"
-      @pagination-change="handlePaginationChange"
-    />
-    <!-- 设置分类 -->
-    <setting-type
-      :visible="settingTypeFormVisible"
-      title="设置数据集分类"
-      category-key="BO_TYPE"
-      @save="saveSettingType"
-      @close="visible => settingTypeFormVisible = visible"
-    />
-    <!-- 编辑明细 -->
-    <edit
-      :id="editId"
-      :title="title"
-      :type-id="typeId"
-      :visible="dialogFormVisible"
-      :readonly="readonly"
-      @callback="search"
-      @close="visible => dialogFormVisible = visible"
-    />
-  </ibps-layout>
+    <ibps-layout ref="layout">
+        <div slot="west">
+            <ibps-type-tree
+                :width="width"
+                :height="height"
+                :has-contextmenu="true"
+                title="数据集分类"
+                category-key="BO_TYPE"
+                @treeData="treeData"
+                @node-click="handleNodeClick"
+                @expand-collapse="handleExpandCollapse"
+            />
+        </div>
+        <ibps-crud
+            ref="crud"
+            :style="{ marginLeft: width+'px' }"
+            :height="height"
+            :data="listData"
+            :toolbars="listConfig.toolbars"
+            :search-form="listConfig.searchForm"
+            :pk-key="pkKey"
+            :columns="listConfig.columns"
+            :row-handle="listConfig.rowHandle"
+            :pagination="pagination"
+            :loading="loading"
+            :index-row="false"
+            @action-event="handleAction"
+            @sort-change="handleSortChange"
+            @pagination-change="handlePaginationChange"
+        />
+        <!-- 设置分类 -->
+        <setting-type
+            :visible="settingTypeFormVisible"
+            title="设置数据集分类"
+            category-key="BO_TYPE"
+            @save="saveSettingType"
+            @close="visible => settingTypeFormVisible = visible"
+        />
+        <!-- 编辑明细 -->
+        <edit
+            :id="editId"
+            :title="title"
+            :type-id="typeId"
+            :visible="dialogFormVisible"
+            :readonly="readonly"
+            @callback="search"
+            @close="visible => dialogFormVisible = visible"
+        />
+    </ibps-layout>
 </template>
 <script>
 import { queryPageList, remove, setCategory } from '@/api/platform/data/dataset'
@@ -59,232 +59,232 @@ import IbpsTypeTree from '@/business/platform/cat/type/tree'
 import edit from './edit'
 
 export default {
-  components: {
-    IbpsTypeTree,
-    SettingType,
-    edit
-  },
-  mixins: [FixHeight],
-  data() {
-    return {
-      width: 200,
-      height: document.clientHeight,
-      dialogFormVisible: false, // 弹窗
-      settingTypeFormVisible: false,
-      editId: '', // 编辑dialog需要使用
-      readonly: false,
-      title: '',
-      pkKey: 'id', // 主键  如果主键不是pk需要传主键
-      typeId: '',
-      loading: false,
-      listData: [],
-      typeFiler:[],
-      listConfig: {
-        // 工具栏
-        toolbars: [
-          { key: 'search' },
-          {
-            key: 'add'
-          },
-          {
-            key: 'edit'
-          },
-          {
-            key: 'remove'
-          },
-          {
-            key: 'setCategory',
-            label: '设置分类',
-            icon: 'ibps-icon-cog'
-          }
-        ],
-        // 查询条件
-        searchForm: {
-          forms: [
-            { prop: 'Q^NAME_^SL', label: '名称', labelWidth: 80, itemWidth: 200 },
-            { prop: 'Q^KEY_^SL', label: '业务主键', labelWidth: 80, itemWidth: 200 },
-            { prop: 'Q^TYPE_^SL', label: '类型', fieldType: 'select', options: datasetTypeOptions, labelWidth: 80, itemWidth: 200 },
-            { prop: 'Q^FROM_^SL', label: '来源', labelWidth: 80, itemWidth: 200 }
-          ]
-        },
-        // 表格字段配置
-        columns: [
-          { prop: 'name', label: '名称', sortable: true, minWidth: 200 },
-          { prop: 'key', label: '业务主键', sortable: true, width: 120 },
-          { prop: 'type', label: '类型', tags: datasetTypeOptions, sortable: true, width: 100 },
-          {prop:'typeId', label:'归分类型', sortable: true, width: 120 },
-          { prop: 'from', label: '来源', sortable: true, width: 120 },
-          { prop: 'createTime', label: '创建时间', sortable: true, width: 150 },
-          { prop: 'updateTime', label: '更新时间', sortable: true, width: 150 }
-        ],
-        // 管理列
-        rowHandle: {
-          actions: [
-            {
-              key: 'edit'
-            },
-            {
-              key: 'remove'
+    components: {
+        IbpsTypeTree,
+        SettingType,
+        edit
+    },
+    mixins: [FixHeight],
+    data () {
+        return {
+            width: 200,
+            height: document.clientHeight,
+            dialogFormVisible: false, // 弹窗
+            settingTypeFormVisible: false,
+            editId: '', // 编辑dialog需要使用
+            readonly: false,
+            title: '',
+            pkKey: 'id', // 主键  如果主键不是pk需要传主键
+            typeId: '',
+            loading: false,
+            listData: [],
+            typeFiler: [],
+            listConfig: {
+                // 工具栏
+                toolbars: [
+                    { key: 'search' },
+                    {
+                        key: 'add'
+                    },
+                    {
+                        key: 'edit'
+                    },
+                    {
+                        key: 'remove'
+                    },
+                    {
+                        key: 'setCategory',
+                        label: '设置分类',
+                        icon: 'ibps-icon-cog'
+                    }
+                ],
+                // 查询条件
+                searchForm: {
+                    forms: [
+                        { prop: 'Q^NAME_^SL', label: '名称', labelWidth: 80, itemWidth: 200 },
+                        { prop: 'Q^KEY_^SL', label: '业务主键', labelWidth: 80, itemWidth: 200 },
+                        { prop: 'Q^TYPE_^SL', label: '类型', fieldType: 'select', options: datasetTypeOptions, labelWidth: 80, itemWidth: 200 },
+                        { prop: 'Q^FROM_^SL', label: '来源', labelWidth: 80, itemWidth: 200 }
+                    ]
+                },
+                // 表格字段配置
+                columns: [
+                    { prop: 'name', label: '名称', sortable: true, minWidth: 200 },
+                    { prop: 'key', label: '业务主键', sortable: true, width: 120 },
+                    { prop: 'type', label: '类型', tags: datasetTypeOptions, sortable: true, width: 100 },
+                    { prop: 'typeId', label: '归分类型', sortable: true, width: 120 },
+                    { prop: 'from', label: '来源', sortable: true, width: 120 },
+                    { prop: 'createTime', label: '创建时间', sortable: true, width: 150 },
+                    { prop: 'updateTime', label: '更新时间', sortable: true, width: 150 }
+                ],
+                // 管理列
+                rowHandle: {
+                    actions: [
+                        {
+                            key: 'remove'
+                        },
+                        {
+                            key: 'edit'
+                        },
+                        {
+                            key: 'detail'
+                        }
+                    ]
+                }
             },
-            {
-              key: 'detail'
-            }
-          ]
-        }
-      },
-      pagination: {},
-      sorts: { CREATE_TIME_: 'DESC' }
+            pagination: {},
+            sorts: { CREATE_TIME_: 'DESC' }
 
-    }
-  },
-  created() {
-    this.loadData()
-  },
-  methods: {
-    /**
-     * 加载数据
-     */
-    loadData() {
-      this.loading = true
-      queryPageList(this.getFormatParams()).then(response => {
-        response.data.dataResult.forEach((item)=>{
-            if(item.typeId && this.typeFiler.length){
-                let temp = this.typeFiler.find(i => i.id === item.typeId)
-                item.typeId = temp ? temp.name : '未分类'
-            } else {
-                item.typeId = item.typeId ? '分类被删除': '未分类'
-            }
-        })
-        ActionUtils.handleListData(this, response.data)
-        this.loading = false
-      }).catch(() => {
-        this.loading = false
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getFormatParams() {
-      const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-      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()
-    },
-    /**
-     * 重置查询条件
-     */
-    reset() {
-      this.$refs['crud'].handleReset()
-    },
-    /**
-     * 处理编辑
-     */
-    handleEdit(editId = '', readonly = false) {
-      this.editId = editId || ''
-      this.readonly = readonly
-      this.dialogFormVisible = true
-    },
-    /**
-     * 处理按钮事件
-     */
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case 'search':// 查询
-          ActionUtils.setFirstPagination(this.pagination)
-          this.search()
-          break
-        case 'add': // 添加
-          this.handleEdit()
-          this.title = '添加数据集'
-          break
-        case 'edit': // 编辑
-          ActionUtils.selectedRecord(selection).then((id) => {
-            this.handleEdit(id)
-            this.title = '编辑数据集'
-          }).catch(() => { })
-          break
-        case 'detail': // 明细
-          ActionUtils.selectedRecord(selection).then((id) => {
-            this.handleEdit(id, true)
-            this.title = '数据集明细'
-          }).catch(() => { })
-          break
-        case 'remove': // 删除
-          ActionUtils.removeRecord(selection).then((id) => {
-            this.handleRemove(id)
-          }).catch(() => { })
-          break
-        case 'setCategory': // 设置分类
-          ActionUtils.selectedMultiRecord(selection).then((id) => {
-            this.handleSetCategory(id)
-          }).catch(() => { })
-          break
-        default:
-          break
-      }
-    },
-    handleNodeClick(typeId) {
-      this.typeId = typeId
-      this.loadData()
-    },
-    /**
-     * 设置分类
-     */
-    handleSetCategory(editId) {
-      this.editId = editId || ''
-      this.settingTypeFormVisible = true
-    },
-    /**
-     * 保存分类
-     */
-    saveSettingType(typeId) {
-      setCategory({
-        datasetIds: this.editId,
-        typeId: typeId
-      }).then(response => {
-        ActionUtils.successMessage('保存成功')
-        this.settingTypeFormVisible = false
-        this.search()
-      }).catch((err) => {
-        console.error(err)
-      })
-    },
-    /**
-     * 处理删除
-     */
-    handleRemove(ids) {
-      remove({ datasetIds: ids }).then(response => {
-        ActionUtils.removeSuccessMessage()
-        this.search()
-      }).catch(() => {})
+        }
     },
-    handleExpandCollapse(isExpand) {
-      this.width = isExpand ? 230 : 30
+    created () {
+        this.loadData()
     },
-    treeData(data){
-      this.typeFiler = data
+    methods: {
+        /**
+         * 加载数据
+         */
+        loadData () {
+            this.loading = true
+            queryPageList(this.getFormatParams()).then(response => {
+                response.data.dataResult.forEach((item) => {
+                    if (item.typeId && this.typeFiler.length) {
+                        const temp = this.typeFiler.find(i => i.id === item.typeId)
+                        item.typeId = temp ? temp.name : '未分类'
+                    } else {
+                        item.typeId = item.typeId ? '分类被删除' : '未分类'
+                    }
+                })
+                ActionUtils.handleListData(this, response.data)
+                this.loading = false
+            }).catch(() => {
+                this.loading = false
+            })
+        },
+        /**
+         * 获取格式化参数
+         */
+        getFormatParams () {
+            const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
+            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()
+        },
+        /**
+         * 重置查询条件
+         */
+        reset () {
+            this.$refs['crud'].handleReset()
+        },
+        /**
+         * 处理编辑
+         */
+        handleEdit (editId = '', readonly = false) {
+            this.editId = editId || ''
+            this.readonly = readonly
+            this.dialogFormVisible = true
+        },
+        /**
+         * 处理按钮事件
+         */
+        handleAction (command, position, selection, data) {
+            switch (command) {
+                case 'search':// 查询
+                    ActionUtils.setFirstPagination(this.pagination)
+                    this.search()
+                    break
+                case 'add': // 添加
+                    this.handleEdit()
+                    this.title = '添加数据集'
+                    break
+                case 'edit': // 编辑
+                    ActionUtils.selectedRecord(selection).then((id) => {
+                        this.handleEdit(id)
+                        this.title = '编辑数据集'
+                    }).catch(() => { })
+                    break
+                case 'detail': // 明细
+                    ActionUtils.selectedRecord(selection).then((id) => {
+                        this.handleEdit(id, true)
+                        this.title = '数据集明细'
+                    }).catch(() => { })
+                    break
+                case 'remove': // 删除
+                    ActionUtils.removeRecord(selection).then((id) => {
+                        this.handleRemove(id)
+                    }).catch(() => { })
+                    break
+                case 'setCategory': // 设置分类
+                    ActionUtils.selectedMultiRecord(selection).then((id) => {
+                        this.handleSetCategory(id)
+                    }).catch(() => { })
+                    break
+                default:
+                    break
+            }
+        },
+        handleNodeClick (typeId) {
+            this.typeId = typeId
+            this.loadData()
+        },
+        /**
+         * 设置分类
+         */
+        handleSetCategory (editId) {
+            this.editId = editId || ''
+            this.settingTypeFormVisible = true
+        },
+        /**
+         * 保存分类
+         */
+        saveSettingType (typeId) {
+            setCategory({
+                datasetIds: this.editId,
+                typeId: typeId
+            }).then(response => {
+                ActionUtils.successMessage('保存成功')
+                this.settingTypeFormVisible = false
+                this.search()
+            }).catch((err) => {
+                console.error(err)
+            })
+        },
+        /**
+         * 处理删除
+         */
+        handleRemove (ids) {
+            remove({ datasetIds: ids }).then(response => {
+                ActionUtils.removeSuccessMessage()
+                this.search()
+            }).catch(() => {})
+        },
+        handleExpandCollapse (isExpand) {
+            this.width = isExpand ? 230 : 30
+        },
+        treeData (data) {
+            this.typeFiler = data
+        }
     }
-  }
 }
 </script>

+ 1 - 0
src/views/platform/office/mixin/utils.js

@@ -99,6 +99,7 @@ export default {
             if (!arr[2]) {
                 return ''
             }
+            arr[2] = arr[2].replace(':', ':')
             const result = JSON.parse(`{${arr[2]}}`)
             if (!result.dept) {
                 return ''