fix(通用设置): 版本对比时间取自版本创建时间
--user=郭雨琦 --bug=1012716 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001012716
This commit is contained in:
parent
c8522ee402
commit
10f6a57b3f
|
@ -359,6 +359,9 @@
|
|||
:old-enable-cookie-share="enableCookieShare"
|
||||
:old-on-sample-error="onSampleError"
|
||||
:project-list="projectList"
|
||||
:new-create-time="newCreateTime"
|
||||
:old-create-time="oldCreateTime"
|
||||
:old-user-name="oldUserName"
|
||||
:type="type"/>
|
||||
</el-dialog>
|
||||
|
||||
|
@ -556,6 +559,9 @@ export default {
|
|||
},
|
||||
],
|
||||
reloadTree: "",
|
||||
newCreateTime:0,
|
||||
oldCreateTime:0,
|
||||
oldUserName:''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -1977,6 +1983,9 @@ export default {
|
|||
compare(row) {
|
||||
this.scenarioRefId = this.currentScenario.refId;
|
||||
this.dffScenarioId = row.id;
|
||||
this.newCreateTime = row.createTime
|
||||
this.oldUserName = this.currentScenario.userName
|
||||
this.oldCreateTime = this.$refs.versionHistory.versionOptions.filter(v => v.id === this.currentScenario.versionId)[0].createTime;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
closeDiff() {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<ms-component-config
|
||||
:type="oldData.type"
|
||||
:scenario="oldData"
|
||||
:current-scenario="oldData"
|
||||
:node="oldNode"
|
||||
:env-map="oldProjectEnvMap"
|
||||
:show-version="false"
|
||||
|
@ -13,6 +14,7 @@
|
|||
<ms-component-config
|
||||
:type="newData.type"
|
||||
:scenario="newData"
|
||||
:current-scenario="newData"
|
||||
:node="newNode"
|
||||
:env-map="newProjectEnvMap"
|
||||
:show-version="false"
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-tag>当前{{ oldData.versionName }}</el-tag>
|
||||
<span style="margin-left: 10px">{{ oldData.userName }}</span><span style="margin-left: 10px">{{ oldData.createTime | timestampFormatDate }}</span>
|
||||
<span style="margin-left: 10px">{{ oldUserName }}</span><span style="margin-left: 10px">{{ oldCreateTime | timestampFormatDate }}</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-tag>{{ newData.versionName }}</el-tag>
|
||||
<span style="margin-left: 10px">{{ newData.userName }}</span><span style="margin-left: 10px">{{ newData.createTime | timestampFormatDate }}</span>
|
||||
<span style="margin-left: 10px">{{ newData.userName }}</span><span style="margin-left: 10px">{{ newCreateTime | timestampFormatDate }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="compare-class" v-loading="isReloadData">
|
||||
|
@ -150,6 +150,7 @@
|
|||
<ms-component-config
|
||||
:type="data.type"
|
||||
:scenario="data"
|
||||
:current-scenario="data"
|
||||
:node="node"
|
||||
:env-map="projectEnvMap"
|
||||
:project-list="projectList"
|
||||
|
@ -304,6 +305,7 @@
|
|||
<ms-component-config
|
||||
:type="data.type"
|
||||
:scenario="data"
|
||||
:current-scenario="data"
|
||||
:node="node"
|
||||
:env-map="newProjectEnvMap"
|
||||
:project-list="projectList"
|
||||
|
@ -391,6 +393,9 @@ export default {
|
|||
currentScenarioId: String,
|
||||
dffScenarioId: String,
|
||||
scenarioRefId: String,
|
||||
oldUserName: String,
|
||||
newCreateTime: Number,
|
||||
oldCreateTime: Number,
|
||||
},
|
||||
components: {
|
||||
ScenarioChildDiff,
|
||||
|
|
|
@ -246,10 +246,12 @@ export default {
|
|||
});
|
||||
},
|
||||
compare(row) {
|
||||
this.basisData.createTime = this.$refs.versionHistory.versionOptions.filter(v => v.id === this.basisData.versionId)[0].createTime;
|
||||
this.$get('/api/definition/get/' + row.id+"/"+this.basisData.refId, response => {
|
||||
this.$get('/api/definition/get/' + response.data.id, res => {
|
||||
if (res.data) {
|
||||
this.newData = res.data;
|
||||
this.newData.createTime = row.createTime;
|
||||
this.dealWithTag(res.data);
|
||||
this.setRequest(res.data)
|
||||
if (!this.setRequest(res.data)) {
|
||||
|
|
|
@ -569,10 +569,12 @@ export default {
|
|||
});
|
||||
},
|
||||
compare(row) {
|
||||
this.httpForm.createTime = this.$refs.versionHistory.versionOptions.filter(v => v.id === this.httpForm.versionId)[0].createTime;
|
||||
this.$get('/api/definition/get/' + row.id + "/" + this.httpForm.refId, response => {
|
||||
this.$get('/api/definition/get/' + response.data.id, res => {
|
||||
if (res.data) {
|
||||
this.newData = res.data;
|
||||
this.newData.createTime = row.createTime;
|
||||
this.dealWithTag(res.data);
|
||||
this.setRequest(res.data);
|
||||
if (!this.setRequest(res.data)) {
|
||||
|
|
|
@ -249,10 +249,12 @@ export default {
|
|||
});
|
||||
},
|
||||
compare(row) {
|
||||
this.basisData.createTime = this.$refs.versionHistory.versionOptions.filter(v => v.id === this.basisData.versionId)[0].createTime;
|
||||
this.$get('/api/definition/get/' + row.id+"/"+this.basisData.refId, response => {
|
||||
this.$get('/api/definition/get/' + response.data.id, res => {
|
||||
if (res.data) {
|
||||
this.newData = res.data;
|
||||
this.newData.createTime = row.createTime;
|
||||
this.dealWithTag(res.data);
|
||||
this.setRequest(res.data)
|
||||
if (!this.setRequest(res.data)) {
|
||||
|
|
|
@ -370,10 +370,12 @@ export default {
|
|||
});
|
||||
},
|
||||
compare(row) {
|
||||
this.basisData.createTime = this.$refs.versionHistory.versionOptions.filter(v => v.id === this.basisData.versionId)[0].createTime;
|
||||
this.$get('/api/definition/get/' + row.id+"/"+this.basisData.refId, response => {
|
||||
this.$get('/api/definition/get/' + response.data.id, res => {
|
||||
if (res.data) {
|
||||
this.newData = res.data;
|
||||
this.newData.createTime = row.createTime;
|
||||
if (this.newData.method !== 'TCP' && this.newData.method !== 'ESB') {
|
||||
this.newData.method = this.newData.protocol;
|
||||
}
|
||||
|
|
|
@ -561,10 +561,12 @@ export default {
|
|||
},
|
||||
compare(row) {
|
||||
this.oldData = this.test;
|
||||
this.oldData.createTime = this.$refs.versionHistory.versionOptions.filter(v => v.id === this.test.versionId)[0].createTime;
|
||||
this.$get('/performance/get/' + row.id + "/" + this.test.refId, response => {
|
||||
this.$get('/performance/get/' + response.data.id, res => {
|
||||
if (res.data) {
|
||||
this.newData = res.data;
|
||||
this.newData.createTime = row.createTime;
|
||||
this.$get('/performance/test/follow/' + response.data.id, resp => {
|
||||
if (resp.data && resp.data.follows) {
|
||||
for (let i = 0; i < resp.data.follows.length; i++) {
|
||||
|
|
|
@ -948,6 +948,8 @@ export default {
|
|||
if (data[0] && data[1]) {
|
||||
that.newData = data[0].data.data;
|
||||
that.oldData = data[1].data.data;
|
||||
that.newData.createTime = row.createTime;
|
||||
that.oldData.createTime = this.$refs.versionHistory.versionOptions.filter(v => v.id === that.oldData.versionId)[0].createTime;
|
||||
let testCase = that.versionData.filter(v => v.versionId === this.currentTestCaseInfo.versionId)[0];
|
||||
that.newData.versionName = that.versionData.filter(v => v.id === that.newData.id)[0].versionName;
|
||||
that.oldData.versionName = that.versionData.filter(v => v.id === that.oldData.id)[0].versionName;
|
||||
|
|
|
@ -331,10 +331,10 @@ export default {
|
|||
let vnode = this.$refs.new
|
||||
let oldColor = "";
|
||||
let newColor = "";
|
||||
if(this.oldData.createTime>this.newData.createTime){
|
||||
if(this.oldData.createTime > this.newData.createTime) {
|
||||
oldColor = "rgb(121, 225, 153,0.3)";
|
||||
newColor = "rgb(241,200,196,0.45)"
|
||||
}else{
|
||||
} else {
|
||||
oldColor = "rgb(241,200,196,0.45)"
|
||||
newColor = "rgb(121, 225, 153,0.3)";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue