fix:项目不分页数据访问统一设置pageSize为-1
This commit is contained in:
@@ -396,7 +396,7 @@
|
||||
}
|
||||
},
|
||||
getAssetData() {
|
||||
this.$get('idc', this.pageObj).then(response => {
|
||||
this.$get('idc', {pageSize:-1}).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.assetData = response.data.list
|
||||
this.assetData.forEach(item => {
|
||||
@@ -418,7 +418,7 @@
|
||||
})
|
||||
},
|
||||
getProjectList() {
|
||||
this.$get('project', {}).then(response => {
|
||||
this.$get('project', {pageSize:-1}).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.projectData = response.data.list;
|
||||
let flag = false;
|
||||
|
||||
@@ -668,8 +668,8 @@ const cn = {
|
||||
},
|
||||
alert: {
|
||||
alert: "告警",
|
||||
message: "信息",
|
||||
rule: "规则",
|
||||
message: "告警信息",
|
||||
rule: "告警规则",
|
||||
alertList: "告警信息",
|
||||
alertConfig: "告警规则",
|
||||
alertName: "告警名称",
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
editParamBox: {show: false, top: 0, left: 0, type: 0}, //param编辑弹框
|
||||
moduleParamShow: false, //module默认参数param悬浮窗
|
||||
assetSearch: {host: '', sn: '', text: '', label: 'IP', dropdownShow: false}, //侧滑框中asset的搜索相关
|
||||
assetPageObj: {pageNo: 1, pageSize: 9999},
|
||||
assetPageObj: {pageNo: 1, pageSize: -1},
|
||||
selectedAssets: [], //侧滑框中选中的asset
|
||||
projectList: [],
|
||||
moduleList: [],
|
||||
@@ -402,7 +402,7 @@
|
||||
|
||||
/*获取project列表*/
|
||||
getProjectList() {
|
||||
this.$get('project', {pageSize: 999, pageNo: 1}).then(response => {
|
||||
this.$get('project', {pageSize: -1, pageNo: 1}).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.projectList = response.data.list;
|
||||
if (this.moduleList.length == 0) {
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
},
|
||||
|
||||
getProjectList() {
|
||||
this.$get('project', {pageNo: 1, pageSize: 9999}).then(response => {
|
||||
this.$get('project', {pageNo: 1, pageSize: -1}).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.linkObjList = response.data.list;
|
||||
}
|
||||
@@ -328,7 +328,7 @@
|
||||
},
|
||||
|
||||
getModuleList() {
|
||||
this.$get('module', {pageNo: 1, pageSize: 9999}).then(response => {
|
||||
this.$get('module', {pageNo: 1, pageSize: -1}).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.linkObjList = response.data.list;
|
||||
}
|
||||
@@ -336,7 +336,7 @@
|
||||
},
|
||||
|
||||
getAssetList() {
|
||||
this.$get('asset', {pageNo: 1, pageSize: 9999}).then(response => {
|
||||
this.$get('asset', {pageNo: 1, pageSize: -1}).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.linkObjList = response.data.list;
|
||||
}
|
||||
|
||||
@@ -706,7 +706,7 @@
|
||||
},
|
||||
getAllModelOptionData(data) {
|
||||
this.assetData.assetType = this.assetType;
|
||||
this.$get('model?typeCode=' + this.assetType + '&pageNo=1&pageSize=999').then(response => {
|
||||
this.$get('model?typeCode=' + this.assetType + '&pageNo=1&pageSize=-1').then(response => {
|
||||
if (response.code === 200) {
|
||||
this.allModelUlData = response.data.list
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
|
||||
/*获取project列表*/
|
||||
getProjectList() {
|
||||
this.$get('project', {pageSize: 999, pageNo: 1}).then(response => {
|
||||
this.$get('project', {pageSize: -1, pageNo: 1}).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.projectList = response.data.list;
|
||||
if ((!this.currentProject || !this.currentProject.id) && this.projectList.length > 0) {
|
||||
|
||||
@@ -495,21 +495,21 @@
|
||||
}
|
||||
},
|
||||
getDcData() {
|
||||
this.$get('idc', {pageNo: 1, pageSize: 999}).then(response => {
|
||||
this.$get('idc', {pageNo: 1, pageSize: -1}).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.dcSelect = response.data.list;
|
||||
}
|
||||
});
|
||||
},
|
||||
getAssetData() {
|
||||
this.$get('asset', {pageNo: 1, pageSize: 999}).then(response => {
|
||||
this.$get('asset', {pageNo: 1, pageSize: -1}).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.assetSelect = response.data.list;
|
||||
}
|
||||
});
|
||||
},
|
||||
getModelData() {
|
||||
this.$get('asset', {pageNo: 1, pageSize: 999}).then(response => {
|
||||
this.$get('asset', {pageNo: 1, pageSize: -1}).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.assetSelect = response.data.list;
|
||||
}
|
||||
|
||||
@@ -777,7 +777,7 @@
|
||||
},
|
||||
getAllModelOptionData(data) {
|
||||
this.assetData.assetType = this.assetType;
|
||||
this.$get('model?typeCode=' + this.assetType + '&pageNo=1&pageSize=999').then(response => {
|
||||
this.$get('model?typeCode=' + this.assetType + '&pageNo=1&pageSize=-1').then(response => {
|
||||
if (response.code === 200) {
|
||||
this.allModelUlData = response.data.list
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ export default {
|
||||
moduleList: [],
|
||||
pageObj: {
|
||||
pageNo: 1,
|
||||
pageSize: 999,
|
||||
pageSize: -1,
|
||||
name: '',
|
||||
assetId: this.assetId
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-min-width-100" @click="resetForm('basicForm')" style="top:2px">{{$t('overall.reset')}}</el-button>
|
||||
<el-button class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-min-width-100" @click="resetForm('basicForm')" style="top:2px">{{$t('overall.clear')}}</el-button>
|
||||
<el-button type="primary" @click="saveSetInfo('basic','basicForm')" class="nz-btn nz-btn-size-normal nz-btn-style-normal nz-btn-min-width-100">{{$t('overall.submit')}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -111,8 +111,8 @@
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-min-width-100" @click="resetForm('emailForm')" style="top:2px">{{$t('overall.reset')}}</el-button>
|
||||
<el-button class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-min-width-100" @click="testSetInfo('email','emailForm')" style="top:2px">{{$t('config.system.email.testConnection')}}</el-button>
|
||||
<el-button class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-min-width-100" @click="resetForm('emailForm')" style="top:2px">{{$t('overall.clear')}}</el-button>
|
||||
<el-button class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-min-width-100" :class="{'nz-btn-disabled':email.email_enable == 'off'}" :disabled="email.email_enable == 'off'" @click="testSetInfo('email','emailForm')" style="top:2px">{{$t('config.system.email.testConnection')}}</el-button>
|
||||
<el-button type="primary" @click="saveSetInfo('email','emailForm')" class="nz-btn nz-btn-size-normal nz-btn-style-normal nz-btn-min-width-100">{{$t('overall.submit')}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -155,7 +155,7 @@
|
||||
<el-input v-model="ldap.ldap_mapping"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-min-width-100" @click="resetForm('ldapForm')" style="top:2px">{{$t('overall.reset')}}</el-button>
|
||||
<el-button class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-min-width-100" @click="resetForm('ldapForm')" style="top:2px">{{$t('overall.clear')}}</el-button>
|
||||
<el-button class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-min-width-100" @click="testSetInfo('ldap','ldapForm')" style="top:2px">{{$t('config.system.email.testConnection')}}</el-button>
|
||||
<el-button type="primary" @click="saveSetInfo('ldap','ldapForm')" class="nz-btn nz-btn-size-normal nz-btn-style-normal nz-btn-min-width-100">{{$t('overall.submit')}}</el-button>
|
||||
</el-form-item>
|
||||
@@ -358,6 +358,9 @@
|
||||
for(let key in sets){
|
||||
this[type][key]=sets[key];
|
||||
}
|
||||
if(type == 'email'){
|
||||
this.$refs.emailForm.clearValidate();
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -610,7 +610,7 @@
|
||||
getModuleList() {
|
||||
//若currentProject不存在(如页面刷新了),默认取project列表的第一个
|
||||
if (this.currentProject && this.currentProject.id) {
|
||||
this.$get('module', {projectId: this.currentProject.id, pageSize: 999, pageNo: 1}).then(response => {
|
||||
this.$get('module', {projectId: this.currentProject.id, pageSize: -1, pageNo: 1}).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.moduleList = response.data.list;
|
||||
for (let i = 0; i < this.moduleList.length; i++) {
|
||||
@@ -635,7 +635,7 @@
|
||||
if (this.projectList && this.projectList.length > 0) {
|
||||
this.$store.commit('setProject', this.projectList[0]);
|
||||
} else {
|
||||
this.$get('project', {pageSize: 999, pageNo: 1}).then(response => {
|
||||
this.$get('project', {pageSize: -1, pageNo: 1}).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.projectList = response.data.list;
|
||||
if (this.projectList.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user