fix: 修改手机号

This commit is contained in:
wenyann 2021-02-01 18:48:56 +08:00
parent 6cc2b73d67
commit 89d060b40c
1 changed files with 23 additions and 122 deletions

View File

@ -343,17 +343,7 @@ export default {
handleBatchMove() {
this.$refs.testCaseBatchMove.open(this.moduleTree, [], this.moduleOptions);
},
moveSave(param) {
param.projectId = getCurrentProjectID();
param.selectAllDate = this.isSelectAllDate;
param.unSelectIds = this.unSelection;
param = Object.assign(param, this.condition);
param.moduleId=param.nodeId;
this.$post('/api/definition/batch/editByParams', param, () => {
this.$success(this.$t('commons.save_success'));
this.initTable();
});
},
isApiListEnableChange(data) {
this.$emit('isApiListEnableChange', data);
},
@ -594,6 +584,21 @@ export default {
this.initTable();
});
},
moveSave(param) {
let arr = Array.from(this.selectRows);
let ids = arr.map(row => row.id);
param.ids = ids;
param.projectId = getCurrentProjectID();
param.selectAllDate = this.isSelectAllDate;
param.unSelectIds = this.unSelection;
param = Object.assign(param, this.condition);
param.moduleId=param.nodeId;
this.$post('/api/definition/batch/editByParams', param, () => {
this.$success(this.$t('commons.save_success'));
this.$refs.testCaseBatchMove.close();
this.initTable();
});
},
handleTestCase(api) {
this.selectApi = api;
let request = {};
@ -688,121 +693,17 @@ export default {
_filter(filters, this.condition);
this.initTable();
},
labelHead(h,{column,index}){
if(column.minWidth>column.realWidth){
column.realWidth = column.minWidth;
column.width = column.minWidth;
}
return column.label;
},
open() {
this.$refs.searchBar.open();
}
},
}
this.$post('/api/definition/batch/editByParams', param, () => {
this.$success(this.$t('commons.save_success'));
this.initTable();
});
},
handleTestCase(api) {
this.selectApi = api;
let request = {};
if (Object.prototype.toString.call(api.request).match(/\[object (\w+)\]/)[1].toLowerCase() === 'object') {
request = api.request;
} else {
request = JSON.parse(api.request);
}
if (!request.hashTree) {
request.hashTree = [];
}
this.selectApi.url = request.path;
this.$refs.caseList.open(this.selectApi);
},
handleDelete(api) {
if (this.trashEnable) {
this.$get('/api/definition/delete/' + api.id, () => {
this.$success(this.$t('commons.delete_success'));
this.initTable();
});
return;
}
this.$alert(this.$t('api_test.definition.request.delete_confirm') + ' ' + api.name + " ", '', {
confirmButtonText: this.$t('commons.confirm'),
callback: (action) => {
if (action === 'confirm') {
let ids = [api.id];
this.$post('/api/definition/removeToGc/', ids, () => {
this.$success(this.$t('commons.delete_success'));
this.initTable();
this.$refs.caseList.apiCaseClose();
});
}
}
});
},
getColor(enable, method) {
if (enable) {
return this.methodColorMap.get(method);
}
},
showExecResult(row) {
this.$emit('showExecResult', row);
},
selectRowsCount(selection) {
let selectedIDs = this.getIds(selection);
let allIDs = this.tableData.map(s => s.id);
this.unSelection = allIDs.filter(function (val) {
return selectedIDs.indexOf(val) === -1
});
if (this.isSelectAllDate) {
this.selectDataCounts = this.total - this.unSelection.length;
} else {
this.selectDataCounts = selection.size;
}
},
isSelectDataAll(dataType) {
this.isSelectAllDate = dataType;
this.selectRowsCount(this.selectRows)
//
if (this.selectRows.size != this.tableData.length) {
this.$refs.apiDefinitionTable.toggleAllSelection(true);
}
},
//
getSelectDataRange() {
let dataRange = this.$route.params.dataSelectRange;
let dataType = this.$route.params.dataType;
if (dataType === 'api') {
this.selectDataRange = dataRange;
} else {
this.selectDataRange = 'all';
}
},
changeSelectDataRangeAll() {
this.$emit("changeSelectDataRangeAll", "api");
},
getIds(rowSets) {
let rowArray = Array.from(rowSets)
let ids = rowArray.map(s => s.id);
return ids;
},
sort(column) {
//
if (this.condition.orders) {
this.condition.orders = [];
}
_sort(column, this.condition);
this.initTable();
},
filter(filters) {
_filter(filters, this.condition);
this.initTable();
},
labelHead(h,{column,index}){
if(column.minWidth>column.realWidth){
column.realWidth = column.minWidth;
column.width = column.minWidth;
}
return column.label;
},
open() {
this.$refs.searchBar.open();
}
},
}
</script>