diff --git a/package-lock.json b/package-lock.json index 1caf91c..21a888f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1292,7 +1292,6 @@ "version": "7.22.6", "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.22.6.tgz", "integrity": "sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==", - "dev": true, "requires": { "regenerator-runtime": "^0.13.11" }, @@ -1300,8 +1299,7 @@ "regenerator-runtime": { "version": "0.13.11", "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", - "dev": true + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" } } }, @@ -1848,11 +1846,20 @@ } } }, + "@vant/icons": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/@vant/icons/-/icons-3.0.2.tgz", + "integrity": "sha512-4OlRVMd0uiDtD9hgSISZW8hB95vU0fFtc41tQchRIyiXkR0tS+DydZOLb8/bQkithrNWhW7Uud38MbKjlJ9lJw==" + }, + "@vant/popperjs": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz", + "integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw==" + }, "@vue/babel-helper-vue-jsx-merge-props": { "version": "1.4.0", "resolved": "https://registry.npmmirror.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz", - "integrity": "sha512-JkqXfCkUDp4PIlFdDQ0TdXoIejMtTHP67/pvxlgeY+u5k3LEdKuWZ3LK6xkxo52uDoABIVyRwqVkfLQJhk7VBA==", - "dev": true + "integrity": "sha512-JkqXfCkUDp4PIlFdDQ0TdXoIejMtTHP67/pvxlgeY+u5k3LEdKuWZ3LK6xkxo52uDoABIVyRwqVkfLQJhk7VBA==" }, "@vue/babel-plugin-transform-vue-jsx": { "version": "1.4.0", @@ -17955,6 +17962,18 @@ "spdx-expression-parse": "^3.0.0" } }, + "vant": { + "version": "2.13.2", + "resolved": "https://registry.npmmirror.com/vant/-/vant-2.13.2.tgz", + "integrity": "sha512-anZbbLqXCq+rUJk10D67mn+V/1/i9tfOTdoR+64B0e+0BzV3KFgpHBF76noLa+yX9i/L+8DeL560WMk0GEN38g==", + "requires": { + "@babel/runtime": "7.x", + "@vant/icons": "^3.0.2", + "@vant/popperjs": "^1.1.0", + "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0", + "vue-lazyload": "1.2.3" + } + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz", @@ -18121,6 +18140,11 @@ "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-8.28.2.tgz", "integrity": "sha512-C5GZjs1tYlAqjwymaaCPDjCyGo10ajUphiwA922jKt9n7KPpqR7oM1PCwYzhB/E7+nT3wfdG3oRre5raIT1rKA==" }, + "vue-lazyload": { + "version": "1.2.3", + "resolved": "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.2.3.tgz", + "integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g==" + }, "vue-loader": { "version": "15.10.1", "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.10.1.tgz", diff --git a/package.json b/package.json index ed348ed..c4a1633 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "nprogress": "^0.2.0", "tinymce": "5.4.1", "v-viewer": "^1.6.4", + "vant": "^2.13.2", "viser-vue": "^2.4.8", "vue": "^2.6.10", "vue-area-linkage": "^5.1.0", diff --git a/src/App.vue b/src/App.vue index 38654a1..97cc18a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -60,7 +60,7 @@ export default { diff --git a/src/assets/images/componentImg/btn-blue-155.png b/src/assets/images/componentImg/btn-blue-155.png new file mode 100644 index 0000000..b7c2322 Binary files /dev/null and b/src/assets/images/componentImg/btn-blue-155.png differ diff --git a/src/assets/images/componentImg/btn-blue-70.png b/src/assets/images/componentImg/btn-blue-70.png new file mode 100644 index 0000000..a3fb387 Binary files /dev/null and b/src/assets/images/componentImg/btn-blue-70.png differ diff --git a/src/assets/images/componentImg/btn-blue-small.png b/src/assets/images/componentImg/btn-blue-small.png new file mode 100644 index 0000000..f30334c Binary files /dev/null and b/src/assets/images/componentImg/btn-blue-small.png differ diff --git a/src/assets/images/componentImg/btn-cyan-155.png b/src/assets/images/componentImg/btn-cyan-155.png new file mode 100644 index 0000000..8e6a267 Binary files /dev/null and b/src/assets/images/componentImg/btn-cyan-155.png differ diff --git a/src/assets/images/componentImg/btn-cyan-327.png b/src/assets/images/componentImg/btn-cyan-327.png new file mode 100644 index 0000000..06456a2 Binary files /dev/null and b/src/assets/images/componentImg/btn-cyan-327.png differ diff --git a/src/assets/images/componentImg/btn-red-70.png b/src/assets/images/componentImg/btn-red-70.png new file mode 100644 index 0000000..d20dd38 Binary files /dev/null and b/src/assets/images/componentImg/btn-red-70.png differ diff --git a/src/assets/images/icon/list-arrow.png b/src/assets/images/icon/list-arrow.png new file mode 100644 index 0000000..653b1d7 Binary files /dev/null and b/src/assets/images/icon/list-arrow.png differ diff --git a/src/assets/less/common.less b/src/assets/less/common.less index c4e8885..426eab3 100644 --- a/src/assets/less/common.less +++ b/src/assets/less/common.less @@ -307,92 +307,161 @@ div.ant-table table, } // 按钮样式 .custom-btns-box { + button.ant-btn { + .btn-icon { + margin-right: 3px; + margin-bottom: 3px; + width: 14px; + } + .btn-text { + font-family: PingFang SC, PingFang SC, sans-serif; + font-weight: 500; + font-size: 14px; + color: #FFFFFF; + line-height: 16px; + } - .btn-icon { - margin-right: 3px; - margin-bottom: 3px; - width: 14px; - } - .btn-text { - font-family: PingFang SC, PingFang SC, sans-serif; - font-weight: 500; - font-size: 14px; - color: #FFFFFF; - line-height: 16px; - } - // 蓝色按钮 - .btn-blue { - background: url("~@assets/images/componentImg/btn-blue.png") no-repeat center center !important; - width: 88px !important; - } - .btn-blue-long { - background: url("~@assets/images/componentImg/btn-blue-long.png") no-repeat center center !important; - width: 128px !important; - } - // 青色按钮 - .btn-cyan { - background: url("~@assets/images/componentImg/btn-cyan.png") no-repeat center center !important; - width: 88px !important; - } - .btn-cyan-medium { - background: url("~@assets/images/componentImg/btn-cyan-medium.png") no-repeat center center !important; - width: 108px !important; - } + // 蓝色按钮 + &.btn-blue { + background: url("~@assets/images/componentImg/btn-blue.png") no-repeat center center; + width: 88px; + } + &.btn-blue-long { + background: url("~@assets/images/componentImg/btn-blue-long.png") no-repeat center center; + width: 128px; + } + // 青色按钮 + &.btn-cyan { + background: url("~@assets/images/componentImg/btn-cyan.png") no-repeat center center; + width: 88px; + } + &.btn-cyan-medium { + background: url("~@assets/images/componentImg/btn-cyan-medium.png") no-repeat center center; + width: 108px; + } - // 按钮公共样式 - .btn-blue, - .btn-cyan, - .btn-blue-long, - .btn-cyan-medium { - border: none !important; - background-size: 100% @btn-height-base !important; + // 按钮公共样式 + &.btn-blue, + &.btn-cyan, + &.btn-blue-long, + &.btn-cyan-medium { + border: none !important; + background-size: 100% @btn-height-base; + } } } +.ant-btn { + &.primary-btn, + &.primary-btn:hover, + &.primary-btn:focus { + width: 88px; + height: 32px; + background: linear-gradient( 180deg, rgba(0,148,255,0) 0%, rgba(0,148,255,0.6) 100%); + border-radius: 2px 2px 2px 2px; + border: 1px solid #0094FF; + color: @text-color; + } + &.danger-btn, + &.danger-btn:hover, + &.danger-btn:focus { + width: 88px; + height: 32px; + background: linear-gradient( 0deg, rgba(255,83,83,0.6) 00%, rgba(255,83,83,0) 100%); + border-radius: 2px 2px 2px 2px; + border: 1px solid #FF5353; + color: @text-color; + } -.ant-btn.primary-btn, -.ant-btn.primary-btn:hover, -.ant-btn.primary-btn:focus { - width: 88px; - height: 32px; - background: linear-gradient( 180deg, rgba(0,148,255,0) 0%, rgba(0,148,255,0.6) 100%); - border-radius: 2px 2px 2px 2px; - border: 1px solid #0094FF; - color: @text-color; -} -.ant-btn.danger-btn, -.ant-btn.danger-btn:hover, -.ant-btn.danger-btn:focus { - width: 88px; - height: 32px; - background: linear-gradient( 0deg, rgba(255,83,83,0.6) 00%, rgba(255,83,83,0) 100%); - border-radius: 2px 2px 2px 2px; - border: 1px solid #FF5353; - color: @text-color; -} + &.ant-btn-primary, + &.ant-btn-primary:hover, + &.ant-btn-primary:focus { + background: linear-gradient( 180deg, rgba(0,148,255,0) 0%, rgba(0,148,255,0.6) 100%); + border: 1px solid #0094FF; + color: @text-color; + } + &.ant-btn-primary[disabled], + &.ant-btn-primary[disabled]:hover, + &.ant-btn-primary[disabled]:focus { + color: @text-color; + background: linear-gradient(180deg, rgba(0, 148, 255, 0) 0%, rgba(0, 148, 255, 0.6) 100%); + } -.ant-btn.ant-btn-primary, -.ant-btn.ant-btn-primary:hover, -.ant-btn.ant-btn-primary:focus { - background: linear-gradient( 180deg, rgba(0,148,255,0) 0%, rgba(0,148,255,0.6) 100%); - border: 1px solid #0094FF; - color: @text-color; -} -.ant-btn.ant-btn-primary[disabled], -.ant-btn.ant-btn-primary[disabled]:hover, -.ant-btn.ant-btn-primary[disabled]:focus { - color: @text-color; - background: linear-gradient(180deg, rgba(0, 148, 255, 0) 0%, rgba(0, 148, 255, 0.6) 100%); + &.ant-btn-danger, + &.ant-btn-danger:hover, + &.ant-btn-danger:focus { + background: linear-gradient( 0deg, rgba(255,83,83,0.6) 00%, rgba(255,83,83,0) 100%); + border: 1px solid #FF5353; + color: @text-color; + } } +.mobile-html { + .ant-btn { + font-size: 0.14rem; + line-height: 0.16rem; + height: 0.36rem; + } + .custom-btns-box { + .ant-btn { + .btn-icon { + margin-right: 0.03rem; + margin-bottom: 0.03rem; + width: 0.14rem; + } + .btn-text { + font-size: 0.14rem; + line-height: 0.16rem; + } + // 蓝色按钮 + &.btn-blue { + width: 0.88rem; + } + &.btn-blue-long { + width: 1.28rem; + } + &.btn-blue-small { + width: 0.36rem; + } + // 青色按钮 + &.btn-cyan { + width: 0.88rem; + } + &.btn-cyan-medium { + width: 1.08rem; + } + &.btn-blue, + &.btn-cyan, + &.btn-blue-small, + &.btn-blue-long, + &.btn-cyan-medium { + background-size: 100% 0.36rem; + } + } + } -.ant-btn.ant-btn-danger, -.ant-btn.ant-btn-danger:hover, -.ant-btn.ant-btn-danger:focus { - background: linear-gradient( 0deg, rgba(255,83,83,0.6) 00%, rgba(255,83,83,0) 100%); - border: 1px solid #FF5353; - color: @text-color; + .ant-btn.primary-btn, + .ant-btn.primary-btn:hover, + .ant-btn.primary-btn:focus, + .ant-btn.danger-btn, + .ant-btn.danger-btn:hover, + .ant-btn.danger-btn:focus { + width: 0.88rem; + height: 0.32rem; + border-radius: 0.02rem; + border-width: 0.01rem; + } + + .ant-btn.ant-btn-primary, + .ant-btn.ant-btn-primary:hover, + .ant-btn.ant-btn-primary:focus, + .ant-btn.ant-btn-danger, + .ant-btn.ant-btn-danger:hover, + .ant-btn.ant-btn-danger:focus { + border-width: 0.01rem; + } } /* 部分组件end */ +// 一些间距 .ml-8 { margin-left: 8px; } @@ -408,12 +477,42 @@ div.ant-table table, .mr-10 { margin-right: 10px; } +// 移动端下的样式 +.mobile-html { + .mb-12 { + margin-bottom: .12rem; + } + .mb-8 { + margin-bottom: 0.08rem; + } + .mb-6 { + margin-bottom: 0.06rem; + } + .mr-6 { + margin-right: 0.06rem; + } +} // 分割线 .divider-vertical { width: 1px; margin: 0 20px; background-color: rgba(108, 128, 151, 0.3); } +.divider-horizontal { + height: 1px; + margin: 20px 0; + background-color: rgba(108, 128, 151, 0.3); +} + +// 移动端下的样式 +.mobile-html { + .divider-vertical { + margin: 0 .1rem; + } + .divider-horizontal { + margin: .12rem 0; + } +} // 一行的内容 .info-row { @@ -448,6 +547,21 @@ div.ant-table table, word-break: break-all; white-space: nowrap; } + +// 移动端下的样式 +.mobile-html { + .info-row { + .info-label { + font-size: 0.12rem; + line-height: 0.14rem; + } + + .info-value { + font-size: 0.12rem; + line-height: 0.14rem; + } + } +} // 运行 .working::before { content: ''; @@ -468,7 +582,14 @@ div.ant-table table, border-radius: 50%; background-color: #FF5353; } - +.mobile-html { + .working::before, + .cease::before { + width: 0.06rem; + height: 0.06rem; + margin-right: 0.04rem; + } +} // 特殊大数字 .big-number { font-family: Audiowide, Audiowide, sans-serif; @@ -479,10 +600,14 @@ div.ant-table table, background: linear-gradient(90deg, #FFFFFF 0%, #96D0F9 100%); -webkit-background-clip: text; } +.mobile-html .big-number { + font-size: 0.22rem; + line-height: 0.32rem; +} // 标题加渐变背景 .title-background { - margin-bottom: 9px; + margin-bottom: 10px; font-family: DingTalk JinBuTi, DingTalk JinBuTi, sans-serif; font-weight: 400; font-size: 15px; @@ -495,20 +620,40 @@ div.ant-table table, content: ''; display: block; position: absolute; - top: 6px; + top: 4px; left: 0; - width: 100%; + width: calc(100% + 8px); height: 16px; background: linear-gradient( 90deg, rgba(0,116,202,0.1) 0%, #0074CA 50%, rgba(0,116,202,0) 100%); } .title-background-text { - padding: 0 4px; + margin-left: 4px; position: relative; height: 22px; } } +// 移动端-标题加渐变背景 +.mobile-html { + .title-background { + margin-bottom: 0.05rem; + font-size: 0.14rem; + line-height: 0.16rem; + &::before { + top: 0.04rem; + height: 0.15rem; + width: calc(100% + 0.08rem); + background: linear-gradient( 90deg, rgba(0,116,202,0.1) 0%, #0074CA 50%, rgba(0,116,202,0) 100%); + } + + .title-background-text { + margin-left: 0.04rem; + position: relative; + height: 0.21rem; + } + } +} // 青色 .text-cyan { color: @custom-cyan; } @@ -546,6 +691,64 @@ div.ant-table table, line-height: 35.5px; } } +.mobile-html { + .ant-input { + height: 0.36rem; + border-radius: 0.04rem; + padding: 0.04rem 0.11rem; + font-size: 0.14rem; + border-width: 0.01rem; + } + textarea.ant-input { + height: auto; + } + .ant-select { + display: block; + font-size: 0.14rem; + .ant-select-selection--single { + height: 0.36rem; + } + .ant-select-selection__rendered { + line-height: 0.36rem; + margin-left: 0.11rem; + } + .ant-select-selection--single .ant-select-selection__rendered { + margin-right: 0.24rem; + } + .ant-select-selection__placeholder, .ant-select-search__field__placeholder { + right: 0.09rem; + height: 0.2rem; + margin-top: -0.1rem; + line-height: 0.2rem; + } + } + .ant-form-explain, .ant-form-extra { + min-height: 0.22rem; + font-size: 0.14rem; + } + .ant-form-item-required::before { + font-size: 0.14rem; + margin-right: 0.04rem; + } + .ant-form label { + font-size: 0.14rem; + } + + .ant-form-item-label { + padding: 0; + line-height: 0.22rem; + margin-bottom: 0.04rem; + } + .ant-form-item { + margin-bottom: 0.12rem; + } + .ant-form-item-label > label::after { + display: none; + } + .ant-form-item-control { + line-height: 0.36rem; + } +} /* 表单end */ // flex居中 @@ -561,6 +764,11 @@ div.ant-table table, flex-direction: column; justify-content: space-between; } +.flex-between { + display: flex; + justify-content: space-between; + align-items: center; +} // 表格中的tag对齐inline-block导致错位,父元素字体调整为0,解决tag对齐问题 .ant-table-middle > .ant-table-content > .ant-table-scroll > .ant-table-body > table > .ant-table-tbody > tr > td:has( > .tag-blue), @@ -596,4 +804,69 @@ div.ant-table table, overflow: hidden; text-overflow: ellipsis; word-break: break-all; +} + +// 内容卡片 +.custom-content-card { + padding: 12px 16px; + position: relative; + border: 1px solid; + background: linear-gradient( 90deg, rgba(0,148,255,0.4) 0%, rgba(0,148,255,0.05) 100%); + border-image: linear-gradient(85deg, rgba(71, 137, 233, 1), rgba(46, 228, 253, 1), rgba(54, 109, 200, 1)) 1 1; + border-left: none; + border-right: none; + + // 伪元素装饰 + &::before, + &::after { + pointer-events: none; + user-select: none; + content: ''; + display: block; + position: absolute; + } + + // 四个角 + &::before { + top: -2px; + left: -1px; + width: calc(100% + 2px); + height: calc(100% + 4px); + background-image: url("~@/assets/images/systemOverview/equipmentManagement/left-top.png"), + url("~@/assets/images/systemOverview/equipmentManagement/left-bottom.png"), + url("~@/assets/images/systemOverview/equipmentManagement/right-top.png"), + url("~@/assets/images/systemOverview/equipmentManagement/right-bottom.png"); + background-repeat: no-repeat; + background-position: left top, left bottom, right top, right bottom; + } + // 两侧的边框 + &::after { + left: 0; + top: 0; + width: 100%; + height: 100%; + border: 1px solid; + border-top: none; + border-bottom: none; + border-image: linear-gradient(0deg, rgba(46,228,253,0) 0%, #2EE4FD 50%, rgba(46,228,253,0) 100%) 1; + } +} +// 移动端-内容卡片 +.mobile-html { + .custom-content-card { + padding: 0.1rem 0.08rem; + border-width: 0.01rem; + + // 四个角 + &::before { + top: -0.02rem; + left: -0.01rem; + width: calc(100% + 0.02rem); + height: calc(100% + 0.04rem); + } + // 两侧的边框 + &::after { + border-width: 0.01rem; + } + } } \ No newline at end of file diff --git a/src/assets/less/modifyLessVars.js b/src/assets/less/modifyLessVars.js index d884464..e758961 100644 --- a/src/assets/less/modifyLessVars.js +++ b/src/assets/less/modifyLessVars.js @@ -26,5 +26,11 @@ module.exports = { 'input-height-base': '36px', // 其他 - 'red-6': '#FF5353' + 'red-6': '#FF5353', + + // vant + white: '#001B36', + black: 'rgba(255, 255, 255, 0.96)', + red: '#0094FF', + 'dialog-has-title-message-text-color': 'rgba(255, 255, 255, 0.96)' } diff --git a/src/components/CommonCard.vue b/src/components/CommonCard.vue index bb46c79..a821551 100644 --- a/src/components/CommonCard.vue +++ b/src/components/CommonCard.vue @@ -118,4 +118,50 @@ export default { line-height: 16px; text-shadow: 1px 1px 0px rgba(21,154,255,0.7), 1px 1px 0px #000000; } +// 如果是移动端设置为rem单位 +.mobile-html { + .common-card { + border: .01rem solid rgba(0,148,255,0.24); + border-bottom: .01rem @primary-color solid; + + // 左下右下高亮边框 + &::before, &::after { + min-width: 0.16rem; + height: 0.01rem; + bottom: -0.01rem; + } + &::before { + left: 0; + } + &::after { + right: 0; + } + + /deep/ .ant-card-head { + background-size: 0.01rem 100%, calc(100% - 0.02rem) 100%, 0.01rem 100%; + border: none; + min-height: 0.42rem; + height: 0.42rem; + padding: 0 0.16rem; + } + /deep/ .ant-card-head-title { + font-size: 0.14rem; + line-height: 0.36rem; + } + /deep/ .ant-card-head-title::before { + width: 0.12rem; + height: 0.12rem; + } + /deep/ .ant-card-body { + padding: 0.08rem 0.12rem 0.12rem !important; + height: calc(100% - 0.42rem); + } + } + .card-title { + margin-left: 0.08rem; + font-size: 0.14rem; + color: @text-color; + line-height: 0.16rem; + } +} diff --git a/src/components/CommonCardInfo.vue b/src/components/CommonCardInfo.vue index d8df789..52f5a04 100644 --- a/src/components/CommonCardInfo.vue +++ b/src/components/CommonCardInfo.vue @@ -76,4 +76,17 @@ export default { .mb-15 { margin-bottom: 15px; } + +// 移动端样式 +.mobile-html { + .info-row { + height: 0.17rem; + } + .mb-12 { + margin-bottom: 0.12rem; + } + .mb-15 { + margin-bottom: 0.15rem; + } +} diff --git a/src/components/CommonEmpty.vue b/src/components/CommonEmpty.vue index 9cf8371..ae7d51e 100644 --- a/src/components/CommonEmpty.vue +++ b/src/components/CommonEmpty.vue @@ -20,4 +20,16 @@ export default { color: #0094FF; } } +// 移动端字体大小 +.mobile-html { + .empty { + /deep/.ant-empty-image { + height: 1rem; + margin-bottom: 0.08rem; + } + .empty-text { + font-size: 0.14rem; + } + } +} diff --git a/src/components/dict/JDictSelectTag.vue b/src/components/dict/JDictSelectTag.vue index 79e67c5..cdb360e 100644 --- a/src/components/dict/JDictSelectTag.vue +++ b/src/components/dict/JDictSelectTag.vue @@ -31,6 +31,12 @@ export default { getPopupContainer: { type: Function, default: (node) => node.parentNode + }, + // 过滤的值 + filterDictValues: { + type: Array, + required: false, + default: () => [] } }, data () { @@ -66,14 +72,14 @@ export default { initDictData () { // 优先从缓存中读取字典配置 if (getDictItemsFromCache(this.dictCode)) { - this.dictOptions = getDictItemsFromCache(this.dictCode) + this.dictOptions = (getDictItemsFromCache(this.dictCode) || []).filter(item => !this.filterDictValues.includes(item.value)) return } // 根据字典Code, 初始化字典数组 ajaxGetDictItems(this.dictCode, null).then((res) => { if (res.success) { - this.dictOptions = res.result + this.dictOptions = (res.result || []).filter(item => !this.filterDictValues.includes(item.value)) } }) }, diff --git a/src/components/layouts/TabLayout.vue b/src/components/layouts/TabLayout.vue index a56c5c9..7d1053d 100644 --- a/src/components/layouts/TabLayout.vue +++ b/src/components/layouts/TabLayout.vue @@ -1,27 +1,6 @@