cfort 2 лет назад
Родитель
Сommit
af6b39562e

+ 250 - 205
src/assets/styles/pages/dashboard.scss

@@ -1,224 +1,269 @@
-$img-px:150px;
-$transition:all .5s;
+$img-px: 150px;
+$transition: all .5s;
 
 .ibps-desktop-page {
-  .verticalCenterFlex{
-    display: flex;
-    align-items: center;
-    .el-card__body{
-      padding: 0 20px;
-    }
-  }
-  .changeShadow{
-    .pendingAssigneeClass{
-      margin: 12px 0 !important;
-    }
-    .item-headerH{
-      height: 21px;
-    }
-    box-shadow: 0 2px 12px 0 rgba(0,0,0,.2) !important;
-    .el-card__header{
-      padding: 14px 20px 6px;
-    }
-    .el-card__body{
-      padding: 15px 20px;
-    }
-    .totalityClass{
-      color: #fff;
-      background-color: red;
-      border-radius: 100px;
-      font-size: 12px;
-      height: 100%;
-      margin-left: 1%;
-      padding: 0.8% 1.4% 0.2% 1.2%;
-    }
-    .el-tabs__header{
-      margin: 0;
-    }
-    .el-link{
-      font-size: 14px !important;
-    }
-    .ibps-list-item{
-      padding: 4px 0;
-      font-size: 14px;
-    }
-    .ibps-list-item-meta-title{
-      line-height: 14px;
-    }
-    .ibps-list-item-meta-description{
-      line-height: 14px;
-      font-size: 12px;
-    }
-    .el-card__body{
-      .tabs-title{
+    height: 100%;
+    background-color: #e9edef;
+    .verticalCenterFlex {
         display: flex;
         align-items: center;
-      }
-      .el-tabs__nav-scroll{
-        display: flex;
-        justify-content: center;
-      }
-      .el-tabs__nav{
-        float: right;
-        margin-right:0;
-      }
-      // .ibps-list-item{
-      //   padding: 4px 0;
-      //   font-size: 14px;
-      // }
+        
+        .el-card__body {
+            padding: 0 20px;
+        }
     }
-  }
-  height: 100%;
-  .el-card__body{
-    position: relative;
-    padding-top: 0;
-    padding-left: 15px;
-    padding-right: 15px;
-    .hidden{
-      overflow: hidden;
+    
+    .changeShadow {
+        .pendingAssigneeClass {
+            margin: 12px 0 !important;
+        }
+        
+        .item-headerH {
+            height: 21px;
+        }
+        
+        // box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .2) !important;
+        
+        .el-card__header {
+            padding: 14px 20px 6px;
+        }
+        
+        .el-card__body {
+            padding: 15px 20px;
+            
+            .tabs-title {
+                display: flex;
+                align-items: center;
+            }
+            
+            .el-tabs__nav-scroll {
+                display: flex;
+                justify-content: center;
+            }
+            
+            .el-tabs__nav {
+                float: right;
+                margin-right: 0;
+            }
+        }
+        
+        .totalityClass {
+            color: #fff;
+            background-color: red;
+            border-radius: 100px;
+            font-size: 12px;
+            height: 100%;
+            margin-left: 1%;
+            padding: 0.8% 1.4% 0.2% 1.2%;
+        }
+        
+        .el-tabs__header {
+            margin: 0;
+        }
+        
+        .el-link {
+            font-size: 14px !important;
+        }
+        
+        .ibps-list-item {
+            padding: 4px 0;
+            font-size: 14px;
+            
+            .ibps-list-item-meta-title {
+                line-height: 14px;
+            }
+            
+            .ibps-list-item-meta-description {
+                line-height: 14px;
+                font-size: 12px;
+            }
+        }
     }
-    .body-chart{
-      color: red;
-      >div:last-child{
-        top: 0!important;
-      }
+    
+    .home-card {
+        .el-card__header {
+            padding: 10px 20px;
+        }
+        .el-card__body {
+            position: relative;
+            padding: 10px 20px 15px;
+            
+            .hidden {
+                overflow: hidden;
+            }
+            
+            .body-chart {
+                color: red;
+                
+                > div:last-child {
+                    top: 0 !important;
+                }
+            }
+            
+            .draw-enter-to,
+            .draw-leave {
+                height: 200px;
+            }
+            
+            .tabs-title {
+                position: relative;
+                z-index: 9999;
+                display: flex;
+                align-items: center;
+                padding-top: 12px;
+            }
+            
+            .tabs-toolbar {
+                position: absolute;
+                right: 20px;
+                top: 20px;
+                z-index: 9999;
+            }
+            
+            .tabs-contents {
+                position: relative;
+                top: -25px;
+            }
+            
+            .el-tabs__nav {
+                float: right;
+                margin-right: 200px;
+            }
+            
+            .pending-Tabs {
+                .el-tabs__nav {
+                    float: initial !important;
+                    margin-right: 0;
+                }
+            }
+            
+            .tabs-content {
+                transition: $transition;
+            }
+            
+            .ibps-item-content {
+                img {
+                    border-radius: 50%;
+                    width: 100%;
+                }
+                .dept-tag {
+                    margin-left: 4px;
+                    &:first-child {
+                        margin-left: 0;
+                    }
+                }
+                .ibps-item-content-title {
+                    margin-bottom: 12px;
+                    color: rgba(0, 0, 0, .85);
+                    font-weight: 500;
+                    font-size: 20px;
+                    line-height: 28px;
+                }
+                
+                .ibps-item-content-label {
+                    flex: 1 1 auto;
+                    color: rgba(0, 0, 0, .45);
+                    line-height: 16px;
+                }
+                
+                .ibps-item-content-extra {
+                    color: rgba(0, 0, 0, .85);
+                    font-size: 16px;
+                }
+                
+                .ibps-list-icon {
+                    margin-left: 20px;
+                }
+                
+                .ibps-list-col-main {
+                    margin: 0 0 0 3% !important;
+                }
+                
+                .ibps-list-col-icon {
+                    width: 150px;
+                    height: 150px;
+                    
+                    > div {
+                        width: 100%;
+                        height: 100%;
+                        
+                        > span {
+                            width: 100%;
+                            height: 100%;
+                            
+                            i {
+                                width: 100%;
+                                height: 100%;
+                                display: inline-block;
+                                font-size: 130px;
+                            }
+                        }
+                    }
+                }
+            }
+            
+            .nav-content {
+                overflow-y: scroll;
+                transition: $transition;
+                
+                span {
+                    margin: 0 5px 5px 0;
+                }
+                
+                &::-webkit-scrollbar {
+                    display: none;
+                }
+            }
+        }
     }
-    .draw-enter-to,.draw-leave{
-      height: 200px;
+    
+    .pending-business {
+        .ibps-list-col-main {
+            margin: 0 0 5px 20px !important;
+        }
     }
-    // 未读消息
-    .tabs-title{
-      position: relative;
-      z-index: 9999;
-      display: flex;
-      align-items: center;
-      padding-top: 12px;
+    
+    .bg-red {
+        background-color: #e7505a;
     }
-    .tabs-toolbar{
-      position: absolute;
-      right:20px; 
-      top: 20px;
-      z-index: 9999;
+    
+    .bg-green {
+        background-color: #32c5d2;
     }
-    .tabs-contents{
-      position: relative;
-      top: -25px;
+    
+    .bg-red-pink {
+        background-color: #E08283;
     }
-    .el-tabs__nav{
-      float: right;
-      margin-right:200px;
+    
+    .bg-green-meadow {
+        background-color: #1BBC9B;
     }
-    .pending-Tabs{
-      .el-tabs__nav{
-        float: initial !important;
-        margin-right:0;
-      }
+    
+    .bg-grey-steel {
+        background-color: #e9edef;
     }
-    .tabs-content{
-      // overflow-y: scroll;
-      transition:$transition;
+    
+    .bg-yellow-crusta {
+        background-color: #f3c200;
     }
-    // 个人信息
-      .ibps-item-content{
-        img{
-            border-radius:50%;
-            width:100%; 
-            // width:$img-px;
-            // height:$img-px;
-          }
-          .ibps-item-content-title{
-            margin-bottom: 12px;
-            color: rgba(0,0,0,.85);
-            font-weight: 500;
-            font-size: 20px;
-            line-height: 28px;
-          }
-          .ibps-item-content-label{ 
-            flex: 1 1 auto;
-            color: rgba(0,0,0,.45);
-            line-height: 16px;
-          }
-          .ibps-item-content-extra{
-            color: rgba(0,0,0,.85); 
-            font-size: 16px;
-            font-family: Tahoma,Helvetica Neue,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;
-          }
-          .ibps-list-icon{
-            margin-left: 20px;
-          }
-          .ibps-list-col-main{
-            margin:0 0 0 3% !important; 
-          }
-          .ibps-list-col-icon{
-            width: 150px;
-            height: 150px;
-            >div{
-              width:100%;
-              height:100%;
-              >span{ 
-                width:100%;
-                height:100%;
-                i{
-                  width: 100%;
-                  height: 100%;
-                  display: inline-block; 
-                  font-size: 130px;
-                }
-              }
-            }
-          }
-      }
-    // 快捷导航
-    .nav-content{ 
-      // overflow: hidden;
-      overflow-y: scroll;
-      transition:$transition; 
-      span{
-        margin:0 5px 5px 0 ;
-      }
+    
+    .bg-blue {
+        background: #3598dc !important;
     }
-    .nav-content::-webkit-scrollbar {
-      display: none;
+    
+    .bg-blue-madison {
+        background: #578ebe !important;
     }
-  } 
-  // 待办事务
-  .pending-business{
-    .ibps-list-col-main{
-      margin: 0 0 5px 20px !important;
+    
+    .bg-orange {
+        background-color: #FBD45B;
     }
-  }
-  .bg-red {
-    background-color: #e7505a;
-  }
-  .bg-green {
-    background-color: #32c5d2;
-  }
-  .bg-red-pink {
-    background-color: #E08283;
-  }
-  .bg-green-meadow {
-    background-color: #1BBC9B;
-  }
-  .bg-grey-steel {
-    background-color: #e9edef;
-  }
-  .bg-yellow-crusta {
-    background-color: #f3c200;
-  }
-  .bg-blue {
-    background: #3598dc !important; }
-
-  .bg-blue-madison {
-    background: #578ebe !important;
-   }
-  .bg-orange2 {
-    background-color: #FCB56F;
-  }
-  .bg-light-brown {
-    background-color: #64C7DA;
-  }
-  .bg-orange {
-    background-color: #FBD45B;
-  }
 
+    .bg-orange2 {
+        background-color: #FCB56F;
+    }
+    
+    .bg-light-brown {
+        background-color: #64C7DA;
+    }
 }

+ 1 - 5
src/business/platform/form/formrender/dynamic-form/dynamic-form-table.vue

@@ -268,15 +268,12 @@ export default {
         }
     },
     data () {
-        console.log('277 this.value',this.value)
-
         const { page, pageSize = defaultPageSize, mode = 'inner', colWidth } = this.field.field_options || {}
         let initData = []
         if (page === 'N' || mode === 'block' || !this.value) {
             initData = this.value || []
         } else {
             initData = getShowData(this.value, 1, pageSize)
-            console.log('277 initData',initData)
         }
         return {
             pageSize,
@@ -286,7 +283,7 @@ export default {
             npmDialogFormVisible: false, // 弹窗
             defId: '', // 编辑dialog需要使用
             currentPage: 1,
-            totalCount: this.value.length,
+            totalCount: this.value && this.value.length ? this.value.length : 0,
             dataModel: initData,
             copDataModel: initData,
             multipleSelection: '',
@@ -536,7 +533,6 @@ export default {
                 this.currentPage = this.currentPage > pageCount ? pageCount : this.currentPage
             }
             this.copDataModel = this.getShowData(val, this.currentPage, this.pageSize)
-            console.log('536 this.copDataModel',this.copDataModel)
             this.editFromType = ''
             this.$emit('update:value', val)
         },

+ 223 - 280
src/views/platform/office/bpmInitiatedProcess/favorites.vue

@@ -1,297 +1,240 @@
 <template>
-  <ibps-layout ref="layout">
-    <div slot="west">
-      <ibps-type-tree
-        :width="width"
-        :height="height"
-        title="任务分类"
-        category-key="FLOW_TYPE"
-        @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"
-      @column-link-click="handleLinkClick"
-      @pagination-change="handlePaginationChange"
-    >
-      <template slot="favoritesIcon" slot-scope="scope">
-        <el-tooltip v-if="scope.row.favorites" class="item" effect="dark" content="已收藏" placement="bottom">
-          <i class="ibps-icon-star" style="margin-left:7px;" @click="handleTips(scope.row.favorites,scope.row.id)" />
-        </el-tooltip>
-        <el-tooltip v-else class="item" effect="dark" content="未收藏" placement="bottom">
-          <i class="ibps-icon-star-o" style="margin-left:7px;" @click="handleTips(scope.row.favorites,scope.row.id)" />
-        </el-tooltip>
-      </template>
-      <template slot="statusCloum" slot-scope="scope">
-        <el-tag>{{ scope.row.status|optionsFilter(statusOptions,'value','key') }}</el-tag>
-      </template>
-    </ibps-crud>
-    <bpmn-formrender
-      :visible="dialogFormVisible"
-      :def-id="defId"
-      @callback="search"
-      @close="visible => dialogFormVisible = visible"
-    />
-  </ibps-layout>
+    <ibps-layout ref="layout">
+        <div slot="west">
+            <ibps-type-tree
+                :width="width"
+                :height="height"
+                title="事务分类"
+                category-key="FLOW_TYPE"
+                @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"
+            :display-field="title"
+            @action-event="handleAction"
+            @sort-change="handleSortChange"
+            @column-link-click="handleLinkClick"
+            @pagination-change="handlePaginationChange"
+        >
+            <template slot="favoritesIcon" slot-scope="scope">
+                <el-tooltip v-if="scope.row.favorites" class="item" effect="dark" content="已收藏" placement="bottom">
+                    <i class="ibps-icon-star" style="margin-left:7px;" @click="handleTips(scope.row.favorites, scope.row.id)" />
+                </el-tooltip>
+                <el-tooltip v-else class="item" effect="dark" content="未收藏" placement="bottom">
+                    <i class="ibps-icon-star-o" style="margin-left:7px;" @click="handleTips(scope.row.favorites, scope.row.id)" />
+                </el-tooltip>
+            </template>
+            <template slot="status" slot-scope="scope">
+                <el-tag>{{ scope.row.status | optionsFilter(statusOptions,'value','key') }}</el-tag>
+            </template>
+        </ibps-crud>
+        <bpmn-formrender
+            :visible="dialogFormVisible"
+            :def-id="defId"
+            @callback="search"
+            @close="visible => dialogFormVisible = visible"
+        />
+    </ibps-layout>
 </template>
 <script>
 import { favorited, sortFavorites, saveFavorites, removeFavorites } from '@/api/platform/office/bpmInitiated'
 import { findBpmDefinitionState } from '@/api/platform/bpmn/bpmInfo'
 import ActionUtils from '@/utils/action'
 import FixHeight from '@/mixins/height'
-import IbpsTypeTree from '@/business/platform/cat/type/tree'
-import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
+import CommonData from '../mixin/utils'
 
 export default {
-  components: {
-    IbpsTypeTree,
-    BpmnFormrender
-  },
-  mixins: [FixHeight],
-  data() {
-    return {
-      width: 200,
-      height: document.clientHeight,
-      dialogFormVisible: false, // 弹窗
-      defId: '', // 编辑dialog需要使用
-
-      pkKey: 'id', // 主键  如果主键不是pk需要传主键
-      typeId: '',
-      loading: false,
-      listData: [],
-      statusOptions: [],
-      listConfig: {
-        // 工具栏
-        toolbars: [
-          { key: 'search' },
-          {
-            key: 'first',
-            label: '移至第一条',
-            icon: 'ibps-icon-angle-double-up'
-          },
-          {
-            key: 'up',
-            label: '上移',
-            icon: 'ibps-icon-angle-up'
-          },
-          {
-            key: 'down',
-            label: '下移',
-            icon: 'ibps-icon-angle-down'
-          },
-          {
-            key: 'last',
-            label: '移至最后一条',
-            icon: 'ibps-icon-angle-double-down'
-          },
-          {
-            key: 'removeFavorites',
-            label: '取消',
-            icon: 'ibps-icon-star-o'
-          }
-        ],
-        // 查询条件
-        searchForm: {
-          forms: [
-            { prop: 'Q^name_^SL', label: '流程名称' }
-          ]
-        },
-        // 表格字段配置.
-        columns: [
-          { prop: 'favorites', label: '收藏', slotName: 'favoritesIcon', width: '50' },
-          { prop: 'name', label: '流程名称', link: 'dialog' },
-          { prop: 'createTime', label: '收藏时间' },
-          { prop: 'typeName', label: '所属分类' },
-          { prop: 'status', label: '状态', slotName: 'statusCloum' },
-          { prop: 'version', label: '版本号' }
-        ],
-        // 管理列
-        rowHandle: {
-          actions: [
-            {
-              key: 'first',
-              label: '移至第一条',
-              icon: 'ibps-icon-angle-double-up'
-            },
-            {
-              key: 'up',
-              label: '上移',
-              icon: 'ibps-icon-angle-up'
-            },
-            {
-              key: 'down',
-              label: '下移',
-              icon: 'ibps-icon-angle-down'
-            },
-            {
-              key: 'last',
-              label: '移至最后一条',
-              icon: 'ibps-icon-angle-double-down'
-            },
-            {
-              key: 'removeFavorites',
-              label: '取消',
-              icon: 'ibps-icon-star-o'
+    mixins: [FixHeight, CommonData],
+    data () {
+        return {
+            title: '我的收藏',
+            statusOptions: [],
+            listConfig: {
+                // 工具栏
+                toolbars: [
+                    { key: 'search' },
+                    {
+                        key: 'first',
+                        label: '移至第一条',
+                        icon: 'ibps-icon-angle-double-up'
+                    },
+                    {
+                        key: 'up',
+                        label: '上移',
+                        icon: 'ibps-icon-angle-up'
+                    },
+                    {
+                        key: 'down',
+                        label: '下移',
+                        icon: 'ibps-icon-angle-down'
+                    },
+                    {
+                        key: 'last',
+                        label: '移至最后一条',
+                        icon: 'ibps-icon-angle-double-down'
+                    },
+                    {
+                        key: 'removeFavorites',
+                        label: '取消',
+                        icon: 'ibps-icon-star-o'
+                    }
+                ],
+                // 查询条件
+                searchForm: {
+                    forms: [
+                        { prop: 'Q^name_^SL', label: '流程名称' }
+                    ]
+                },
+                // 表格字段配置.
+                columns: [
+                    { prop: 'favorites', label: '收藏', slotName: 'favoritesIcon', width: '50' },
+                    { prop: 'name', label: '流程名称', link: 'dialog' },
+                    { prop: 'createTime', label: '收藏时间' },
+                    { prop: 'typeName', label: '所属分类' },
+                    { prop: 'status', label: '状态', slotName: 'status' },
+                    { prop: 'version', label: '版本号' }
+                ],
+                // 管理列
+                rowHandle: {
+                    actions: [
+                        {
+                            key: 'first',
+                            label: '移至第一条',
+                            icon: 'ibps-icon-angle-double-up'
+                        },
+                        {
+                            key: 'up',
+                            label: '上移',
+                            icon: 'ibps-icon-angle-up'
+                        },
+                        {
+                            key: 'down',
+                            label: '下移',
+                            icon: 'ibps-icon-angle-down'
+                        },
+                        {
+                            key: 'last',
+                            label: '移至最后一条',
+                            icon: 'ibps-icon-angle-double-down'
+                        },
+                        {
+                            key: 'removeFavorites',
+                            label: '取消',
+                            icon: 'ibps-icon-star-o'
+                        }
+                    ]
+                }
             }
-          ]
         }
-      },
-      pagination: {},
-      sorts: {}
-    }
-  },
-  created() {
-    this.loadData()
-    this.findBpmDefinitionState()
-  },
-  methods: {
-    findBpmDefinitionState() {
-      findBpmDefinitionState().then(response => {
-        this.statusOptions = response.data
-      })
-    },
-    handleTips(favorites, id) {
-      if (favorites) {
-        this.tips('removeFavorites', '确认取消流程收藏吗?', id)
-      } else {
-        this.tips('saveFavorites', '确认流程收藏吗?', id)
-      }
-    },
-    /**
-     * 加载数据
-     */
-    loadData() {
-      this.loading = true
-      favorited(this.getFormatParams()).then(response => {
-        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()
-    },
-    /**
-     * 点击表格
-     */
-    handleLinkClick(data) {
-      this.defId = data.id || ''
-      this.dialogFormVisible = true
     },
-    /**
-     * 处理按钮事件
-     */
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case 'search':// 查询
-          ActionUtils.setFirstPagination(this.pagination)
-          this.search()
-          break
-        case 'first':
-        case 'up':
-        case 'down':
-        case 'last':
-          ActionUtils.selectedMultiRecord(selection).then((ids) => {
-            this.handleSortFavorites(command, ids)
-          }).catch(() => { })
-          break
-        case 'removeFavorites':// 取消
-          ActionUtils.selectedMultiRecord(selection).then((id) => {
-            this.tips('removeFavorites', '确认取消流程收藏吗?', id)
-          }).catch(() => { })
-          break
-        default:
-          break
-      }
+    created () {
+        this.loadData()
+        this.findBpmDefinitionState()
     },
-    tips(tip, title, id) {
-      this.$confirm(title, '消息', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        if (tip === 'saveFavorites') {
-          saveFavorites({ defIds: id }).then(response => {
-            ActionUtils.successMessage('收藏成功!')
-            this.loadData()
-          })
-        } else {
-          removeFavorites({ defIds: id }).then(response => {
-            ActionUtils.successMessage('取消收藏成功!')
-            this.loadData()
-          })
+    methods: {
+        findBpmDefinitionState () {
+            findBpmDefinitionState().then(response => {
+                this.statusOptions = response.data
+            })
+        },
+        handleTips (favorites, id) {
+            if (favorites) {
+                this.tips('removeFavorites', '确认取消流程收藏吗?', id)
+            } else {
+                this.tips('saveFavorites', '确认流程收藏吗?', id)
+            }
+        },
+        /**
+         * 加载数据
+         */
+        loadData () {
+            this.loading = true
+            favorited(this.getFormatParams()).then(response => {
+                ActionUtils.handleListData(this, response.data)
+                this.loading = false
+            }).catch(() => {
+                this.loading = false
+            })
+        },
+        /**
+         * 点击表格
+         */
+        handleLinkClick (data) {
+            this.defId = data.id || ''
+            this.dialogFormVisible = true
+        },
+        /**
+         * 处理按钮事件
+         */
+        handleAction (command, position, selection, data) {
+            switch (command) {
+                case 'search':// 查询
+                    ActionUtils.setFirstPagination(this.pagination)
+                    this.search()
+                    break
+                case 'first':
+                case 'up':
+                case 'down':
+                case 'last':
+                    ActionUtils.selectedMultiRecord(selection).then((ids) => {
+                        this.handleSortFavorites(command, ids)
+                    }).catch(() => { })
+                    break
+                case 'removeFavorites':// 取消
+                    ActionUtils.selectedMultiRecord(selection).then((id) => {
+                        this.tips('removeFavorites', '确认取消流程收藏吗?', id)
+                    }).catch(() => { })
+                    break
+                default:
+                    break
+            }
+        },
+        tips (tip, title, id) {
+            this.$confirm(title, '消息', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                if (tip === 'saveFavorites') {
+                    saveFavorites({ defIds: id }).then(response => {
+                        ActionUtils.successMessage('收藏成功!')
+                        this.loadData()
+                    })
+                } else {
+                    removeFavorites({ defIds: id }).then(response => {
+                        ActionUtils.successMessage('取消收藏成功!')
+                        this.loadData()
+                    })
+                }
+            }).catch(() => {})
+        },
+        handleSortFavorites (sort, defIds) {
+            this.loading = true
+            sortFavorites({
+                sort: sort,
+                defIds: defIds
+            }).then(response => {
+                ActionUtils.handleListData(this, response.data)
+                this.search()
+                this.loading = false
+                ActionUtils.successMessage('流程收藏排序成功!')
+            }).catch(() => {
+                this.loading = false
+            })
         }
-      }).catch(() => {})
-    },
-    handleNodeClick(typeId) {
-      this.typeId = typeId
-      this.loadData()
-    },
-    handleExpandCollapse(isExpand) {
-      this.width = isExpand ? 230 : 30
-    },
-    handleSortFavorites(sort, defIds) {
-      this.loading = true
-      sortFavorites({
-        sort: sort,
-        defIds: defIds
-      }).then(response => {
-        ActionUtils.handleListData(this, response.data)
-        this.search()
-        this.loading = false
-        ActionUtils.successMessage('流程收藏排序成功!')
-      }).catch(() => {
-        this.loading = false
-      })
     }
-  }
 }
 </script>

+ 7 - 0
src/views/platform/office/bpmInitiatedProcess/newProcess.vue

@@ -212,6 +212,13 @@ export default {
                     break
             }
         },
+        /**
+         * 点击表格
+         */
+        handleLinkClick (data) {
+            this.defId = data.id || ''
+            this.dialogFormVisible = true
+        },
         /**
          * 编辑
          */

+ 130 - 213
src/views/system/dashboard/components/util.js

@@ -6,7 +6,7 @@ import ActionUtils from '@/utils/action'
 import Utils from '@/utils/util'
 import { findAllByCurrUserId, saveCalendarInfos, removeCalendarInfos } from '@/api/detection/newHomeApi'
 import { delQuickNavigation, addQuickNavigation, getQuickNavigation } from '@/api/platform/message/innerMessage'
-import { add } from 'lodash'
+import { add, isObject } from 'lodash'
 const defaultRouterAlias = '/router-alias/'
 import newPng from '@/assets/images/homepage/new.png'
 
@@ -21,13 +21,11 @@ export function buildComponent (name, column, preview) {
             props: {
                 params: {
                     type: Object,
-                    default: function () {
-                        return {}
-                    }
+                    default: () => {}
                 },
                 height: {
                     type: Number,
-                    default: column.height ? column.height : 300
+                    default: column.height || 300
                 },
                 visible: {
                     type: Boolean,
@@ -39,43 +37,35 @@ export function buildComponent (name, column, preview) {
                     if (Utils.isEmpty(val)) {
                         return ''
                     }
-                    if (type === 'pending') {
-                        const opt = taskTypeOptions.find(x => x['value'] === val)
-                        return opt ? opt['label'] || '' : ''
-                    } else if (type === 'already' || type === 'myRequest') {
-                        const opt = dashboardStatus.find(x => x['value'] === val)
-                        return opt ? opt['label'] || '' : ''
-                    } else if (type === 'gender') {
-                        const opt = genderOptions.find(x => x['value'] === val)
-                        return opt ? opt['label'] || '' : ''
-                    } else if (type === 'favorites') {
-                        const opt = favoritesOptions.find(x => x['value'] === val)
-                        return opt ? opt['label'] || '' : ''
-                    } else if (type === 'notice') {
-                        const opt = noticeOptions.find(x => x['value'] === val)
-                        return opt ? opt['label'] || '' : ''
-                    } else if (type === 'unreadMessage') {
-                        const opt = unreadMessageOptions.find(x => x['value'] === val)
-                        return opt ? opt['label'] || '' : ''
+                    const typeMap = {
+                        pending: taskTypeOptions,
+                        already: dashboardStatus,
+                        myRequest: dashboardStatus,
+                        gender: genderOptions,
+                        favorites: favoritesOptions,
+                        notice: noticeOptions,
+                        unreadMessage: unreadMessageOptions
+                    }
+                    if (!typeMap[type]) {
+                        return val
                     }
-                    return val
+                    return typeMap[type].find(x => x['value'] === val) ? typeMap[type].find(x => x['value'] === val).label : val
                 }
             },
             data () {
                 const { first = '', second = '' } = this.$store.getters.level
-                const { userList = [], deptList = [], userId = '' } = this.$store.getters
-                const t1 = deptList.find((i) => i.positionId === first) || {}
-                const t2 = deptList.find((i) => i.positionId === second) || {}
+                const { userList = [], deptList = [], menus, userInfo } = this.$store.getters
+                const t1 = deptList.find(i => i.positionId === first) || {}
+                const t2 = deptList.find(i => i.positionId === second) || {}
                 const locationName = second ? t1.positionName + t2.positionName : t1.positionName
-                const t3 = userList.find((i) => i.userId === userId) || {}
-                const deptName = t3.positions ? deptList.filter((i) => t3.positions.includes(i.positionName)).map((i) => i.positionName) : []
-                const roleName = t3.roles ? t3.roles.split(',') : []
                 return {
+                    userList,
                     deptList,
+                    menus,
                     locationName,
-                    deptName,
-                    roleName,
                     newPng,
+                    imgOptionsData,
+                    positions: userInfo.positions,
                     loading: false,
                     title: `${column.name}`,
                     alias: `${column.alias}`,
@@ -87,22 +77,20 @@ export function buildComponent (name, column, preview) {
                     stautusOptions: [],
                     bpmnFormrenderDialogVisible: false, // 表单
                     editId: '',
-                    imgOptionsData: imgOptionsData,
                     bodyShow: true,
                     show: false,
                     showHeight: '',
-                    cardHeight: 100 + '%',
+                    cardHeight: '100%',
 
                     activeName: 'innerMessage',
                     unreadMessageOption: {},
-
                     formName: 'form',
                     dialogFormVisible: false,
                     formLabelWidth: '120px',
-                    form: {
-                        label: '',
-                        url: '',
-                        target: ''
+                    quickNavform: {
+                        urlName: '',
+                        urlAddr: '',
+                        display: '_blank'
                     },
                     defaultForm: {},
 
@@ -111,19 +99,19 @@ export function buildComponent (name, column, preview) {
                     pendingBusinessOption: {},
                     bpmn: [],
                     rules: {
-                        label: [
+                        urlName: [
                             {
                                 required: true,
                                 message: this.$t('validate.required')
                             }
                         ],
-                        url: [
+                        urlAddr: [
                             {
                                 required: true,
                                 message: this.$t('validate.required')
                             }
                         ],
-                        target: [
+                        display: [
                             {
                                 required: true,
                                 message: this.$t('validate.required')
@@ -148,8 +136,7 @@ export function buildComponent (name, column, preview) {
                 })
             },
             mounted () {
-                this.defaultForm = JSON.parse(JSON.stringify(this.form))
-                this.getNDlist()
+                this.defaultForm = JSON.parse(JSON.stringify(this.quickNavform))
                 this.$nextTick(() => {
                     this.fetchData()
                 })
@@ -158,57 +145,45 @@ export function buildComponent (name, column, preview) {
                 fetchData (columns, params = {}) {
                     this.loading = true
                     this.showHeight = this.getHeight()
-                    const param = Utils.isNotEmpty(columns)
-                        ? columns
-                        : column.alias === 'unreadMessage' || column.alias === 'pendingBusiness'
-                            ? { dataMode: column.dataMode, dataFrom: column.dataFrom }
-                            : column
+                    const param = Utils.isNotEmpty(columns) && (column.alias === 'unreadMessage' || column.alias === 'pendingBusiness')
+                        ? { dataMode: column.dataMode, dataFrom: column.dataFrom }
+                        : column
                     if (param.alias === 'myCalendar') {
-                        const events = []
-                        findAllByCurrUserId().then((res) => {
+                        const { getFormatDate, getDate } = this.$common
+                        findAllByCurrUserId().then(res => {
                             const { data = [] } = res || {}
-                            for (const i of data) {
+                            this.data = data.map(i => ({
+                                id: i.id,
+                                title: i.title,
+                                content: i.content,
+                                start: i.startTime,
                                 // 日期组件日程显示里,end的时间需要多加一天,end:2024-01-02时,日程条只到2024-01-01的日期位置上
-                                const event = {
-                                    id: i.id,
-                                    title: i.title,
-                                    content: i.content,
-                                    start: i.startTime,
-                                    end: this.updateDay('add', i.endTime, 1),
-                                    jieShuShiJian: i.endTime,
-                                    zhuangTai: i.emergencyState,
-                                    color: this.colorStatus[Number(i.emergencyState) - 1]
-                                }
-                                events.push(event)
-                            }
-                            this.data = events
+                                end: getFormatDate('string', 10, getDate('day', 1, i.endTime)),
+                                jieShuShiJian: i.endTime,
+                                zhuangTai: i.emergencyState,
+                                color: this.colorStatus[Number(i.emergencyState) - 1]
+                            }))
                         }).catch(() => {
-                            alert('获取日历日程失败!')
+                            this.$message.error('获取日历日程失败!')
+                        })
+                    } else if (param.alias === 'quickNavigation') {
+                        getQuickNavigation().then(res => {
+                            this.quickNavigationData = res.data || []
                         })
                     } else {
-                        getData(param, params).then((response) => {
-                            let data = response.data
+                        getData(param, params).then(res => {
+                            let { data } = res || {}
                             if (Utils.isNotEmpty(data) && Utils.isString(data)) {
-                                data = Utils.parseData(response.data)
+                                data = Utils.parseData(res.data)
                             }
-                            var check = Object.prototype.toString
-                            this.data = check.call(data) === '[object Object]' ? data.dataResult ? data.dataResult : data : data
-                            this.totality = check.call(data) === '[object Object]' ? data.pageResult ? data.pageResult : data : data
-                            // 公告栏目进行部门的数据过滤
-                            if (param.id === '776027232253509632' || param.alias === 'notice') {
-                                const postions = this.$store.getters.position
-                                const filDatas = []
-                                if (postions) {
-                                    for (const i of this.data) {
-                                        if (postions.indexOf(i.depId) > -1) {
-                                            filDatas.push(i)
-                                        }
-                                    }
-                                }
-                                this.data = filDatas
-                                this.totality = filDatas
+                            this.data = data && data.dataResult ? data.dataResult : data
+                            this.totality = data && data.dataResult ? data.pageResult : data
+                            // 公告栏目对数据过滤
+                            if (param.alias === 'notice') {
+                                const deptIds = this.deptList.map(i => i.positionId)
+                                this.data = data.filter(i => deptIds.includes(i.depId))
                             }
-                            this.variables = response.variables
+                            this.variables = res.variables
                             this.loading = false
                         }).catch((e) => {
                             this.loading = false
@@ -218,28 +193,36 @@ export function buildComponent (name, column, preview) {
                 getPhoto (photo) {
                     return getFile(photo)
                 },
-                getFilterTitle (t) {
-                    return t.match('#([^#]+)#') === null ? '' : t.match('^(.*?)#.*?#')[0]
-                },
-                getTransactionSpecification (t) {
-                    return t.match('#([^#]+)#') === null ? '' : t.match('#(.*?)#')[1]
-                },
-                getMid (m) {
-                    const bm = this.getBPBMID(m) || ''
-                    const a = this.deptList.find((i) => i.positionId === bm)
-                    return a ? a.positionName : ''
+                getTaskDesc (v) {
+                    if (!v.includes('#')) {
+                        return ''
+                    }
+                    return v.split('#')[1] || ''
                 },
-                getBPBMID (t) {
-                    return t.split('"dept":')[1] === null ? '' : t.split('"dept":')[1].replace(new RegExp('"', 'g'), '')
+                getTaskInfo (val, arg) {
+                    const arr = val.split('#')
+                    if (!arr[2]) {
+                        return ''
+                    }
+                    const result = JSON.parse(`{${arr[2]}}`)
+                    if (!result.dept) {
+                        return ''
+                    }
+                    const depts = result.dept.split(',')
+                    const deptNames = []
+                    depts.forEach(item => {
+                        const t = this.deptList.find(i => i.positionId === item)
+                        deptNames.push(t ? t.positionName : result.dept)
+                    })
+                    result.deptName = deptNames.join(',')
+                    return result[arg]
                 },
-                getUser (val) {
-                    if (val === 'dd') {
-                        return this.locationName
-                    } else if (val === 'bm') {
-                        return this.deptName
-                    } else {
-                        return this.roleName
+                transformData (val, dataset, from, to) {
+                    if (!val) {
+                        return ''
                     }
+                    const temp = this[dataset].find(u => u[from] === val)
+                    return temp ? temp[to] : ''
                 },
                 getHeightNoUnit () {
                     // 高度 - header - 边框
@@ -249,31 +232,22 @@ export function buildComponent (name, column, preview) {
                         return 150
                     }
                 },
-                getHeight () {
+                getHeight (h = 20) {
                     // 高度 - header - 边框
                     if (!this.visible) {
-                        return this.height ? (this.height - 80) + 'px' : '150px'
+                        return this.height ? `${(this.height - 60 - h)}px` : '150px'
                     } else {
-                        return 100 + '%'
-                    }
-                },
-                getAddHeight (addH) {
-                    // 高度 - header - 边框
-                    if (!this.visible) {
-                        return this.height ? (this.height - 60 - (addH || 0)) + 'px' : '150px'
-                    } else {
-                        return 100 + '%'
+                        return '100%'
                     }
                 },
                 getDashboardHeight () {
-                    return this.height ? (this.height + 20) + 'px' : '150px'
+                    return this.height ? `${this.height + 20}px` : '150px'
                 },
                 getAttrs () {
                     const item = JSON.parse(JSON.stringify(column))
                     item.templateHtml = null
                     return item
                 },
-                getFullCalendarEvents (data) {},
                 /**
                  * 构建首页日期组件的参数
                  * @param {*} data
@@ -352,6 +326,9 @@ export function buildComponent (name, column, preview) {
                         case 'expansion': // 展开
                             this.handleCollapseExpand(command, data, actions)
                             break
+                        case 'add': // 新增
+                            this.getFormData()
+                            break
                         default:
                             break
                     }
@@ -363,10 +340,6 @@ export function buildComponent (name, column, preview) {
                 handleApprove (id) {
                     this.$emit('action-event', 'approve', id)
                 },
-                // 截取日期
-                getNewsDate (str, length) {
-                    return str.substring(0, length)
-                },
                 handleUnreadMessage (id) {
                     this.$emit('action-event', 'unRead', id)
                 },
@@ -375,18 +348,24 @@ export function buildComponent (name, column, preview) {
                     this.emitActionEventHandler('fullscreen', { id: this.attrs.id })
                 },
                 openPlate (url) {
-                    this.$router.push(`/${url === 'myTraining' ? 'rygl/rypx/wdpx' : url}`)
+                    const menuMap = {
+                        myTraining: 'rygl/rypx/wdpx',
+                        myTesting: 'rygl/kszx/wdks',
+                        myDevices: 'sbgls/mywh'
+                    }
+                    if (menuMap[url]) {
+                        const alias = menuMap[url].split('/')[0]
+                        const resInfo = this.menus.find(i => i.alias === alias)
+                        this.$store.dispatch('ibps/menu/activeHeaderSet', { activeHeader: resInfo.id, vm: this })
+                    }
+                    this.$router.push(`/${menuMap[url] || url}`)
                 },
                 /**
                  * 处理更多
                  */
                 handleMore () {
                     if (this.attrs.colUrl === '') {
-                        this.$message({
-                            message: '未设置更多路径的url',
-                            type: 'warning'
-                        })
-                        return
+                        return this.$message.warning('未设置更多路径的url')
                     }
                     this.$router.push(`/${this.attrs.colUrl}`)
                 },
@@ -406,14 +385,6 @@ export function buildComponent (name, column, preview) {
                     params.$alias = this.alias
                     this.emitActionEventHandler('flow', params)
                 },
-                addBreadcrumb () {
-                    let i = this.data.length
-                    i++
-                    this.data.push({
-                        url: 'http://bpmhome.cn/index.html',
-                        label: '地址' + i
-                    })
-                },
                 handleCollapseExpand (command, data, actions) {
                     this.bodyShow = !this.bodyShow
                     const index = actions.findIndex((action) => action.key === data.key)
@@ -425,29 +396,29 @@ export function buildComponent (name, column, preview) {
                     this.showHeight = this.bodyShow ? this.getHeight() : 0
                     this.$refs['toolbar'].callback(actions)
                 },
-
                 formValidate () {
                     this.$nextTick(() => {
                         this.$refs[this.formName].validate(() => {})
                     })
                 },
                 getFormData () {
-                    // 固定模拟数据
-                    this.form = JSON.parse(JSON.stringify(this.defaultForm))
+                    this.quickNavform = JSON.parse(JSON.stringify(this.defaultForm))
                     this.formValidate()
                     this.dialogFormVisible = true
-                    // this.$refs[this.formName] ? this.$refs[this.formName].resetFields() : null
-                    // TODO:接口暂未构建,先隐藏。
-                    // this.fetchData()
-                },
-                handleClose (taskid, i) {
-                    this.quickNavigationData.splice(i, 1)
-                    const delParam = { navigateIds: taskid }
-                    delQuickNavigation(delParam).then(response => {
-                    }).catch(() => {
-                        // this.loading = false
+                },
+                handleNavRemove (navId, i) {
+                    this.$confirm('是否确认删除该快捷导航?', '提示', {
+                        confirmButtonText: '确认',
+                        cancelButtonText: '取消',
+                        type: 'warning',
+                        showClose: false,
+                        closeOnClickModal: false
+                    }).then(() => {
+                        delQuickNavigation({ navigateIds: navId }).then(() => {
+                            this.$message.success('删除成功')
+                            this.quickNavigationData.splice(i, 1)
+                        })
                     })
-                    // TODO: 传递后台删减后得数据。
                 },
                 // 错误头像的照片
                 errorAvatarHandler (data) {
@@ -458,51 +429,19 @@ export function buildComponent (name, column, preview) {
                     this.$refs[this.formName].resetFields()
                     this.dialogFormVisible = false
                 },
-                getNDlist () {
-                    getQuickNavigation().then(response => {
-                        this.quickNavigationData = response.data || []
-                    }).catch(() => {
-                        // this.loading = false
-                    })
-                },
-                confirm () {
-                    // TODO:未有API接口 模拟数据不会因添加而变化
+                saveQuickNav () {
                     this.$refs[this.formName].validate(valid => {
                         if (valid) {
-                            this.quickNavigationData.push({
-                                urlName: this.form.label,
-                                urlAddr: this.form.url,
-                                display: this.form.target
-                            })
-                            this.dialogFormVisible = false
-                            const paramND = {
-                                urlName: this.form.label,
-                                urlAddr: this.form.url,
-                                display: this.form.target,
-                                id: ''
-                            }
-                            addQuickNavigation(paramND).then(response => {
-                                // console.log(111111)
-                            }).catch(() => {
-                                // this.loading = false
+                            addQuickNavigation({ id: '', ...this.quickNavform }).then(() => {
+                                this.$message.success('添加成功!')
+                                this.quickNavigationData.push(this.quickNavform)
+                                this.dialogFormVisible = false
                             })
                         } else {
                             ActionUtils.saveErrorMessage()
                         }
                     })
                 },
-                // 更改指定日期是加还是减days天
-                updateDay (state, date, days) {
-                    var d = new Date(date)
-                    if (state === 'add') {
-                        d.setDate(d.getDate() + days)
-                    } else {
-                        d.setDate(d.getDate() - days)
-                    }
-                    var mon = d.getMonth() + 1 < 10 ? '0' + (d.getMonth() + 1) : d.getMonth() + 1
-                    const endD = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
-                    return `${d.getFullYear()}-${mon}-${endD}`
-                },
                 // 父组件调用该方法给日程添加数据
                 async setCalendarEvents (param) {
                     const { userId = '', name = '' } = this.$store.getters
@@ -530,32 +469,10 @@ export function buildComponent (name, column, preview) {
                     this.refreshData()
                 },
                 // 公告栏是否显示new图标
-                showNewIcon (row) {
-                    var nowDate = new Date((new Date()).getTime() + 8 * 60 * 60 * 1000)
-                    var time = nowDate.toJSON().split('T').join(' ').substr(0, 10)
-                    if (this.getOffsetDays(time, row.publicDate.substring(0, 10)) < 8) {
-                        return true
-                    } else {
-                        return false
-                    }
-                },
-                // 获取时间差
-                getOffsetDays (startDate, endDate) {
-                    if (!startDate) {
-                        return false
-                    } else {
-                        var startDateArr = startDate.split('-')
-                        var checkStartDate = new Date()
-                        checkStartDate.setFullYear(startDateArr[0], startDateArr[1], startDateArr[2])
-                        var endDateArr = endDate.split('-')
-                        var checkEndDate = new Date()
-                        checkEndDate.setFullYear(endDateArr[0], endDateArr[1], endDateArr[2])
-                        var days = (checkStartDate.getTime() - checkEndDate.getTime()) / 3600000 / 24
-                        if (startDateArr[0] !== endDateArr[0]) {
-                            flag = true
-                        }
-                        return days
-                    }
+                showNewIcon (date, days) {
+                    const nowDate = new Date().getTime
+                    const targetDate = new Date(date).getTime
+                    return targetDate + days * 24 * 60 * 60 * 1000 > nowDate
                 }
             },
             template: column.templateHtml !== '' ? `${column.templateHtml}` : `<div></div>`

+ 1 - 1
src/views/system/dashboard/templates/alreadyMatters.vue

@@ -1,5 +1,5 @@
 <template>
-    <el-card :style="{height:cardHeight}" class="box-card">
+    <el-card :style="{height:cardHeight}" class="home-card">
         <div slot="header" class="clearfix">
             <span>{{ title }}</span>
             <ibps-desktop-toolbar

+ 1 - 1
src/views/system/dashboard/templates/completedMatters.vue

@@ -1,5 +1,5 @@
 <template>
-    <el-card class="box-card">
+    <el-card class="home-card">
         <div slot="header" class="clearfix">
             <span>{{ title }}</span>
             <ibps-desktop-toolbar ref="toolbar" :actions="[{ key: 'refresh' }, { key: 'more' }, { key: 'fullscreen' }, { key: 'collapse' }]" @action-event="handleActionEvent" />

+ 1 - 1
src/views/system/dashboard/templates/delegate.vue

@@ -1,5 +1,5 @@
 <template>
-    <el-card class="box-card">
+    <el-card class="home-card">
         <div slot="header" class="clearfix">
             <span>{{ title }}</span>
             <ibps-desktop-toolbar ref="toolbar" :actions="[{ key: 'refresh' }, { key: 'more' }, { key: 'fullscreen' }, { key: 'collapse' }]" @action-event="handleActionEvent" />

+ 1 - 1
src/views/system/dashboard/templates/line.vue

@@ -1,5 +1,5 @@
 <template>
-    <el-card :style="{height: cardHeight}" class="box-card">
+    <el-card :style="{height: cardHeight}" class="home-card">
         <div slot="header" class="clearfix">
             <span>{{ title }}</span>
             <ibps-desktop-toolbar

+ 1 - 1
src/views/system/dashboard/templates/myCalendar.vue

@@ -1,5 +1,5 @@
 <template>
-    <el-card :style="{height:cardHeight}" class="box-card changeShadow">
+    <el-card :style="{height:cardHeight}" class="home-card changeShadow">
         <div slot="header" class="clearfix">
             <span>{{  }}</span>
             <ibps-desktop-toolbar

+ 1 - 1
src/views/system/dashboard/templates/myCompleted.vue

@@ -1,5 +1,5 @@
 <template>
-    <el-card class="box-card">
+    <el-card class="home-card">
         <div slot="header" class="clearfix">
             <span>{{ title }}</span>
             <ibps-desktop-toolbar

+ 8 - 8
src/views/system/dashboard/templates/myFavorites.vue

@@ -1,7 +1,7 @@
 <template>
-    <el-card class="box-card changeShadow">
+    <el-card class="home-card changeShadow">
         <div slot="header" class="clearfix">
-          	<ibps-icon name="logo" />
+            <ibps-icon name="logo" />
             <span>{{ title }}</span>
             <ibps-desktop-toolbar
                 ref="toolbar"
@@ -9,23 +9,23 @@
                 @action-event="handleActionEvent"
             />
         </div>
-        <div ref="body" :style="{height:getAddHeight(0),width:'100%'}">
+        <div ref="body" :style="{height: getHeight(0), width: '100%'}">
             <el-scrollbar
                 style="height: 100%;width:100%;"
                 wrap-class="ibps-scrollbar-wrapper"
             >
-                <ibps-list v-if="data && data.length >0" class="ibps-pr-10">
+                <ibps-list v-if="data && data.length" class="ibps-pr-10">
                     <ibps-list-item
-                        v-for="(d,index) in data[0].data"
+                        v-for="(item, index) in data[0].data"
                         :key="index"
-                        @click.native="handleFlowClick({defId:d.id})"
+                        @click.native="handleFlowClick({ defId: item.id })"
                     >
                         <ibps-list-item-meta>
-                            <el-link slot="title" type="primary" :underline="false">{{ d.name|removeHtmlTag }}</el-link>
+                            <el-link slot="title" type="primary" :underline="false">{{ item.name }}</el-link>
                         </ibps-list-item-meta>
                         <div slot="extra">
                             <!-- <ibps-icon name="dot-circle-o" style="color:#36c6d3" /> -->
-                            <el-tag size="mini" type="warning">{{ d.status | filterStatus('favorites') }}</el-tag>
+                            <el-tag size="mini" type="warning">{{ item.status | filterStatus('favorites') }}</el-tag>
                         </div>
                     </ibps-list-item>
                 </ibps-list>

+ 49 - 71
src/views/system/dashboard/templates/myMessage.vue

@@ -1,12 +1,11 @@
-
-//标签页版
 <template>
-    <el-card :style="{height:cardHeight}" class="box-card changeShadow">
+    <!-- 选项卡版 -->
+    <!-- <el-card :style="{height: cardHeight}" class="home-card changeShadow">
         <div slot="header" class="clearfix">
             <ibps-icon name="commenting" />
-            <div style="width: 50%;display: inline-flex;align-items: center;">
+            <div style="width: 50%; display: inline-flex; align-items: center;">
                 <span>{{ title }}</span>
-                <span class="totalityClass">{{totality==null?'0':totality.totalCount>999?'999+':totality.totalCount}}</span> 
+                <span class="totalityClass">{{ totality ? totality.totalCount > 999 ? '999+' : totality.totalCount : '0' }}</span>
             </div>
             <ibps-desktop-toolbar
                 ref="toolbar"
@@ -14,20 +13,19 @@
                 @action-event="handleActionEvent"
             />
         </div>
+        <!== <div class="tabs-title">
+            <ibps-icon name="commenting" />
+            <span style="font-size: 15px; margin: 0 1%;">{{ title }}</span>
+            <span class="totalityClass">{{ totality ? totality.totalCount > 999 ? '999+' : totality.totalCount : '0' }}</span>
+        </div>
+        <div class="tabs-toolbar">
+            <ibps-desktop-toolbar
+                ref="toolbar"
+                :actions="[{ key: 'refresh' }, { key: 'more' }, { key: 'collapse' }]"
+                @action-event="handleActionEvent"
+            />
+        </div> ==>
         <div>
-            <!-- <div class="tabs-title">
-                <ibps-icon name="commenting" />
-                <span style="font-size: 15px;margin: 0 1%;">{{ title }}</span>
-                <span class="totalityClass">{{totality==null?'0':totality.totalCount>999?'999+':totality.totalCount}}</span> 
-            </div>
-            <div class="tabs-toolbar">
-                <ibps-desktop-toolbar
-                    ref="toolbar"
-                    :actions="[{ key: 'refresh' }, { key: 'more' }, { key: 'collapse' }]"
-                    @action-event="handleActionEvent"
-                />
-            </div>
-             -->
             <div ref="body">
                 <el-tabs
                     ref="unreadMessageTabs"
@@ -38,31 +36,28 @@
                     })"
                 >
                     <el-tab-pane label="未读" name="innerMessage" style="margin:0;">
-                        <div ref="tabsContent" :style="{height:getAddHeight(20),width:'100%'}" class="tabs-content">
+                        <div ref="tabsContent" :style="{height: getHeight(20), width: '100%'}" class="tabs-content">
                             <el-scrollbar
                                 style="height: 100%;width:100%;"
                                 wrap-class="ibps-scrollbar-wrapper"
                             >
                                 <ibps-list v-if="data && data.length >0" class="ibps-pr-10">
                                     <ibps-list-item
-                                        v-for="(d,index) in data"
+                                        v-for="(item, index) in data"
                                         :key="index"
-                                        @click.native="handleUnreadMessage(d.id)"
+                                        @click.native="handleUnreadMessage(item.id)"
                                     >
                                         <ibps-list-item-meta>
-                                            <ibps-icon slot="avatar" name="bolt" style="color:#5cb85c;margin:5px 0 0 5px;" />
-
-                                            <el-link slot="title" type="primary" :underline="false">{{ d.subject }}</el-link>
-                                            <template slot="description">{{ d.createTime|dateFormat }}</template>
+                                            <ibps-icon slot="avatar" name="bolt" style="color: #5cb85c; margin: 5px 0 0 5px;" />
+                                            <el-link slot="title" type="primary" :underline="false">{{ item.subject }}</el-link>
+                                            <template slot="description">{{ item.createTime | dateFormat }}</template>
                                         </ibps-list-item-meta>
                                         <div slot="extra">
-                                            <!-- <ibps-icon name="dot-circle-o" style="color:#36c6d3" /> -->
-                                            <el-tag size="mini" type="warning">{{ d.messageType | filterStatus('unreadMessage') }}</el-tag>
-                                            
+                                            <!== <ibps-icon name="dot-circle-o" style="color:#36c6d3" /> ==>
+                                            <el-tag size="mini" type="warning">{{ item.messageType | filterStatus('unreadMessage') }}</el-tag>
                                         </div>
                                     </ibps-list-item>
                                 </ibps-list>
-
                                 <el-alert
                                     v-else
                                     :closable="false"
@@ -72,26 +67,26 @@
                             </el-scrollbar>
                         </div>
                     </el-tab-pane>
-                    <!-- <el-tab-pane label="已读" name="system">
-                        <div ref="tabsContent" :style="{height:showHeight,width:'100%'}" class="tabs-content">
+                    <!== <el-tab-pane label="已读" name="system">
+                        <div ref="tabsContent" :style="{height: showHeight, width: '100%'}" class="tabs-content">
                             <el-scrollbar
                                 style="height: 100%;width:100%;"
                                 wrap-class="ibps-scrollbar-wrapper"
                             >
-                                <ibps-list v-if="data && data.length >0" class="ibps-pr-10">
+                                <ibps-list v-if="data && data.length" class="ibps-pr-10">
                                     <ibps-list-item
-                                        v-for="(d,index) in data"
+                                        v-for="(item,index) in data"
                                         :key="index"
-                                        @click.native="handleUnreadMessage(d.id)"
+                                        @click.native="handleUnreadMessage(item.id)"
                                     >
                                         <ibps-list-item-meta>
-                                            <ibps-icon slot="avatar" name="bolt" style="color:#5cb85c;margin:5px 0 0 5px;" />
-                                            <el-link slot="title" type="primary" :underline="false">{{ d.subject }}</el-link>
-                                            <template slot="description">{{ d.createTime|dateFormat }}</template>
+                                            <ibps-icon slot="avatar" name="bolt" style="color: #5cb85c; margin: 5px 0 0 5px;" />
+                                            <el-link slot="title" type="primary" :underline="false">{{ item.subject }}</el-link>
+                                            <template slot="description">{{ item.createTime | dateFormat }}</template>
                                         </ibps-list-item-meta>
                                         <div slot="extra">
                                             <ibps-icon name="dot-circle-o" style="color:#36c6d3" />
-                                            {{ d.messageType | filterStatus('unreadMessage') }}
+                                            {{ item.messageType | filterStatus('unreadMessage') }}
                                         </div>
                                     </ibps-list-item>
                                 </ibps-list>
@@ -103,34 +98,19 @@
                                 />
                             </el-scrollbar>
                         </div>
-                    </el-tab-pane> -->
+                    </el-tab-pane> ==>
                 </el-tabs>
             </div>
         </div>
-    </el-card>
-</template>
-
-
-
-
-
-
-
-
-
-
-
-
-
+    </el-card> -->
 
-/////
- <!--<template>-->
-    <!-- <el-card :style="{height:cardHeight}" class="box-card changeShadow">
+    <!-- 无选项卡版本 -->
+    <el-card :style="{height: cardHeight}" class="home-card changeShadow">
         <div slot="header" class="clearfix">
             <ibps-icon name="commenting" />
-            <div style="width: 50%;display: inline-flex;align-items: center;">
+            <div style="width: 50%; display: inline-flex; align-items: center;">
                 <span>{{ title }}</span>
-                <span class="totalityClass">{{totality==null?'0':totality.totalCount>999?'999+':totality.totalCount}}</span> 
+                <span class="totalityClass">{{ totality ? totality.totalCount > 999 ? '999+' : totality.totalCount : '0' }}</span>
             </div>
             <ibps-desktop-toolbar
                 ref="toolbar"
@@ -139,27 +119,25 @@
             />
         </div>
         <div>
-            <div ref="body" :style="{height:getAddHeight(),width:'100%'}">
+            <div ref="body" :style="{height: getHeight(), width:'100%'}">
                 <el-scrollbar
                     style="height: 100%;width:100%;"
                     wrap-class="ibps-scrollbar-wrapper"
                 >
-                    <ibps-list v-if="data && data.length >0" class="ibps-pr-10">
+                    <ibps-list v-if="data && data.length" class="ibps-pr-10">
                         <ibps-list-item
-                            v-for="(d,index) in data"
+                            v-for="(item, index) in data"
                             :key="index"
-                            @click.native="handleUnreadMessage(d.id)"
+                            @click.native="handleUnreadMessage(item.id)"
                         >
                             <ibps-list-item-meta>
-                                <ibps-icon slot="avatar" name="bolt" style="color:#5cb85c;margin:5px 0 0 5px;" />
-
-                                <el-link slot="title" type="primary" :underline="false">{{ d.subject }}</el-link>
-                                <template slot="description">{{ d.createTime|dateFormat }}</template>
+                                <ibps-icon slot="avatar" name="bolt" style="color: #5cb85c; margin: 5px 0 0 5px;" />
+                                <el-link slot="title" type="primary" :underline="false">{{ item.subject }}</el-link>
+                                <template slot="description">{{ item.createTime | dateFormat }}</template>
                             </ibps-list-item-meta>
                             <div slot="extra">
                                 <!-- <ibps-icon name="dot-circle-o" style="color:#36c6d3" /> -->
-                                <el-tag size="mini" type="warning">{{ d.messageType | filterStatus('unreadMessage') }}</el-tag>
-                                
+                                <el-tag size="mini" type="warning">{{ item.messageType | filterStatus('unreadMessage') }}</el-tag>
                             </div>
                         </ibps-list-item>
                     </ibps-list>
@@ -172,5 +150,5 @@
                 </el-scrollbar>
             </div>
         </div>
-    </el-card> -->
- <!--</template>-->
+    </el-card>
+</template>

+ 1 - 1
src/views/system/dashboard/templates/myRequest.vue

@@ -1,5 +1,5 @@
 <template>
-    <el-card class="box-card">
+    <el-card class="home-card">
         <div slot="header" class="clearfix">
             <span>{{ title }}</span>
             <ibps-desktop-toolbar

+ 1 - 1
src/views/system/dashboard/templates/newProcess.vue

@@ -1,5 +1,5 @@
 <template>
-    <el-card :style="{height:cardHeight}" class="box-card">
+    <el-card :style="{height:cardHeight}" class="home-card">
         <div slot="header" class="clearfix">
             <span>{{ title }}</span>
             <ibps-desktop-toolbar

+ 17 - 9
src/views/system/dashboard/templates/notice.vue

@@ -1,5 +1,5 @@
 <template>
-    <el-card class="box-card changeShadow">
+    <el-card class="home-card changeShadow">
         <div slot="header" class="clearfix">
             <ibps-icon name="commenting" />
             <span>{{ title }}</span>
@@ -9,31 +9,39 @@
                 @action-event="handleActionEvent"
             />
         </div>
-        <div ref="body" :style="{height:getAddHeight(-20),width:'100%'}">
+        <div ref="body" :style="{height: getHeight(-20), width: '100%'}">
             <el-scrollbar
                 style="height: 100%;width:100%;"
                 wrap-class="ibps-scrollbar-wrapper"
             >
-                <ibps-marquee v-if="data && data.length >0" :data="data">
+                <ibps-marquee
+                    v-if="data && data.length"
+                    :auto="false"
+                    :speed="0"
+                >
                     <ibps-list class="ibps-pr-10">
                         <ibps-list-item
-                            v-for="(d,index) in data"
+                            v-for="(n, index) in data"
                             :key="index"
-                            @click.native="handleApprove(d.id)"
+                            @click.native="handleApprove(n.id)"
                         >
                             <ibps-list-item-meta>
                                 <!-- <div slot="avatar"><ibps-icon name="bolt" style="color:#5cb85c;margin: 5px 0 0 5px;" /></div> -->
-                                <el-link slot="title" type="primary" :underline="false">{{ d.title }}
-                                    <img :src="newPng" style="vertical-align: middle;height: 32px">
+                                <el-link slot="title" type="primary" :underline="false">{{ n.title }}
+                                    <img
+                                        v-if="showNewIcon(n.publicDate, 7)"
+                                        :src="newPng"
+                                        style="vertical-align: middle; height: 20px;"
+                                    >
                                 </el-link>
                             </ibps-list-item-meta>
                             <div slot="extra">
-                                <ibps-icon name="dot-circle-o" style="color:#36c6d3" />{{ getNewsDate(d.publicDate,10) }}
+                                <!-- <ibps-icon name="dot-circle-o" style="color:#36c6d3" /> -->
+                                {{ n.publicDate.slice(0, 10) }}
                             </div>
                         </ibps-list-item>
                     </ibps-list>
                 </ibps-marquee>
-
                 <el-alert
                     v-else
                     :closable="false"

+ 1 - 1
src/views/system/dashboard/templates/pendingBusiness.vue

@@ -1,7 +1,7 @@
 <template>
     <el-card
         v-loading.fullscreen.lock="loading"
-        class="box-card pending-business"
+        class="home-card pending-business"
         :element-loading-text="$t('common.loading')"
         element-loading-background="transparent"
     >

+ 34 - 29
src/views/system/dashboard/templates/pendingMatters.vue

@@ -2,7 +2,7 @@
     <el-card class="box-card changeShadow">
         <div slot="header" class="clearfix">
             <ibps-icon name="pending" />
-            <span style="font-size: 15px;">{{ title }}</span>
+            <span style="font-size: 16px;">{{ title }}</span>
             <!-- <span class="totalityClass">{{totality.totalCount>999?'999+':totality.totalCount}}</span> -->
             <ibps-desktop-toolbar
                 ref="toolbar"
@@ -10,71 +10,76 @@
                 @action-event="handleActionEvent"
             />
         </div>
-        <div ref="body" :style="{height:showHeight,width:'100%'}">
+        <div ref="body" :style="{height: showHeight, width: '100%'}">
             <el-scrollbar
-                style="height: 100%;width:100%;"
+                style="height: 100%; width: 100%;"
                 wrap-class="ibps-scrollbar-wrapper"
             >
                 <!-- <ibps-list-group v-if="data && data.length >0">
-                    <ibps-list v-for="(d,i) in data" :key="i" @click.native="handleFlowClick({taskId:d.taskId})">
-                        <div slot="label">{{ d.createTime|dateFormat }}</div>
-                        <el-link type="primary" :underline="false">{{ d.subject|removeHtmlTag }}</el-link>
-                        <el-avatar slot="icon" :src="getPhoto(d.instCreatorPhoto)" icon="el-icon-user-solid" @error="errorAvatarHandler">{{ d.creator }}</el-avatar>
+                    <ibps-list v-for="(item,i) in data" :key="i" @click.native="handleFlowClick({taskId:item.taskId})">
+                        <div slot="label">{{ item.createTime|dateFormat }}</div>
+                        <el-link type="primary" :underline="false">{{ item.subject|removeHtmlTag }}</el-link>
+                        <el-avatar slot="icon" :src="getPhoto(item.instCreatorPhoto)" icon="el-icon-user-solid" @error="errorAvatarHandler">{{ item.creator }}</el-avatar>
                         <span slot="extra">
                             <ibps-icon name="dot-circle-o" style="color:#36c6d3" />
-                            {{ d.status | filterStatus('pending') }}
+                            {{ item.status | filterStatus('pending') }}
                         </span>
                     </ibps-list>
                 </ibps-list-group> -->
-                <ibps-list v-if="data && data.length >0" class="ibps-pr-10">
+                <ibps-list v-if="data && data.length" class="ibps-pr-10">
                     <ibps-list-item
-                        v-for="(d,index) in data"
+                        v-for="(item, index) in data"
                         :key="index"
                         style="padding: 6px 0;"
-                        @click.native="handleFlowClick({taskId:d.taskId})"
+                        @click.native="handleFlowClick({ taskId: item.taskId })"
                     >
                         <ibps-list-item-meta>
                             <template slot="avatar">
-                                <template v-if="d.remindTimes === 0">
+                                <template v-if="item.remindTimes === 0">
                                     <el-avatar
-                                        :src="getPhoto(d.photo)"
+                                        :src="getPhoto(item.photo)"
                                         icon="el-icon-user-solid"
                                         @error="errorAvatarHandler"
-                                    >{{ d.creator }}</el-avatar>
+                                    >{{ item.creator }}</el-avatar>
                                 </template>
                                 <template v-else>
-                                    <el-badge :value="d.remindTimes" :max="99" class="item">
+                                    <el-badge :value="item.remindTimes" :max="99" class="item">
                                         <el-avatar
-                                            :src="getPhoto(d.instCreatorPhoto)"
+                                            :src="getPhoto(item.instCreatorPhoto)"
                                             icon="el-icon-user-solid"
                                             @error="errorAvatarHandler"
-                                        >{{ d.creator }}</el-avatar>
+                                        >{{ item.creator }}</el-avatar>
                                     </el-badge>
                                 </template>
                             </template>
-                            <el-link slot="title" type="primary" :underline="false" style="display: inline-block;width:100%;">
-                                <div style="display: flex;justify-content: space-between;width:100%;">
-                                    <span style="font-size:14px;width:70%;">{{ d.procDefName|removeHtmlTag }}</span>
+                            <el-link slot="title" type="primary" :underline="false" style="display: inline-block; width: 100%;">
+                                <div style="display: flex; justify-content: space-between; width: 100%;">
+                                    <span style="font-size: 14px; width: 70%;">{{ item.procDefName }}</span>
                                     <div style="font-size:14px">
-                                        <el-tag size="mini" type="success" disable-transitions>{{ d.name.length>3?'待'+d.name.slice(0,3)+'...':'待'+d.name }}</el-tag>
-                                        <el-tag v-if="d.expired=='即将超时'" size="mini" type="warning">{{ d.expired }}</el-tag>
-                                        <el-tag v-else-if="d.expired=='已超时'" size="mini" type="danger">{{ d.expired }}</el-tag>
+                                        <el-tag size="mini" type="success" disable-transitions>{{ item.name.length > 3 ? `待${item.name.slice(0, 3)}...` : `待${item.name}` }}</el-tag>
+                                        <el-tag v-if="item.expired === '即将超时'" size="mini" type="warning">{{ item.expired }}</el-tag>
+                                        <el-tag v-else-if="item.expired === '已超时'" size="mini" type="danger">{{ item.expired }}</el-tag>
                                     </div>
-
-                                    <!-- <el-tag v-else-if="d.state=='danger'" type=''>{{ '已超时' }}</el-tag> -->
+                                    <!-- <el-tag v-else-if="item.state=='danger'" type=''>{{ '已超时' }}</el-tag> -->
                                 </div>
                             </el-link>
                             <template slot="description">
                                 <div style="font-size: 12px;">
-                                    {{ getTransactionSpecification(d.subject)|removeHtmlTag }}
+                                    {{ getTaskDesc(item.subject) }}
                                 </div>
                             </template>
                             <template slot="description">
-                                <div style="display: flex;justify-content: space-between;">
-                                    <el-tag v-if="getMid(d.subject)&&getMid(d.subject)!=''" size="mini" style="font-size: 12px;" type="info" disable-transitions>{{ getMid(d.subject) }}</el-tag>
+                                <div style="display: flex; justify-content: space-between;">
+                                    <el-tag
+                                        v-if="getTaskInfo(item.subject, 'deptName')"
+                                        size="mini"
+                                        style="font-size: 12px;"
+                                        type="info"
+                                        disable-transitions
+                                    >{{ getTaskInfo(item.subject, 'deptName') }}</el-tag>
                                     <div v-else style="color:#fff;">无</div>
                                     <span style="font-size: 12px;">
-                                        {{ d.createTime|dateFormat }}
+                                        {{ item.createTime | dateFormat }}
                                     </span>
                                 </div>
                             </template>

+ 48 - 49
src/views/system/dashboard/templates/quickNavigation.vue

@@ -1,53 +1,52 @@
 <template>
-<el-card :style="{ height: cardHeight }" class="box-card changeShadow">
-    <div slot="header" class="clearfix">
-        <span>快速开始/快捷导航</span>
-        <el-button
-            icon="ibps-icon-add"
-            type="primary"
-            size="mini"
-            style="padding: 4px 10px;"
-            @click="getFormData"
-        >添加</el-button>
-    </div>
-    <div ref="body" :style="{height: showHeight, width: '100%'}">
-        <div :style="{height: showHeight, width: '100%'}" class="nav-content">
-            <el-tag
-                v-for="(tag, i) in quickNavigationData"
-                :key="i"
-                closable
-                :disable-transitions="false"
-                @close="handleClose(tag.id, i)"
-            >
-                <a :href="tag.urlAddr" :target="tag.display">{{ tag.urlName }}</a>
-            </el-tag>
+    <el-card :style="{ height: cardHeight }" class="home-card">
+        <div slot="header" class="clearfix">
+            <ibps-icon name="link" />
+            <span>快捷导航</span>
+            <ibps-desktop-toolbar
+                ref="toolbar"
+                :actions="[{ key: 'add' }]"
+                @action-event="handleActionEvent"
+            />
         </div>
-    </div>
-    <el-dialog
-        :visible.sync="dialogFormVisible"
-        :close-on-click-modal="false"
-        :close-on-press-escape="false"
-        title="添加快捷导航"
-        append-to-body
-    >
-        <el-form ref="form" :model="form" :rules="rules" :label-width="formLabelWidth" @submit.native.prevent>
-            <el-form-item label="名称:" prop="label">
-                <el-input v-model="form.label" autocomplete="off" />
-            </el-form-item>
-            <el-form-item label="url地址:" prop="url">
-                <el-input v-model="form.url" autocomplete="off" placeholder="请填写完整的URL地址,如https://www.szjyxt.com" />
-            </el-form-item>
-            <el-form-item label="打开方式:" prop="target">
-                <el-select v-model="form.target" placeholder="请选择" style="width:100%">
-                    <el-option label="新页面打开" value="_blank" />
-                    <el-option label="当前页面打开" value="_self" />
-                </el-select>
-            </el-form-item>
-        </el-form>
-        <div slot="footer" class="el-dialog--center">
-            <el-button type="primary" icon="el-icon-circle-save" @click="saveQuickNav">确 定</el-button>
-            <el-button icon="ibps-icon-close" @click="close">关 闭</el-button>
+        <div ref="body" :style="{height: showHeight, width: '100%'}">
+            <div :style="{height: showHeight, width: '100%'}" class="nav-content">
+                <el-tag
+                    v-for="(tag, i) in quickNavigationData"
+                    :key="i"
+                    closable
+                    :disable-transitions="false"
+                    @close="handleNavRemove(tag.id, i)"
+                >
+                    <a :href="tag.urlAddr" :target="tag.display">{{ tag.urlName }}</a>
+                </el-tag>
+            </div>
         </div>
-    </el-dialog>
-</el-card>
+        <el-dialog
+            :visible.sync="dialogFormVisible"
+            :close-on-click-modal="false"
+            :close-on-press-escape="false"
+            title="添加快捷导航"
+            append-to-body
+        >
+            <el-form ref="form" :model="quickNavform" :rules="rules" :label-width="formLabelWidth" @submit.native.prevent>
+                <el-form-item label="名称:" prop="label">
+                    <el-input v-model="quickNavform.urlName" autocomplete="off" />
+                </el-form-item>
+                <el-form-item label="url地址:" prop="url">
+                    <el-input v-model="quickNavform.urlAddr" autocomplete="off" placeholder="请填写完整的URL地址,如https://www.szjyxt.com" />
+                </el-form-item>
+                <el-form-item label="打开方式:" prop="target">
+                    <el-select v-model="quickNavform.display" placeholder="请选择" style="width:100%">
+                        <el-option label="新页面打开" value="_blank" />
+                        <el-option label="当前页面打开" value="_self" />
+                    </el-select>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="el-dialog--center">
+                <el-button type="primary" icon="el-icon-circle-save" @click="saveQuickNav">确 定</el-button>
+                <el-button icon="ibps-icon-close" @click="close">关 闭</el-button>
+            </div>
+        </el-dialog>
+    </el-card>
 </template>

+ 40 - 29
src/views/system/dashboard/templates/userInfoTab.vue

@@ -1,32 +1,43 @@
 <template>
-  <el-card class="box-card changeShadow verticalCenterFlex" >
-    <div ref="body" :style="{width:'100%'}">
-      <ibps-list-item-meta style="align-items: center;overflow: hidden;">
-        <el-avatar
-          v-if="data"
-          slot="avatar"
-          :icon="data.photo===''?'ibps-icon-user-circle':null"
-          :src="getPhoto(`/file/getImage?attachmentId=1212033424013918208`)"
-          :size="100"
-          style="font-size:100px;color: #C0C4CC;background: #fff;"
-        >
-          <img :src="getPhoto(data.photo)" class="photo-img" @error="errorAvatarHandler(data)">
-        </el-avatar>
-        <div slot="title" class="ibps-item-content">
-          <span class="ibps-item-content-title" style="font-size:16px">您好!<span v-if="data&&data.orgName!==''">{{ data.orgName }}的</span><label v-if="data&&data.fullname!==''">{{ data.fullname }}</label><label v-if="data&&data.gender!==''">{{ data.gender|filterStatus('gender') }}</label> </span>
-          <div slot="label" class="ibps-item-content-label">
-            <div>
-              地点:
-              <el-tag class="item512" type="success" size="mini">{{ getUser('dd') }}</el-tag>
-            </div>
-            <div>
-              部门:
-              <el-tag v-for="(item, index) in getUser('bm')" :key="Date.now() + Math.random() + index" class="item512" type="info" size="mini">{{ item }}</el-tag>
-            </div>
-            <!-- <span v-if="data&&data.address!==''">地址:{{ data.address }}</span> -->
-          </div>
+    <el-card class="home-card changeShadow verticalCenterFlex">
+        <div ref="body" :style="{width: '100%'}">
+            <ibps-list-item-meta style="align-items: center; overflow: hidden;">
+                <el-avatar
+                    v-if="data"
+                    slot="avatar"
+                    :icon="data.photo ? null : 'ibps-icon-user-circle'"
+                    :src="getPhoto()"
+                    :size="85"
+                    style="font-size: 100px; color: #c0c4cc; background: #fff;"
+                >
+                    <img :src="getPhoto(data.photo)" class="photo-img" @error="errorAvatarHandler(data)">
+                </el-avatar>
+                <div slot="title" class="ibps-item-content">
+                    <div class="ibps-item-content-title" style="font-size: 16px;">
+                        <span>您好!</span>
+                        <span v-if="data && data.orgName">{{ data.orgName }}的</span>
+                        <label v-if="data && data.fullname">{{ data.fullname }}</label>
+                        <label v-if="data && data.gender">{{ data.gender | filterStatus('gender') }}</label>
+                    </div>
+                    <div slot="label" class="ibps-item-content-label">
+                        <div>
+                            地点:
+                            <el-tag class="item512" type="success" size="mini">{{ locationName }}</el-tag>
+                        </div>
+                        <div>
+                            部门:
+                            <el-tag
+                                v-for="item in positions"
+                                :key="item.id"
+                                class="dept-tag"
+                                :type="item.isMainPost === 'Y' ? 'primary' : 'info'"
+                                size="mini"
+                            >{{ item.name }}</el-tag>
+                        </div>
+                        <!-- <span v-if="data&&data.address!==''">地址:{{ data.address }}</span> -->
+                    </div>
+                </div>
+            </ibps-list-item-meta>
         </div>
-      </ibps-list-item-meta>
-    </div>
-  </el-card>
+    </el-card>
 </template>