Commit 82e87c04 authored by Wallen姚文辉's avatar Wallen姚文辉

添加需求选择功能

parent 01af0089
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>yinhe_test</title><script defer="defer" src="/js/chunk-vendors.822ae491.js"></script><script defer="defer" src="/js/app.bfcf82ae.js"></script><link href="/css/chunk-vendors.187ae3e6.css" rel="stylesheet"><link href="/css/app.6955fc17.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but yinhe_test doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html> <!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>yinhe_test</title><script defer="defer" src="/js/chunk-vendors.822ae491.js"></script><script defer="defer" src="/js/app.2be56801.js"></script><link href="/css/chunk-vendors.187ae3e6.css" rel="stylesheet"><link href="/css/app.6955fc17.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but yinhe_test doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -80,8 +80,8 @@ ...@@ -80,8 +80,8 @@
</P> </P>
<p> <p>
<span v-for="item in story"> <span v-for="item in story">
<span>{{ item.summary }}:</span><span :style="colorstyle(item.case.length)" <span>{{ item.summary }}:</span><span :style="colorstyle(item.case?item.case.length:0)"
style="margin-right: 3px;">{{ item.case.length style="margin-right: 3px;">{{ item.case?item.case.length:0
}}</span><span>个用例;</span> }}</span><span>个用例;</span>
</span> </span>
</p> </p>
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<span v-if="!edit">{{ fengxxian }}</span> <span v-if="!edit">{{ fengxxian }}</span>
</p> </p>
<Button shape="circle" style="margin-top: 10px;margin-bottom: 10px;" type="primary">测试计划资源情况</Button> <Button shape="circle" style="margin-top: 10px;margin-bottom: 10px;" type="primary">测试计划资源情况</Button>
<Table :columns="storycolumns" :data="story"> <Table ref="stroy" :columns="storycolumns" :data="story">
<template #summary="{ row, index }"> <template #summary="{ row, index }">
<a target="_blank" :href='"http://jira.galaxy-immi.com/browse/" + row.key'> <a target="_blank" :href='"http://jira.galaxy-immi.com/browse/" + row.key'>
<u>{{ row.summary }}</u> <u>{{ row.summary }}</u>
...@@ -147,6 +147,7 @@ ...@@ -147,6 +147,7 @@
size="15" /> size="15" />
</template> </template>
</Table> </Table>
<div v-if="edit" style="margin: 5px;"><Button @click="changeStoryList()">删除未选中</Button></div>
<template v-if="plugs.includes('左移-接口测试')"> <template v-if="plugs.includes('左移-接口测试')">
<Button shape="circle" style="margin-top: 10px;margin-bottom: 10px;" type="primary">左移-接口测试</Button> <Button shape="circle" style="margin-top: 10px;margin-bottom: 10px;" type="primary">左移-接口测试</Button>
<br> <br>
...@@ -721,11 +722,11 @@ export default { ...@@ -721,11 +722,11 @@ export default {
this.jenkis_data = result.jenkis_data this.jenkis_data = result.jenkis_data
this.myname = result.myname this.myname = result.myname
this.people = result.people, this.people = result.people,
this.statusMap = result.statusMap, this.statusMap = result.statusMap,
this.priorityMap = result.priorityMap, this.priorityMap = result.priorityMap,
this.typeMap = result.typeMap, this.typeMap = result.typeMap,
this.caseCount = result.caseCount, this.caseCount = result.caseCount,
this.fugailu = result.fugailu this.fugailu = result.fugailu
}) })
}, },
stagingreport(requets_type, suback = () => { }) stagingreport(requets_type, suback = () => { })
...@@ -774,6 +775,9 @@ export default { ...@@ -774,6 +775,9 @@ export default {
this.$request('post', '/tool/testport/staging', res, this, () => { suback(), a() }) this.$request('post', '/tool/testport/staging', res, this, () => { suback(), a() })
} }
}, },
changeStoryList(){
this.story=this.$refs.stroy.getSelection()
},
breforesend() { breforesend() {
if (!this.report) return this.$Message.error("请先完善报告信息") if (!this.report) return this.$Message.error("请先完善报告信息")
if (this.fugailu < 100) return this.$Message.error("用例覆盖率不足100%(每个需求必须关联测试用例)") if (this.fugailu < 100) return this.$Message.error("用例覆盖率不足100%(每个需求必须关联测试用例)")
...@@ -947,17 +951,25 @@ export default { ...@@ -947,17 +951,25 @@ export default {
title: ' ', title: ' ',
slot: 'action' slot: 'action'
} }
const b = {
type: 'selection',
width: 60,
align: 'center'
}
if (value) { if (value) {
this.storycolumns.push(a) this.storycolumns.push(a)
this.bugcolumns.push(a) this.bugcolumns.push(a)
this.casecolumns.push(a) this.casecolumns.push(a)
this.storycolumns.unshift(b)
} else { } else {
const index1 = this.storycolumns.findIndex(ele => { return ele.slot == 'action' }) const index1 = this.storycolumns.findIndex(ele => { return ele.slot == 'action' })
const index2 = this.bugcolumns.findIndex(ele => { return ele.slot == 'action' }) const index2 = this.bugcolumns.findIndex(ele => { return ele.slot == 'action' })
const index3 = this.casecolumns.findIndex(ele => { return ele.slot == 'action' }) const index3 = this.casecolumns.findIndex(ele => { return ele.slot == 'action' })
const index4 = this.storycolumns.findIndex(ele => { return ele.type == 'selection' })
index1 == -1 || this.storycolumns.splice(index1, 1) index1 == -1 || this.storycolumns.splice(index1, 1)
index2 == -1 || this.bugcolumns.splice(index2, 1) index2 == -1 || this.bugcolumns.splice(index2, 1)
index3 == -1 || this.casecolumns.splice(index3, 1) index3 == -1 || this.casecolumns.splice(index3, 1)
index4 == -1 || this.storycolumns.splice(index4, 1)
setTimeout(() => { setTimeout(() => {
this.show() this.show()
}, 50); }, 50);
...@@ -1036,7 +1048,7 @@ export default { ...@@ -1036,7 +1048,7 @@ export default {
var b = 0 var b = 0
this.cShow = value.map(ele => { return ele.key }); this.cShow = value.map(ele => { return ele.key });
value.forEach(ele => { value.forEach(ele => {
if (ele.case.length > 0) { if (ele.case && ele.case.length > 0) {
b += 1 b += 1
}; };
a += 1 a += 1
...@@ -1049,7 +1061,7 @@ export default { ...@@ -1049,7 +1061,7 @@ export default {
else ele.start = '' else ele.start = ''
ele.end = new Date().toLocaleDateString() ele.end = new Date().toLocaleDateString()
this.case.forEach(each => { this.case.forEach(each => {
if (ele.case.indexOf(each.key) != -1) { if (ele.case && ele.case.indexOf(each.key) != -1) {
this.mycase.push(each) this.mycase.push(each)
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment