Forráskód Böngészése

修复首件工程废除按钮位置,修复首件工程pdf预览调用,修复表单多行输入框高度问题,屏蔽首页快速跳转按钮,修复导图树跟随主题色问题

iZaiZaiA 2 éve
szülő
commit
650e4e5144

+ 79 - 6
src/global/components/hc-menu-simple/index.vue

@@ -1,19 +1,29 @@
 <template>
     <div class="hc-menu-simple-box" :class="ui">
-        <template v-for="item in datas">
-            <div class="item-box" :class="item?.key === keysValue ? 'active' : ''" @click="MenuClick(item)">
+        <template v-for="item in datas" :key="item.key">
+            <div class="item-box" :class="item?.key === keysValue ? 'active' : ''" @click="MenuClick(item)" @contextmenu.prevent.stop="menuLabelContextMenu($event,item)">
                 <div class="icon-box" v-if="item?.icon">
                     <HcIcon :name="item?.icon" fill/>
                 </div>
                 <div class="label-box truncate">{{item?.label}}</div>
                 <el-badge :value="item?.badge" v-if="item?.badge > 0"/>
+                <!--操作菜单-->
+                <div class="menu-icon" :class="item.showMenuIcon?'show':''" v-if="menusData.length > 0">
+                    <div class="menu-popover-icon" @click.prevent.stop="menuLabelContextMenu($event,item)">
+                        <HcIcon name="apps" ui="text-2xl"/>
+                    </div>
+                </div>
+                <!--操作菜单 END-->
             </div>
         </template>
+        <!--右键菜单-->
+        <HcContextMenu ref="contextMenuRef" :datas="menusData" @item-click="handleMenuSelect" v-if="menusData.length > 0" @closed="handleMenuClosed"/>
     </div>
 </template>
 
 <script setup>
 import { ref,watch } from "vue";
+import {getObjValue, isValueNull} from "vue-utils-plus"
 const props = defineProps({
     ui: {
         type: String,
@@ -27,25 +37,63 @@ const props = defineProps({
         type: [String,Number],
         default: ''
     },
+    menus: {
+        type: Array,
+        default: () => ([])
+    },
 })
 
 //初始变量
 const keysValue = ref(props.keys)
+const menusData = ref(props.menus)
+const menuItemData = ref({})
 
 //监听
 watch(() => [
-    props.keys
-], ([keys]) => {
+    props.keys,
+    props.menus
+], ([keys, menus]) => {
+    menusData.value = menus
     keysValue.value = keys
 })
 
 //事件
-const emit = defineEmits(['change'])
+const emit = defineEmits(['change', 'menuTap'])
 const MenuClick = (item) => {
     if (item?.key !== keysValue.value) {
         emit('change', item)
     }
 }
+
+//鼠标右键事件
+const contextMenuRef = ref(null)
+const menuLabelContextMenu = (e,item) => {
+    const rows = menusData.value || [];
+    if (rows.length > 0) {
+        e.preventDefault();
+        menuItemData.value = item;
+        item.showMenuIcon = true
+        //展开菜单
+        contextMenuRef.value?.showMenu(e)
+    } else {
+        menuItemData.value = false;
+        item.showMenuIcon = false
+    }
+}
+
+//鼠标右键菜单被点击
+const handleMenuSelect = ({key}) => {
+    const item = getObjValue(menuItemData.value);
+    emit('menuTap', {key, item})
+}
+
+//菜单关闭
+const handleMenuClosed = () => {
+    const item = menuItemData.value;
+    if (!isValueNull(item)) {
+        menuItemData.value['showMenuIcon'] = false
+    }
+}
 </script>
 
 <style lang="scss" scoped>
@@ -58,7 +106,7 @@ const MenuClick = (item) => {
         align-items: center;
         background: #f1f5f8;
         border-radius: 6px;
-        padding: 8px 12px;
+        padding: 8px 14px;
         margin-bottom: 10px;
         transition: 0.2s;
         .icon-box {
@@ -80,6 +128,26 @@ const MenuClick = (item) => {
             color: #838791;
             font-size: 14px;
             transition: 0.2s;
+            flex: 1;
+        }
+        .menu-icon {
+            position: relative;
+            pointer-events: none;
+            transition: opacity 0.2s;
+            background: rgba(255, 255, 255, 0.25);
+            border-radius: 2px;
+            opacity: 0;
+            .menu-popover-icon {
+                display: flex;
+                align-items: center;
+                justify-content: center;
+                color: #878787;
+            }
+            &.show {
+                opacity: 1;
+                pointer-events: all;
+                cursor: context-menu;
+            }
         }
         &:not(.active) {
             cursor: pointer;
@@ -93,6 +161,11 @@ const MenuClick = (item) => {
                 color: #1a1a1a;
                 font-weight: 500;
             }
+            .menu-icon {
+                opacity: 1;
+                pointer-events: all;
+                cursor: context-menu;
+            }
         }
         &.active {
             box-shadow: var(--hc-shadow);

+ 32 - 1
src/styles/app/element.scss

@@ -79,6 +79,25 @@
     height: 40px;
     border: 1px solid #f1f5f8;
     box-shadow: var(--hc-shadow);
+    &.el-button--small {
+        height: 26px;
+        padding: 5px 11px;
+        font-size: 12px;
+    }
+    &[_icon] .hc-icon-i {
+        margin-right: 0;
+    }
+    &[_icon].el-button--small {
+        height: 26px;
+        width: 26px;
+        padding: 3px;
+        font-size: 18px;
+        border-radius: 3px;
+    }
+    &[text-white] {
+        --el-button-text-color: white !important;
+        --el-button-hover-text-color: white !important;
+    }
     &.el-button--primary {
         background: linear-gradient(to right, var(--el-color-primary-light-5), var(--el-color-primary), var(--el-color-primary-dark-2));
         background-size: 200%;
@@ -222,7 +241,6 @@
     }
 }
 .el-table[hc]:not([class*='el-table--border']) {
-    border: 1px solid #e9e9e9;
     .el-table__inner-wrapper::before {
         background-color: transparent;
     }
@@ -352,6 +370,7 @@
 .hc-table-ref-box {
     position: relative;
     display: inline-grid;
+    border: 1px solid #e9e9e9;
     width: 100%;
 }
 
@@ -596,9 +615,21 @@
     td {
         padding: 6px;
         font-family: "EUDC", 宋体, v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;
+        .el-textarea {
+            width: 100%;
+            height: 100%;
+            .el-textarea__inner {
+                min-height: initial !important;
+                background-color: #ffffff;
+                border-radius: 3px;
+                color: #606266;
+                height: 100%;
+            }
+        }
         .el-input {
             background-color: #ffffff !important;
             border-radius: 3px;
+            color: #606266;
             .el-input__wrapper {
                 background-color: inherit;
             }

+ 19 - 0
src/styles/app/main.scss

@@ -203,6 +203,25 @@ html, body, #app {
                 height: calc(100% - 68px);
             }
         }
+        &.menu {
+            width: 240px;
+            .hc-menu-header-box {
+                position: relative;
+                padding: 15px 18px;
+                display: flex;
+                align-items: center;
+                border-bottom: 1px solid #E9E9E9;
+                .name {
+                    flex: auto;
+                    position: relative;
+                }
+            }
+            .hc-menu-contents-box {
+                position: relative;
+                //padding: 15px 18px;
+                height: calc(100% - 60px);
+            }
+        }
     }
     .hc-page-content-box {
         flex: 1;

+ 1 - 1
src/views/data-fill/components/nodeTree/children.vue

@@ -6,7 +6,7 @@
                     <div class="cu-tree-node-label-name" :id="`node-tree-${item.key}`" @click="nodeLabelClick(item)" @dblclick="nodeLabelDblClick(item)" @contextmenu.prevent.stop="nodeLabelContextMenu($event,item,item?.data)">
                         <el-button hc-btn color="#0081ff" :loading="item.loading" v-if="item?.colorStatus === 2">{{item.label}}</el-button>
                         <el-button hc-btn color="#f37b1d" :loading="item.loading" v-else-if="item?.colorStatus === 3">{{item.label}}</el-button>
-                        <el-button type="primary" hc-btn :loading="item.loading" v-else-if="item?.colorStatus === 4">{{item.label}}</el-button>
+                        <el-button hc-btn color="#1ECC95" text-white :loading="item.loading" v-else-if="item?.colorStatus === 4">{{item.label}}</el-button>
                         <el-button type="info" hc-btn :loading="item.loading" v-else>{{item.label}}</el-button>
                     </div>
                     <span class="cu-tree-node-label-btn" :class="[ifExpanded(item)?'expanded':'']" v-if="isExpanded(item)" @click="expandedClick(item)"/>

+ 4 - 4
src/views/home/index.vue

@@ -9,16 +9,16 @@
                 <div class="home-link-box">
                     <span>他们都在搜索:</span>
                     <div class="home-link">
-                        <router-link to="/data-fill/wbs">资料填报</router-link>
+                        <router-link to="/home/index">资料填报</router-link>
                     </div>
                     <div class="home-link">
-                        <router-link to="/data-fill/query">资料查询</router-link>
+                        <router-link to="/home/index">资料查询</router-link>
                     </div>
                     <div class="home-link">
-                        <router-link to="/ledger/query">日志填报</router-link>
+                        <router-link to="/home/index">日志填报</router-link>
                     </div>
                     <div class="home-link">
-                        <router-link to="/schedule/data">资料进度</router-link>
+                        <router-link to="/home/index">资料进度</router-link>
                     </div>
                 </div>
             </div>

+ 5 - 2
src/views/other/first-item.vue

@@ -33,7 +33,7 @@
                             <span>上报审批</span>
                         </el-button>
                     </HcTooltip>
-                    <HcTooltip keys="other-first-item-repeal">
+                    <HcTooltip keys="other-first-item-repeal" v-if="tabTypeKey === 'query'">
                         <el-button hc-btn :disabled="tableSelectionKeys.length <= 0">
                             <HcIcon name="delete-bin-3"/>
                             <span>批量废除</span>
@@ -374,7 +374,10 @@ const tableSelectionChange = (rows) => {
 //文件名称被点击
 const tableRowName = (row) => {
     //如果 evisaPdfUrl 不为空,使用evisaPdfUrl,反之使用pdfUrl
-    if (row['evisaPdfUrl']) {
+    if (tabTypeKey.value === 'query') {
+        //首件查询时,直接调用接口
+        getBussPdfInfo(row.id + '')
+    } else if (row['evisaPdfUrl']) {
         window.open(row['evisaPdfUrl'],'_blank')
     } else if (row['pdfUrl']) {
         window.open(row['pdfUrl'],'_blank')