Merge branch 'codeCheck' of git.mesalab.cn:nezha/nezha-fronted into codeCheck
This commit is contained in:
Binary file not shown.
@@ -20,6 +20,9 @@ Created by iconfont
|
|||||||
/>
|
/>
|
||||||
<missing-glyph />
|
<missing-glyph />
|
||||||
|
|
||||||
|
<glyph glyph-name="overview-endpoint" unicode="" d="M510.90486451 673.95312647c11.59554802 0 21.00082594-9.40527792 21.00082682-21.00082594v-170.77665876h90.73516496c21.51618377 59.16950578 55.62642172 101.46104736 102.74944149 126.35926691a21.00082594 21.00082594 0 0 0 19.64801284-37.17017455c-33.36941113-17.58658154-59.20171614-47.21964909-77.23923567-89.18909236h47.28406893c14.26896647 0 27.12069914-8.69666145 32.46753516-21.99933123l91.47599178-228.17462207c2.86667709-7.08616814 3.28540559-14.78432429 1.38502432-21.93491227H167.99873478a34.97990357 34.97990357 0 0 0 1.73933211 22.83678825l99.20635742 228.20683155c5.54009553 12.75510334 18.13414885 21.03303629 32.08101702 21.03303629l38.20088932 0.03220948c-18.03751953 41.96944239-43.86982454 71.60251082-77.20702531 89.22130184a21.00082594 21.00082594 0 0 0 19.58359213 37.13796507c47.15522926-24.89821868 81.26546721-67.18976025 102.78165184-126.35926691h105.48727978V652.95230053c0 10.53262289 7.79478548 19.26149382 17.90867985 20.74314746zM827.23786329 193.96184743000003c11.59554802 0 21.00082594-9.40527792 21.00082681-21.00082595v-195.99697574c0-19.32591366-15.65398991-34.97990357-34.97990444-34.97990357H194.47523641c-19.32591366 0-34.97990357 15.65398991-34.97990357 34.97990357v195.99697574c0 11.59554802 9.40527792 21.00082594 20.96861645 21.00082595h646.773914z m-87.9651172-96.62956831h-483.14784495a32.20985668 32.20985668 0 0 1 0-64.41971248h483.14784495a32.20985668 32.20985668 0 0 1 0 64.41971248zM216.89329615 722.94431803a90.99284432 90.99284432 0 1 0 0-181.98568862 90.99284432 90.99284432 0 0 0 0 181.98568862z m587.99092724 0a90.99284432 90.99284432 0 1 0 0-181.98568862 90.99284432 90.99284432 0 0 0 0 181.98568862zM510.87265503 834.93798828a90.99284432 90.99284432 0 1 0 0-181.98568775 90.99284432 90.99284432 0 0 0 0 181.98568775z" horiz-adv-x="1024" />
|
||||||
|
|
||||||
|
|
||||||
<glyph glyph-name="unlock" unicode="" d="M439.44650239 141.46849166000004a33.32868125 33.32868125 0 0 1 35.31474761 35.25268364V282.66541904999997a35.31474761 35.31474761 0 0 1-70.62949614 0v-105.94424375a33.32868125 33.32868125 0 0 1 35.31474853-35.25268364zM577.1678125 517.8281253H222.40665386A145.231125 145.231125 0 0 1 77.54791636 372.96938780000005V83.37604166000006a145.231125 145.231125 0 0 1 144.8587375-144.8587375h434.45208364A145.231125 145.231125 0 0 1 801.65541011 83.37604166000006V372.96938780000005A145.231125 145.231125 0 0 1 656.8587375 517.8281253H577.1678125z m152.05822886-144.8587375V83.37604166000006a72.6155625 72.6155625 0 0 0-72.36730386-72.36730386h-434.45208364A72.6155625 72.6155625 0 0 0 149.97728511 83.37604166000006V372.96938780000005a72.6155625 72.6155625 0 0 0 72.42936875 72.42936875h434.45208364A72.6155625 72.6155625 0 0 0 729.22604136 372.96938780000005zM884.3875 641.95729166a124.12916636 124.12916636 0 0 1-247.94801011 9.3096875L636.12916636 641.95729166v-124.12916636H574.06458364V641.95729166a186.19375 186.19375 0 1 0 372.3875 0v-31.03229136a31.03229136 31.03229136 0 1 0-62.06458364 0V641.95729166z" horiz-adv-x="1024" />
|
<glyph glyph-name="unlock" unicode="" d="M439.44650239 141.46849166000004a33.32868125 33.32868125 0 0 1 35.31474761 35.25268364V282.66541904999997a35.31474761 35.31474761 0 0 1-70.62949614 0v-105.94424375a33.32868125 33.32868125 0 0 1 35.31474853-35.25268364zM577.1678125 517.8281253H222.40665386A145.231125 145.231125 0 0 1 77.54791636 372.96938780000005V83.37604166000006a145.231125 145.231125 0 0 1 144.8587375-144.8587375h434.45208364A145.231125 145.231125 0 0 1 801.65541011 83.37604166000006V372.96938780000005A145.231125 145.231125 0 0 1 656.8587375 517.8281253H577.1678125z m152.05822886-144.8587375V83.37604166000006a72.6155625 72.6155625 0 0 0-72.36730386-72.36730386h-434.45208364A72.6155625 72.6155625 0 0 0 149.97728511 83.37604166000006V372.96938780000005a72.6155625 72.6155625 0 0 0 72.42936875 72.42936875h434.45208364A72.6155625 72.6155625 0 0 0 729.22604136 372.96938780000005zM884.3875 641.95729166a124.12916636 124.12916636 0 0 1-247.94801011 9.3096875L636.12916636 641.95729166v-124.12916636H574.06458364V641.95729166a186.19375 186.19375 0 1 0 372.3875 0v-31.03229136a31.03229136 31.03229136 0 1 0-62.06458364 0V641.95729166z" horiz-adv-x="1024" />
|
||||||
|
|
||||||
|
|
||||||
@@ -71,9 +74,6 @@ Created by iconfont
|
|||||||
<glyph glyph-name="project" unicode="" d="M362.56500388 769.0967058H132.61589754C103.88486069 769.0967058 75.15382385 746.14548002 75.15382385 711.63463211v-229.91550247c0-28.73103684 22.98482964-57.46207369 57.46207369-57.46207453h229.94910634c28.73103684 0 57.46207369 22.98482964 57.46207452 57.46207453V711.63463211c0 34.47724403-22.98482964 57.46207369-57.46207452 57.46207369z m569.04254983-126.45016564l-160.96101355 160.96101354c-22.98482964 22.98482964-57.46207369 22.98482964-80.44690417 0l-160.96101354-160.96101354c-22.98482964-22.98482964-22.98482964-63.20828172 0-80.44690417l160.96101354-160.96101355c22.98482964-22.98482964 57.46207369-22.98482964 80.44690417 0l160.96101355 160.96101355c22.98482964 17.23862244 22.98482964 57.46207369 0 80.44690417zM362.56500388 292.02707840999994H132.61589754c-28.76464072 0-57.49567755-22.98482964-57.49567757-57.46207453v-229.91550247C75.15382385-24.115139310000018 98.13865349-52.84617615000002 132.61589754-52.84617615000002h229.94910634c28.73103684 0 57.46207369 22.98482964 57.46207452 57.46207369v229.94910634c0 28.73103684-22.98482964 57.46207369-57.46207452 57.46207452z m482.81583543-1e-8H615.49893986c-28.73103684 0-57.46207369-22.98482964-57.46207367-57.46207452v-229.91550247c0-28.76464072 22.98482964-57.49567755 57.46207367-57.49567756h229.91550333c28.73103684 0 57.46207369 22.98482964 57.46207367 57.46207368v229.94910635c0 28.73103684-28.73103684 57.46207369-57.46207367 57.46207452z" horiz-adv-x="1024" />
|
<glyph glyph-name="project" unicode="" d="M362.56500388 769.0967058H132.61589754C103.88486069 769.0967058 75.15382385 746.14548002 75.15382385 711.63463211v-229.91550247c0-28.73103684 22.98482964-57.46207369 57.46207369-57.46207453h229.94910634c28.73103684 0 57.46207369 22.98482964 57.46207452 57.46207453V711.63463211c0 34.47724403-22.98482964 57.46207369-57.46207452 57.46207369z m569.04254983-126.45016564l-160.96101355 160.96101354c-22.98482964 22.98482964-57.46207369 22.98482964-80.44690417 0l-160.96101354-160.96101354c-22.98482964-22.98482964-22.98482964-63.20828172 0-80.44690417l160.96101354-160.96101355c22.98482964-22.98482964 57.46207369-22.98482964 80.44690417 0l160.96101355 160.96101355c22.98482964 17.23862244 22.98482964 57.46207369 0 80.44690417zM362.56500388 292.02707840999994H132.61589754c-28.76464072 0-57.49567755-22.98482964-57.49567757-57.46207453v-229.91550247C75.15382385-24.115139310000018 98.13865349-52.84617615000002 132.61589754-52.84617615000002h229.94910634c28.73103684 0 57.46207369 22.98482964 57.46207452 57.46207369v229.94910634c0 28.73103684-22.98482964 57.46207369-57.46207452 57.46207452z m482.81583543-1e-8H615.49893986c-28.73103684 0-57.46207369-22.98482964-57.46207367-57.46207452v-229.91550247c0-28.76464072 22.98482964-57.49567755 57.46207367-57.49567756h229.91550333c28.73103684 0 57.46207369 22.98482964 57.46207367 57.46207368v229.94910635c0 28.73103684-28.73103684 57.46207369-57.46207367 57.46207452z" horiz-adv-x="1024" />
|
||||||
|
|
||||||
|
|
||||||
<glyph glyph-name="overview-endpoint" unicode="" d="M307.44126174 477.66410555h441.66154939c15.2202309 0 28.92874574-9.27643889 34.6320375-23.43159654l97.60874895-243.38626354a37.31189714 37.31189714 0 0 0-34.70075199-51.26091318H201.68986164a37.31189714 37.31189714 0 0 0-34.21975148 52.22291422l105.82011459 243.42062032c5.87507752 13.60544356 19.34309211 22.43523871 34.21975148 22.43523872z m-94.3791743-273.27701033h622.58646066l-91.59624244 228.4752474H312.31998144l-99.29225078-228.4752474zM531.31264646 682.26111267c12.36858456 0 22.40088101-10.03229644 22.40088194-22.400881v-182.16176933h96.81853274c22.91623924 63.11413951 59.33484984 108.22511718 109.59940519 134.78321802a22.40088101 22.40088101 0 0 0 20.92352266-39.64818618c-35.59403854-18.7590203-63.14849721-50.3676257-82.38851806-95.13503184h50.4363402c15.2202309 0 28.92874574-9.27643889 34.6320375-23.46595333l97.60874895-243.38626354a37.31189714 37.31189714 0 0 0-34.70075199-51.26091318H201.68986164a37.31189714 37.31189714 0 0 0-34.21975148 52.22291422l105.82011459 243.42062033c5.87507752 13.60544356 19.34309211 22.43523871 34.21975148 22.43523871l40.71325757 0.03435679c-19.24002084 44.76740521-46.76012179 76.37601154-82.35416034 95.16938862A22.40088101 22.40088101 0 0 0 286.79259611 612.44732266c50.26455443-26.55809992 86.68316502-71.6690776 109.59940426-134.78321711h112.55412188V659.86023167c0 11.23479775 8.31443784 20.54559341 19.10259278 22.12602396zM868.76886954 204.38709522c12.36858456 0 22.40088101-10.03229644 22.400881-22.400881v-209.06344079c0-20.61430791-16.73194696-37.31189714-37.34625486-37.31189808H193.8220666c-20.61430791 0-37.34625486 16.69758924-37.34625391 37.31189808v209.06344079c0 12.36858456 10.03229644 22.40088101 22.400881 22.400881h689.89217585zM201.24321791 159.61969001v-179.17269402h645.09041293v179.17269402H201.24321791zM868.76886954 189.92272280999998c12.36858456 0 22.40088101-10.03229644 22.400881-22.40088193v-209.0634408c0-20.61430791-16.73194696-37.31189714-37.34625486-37.31189714H193.8220666c-20.61430791 0-37.34625486 16.69758924-37.34625391 37.31189714V167.52184088c0 12.36858456 10.03229644 22.40088101 22.400881 22.40088193h689.89217585zM255.69934804 67.47373256000003a26.11145711 26.11145711 0 1 1 0-52.22291331h525.73356926a26.11145711 26.11145711 0 0 1 0 52.22291331H255.69934804zM217.73466459 734.5183836799999a97.05903394 97.05903394 0 1 0 0-194.11806787 97.05903394 97.05903394 0 0 0 0 194.11806787z m627.19032146 0a97.05903394 97.05903394 0 1 0 0-194.11806787 97.05903394 97.05903394 0 0 0 0 194.11806787zM531.31264646 853.97829861a97.05903394 97.05903394 0 1 0 0-194.11806694 97.05903394 97.05903394 0 0 0 0 194.11806694z" horiz-adv-x="1060" />
|
|
||||||
|
|
||||||
|
|
||||||
<glyph glyph-name="overview-alert" unicode="" d="M186.19730346 58.744870770000034h651.60539308v-97.01608731H186.19730346v97.01608731zM486.42537434 834.93798828h51.14925132v-111.70378142h-51.14925132V834.93798828z m386.26059644-308.02285547l-30.14842536 41.32524489 90.28422697 65.83694629L962.93798828 592.7842885800001l-90.2520175-65.86915577z m-721.37194156 0l30.14842537 41.32524489L91.24264745 634.07732399 61.06201172 592.7842885800001l90.2520175-65.86915577z m623.1962998-131.06190544a262.5425385 262.5425385 0 0 1-525.05286752 0c0-5.79777401 0.48314747-11.46670921 0.83745614-17.16785391-0.25767848-2.86667709-0.83745614-5.60451537-0.83745614-8.56782178v-263.44441447H774.51032902v263.47662483c0 2.89888744-0.54756731 5.66893434-0.80524666 8.53561142 0.32209831 5.70114469 0.80524666 11.37007903 0.80524666 17.16785391z m-118.62890128 34.46454575c0 90.05875798-94.92244654 108.09627752-98.98088842 108.83710433l7.40826732 41.35745613c46.18893432-8.27793294 133.54206437-50.34400553 133.54206437-150.19456046h-41.96944327z" horiz-adv-x="1024" />
|
<glyph glyph-name="overview-alert" unicode="" d="M186.19730346 58.744870770000034h651.60539308v-97.01608731H186.19730346v97.01608731zM486.42537434 834.93798828h51.14925132v-111.70378142h-51.14925132V834.93798828z m386.26059644-308.02285547l-30.14842536 41.32524489 90.28422697 65.83694629L962.93798828 592.7842885800001l-90.2520175-65.86915577z m-721.37194156 0l30.14842537 41.32524489L91.24264745 634.07732399 61.06201172 592.7842885800001l90.2520175-65.86915577z m623.1962998-131.06190544a262.5425385 262.5425385 0 0 1-525.05286752 0c0-5.79777401 0.48314747-11.46670921 0.83745614-17.16785391-0.25767848-2.86667709-0.83745614-5.60451537-0.83745614-8.56782178v-263.44441447H774.51032902v263.47662483c0 2.89888744-0.54756731 5.66893434-0.80524666 8.53561142 0.32209831 5.70114469 0.80524666 11.37007903 0.80524666 17.16785391z m-118.62890128 34.46454575c0 90.05875798-94.92244654 108.09627752-98.98088842 108.83710433l7.40826732 41.35745613c46.18893432-8.27793294 133.54206437-50.34400553 133.54206437-150.19456046h-41.96944327z" horiz-adv-x="1024" />
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 129 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -355,6 +355,8 @@
|
|||||||
viewAssetState: false,
|
viewAssetState: false,
|
||||||
|
|
||||||
scrollbarWrap: null,
|
scrollbarWrap: null,
|
||||||
|
delFlag:false,
|
||||||
|
tableDataInitNum:0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -636,6 +638,7 @@
|
|||||||
deleteMessage() {
|
deleteMessage() {
|
||||||
this.$refs.remarkForm.validate(valid => {
|
this.$refs.remarkForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.delFlag=true;
|
||||||
this.$emit('deleteMessage',this.deleteBox,()=>{
|
this.$emit('deleteMessage',this.deleteBox,()=>{
|
||||||
this.deleteBox.ids=[];
|
this.deleteBox.ids=[];
|
||||||
bus.$emit("alert-message-change")
|
bus.$emit("alert-message-change")
|
||||||
@@ -785,6 +788,10 @@
|
|||||||
tableDataSort(item){
|
tableDataSort(item){
|
||||||
this.$emit('tableDataSort',item);
|
this.$emit('tableDataSort',item);
|
||||||
},
|
},
|
||||||
|
pageNo(val) {
|
||||||
|
this.pageObj.pageNo = val;
|
||||||
|
this.getTableData();
|
||||||
|
},
|
||||||
// label tooltip是否显示
|
// label tooltip是否显示
|
||||||
labelToolTipDis(labelType){
|
labelToolTipDis(labelType){
|
||||||
switch(labelType){
|
switch(labelType){
|
||||||
@@ -844,6 +851,23 @@
|
|||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep:true,
|
deep:true,
|
||||||
|
},
|
||||||
|
tableData: {
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||||
|
this.pageNo(this.pageObj.pageNo-1);
|
||||||
|
}
|
||||||
|
if(!this.delFlag){
|
||||||
|
this.$refs.alertListTable.bodyWrapper.scrollTop = 0
|
||||||
|
}
|
||||||
|
this.tableDataInitNum++;//因为异步加载的问题导致该表格加载三次 只有最后一次是稳定 故只有第三次是去除是否删除的标记
|
||||||
|
if(this.tableDataInitNum===2){
|
||||||
|
this.tableDataInitNum=0;
|
||||||
|
this.delFlag=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
@@ -715,6 +715,14 @@
|
|||||||
this.getAlertList();
|
this.getAlertList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
tableData: {
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||||
|
this.pageNo(this.pageObj.pageNo-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
//是否存在分页缓存
|
//是否存在分页缓存
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
cancelButtonText: this.$t("tip.no"),
|
cancelButtonText: this.$t("tip.no"),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
this.$emit('before');
|
||||||
let params=this.filterParam();
|
let params=this.filterParam();
|
||||||
this.$delete(this.api+params).then(response => {
|
this.$delete(this.api+params).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
|
|||||||
@@ -339,7 +339,7 @@
|
|||||||
left: -120px;
|
left: -120px;
|
||||||
}
|
}
|
||||||
.passwordChange{
|
.passwordChange{
|
||||||
margin-left: 30px;
|
margin-left: 30px !important;
|
||||||
width: calc(100% - 30px);
|
width: calc(100% - 30px) !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</export-excel>
|
</export-excel>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" api="alert/rule" v-has="'rule_delete'"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true" api="alert/rule" v-has="'rule_delete'"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination-top pagination-top-hide display-none"></div>
|
<div class="pagination-top pagination-top-hide display-none"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -289,6 +289,7 @@
|
|||||||
viewAsset: false,
|
viewAsset: false,
|
||||||
searchTime: bus.getTimezontDateRange(),
|
searchTime: bus.getTimezontDateRange(),
|
||||||
scrollbarWrap: null,
|
scrollbarWrap: null,
|
||||||
|
delFlag:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -307,6 +308,7 @@
|
|||||||
closeRightBox(refresh) {
|
closeRightBox(refresh) {
|
||||||
this.rightBox.show = false;
|
this.rightBox.show = false;
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
|
this.delFlag=true;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -318,6 +320,7 @@
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$delete("alert/rule?ids=" + u.id).then(response => {
|
this.$delete("alert/rule?ids=" + u.id).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
|
this.delFlag=true;
|
||||||
this.$message({type: 'success', message: this.$t("tip.deleteSuccess")});
|
this.$message({type: 'success', message: this.$t("tip.deleteSuccess")});
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
} else {
|
} else {
|
||||||
@@ -503,6 +506,19 @@
|
|||||||
this.bottomBox.ruleDetail = this.convertToDetail(n);
|
this.bottomBox.ruleDetail = this.convertToDetail(n);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
tableData: {
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||||
|
this.pageNo(this.pageObj.pageNo-1);
|
||||||
|
}
|
||||||
|
if(!this.delFlag){ // 不是删除时回到顶部
|
||||||
|
this.$refs.alertRuleTable.bodyWrapper.scrollTop = 0
|
||||||
|
}else{
|
||||||
|
this.delFlag=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
bus.$off("alert-rule-list-change");
|
bus.$off("alert-rule-list-change");
|
||||||
|
|||||||
@@ -691,6 +691,14 @@
|
|||||||
showSubList(n) {
|
showSubList(n) {
|
||||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||||
},
|
},
|
||||||
|
tableData: {
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||||
|
this.pageNo(this.pageObj.pageNo-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
//是否存在分页缓存
|
//是否存在分页缓存
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<button :title="$t('overall.batchEdit')" @click.stop="batchEdit" class="nz-btn nz-btn-size-normal nz-btn-style-light" id="asset-batch-asset" style="margin-left: 15px" v-has="'asset_toBatchEdit'">
|
<button :title="$t('overall.batchEdit')" @click.stop="batchEdit" class="nz-btn nz-btn-size-normal nz-btn-style-light" id="asset-batch-asset" style="margin-left: 15px" v-has="'asset_toBatchEdit'">
|
||||||
<i class="nz-icon nz-icon-batch-edit"></i>
|
<i class="nz-icon nz-icon-batch-edit"></i>
|
||||||
</button>
|
</button>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" @after="afterTableListChange" api="asset" v-has="'asset_delete'"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true" api="asset" v-has="'asset_delete'"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination-top pagination-top-hide display-none"></div>
|
<div class="pagination-top pagination-top-hide display-none"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -388,11 +388,11 @@
|
|||||||
idcId: '',
|
idcId: '',
|
||||||
idcIds: ''
|
idcIds: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
assetPingSwitch: localStorage.getItem('nz-sys-asset-ping-switch'),
|
assetPingSwitch: localStorage.getItem('nz-sys-asset-ping-switch'),
|
||||||
tagKeys:[],
|
tagKeys:[],
|
||||||
|
|
||||||
scrollbarWrap: null
|
scrollbarWrap: null,
|
||||||
|
delFlag:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
@@ -426,6 +426,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
tableData: {
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||||
|
this.pageNo(this.pageObj.pageNo-1);
|
||||||
|
}else if(n.length === 0 && this.pageObj.pageNo === 1){
|
||||||
|
this.afterTableListChange();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!this.delFlag){ // 不是删除时回到顶部
|
||||||
|
this.$refs.assetTable.bodyWrapper.scrollTop = 0
|
||||||
|
}else{
|
||||||
|
this.delFlag=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fullScreen() {
|
fullScreen() {
|
||||||
@@ -545,7 +563,8 @@
|
|||||||
this.$delete("asset?ids=" + asset.id).then(response => {
|
this.$delete("asset?ids=" + asset.id).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.$message({duration: 2000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
||||||
this.afterTableListChange()
|
this.delFlag=true;
|
||||||
|
this.getTableData()
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(response.msg);
|
this.$message.error(response.msg);
|
||||||
}
|
}
|
||||||
@@ -583,7 +602,8 @@
|
|||||||
this.rightBox.show = false;
|
this.rightBox.show = false;
|
||||||
this.rightBox.batchShow = false;
|
this.rightBox.batchShow = false;
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
this.afterTableListChange()
|
this.delFlag=true;
|
||||||
|
this.getTableData()
|
||||||
this.loadKeys();
|
this.loadKeys();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="account-add">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="account-add">
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" :filter-function="(arr)=>{return '?userIds='+arr.map(t=>t.userId).join(',')}" @after="getTableData" api="sys/user/delete" v-has="'account_delete'"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" :filter-function="(arr)=>{return '?userIds='+arr.map(t=>t.userId).join(',')}" @after="getTableData" api="sys/user/delete" v-has="'account_delete'" @before="delFlag=true"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 顶部分页组件,当打开底部上滑框时出现 -->
|
<!-- 顶部分页组件,当打开底部上滑框时出现 -->
|
||||||
<div class="pagination-top pagination-top-hide display-none"></div>
|
<div class="pagination-top pagination-top-hide display-none"></div>
|
||||||
@@ -250,6 +250,7 @@
|
|||||||
},
|
},
|
||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
scrollbarWrap: null,
|
scrollbarWrap: null,
|
||||||
|
delFlag:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -280,6 +281,8 @@
|
|||||||
closeRightBox(refresh) {
|
closeRightBox(refresh) {
|
||||||
this.rightBox.show = false;
|
this.rightBox.show = false;
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
|
this.delFlag=true;
|
||||||
|
this.delFlag=true;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -301,6 +304,7 @@
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$delete("sys/user/delete?userIds=" + u.userId).then(response => {
|
this.$delete("sys/user/delete?userIds=" + u.userId).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
|
this.delFlag=true;
|
||||||
this.$message({duration: 2000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
} else {
|
} else {
|
||||||
@@ -452,6 +456,21 @@
|
|||||||
let vm = this;
|
let vm = this;
|
||||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||||
},
|
},
|
||||||
|
tableData: {
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||||
|
this.pageNo(this.pageObj.pageNo-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!this.delFlag){ // 不是删除时回到顶部
|
||||||
|
this.$refs.accountTable.bodyWrapper.scrollTop = 0
|
||||||
|
}else{
|
||||||
|
this.delFlag=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
//是否存在分页缓存
|
//是否存在分页缓存
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="dc-add">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="dc-add">
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" api="idc" v-has="'dc_delete'"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" @before="delFlag=true" @after="getTableData" api="idc" v-has="'dc_delete'"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination-top pagination-top-hide display-none"></div>
|
<div class="pagination-top pagination-top-hide display-none"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -269,6 +269,7 @@
|
|||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
tabShow: 1, // 控制显示一级页面和二级页面 1 dc 2cabinet
|
tabShow: 1, // 控制显示一级页面和二级页面 1 dc 2cabinet
|
||||||
scrollbarWrap: null,
|
scrollbarWrap: null,
|
||||||
|
delFlag:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
@@ -366,6 +367,7 @@
|
|||||||
closeDcBox(refresh) {
|
closeDcBox(refresh) {
|
||||||
this.rightBox.dc.show = false;
|
this.rightBox.dc.show = false;
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
|
this.delFlag=true;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
bus.$emit("dc-list-change");
|
bus.$emit("dc-list-change");
|
||||||
}
|
}
|
||||||
@@ -373,6 +375,7 @@
|
|||||||
closeTrafficBox(refresh) {
|
closeTrafficBox(refresh) {
|
||||||
this.rightBox.trafficSetting.show = false;
|
this.rightBox.trafficSetting.show = false;
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
|
this.delFlag=true;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -384,6 +387,7 @@
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$delete("idc?ids=" + u.id).then(response => {
|
this.$delete("idc?ids=" + u.id).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
|
this.delFlag=true;
|
||||||
this.$message({duration: 1000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
bus.$emit("dc-list-change");
|
bus.$emit("dc-list-change");
|
||||||
@@ -510,6 +514,20 @@
|
|||||||
let vm = this;
|
let vm = this;
|
||||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||||
},
|
},
|
||||||
|
tableData: {
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||||
|
this.pageNo(this.pageObj.pageNo-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!this.delFlag){ // 不是删除时回到顶部
|
||||||
|
this.$refs.dcTable.bodyWrapper.scrollTop = 0
|
||||||
|
}else{
|
||||||
|
this.delFlag=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy(){
|
beforeDestroy(){
|
||||||
bus.$off("dc-list-change");
|
bus.$off("dc-list-change");
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
id="menus-add" type="button">
|
id="menus-add" type="button">
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" :filter-function="(arr)=>{return '?ids='+arr.map(t=>t.id).join(',')}" @after="getTableData" api="sys/menu"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" :filter-function="(arr)=>{return '?ids='+arr.map(t=>t.id).join(',')}" @before="delFlag=true" @after="getTableData" api="sys/menu"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 顶部分页组件,当打开底部上滑框时出现 -->
|
<!-- 顶部分页组件,当打开底部上滑框时出现 -->
|
||||||
<div class="pagination-top pagination-top-hide display-none"></div>
|
<div class="pagination-top pagination-top-hide display-none"></div>
|
||||||
@@ -206,12 +206,14 @@
|
|||||||
},
|
},
|
||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
scrollbarWrap: null,
|
scrollbarWrap: null,
|
||||||
|
delFlag:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeRightBox(refresh) {
|
closeRightBox(refresh) {
|
||||||
this.rightBox.show = false;
|
this.rightBox.show = false;
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
|
this.delFlag=true;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -233,6 +235,7 @@
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$delete("sys/menu?ids=" + u.id).then(response => {
|
this.$delete("sys/menu?ids=" + u.id).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
|
this.delFlag=true;
|
||||||
this.$message({duration: 2000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
} else {
|
} else {
|
||||||
@@ -305,6 +308,24 @@
|
|||||||
this.getTableData();
|
this.getTableData();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
watch:{
|
||||||
|
tableData: {
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||||
|
this.pageNo(this.pageObj.pageNo-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!this.delFlag){ // 不是删除时回到顶部
|
||||||
|
this.$refs.menusTable.bodyWrapper.scrollTop = 0
|
||||||
|
}else{
|
||||||
|
this.delFlag=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
created(){
|
created(){
|
||||||
//是否存在分页缓存
|
//是否存在分页缓存
|
||||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<button :title="$t('overall.createMib')" @click="add" class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="mib-add" type="button" v-has="'snmp_file_toAdd'">
|
<button :title="$t('overall.createMib')" @click="add" class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="mib-add" type="button" v-has="'snmp_file_toAdd'">
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" api="mib" v-has="'snmp_file_delete'"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true" api="mib" v-has="'snmp_file_delete'"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 自定义table列 -->
|
<!-- 自定义table列 -->
|
||||||
@@ -205,6 +205,7 @@
|
|||||||
},
|
},
|
||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
scrollbarWrap: null,
|
scrollbarWrap: null,
|
||||||
|
delFlag:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -218,6 +219,7 @@
|
|||||||
closeRightBox(refresh) {
|
closeRightBox(refresh) {
|
||||||
this.rightBox.show = false;
|
this.rightBox.show = false;
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
|
this.delFlag=true;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -229,6 +231,7 @@
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$delete("mib?ids=" + u.id).then(response => {
|
this.$delete("mib?ids=" + u.id).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
|
this.delFlag=true;
|
||||||
this.$message({duration: 1000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
} else {
|
} else {
|
||||||
@@ -345,6 +348,21 @@
|
|||||||
this.getTableData();
|
this.getTableData();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
tableData: {
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||||
|
this.pageNo(this.pageObj.pageNo-1);
|
||||||
|
}
|
||||||
|
if(!this.delFlag){ // 不是删除时回到顶部
|
||||||
|
this.$refs.mibTable.bodyWrapper.scrollTop = 0
|
||||||
|
}else{
|
||||||
|
this.delFlag=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
created(){
|
created(){
|
||||||
//是否存在分页缓存
|
//是否存在分页缓存
|
||||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<button :title="$t('overall.createModel')" @click="add" class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="model-add" v-has="'model_toAdd'">
|
<button :title="$t('overall.createModel')" @click="add" class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="model-add" v-has="'model_toAdd'">
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" api="model" v-has="'model_delete'"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true" api="model" v-has="'model_delete'"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination-top pagination-top-hide display-none"></div>
|
<div class="pagination-top pagination-top-hide display-none"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -204,6 +204,7 @@
|
|||||||
},
|
},
|
||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
scrollbarWrap: null,
|
scrollbarWrap: null,
|
||||||
|
delFlag:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -248,6 +249,7 @@
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$delete("model?ids=" + u.id).then(response => {
|
this.$delete("model?ids=" + u.id).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
|
this.delFlag=true;
|
||||||
this.$message({duration: 1000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
} else {
|
} else {
|
||||||
@@ -266,6 +268,7 @@
|
|||||||
closeRightBox(refresh) {
|
closeRightBox(refresh) {
|
||||||
this.rightBox.show = false;
|
this.rightBox.show = false;
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
|
this.delFlag=true;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -365,6 +368,19 @@
|
|||||||
let vm = this;
|
let vm = this;
|
||||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||||
},
|
},
|
||||||
|
tableData: {
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||||
|
this.pageNo(this.pageObj.pageNo-1);
|
||||||
|
}
|
||||||
|
if(!this.delFlag){ // 不是删除时回到顶部
|
||||||
|
this.$refs.modelTable.bodyWrapper.scrollTop = 0
|
||||||
|
}else{
|
||||||
|
this.delFlag=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
|
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="prom-add">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="prom-add">
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" api="promServer" v-has="'prom_delete'"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true" api="promServer" v-has="'prom_delete'"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination-top pagination-top-hide display-none"></div>
|
<div class="pagination-top pagination-top-hide display-none"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -224,6 +224,7 @@
|
|||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
promServerType:null,
|
promServerType:null,
|
||||||
scrollbarWrap: null,
|
scrollbarWrap: null,
|
||||||
|
delFlag:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -276,6 +277,7 @@
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$delete("promServer?ids=" + u.id).then(response => {
|
this.$delete("promServer?ids=" + u.id).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
|
this.delFlag=true;
|
||||||
this.$message({duration: 1000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
} else {
|
} else {
|
||||||
@@ -296,6 +298,7 @@
|
|||||||
closeRightBox(refresh) {
|
closeRightBox(refresh) {
|
||||||
this.rightBox.show = false;
|
this.rightBox.show = false;
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
|
this.delFlag=true;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -445,6 +448,19 @@
|
|||||||
let vm = this;
|
let vm = this;
|
||||||
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
this.$bottomBoxWindow.showSubListWatch(vm, n);
|
||||||
},
|
},
|
||||||
|
tableData: {
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||||
|
this.pageNo(this.pageObj.pageNo-1);
|
||||||
|
}
|
||||||
|
if(!this.delFlag){ // 不是删除时回到顶部
|
||||||
|
this.$refs.promTable.bodyWrapper.scrollTop = 0
|
||||||
|
}else{
|
||||||
|
this.delFlag=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
id="roles-add" type="button">
|
id="roles-add" type="button">
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" :filter-function="(arr)=>{return '?ids='+arr.map(t=>t.id).join(',')}" @after="getTableData" api="sys/role" v-has="'role_delete'"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" :filter-function="(arr)=>{return '?ids='+arr.map(t=>t.id).join(',')}" @after="getTableData" @before="delFlag=true" api="sys/role" v-has="'role_delete'"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 顶部分页组件,当打开底部上滑框时出现 -->
|
<!-- 顶部分页组件,当打开底部上滑框时出现 -->
|
||||||
<div class="pagination-top pagination-top-hide display-none"></div>
|
<div class="pagination-top pagination-top-hide display-none"></div>
|
||||||
@@ -182,12 +182,14 @@
|
|||||||
},
|
},
|
||||||
searchLabel: {}, //搜索参数
|
searchLabel: {}, //搜索参数
|
||||||
scrollbarWrap: null,
|
scrollbarWrap: null,
|
||||||
|
delFlag:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeRightBox(refresh) {
|
closeRightBox(refresh) {
|
||||||
this.rightBox.show = false;
|
this.rightBox.show = false;
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
|
this.delFlag=true;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -210,6 +212,7 @@
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$delete("sys/role?ids=" + u.id).then(response => {
|
this.$delete("sys/role?ids=" + u.id).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
|
this.delFlag=true;
|
||||||
this.$message({duration: 2000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
} else {
|
} else {
|
||||||
@@ -293,6 +296,21 @@
|
|||||||
this.getTableData();
|
this.getTableData();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
tableData: {
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
if (n.length === 0 && this.pageObj.pageNo > 1) {
|
||||||
|
this.pageNo(this.pageObj.pageNo-1);
|
||||||
|
}
|
||||||
|
if(!this.delFlag){ // 不是删除时回到顶部
|
||||||
|
this.$refs.rolesTable.bodyWrapper.scrollTop = 0
|
||||||
|
}else{
|
||||||
|
this.delFlag=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
created(){
|
created(){
|
||||||
//是否存在分页缓存
|
//是否存在分页缓存
|
||||||
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</export-excel>
|
</export-excel>
|
||||||
<delete-button :delete-objs="batchDeleteObjs" @after="afterCloseImport" api="endpoint" v-has="'project_endpoint_delete'"></delete-button>
|
<delete-button :delete-objs="batchDeleteObjs" @after="afterCloseImport" @before="delFlag=true" api="endpoint" v-has="'project_endpoint_delete'"></delete-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination-top pagination-top-hide display-none"></div>
|
<div class="pagination-top pagination-top-hide display-none"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -379,7 +379,8 @@
|
|||||||
readonly:true,
|
readonly:true,
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
scrollbarWrap: null
|
scrollbarWrap: null,
|
||||||
|
delFlag:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
@@ -553,6 +554,7 @@
|
|||||||
}).then(()=>{
|
}).then(()=>{
|
||||||
this.$delete("endpoint?ids="+endpoint.id).then(response=>{
|
this.$delete("endpoint?ids="+endpoint.id).then(response=>{
|
||||||
if(response.code===200){
|
if(response.code===200){
|
||||||
|
this.delFlag=true;
|
||||||
this.$message({duration:1000,type:'success',message:this.$t("tip.deleteSuccess")});
|
this.$message({duration:1000,type:'success',message:this.$t("tip.deleteSuccess")});
|
||||||
this.getEndpointTableData();
|
this.getEndpointTableData();
|
||||||
}else{
|
}else{
|
||||||
@@ -836,6 +838,19 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
endpointTableData: {
|
||||||
|
deep: true,
|
||||||
|
handler(n) {
|
||||||
|
if (n.length === 0 && this.endpointPageObj.pageNo > 1) {
|
||||||
|
this.endpointPageNo(this.endpointPageObj.pageNo-1);
|
||||||
|
}
|
||||||
|
if(!this.delFlag){ // 不是删除时回到顶部 以及修改时
|
||||||
|
this.$refs.endpointTable.bodyWrapper.scrollTop = 0
|
||||||
|
}else{
|
||||||
|
this.delFlag=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
bus.$off("project-page-type");
|
bus.$off("project-page-type");
|
||||||
|
|||||||
Reference in New Issue
Block a user