Browse Source

更新依赖,新主题

ZaiZai 1 year ago
parent
commit
f9527972f4

+ 4 - 4
package.json

@@ -17,7 +17,7 @@
         "crypto-js": "^4.1.1",
         "dayjs": "^1.11.10",
         "echarts": "^5.4.3",
-        "element-plus": "2.4.0",
+        "element-plus": "2.4.1",
         "js-base64": "^3.7.5",
         "js-fast-way": "0.2.9",
         "js-md5": "^0.8.3",
@@ -37,11 +37,11 @@
         "cssnano": "^6.0.1",
         "eslint": "^8.51.0",
         "eslint-plugin-vue": "^9.17.0",
-        "hc-vue3-ui": "^2.1.2",
+        "hc-vue3-ui": "^2.1.4",
         "postcss": "^8.4.31",
-        "sass": "^1.69.3",
+        "sass": "^1.69.4",
         "tailwindcss": "3.3.3",
-        "vite": "^4.4.11",
+        "vite": "^4.5.0",
         "z-element-plus": "^1.1.4"
     }
 }

+ 36 - 0
src/styles/app/element.scss

@@ -38,3 +38,39 @@
 .el-button + .el-button {
     margin-left: 10px;
 }
+
+//表格样式重写
+.el-table[hc] {
+    --el-table-bg-color: initial;
+    --el-table-header-bg-color: #d5deff;
+    --el-table-header-text-color: #000000;
+    --el-table-tr-bg-color: #fafafa;
+    --el-fill-color-lighter: #fafafa;
+    --el-table-text-color: green;
+    --el-table-row-hover-bg-color: #e9edfa;
+    --el-table-current-row-bg-color: #ffe48d;
+    --el-table-border: 1px dotted var(--el-table-border-color);
+    .el-table__cell {
+        padding: 0;
+    }
+    .cell {
+        padding: 4px;
+        line-height: initial;
+        .el-link + .el-link {
+            margin-left: 10px;
+        }
+    }
+    .el-table__body-wrapper .el-table-column--selection>.cell,
+    .el-table__header-wrapper .el-table-column--selection>.cell {
+        height: auto;
+    }
+    .el-table-fixed-column--left, .el-table-fixed-column--right {
+        background: #d5deff;
+        &.el-table__cell {
+            background: #d5deff !important;
+        }
+    }
+}
+.el-table[hc].el-table--border {
+    --el-table-border-color: #8287a5;
+}

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

@@ -10,6 +10,10 @@ embed {
     overflow: clip !important;
 }
 
+.hc-page-layout-box .hc-layout-left-box {
+    margin-right: 16px;
+}
+
 //设置表单样式
 .hc-excel-table-form-view {
     position: relative;

+ 21 - 0
src/styles/tentative/detect/test.scss

@@ -26,3 +26,24 @@
         }
     }
 }
+.hc-expansion-contraction-tree {
+    position: absolute;
+    left: -13px;
+    top: 0;
+    width: 10px;
+    height: 100%;
+    user-select: none;
+    cursor: pointer;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    color: #8c9099;
+    font-size: 22px;
+    border-radius: 5px;
+    transition: background 0.2s;
+    background: rgba(255, 255, 255, 0);
+    &:hover {
+        background: #f1f5f8;
+        color: var(--el-color-primary);
+    }
+}

+ 1 - 1
src/views/data-fill/query.vue

@@ -50,7 +50,7 @@
             <div class="horizontal-drag-line" @mousedown="onmousedown" />
         </div>
         <div class="hc-layout-content-box">
-            <HcNewCard :scrollbar="false" padding>
+            <HcNewCard padding>
                 <template #header>
                     <HcTooltip keys="query_report">
                         <el-button :disabled="tableCheckedKeys.length <= 0" :loading="reportLoading" hc-btn color="#FF976A" style="color: white;" @click="reportModalClick">

+ 44 - 35
src/views/tentative/detect/test.vue

@@ -1,6 +1,9 @@
 <template>
     <div class="hc-page-layout-box">
-        <div :style="`width:${leftWidth}px;`" class="hc-layout-left-box">
+        <div
+            :style="`width:${isWbsTreeShow ? leftWidth : 0}px; ${isWbsTreeShow ? '' : 'display: none'}`"
+            class="hc-layout-left-box" :class="[isWbsTreeShow ? 'show' : '']"
+        >
             <div class="hc-project-box">
                 <div class="hc-project-icon-box">
                     <HcIcon name="stack" />
@@ -34,10 +37,15 @@
             <div class="horizontal-drag-line" @mousedown="onmousedown" />
         </div>
         <div class="hc-page-content-box">
-            <HcCard :scrollbar="false" action-size="lg">
+            <!---展开收缩树 -->
+            <div class="hc-expansion-contraction-tree" @click="setWbsTreeShow">
+                <HcIcon v-show="isWbsTreeShow" name="arrow-left-s" />
+                <HcIcon v-show="!isWbsTreeShow" name="arrow-right-s" />
+            </div>
+            <HcNewCard padding>
                 <template #header>
                     <HcTooltip keys="tentative_detect_test_add">
-                        <el-button :disabled="!primaryKeyId" hc-btn type="primary" @click="addFormModalClick">
+                        <el-button :disabled="!primaryKeyId" hc-btn color="#37c0fe" style="color: white;" @click="addFormModalClick">
                             <HcIcon name="add-circle" />
                             <span>新增</span>
                         </el-button>
@@ -45,7 +53,7 @@
                     <HcTooltip keys="tentative_detect_test_copy">
                         <el-button
                             :disabled="tableCheckedKeys.length <= 0" :loading="copyLoading" hc-btn
-                            @click="copyDataClick"
+                            color="#A16222" @click="copyDataClick"
                         >
                             <HcIcon name="file-copy-2" />
                             <span>复制</span>
@@ -54,7 +62,7 @@
                     <HcTooltip keys="tentative_detect_test_del">
                         <el-button
                             :disabled="tableCheckedKeys.length <= 0" :loading="removeLoading" hc-btn
-                            @click="delModalClick"
+                            color="#e03997" @click="delModalClick"
                         >
                             <HcIcon name="delete-bin-2" />
                             <span>删除</span>
@@ -63,7 +71,7 @@
                     <HcTooltip keys="tentative_detect_test_print">
                         <el-button
                             :disabled="tableCheckedKeys.length <= 0" :loading="printPdfLoading" hc-btn
-                            @click="printPdfClick"
+                            color="#567722" @click="printPdfClick"
                         >
                             <HcIcon name="printer" />
                             <span>批量打印</span>
@@ -72,7 +80,7 @@
                     <HcTooltip keys="tentative_detect_test_report">
                         <el-button
                             :disabled="tableCheckedKeys.length <= 0" :loading="reportPdfLoading" hc-btn
-                            @click="reportPdfClick"
+                            color="#FF976A" style="color: white;" @click="reportPdfClick"
                         >
                             <HcIcon name="send-plane-2" />
                             <span>批量上报</span>
@@ -81,7 +89,7 @@
                     <HcTooltip keys="tentative_detect_test_quit">
                         <el-button
                             :disabled="tableCheckedKeys.length <= 0" :loading="quitPdfLoading" hc-btn
-                            @click="quitPdfClick"
+                            color="#e54d42" @click="quitPdfClick"
                         >
                             <HcIcon name="delete-bin-3" />
                             <span>批量废除</span>
@@ -90,7 +98,7 @@
                     <HcTooltip keys="tentative_detect_test_null">
                         <el-button
                             :disabled="tableCheckedKeys.length <= 0" :loading="printNullPdfLoading" hc-btn
-                            @click="printNullPdfClick"
+                            color="#567722" @click="printNullPdfClick"
                         >
                             <HcIcon name="printer" />
                             <span>打印空表</span>
@@ -139,8 +147,8 @@
                     </div>
                 </template>
                 <HcTable
-                    ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" is-check
-                    border @selection-change="tableSelection"
+                    ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading"
+                    border check-width="29" index-width="50" is-check @selection-change="tableSelection"
                 >
                     <template #recordNo="{ row }">
                         <span class="text-link" @click="tableRowEdit(row, '1')">{{ row?.recordNo }}</span>
@@ -177,21 +185,17 @@
                     </template>
                     <template #action="{ row }">
                         <HcTooltip keys="tentative_detect_test_annex">
-                            <el-button plain size="small" type="primary" @click="viewAttachmentModalClick(row)">
-                                附件
-                            </el-button>
+                            <el-link type="primary" @click="viewAttachmentModalClick(row)">附件</el-link>
                         </HcTooltip>
                         <HcTooltip keys="tentative_detect_test_info">
-                            <el-button plain size="small" type="primary" @click="samplingRecordModalClick(row)">
-                                样品信息
-                            </el-button>
+                            <el-link type="primary" @click="samplingRecordModalClick(row)">样品信息</el-link>
                         </HcTooltip>
                     </template>
                 </HcTable>
                 <template #action>
                     <HcPages :pages="searchForm" @change="pageChange" />
                 </template>
-            </HcCard>
+            </HcNewCard>
         </div>
 
         <!-- 查看附件 -->
@@ -315,6 +319,12 @@ const qualifiedData = ref([
     { label: '合格', value: '1' },
 ])
 
+//树展开和收起
+const isWbsTreeShow = ref(true)
+const setWbsTreeShow = () => {
+    isWbsTreeShow.value = !isWbsTreeShow.value
+}
+
 //加载树形结构数据
 const treeLoadNode = async ({ node, item, level }, resolve) => {
     let contractIdRelation = '', parentId = '0', primaryKeyId = ''
@@ -429,24 +439,23 @@ const pageChange = ({ current, size }) => {
 //表格数据
 const tableRef = ref(null)
 const tableColumn = ref([
-    { key: 'recordNo', name: '记录编号', width: 220 },
-    { key: 'reportNo', name: '报告编号', width: 220 },
-    { key: 'samplingLocation', name: '取样地点', width: 220 },
-    { key: 'trialProjectName', name: '试验项目名称', width: 220 },
-    { key: 'detectionResult', name: '检测结果', width: 160 },
-    { key: 'taskStatus', name: '任务状态', width: 140 },
-    { key: 'detectionCategory', name: '检测类别', width: 120 },
-    { key: 'isUploadCertificate', name: '是否上传合格证', width: 130 },
-    { key: 'contractId', name: '合同段', width: 220 },
-    { key: 'company', name: '单位', width: 160 },
-    { key: 'specificationNumber', name: '样品编号', width: 220 },
-    { key: 'specificationModel', name: '规格类型', width: 200 },
-
+    { key: 'recordNo', name: '记录编号', width: 180, autoWidth: true },
+    { key: 'reportNo', name: '报告编号', width: 180, autoWidth: true },
+    { key: 'samplingLocation', name: '取样地点', width: 180, autoWidth: true },
+    { key: 'trialProjectName', name: '试验项目名称', width: 100, autoWidth: true },
+    { key: 'detectionResult', name: '检测结果', width: 140, autoWidth: true },
+    { key: 'taskStatus', name: '任务状态', width: 120, autoWidth: true },
+    { key: 'detectionCategory', name: '检测类别', width: 100, autoWidth: true },
+    { key: 'isUploadCertificate', name: '是否上传合格证', width: 120, autoWidth: true },
+    { key: 'contractId', name: '合同段', width: 140, autoWidth: true },
+    { key: 'company', name: '单位', width: 160, autoWidth: true },
+    { key: 'specificationNumber', name: '样品编号', width: 220, autoWidth: true },
+    { key: 'specificationModel', name: '规格类型', width: 200, autoWidth: true },
     //{key:'projectPosition', name: '工程部位及用途', width: 160},
-    { key: 'projectPositionName', name: '工程部位及用途', width: 160 },
-    { key: 'reportDate', name: '报告日期', width: 170 },
-    { key: 'trialUserName', name: '试验人员', width: 170 },
-    { key: 'action', name: '操作', width: 150, fixed: 'right', align: 'center' },
+    { key: 'projectPositionName', name: '工程部位及用途', width: 160, autoWidth: true },
+    { key: 'reportDate', name: '报告日期', width: 170, autoWidth: true },
+    { key: 'trialUserName', name: '试验人员', width: 170, autoWidth: true },
+    { key: 'action', name: '操作', width: 120, fixed: 'right', align: 'center' },
 ])
 const tableData = ref([])
 

+ 19 - 54
yarn.lock

@@ -514,15 +514,6 @@ autoprefixer@^10.4.16:
     picocolors "^1.0.0"
     postcss-value-parser "^4.2.0"
 
-axios@^1.5.0:
-  version "1.5.0"
-  resolved "http://47.110.251.215:9000/axios/-/axios-1.5.0.tgz#f02e4af823e2e46a9768cfc74691fdd0517ea267"
-  integrity sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==
-  dependencies:
-    follow-redirects "^1.15.0"
-    form-data "^4.0.0"
-    proxy-from-env "^1.1.0"
-
 axios@^1.5.1:
   version "1.5.1"
   resolved "http://47.110.251.215:9000/axios/-/axios-1.5.1.tgz#11fbaa11fc35f431193a9564109c88c1f27b585f"
@@ -924,31 +915,10 @@ electron-to-chromium@^1.4.477:
   resolved "http://47.110.251.215:9000/electron-to-chromium/-/electron-to-chromium-1.4.508.tgz"
   integrity sha512-FFa8QKjQK/A5QuFr2167myhMesGrhlOBD+3cYNxO9/S4XzHEXesyTD/1/xF644gC8buFPz3ca6G1LOQD0tZrrg==
 
-element-plus@2.3.14:
-  version "2.3.14"
-  resolved "http://47.110.251.215:9000/element-plus/-/element-plus-2.3.14.tgz#302a23916b0c3375fcf4b927d7b94483dac13e1b"
-  integrity sha512-9yvxUaU4jXf2ZNPdmIxoj/f8BG8CDcGM6oHa9JIqxLjQlfY4bpzR1E5CjNimnOX3rxO93w1TQ0jTVt0RSxh9kA==
-  dependencies:
-    "@ctrl/tinycolor" "^3.4.1"
-    "@element-plus/icons-vue" "^2.0.6"
-    "@floating-ui/dom" "^1.0.1"
-    "@popperjs/core" "npm:@sxzz/popperjs-es@^2.11.7"
-    "@types/lodash" "^4.14.182"
-    "@types/lodash-es" "^4.17.6"
-    "@vueuse/core" "^9.1.0"
-    async-validator "^4.2.5"
-    dayjs "^1.11.3"
-    escape-html "^1.0.3"
-    lodash "^4.17.21"
-    lodash-es "^4.17.21"
-    lodash-unified "^1.0.2"
-    memoize-one "^6.0.0"
-    normalize-wheel-es "^1.2.0"
-
-element-plus@2.4.0:
-  version "2.4.0"
-  resolved "http://47.110.251.215:9000/element-plus/-/element-plus-2.4.0.tgz#e79249ac4c0a606d377c2f31ad553aa992286fe3"
-  integrity sha512-yJEa8LXkGOOgkfkeqMMEdeX/Dc8EH9qPcRuX91dlhSXxgCKKbp9tH3QFTOG99ibZsrN/Em62nh7ddvbc7I1frw==
+element-plus@2.4.1:
+  version "2.4.1"
+  resolved "http://47.110.251.215:9000/element-plus/-/element-plus-2.4.1.tgz#8a5faa69e856d82494b94d77fb485d9e727c8bc1"
+  integrity sha512-t7nl+vQlkBKVk1Ag6AufSDyFV8YIXxTFsaya4Nz/0tiRlcz65WPN4WMFeNURuFJleu1HLNtP4YyQKMuS7El8uA==
   dependencies:
     "@ctrl/tinycolor" "^3.4.1"
     "@element-plus/icons-vue" "^2.0.6"
@@ -1328,16 +1298,16 @@ has@^1.0.3:
   dependencies:
     function-bind "^1.1.1"
 
-hc-vue3-ui@^2.1.2:
-  version "2.1.2"
-  resolved "http://47.110.251.215:9000/hc-vue3-ui/-/hc-vue3-ui-2.1.2.tgz#ed8ecf3862cb8d1a0b851df8b62b6717bb7865a4"
-  integrity sha512-DU1OhY5zHRNrkD9M1B1OiY1WzQugvSmdL1mbqddaC57FU8rwGDHn+6BmJm0/xBhZ9xC3cJBwO2kcj80Cm+XPMQ==
+hc-vue3-ui@^2.1.4:
+  version "2.1.4"
+  resolved "http://47.110.251.215:9000/hc-vue3-ui/-/hc-vue3-ui-2.1.4.tgz#92e315a5cc868a594e9bcc87a7ede2f7ef8c9973"
+  integrity sha512-QLD/v+k1aWvXmBXwCFZzDvb2QvSQRvDXe5GoMbz5ZOcRPCrnUbHzN0Rwt4JYssSlXTvXBj2ehuChZigvvnlHCw==
   dependencies:
-    axios "^1.5.0"
+    axios "^1.5.1"
     dayjs "^1.11.10"
-    element-plus "2.3.14"
+    element-plus "2.4.1"
     js-fast-way "^0.2.9"
-    js-md5 "^0.7.3"
+    js-md5 "^0.8.3"
     lottie-web "^5.12.2"
     simple-uploader.js "^0.6.0"
     sortablejs "^1.15.0"
@@ -1449,11 +1419,6 @@ js-fast-way@0.2.9, js-fast-way@^0.2.9:
   resolved "http://47.110.251.215:9000/js-fast-way/-/js-fast-way-0.2.9.tgz#fd193f1a63644315331274474232d18d2c494c35"
   integrity sha512-ORSz9K/vLBu0Xo9dXgAS9nbqi35BsooPZYj1EpkjOWEVQ8hz3dUFGwTG2r7huZyxxnWd2fXoZwSe0X77aPwhlg==
 
-js-md5@^0.7.3:
-  version "0.7.3"
-  resolved "https://registry.npmjs.org/js-md5/-/js-md5-0.7.3.tgz"
-  integrity sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ==
-
 js-md5@^0.8.3:
   version "0.8.3"
   resolved "http://47.110.251.215:9000/js-md5/-/js-md5-0.8.3.tgz#921bab7efa95bfc9d62b87ee08a57f8fe4305b69"
@@ -2179,10 +2144,10 @@ safe-buffer@~5.2.0:
   resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz"
   integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
 
-sass@^1.69.3:
-  version "1.69.3"
-  resolved "http://47.110.251.215:9000/sass/-/sass-1.69.3.tgz#f8a0c488697e6419519834a13335e7b65a609c11"
-  integrity sha512-X99+a2iGdXkdWn1akFPs0ZmelUzyAQfvqYc2P/MPTrJRuIRoTffGzT9W9nFqG00S+c8hXzVmgxhUuHFdrwxkhQ==
+sass@^1.69.4:
+  version "1.69.4"
+  resolved "http://47.110.251.215:9000/sass/-/sass-1.69.4.tgz#10c735f55e3ea0b7742c6efa940bce30e07fbca2"
+  integrity sha512-+qEreVhqAy8o++aQfCJwp0sklr2xyEzkm9Pp/Igu9wNPoe7EZEQ8X/MBvvXggI2ql607cxKg/RKOwDj6pp2XDA==
   dependencies:
     chokidar ">=3.0.0 <4.0.0"
     immutable "^4.0.0"
@@ -2435,10 +2400,10 @@ utrie@^1.0.2:
   dependencies:
     base64-arraybuffer "^1.0.2"
 
-vite@^4.4.11:
-  version "4.4.11"
-  resolved "http://47.110.251.215:9000/vite/-/vite-4.4.11.tgz#babdb055b08c69cfc4c468072a2e6c9ca62102b0"
-  integrity sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==
+vite@^4.5.0:
+  version "4.5.0"
+  resolved "http://47.110.251.215:9000/vite/-/vite-4.5.0.tgz#ec406295b4167ac3bc23e26f9c8ff559287cff26"
+  integrity sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==
   dependencies:
     esbuild "^0.18.10"
     postcss "^8.4.27"