Merge branch 'dev-2.0' of https://git.mesalab.cn/nezha/nezha-fronted into dev-2.0
# Conflicts: # nezha-fronted/src/components/common/bottomBox/bottomBox.vue
This commit is contained in:
@@ -43,3 +43,6 @@
|
||||
top: 44px;
|
||||
transform: translate(-50%, -54px);
|
||||
}
|
||||
.el-checkbox__inner, .el-input__inner {
|
||||
border-color: rgba(0,0,0,0.15)
|
||||
}
|
||||
|
||||
@@ -324,6 +324,35 @@
|
||||
.operation-dropdown-text {
|
||||
font-size: 13px;
|
||||
}
|
||||
.search-box{
|
||||
padding-bottom: 20px;
|
||||
|
||||
.search-box {
|
||||
padding: 0 20px 20px;
|
||||
|
||||
.nz-label-search {
|
||||
margin-right: 20px;
|
||||
|
||||
.el-input__inner:focus, .el-cascader .el-input.is-focus .el-input__inner {
|
||||
border-color: #c7c7c7 !important;
|
||||
}
|
||||
.el-input__inner {
|
||||
height: 24px !important;
|
||||
width: 140px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.click-search-dropdown {
|
||||
width: calc(100% - 300px) !important;
|
||||
left: 270px !important;
|
||||
margin-top: -3px !important;
|
||||
box-shadow: none;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0;
|
||||
border-color: #c7c7c7;
|
||||
|
||||
.popper__arrow {
|
||||
display: none;
|
||||
}
|
||||
.el-cascader-menu__list {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -20,6 +20,48 @@ Created by iconfont
|
||||
/>
|
||||
<missing-glyph />
|
||||
|
||||
<glyph glyph-name="Cabinet" unicode="" d="M198.75882495 5.17988035999997v-27.41058797a44.70728068 44.70728068 0 0 0-89.38235099 0V23.249609380000038h1.1917648a18.03751953 18.03751953 0 0 0-0.48314747 4.15507121V812.68097769C110.0850913 824.98514305 122.51809545 834.93798828 137.88219653 834.93798828h749.07241838c15.3318916 0 27.76489576-9.98505558 27.66826644-22.28922093v-785.27629624a17.81205053 17.81205053 0 0 0-0.70861647-4.9281084v-44.67507032a44.70728068 44.70728068 0 1 0-89.41456135 0v27.37837761H198.75882495zM723.36075536 158.53100586000005h24.9626385a32.20985668 32.20985668 0 0 1 32.20985582 32.20985667v70.86168314a32.20985668 32.20985668 0 0 1-32.20985582 32.20985667h-24.9626385a32.20985668 32.20985668 0 0 1-32.20985669-32.20985667V190.74086252999996a32.20985668 32.20985668 0 0 1 32.20985669-32.20985667z m57.17249432 302.77264964v25.76788431a32.20985668 32.20985668 0 0 1-32.20985582 32.20985667H276.38457878a32.20985668 32.20985668 0 0 1-32.20985581-32.20985667v-25.76788431a32.20985668 32.20985668 0 0 1 32.20985581-32.20985667h471.93881508a32.20985668 32.20985668 0 0 1 32.20985582 32.20985667zM646.443618 641.67885082v25.7678843a32.20985668 32.20985668 0 0 1-32.20985581 32.20985668H276.38457878a32.20985668 32.20985668 0 0 1-32.20985581-32.20985668V641.67885082a32.20985668 32.20985668 0 0 1 32.20985581-32.20985668h337.84918341a32.20985668 32.20985668 0 0 1 32.20985581 32.20985668z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="about" unicode="" d="M512-66.93798828000001c-248.01589355 0-450.93798828 202.92209473-450.93798828 450.93798828s202.92209473 450.93798828 450.93798828 450.93798828 450.93798828-202.92209473 450.93798828-450.93798828-202.92209473-450.93798828-450.93798828-450.93798828zM512 773.49768738A389.27221838 389.27221838 0 0 1 122.50231262 384c0-215.21015491 174.28753247-389.49768738 389.49768738-389.49768738s389.49768738 174.28753247 389.49768738 389.49768738S727.15378766 773.49768738 512 773.49768738zM512.33820349 458.63023706c24.40701862 0 44.19192285-21.47592169 44.19192285-48.02489575v-260.41668824c0-26.49260681-19.78490423-48.02489575-44.19192285-48.02489574-24.35065137 0-44.1355556 21.47592169-44.1355556 48.02489574v260.41668823c0 26.49260681 19.72853699 48.02489575 44.1355556 48.02489576z m-14.93732086 148.92227063a56.36724854 56.36724854 0 1 0 29.19823474-108.90152416 56.36724854 56.36724854 0 0 0-29.19823474 108.90152416z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="License" unicode="" d="M924.84875925 820.84617615C970.16426954 820.84617615 1007.09233325 784.15109736 1007.09233325 738.95207994v-709.90415988A82.12708112 82.12708112 0 0 0 924.84875925-52.84617615000002H157.397397A82.12708112 82.12708112 0 0 0 75.15382385 29.047920060000024V738.95207994A82.12708112 82.12708112 0 0 0 157.397397 820.84617615z m-3.20353805-58.24615711H160.60093591A27.14270937 27.14270937 0 0 1 133.39998096 735.57380256v-703.14760512c0-14.85276999 12.23169293-27.02621648 27.20095495-27.02621648h761.04428529a27.14270937 27.14270937 0 0 1 27.20095495 27.02621648V735.57380256A27.14270937 27.14270937 0 0 1 921.6452212 762.60001904z m-238.16853524-58.24615624a191.51336362 191.51336362 0 0 0 191.28037871-191.28037958c0-52.36329469-21.20160137-99.89215866-55.39209514-134.43212936a27.7834168 27.7834168 0 0 0 0.75720034-6.40707783v-241.72155023a27.20095495 27.20095495 0 0 0-27.37569428-27.25920139 27.37569342 27.37569342 0 0 0-12.81415393 3.20353805l-96.4556357 51.54784879-96.45563569-51.54784879a27.37569342 27.37569342 0 0 0-40.1898482 24.11390893v241.72155109c0 2.15510809 0.2912305 4.31021532 0.75719946 6.34883138a190.63967127 190.63967127 0 0 0-55.33384869 134.43212936A191.51336362 191.51336362 0 0 0 683.41843952 704.3538628z m-296.93890775-490.08316406a27.31744784 27.31744784 0 1 0 0-54.69314125H277.20974215a27.31744784 27.31744784 0 1 0 0 54.69314125zM765.37078216 340.31538237999996a190.1737023 190.1737023 0 0 0-81.95234264-18.46403142c-29.29781659 0-57.08123339 6.64006188-81.95234265 18.46403142v-164.19591578l69.07994228 36.98630929a27.49218631 27.49218631 0 0 0 25.74480074 0l69.07994227-36.98630929z m-81.95234264 309.40358475a136.76197593 136.76197593 0 0 1-136.58723745-136.64548391 136.76197593 136.76197593 0 0 1 136.58723745-136.58723745 136.76197593 136.76197593 0 0 1 136.58723745 136.58723745 136.76197593 136.76197593 0 0 1-136.58723745 136.64548391zM386.53777821 432.8102797a27.31744784 27.31744784 0 1 0 0-54.63489567H277.20974215a27.31744784 27.31744784 0 1 0 0 54.63489567z m0 218.59782655a27.31744784 27.31744784 0 1 0 0-54.63489567H277.20974215a27.31744784 27.31744784 0 1 0 0 54.63489567z" horiz-adv-x="1092" />
|
||||
|
||||
|
||||
<glyph glyph-name="link" unicode="" d="M717.9 327.1l135.8 135.8c62.5 62.5 62.5 163.8 0 226.3s-163.8 62.5-226.3 0l-67.9-67.9c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l67.9 67.9c87.5 87.5 229.3 87.5 316.8 0s87.5-229.3 0-316.8L763.2 281.79999999999995c-87.5-87.5-229.3-87.5-316.8 0-30.8 30.8-51.5 69.1-60.5 110.7-3 14-4.7 28.3-5.1 42.6-0.4 17.7 13.6 32.3 31.3 32.7 17.7 0.4 32.3-13.6 32.7-31.3 0.2-10.3 1.4-20.5 3.6-30.5 6.5-29.7 21.2-57 43.2-79 62.5-62.4 163.8-62.4 226.3 0.1zM310.6 462.9L174.9 327.1c-62.5-62.5-62.5-163.8 0-226.3s163.8-62.5 226.3 0l67.9 67.9c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-67.9-67.9c-87.5-87.5-229.3-87.5-316.8 0s-87.5 229.3 0 316.8l135.8 135.8c87.5 87.5 229.3 87.5 316.8 0 30.8-30.8 51.5-69.1 60.5-110.7 3-14 4.7-28.3 5.1-42.6 0.4-17.7-13.6-32.3-31.3-32.7-17.7-0.4-32.3 13.6-32.7 31.3-0.2 10.3-1.4 20.5-3.6 30.5-6.5 29.7-21.2 57-43.2 79-62.7 62.4-164 62.4-226.5 0z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="radio" unicode="" d="M512 820.84617615a436.84617615 436.84617615 0 1 0 0-873.6923523A436.84617615 436.84617615 0 0 0 512 820.84617615z m0-72.80769574a364.03848041 364.03848041 0 1 1 0-728.07696082A364.03848041 364.03848041 0 0 1 512 748.03848041z m0-218.42308807a145.61539234 145.61539234 0 1 0 0-291.23078468 145.61539234 145.61539234 0 0 0 0 291.23078468z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="multitext" unicode="" d="M913.89848206 820.84617615H110.10151794A34.94769409 34.94769409 0 0 1 75.15382385 785.89848206v-803.79696412c0-19.29403917 15.65365493-34.94769409 34.94769409-34.94769409h803.79696412a34.94769409 34.94769409 0 0 1 34.94769409 34.94769409V785.89848206a34.94769409 34.94769409 0 0 1-34.94769409 34.94769409z m-43.68461762-795.06004059H153.78613556V742.21386444h716.42772888v-716.42772888zM748.47939698 559.97620158H271.29775694c-2.69388447 0-4.87811535-3.13073064-4.87811535-6.91673142v-55.69788745c0-3.7859999 2.18423088-6.9167314 4.87811536-6.9167314h477.18164003c2.69388447 0 4.87811535 3.13073064 4.87811535 6.9167314v55.69788745c0 3.7859999-2.18423088 6.9167314-4.87811535 6.91673142z m0-278.1982068H271.29775694c-2.69388447 0-4.87811535-3.13073064-4.87811535-6.98953882v-55.62508005c0-3.85880818 2.18423088-6.98953882 4.87811536-6.98953881h477.18164003c2.69388447 0 4.87811535 3.13073064 4.87811535 6.98953881V274.78845595999996c0 3.85880818-2.18423088 6.98953882-4.87811535 6.98953882z m0 139.06269969H271.29775694c-2.69388447 0-4.87811535-3.13073064-4.87811535-6.9167314v-55.69788746c0-3.7859999 2.18423088-6.9167314 4.87811536-6.91673141h477.18164003c2.69388447 0 4.87811535 3.13073064 4.87811535 6.91673141v55.69788746c0 3.7859999-2.18423088 6.9167314-4.87811535 6.9167314z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="INTEGER" unicode="" d="M894.24040413 820.84617615H129.75959587C102.45670987 820.84617615 75.15382385 781.1659815200001 75.15382385 741.48578776v-714.97157552C75.15382385-13.093174119999958 102.45670987-52.84617615000002 129.75959587-52.84617615000002h764.48080825c27.30288601 0 54.60577202 39.68019462 54.60577203 79.36038839V741.48578776C948.84617615 781.09317412 921.54329013 820.84617615 894.24040413 820.84617615zM876.03848041 26.514212240000006H147.96151959V741.48578776h728.07696082v-714.97157552zM628.49231335 319.92922778l46.59692603 5.82461511c0-11.64923107 5.82461597-40.77231006 34.94769409-40.7723092 11.64923107 0 40.77231006 0 40.7723092 46.59692518 0 11.64923107 0 46.59692517-34.94769409 46.59692516-5.82461597 0-11.64923107 0-23.29846215-5.8246151l5.82461511 46.59692516c11.64923107 0 40.77231006 5.82461597 40.77231006 40.77231006 0 11.64923107 0 29.12307812-29.12307813 29.12307813s-34.94769409-29.12307812-34.94769409-40.77231006l-46.59692603 5.82461596C634.31692932 471.36923523 640.14154529 529.61539234 715.86154858 529.61539234c23.29846302 0 75.72000415 0 75.72000415-69.89538819 0-23.29846302-11.64923107-46.59692517-34.94769409-58.24615711 17.47384704-5.82461597 46.59692517-11.64923107 46.59692517-69.89538817 0-23.29846302-5.82461597-46.59692517-23.29846215-64.07077222s-40.77231006-29.12307812-64.07077308-29.12307899c-81.54461926 0-87.36923523 58.24615711-87.36923523 81.54462012zM570.24615711 238.38460766000003H395.50768665c0 17.47384704 5.82461597 40.77231006 17.47384704 58.24615711 11.64923107 17.47384704 29.12307812 40.77231006 58.24615625 69.89538819 17.47384704 17.47384704 34.94769409 34.94769409 40.77231006 46.59692517 5.82461597 11.64923107 29.12307812 69.89538819-23.29846302 69.89538818-11.64923107 0-23.29846302-5.82461597-29.12307811-11.64923108-5.82461597-5.82461597-5.82461597-17.47384704-5.82461598-34.9476941l-52.42154114 5.82461598c5.82461597 29.12307812 5.82461597 87.36923523 87.36923523 87.36923523 87.36923523 0 81.54461926-58.24615711 81.54462013-81.54462012 0-46.59692517-40.77231006-93.1938512-58.24615711-110.66769739s-34.94769409-46.59692517-40.77231006-52.42154114H570.24615711V238.38460766000003zM337.26152954 238.38460766000003h-52.42154114V448.07077222c-17.47384704-17.47384704-40.77231006-34.94769409-64.07077221-40.7723092v46.59692516c11.64923107 5.82461597 69.89538819 58.24615711 75.72000329 75.72000416h40.77231006v-291.23078468z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="Text" unicode="" d="M913.89848206 820.84617615a34.94769409 34.94769409 0 0 0 34.94769409-34.94769409v-803.79696412a34.94769409 34.94769409 0 0 0-34.94769409-34.94769409H110.10151794a34.94769409 34.94769409 0 0 0-34.94769409 34.94769409V785.89848206A34.94769409 34.94769409 0 0 0 110.10151794 820.84617615z m-43.68461762-78.63231171H153.78613556v-716.42772888h716.42772888V742.21386444zM771.26820554 602.42308807c2.40265396 0 4.36846176-3.27634632 4.36846177-7.28076931v-58.24615711c0-4.00442299-1.9658078-7.28076931-4.36846177-7.28076931H566.24173326v-404.81079047h-72.80769574V529.61539234h-222.79154985c-1.82019212 0-3.42196199 1.82019212-4.07723125 4.44126916L266.27402592 536.8961616500001v58.24615711c0 4.00442299 1.9658078 7.28076931 4.36846175 7.28076931z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="checkbox" unicode="" d="M866.93751812-52.84617615000002h-709.87503624A81.83585062 81.83585062 0 0 0 75.15382385 28.989674469999954V739.01032553C75.15382385 784.15109736 111.84890264 820.84617615 157.06248188 820.84617615h709.87503624C912.15109736 820.84617615 948.84617615 784.22390477 948.84617615 739.01032553v-710.02065106c0-45.14077182-36.6950788-81.83585062-81.90865803-81.83585062z m0 791.85650168h-709.87503624v-710.02065106h709.87503624V739.01032553zM731.36958784 490.59046698L500.35076893 231.39506884000002a41.13634797 41.13634797 0 0 0-52.85838732-4.51407658 40.62669438 40.62669438 0 0 0-8.00884685 6.11584647l-134.33019916 134.69423707a40.91792488 40.91792488 0 1 0 57.80931092 57.95492662l105.78958204-106.008006L672.9050085 549.200662a41.42757932 41.42757932 0 0 0 58.39177193-58.61019502z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="textarea" unicode="" d="M910.59785054 840.53275226c17.18711503 0 31.08003351-17.76001902 31.08003443-39.67359147v-780.08019883c0-21.84195878-13.89291848-39.60197872-31.08003443-39.60197872H113.40214946c-16.90066304-0.35806476-30.79358152 17.40195426-31.08003443 39.60197872V800.85916078C82.32211503 822.70112046 96.21503351 840.53275226 113.40214946 840.53275226h797.19570108z m-41.39230253-85.93557699H154.72283922v-687.48461503h714.55432157v687.48461503h-0.07161278z m-31.08003352-471.8579298v-144.72983468c0-20.05163497-13.89291848-36.16455571-31.00842074-36.16455481H682.86857247l155.25694202 180.89438949zM279.04297328 694.44227128c5.72903804 0 10.38388179-5.37097329 10.3838827-12.03098006v-331.85455345c-0.07161277-6.73162046-4.72645652-12.17420652-10.3838827-12.03098098h-51.77618524a9.45291304 9.45291304 0 0 0-7.30452355 3.50903669 13.53485372 13.53485372 0 0 0-3.07935824 8.59355706V682.4112912200001c0.14322554 6.73162046 4.72645652 12.17420652 10.38388179 12.03098006h51.77618524z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="DOUBLE" unicode="" d="M979.36948695 820.84617615H145.39042378C115.60545716 820.84617615 85.82049052 781.13288702 85.82049052 741.41959874v-714.83919748c0-39.71328913 29.78496663-79.4265774 59.56993326-79.42657741h833.97906317c29.78496663 0 59.56993327 39.71328913 59.56993327 79.42657741V741.41959874c0 39.71328913-29.78496663 79.4265774-59.56993327 79.42657741zM959.51284282 26.58040126000003H165.24706793V741.41959874h794.26577489v-714.83919748zM428.38731928 201.1600184c34.94769409 0 61.55559794 13.34366526 80.06198979 39.87214243 18.42696606 26.60790385 27.64044865 64.33552745 27.64044951 113.18287254C536.16918524 453.49825491 502.09518349 503.13986652 434.10603247 503.13986652c-35.66253314 0-62.90584936-13.34366526-81.8093745-39.95156908C333.63141195 436.58039444 324.10022273 397.97907763 324.10022273 347.46377451c0-97.53583684 34.78884078-146.30375611 104.28709655-146.30375611z m3.09763613 255.19759353c27.79930196 0 41.77837961-34.78884078 41.77838046-104.36652235 0-69.33940245-14.29678425-104.04881658-42.89035193-104.04881657-29.22898091 0-43.84347093 33.67686846-43.84347091 101.03060624 0 71.64277289 15.0116233 107.38473268 44.95544238 107.38473269zM822.10486354 229.11817368000004c20.17435076 18.74467268 30.34095236 42.7314986 30.34095322 72.11933282 0 26.68732964-8.41921691 47.81479941-25.09879911 63.38240844-16.759008 15.56760903-39.63386247 23.35141355-68.54513589 23.35141354-8.89577684 0-18.58581937-0.47655908-29.14955425-1.35025142l4.1301818 61.47617128h106.82874694v50.11816984H683.90261857L672.78289796 337.13831959000004a489.26771728 489.26771728 0 0 0 53.69236676 3.41534276c42.09608621 0 63.06470267-15.09104996 63.06470268-45.43200232a43.04920523 43.04920523 0 0 0-14.85276999-34.39170836c-9.84889584-8.49864356-23.51026685-12.70825201-40.98411476-12.70825201-23.11313444 0-44.95544324 6.11584647-65.44749975 18.42696606v-52.58039445c19.30065841-8.41921691 43.04920523-12.62882621 71.24564045-12.62882621 34.70941412 0 62.27043699 9.3723359 82.44478688 28.03758193zM567.14554998 203.22510972999999a35.02712075 35.02712075 0 0 1 25.49593153-10.48430823 35.18597406 35.18597406 0 0 1 37.09221122 36.61565215c0 10.40488157-3.49476941 19.06237844-10.48430823 26.05191726a35.18597406 35.18597406 0 0 1-25.8136373 10.40488156 36.61565214 36.61565214 0 0 1-25.9724906-10.16660159 34.39170836 34.39170836 0 0 1-10.8814415-26.21077058c0-10.56373489 3.49476941-19.30065841 10.56373488-26.21077057z" horiz-adv-x="1117" />
|
||||
|
||||
|
||||
<glyph glyph-name="Visualization" unicode="" d="M890.75293208 344.28671087c112.98430632 0 223.34753557-73.4298705 274.65710524-182.64141453 0.35741951-0.7942657 0.67512615-1.58853139 0.91340526-2.42251085l0.47655907-1.19139812c0.59569948-1.98566467 0.9928319-3.97132848 1.19139897-6.07613357 0.55598574-2.06509132 0.7942657-4.16989556 0.75455281-6.27469978 0-3.13734989-0.55598574-5.75842695-0.91340612-7.46609789a15.40875573 15.40875573 0 0 0-1.38996517-5.67900028 18.86381224 18.86381224 0 0 0-1.5885314-3.93161559C1114.10046764 20.504268550000006 1003.73723838-52.84617615000002 890.75293208-52.84617615000002c-112.94459342 0-223.30782268 73.46958425-274.61739147 182.68112829a20.96861646 20.96861646 0 0 0-0.83397946 2.26365753 16.71929425 16.71929425 0 0 0-1.19139812 3.45505566 31.88977086 31.88977086 0 0 0-0.59569948 3.93161559 75.69352804 75.69352804 0 0 0-0.63541325 4.40817551 16.83843466 16.83843466 0 0 0-0.0397129 3.57419607s0.43684618 4.16989556 0.91340526 6.27469978c-0.07942666-0.51627284-0.0397129 1.46939183 0.95311899 4.36846175l0.35741953 0.91340525a17.67241325 17.67241325 0 0 0 1.35025228 3.2962032C667.44510941 270.93626703999996 777.80833868 344.28671087 890.75293208 344.28671087z m0-61.63502373c-81.01510879 0-164.33358889-41.22239387-201.98178669-134.90604178l-0.19856622-0.71483903c0-0.39713328-0.07942666-0.7942657-0.1985662-1.46939185l0.1985662-1.42967809 0.23827997-0.91340611c38.00561733-93.96164077 121.12553035-136.01801409 201.94207294-136.01801409 81.01510879 0 165.20728124 43.08891813 202.85547905 136.73285313a9.09434304 9.09434304 0 0 0 0.2382791 0.99283276l0.19856708 1.07225858-0.23827997 1.7473847a1.82681136 1.82681136 0 0 0-0.11913956 0.47655907l-0.11914042 0.47655993c-37.52905825 93.5247946-121.72122984 133.95292277-202.81576528 133.95292277zM1010.32964479 820.84617615C1053.77598244 820.84617615 1089.31937602 784.58794352 1089.31937602 740.26791353v-340.7400174c0-18.98295178-15.24990327-34.55056081-33.83572262-34.55056168a34.31228171 34.31228171 0 0 0-33.87543468 34.55056168v340.7400174c0 6.35412644-5.04358792 11.51685388-11.27857393 11.51685388H175.51660218a11.43742723 11.43742723 0 0 1-11.27857479-11.51685388v-633.10924966c0-6.35412644 5.04358792-11.51685388 11.27857479-11.51685303h348.60324857c18.62553227 0 33.83572177-15.52789613 33.83572176-34.55056167 0-18.98295178-15.21018951-34.51084792-33.83572176-34.51084791H175.47688841C132.03055076 26.58040126000003 96.48715719 62.83863386999997 96.48715719 107.15866387999995V740.26791353C96.48715719 784.58794352 132.03055076 820.84617615 175.47688841 820.84617615H1010.28993103z m-121.72123068-631.71928362c30.89693895 0 55.99573721-26.091631 55.99573719-58.17996807s-25.09879825-58.1799681-55.99573719-58.17996808c-30.89693895 0-56.0354501 26.091631-56.0354501 58.17996808s25.13851202 58.1799681 55.9957372 58.17996807z m-21.7231684 338.03951368c10.08717495-15.88531565 5.55986073-36.93335876-10.08717582-47.13967412l-218.02595479-143.72239196a45.59085563 45.59085563 0 0 0-24.10596634-6.83068548 43.68461762 43.68461762 0 0 0-23.5499806 6.83068548L434.76495084 435.15071551l-89.11661993-52.26268784a33.08116984 33.08116984 0 0 0-45.94827515 12.50968581 34.03428883 34.03428883 0 0 0 12.31111958 46.58368838l100.87175295 59.05366045a44.47888331 44.47888331 0 0 0 45.9879889-0.55598658l155.23924584-98.29038964 206.23110805 135.2237484a33.31944895 33.31944895 0 0 0 46.54397463-10.24602828z" horiz-adv-x="1256" />
|
||||
|
||||
|
||||
<glyph glyph-name="Agent" unicode="" d="M948.84617615 81.39041337000003C948.84617615 7.438596159999975 888.2493711-52.84617615000002 813.92311444-52.84617615000002c-74.32625667 0-134.92306171 60.28477231-134.92306172 134.23658952 0 68.74086603 52.35913441 125.6868853 119.4462254 133.36289632v142.50546391H543.20329866v-143.31674956c58.78701363-14.44712674 102.62764846-67.46153128 102.62764761-130.33617686 0-73.95181721-60.62800883-134.23658951-134.92306171-134.23658951-74.32625667 0-134.92306171 60.28477231-134.92306172 134.23658951 0 63.65472829 44.87034271 117.16838485 104.78067557 130.86663353L480.79670134 357.25877360000004H225.95936428v-145.06413426c64.52842063-8.83053317 114.60971452-64.27879461 114.60971452-130.80422597 0-72.61007489-59.7231127-132.02115485-132.70762705-132.0211557C134.84573361-50.66194527000005 75.15382385 8.780337629999963 75.15382385 81.39041337000003c0 59.09904721 39.53457894 109.42996713 93.60989513 126.15493441v178.67008603A28.7070342 28.7070342 0 0 0 197.37714352 415.20329866H480.79670134v85.21620729c-70.26982765 18.28513268-122.28572638 82.00226769-122.28572554 157.57665615C358.5109758 747.76805129 431.93233633 820.84617615 522.20347842 820.84617615c90.23993832 0 163.66129968-73.07812485 163.66129969-162.88121699 0-82.68874073-62.31298681-151.21118367-142.66147945-161.50827174V415.20329866h283.41955782a28.7070342 28.7070342 0 0 0 28.61342454-28.98786485v-177.01631099c54.20012878-17.44264411 93.60989512-68.17920642 93.60989513-127.80870945z m-661.35390775 0a79.66202043 79.66202043 0 0 1-159.26163415 0 79.66202043 79.66202043 0 0 1 159.26163415 0zM623.92623075 657.9961621a101.50432924 101.50432924 0 0 1-101.72275233 101.22350027c-56.16593657 0-101.75395611-45.33839267-101.75395526-101.22350027a101.50432924 101.50432924 0 0 1 101.72275233-101.22349944c56.19714035 0 101.75395611 45.30718889 101.75395526 101.22349944z m-35.60296336-574.39031492c0 42.24926565-34.94769409 77.00974043-77.41538283 77.00974044-42.46768874 0-77.41538284-34.76047394-77.41538284-77.00974044 0-42.24926565 34.94769409-77.04094337 77.3841799-77.04094338 42.49889252 0 77.44658661 34.79167773 77.44658577 77.04094338z m303.01522987-2.18423088c0 42.21806271-34.94769409 77.00974043-77.41538282 77.00974044-42.46768874 0-77.41538284-34.79167773-77.41538284-77.04094337 0-42.24926565 34.94769409-77.00974043 77.38417905-77.00974045 42.49889252 0 77.44658661 34.76047394 77.44658661 77.00974045z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="Datacenter1" unicode="" d="M357.84858287 555.3217476699999H217.29468116a20.67377259 20.67377259 0 0 0-20.95127296 20.39627223v13.35470202c0 11.2734497 9.365635 20.39627222 20.95127295 20.39627222h140.55390174c11.55095008 0 20.95127295-9.12282251 20.95127294-20.39627222v-13.35470202c0-11.2734497-9.365635-20.39627222-20.95127294-20.39627223z m2e-8-162.09486242H217.29468116a20.67377259 20.67377259 0 0 0-20.95127296 20.39627223v13.38938903c0 11.23876183 9.365635 20.36158435 20.95127295 20.36158434h140.55390174c11.55095008 0 20.95127295-9.12282251 20.95127294-20.36158434v-13.38938903c0-11.23876183-9.365635-20.39627222-20.95127294-20.39627223z m0-162.44173852H217.29468116a20.67377259 20.67377259 0 0 0-20.95127296 20.39627222v13.35470204c0 11.2734497 9.365635 20.39627222 20.95127295 20.39627133h140.55390174c11.55095008 0 20.95127295-9.12282251 20.95127294-20.39627133v-13.35470203c0-11.2734497-9.365635-20.39627222-20.95127294-20.39627223z m0-162.44173853H217.29468116a20.67377259 20.67377259 0 0 0-20.95127296 20.39627223v13.35470202c0 11.2734497 9.365635 20.39627222 20.95127295 20.39627222h140.55390174c11.55095008 0 20.95127295-9.12282251 20.95127294-20.39627222v-13.35470202c0-11.2734497-9.365635-20.39627222-20.95127294-20.39627223z m493.95053479 324.88347705h-140.55390173a20.67377259 20.67377259 0 0 0-20.95127296 20.39627223v13.38938903c0 11.23876183 9.365635 20.36158435 20.95127296 20.36158434h140.55390173c11.58563795 0 20.95127295-9.12282251 20.95127294-20.36158434v-13.38938903c0-11.23876183-9.365635-20.39627222-20.95127294-20.39627223z m0-162.44173852h-140.55390173a20.67377259 20.67377259 0 0 0-20.95127296 20.39627222v13.35470204c0 11.2734497 9.365635 20.39627222 20.95127296 20.39627133h140.55390173c11.58563795 0 20.95127295-9.12282251 20.95127294-20.39627133v-13.35470204c0-11.2734497-9.365635-20.39627222-20.95127294-20.39627222z m0-162.44173853h-140.55390173a20.67377259 20.67377259 0 0 0-20.95127296 20.39627223v13.35470202c0 11.2734497 9.365635 20.39627222 20.95127296 20.39627222h140.55390173c11.58563795 0 20.95127295-9.12282251 20.95127294-20.39627222v-13.35470202c0-11.2734497-9.365635-20.39627222-20.95127294-20.39627223zM460.0380686-66.93798828000001H137.27053174A76.48602039 76.48602039 0 0 0 61.06201172 9.652094860000034V758.34790514C61.06201172 800.5973263 95.26392396 834.93798828 137.27053174 834.93798828h322.76753686c42.00660779 0 76.20852002-34.34066198 76.20852002-76.59008314v-748.69581028A76.48602039 76.48602039 0 0 0 460.0380686-66.93798828000001zM137.27053174 781.86605541a23.48346327 23.48346327 0 0 1-23.41408751-23.51815027v-748.69581028c0-12.97313891 10.51032348-23.55283814 23.4140875-23.55283814h322.76753687a23.48346327 23.48346327 0 0 1 23.41408839 23.55283814V758.34790514a23.48346327 23.48346327 0 0 1-23.41408839 23.55283814H137.27053174zM886.72946826-66.93798828000001h-243.09026356a76.48602039 76.48602039 0 0 0-76.20852002 76.59008314V578.18083533c0 42.21473327 34.20191224 76.59008314 76.20852002 76.59008312h243.09026356c42.00660779 0 76.20852002-34.34066198 76.20852002-76.59008312v-568.52874047A76.48602039 76.48602039 0 0 0 886.72946826-66.93798828000001zM643.6392047 601.69898559a23.48346327 23.48346327 0 0 1-23.37939964-23.51815026v-568.52874047c0-12.97313891 10.47563648-23.55283814 23.37939964-23.55283814h243.09026356a23.48346327 23.48346327 0 0 1 23.41408751 23.55283814V578.18083533a23.48346327 23.48346327 0 0 1-23.4140875 23.51815026h-243.09026357z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="menu-assets" unicode="" d="M926.75021473 834.93798828H97.24978527A36.24414081 36.24414081 0 0 1 61.06201172 798.69384747v-829.38769494c0-20.01037323 16.23376758-36.24414081 36.18777355-36.24414081h829.50042946a36.24414081 36.24414081 0 0 1 36.18777355 36.24414081V798.69384747A36.24414081 36.24414081 0 0 1 926.75021473 834.93798828z m-27.84542078-838.8573927H124.47516632v226.37087012h774.42962763v-226.37087012z m0 281.61077368H124.47516632V501.80754944h774.42962763v-224.11618018z m0 279.35608375H124.47516632V770.3974887100001h774.42962763V557.04745301zM317.53299255 621.24974909a55.69084155 55.69084155 0 0 1 93.40053082 25.02705834 55.80357605 55.80357605 0 0 1-93.28779631 53.99982411 55.91631055 55.91631055 0 0 1-0.11273451-79.02688245zM317.53299255 354.68903076000004a55.69084155 55.69084155 0 0 1 93.45689808 25.02705835 55.8599433 55.8599433 0 1 1-93.45689808-25.0834256zM317.53299255 59.83195366999996a55.69084155 55.69084155 0 0 1 93.40053082 25.02705835 55.8599433 55.8599433 0 1 1-93.40053082-25.02705835z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 167 KiB After Width: | Height: | Size: 191 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@
|
||||
<!------TAB区------>
|
||||
<div class="sub-list__tabs">
|
||||
<!--机柜-->
|
||||
<cabinet-tab v-if="from === fromRoute.dc && targetTab === 'cabinet'" v-show="subResizeShow" :obj="obj" @changeTab="changeTab"></cabinet-tab>
|
||||
<cabinet-tab v-if="from === fromRoute.dc && targetTab === 'cabinet'" :tabs="tabs.dc.cabinet" v-show="subResizeShow" :obj="obj" @changeTab="changeTab"></cabinet-tab>
|
||||
<!--告警信息-->
|
||||
<alert-message-tab v-if="((from === fromRoute.rule || from === fromRoute.asset || from === fromRoute.endpoint || from === fromRoute.project ) && targetTab === 'alertMessage')" v-show="subResizeShow" :from="from" :obj="obj" @changeTab="changeTab"></alert-message-tab>
|
||||
<!--asset页的endpoint列表-->
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
<terminal-log-monitor-tab v-if="from === fromRoute.terminalLog && targetTab === 'monitor'" ref="reminalLogRecordTab" :from="from" :obj="obj" @changeTab="changeTab" @exit="closeSubList"></terminal-log-monitor-tab>
|
||||
|
||||
<asset-tab v-if="from === fromRoute.dc && targetTab === 'asset'" :tabs="tabs.dc.asset" ref="assetTab" :from="from" :obj="obj" @changeTab="changeTab" @exit="closeSubList"></asset-tab>
|
||||
|
||||
<!--user列表的两个日志-->
|
||||
<operation-log-tab v-if="from === fromRoute.user && targetTab === 'operationLogTab'" :from="from" :obj="obj" :tabs="tabs.user.operationLog" @changeTab="changeTab"></operation-log-tab>
|
||||
<terminal-log-tab v-if="from === fromRoute.user && targetTab === 'terminalLogTab'" :from="from" :obj="obj" :tabs="tabs.user.terminalLog" @changeTab="changeTab"></terminal-log-tab>
|
||||
@@ -70,6 +72,7 @@ import terminalLogMonitorTab from './tabs/terminalLogMonitorTab'
|
||||
import terminalLogCMDTab from './tabs/terminalLogCMDTab'
|
||||
import operationLogTab from './tabs/operationLogTab'
|
||||
import terminalLogTab from './tabs/terminalLogTab'
|
||||
import assetTab from '@/components/common/bottomBox/tabs/assetTab'
|
||||
import { fromRoute } from '@/components/common/js/constants'
|
||||
|
||||
export default {
|
||||
@@ -87,7 +90,8 @@ export default {
|
||||
endpointTabNew,
|
||||
alertMessageTabNew,
|
||||
endpointQuery,
|
||||
panelTabNew
|
||||
panelTabNew,
|
||||
assetTab
|
||||
},
|
||||
props: {
|
||||
isFullScreen: Boolean, // 是否全屏
|
||||
@@ -134,7 +138,18 @@ export default {
|
||||
chartTempTabTitle: [
|
||||
{ prop: 'panel', name: 'Template preview' }
|
||||
]
|
||||
},
|
||||
dc: {
|
||||
cabinet: [
|
||||
{ prop: 'asset', name: this.$t('asset.assets'), active: false },
|
||||
{ prop: 'cabinet', name: this.$t('config.dc.cabinets'), active: true }
|
||||
],
|
||||
asset: [
|
||||
{ prop: 'asset', name: this.$t('asset.assets'), active: true },
|
||||
{ prop: 'cabinet', name: this.$t('config.dc.cabinets'), active: false }
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
209
nezha-fronted/src/components/common/bottomBox/tabs/assetTab.vue
Normal file
209
nezha-fronted/src/components/common/bottomBox/tabs/assetTab.vue
Normal file
@@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<div>
|
||||
<nz-bottom-data-list
|
||||
:api="url"
|
||||
style="height: 100%"
|
||||
:custom-table-title.sync="tools.customTableTitle"
|
||||
:layout="['searchInput', 'elementSet']"
|
||||
:search-msg="searchMsg"
|
||||
:tabs="tabs"
|
||||
@search="search"
|
||||
@changeTab="changeTab"
|
||||
>
|
||||
<template v-slot:title><span :title="obj.name">{{obj.name}}</span></template>
|
||||
<template v-slot>
|
||||
<asset-table
|
||||
ref="dataTable"
|
||||
:api="url"
|
||||
:custom-table-title="tools.customTableTitle"
|
||||
:height="mainTableHeight"
|
||||
:table-data="tableData"
|
||||
@del="del"
|
||||
@edit="edit"
|
||||
@orderBy="tableDataSort"
|
||||
@reload="getTableData"
|
||||
@selectionChange="selectionChange"
|
||||
></asset-table>
|
||||
</template>
|
||||
<template v-slot:pagination>
|
||||
<Pagination ref="Pagination" :pageObj="pageObj" :tableId="tableId" @pageNo='pageNo' @pageSize='pageSize'></Pagination>
|
||||
</template>
|
||||
</nz-bottom-data-list>
|
||||
<transition name="right-box">
|
||||
<asset-box v-if="rightBox.show"
|
||||
ref="assetBox"
|
||||
:brand-data="brandData"
|
||||
:dc-data="obj"
|
||||
:field-group-data="fieldGroupData"
|
||||
:from="fromRoute.asset"
|
||||
:obj="object"
|
||||
:snmp-credential-data="snmpCredentialData"
|
||||
:state-data="stateData"
|
||||
:type-data="typeData"
|
||||
@close="closeRightBox"
|
||||
@refresh="getTableData"></asset-box>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dataListMixin from '@/components/common/mixin/dataList'
|
||||
import subDataListMixin from '@/components/common/mixin/subDataList'
|
||||
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
||||
import assetTable from "@/components/common/table/asset/assetTable";
|
||||
import assetBox from "@/components/common/rightBox/asset/assetBox";
|
||||
export default {
|
||||
name: 'assetTab',
|
||||
mixins: [dataListMixin, subDataListMixin],
|
||||
components: {
|
||||
nzBottomDataList,
|
||||
assetTable,
|
||||
assetBox
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
url: '/asset/asset',
|
||||
tableId: 'assetTabTable', // 需要分页的table的id,用于记录每页数量
|
||||
searchMsg: { // 给搜索框子组件传递的信息
|
||||
zheze_none: true,
|
||||
searchLabelList: [{
|
||||
id: 1,
|
||||
name: 'ID',
|
||||
type: 'input',
|
||||
label: 'id',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 20,
|
||||
name: 'SN',
|
||||
type: 'input',
|
||||
label: 'sn',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 21,
|
||||
name: 'Host',
|
||||
type: 'input',
|
||||
label: 'host',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 22,
|
||||
name: this.$t('asset.state'),
|
||||
type: 'select',
|
||||
label: 'assetState',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 23,
|
||||
name: 'pingStatus',
|
||||
type: 'select',
|
||||
label: 'pingStatus',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 23,
|
||||
name: this.$t('asset.tableTitle.cabinet'),
|
||||
type: 'input',
|
||||
label: 'cabinetName',
|
||||
disabled: false
|
||||
}]
|
||||
},
|
||||
searchLabel: { dcIds: this.obj.id },
|
||||
brandData: [],
|
||||
modelData: [],
|
||||
stateData: [],
|
||||
typeData: [],
|
||||
dcData: [],
|
||||
snmpCredentialData: [],
|
||||
fieldGroupData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getStateData () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('asset/stateConf').then(response => {
|
||||
if (response.code === 200) {
|
||||
this.stateData = response.data.list
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
},
|
||||
getTypeData () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('asset/typeConf/tree').then(response => {
|
||||
if (response.code === 200) {
|
||||
this.typeData = response.data.list
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
},
|
||||
getDcData () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('dc', { pageSize: -1 }).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.dcData = response.data.list
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
},
|
||||
getSnmpCredentialData () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('snmp/credential', { pageSize: -1 }).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.snmpCredentialData = response.data.list
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
},
|
||||
getFieldGroupData () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('asset/field/group', { pageSize: -1 }).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.fieldGroupData = response.data.list
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
},
|
||||
getBrandData () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('asset/brand').then(response => {
|
||||
if (response.code === 200) {
|
||||
this.brandData = response.data.list
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
},
|
||||
getModelData (brandId) {
|
||||
return new Promise(resolve => {
|
||||
this.$get('asset/model').then(response => {
|
||||
if (response.code === 200) {
|
||||
this.modelData = response.data.list
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
watch:{
|
||||
obj:{
|
||||
immediate:true,
|
||||
deep:true,
|
||||
handler(n,o){
|
||||
this.searchLabel.dcIds=n.id;
|
||||
this.getTableData();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.getBrandData()
|
||||
this.getStateData()
|
||||
this.getTypeData()
|
||||
this.getDcData()
|
||||
this.getSnmpCredentialData()
|
||||
this.getFieldGroupData()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -1,108 +1,64 @@
|
||||
<template>
|
||||
<span>
|
||||
<div class="sub-top-tools">
|
||||
<div class="sub-list-tabs">
|
||||
<div class="sub-list-tab-title">{{$t("config.dc.dcName")}}:{{obj.name}}</div><div
|
||||
class="sub-list-tab sub-list-tab-active">{{$t("config.dc.cabinets")}}</div>
|
||||
</div>
|
||||
<div class="top-tool-right">
|
||||
<div class="top-tool-search">
|
||||
<search-input :searchMsg="searchMsg" @search="search" position="cabinet-bottom"></search-input>
|
||||
</div>
|
||||
<button v-has="'dc_add'" :title="$t('overall.createCabinet')" type="button" @click="add"
|
||||
class="nz-btn nz-btn-size-normal nz-btn-style-light float-right margin-l-20" id="cab-add">
|
||||
<i class="nz-icon-create-square nz-icon"></i>
|
||||
</button>
|
||||
<delete-button id="cabinet-list-batch-delete" v-has="'dc_delete'" :delete-objs="batchDeleteObjs" api="cabinet" @after="allDelAfter"></delete-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
id="cabinet-list-table"
|
||||
class="nz-table"
|
||||
:data="tableData"
|
||||
border
|
||||
v-loading="loading"
|
||||
ref="cabTable"
|
||||
:cell-class-name="assetStatClassName"
|
||||
:height="$tableHeight.noPagination"
|
||||
style="width: 100%;"
|
||||
@selection-change="(selection)=>{this.batchDeleteObjs=selection}"
|
||||
<div>
|
||||
<nz-bottom-data-list
|
||||
:api="url"
|
||||
style="height: 100%"
|
||||
:custom-table-title.sync="tools.customTableTitle"
|
||||
:layout="['searchInput', 'elementSet']"
|
||||
:search-msg="searchMsg"
|
||||
:tabs="tabs"
|
||||
@search="search"
|
||||
@changeTab="changeTab"
|
||||
>
|
||||
<el-table-column
|
||||
:resizable="false"
|
||||
type="selection"
|
||||
width="40"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:resizable="true"
|
||||
v-for="(item, index) in tableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:label="item.label"
|
||||
>
|
||||
<template slot-scope="scope" :column="item">
|
||||
<div v-if="item.prop == 'option'" class="content-right-options">
|
||||
<span :id="'dc-edit-'+scope.row.id" v-has="'dc_edit'" :title="$t('overall.edit')" class="content-right-option" @click="edit(scope.row)"><i class="nz-icon nz-icon-edit"></i></span>
|
||||
<span :id="'dc-del-'+scope.row.id" v-has="'dc_delete'" :title="$t('overall.delete')" class="content-right-option" @click="del(scope.row)"><i class="nz-icon nz-icon-delete"></i></span>
|
||||
</div>
|
||||
<template v-else-if="item.prop == 'assetStat'">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
offset="-100"
|
||||
trigger="hover"
|
||||
:content="$t('overall.result.total') + ':' + scope.row.assetStat.total + ',' + $t('asset.inStock') + ':' + scope.row.assetStat.inStock + ',' + $t('asset.notInStock') + ':' + scope.row.assetStat.outStock + ',' + $t('asset.suspended') + ':' + scope.row.assetStat.suspended">
|
||||
<div slot="reference" class="dc-asset-states">
|
||||
<span class="dc-asset-state dc-asset-state-total">{{scope.row.assetStat.total}}</span>
|
||||
<span class="dc-asset-state dc-asset-state-in">{{scope.row.assetStat.inStock}}</span>
|
||||
<span class="dc-asset-state dc-asset-state-out">{{scope.row.assetStat.outStock}}</span>
|
||||
<span class="dc-asset-state dc-asset-state-suspended">{{scope.row.assetStat.suspended}}</span>
|
||||
</div>
|
||||
</el-popover>
|
||||
|
||||
</template >
|
||||
<template v-else-if="item.prop == 'alertStat'">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
offset="-128"
|
||||
trigger="hover"
|
||||
:content="$t('overall.result.total') + ':' + scope.row.alertStat.total + ',' + $t('alert.config.P1') + ':' + scope.row.alertStat.P1 + ',' + $t('alert.config.P2') + ':' + scope.row.alertStat.P2+ ',' + $t('alert.config.P3') + ':' + scope.row.alertStat.P3">
|
||||
<div slot="reference" class="dc-asset-states">
|
||||
<span class="dc-asset-state dc-asset-state-total">{{scope.row.alertStat.total}}</span>
|
||||
<span class="dc-asset-state alert-level-P1">{{scope.row.alertStat.P1}}</span>
|
||||
<span class="dc-asset-state alert-level-P2">{{scope.row.alertStat.P2}}</span>
|
||||
<span class="dc-asset-state alert-level-P3">{{scope.row.alertStat.P3}}</span>
|
||||
</div>
|
||||
</el-popover>
|
||||
</template >
|
||||
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
||||
<template v-else>-</template>
|
||||
<template v-slot:title><span :title="obj.name">{{obj.name}}</span></template>
|
||||
<template v-slot>
|
||||
<cabinet-table
|
||||
ref="dataTable"
|
||||
:api="url"
|
||||
:custom-table-title="tools.customTableTitle"
|
||||
:height="mainTableHeight"
|
||||
:table-data="tableData"
|
||||
@del="del"
|
||||
@edit="edit"
|
||||
@orderBy="tableDataSort"
|
||||
@reload="getTableData"
|
||||
@selectionChange="selectionChange"
|
||||
></cabinet-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template v-slot:pagination>
|
||||
<Pagination ref="Pagination" :pageObj="pageObj" :tableId="tableId" @pageNo='pageNo' @pageSize='pageSize'></Pagination>
|
||||
</template>
|
||||
</nz-bottom-data-list>
|
||||
<transition name="right-box">
|
||||
<cabinet-box v-if="rightBox.show" :cabinet="cabinet" :current-dc="currentDc" ref="cabinetEditBox" @close="closeRightBox"></cabinet-box>
|
||||
<cabinet-box v-if="rightBox.show" :current-dc="obj" :obj="object" ref="cabinetEditBox" @close="closeRightBox"></cabinet-box>
|
||||
</transition>
|
||||
<button class="to-top" v-show="showTopBtn" @click="$('ps', 1)"><i class="nz-icon nz-icon-top"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import cabinetBox from '../../rightBox/cabinetBox'
|
||||
import cabinetBox from '../../rightBox/setting/cabinetBox'
|
||||
import deleteButton from '../../deleteButton'
|
||||
import dataListMixin from '@/components/common/mixin/dataList'
|
||||
import subDataListMixin from '@/components/common/mixin/subDataList'
|
||||
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
||||
import cabinetTable from "@/components/common/table/settings/cabinetTable";
|
||||
export default {
|
||||
name: 'cabinetTab',
|
||||
mixins: [dataListMixin, subDataListMixin],
|
||||
components: {
|
||||
nzBottomDataList,
|
||||
'cabinet-box': cabinetBox,
|
||||
'delete-button': deleteButton
|
||||
'delete-button': deleteButton,
|
||||
cabinetTable
|
||||
},
|
||||
props: {
|
||||
obj: Object // 关联的实体对象
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
cabinet: {},
|
||||
blankCabinet: {
|
||||
url:'/cabinet',
|
||||
tableId:'cabinetTable',
|
||||
blankObject: {
|
||||
id: '',
|
||||
idcId: '',
|
||||
name: '',
|
||||
@@ -110,50 +66,6 @@ export default {
|
||||
seq: '',
|
||||
uSize: 1
|
||||
},
|
||||
batchDeleteObjs: [],
|
||||
rightBox: { show: false },
|
||||
showTopBtn: false, // top按钮是否显示
|
||||
loading: false,
|
||||
currentDc: {},
|
||||
tableTitle: [
|
||||
{
|
||||
label: 'ID',
|
||||
prop: 'id',
|
||||
show: true,
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
label: this.$t('overall.name'),
|
||||
prop: 'name',
|
||||
show: true
|
||||
},
|
||||
{
|
||||
label: this.$t('asset.uSize'),
|
||||
prop: 'uSize',
|
||||
show: true
|
||||
},
|
||||
{
|
||||
label: this.$t('config.dc.assets'),
|
||||
prop: 'assetStat',
|
||||
show: true
|
||||
},
|
||||
{
|
||||
label: this.$t('alert.alert'),
|
||||
prop: 'alertStat',
|
||||
show: true
|
||||
},
|
||||
{
|
||||
label: this.$t('config.dc.remark'),
|
||||
prop: 'remark',
|
||||
show: true
|
||||
},
|
||||
{
|
||||
label: this.$t('config.account.option'),
|
||||
prop: 'option',
|
||||
show: true,
|
||||
width: 120
|
||||
}
|
||||
],
|
||||
searchMsg: { // 给搜索框子组件传递的信息
|
||||
zheze_none: true,
|
||||
searchLabelList: [
|
||||
@@ -178,9 +90,6 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
searchLabel: { // 搜索参数
|
||||
},
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -188,75 +97,6 @@ export default {
|
||||
changeTab (tab) {
|
||||
this.$emit('changeTab', tab)
|
||||
},
|
||||
add () {
|
||||
this.cabinet = this.newCabinet()
|
||||
this.rightBox.show = true
|
||||
},
|
||||
closeRightBox (refresh) {
|
||||
this.rightBox.show = false
|
||||
if (refresh) {
|
||||
this.getTableData()
|
||||
this.$store.commit('setDcDataRefresh')
|
||||
}
|
||||
},
|
||||
newCabinet () {
|
||||
return JSON.parse(JSON.stringify(this.blankCabinet))
|
||||
},
|
||||
edit (cabinet) {
|
||||
this.cabinet = JSON.parse(JSON.stringify(cabinet))
|
||||
this.rightBox.show = true
|
||||
},
|
||||
getTableData () {
|
||||
this.tableData = []
|
||||
this.loading = true
|
||||
this.$set(this.searchLabel, 'pageNo', 1)
|
||||
this.$set(this.searchLabel, 'pageSize', -1)
|
||||
this.$get('/cabinet', this.searchLabel).then(response => {
|
||||
this.loading = false
|
||||
if (response.code == 200) {
|
||||
this.tableData = response.data.list
|
||||
}
|
||||
})
|
||||
},
|
||||
search (searchObj) {
|
||||
this.searchLabel = { idcId: this.currentDc.id, pageNo: 1, pageSize: -1 }
|
||||
for (const item in searchObj) {
|
||||
if (searchObj[item]) {
|
||||
this.$set(this.searchLabel, item, searchObj[item])
|
||||
}
|
||||
}
|
||||
if (this.$refs.cabTable && this.$refs.cabTable.bodyWrapper) {
|
||||
this.$refs.cabTable.bodyWrapper.scrollTop = 0
|
||||
}
|
||||
this.getTableData()
|
||||
},
|
||||
assetStatClassName (param) {
|
||||
if (param.column.label == this.$t('config.model.assets') || param.column.label == this.$t('alert.alert')) {
|
||||
return 'asset-state'
|
||||
}
|
||||
return ''
|
||||
},
|
||||
del: function (cabinet) {
|
||||
this.$confirm(this.$t('tip.confirmDelete'), {
|
||||
confirmButtonText: this.$t('tip.yes'),
|
||||
cancelButtonText: this.$t('tip.no'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$delete('/cabinet?ids=' + cabinet.id).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })
|
||||
this.getTableData()
|
||||
this.$store.commit('setDcDataRefresh')
|
||||
} else {
|
||||
this.$message.error(response.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
allDelAfter () {
|
||||
this.getTableData()
|
||||
this.$store.commit('setDcDataRefresh')
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
obj: {
|
||||
@@ -265,7 +105,7 @@ export default {
|
||||
handler (n) {
|
||||
if (n) {
|
||||
this.currentDc = JSON.parse(JSON.stringify(n))
|
||||
this.searchLabel = { idcId: this.currentDc.id }
|
||||
this.searchLabel = { dcId: this.currentDc.id }
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
:layout="['searchInput', 'elementSet']"
|
||||
:search-msg="searchMsg"
|
||||
:tabs="tabs"
|
||||
@search="search"
|
||||
@changeTab="changeTab"
|
||||
>
|
||||
<template v-slot:title><span :title="obj.name">{{obj.name}}</span></template>
|
||||
@@ -51,16 +52,46 @@ export default {
|
||||
searchLabelList: [
|
||||
{
|
||||
id: 11,
|
||||
name: this.$t('config.terminallog.host'),
|
||||
name: this.$t('config.terminallog.loginHost'),
|
||||
type: 'input',
|
||||
label: 'host',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 12,
|
||||
name: this.$t('config.terminallog.user'),
|
||||
name: this.$t('config.terminallog.loginUser'),
|
||||
type: 'input',
|
||||
label: 'loginUser',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 13,
|
||||
name: this.$t('config.terminallog.sourceIp'),
|
||||
type: 'input',
|
||||
label: 'remoteAddr',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 14,
|
||||
name: this.$t('config.terminallog.sourceUser'),
|
||||
type: 'input',
|
||||
label: 'username',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 15,
|
||||
name: this.$t('config.terminallog.uuid'),
|
||||
type: 'input',
|
||||
label: 'uuid',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 16,
|
||||
name: this.$t('config.terminallog.protocol'),
|
||||
type: 'selectString',
|
||||
label: 'protocol',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 17,
|
||||
name: this.$t('config.terminallog.status'),
|
||||
type: 'terminalStatus',
|
||||
label: 'state',
|
||||
disabled: false
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -1,11 +1,24 @@
|
||||
<template>
|
||||
<div class="search-box" :style="{'height':height+ 'px'}">
|
||||
<div v-for="(searchKey,index) in titleSearchListCopy" :key="index" v-if="searchKey.show" class="search-content-box">
|
||||
<label class="search-title">{{searchKey.label}}:</label>
|
||||
<el-checkbox-group v-model="selectValueOut[searchKey.key]" v-if="searchKey.type === 'checkBox'" ref="searchContent" class="search-content">
|
||||
<el-checkbox v-for="(item, j) in searchKey.children" :label="item.value" :key="j" v-show="!searchKey.showMore || j < searchKey.index">{{item.key || item.name || item.label}}</el-checkbox>
|
||||
<div class="search-box__container">
|
||||
<div v-for="(data, type, index) in titleSearchListCopy" v-if="data.show" :key="index" class="search-content-box">
|
||||
<label class="search-title">{{data.label}}:</label>
|
||||
<el-checkbox-group v-if="data.type === 'checkBox'" ref="searchContent" v-model="selectValueOut[data.key]">
|
||||
<template v-for="(item, j) in data.children">
|
||||
<el-checkbox v-if="j < 20" v-show="!data.showMore || j < data.index" :key="j" :label="item.value">{{item.key || item.name || item.label}}</el-checkbox>
|
||||
</template>
|
||||
</el-checkbox-group>
|
||||
<span class="search-more" @click="changShowMore(index)" v-show="contentWidth <= searchKey.width">更多 <i class="nz-icon" :class="searchKey.showMore?'nz-icon-arrow-down':'nz-icon-arrow-up'"/></span>
|
||||
<div v-for="(item, j) in data.children" v-else-if="data.type === 'dropdownCheckBox'" :key="j" class="nz-label-search">
|
||||
<el-cascader
|
||||
:ref="`${type}_cascader`"
|
||||
:options="item.children"
|
||||
:placeholder="item.name"
|
||||
:props="{ multiple: true, label: 'name', value: 'id' }"
|
||||
popper-class="click-search-dropdown"
|
||||
size="mini"
|
||||
@change="casChange(type, data.key)"
|
||||
></el-cascader>
|
||||
</div>
|
||||
<span v-show="contentWidth <= data.width" class="search-more" @click="changShowMore(index)">更多 <i :class="data.showMore?'el-icon-arrow-down':'el-icon-arrow-up'"/></span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -42,10 +55,6 @@ export default {
|
||||
},
|
||||
selectValue: {
|
||||
type: Object
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
default: 116
|
||||
}
|
||||
},
|
||||
computed: { },
|
||||
@@ -65,7 +74,6 @@ export default {
|
||||
deep: true,
|
||||
handler (n) {
|
||||
this.selectValueOut = { ...n }
|
||||
// this.$emit('reload', this.selectValue)
|
||||
}
|
||||
},
|
||||
selectValueOut: {
|
||||
@@ -87,15 +95,40 @@ export default {
|
||||
window.addEventListener('resize', this.needMore)
|
||||
},
|
||||
methods: {
|
||||
casChange (type, key) {
|
||||
const cascs = this.$refs[`${type}_cascader`]
|
||||
if (type === 'assetLabel') { // label特殊处理,组织成{“id”:[“张三”,"lw"],"id":["李四"]}
|
||||
const values = {}
|
||||
cascs.forEach(c => {
|
||||
const nodes = c.getCheckedNodes()
|
||||
nodes.forEach(n => {
|
||||
const metaId = n.data.metaId
|
||||
if (values[`${metaId}`]) {
|
||||
values[`${metaId}`].push(n.data.name)
|
||||
} else {
|
||||
values[`${metaId}`] = [n.data.name]
|
||||
}
|
||||
})
|
||||
})
|
||||
this.selectValueOut[key] = JSON.stringify(values)
|
||||
} else {
|
||||
const values = new Set()
|
||||
cascs.forEach(c => {
|
||||
const nodes = c.getCheckedNodes()
|
||||
nodes.forEach(n => values.add(n.data.id))
|
||||
})
|
||||
this.selectValueOut[key] = [...values]
|
||||
}
|
||||
},
|
||||
needMore (key) {
|
||||
setTimeout(() => {
|
||||
/* setTimeout(() => {
|
||||
this.contentWidth = this.$refs.searchContent[0].$el.offsetWidth
|
||||
|
||||
Object.keys(this.titleSearchListCopy).forEach(key => {
|
||||
this.titleSearchListCopy[key].width = 0
|
||||
this.titleSearchListCopy[key].showMore = false
|
||||
this.titleSearchListCopy[key].children.forEach((item, i) => {
|
||||
/* (基础宽度 + 文字宽度) 总和 》 文本长时 显示更多 */
|
||||
/!* (基础宽度 + 文字宽度) 总和 》 文本长时 显示更多 *!/
|
||||
this.titleSearchListCopy[key].width += 60 + item.name.length * 12
|
||||
if (this.titleSearchListCopy[key].width > this.contentWidth && !this.titleSearchListCopy[key].showMore) {
|
||||
this.titleSearchListCopy[key].showMore = true
|
||||
@@ -103,7 +136,7 @@ export default {
|
||||
}
|
||||
})
|
||||
}, 100)
|
||||
})
|
||||
}) */
|
||||
},
|
||||
changShowMore (key) {
|
||||
this.titleSearchListCopy[key].showMore = !this.titleSearchListCopy[key].showMore
|
||||
@@ -115,56 +148,55 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search-box{
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #E7EAED;
|
||||
margin: 0 20px;
|
||||
<style lang="scss" scoped>
|
||||
.search-box__container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
border: 1px solid #E7EAED;
|
||||
background-color: #FFFFFF;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 0;
|
||||
padding: 15px 0 15px 17px;
|
||||
}
|
||||
.search-title{
|
||||
ont-family: Roboto-Medium;
|
||||
.search-title {
|
||||
position: absolute;
|
||||
width: 130px;
|
||||
left: 0;
|
||||
line-height: 18px;
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
letter-spacing: 0;
|
||||
line-height: 14px;
|
||||
font-weight: 500;
|
||||
width: 130px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.search-content-box{
|
||||
}
|
||||
.search-content-box {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
padding-left: 20px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
position: relative;
|
||||
}
|
||||
/deep/ .el-checkbox-group{
|
||||
flex: 1;
|
||||
}
|
||||
/deep/ .el-checkbox{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.search-content{
|
||||
padding-right: 30px;
|
||||
}
|
||||
.search-more{
|
||||
padding-left: 130px;
|
||||
padding-right: 80px;
|
||||
width: calc(100vw - 333px);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.search-more {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: 0;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
padding: 0 8px;
|
||||
transform: translateY(-50%);
|
||||
font-size: 12px;
|
||||
color: #333333;
|
||||
letter-spacing: 0;
|
||||
line-height: 16px;
|
||||
font-weight: 400;
|
||||
border: 1px solid #DEDEDE;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid $--primary-border-color;
|
||||
border-radius: 2px;
|
||||
padding: 3px 5px;
|
||||
|
||||
i {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<Header ref="header"></Header>
|
||||
<!--<div class="content-box" >
|
||||
<router-view/>
|
||||
</div>-->
|
||||
<left-menu ></left-menu>
|
||||
<menus v-if="isMenuPage"></menus>
|
||||
<web-ssh ref="webSsh" ></web-ssh>
|
||||
<span class="el-popover table-tooltip"></span>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Header from './header'
|
||||
import webSSH from '../cli/webSSH'
|
||||
import leftMenu from './leftMenu'
|
||||
import menus from '../page/config/menus'
|
||||
export default {
|
||||
name: 'home',
|
||||
components: {
|
||||
Header,
|
||||
'web-ssh': webSSH,
|
||||
'left-menu': leftMenu,
|
||||
menus
|
||||
},
|
||||
computed: {
|
||||
isMenuPage: function () {
|
||||
return this.$route.path == '/menu'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/*@media screen and (max-width: 1600px) {
|
||||
.content-box {
|
||||
background: #a0eea6;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 700px) {
|
||||
.content-box {
|
||||
background: #b94b7e;
|
||||
}
|
||||
}*/
|
||||
</style>
|
||||
@@ -80,12 +80,10 @@ export const asset = {
|
||||
{ value: 3, label: i18n.t('asset.suspended') }
|
||||
],
|
||||
authProtocolOptions: [
|
||||
{ value: 0, label: 'Non' },
|
||||
{ value: 1, label: 'SSH' },
|
||||
{ value: 2, label: 'TELNET' }
|
||||
],
|
||||
authProtocolData: {
|
||||
non: 0,
|
||||
ssh: 1,
|
||||
telnet: 2
|
||||
},
|
||||
|
||||
@@ -503,115 +503,11 @@ const cn = {
|
||||
assetType: '资产类型', // '资产类型'
|
||||
batchEditAsset: '批量修改资产',
|
||||
selectAsset: '已选择的资产',
|
||||
editAssetTab: {
|
||||
title: '新增资产',
|
||||
sn: 'SN',
|
||||
host: '主机',
|
||||
state: '状态',
|
||||
modelId: '模块',
|
||||
alert: '告警信息',
|
||||
assetInfo: '资产信息',
|
||||
assetType: '资产类型',
|
||||
vendor: '厂商/型号',
|
||||
vendorTab: {
|
||||
vendor: '厂商/型号',
|
||||
vendorName: '新厂商',
|
||||
existVendor: '已有厂商',
|
||||
modelName: '新型号',
|
||||
existModel: '已有型号'
|
||||
},
|
||||
purchaseDate: '购买日期',
|
||||
dataSelectTip: '请选择日期',
|
||||
dc: '数据中心',
|
||||
dcName: '数据中心名称',
|
||||
AddIdcTab: {
|
||||
title: '新增数据中心',
|
||||
dcName: '数据中心名称',
|
||||
location: '地区',
|
||||
principal: '负责人',
|
||||
tel: '电话'
|
||||
},
|
||||
editIdcTab: {
|
||||
title: '编辑数据中心',
|
||||
dcName: '数据中心名称',
|
||||
location: '地区',
|
||||
principal: '负责人',
|
||||
tel: '电话'
|
||||
},
|
||||
location: '地区',
|
||||
principal: '负责人',
|
||||
tel: '电话',
|
||||
cabinet: '机柜',
|
||||
AddCabinetTab: {
|
||||
title: '新增机柜',
|
||||
name: '名称',
|
||||
uSize: 'U位',
|
||||
remark: '描述',
|
||||
DC: '数据中心'
|
||||
},
|
||||
editCabinetTab: {
|
||||
title: '编辑机柜',
|
||||
name: '名称',
|
||||
uSize: 'U位',
|
||||
remark: '描述',
|
||||
DC: '数据中心'
|
||||
},
|
||||
uSize: 'U位',
|
||||
remark: '描述',
|
||||
cli: 'CLI账号',
|
||||
loginType: '登录类型',
|
||||
password: '密码',
|
||||
ssh: 'SSH-Key',
|
||||
account: '用户名',
|
||||
port: '端口',
|
||||
upload: '上传',
|
||||
clickToUpload: '上传'
|
||||
},
|
||||
tableTitle: {
|
||||
id: 'ID',
|
||||
assetType: '资产类型',
|
||||
device: 'SN',
|
||||
host: 'Host',
|
||||
assetState: '状态',
|
||||
modules: 'Endpoint',
|
||||
alerts: '告警信息',
|
||||
dataCenter: '数据中心',
|
||||
cabinet: '机柜',
|
||||
model: '型号',
|
||||
manufacturer: '厂商',
|
||||
procurementDate: '购买日期',
|
||||
principal: '负责人',
|
||||
principalTel: '电话',
|
||||
option: '操作',
|
||||
assetPing: 'Ping',
|
||||
lastReply: 'Ping最后应答',
|
||||
vendor: '厂商',
|
||||
sn: 'SN',
|
||||
name: 'Name',
|
||||
manageIp: 'manageIp',
|
||||
brand: '品牌',
|
||||
dc: '数据中心',
|
||||
type: '主机地址',
|
||||
state: '主机状态',
|
||||
endpoint: 'Endpoint'
|
||||
},
|
||||
tagTableTitle: {
|
||||
projectName: '系统名称',
|
||||
moduleName: '模块名称',
|
||||
endPoint: 'EndPoint',
|
||||
alert: '告警'
|
||||
},
|
||||
assets: '资产',
|
||||
pingActive: '存活',
|
||||
assetStatPre: '最后应答:',
|
||||
assetStatDown: '未Ping通',
|
||||
pingInactive: '宕机',
|
||||
left: {
|
||||
dataCenter: '数据中心',
|
||||
assetType: '资产类型',
|
||||
vendor: '厂商',
|
||||
ping: 'Ping'
|
||||
},
|
||||
editAsset: '编辑资产',
|
||||
createAsset: '新增资产',
|
||||
host: 'Host',
|
||||
@@ -665,7 +561,8 @@ const cn = {
|
||||
privateKey: '秘钥',
|
||||
usernamePrompt: '用户名提示',
|
||||
passwordPrompt: '密码提示',
|
||||
snmpCredential: 'SNMP凭证'
|
||||
snmpCredential: 'SNMP凭证',
|
||||
authProtocol: '认证协议'
|
||||
},
|
||||
config: {
|
||||
config: '设置',
|
||||
@@ -833,6 +730,10 @@ const cn = {
|
||||
latitude: '纬度',
|
||||
lnglat: '坐标'
|
||||
},
|
||||
cabinet:{
|
||||
editCabinet:'编辑机柜',
|
||||
createCabinet:'创建机柜',
|
||||
},
|
||||
model: {
|
||||
model: '资产型号',
|
||||
vendor: '厂商',
|
||||
@@ -909,6 +810,8 @@ const cn = {
|
||||
curUrl: '网站URL',
|
||||
timezone: '时区',
|
||||
defaultCabinetUsize: '机柜默认U位',
|
||||
sessionTimeout:'Session超时',
|
||||
minute:'分',
|
||||
second: '秒',
|
||||
day: '天',
|
||||
maxSeries: 'Query max series',
|
||||
@@ -962,7 +865,7 @@ const cn = {
|
||||
filter: '用户过滤器',
|
||||
filterTip: '可能的选项是(cn或uid或sAMAccountName=%(user)s)',
|
||||
map: '属性映射',
|
||||
mapTip: '属性映射代表怎样将NEZHA用户属性映射到jumpserver用户上;username,email是jumpserver的属性',
|
||||
mapTip: '属性映射代表怎样将LDAP用户属性映射到NEZHA用户上;username,email是NEZHA的属性',
|
||||
active: '启用LDAP认证',
|
||||
timeout: '超时时间'
|
||||
},
|
||||
|
||||
@@ -551,111 +551,9 @@ const en = {
|
||||
assetType: 'Asset type', // '资产类型'
|
||||
principal: 'Administrator', // '负责人'
|
||||
tel: 'Telephone', // '电话'
|
||||
left: {
|
||||
dataCenter: 'Data center',
|
||||
vendor: 'Vendor',
|
||||
ping: 'Ping'
|
||||
},
|
||||
featureTitle: 'Attribute',
|
||||
endpointUpNum: 'It\'s a normal number',
|
||||
endpointNum: 'Represents the total quantity',
|
||||
editAssetTab: {
|
||||
title: 'New asset', // '新增资产'
|
||||
sn: 'SN', // SN
|
||||
host: 'Host', // 'Host'
|
||||
state: 'State', // '状态'
|
||||
modelId: 'Module', // '组件'
|
||||
alert: 'Alert information', // '告警信息'
|
||||
assetInfo: 'Asset information', // '资产信息'
|
||||
assetType: 'Asset type', // '资产类型'
|
||||
vendor: 'Vendor', // '厂商/型号'
|
||||
vendorTab: {
|
||||
vendor: 'Vendor/Model', // '厂商/型号'
|
||||
vendorName: 'New vendor', // '新厂商'
|
||||
existVendor: 'Existed vendor', // '已有厂商'
|
||||
modelName: 'New model', // '新型号'
|
||||
existModel: 'Existed model'// '已有型号'
|
||||
},
|
||||
purchaseDate: 'Purchase date', // '购买日期'
|
||||
dataSelectTip: 'Please select date', // '请选择日期'
|
||||
dc: 'Data center',
|
||||
dcName: 'Data center name', // 'DC名称'
|
||||
AddIdcTab: {
|
||||
title: 'New Data center', // '新增DC'
|
||||
dcName: 'Data center name', // 'DC名称'
|
||||
location: 'Location', // '地区'
|
||||
principal: 'Administrator', // '负责人'
|
||||
tel: 'Telephone'// '电话'
|
||||
},
|
||||
editIdcTab: {
|
||||
title: 'Edit Data center', // '编辑DC'
|
||||
dcName: 'Data center name', // 'DC名称'
|
||||
location: 'Location', // '地区'
|
||||
principal: 'Administrator', // '负责人'
|
||||
tel: 'Telephone'// '电话'
|
||||
},
|
||||
location: 'Location', // '地区'
|
||||
principal: 'Administrator', // '负责人'
|
||||
tel: 'Telephone', // '电话'
|
||||
cabinet: 'Cabinet', // '机柜'
|
||||
AddCabinetTab: {
|
||||
title: 'New cabinet', // '新增机柜'
|
||||
name: 'Name', // '名称'
|
||||
uSize: 'U size', // 'U位'
|
||||
remark: 'Description', // '描述'
|
||||
DC: 'Data center'// DC
|
||||
},
|
||||
editCabinetTab: {
|
||||
title: 'Edit cabinet', // '编辑机柜'
|
||||
name: 'Name', // '名称'
|
||||
uSize: 'U size', // 'U位'
|
||||
remark: 'Description', // '描述'
|
||||
DC: 'Data center'// DC
|
||||
},
|
||||
uSize: 'U size', // 'U位'
|
||||
remark: 'Description', // '描述'
|
||||
cli: 'CLI account', // 'CLI账号'
|
||||
loginType: 'Login type', // '登录类型'
|
||||
password: 'Password', // '密码'
|
||||
ssh: 'SSH-Key', // 'SSH-Key'
|
||||
account: 'Username', // '用户名'
|
||||
port: 'Port', // '端口'
|
||||
upload: 'Upload', // '上传'
|
||||
clickToUpload: 'Upload'// '上传'
|
||||
},
|
||||
tableTitle: {
|
||||
id: 'ID', // ID
|
||||
assetType: 'Asset type', // '资产类型'
|
||||
device: 'SN', // SN
|
||||
host: 'Host', // 'Host'
|
||||
assetState: 'State', // '状态'
|
||||
assetPing: 'Ping',
|
||||
lastReply: 'Ping last reply',
|
||||
modules: 'Endpoint', // '组件'
|
||||
alerts: 'Alerts', // '告警信息'
|
||||
dataCenter: 'Data center', // DC
|
||||
cabinet: 'Cabinet', // '机柜'
|
||||
model: 'Model', // '型号'
|
||||
vendor: 'Vendor', // '厂商'
|
||||
procurementDate: 'Purchase date', // '购买日期'
|
||||
principal: 'Administrator', // '负责人'
|
||||
principalTel: 'Telephone', // '电话'
|
||||
option: 'Operation', // "操作"
|
||||
sn: 'SN',
|
||||
name: 'Name',
|
||||
manageIp: 'manageIp',
|
||||
brand: 'Brand',
|
||||
dc: 'DataCenter',
|
||||
type: 'Types',
|
||||
state: 'State',
|
||||
endpoint: 'Endpoint'
|
||||
},
|
||||
tagTableTitle: {
|
||||
projectName: 'Project name', // '系统名称'
|
||||
moduleName: 'Module name', // '组件名称'
|
||||
endPoint: 'End point', // 'EndPoint'
|
||||
alert: 'Alert'// '告警'
|
||||
},
|
||||
active: 'Alive', // "存活",
|
||||
total: 'Total', // "总数",
|
||||
down: 'Down',
|
||||
@@ -671,7 +569,8 @@ const en = {
|
||||
privateKey: 'Private key',
|
||||
usernamePrompt: 'Username prompt',
|
||||
passwordPrompt: 'Password prompt',
|
||||
snmpCredential: 'SNMP credential'
|
||||
snmpCredential: 'SNMP credential',
|
||||
authProtocol: 'Auth protocol'
|
||||
},
|
||||
config: {
|
||||
config: 'Settings', // "设置"
|
||||
@@ -782,6 +681,10 @@ const en = {
|
||||
latitude: 'Latitude',
|
||||
lnglat: 'Coordinate'
|
||||
},
|
||||
cabinet:{
|
||||
editCabinet:'Edit Cabinet',
|
||||
createCabinet:'Create Cabinet',
|
||||
},
|
||||
model: {
|
||||
model: 'Asset model',
|
||||
vendor: 'Vendor',
|
||||
@@ -847,7 +750,12 @@ const en = {
|
||||
play: 'Play',
|
||||
replay: 'Replay',
|
||||
skipTip: 'Skip no operation time'
|
||||
}
|
||||
},
|
||||
loginHost:'Login host',
|
||||
loginUser:'Login user',
|
||||
sourceIp:'Source IP',
|
||||
sourceUser:'Source user',
|
||||
SessionId:'Session ID',
|
||||
},
|
||||
operationlog: {
|
||||
operationlog: 'Operation log',
|
||||
@@ -912,7 +820,7 @@ const en = {
|
||||
basic: 'Basic',
|
||||
alertApi: 'Alert API',
|
||||
assetPingSwith: 'Asset ping',
|
||||
assetPingInterval: 'Interval',
|
||||
assetPingInterval: 'Ping interval',
|
||||
exporterTarget: 'Exporter path',
|
||||
scrapeInterval: 'Scrape interval',
|
||||
storageRetention: 'Local retention',
|
||||
@@ -922,6 +830,8 @@ const en = {
|
||||
defaultCabinetUsize: 'Cabinet U size',
|
||||
second: 'second',
|
||||
day: 'day',
|
||||
sessionTimeout:'Session timeout',
|
||||
minute:'minute',
|
||||
maxSeries: 'Query max series',
|
||||
unsaved: 'Unsaved prompt',
|
||||
mapConfig: 'Map center',
|
||||
@@ -1094,7 +1004,7 @@ const en = {
|
||||
exprTempImport: 'expression template import',
|
||||
exprTempExport: 'expression template export',
|
||||
exprTempImportCancel: 'expression template import rollback',
|
||||
copy: 'Copy',
|
||||
copy: 'Duplicate',
|
||||
name: 'Name',
|
||||
gname: 'Group',
|
||||
expression: 'Expression',
|
||||
|
||||
@@ -1,800 +0,0 @@
|
||||
<template>
|
||||
<div class="content">
|
||||
<div class="content-left left-slot" :class="{'left-slot-shrink': isShrink}">
|
||||
<div class="sidebar-title too-long-split">{{$t(parentMenu.i18n)}}</div>
|
||||
<div class="sidebar-info" style="height: 90%; overflow: auto;">
|
||||
<template v-if="parentMenu == '/project'">
|
||||
<el-collapse v-model="projectChoose" accordion class="left-menu-bg" ref="projectLeft" style="padding-top: 0;">
|
||||
<el-collapse-item v-for="(item) in projectList" :key="item.id" :name="item.id + ''">
|
||||
<template slot="title">
|
||||
<div :class="{'sidebar-info-item-active': item.id == currentProject.id}" :id="'project-module-'+item.id" @click="detailProject(item)" class="sidebar-info-item-project sidebar-info-item">
|
||||
<div class="sidebar-info-item-txt">
|
||||
<el-popover :content="item.name" placement="top-start" popper-class="transparent-pop" trigger="hover" v-if="item.name.length > 14">
|
||||
<span class="" slot="reference">
|
||||
{{item.name}}
|
||||
</span>
|
||||
</el-popover>
|
||||
<span v-else>{{item.name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div class="sidebar-info sub-sidebar-info" >
|
||||
<div :title="$t('overall.createModule')" @click="addModule(item)" class="sidebar-info-item sidebar-info-item-project-add" v-if="getProjectModule(item.id).length == 0">
|
||||
<span><i class="nz-icon nz-icon-create-square"></i> {{$t("overall.addProject")}}</span>
|
||||
</div>
|
||||
<template v-else>
|
||||
<div v-for="(module, index) in getProjectModule(item.id)" :id="'project-module-'+module.id" :key="index" :class="{'sidebar-info-item-active': module.id == currentModule.id}" class="sidebar-info-sub-item" @click="changeModule(item, module)">
|
||||
<div :id="`module-${module.id}`" class="item-tip">
|
||||
<div :class="itemTip(module.id, module.name, ready)" class="item-tip-hide item-tip-key el-popover">{{module.name}}</div>
|
||||
<span class="too-long-split" style="width: 120px;">{{module.name}}</span>
|
||||
<div :id="'project-module-edit-'+module.id" @click.stop="editModule(module)" class="hid-div side-bar-menu-edit sub-side-bar-menu-edit" v-has="'project_module_toEdit'" v-show="module.buildIn != 1" ><i class="nz-icon nz-icon-edit"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</template>
|
||||
<template v-else-if="parentMenu == '/asset'">
|
||||
<el-collapse class="left-menu-bg" v-model="activeType">
|
||||
<el-collapse-item :title="$t('asset.left.dataCenter')" name="dataCenter">
|
||||
<el-checkbox-group size="small" v-model="dcCheckList">
|
||||
<el-checkbox :class="{'sidebar-info-item-active': indOf(dcCheckList, item.id)}" :key="key"
|
||||
:label=item.id class="sidebar-info-item sidebar-info-item-asset" v-for="(item,key) in dcData">
|
||||
<div class="sidebar-info-item-txt">
|
||||
<el-popover :content="item.name" placement="top-start" trigger="hover" v-if="item.name.length > 14" >
|
||||
<span slot="reference">{{item.name}}</span>
|
||||
</el-popover>
|
||||
<span v-else>{{item.name}}</span>
|
||||
</div>
|
||||
<el-badge :value="item.total" class="mark" type="primary"/>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item :title="$t('asset.assetType')" name="assetType">
|
||||
<el-checkbox-group @change="changeAssetTypeCheckBox" size="small" v-model="assetTypeCheckList">
|
||||
<el-checkbox :class="{'sidebar-info-item-active': indOf(assetTypeCheckList, item.id)}" :key="key" :label=item.id class="sidebar-info-item" v-for="(item, key) in assetTypeData">
|
||||
<div class="sidebar-info-item-txt">
|
||||
<el-popover :content="item.name" placement="top-start" trigger="hover" v-if="item.name.length > 14" >
|
||||
<span slot="reference">{{item.name}}</span>
|
||||
</el-popover>
|
||||
<span v-else>{{item.name}}</span>
|
||||
</div>
|
||||
<el-badge :value="item.total" class="mark" type="primary"/>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item :title="$t('asset.left.vendor')" name="vendor">
|
||||
<el-checkbox-group @change="changeVendorCheckBox" size="small" v-model="vendorCheckList">
|
||||
<el-checkbox :class="{'sidebar-info-item-active': indOf(vendorCheckList, item.id)}" :key="key" :label=item.id class="sidebar-info-item" v-for="(item, key) in vendorData">
|
||||
<div class="sidebar-info-item-txt">
|
||||
<el-popover :content="item.name" placement="top-start" trigger="hover" v-if="item.name.length > 14" >
|
||||
<span slot="reference">{{item.name}}</span>
|
||||
</el-popover>
|
||||
<span v-else>{{item.name}}</span>
|
||||
</div>
|
||||
<el-badge :value="item.total" class="mark" type="primary"/>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item :title="$t('asset.left.ping')" name="ping" v-if="assetPingSwitch">
|
||||
<el-checkbox-group @change="changePingCheckBox" size="small" v-model="pingCheckList">
|
||||
<el-checkbox :class="{'sidebar-info-item-active': indOf(pingCheckList, item.key)}" :key="index" :label="item.value" class="sidebar-info-item" v-for="(item, index) in pingData">
|
||||
<div class="sidebar-info-item-txt">
|
||||
<span>{{item.label}}</span>
|
||||
</div>
|
||||
<el-badge :value="item.total" class="mark" type="primary"/>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
<!--tag 过滤-->
|
||||
<div class="sidebar-title too-long-split orange-font">
|
||||
Tag
|
||||
</div>
|
||||
<el-collapse class="left-menu-bg" v-model="activeTag">
|
||||
<el-collapse-item :key="item.key" :name="item.key" :title="item.key" v-for="item in tagData">
|
||||
<el-checkbox-group size="small" v-model="tagCheckList" >
|
||||
<el-checkbox :key="item.key+'-'+tag.value" :label="item.key+'-'+tag.value" @change="changeTagCheckBox(item,tag.value)" class="sidebar-info-item" v-for="tag in item.values">
|
||||
<div class="sidebar-info-item-txt">
|
||||
<el-popover :content="tag.value" placement="top-start" trigger="hover" v-if="tag.value.length > 14" >
|
||||
<span slot="reference">{{tag.value}}</span>
|
||||
</el-popover>
|
||||
<span v-else>{{tag.value}}</span>
|
||||
</div>
|
||||
<el-badge :max="99" :value="tag.total" class="mark" type="primary"/>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
|
||||
</template>
|
||||
<template v-else>
|
||||
<div v-for="(menu, index) in parentMenu.children" :key="index" :class="{'sidebar-info-item-active': menu.route == route}" class="sidebar-info-item" @click="jumpTo(menu.route)">
|
||||
{{$t(menu.i18n)}}
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div @click="toggleStat" class="bottom-icon">
|
||||
<div class="bottom-divider"></div>
|
||||
<div style="display: inline-block;float: right;margin-right:15px;"><i style="font-size: 24px;" :class="{'nz-icon nz-icon-push-pin-line': isShrink, 'nz-icon nz-icon-push-pin-fill': !isShrink}" :style="{color : !isShrink ? '#EE9D3F' : ''}"></i></div>
|
||||
</div>
|
||||
</div><div class="content-right right-slot" :class="{'right-slot-open': isShrink}">
|
||||
<router-view v-if="isRouterAlive"/>
|
||||
</div>
|
||||
|
||||
<transition name="right-box">
|
||||
<module-box v-if="rightBox.module.show" :current-project="currentProject" :module="module" @close="closeModuleRightBox" ref="moduleBox"></module-box>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bus from '../../libs/bus'
|
||||
|
||||
export default {
|
||||
name: 'leftMenu',
|
||||
props: {
|
||||
resizeFunc: Function
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
isShrink: localStorage.getItem('nz-left-menu-shrink') == 'true',
|
||||
parentMenu: {},
|
||||
// active: "/overview",
|
||||
|
||||
// project相关
|
||||
projectList: [],
|
||||
moduleList: [],
|
||||
showProjectPanel: true,
|
||||
currentProjectTitle: '',
|
||||
currentProject: { id: '', name: '', remark: '' }, // endpoint弹框、module列表用来回显project
|
||||
module: {}, // 编辑的module
|
||||
blankModule: { name: '', project: {}, port: 9100, path: '', param: '', labels: '', type: 'http', paramObj: [], labelModule: [], snmpParam: '', walk: [], version: 2, max_repetitions: 25, retries: 3, timeout: 10, community: 'public', username: '', security_level: 'noAuthNoPriv', password: '', auth_protocol: 'MD5', priv_protocol: 'DES', priv_password: '', context_name: '' }, // 空白module
|
||||
currentModule: { id: '', type: '', name: '', project: {}, port: '', path: '', param: '', paramObj: [], snmpParam: '', labels: '', labelModule: [] }, // 用来回显的module
|
||||
ready: false,
|
||||
rightBox: { module: { show: false } },
|
||||
|
||||
// asset相关
|
||||
activeType: 'dataCenter',
|
||||
activeTag: '',
|
||||
dcData: [],
|
||||
dcCheckList: [],
|
||||
assetTypeData: [],
|
||||
assetTypeCheckList: [],
|
||||
vendorData: [],
|
||||
vendorCheckList: [],
|
||||
pingData: [],
|
||||
pingCheckList: [],
|
||||
tagData: [],
|
||||
tagCheckList: [],
|
||||
tagCheckMap: {},
|
||||
lastCheckSize: 0,
|
||||
assetPingSwitch: true,
|
||||
isRouterAlive: true,
|
||||
projectChoose: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
route () {
|
||||
return this.$route.path
|
||||
},
|
||||
itemTip () {
|
||||
return function (id, content, ready) {
|
||||
const className = 'item-tip-show'
|
||||
this.$nextTick(() => {
|
||||
if (ready) {
|
||||
const cellDom = document.querySelector(`#module-${id}`)
|
||||
const spanDom = document.querySelector(`#module-${id}>span`)
|
||||
if (cellDom.offsetWidth - 16 <= spanDom.offsetWidth) {
|
||||
document.querySelector(`#module-${id}>.el-popover`).classList.add(className)
|
||||
} else {
|
||||
document.querySelector(`#module-${id}>.el-popover`).classList.remove(className)
|
||||
}
|
||||
}
|
||||
})
|
||||
return ''
|
||||
}
|
||||
},
|
||||
checkedTagCount () {
|
||||
return this.tagCheckList.length
|
||||
},
|
||||
currentProjectChange () {
|
||||
return this.$store.state.currentProject
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
route: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler (n) {
|
||||
this.parentMenu = this.getParentMenu(n)
|
||||
}
|
||||
},
|
||||
currentProjectChange: {
|
||||
immediate: true,
|
||||
handler (n, o) {
|
||||
if (n && n.id != this.currentProject.id) {
|
||||
this.currentProject = n
|
||||
if (this.currentProject && this.currentProject.id && this.showProjectPanel) {
|
||||
this.detailProject(this.currentProject)
|
||||
// this.projectChoose=[];
|
||||
}
|
||||
this.changeCurrentModule('')
|
||||
}
|
||||
}
|
||||
},
|
||||
currentProject: {
|
||||
immediate: true,
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
bus.$emit('current-project-change', n) // 告知project.vue
|
||||
}
|
||||
},
|
||||
dcCheckList: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler (n) {
|
||||
bus.$emit('asset-filter-change', 'idcIds', n.join(','))
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.initEvent() // 注册监听事件
|
||||
},
|
||||
mounted () {
|
||||
Promise.all([this.getProjectList(), this.getModuleList(), this.getLeftMenuList()]).then(response => {
|
||||
setTimeout(() => {
|
||||
this.ready = true
|
||||
}, 300)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
toggleStat () {
|
||||
this.isShrink = !this.isShrink
|
||||
localStorage.setItem('nz-left-menu-shrink', this.isShrink)
|
||||
if (this.resizeFunc) {
|
||||
this.resizeFunc()
|
||||
}
|
||||
},
|
||||
// 根据route获取父菜单,
|
||||
getParentMenu (route) {
|
||||
let parentMenu = ''
|
||||
let end = false
|
||||
if (route != '/project') {
|
||||
this.changeCurrentModule('')
|
||||
}
|
||||
if (route != '/project' && route != '/asset') {
|
||||
this.$store.getters.menuList.forEach(menu => {
|
||||
if (!end) {
|
||||
if (menu.children) {
|
||||
menu.children.forEach(subMenu => {
|
||||
if (subMenu.route == route) {
|
||||
parentMenu = menu
|
||||
end = true
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
parentMenu = route
|
||||
}
|
||||
return parentMenu
|
||||
},
|
||||
getProjectList () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('project', { pageSize: -1 }).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.projectList = response.data.list
|
||||
}
|
||||
resolve(this.projectList)
|
||||
})
|
||||
})
|
||||
},
|
||||
getProjectModule (projectId) {
|
||||
const moduleList = JSON.parse(JSON.stringify(this.moduleList))
|
||||
return moduleList.filter((item, index) => {
|
||||
return item.project.id == projectId
|
||||
})
|
||||
},
|
||||
getModuleList () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('module', { pageSize: -1, pageNo: 1 }).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.moduleList = response.data.list
|
||||
for (let i = 0; i < this.moduleList.length; i++) {
|
||||
try {
|
||||
const param = this.moduleList[i].param || '{}'
|
||||
const tempObj = JSON.parse(param)
|
||||
const labels = this.moduleList[i].labels || '{}'
|
||||
const tempObj1 = JSON.parse(labels)
|
||||
this.$set(this.moduleList[i], 'paramObj', [])
|
||||
this.$set(this.moduleList[i], 'labelModule', [])
|
||||
for (const k in tempObj) {
|
||||
this.moduleList[i].paramObj.push({ key: k, value: tempObj[k] })
|
||||
}
|
||||
for (const k in tempObj1) {
|
||||
this.moduleList[i].labelModule.push({ key: k, value: tempObj1[k] })
|
||||
}
|
||||
} catch (err) {}
|
||||
}
|
||||
}
|
||||
resolve(this.moduleList)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 左侧module列表选中切换,与project.vue同步
|
||||
changeModule (project, module) {
|
||||
this.showProjectPanel = false
|
||||
this.changeCurrentProject(project)
|
||||
this.changeCurrentModule(module)
|
||||
bus.$emit('project-page-type', 'endpoint') // 告知project.vue
|
||||
},
|
||||
addModule (obj) {
|
||||
this.module = this.newModule(obj)
|
||||
this.rightBox.module.show = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.moduleBox.initWalk()
|
||||
})
|
||||
},
|
||||
newModule (obj) {
|
||||
const module = JSON.parse(JSON.stringify(this.blankModule))
|
||||
module.project = this.$store.state.currentProject
|
||||
if (obj) {
|
||||
module.project = obj
|
||||
}
|
||||
return module
|
||||
},
|
||||
// 弹出module编辑页
|
||||
editModule (module) {
|
||||
this.module = JSON.parse(JSON.stringify(module))
|
||||
if (!this.module.paramObj) {
|
||||
this.$set(this.module, 'paramObj', [])
|
||||
}
|
||||
if (!this.module.labelModule) {
|
||||
this.$set(this.module, 'labelModule', [])
|
||||
}
|
||||
if (this.module.snmpParam) {
|
||||
this.initSnmpParam(this.module)
|
||||
}
|
||||
this.rightBox.module.show = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.moduleBox.initWalk()
|
||||
})
|
||||
},
|
||||
closeModuleRightBox (refresh) {
|
||||
this.rightBox.module.show = false
|
||||
if (refresh) {
|
||||
this.getModuleList()
|
||||
}
|
||||
},
|
||||
initSnmpParam (module) {
|
||||
this.$set(module, 'walk', [])
|
||||
this.$set(module, 'version', '')
|
||||
this.$set(module, 'max_repetitions', '')
|
||||
this.$set(module, 'retries', '')
|
||||
this.$set(module, 'timeout', '')
|
||||
this.$set(module, 'community', '')
|
||||
this.$set(module, 'username', '')
|
||||
this.$set(module, 'security_level', '')
|
||||
this.$set(module, 'password', '')
|
||||
this.$set(module, 'auth_protocol', '')
|
||||
this.$set(module, 'priv_protocol', '')
|
||||
this.$set(module, 'priv_password', '')
|
||||
this.$set(module, 'context_name', '')
|
||||
},
|
||||
changeCurrentProject (project) {
|
||||
// localStorage.setItem("nz-current-project", project.id);
|
||||
this.$store.commit('currentProjectChange', project)
|
||||
this.currentProject = project
|
||||
},
|
||||
changeCurrentModule (module) {
|
||||
bus.$emit('current-module-change', module) // 告知project.vue
|
||||
this.currentModule = module
|
||||
},
|
||||
// 与header.vue同步
|
||||
detailProject (project) {
|
||||
this.showProjectPanel = true
|
||||
this.changeCurrentProject(project)
|
||||
bus.$emit('project-page-type', 'project') // 告知project.vue
|
||||
this.changeCurrentModule({ id: '' })
|
||||
},
|
||||
|
||||
initEvent () {
|
||||
/* bus.$on("parent-menu-change", parentMenu => {
|
||||
this.parentMenu = parentMenu;
|
||||
});
|
||||
bus.$on("menu-change", menu => {
|
||||
this.active = menu;
|
||||
}); */
|
||||
bus.$on('header-dc-change', dcId => {
|
||||
this.dcCheckList = [dcId]
|
||||
// bus.$emit("asset-filter-change", "idcIds", dcId);
|
||||
})
|
||||
bus.$on('clear-asset-filter', dcId => {
|
||||
this.dcCheckList = []
|
||||
this.assetTypeCheckList = []
|
||||
this.vendorCheckList = []
|
||||
this.pingCheckList = []
|
||||
})
|
||||
bus.$on('project-list-change', () => {
|
||||
this.getProjectList()
|
||||
})
|
||||
bus.$on('module-list-change', menu => {
|
||||
this.getModuleList()
|
||||
})
|
||||
bus.$on('asset-list-change', () => {
|
||||
const dcData = JSON.parse(JSON.stringify(this.dcData))
|
||||
const assetTypeData = JSON.parse(JSON.stringify(this.assetTypeData))
|
||||
const vendorData = JSON.parse(JSON.stringify(this.vendorData))
|
||||
const pingData = JSON.parse(JSON.stringify(this.pingData))
|
||||
const tagData = JSON.parse(JSON.stringify(this.tagData))
|
||||
|
||||
this.getLeftMenuList().then(() => {
|
||||
const result = []
|
||||
const dcDiff = this.compareAssetLeftMenu(dcData, this.dcData, 'idcIds')
|
||||
if (dcDiff.length > 0) {
|
||||
const temp = this.dcCheckList.filter(item => {
|
||||
return !dcDiff.find((t, i) => { return item == t.id })
|
||||
})
|
||||
result.push({ key: 'idcIds', value: temp.join(',') })
|
||||
|
||||
this.dcCheckList = temp
|
||||
}
|
||||
|
||||
const typeDiff = this.compareAssetLeftMenu(assetTypeData, this.assetTypeData, 'typeIds')
|
||||
if (typeDiff.length > 0) {
|
||||
this.assetTypeCheckList = this.assetTypeCheckList.filter(item => {
|
||||
return !typeDiff.find(t => { return item == t.id })
|
||||
})
|
||||
result.push({ key: 'typeIds', value: this.assetTypeCheckList.join(',') })
|
||||
}
|
||||
|
||||
const vendorDiff = this.compareAssetLeftMenu(vendorData, this.vendorData, 'vendorIds')
|
||||
if (vendorDiff.length > 0) {
|
||||
this.vendorCheckList = this.vendorCheckList.filter(item => {
|
||||
return !vendorDiff.find(t => { return item == t.id })
|
||||
})
|
||||
result.push({ key: 'vendorIds', value: this.vendorCheckList.join(',') })
|
||||
}
|
||||
|
||||
const pingDiff = this.compareAssetLeftMenu(pingData, this.pingData, 'pingStates')
|
||||
if (pingDiff.length > 0) {
|
||||
this.pingCheckList = this.pingCheckList.filter(item => {
|
||||
return !pingDiff.find(t => { return item == t.value })
|
||||
})
|
||||
result.push({ key: 'pingStates', value: this.pingCheckList.join(',') })
|
||||
}
|
||||
|
||||
const tagDiff = this.compareAssetLeftMenu(tagData, this.tagData, 'tags')
|
||||
if (tagDiff.length > 0) {
|
||||
const $self = this
|
||||
tagDiff.forEach(item => {
|
||||
const key = item.key
|
||||
const values = item.values
|
||||
|
||||
let checkedVals = $self.tagCheckMap[key]
|
||||
if (checkedVals && checkedVals.length > 0) {
|
||||
$self.tagCheckList = $self.tagCheckList.filter(t => { return !values.find(r => { return key + '-' + r.value == t }) })
|
||||
$self.lastCheckSize = $self.lastCheckSize - values.length
|
||||
checkedVals = checkedVals.filter(t => { return !values.find(r => { return r.value == t }) })
|
||||
if (checkedVals.length > 0) {
|
||||
$self.tagCheckMap[key] = checkedVals
|
||||
} else {
|
||||
delete $self.tagCheckMap[key]
|
||||
}
|
||||
}
|
||||
})
|
||||
if (Object.keys($self.tagCheckMap).length > 0) {
|
||||
result.push({ key: 'tags', value: JSON.stringify($self.tagCheckMap) })
|
||||
} else {
|
||||
result.push({ key: 'tags', value: '' })
|
||||
}
|
||||
}
|
||||
bus.$emit('asset-filter-change', 'multiParam', result)
|
||||
})
|
||||
})
|
||||
bus.$on('asset-property-change', () => {
|
||||
this.getLeftMenuList()
|
||||
})
|
||||
|
||||
bus.$on('asset-ping-switch-change', (isOpen) => {
|
||||
this.assetPingSwitch = isOpen
|
||||
})
|
||||
},
|
||||
// 获取asset左侧菜单数据
|
||||
getLeftMenuList () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('asset/filter').then(response => {
|
||||
if (response.code === 200) {
|
||||
// dc
|
||||
this.dcData = response.data.dc
|
||||
// AssetType
|
||||
this.assetTypeData = response.data.assetType
|
||||
// vendor
|
||||
this.vendorData = response.data.vendor
|
||||
// ping
|
||||
this.pingData = [{ label: 'up', value: 1, total: 0 }, { label: 'down', value: 0, total: 0 }]
|
||||
|
||||
this.pingData.map(item => {
|
||||
if (response.data.ping) {
|
||||
const data = response.data.ping.find(t => t.name == item.label)
|
||||
if (data) {
|
||||
item.total = data.total
|
||||
item.value = data.status
|
||||
}
|
||||
}
|
||||
return item
|
||||
})
|
||||
|
||||
this.tagData = response.data.tag
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
},
|
||||
compareAssetLeftMenu: function (src, dist, key) {
|
||||
const result = src.filter(item => {
|
||||
if (key == 'pingStates') {
|
||||
return !dist.find(t => { return t.name == item.name })
|
||||
}
|
||||
if (key == 'tags') {
|
||||
const tag = dist.find(t => {
|
||||
return t.key == item.key
|
||||
})
|
||||
if (tag) {
|
||||
const srcValues = item.values
|
||||
const distValues = tag.values
|
||||
|
||||
const vals = srcValues.filter(t => {
|
||||
return distValues.find(r => {
|
||||
return r.value == t.value
|
||||
})
|
||||
})
|
||||
|
||||
return !vals || vals.length < 1
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return !dist.find(t => { return item.id == t.id })
|
||||
})
|
||||
|
||||
return result
|
||||
},
|
||||
// asset左侧菜单4个事件
|
||||
changeCheckBox () {
|
||||
this.assetClick = true
|
||||
},
|
||||
changeAssetTypeCheckBox () {
|
||||
if (this.assetTypeCheckList && this.assetTypeCheckList.length > 0) {
|
||||
const assetTypeIds = this.assetTypeCheckList.join(',')
|
||||
bus.$emit('asset-filter-change', 'typeIds', assetTypeIds)
|
||||
} else {
|
||||
bus.$emit('asset-filter-change', 'typeIds', '')
|
||||
}
|
||||
},
|
||||
changeVendorCheckBox () {
|
||||
if (this.vendorCheckList && this.vendorCheckList.length > 0) {
|
||||
const vendorIds = this.vendorCheckList.join(',')
|
||||
bus.$emit('asset-filter-change', 'vendorIds', vendorIds)
|
||||
} else {
|
||||
bus.$emit('asset-filter-change', 'vendorIds', '')
|
||||
}
|
||||
},
|
||||
changePingCheckBox () {
|
||||
if (this.pingCheckList && this.pingCheckList.length > 0) {
|
||||
const pingStates = this.pingCheckList.join(',')
|
||||
bus.$emit('asset-filter-change', 'pingStates', pingStates)
|
||||
} else {
|
||||
bus.$emit('asset-filter-change', 'pingStates', '')
|
||||
}
|
||||
},
|
||||
changeTagCheckBox (tag, value) {
|
||||
let checked = this.tagCheckMap[tag.key]
|
||||
if (!checked) {
|
||||
checked = []
|
||||
}
|
||||
if (this.lastCheckSize < this.tagCheckList.length) {
|
||||
checked.push(value)
|
||||
} else {
|
||||
const index = checked.findIndex(item => {
|
||||
return item == value
|
||||
})
|
||||
checked.splice(index, 1)
|
||||
}
|
||||
|
||||
if (checked.length > 0) {
|
||||
this.tagCheckMap[tag.key] = checked
|
||||
} else {
|
||||
if (this.tagCheckMap[tag.key]) {
|
||||
delete this.tagCheckMap[tag.key]
|
||||
}
|
||||
}
|
||||
this.lastCheckSize = this.tagCheckList.length
|
||||
if (Object.keys(this.tagCheckMap).length > 0) {
|
||||
bus.$emit('asset-filter-change', 'tags', JSON.stringify(this.tagCheckMap))
|
||||
} else {
|
||||
bus.$emit('asset-filter-change', 'tags', '')
|
||||
}
|
||||
},
|
||||
indOf (a, b) {
|
||||
const c = []
|
||||
for (let i = 0; i < a.length; i++) {
|
||||
c.push(a[i])
|
||||
}
|
||||
if (c.indexOf(b) > -1) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
jumpTo (route) {
|
||||
if (route == this.route) {
|
||||
this.reload()
|
||||
}
|
||||
this.$router.push({
|
||||
path: route,
|
||||
query: {
|
||||
t: +new Date()
|
||||
}
|
||||
})
|
||||
},
|
||||
reload () {
|
||||
this.isRouterAlive = false
|
||||
this.$nextTick(() => (this.isRouterAlive = true))
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
/* bus.$off("parent-menu-change");
|
||||
bus.$off("menu-change"); */
|
||||
bus.$off('header-dc-change')
|
||||
bus.$off('clear-asset-filter')
|
||||
bus.$off('project-list-change')
|
||||
bus.$off('module-list-change')
|
||||
bus.$off('asset-list-change')
|
||||
|
||||
bus.$off('asset-property-change')
|
||||
|
||||
bus.$off('asset-ping-switch-change')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content{
|
||||
position: relative;
|
||||
height: calc(100% - 54px);
|
||||
}
|
||||
.slot-content{
|
||||
height: 100%;
|
||||
}
|
||||
.content .left-slot{
|
||||
position: relative;
|
||||
background-color: $left-menu-bgcolor;
|
||||
transition: transform 200ms, opacity 200ms;
|
||||
transform: scaleX(1);
|
||||
transform-origin: left;
|
||||
opacity: 1;
|
||||
/*border-bottom: 1px solid #eeeeee;*/
|
||||
/*transition: all 100ms;*/
|
||||
}
|
||||
.content .right-slot{
|
||||
width: calc(100% - 200px);
|
||||
}
|
||||
.content .right-slot-open{
|
||||
width: calc(100% - 23px);
|
||||
margin-left: -177px;
|
||||
}
|
||||
.content .left-slot-shrink{
|
||||
transform: scaleX(0.12);
|
||||
opacity: 0;
|
||||
.bottom-icon .bottom-divider{
|
||||
width: 0px;
|
||||
}
|
||||
}
|
||||
.slot-content {
|
||||
transition: opacity 200ms;
|
||||
}
|
||||
|
||||
.item-tip {
|
||||
position: relative;
|
||||
}
|
||||
.item-tip-hide {
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: 30px;
|
||||
min-width: 50px;
|
||||
white-space: normal;
|
||||
}
|
||||
.sidebar-info-sub-item:first-of-type .item-tip-hide {
|
||||
bottom: -50px;
|
||||
}
|
||||
.item-tip:hover>.item-tip-show {
|
||||
display: block;
|
||||
}
|
||||
.hid-div{
|
||||
visibility: hidden;
|
||||
}
|
||||
.sidebar-info-sub-item:hover .hid-div{
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.sub-sidebar-info{
|
||||
padding-top: 10px !important;
|
||||
padding-left: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.sub-side-bar-menu-edit{
|
||||
margin-right: 13px;
|
||||
}
|
||||
|
||||
.sidebar-info-item-project.sidebar-info-item{
|
||||
margin:0 !important;
|
||||
}
|
||||
.sidebar-info-item-asset .sidebar-info-item-txt{
|
||||
vertical-align: text-top;
|
||||
}
|
||||
/deep/ .el-badge__content{
|
||||
min-width: 15px;
|
||||
}
|
||||
.left-slot .bottom-icon{
|
||||
position:absolute;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
right: 0;
|
||||
bottom: 30px;
|
||||
}
|
||||
.left-slot .bottom-icon i{
|
||||
visibility: hidden;
|
||||
}
|
||||
.left-slot:hover{
|
||||
.bottom-icon i{
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
.left-slot .bottom-icon i:hover{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.bottom-icon .bottom-divider{
|
||||
display: inline-block;
|
||||
height: 1px;
|
||||
width: 175px;
|
||||
border-top: 1px solid lightgrey;
|
||||
vertical-align: middle;
|
||||
visibility: hidden;
|
||||
}
|
||||
.content .left-slot-shrink:hover{
|
||||
transform: scaleX(1);
|
||||
z-index: 100;
|
||||
opacity: 1;
|
||||
.bottom-icon{
|
||||
z-index: 101;
|
||||
}
|
||||
.bottom-icon .bottom-divider{
|
||||
width: 175px;
|
||||
}
|
||||
}
|
||||
.content-left .sidebar-info-item-project-add{
|
||||
border: 1px solid rgba(0,0,0,0.15);
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
font-family: Roboto-Regular;
|
||||
font-size: 14px;
|
||||
color: #535B64;
|
||||
margin-right: 25px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
display: flex;
|
||||
padding-left: 0;
|
||||
justify-content: center;
|
||||
}
|
||||
/deep/ .el-badge__content--primary{
|
||||
background-color: #74A7FA;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
@@ -141,7 +141,7 @@ export default {
|
||||
this.searchLabel = {}
|
||||
this.pageObj.pageNo = 1
|
||||
for (const item in searchObj) {
|
||||
if (searchObj[item]) {
|
||||
if (typeof searchObj[item] !== 'undefined' && searchObj[item] !== null && searchObj[item] !== '') {
|
||||
this.$set(this.searchLabel, item, searchObj[item])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,20 +37,21 @@
|
||||
<el-form-item :label="$t('config.user.mobile')" prop="mobile">
|
||||
<el-input id="account-input-mobile" v-model.number="editUser.mobile" placeholder="" size="small" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<!--roles-->
|
||||
<el-form-item :label="$t('config.user.roles')" prop="roleIds">
|
||||
<el-select id="account-input-roleIds" v-model="editUser.roleIds" :disabled="(editUser.username==='admin') && editUser.id==1" clearable collapse-tags placeholder="" popper-class="right-box-select-dropdown prevent-clickoutside" size="small" @change="()=>{this.$forceUpdate()}">
|
||||
<template v-for="role in roles">
|
||||
<el-option :key="role.id" :label="role.i18n?$t(role.i18n):role.name" :value="role.id"></el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--enable-->
|
||||
<el-form-item :label="$t('config.user.enable')">
|
||||
<el-switch id="account-input-status" v-model="editUser.status" :disabled="isCurrentUser(editUser.username) || (editUser.username==='admin' && editUser.id==1) " active-color="#ee9d3f" active-value="1"
|
||||
inactive-value="0">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<!--roles-->
|
||||
<el-form-item :label="$t('config.user.roles')" prop="roleIds">
|
||||
<el-select id="account-input-roleIds" v-model="editUser.roleIds" :disabled="(editUser.username==='admin') && editUser.id==1" multiple clearable collapse-tags placeholder="" popper-class="right-box-select-dropdown prevent-clickoutside" size="small" @change="()=>{this.$forceUpdate()}">
|
||||
<template v-for="role in roles">
|
||||
<el-option :key="role.id" :label="role.i18n?$t(role.i18n):role.name" :value="role.id"></el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="editUser.id" :label="$t('config.user.createTime')">
|
||||
<div class="right-box-form-content-txt">{{editUser.createAt}}</div>
|
||||
</el-form-item>
|
||||
|
||||
@@ -83,19 +83,19 @@
|
||||
</template>
|
||||
<template v-if="label.action !== 1">
|
||||
<template v-if="label.type.toUpperCase() === assetConstants.labelTypeData.TEXT">
|
||||
<el-input v-model="label.value" size="small"/>
|
||||
<el-input v-model="label.value[0]" size="small"/>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.MULTITEXT">
|
||||
<div v-for="(value, i) in label.value" :key="i" class="label__multi-text">
|
||||
<el-input v-model="label.value[i]" size="small"/>
|
||||
<span><i class="nz-icon nz-icon-minus"></i></span>
|
||||
<el-input v-model="label.value[i]" size="small" style="margin-right: 15px;"/>
|
||||
<span :style="{'opacity': label.value.length > 1 ? 1 : 0.5}" @click="label.value.length > 1 ? label.value.splice(i, 1) : ''"><i class="nz-icon nz-icon-minus"></i></span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.TEXTAREA">
|
||||
<el-input v-model="label.value" :maxlength="4096" size="small" type="textarea"/>
|
||||
<el-input v-model="label.value[0]" :maxlength="4096" size="small" type="textarea"/>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.RADIO">
|
||||
<el-radio v-for="item in JSON.parse(label.param).items" :key="item.name" v-model="label.value" :label="item.name">{{item.name}}</el-radio>
|
||||
<el-radio v-for="item in JSON.parse(label.param).items" :key="item.name" v-model="label.value[0]" :label="item.name">{{item.name}}</el-radio>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.CHECKBOX">
|
||||
<el-checkbox-group v-model="label.value">
|
||||
@@ -103,15 +103,15 @@
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.SELECT">
|
||||
<el-select v-model="label.value" class="right-box__select" popper-class="right-box-select-dropdown prevent-clickoutside" size="small">
|
||||
<el-select v-model="label.value[0]" class="right-box__select" popper-class="right-box-select-dropdown prevent-clickoutside" size="small">
|
||||
<el-option v-for="item in JSON.parse(label.param).items" :key="item.name" :label="item.name" :value="item.name"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.INTEGER">
|
||||
<el-input v-model="label.value" oninput="value=value.replace(/[^\d]/g,'')" size="small"></el-input>
|
||||
<el-input v-model="label.value[0]" oninput="value=value.replace(/[^\d]/g,'')" size="small"></el-input>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.DOUBLE">
|
||||
<el-input v-model="label.value" oninput="value=value.replace(/[^0-9.]/g,'')" size="small"></el-input>
|
||||
<el-input v-model="label.value[0]" oninput="value=value.replace(/[^0-9.]/g,'')" size="small"></el-input>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.DATETIME">
|
||||
<template v-if="JSON.parse(label.param).subType === assetConstants.labelSubTypeData.time">
|
||||
@@ -120,14 +120,14 @@
|
||||
<el-time-select v-model="label.value[1]" size="small"></el-time-select>
|
||||
</div>
|
||||
<template v-else>
|
||||
<el-time-select v-model="label.value" size="small" style="width: 100%"></el-time-select>
|
||||
<el-time-select v-model="label.value[0]" size="small" style="width: 100%"></el-time-select>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="label.interval">
|
||||
<el-date-picker
|
||||
id="asset-box-input-purchase-date"
|
||||
v-model="label.value"
|
||||
v-model="label.value[0]"
|
||||
:type="JSON.parse(label.param).subType === assetConstants.labelSubTypeData.date ? 'dateRange' : 'datetimerange'"
|
||||
placeholder=""
|
||||
size="small"
|
||||
@@ -137,7 +137,7 @@
|
||||
<template v-else>
|
||||
<el-date-picker
|
||||
id="asset-box-input-parchase-date"
|
||||
v-model="label.value"
|
||||
v-model="label.value[0]"
|
||||
:type="JSON.parse(label.param).subType"
|
||||
placeholder=""
|
||||
size="small"
|
||||
@@ -148,7 +148,7 @@
|
||||
</template>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.EMAIL">
|
||||
<input v-model="label.value" size="small"></input>
|
||||
<input v-model="label.value[0]" size="small"></input>
|
||||
</template>
|
||||
</template>
|
||||
</el-form-item>
|
||||
@@ -237,9 +237,10 @@ export default {
|
||||
url: 'asset/asset',
|
||||
editData: {
|
||||
editType: 1,
|
||||
authProtocol: 0,
|
||||
authProtocol: 1,
|
||||
authType: 1,
|
||||
fields: [],
|
||||
port: 22,
|
||||
snmpCredentialId: null
|
||||
},
|
||||
labelCascProp: {
|
||||
|
||||
@@ -79,10 +79,82 @@
|
||||
<template v-slot:label>
|
||||
<div class="form__labels-label">
|
||||
<span>{{label.name}}</span>
|
||||
<div>
|
||||
<el-checkbox v-model="label.action" :false-label="0" :label="$t('overall.delete')" :true-label="1" size="small" style="padding-right: 20px;"></el-checkbox>
|
||||
<span @click="removeLabel(label)"><i class="nz-icon nz-icon-minus"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="label.action !== 1">
|
||||
<template v-if="label.type.toUpperCase() === assetConstants.labelTypeData.TEXT">
|
||||
<el-input v-model="label.value[0]" size="small"/>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.MULTITEXT">
|
||||
<div v-for="(value, i) in label.value" :key="i" class="label__multi-text">
|
||||
<el-input v-model="label.value[i]" size="small"/>
|
||||
<span><i class="nz-icon nz-icon-minus"></i></span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.TEXTAREA">
|
||||
<el-input v-model="label.value[0]" :maxlength="4096" size="small" type="textarea"/>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.RADIO">
|
||||
<el-radio v-for="item in JSON.parse(label.param).items" :key="item.name" v-model="label.value[0]" :label="item.name">{{item.name}}</el-radio>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.CHECKBOX">
|
||||
<el-checkbox-group v-model="label.value">
|
||||
<el-checkbox v-for="item in JSON.parse(label.param).items" :key="item.name" :label="item.name" :value="item.name"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.SELECT">
|
||||
<el-select v-model="label.value[0]" class="right-box__select" popper-class="right-box-select-dropdown prevent-clickoutside" size="small">
|
||||
<el-option v-for="item in JSON.parse(label.param).items" :key="item.name" :label="item.name" :value="item.name"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.INTEGER">
|
||||
<el-input v-model="label.value[0]" oninput="value=value.replace(/[^\d]/g,'')" size="small"></el-input>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.DOUBLE">
|
||||
<el-input v-model="label.value[0]" oninput="value=value.replace(/[^0-9.]/g,'')" size="small"></el-input>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.DATETIME">
|
||||
<template v-if="JSON.parse(label.param).subType === assetConstants.labelSubTypeData.time">
|
||||
<div v-if="label.interval" style="display: flex; justify-content: space-between">
|
||||
<el-time-select v-model="label.value[0]" size="small"></el-time-select>
|
||||
<el-time-select v-model="label.value[1]" size="small"></el-time-select>
|
||||
</div>
|
||||
<template v-else>
|
||||
<el-time-select v-model="label.value[0]" size="small" style="width: 100%"></el-time-select>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="label.interval">
|
||||
<el-date-picker
|
||||
id="asset-box-input-purchase-date"
|
||||
v-model="label.value[0]"
|
||||
:type="JSON.parse(label.param).subType === assetConstants.labelSubTypeData.date ? 'dateRange' : 'datetimerange'"
|
||||
placeholder=""
|
||||
size="small"
|
||||
style="width: 100%">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-date-picker
|
||||
id="asset-box-input-parchase-date"
|
||||
v-model="label.value[0]"
|
||||
:type="JSON.parse(label.param).subType"
|
||||
placeholder=""
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.EMAIL">
|
||||
<input v-model="label.value[0]" size="small"></input>
|
||||
</template>
|
||||
</template>
|
||||
<el-input v-model="label.value" size="small"/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<!-- label的新增按钮 -->
|
||||
@@ -137,6 +209,9 @@
|
||||
<el-form-item :label="$t('asset.passwordPrompt')" prop="authPinTip">
|
||||
<el-input v-model="editAsset.authPinTip" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('asset.port')" prop="authProtocolPort">
|
||||
<el-input v-model="editAsset.authProtocolPort" size="small"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<!-- SNMP -->
|
||||
<template v-if="editAsset.type && editAsset.type.snmpEnable === 1">
|
||||
@@ -295,9 +370,9 @@ export default {
|
||||
immediate: true,
|
||||
handler (n) {
|
||||
this.editAsset = JSON.parse(JSON.stringify(n))
|
||||
this.$nextTick(() => {
|
||||
this.editAsset.stateId = n.state ? n.state.id : ''
|
||||
this.editAsset.typeId = n.type ? n.type.id : ''
|
||||
this.$nextTick(() => {
|
||||
if (n.id) {
|
||||
this.lockModelInputValue = `${n.brand.name} / ${n.model.name}`
|
||||
}
|
||||
@@ -391,6 +466,18 @@ export default {
|
||||
this.labelCascShow = true
|
||||
})
|
||||
},
|
||||
addMultiTextRow (label) {
|
||||
label.value.push('')
|
||||
},
|
||||
blankLabelValue (label) {
|
||||
if (label.type.toUpperCase() === this.assetConstants.labelTypeData.CHECKBOX) {
|
||||
return []
|
||||
} else if (label.type.toUpperCase() === this.assetConstants.labelTypeData.MULTITEXT) {
|
||||
return ['']
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
getParentAsset () {
|
||||
return new Promise(resolve => {
|
||||
this.$get(this.url, { pageSize: -1, vmh: 1 }).then(response => {
|
||||
@@ -407,7 +494,7 @@ export default {
|
||||
},
|
||||
addLabel ([groupId, metaId]) {
|
||||
const label = this.metaData.find(m => m.id === metaId)
|
||||
this.editAsset.fields.push({ id: label.id, value: '', name: label.name })
|
||||
this.editAsset.fields.push({ ...label, value: this.blankLabelValue(label), action: 0 })
|
||||
this.labelCascShow = false
|
||||
this.$nextTick(() => {
|
||||
this.labelCascShow = true
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
export default {
|
||||
name: 'cabinetBox',
|
||||
props: {
|
||||
cabinet: { type: Object },
|
||||
obj: { type: Object },
|
||||
currentDc: { type: Object }
|
||||
},
|
||||
data () {
|
||||
@@ -128,7 +128,7 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cabinet: {
|
||||
obj: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler: function (n, o) {
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<div v-clickoutside="{obj: editCabinet, func: esc}" class="right-box right-box-asset">
|
||||
<div class="right-box__header">
|
||||
<div class="header__title">{{editCabinet.id ? $t('config.cabinet.editCabinet') : $t('config.cabinet.createCabinet')}}</div>
|
||||
<div class="header__operation">
|
||||
<span v-cancel="{obj: editCabinet, func: esc}"><i class="nz-icon nz-icon-close"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-box__container">
|
||||
<div class="container__form">
|
||||
<el-form class="right-box-form right-box-form-left" label-width="120px" label-position = "top" :model="editCabinet" ref="cabinetForm" :rules="rules">
|
||||
<el-form-item :label="$t('overall.name')" prop="name">
|
||||
<el-input size='mini' v-model="editCabinet.name" id="cabinet-box-input-name"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('config.dc.dc')" prop="idcId">
|
||||
<el-input size='mini' v-model="currentDc.name" disabled id="cabinet-box-input-dc"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('asset.uSize')" prop="uSize">
|
||||
<el-input v-model.number="editCabinet.uSize" :max="47" id="cabinet-box-input-uSize"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('config.dc.remark')">
|
||||
<el-input size='mini' v-model="editCabinet.remark" type="textarea" :rows="2" id="cabinet-box-input-remark"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-box__footer">
|
||||
<button id="asset-edit-cancel" v-cancel="{obj: editCabinet, func: esc}" class="footer__btn footer__btn--light">
|
||||
<span>{{$t('overall.cancel')}}</span>
|
||||
</button>
|
||||
<button id="asset-edit-save" :class="{'footer__btn--disabled': prevent_opt.save}" :disabled="prevent_opt.save" class="footer__btn" @click="save">
|
||||
<span>{{$t('overall.save')}}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "cabinetBox",
|
||||
props: {
|
||||
obj: { type: Object },
|
||||
currentDc: { type: Object }
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
editCabinet: {},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
],
|
||||
uSize: [
|
||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
||||
{ type: 'number', min: 1, max: 47, message: this.$t('validate.uSize'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickOutside () {
|
||||
this.esc(false)
|
||||
},
|
||||
esc (refresh) {
|
||||
this.prevent_opt.save = false
|
||||
this.$emit('close', refresh)
|
||||
},
|
||||
save () {
|
||||
if (this.prevent_opt.save) { return } ;
|
||||
this.prevent_opt.save = true
|
||||
this.$refs.cabinetForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.editCabinet.idcId = this.currentDc.id
|
||||
if (this.editCabinet.id) {
|
||||
this.$put('cabinet', this.editCabinet).then(res => {
|
||||
this.prevent_opt.save = false
|
||||
if (res.code === 200) {
|
||||
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })
|
||||
this.esc(true)
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$post('cabinet', this.editCabinet).then(res => {
|
||||
this.prevent_opt.save = false
|
||||
if (res.code === 200) {
|
||||
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })
|
||||
this.esc(true)
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.prevent_opt.save = false
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
del () {
|
||||
if (this.prevent_opt.save) { return } ;
|
||||
this.prevent_opt.save = true
|
||||
this.$confirm(this.$t('tip.confirmDelete'), {
|
||||
confirmButtonText: this.$t('tip.yes'),
|
||||
cancelButtonText: this.$t('tip.no'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$delete('/cabinet?ids=' + this.editCabinet.id).then(response => {
|
||||
this.prevent_opt.save = false
|
||||
if (response.code == 200) {
|
||||
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })
|
||||
this.esc(true)
|
||||
} else {
|
||||
this.$message.error(response.msg)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.prevent_opt.save = false
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
obj: {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler: function (n, o) {
|
||||
if (n) {
|
||||
this.editCabinet = JSON.parse(JSON.stringify(n))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import '@/assets/css/common/rightBoxCommon.scss';
|
||||
</style>
|
||||
@@ -106,7 +106,7 @@ export default {
|
||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
],
|
||||
remark: [
|
||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
// { required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="select_condition">
|
||||
{{val.name}}
|
||||
</div>
|
||||
<div class="select_content" v-if="val.val && ind!=sreach_num">
|
||||
<div class="select_content" v-if="typeof val.val !='undefined' && val.val != null && ind!=sreach_num">
|
||||
<span>{{val.valString ? val.valString : val.val}}</span>
|
||||
<i class="nz-icon nz-icon-close" @click="close_selcet_list(ind,$event)"></i>
|
||||
</div>
|
||||
@@ -59,6 +59,16 @@
|
||||
<li v-for="(item,key) in selectInfoList[val.label]" :key="key" @click="stringSelectInfo(val, item, $event)" :class="search_select_style_num==key?'search-style-ind':''">{{item.label}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="select_info_list" :style="'top:' + selectDom.top +'; left:'+selectDom.left " v-if="val.type == 'terminalStatus'">
|
||||
<el-scrollbar v-if="selectInfoList['terminalStatus'].length > 8" class="el-scrollbar-small" style="height: 240px;">
|
||||
<ul>
|
||||
<li v-for="(item,key) in selectInfoList['terminalStatus']" :key="key" @click="stringSelectInfo(val, item, $event)" :class="search_select_style_num==key?'search-style-ind':''">{{item.label}}</li>
|
||||
</ul>
|
||||
</el-scrollbar>
|
||||
<ul v-else>
|
||||
<li v-for="(item,key) in selectInfoList['terminalStatus']" :key="key" @click="stringSelectInfo(val, item, $event)" :class="search_select_style_num==key?'search-style-ind':''">{{item.label}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="select_info_list" :style="'top:' + selectDom.top +'; left:'+selectDom.left " v-if="val.type == 'dc'">
|
||||
<el-scrollbar v-if="dcSelect.length > 8" class="el-scrollbar-small" style="height: 240px;">
|
||||
<ul>
|
||||
@@ -633,7 +643,6 @@ export default {
|
||||
},
|
||||
// 点击搜索
|
||||
select () {
|
||||
console.log(this.select_list)
|
||||
const objectInfo = {}
|
||||
this.change_sreach_show = true
|
||||
this.name = '', this.id = ''
|
||||
@@ -726,7 +735,7 @@ export default {
|
||||
}
|
||||
let labelBool = true
|
||||
this.select_list.forEach(val => {
|
||||
if (typeof (val.val) !== 'undefined' && val.val) {
|
||||
if (typeof (val.val) !== 'undefined' && val.val != null) {
|
||||
if (val.type == 'select') {
|
||||
if (val.label == 'alertType' || val.label == 'promType') {
|
||||
objectInfo.type = val.valnum
|
||||
@@ -763,6 +772,7 @@ export default {
|
||||
objectInfo[val.label] = val.val
|
||||
}
|
||||
}
|
||||
console.log('search obj',objectInfo)
|
||||
})
|
||||
this.getHeight()
|
||||
// 搜索完成后存储在本地历史记录中
|
||||
@@ -1337,9 +1347,9 @@ export default {
|
||||
}
|
||||
}, 1000)
|
||||
JSON.parse(JSON.stringify(this.searchMsg.searchLabelList)).forEach(val => {
|
||||
if (val.name == 'Protocol') {
|
||||
this.schemaTypeSelect = val.doc.data
|
||||
}
|
||||
// if (val.name == 'Protocol') {
|
||||
// this.schemaTypeSelect = val.doc.data
|
||||
// }
|
||||
if (val.prop == 'common_action') {
|
||||
this.actionSelect = val.doc.data
|
||||
}
|
||||
|
||||
@@ -141,6 +141,24 @@ const searchSelectInfo = { // value: 传给后台的值;label:显示给用
|
||||
value: 'fail',
|
||||
label: i18n.t('overall.result.failed')
|
||||
}
|
||||
],
|
||||
terminalStatus:[
|
||||
{
|
||||
value: 0,
|
||||
label: i18n.t('config.terminallog.statusItem.connecting')
|
||||
},{
|
||||
value: 1,
|
||||
label: i18n.t('config.terminallog.statusItem.connectionFailed')
|
||||
},{
|
||||
value: 2,
|
||||
label: i18n.t('config.terminallog.statusItem.over')
|
||||
},{
|
||||
value: 3,
|
||||
label: i18n.t('config.terminallog.statusItem.kickedOut')
|
||||
},{
|
||||
value: 4,
|
||||
label: i18n.t('config.terminallog.statusItem.unknownError')
|
||||
},
|
||||
]
|
||||
}
|
||||
export default searchSelectInfo
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
<template>
|
||||
<el-table
|
||||
id="cabinetTable"
|
||||
ref="dataTable"
|
||||
:data="tableData"
|
||||
:height="height"
|
||||
border
|
||||
@header-dragend="dragend"
|
||||
@sort-change="tableDataSort"
|
||||
@selection-change="selectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
:resizable="false"
|
||||
type="selection"
|
||||
width="40"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:resizable="true"
|
||||
v-for="(item, index) in tableTitle"
|
||||
v-if="item.show"
|
||||
:key="`col-${index}`"
|
||||
:label="item.label"
|
||||
>
|
||||
<template slot-scope="scope" :column="item">
|
||||
<template v-if="item.prop == 'assetStat'">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
offset="-100"
|
||||
trigger="hover"
|
||||
:content="$t('overall.result.total') + ':' + scope.row.assetStat.total + ',' + $t('asset.inStock') + ':' + scope.row.assetStat.inStock + ',' + $t('asset.notInStock') + ':' + scope.row.assetStat.outStock + ',' + $t('asset.suspended') + ':' + scope.row.assetStat.suspended">
|
||||
<div slot="reference" class="dc-asset-states">
|
||||
<span class="dc-asset-state dc-asset-state-total">{{scope.row.assetStat.total}}</span>
|
||||
<span class="dc-asset-state dc-asset-state-in">{{scope.row.assetStat.inStock}}</span>
|
||||
<span class="dc-asset-state dc-asset-state-out">{{scope.row.assetStat.outStock}}</span>
|
||||
<span class="dc-asset-state dc-asset-state-suspended">{{scope.row.assetStat.suspended}}</span>
|
||||
</div>
|
||||
</el-popover>
|
||||
|
||||
</template >
|
||||
<template v-else-if="item.prop == 'alertStat'">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
offset="-128"
|
||||
trigger="hover"
|
||||
:content="$t('overall.result.total') + ':' + scope.row.alertStat.total + ',' + $t('alert.config.P1') + ':' + scope.row.alertStat.P1 + ',' + $t('alert.config.P2') + ':' + scope.row.alertStat.P2+ ',' + $t('alert.config.P3') + ':' + scope.row.alertStat.P3">
|
||||
<div slot="reference" class="dc-asset-states">
|
||||
<span class="dc-asset-state dc-asset-state-total">{{scope.row.alertStat.total}}</span>
|
||||
<span class="dc-asset-state alert-level-P1">{{scope.row.alertStat.P1}}</span>
|
||||
<span class="dc-asset-state alert-level-P2">{{scope.row.alertStat.P2}}</span>
|
||||
<span class="dc-asset-state alert-level-P3">{{scope.row.alertStat.P3}}</span>
|
||||
</div>
|
||||
</el-popover>
|
||||
</template >
|
||||
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
||||
<template v-else>-</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:resizable="false"
|
||||
:width="operationWidth"
|
||||
fixed="right">
|
||||
<div slot="header" class="table-operation-title">{{$t('overall.option')}}</div>
|
||||
<div slot-scope="scope" class="table-operation-items">
|
||||
<button class="table-operation-item" @click="tableOperation(['edit', scope.row])"><i class="nz-icon nz-icon-edit"></i></button>
|
||||
<el-dropdown size="medium" trigger="hover" @command="tableOperation">
|
||||
<div class="table-operation-item table-operation-item--more">
|
||||
<span>…</span><i class="nz-icon nz-icon-arrow-down"></i>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="['delete', scope.row]" :disabled="isBuiltIn(scope.row)"><i class="nz-icon nz-icon-delete"></i><span class="operation-dropdown-text">{{$t('overall.delete')}}</span></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import table from '@/components/common/mixin/table'
|
||||
export default {
|
||||
name: "cabinet Table",
|
||||
mixins: [table],
|
||||
data(){
|
||||
return{
|
||||
tableTitle: [
|
||||
{
|
||||
label: 'ID',
|
||||
prop: 'id',
|
||||
show: true,
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
label: this.$t('overall.name'),
|
||||
prop: 'name',
|
||||
show: true
|
||||
},
|
||||
{
|
||||
label: this.$t('asset.uSize'),
|
||||
prop: 'uSize',
|
||||
show: true
|
||||
},
|
||||
{
|
||||
label: this.$t('config.dc.assets'),
|
||||
prop: 'assetStat',
|
||||
show: true
|
||||
},
|
||||
{
|
||||
label: this.$t('alert.alert'),
|
||||
prop: 'alertStat',
|
||||
show: true
|
||||
},
|
||||
{
|
||||
label: this.$t('config.dc.remark'),
|
||||
prop: 'remark',
|
||||
show: true
|
||||
},
|
||||
{
|
||||
label: this.$t('config.account.option'),
|
||||
prop: 'option',
|
||||
show: true,
|
||||
width: 120
|
||||
}
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-table
|
||||
id="roleTable"
|
||||
id="dcTable"
|
||||
ref="dataTable"
|
||||
:data="tableData"
|
||||
:height="height"
|
||||
@@ -59,22 +59,24 @@
|
||||
<template v-if="regNumTest(scope.row.latitude)">{{scope.row.latitude}}</template>
|
||||
<template v-else>-</template>
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'assetStat' && scope.row.assetStat">
|
||||
<el-popover
|
||||
:content="$t('overall.result.total') + ':' + scope.row.assetStat.total + ',' + $t('asset.inStock') + ':' + scope.row.assetStat.inStock + ',' + $t('asset.notInStock') + ':' + scope.row.assetStat.outStock + ',' + $t('asset.suspended') + ':' + scope.row.assetStat.suspended"
|
||||
placement="top"
|
||||
trigger="hover">
|
||||
<div slot="reference" class="dc-asset-states">
|
||||
<span class="dc-asset-state dc-asset-state-total">{{scope.row.assetStat.total}}</span>
|
||||
<span class="dc-asset-state dc-asset-state-in">{{scope.row.assetStat.inStock}}</span>
|
||||
<span class="dc-asset-state dc-asset-state-out">{{scope.row.assetStat.outStock}}</span>
|
||||
<span class="dc-asset-state dc-asset-state-suspended">{{scope.row.assetStat.suspended}}</span>
|
||||
</div>
|
||||
</el-popover>
|
||||
<template v-else-if="item.prop === 'assetNum'">
|
||||
<span class="endpoint-num" @click="showBottomBox('asset', scope.row)">
|
||||
<i class="nz-icon nz-icon-asset" :class="scope.row[item.prop]>0?'color23BF9A':'color23BF9A'"/>
|
||||
{{scope.row[item.prop]}}
|
||||
</span>
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'alertNum'">
|
||||
<span class="alert-num" @click="showBottomBox('moduleAlertMessage', scope.row)">
|
||||
<i class="nz-icon nz-icon-overview-alert" :class="scope.row[item.prop]>0?'colorEF7458':'color23BF9A'"/>
|
||||
{{scope.row[item.prop]}}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
</template >
|
||||
<template v-else-if="item.prop === 'cabinetNum'">
|
||||
<span class="link" @click="showBottomBox('cabinet', scope.row)">{{scope.row[item.prop]}}</span>
|
||||
<span class="alert-num" @click="showBottomBox('cabinet', scope.row)">
|
||||
<i class="nz-icon nz-icon-Cabinet" :class="scope.row[item.prop]>0?'color23BF9A':'colorEF7458'"/>
|
||||
{{scope.row[item.prop]}}
|
||||
</span>
|
||||
</template>
|
||||
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
||||
<template v-else>-</template>
|
||||
@@ -102,6 +104,7 @@
|
||||
|
||||
<script>
|
||||
import table from '@/components/common/mixin/table'
|
||||
import { showTableTooltip, hideTableTooltip } from '@/components/common/js/tools'
|
||||
export default {
|
||||
name: 'dcTable',
|
||||
mixins: [table],
|
||||
@@ -128,16 +131,20 @@ export default {
|
||||
show: true
|
||||
}, {
|
||||
label: this.$t('config.dc.assets'),
|
||||
prop: 'assetStat',
|
||||
prop: 'assetNum',
|
||||
show: true
|
||||
},{
|
||||
label: this.$t('config.dc.alert'),
|
||||
prop: 'alertNum',
|
||||
show: true
|
||||
}, {
|
||||
label: this.$t('asset.tel'),
|
||||
prop: 'tel',
|
||||
show: true
|
||||
show: false
|
||||
}, {
|
||||
label: this.$t('asset.principal'),
|
||||
prop: 'principal',
|
||||
show: true
|
||||
show: false
|
||||
}, {
|
||||
label: this.$t('config.dc.longitude'),
|
||||
prop: 'longitude',
|
||||
@@ -155,9 +162,39 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showTableTooltip, hideTableTooltip,
|
||||
regNumTest (val) { // 校验是否是数字
|
||||
return this.regNum.test(val)
|
||||
},
|
||||
messageStyle (title, row) {
|
||||
if (title.prop === 'alertNum') {
|
||||
if (row.alertNum > 0) {
|
||||
return 'danger'
|
||||
} else {
|
||||
return 'success'
|
||||
}
|
||||
}
|
||||
if (title.label === 'assettNum') {
|
||||
if (row.state === 3) {
|
||||
return 'suspended'
|
||||
} else {
|
||||
if (row.endpointDownNum > 0) {
|
||||
return 'danger'
|
||||
} else {
|
||||
return 'success'
|
||||
}
|
||||
}
|
||||
}
|
||||
return ''
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.colorEF7458{
|
||||
color: #EF7458;
|
||||
}
|
||||
.color23BF9A{
|
||||
color: #23BF9A;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -233,9 +233,9 @@ export default {
|
||||
})
|
||||
},
|
||||
getLinkData () {
|
||||
this.$get('link').then(response => {
|
||||
/* this.$get('link').then(response => {
|
||||
this.$store.commit('setLinkData', response.data)
|
||||
})
|
||||
}) */
|
||||
},
|
||||
createBox (item) {
|
||||
if (item.type == 1) {
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
:api="url"
|
||||
:custom-table-title.sync="tools.customTableTitle"
|
||||
:from="fromRoute.asset"
|
||||
:layout="['searchInput', 'elementSet']"
|
||||
:has-search="true"
|
||||
:layout="['searchInput', 'elementSet', 'clickSearch']"
|
||||
:search-msg="searchMsg">
|
||||
<template v-slot:top-tool-right>
|
||||
<export-excel
|
||||
@@ -28,6 +29,9 @@
|
||||
</button>
|
||||
<delete-button id="asset-list-batch-delete" v-has="'asset_delete'" :api="url" :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true"></delete-button>
|
||||
</template>
|
||||
<template v-slot:search>
|
||||
<click-search :select-value.sync="selectValue" :title-search-list="titleSearchList" @reload="reloadTable"/>
|
||||
</template>
|
||||
<template v-slot:default="slotProps">
|
||||
<asset-table
|
||||
ref="dataTable"
|
||||
@@ -39,6 +43,7 @@
|
||||
@cli="cli"
|
||||
@del="del"
|
||||
@edit="edit"
|
||||
@copy="copy"
|
||||
@orderBy="tableDataSort"
|
||||
@reload="getTableData"
|
||||
@selectionChange="selectionChange"
|
||||
@@ -75,7 +80,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bus from '@/libs/bus'
|
||||
import exportXLSX from '@/components/common/exportXLSX'
|
||||
import deleteButton from '@/components/common/deleteButton'
|
||||
import assetBox from '@/components/common/rightBox/asset/assetBox'
|
||||
@@ -83,7 +87,7 @@ import assetBatchEditBox from '@/components/common/rightBox/asset/assetBatchEdit
|
||||
import nzDataList from '@/components/common/table/nzDataList'
|
||||
import dataListMixin from '@/components/common/mixin/dataList'
|
||||
import assetTable from '@/components/common/table/asset/assetTable'
|
||||
import { showTableTooltip, hideTableTooltip } from '@/components/common/js/tools'
|
||||
import clickSearch from '@/components/common/clickSearch'
|
||||
|
||||
export default {
|
||||
name: 'asset',
|
||||
@@ -93,6 +97,7 @@ export default {
|
||||
nzDataList,
|
||||
assetBatchEditBox,
|
||||
assetTable,
|
||||
clickSearch,
|
||||
'export-excel': exportXLSX
|
||||
},
|
||||
mixins: [dataListMixin],
|
||||
@@ -178,17 +183,70 @@ export default {
|
||||
typeData: [],
|
||||
dcData: [],
|
||||
snmpCredentialData: [],
|
||||
fieldGroupData: []
|
||||
fieldGroupData: [],
|
||||
titleSearchList: {
|
||||
dc: {
|
||||
label: this.$t('overall.dc'),
|
||||
key: 'dcIds',
|
||||
type: 'checkBox',
|
||||
children: [],
|
||||
show: true,
|
||||
showMore: false,
|
||||
width: 0,
|
||||
index: 0
|
||||
},
|
||||
type: {
|
||||
label: this.$t('overall.type'),
|
||||
key: 'typeIds',
|
||||
type: 'checkBox',
|
||||
children: [],
|
||||
show: true,
|
||||
showMore: false,
|
||||
width: 0,
|
||||
index: 0
|
||||
},
|
||||
ping: {
|
||||
label: 'ping',
|
||||
key: 'ping',
|
||||
type: 'checkBox',
|
||||
children: [
|
||||
{ key: 'Down', value: 0, name: 'Down' },
|
||||
{ key: 'Up', value: 1, name: 'Up' }
|
||||
],
|
||||
show: true,
|
||||
showMore: false,
|
||||
width: 0,
|
||||
index: 0
|
||||
},
|
||||
model: {
|
||||
label: this.$t('asset.model'),
|
||||
key: 'modelIds',
|
||||
type: 'dropdownCheckBox',
|
||||
children: [],
|
||||
show: true,
|
||||
width: 0,
|
||||
index: 0
|
||||
},
|
||||
assetLabel: {
|
||||
label: 'More',
|
||||
key: 'fields',
|
||||
type: 'dropdownCheckBox',
|
||||
children: [],
|
||||
show: true,
|
||||
width: 0,
|
||||
index: 0
|
||||
}
|
||||
},
|
||||
/* computed: {
|
||||
headerCurrentDc () {
|
||||
return this.$store.state.currentDc
|
||||
selectValue: {
|
||||
dcIds: [],
|
||||
typeIds: [],
|
||||
ping: [],
|
||||
modelIds: [],
|
||||
fields: ''
|
||||
}
|
||||
}, */
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showTableTooltip,
|
||||
hideTableTooltip,
|
||||
cli ([id, host, account]) {
|
||||
const consoleParam = {
|
||||
id: id,
|
||||
@@ -198,6 +256,10 @@ export default {
|
||||
}
|
||||
this.$store.commit('addConsole', consoleParam)
|
||||
},
|
||||
copy (row) {
|
||||
this.object = { ...row, id: '' }
|
||||
this.rightBox.show = true
|
||||
},
|
||||
getUserData () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('sys/user').then(response => {
|
||||
@@ -219,6 +281,16 @@ export default {
|
||||
})
|
||||
},
|
||||
getTypeData () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('asset/typeConf').then(response => {
|
||||
if (response.code === 200) {
|
||||
this.titleSearchList.type.children = response.data.list.map(d => { return { ...d, value: d.id } })
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
},
|
||||
getTypeTreeData () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('asset/typeConf/tree').then(response => {
|
||||
if (response.code === 200) {
|
||||
@@ -228,11 +300,22 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
reloadTable (obj) {
|
||||
Object.keys(obj).forEach(key => {
|
||||
if (typeof obj[key] === 'string') {
|
||||
this.searchCheckBox[key] = obj[key]
|
||||
} else {
|
||||
obj[key].length > 0 ? this.searchCheckBox[key] = obj[key].join(',') : this.searchCheckBox[key] = null
|
||||
}
|
||||
})
|
||||
this.getTableData()
|
||||
},
|
||||
getDcData () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('dc', { pageSize: -1 }).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.dcData = response.data.list
|
||||
this.titleSearchList.dc.children = response.data.list.map(d => { return { ...d, value: d.id } })
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
@@ -258,6 +341,25 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
getSearchableMetaData () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('asset/field/meta', { pageSize: -1, search: 1 }).then(response => {
|
||||
if (response.code === 200) {
|
||||
const data = []
|
||||
response.data.list.forEach(m => {
|
||||
if (m.param) {
|
||||
const param = JSON.parse(m.param)
|
||||
if (param.items) {
|
||||
data.push({ ...m, children: param.items.map(p => { return { ...p, id: p.name, metaId: m.id } }) })
|
||||
}
|
||||
}
|
||||
})
|
||||
this.titleSearchList.assetLabel.children = data
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
},
|
||||
getBrandData () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('asset/brand').then(response => {
|
||||
@@ -268,11 +370,20 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
getModelData (brandId) {
|
||||
getModelData () {
|
||||
return new Promise(resolve => {
|
||||
this.$get('asset/model').then(response => {
|
||||
if (response.code === 200) {
|
||||
this.modelData = response.data.list
|
||||
const titleSearchData = {}
|
||||
this.modelData.forEach(m => {
|
||||
if (titleSearchData[m.brand.name]) {
|
||||
titleSearchData[m.brand.name].children.push(m)
|
||||
} else {
|
||||
titleSearchData[m.brand.name] = { ...m.brand, children: [m] }
|
||||
}
|
||||
})
|
||||
this.titleSearchList.model.children = Object.keys(titleSearchData).map(b => titleSearchData[b])
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
@@ -296,7 +407,6 @@ export default {
|
||||
if (refresh) {
|
||||
this.delFlag = true
|
||||
this.getTableData()
|
||||
// this.loadKeys()
|
||||
}
|
||||
},
|
||||
getPrincipalName (data) {
|
||||
@@ -305,7 +415,7 @@ export default {
|
||||
return this.userData[item].username
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
/* formatPingTime (str) {
|
||||
if (!str) {
|
||||
return this.$t('asset.assetStatPre') + this.$t('asset.assetStatDown')
|
||||
@@ -321,59 +431,18 @@ export default {
|
||||
const seconds = time.getSeconds() > 9 ? time.getSeconds() : ('0' + time.getSeconds())
|
||||
return this.$t('asset.assetStatPre') + year + ds + month + ds + day + ' ' + hours + ts + minutes + ts + seconds
|
||||
}, */
|
||||
// 数据排序
|
||||
initEvent () {
|
||||
bus.$on('asset-filter-change', (column, content) => {
|
||||
this.pageObj.pageNo = 1
|
||||
if (column == 'multiParam') {
|
||||
const $self = this
|
||||
if (content instanceof Array && content.length > 0) {
|
||||
content.forEach(item => {
|
||||
$self.pageObj[item.key] = item.value
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.pageObj[column] = content
|
||||
}
|
||||
// let isSame = this.checkSearchLabel(JSON.parse(JSON.stringify(this.pageObj)), oldPageObj);
|
||||
// isSame && this.getTableData();
|
||||
this.getTableData()
|
||||
})
|
||||
bus.$on('alert-message-change', () => {
|
||||
this.getTableData()
|
||||
})
|
||||
},
|
||||
dispatchEvent (event, param) {
|
||||
this.$nextTick(() => {
|
||||
bus.$emit(event, param)
|
||||
})
|
||||
},
|
||||
loadKeys () {
|
||||
this.$get('/asset/tagKey').then(res => {
|
||||
if (res.code == 200) {
|
||||
this.tagKeys = res.data.list.map(item => {
|
||||
return { label: item, prop: 'tags', show: false, allowed: true, type: 'tag' }
|
||||
})
|
||||
this.resetTableTitle()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
// this.loadKeys()
|
||||
// 初始化数据
|
||||
// this.getUserData()
|
||||
this.initEvent()
|
||||
this.getBrandData()
|
||||
this.getModelData()
|
||||
this.getStateData()
|
||||
this.getTypeTreeData()
|
||||
this.getTypeData()
|
||||
this.getDcData()
|
||||
this.getSearchableMetaData()
|
||||
this.getSnmpCredentialData()
|
||||
this.getFieldGroupData()
|
||||
},
|
||||
beforeDestroy () {
|
||||
bus.$off('asset-filter-change')
|
||||
bus.$off('alert-message-change')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -4,26 +4,31 @@
|
||||
<el-tab-pane :label="$t('config.system.basic.basic')" name="basic">
|
||||
<div class="system-config-form basicForm" v-if="activeTab === 'basic'">
|
||||
<el-form :model="basic" label-width="180px" size="small" ref="basicForm" :rules="basicRules" :validate-on-rule-change="false">
|
||||
<el-form-item :label="$t('config.system.basic.sysLogo')" prop="system_logo">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
action=""
|
||||
type=".jpg,.jpeg,.png"
|
||||
:auto-upload="false"
|
||||
:show-file-list="false"
|
||||
:on-change="handleLogoChange"
|
||||
>
|
||||
<img v-if="basic.system_logo" :src="basic.system_logo" class="avatar">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
<div slot="tip" v-if="imageFormatErr" class="logo-upload-tip">{{$t('config.system.basic.logoTip')}}</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('config.system.basic.sysLogo')" prop="system_logo">-->
|
||||
<!-- <el-upload-->
|
||||
<!-- class="avatar-uploader"-->
|
||||
<!-- action=""-->
|
||||
<!-- type=".jpg,.jpeg,.png"-->
|
||||
<!-- :auto-upload="false"-->
|
||||
<!-- :show-file-list="false"-->
|
||||
<!-- :on-change="handleLogoChange"-->
|
||||
<!-- >-->
|
||||
<!-- <img v-if="basic.system_logo" :src="basic.system_logo" class="avatar">-->
|
||||
<!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i>-->
|
||||
<!-- <div slot="tip" v-if="imageFormatErr" class="logo-upload-tip">{{$t('config.system.basic.logoTip')}}</div>-->
|
||||
<!-- </el-upload>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item :label="$t('config.system.basic.systemName')" prop="system_name">
|
||||
<el-input v-model="basic.system_name" id="system-baisc-system_name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('config.system.basic.curUrl')" prop="alert_api">
|
||||
<el-input id="system-baisc-alert_api" v-model="basic.alert_api"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('config.system.basic.sessionTimeout')" prop="session_timeout">
|
||||
<el-input v-model.number="basic.session_timeout" >
|
||||
<template slot="append"><span >{{$t('config.system.basic.minute')}}</span></template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('config.system.basic.assetPingInterval')" prop="asset_ping_interval">
|
||||
<el-input v-model.number="basic.asset_ping_interval" >
|
||||
<template slot="append"><span >{{$t('config.system.basic.second')}}</span></template>
|
||||
@@ -72,10 +77,10 @@
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<button
|
||||
@click="resetForm('basicForm','basic')" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" type="button" id="system-basic-reset"
|
||||
:disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}"
|
||||
>{{$t('overall.reset')}}</button>
|
||||
<!-- <button-->
|
||||
<!-- @click="resetForm('basicForm','basic')" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" type="button" id="system-basic-reset"-->
|
||||
<!-- :disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}"-->
|
||||
<!-- >{{$t('overall.reset')}}</button>-->
|
||||
<button id="system-basic-save" @click="saveSetInfo('basic','basicForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" type="button" v-has="'system_basic_save'" :disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}">{{$t('overall.submit')}}</button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -121,7 +126,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item style="padding-top: 20px;">
|
||||
<button id="system-email-reset" @click="resetForm('emailForm','email')" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" type="button">{{$t('overall.reset')}}</button>
|
||||
<!-- <button id="system-email-reset" @click="resetForm('emailForm','email')" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" type="button">{{$t('overall.reset')}}</button>-->
|
||||
<button id="system-email-test" :class="{'nz-btn-disabled':email.email_enable == 'off','nz-btn-disabled':prevent_opt.save}" :disabled="email.email_enable == 'off' || prevent_opt.save" @click="testSetInfo('email','emailForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" type="button">{{$t('config.system.email.testConnection')}}</button>
|
||||
<button id="system-email-save" @click="saveSetInfo('email','emailForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" type="button" v-has="'system_email_save'" :disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}">{{$t('overall.submit')}}</button>
|
||||
</el-form-item>
|
||||
@@ -131,11 +136,11 @@
|
||||
<el-tab-pane :label="$t('config.system.terminal.terminal')" name="terminal">
|
||||
<div class="system-config-form terminal" v-if="activeTab === 'terminal'">
|
||||
<el-form :model="terminal" label-width="180px" size="small" ref="terminalForm" :rules="terminalRules">
|
||||
<el-form-item :label="$t('config.system.terminal.timeout')" prop="terminal_timeout">
|
||||
<el-input v-model="terminal.terminal_timeout" controls-position="right" :min="1" id="system-terminal-max_terminal_num">
|
||||
<template slot="append"><span >{{$t('config.system.basic.second')}}</span></template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('config.system.terminal.timeout')" prop="terminal_timeout">-->
|
||||
<!-- <el-input v-model="terminal.terminal_timeout" controls-position="right" :min="1" id="system-terminal-max_terminal_num">-->
|
||||
<!-- <template slot="append"><span >{{$t('config.system.basic.second')}}</span></template>-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item :label="$t('config.system.terminal.userTip')" prop="terminal_telnet_user_tip">
|
||||
<el-input id="system-terminal-user-tip" v-model="terminal.terminal_telnet_user_tip"></el-input>
|
||||
</el-form-item>
|
||||
@@ -187,7 +192,7 @@
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<button id='system-ldap-reset' @click="resetForm('ldapForm','ldap')" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" type="button">{{$t('overall.reset')}}</button>
|
||||
<!-- <button id='system-ldap-reset' @click="resetForm('ldapForm','ldap')" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" type="button">{{$t('overall.reset')}}</button>-->
|
||||
<button id='system-ldap-test' @click="testSetInfo('ldap','ldapForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new" type="button" :disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}">{{$t('config.system.email.testConnection')}}</button>
|
||||
<button id='system-ldap-save' @click="saveSetInfo('ldap','ldapForm')" class="nz-btn nz-btn-size-normal-new nz-btn-style-normal-new" type="button" v-has="'system_ldap_save'" :disabled="prevent_opt.save" :class="{'nz-btn-disabled':prevent_opt.save}">{{$t('overall.submit')}}</button>
|
||||
</el-form-item>
|
||||
@@ -254,6 +259,7 @@ export default {
|
||||
basic: {
|
||||
alert_api: '',
|
||||
asset_ping_interval: '300', // 检查周期,单位:s
|
||||
session_timeout:'30',
|
||||
storage_local_retention: 15 * 24,
|
||||
system_name: '',
|
||||
system_logo: '',
|
||||
@@ -273,6 +279,7 @@ export default {
|
||||
alert_api: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: host, trigger: 'blur' }],
|
||||
asset_ping_interval: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: positiveInteger, trigger: 'blur' }],
|
||||
default_scrape_interval: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: positiveInteger, trigger: 'blur' }],
|
||||
session_timeout: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: positiveInteger, trigger: 'blur' }],
|
||||
default_scrape_timeout: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: positiveInteger, trigger: 'blur' }],
|
||||
storage_local_retention: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: positiveInteger, trigger: 'blur' }],
|
||||
snmp_trap_listen_port: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: port, trigger: 'blur' }],
|
||||
@@ -317,7 +324,7 @@ export default {
|
||||
},
|
||||
terminalCopy: null,
|
||||
terminalRules: {
|
||||
// terminal_timeout: [{ validator: positiveInteger, trigger: 'blur' }],
|
||||
terminal_timeout: [{ validator: positiveInteger, trigger: 'blur' }],
|
||||
terminal_record_local_retention: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: positiveInteger, trigger: 'blur' }]
|
||||
},
|
||||
ldap: {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
:layout="['searchInput', 'elementSet']"
|
||||
:custom-table-title.sync="tools.customTableTitle"
|
||||
:from="fromRoute.terminalLog"
|
||||
@search="search"
|
||||
:search-msg="searchMsg">
|
||||
<template v-slot:default="slotProps">
|
||||
<terminal-log-table
|
||||
@@ -51,16 +52,46 @@ export default {
|
||||
searchLabelList: [
|
||||
{
|
||||
id: 11,
|
||||
name: this.$t('config.terminallog.host'),
|
||||
name: this.$t('config.terminallog.loginHost'),
|
||||
type: 'input',
|
||||
label: 'host',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 12,
|
||||
name: this.$t('config.terminallog.user'),
|
||||
name: this.$t('config.terminallog.loginUser'),
|
||||
type: 'input',
|
||||
label: 'loginUser',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 13,
|
||||
name: this.$t('config.terminallog.sourceIp'),
|
||||
type: 'input',
|
||||
label: 'remoteAddr',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 14,
|
||||
name: this.$t('config.terminallog.sourceUser'),
|
||||
type: 'input',
|
||||
label: 'username',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 15,
|
||||
name: this.$t('config.terminallog.uuid'),
|
||||
type: 'input',
|
||||
label: 'uuid',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 16,
|
||||
name: this.$t('config.terminallog.protocol'),
|
||||
type: 'selectString',
|
||||
label: 'protocol',
|
||||
disabled: false
|
||||
}, {
|
||||
id: 17,
|
||||
name: this.$t('config.terminallog.status'),
|
||||
type: 'terminalStatus',
|
||||
label: 'state',
|
||||
disabled: false
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -504,7 +504,7 @@ export default {
|
||||
},
|
||||
endLoading: function () {
|
||||
this.$refs.loading.endLoading()
|
||||
this.chart.resize();
|
||||
this.chart.resize()
|
||||
this.$emit('is-loading', false)
|
||||
},
|
||||
guid () {
|
||||
|
||||
Reference in New Issue
Block a user