|
@@ -10,7 +10,9 @@
|
|
|
<br>
|
|
|
<el-tree :data="data1" :default-expanded-keys="key_arr" :expand-on-click-node="true" node-key="id" @node-click="clickFun">
|
|
|
<span slot-scope="{ node, data }" style="width:100%;" class="custom-tree-node" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)">
|
|
|
- <span :title="data.label" class="span_el">{{ node.label }}</span>
|
|
|
+ <el-tooltip class="item" effect="dark" :content="data.label" placement="right">
|
|
|
+ <span :title="data.label" class="span_el">{{ node.label }}</span>
|
|
|
+ </el-tooltip>
|
|
|
<el-dropdown v-show="data.del" style="margin-left:10px" trigger="click">
|
|
|
<span v-show="data.codes === '1' ? false : true" class="el-dropdown-link">
|
|
|
···<i class="el-icon--right" />
|
|
@@ -37,7 +39,7 @@
|
|
|
</el-select>
|
|
|
<el-button type="primary" @click="queryCaseData(test_plan)">查询</el-button>
|
|
|
<el-button type="primary" style="margin: 3% 2%" @click="createGetShow">新增</el-button>
|
|
|
- <el-button @click="implement">执行结果</el-button>
|
|
|
+ <!-- <el-button @click="implement">执行结果</el-button> -->
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-header>
|
|
@@ -49,11 +51,12 @@
|
|
|
<el-col :span="6" style=" color:#73C5FA;"><img :src="clicked_4" style="margin-right: 6%;width:5%;">未执行{{ num.Count4 }}个,占比{{ num.Rate4 }}%</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
- <el-main style="background:#ffffff; width:98%;margin:0% 1% 1% 1%; font-size:14px;border-radius:8px;"><!-- 主页table -->
|
|
|
+ <el-main style="background:#ffffff; width:98%;margin:0% 1% 1% 1%; font-size:14px;border-radius:8px;">
|
|
|
+ <!-- 主页table -->
|
|
|
<el-table :data="gridData" :header-cell-style="{ background: '#F0F2F4', color: '#333B4A' }" border fit tooltip-effect="dark" size="mini" style="width: 100%">
|
|
|
- <el-table-column prop="id" label="序列号" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.ids }}</template></el-table-column>
|
|
|
+ <el-table-column label="序列号" min-width="100" align="center"><template slot-scope="scope">{{ scope.row.ids }}</template></el-table-column>
|
|
|
|
|
|
- <el-table-column prop="caseName" label="用例名" min-width="200" align="center">
|
|
|
+ <el-table-column label="用例名" min-width="200" align="center">
|
|
|
<template slot-scope="scope"><span style="color:#409EFF; cursor: pointer" @click="go_query(scope.row)">{{ scope.row.title }}</span></template>
|
|
|
</el-table-column>
|
|
|
|
|
@@ -77,7 +80,7 @@
|
|
|
</el-table>
|
|
|
|
|
|
<div align="center"> <!--分页-->
|
|
|
- <el-pagination :current-page="curIndex" :page-size="pageSize" :hide-on-single-page="true" background layout="total, prev, pager, next" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
|
|
+ <el-pagination :current-page="curIndex" :page-size="pageSize" background layout="total, prev, pager, next" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
|
|
</div>
|
|
|
|
|
|
</el-main>
|
|
@@ -99,11 +102,6 @@
|
|
|
<el-option v-for="item in taskTypeStrings" :key="item.code" :label="item.msg" :value="item.code" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="工程模块" prop="casePriority">
|
|
|
- <el-select v-model="caseData.casePriority" clearable placeholder="请选择【多选组件】" style="width: 90%">
|
|
|
- <el-option v-for="item in priorityStrings" :key="item.value" :label="item.name" :value="item.value" />
|
|
|
- </el-select>
|
|
|
- </el-form-item> -->
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="caseCreateCase(caseData, titleName)">确 定</el-button>
|
|
@@ -151,7 +149,7 @@
|
|
|
<template slot-scope="scope">{{ scope.row.modifier }}</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-pagination :current-page="curIndex" :page-sizes="[5, 10, 20]" :page-size="pageSize" layout="total, prev, pager, next" :total="total" background :hide-on-single-page="true" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
|
|
+ <el-pagination :current-page="curIndex" :page-sizes="[5, 10, 20]" :page-size="pageSize" layout="total, prev, pager, next" :total="total_one" background @size-change="handleSizeChange1" @current-change="handleCurrentChange1" />
|
|
|
</div>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -202,6 +200,8 @@ export default {
|
|
|
createTimeData: '',
|
|
|
pageSize: 8,
|
|
|
curIndex: 1,
|
|
|
+ pageSize_one: 8,
|
|
|
+ curIndex_one: 1,
|
|
|
startId: '',
|
|
|
Parentids: '',
|
|
|
createParticipation: {},
|
|
@@ -221,11 +221,13 @@ export default {
|
|
|
data1: [],
|
|
|
data2: [],
|
|
|
total: 0,
|
|
|
+ total_one: 0,
|
|
|
excelData: [],
|
|
|
imFile: '',
|
|
|
failNum: '',
|
|
|
successNum: '',
|
|
|
startKey: '',
|
|
|
+ caseFolderId: '',
|
|
|
obj: '',
|
|
|
grid_Data: [],
|
|
|
case_from: {},
|
|
@@ -399,6 +401,24 @@ export default {
|
|
|
pageIndex() {
|
|
|
queryTestPlanCaseList({ pageSize: this.pageSize, curIndex: this.curIndex, testPlanId: this.startId }).then(res => {
|
|
|
this.gridData = res.data
|
|
|
+ this.total = res.total
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ handleSizeChange1(size) {
|
|
|
+ console.log(size, '1')
|
|
|
+ this.pageSize_one = size
|
|
|
+ this.pageIndex1()
|
|
|
+ },
|
|
|
+ handleCurrentChange1(curIndex) {
|
|
|
+ this.curIndex_one = curIndex
|
|
|
+ this.pageIndex1()
|
|
|
+ },
|
|
|
+
|
|
|
+ pageIndex1() {
|
|
|
+ queryCasesData({ pageSize: this.pageSize_one, curIndex: this.curIndex_one, caseFolderId: this.caseFolderId }).then(res => {
|
|
|
+ this.grid_Data = res.data.list
|
|
|
+ this.total_one = res.data.total
|
|
|
})
|
|
|
},
|
|
|
|
|
@@ -452,7 +472,13 @@ export default {
|
|
|
this.createParticipation.pageSize = this.pageSize
|
|
|
this.createParticipation.curIndex = this.curIndex
|
|
|
queryTestPlanCaseList(this.createParticipation).then(res => {
|
|
|
- this.gridData = res.data
|
|
|
+ this.gridData = []
|
|
|
+ res.data.map(item => {
|
|
|
+ item.caseInfo.ids = item.id
|
|
|
+ item.caseInfo.status_case = item.status
|
|
|
+ item.caseInfo.keys = item.status
|
|
|
+ this.gridData.push(item.caseInfo)
|
|
|
+ })
|
|
|
this.total = res.data.length
|
|
|
})
|
|
|
}
|
|
@@ -462,6 +488,10 @@ export default {
|
|
|
createGetShow() {
|
|
|
this.titleName = '新增'
|
|
|
this.case_from = {}
|
|
|
+ this.caseShwo_three = false
|
|
|
+ this.caseShwo_two = false
|
|
|
+ this.caseShwo_four = false
|
|
|
+ this.grid_Data = []
|
|
|
if (this.pegs !== '3') {
|
|
|
this.$message({ message: '提示, 👈请选择目录', type: 'success', duration: 1000, offset: 150 })
|
|
|
} else {
|
|
@@ -478,11 +508,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- // 新建table保存
|
|
|
+ // 新建tableData
|
|
|
case_CreateCase() {
|
|
|
createTestPlanCaseList({ testPlanId: this.startId, caseIds: this.Selection, creator: this.userInformation, modifier: this.userInformation }).then(res => {
|
|
|
this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
|
|
|
this.dialogFormVisibleUpdateOne = false
|
|
|
+ this.queryCaseData('')
|
|
|
})
|
|
|
},
|
|
|
|
|
@@ -497,6 +528,7 @@ export default {
|
|
|
},
|
|
|
// 改变case_one
|
|
|
case_fromOne(e) {
|
|
|
+ this.caseFolderId = e
|
|
|
if (e === '') {
|
|
|
this.caseShwo_two = false
|
|
|
this.$set(this.case_from, 'two', '')
|
|
@@ -508,7 +540,7 @@ export default {
|
|
|
} else {
|
|
|
queryCasesData({ pageSize: this.pageSize, curIndex: this.curIndex, caseFolderId: e }).then(res => {
|
|
|
this.grid_Data = res.data.list
|
|
|
- this.total = res.data.total
|
|
|
+ this.total_one = res.data.total
|
|
|
})
|
|
|
|
|
|
for (var one of this.data2) {
|
|
@@ -525,6 +557,7 @@ export default {
|
|
|
},
|
|
|
// 改变case_two
|
|
|
case_fromTwo(e) {
|
|
|
+ this.caseFolderId = e
|
|
|
if (e === '') {
|
|
|
this.caseShwo_three = false
|
|
|
this.$set(this.case_from, 'three', '')
|
|
@@ -534,7 +567,7 @@ export default {
|
|
|
} else {
|
|
|
queryCasesData({ pageSize: this.pageSize, curIndex: this.curIndex, caseFolderId: e }).then(res => {
|
|
|
this.grid_Data = res.data.list
|
|
|
- this.total = res.data.total
|
|
|
+ this.total_one = res.data.total
|
|
|
})
|
|
|
for (var two of this.case_two) {
|
|
|
if (two.id === e) {
|
|
@@ -551,6 +584,7 @@ export default {
|
|
|
|
|
|
// 改变case_three
|
|
|
case_fromThree(e) {
|
|
|
+ this.caseFolderId = e
|
|
|
if (e === '') {
|
|
|
this.caseShwo_four = false
|
|
|
this.$set(this.case_from, 'four', '')
|
|
@@ -558,7 +592,7 @@ export default {
|
|
|
} else {
|
|
|
queryCasesData({ pageSize: this.pageSize, curIndex: this.curIndex, caseFolderId: e }).then(res => {
|
|
|
this.grid_Data = res.data.list
|
|
|
- this.total = res.data.total
|
|
|
+ this.total_one = res.data.total
|
|
|
})
|
|
|
for (var three of this.case_three) {
|
|
|
if (three.id === e) {
|
|
@@ -574,16 +608,18 @@ export default {
|
|
|
},
|
|
|
// 改变case_four
|
|
|
case_fromFour(e) {
|
|
|
+ this.caseFolderId = e
|
|
|
this.grid_Data = []
|
|
|
queryCasesData({ pageSize: this.pageSize, curIndex: this.curIndex, caseFolderId: e }).then(res => {
|
|
|
this.grid_Data = res.data.list
|
|
|
- this.total = res.data.total
|
|
|
+ this.total_one = res.data.total
|
|
|
})
|
|
|
},
|
|
|
|
|
|
// 点击节点
|
|
|
clickFun(e) {
|
|
|
console.log(e)
|
|
|
+ this.test_plan = {}
|
|
|
this.pegs = ''
|
|
|
e.codes === '1' ? this.Parentids = e.id : ''
|
|
|
e.codes === '2' ? this.taskids = e.id : ''
|
|
@@ -607,58 +643,19 @@ export default {
|
|
|
|
|
|
Unclicked(e, index, ele) {
|
|
|
this.gridData[index].keys = 1
|
|
|
- updateTestPlanCase({ creator: this.userInformation, modifier: this.userInformation, id: ele.ids, status: 1, testPlanId: ele.thrr }).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
|
|
|
- } else {
|
|
|
- this.$message({ message: res.msg, type: 'error', duration: 1000, offset: 150 })
|
|
|
- }
|
|
|
- })
|
|
|
+ updateTestPlanCase({ creator: this.userInformation, modifier: this.userInformation, id: ele.ids, status: 1, testPlanId: ele.thrr }).then(res => { this.implement() })
|
|
|
},
|
|
|
Unclicked2(e, index, ele) {
|
|
|
this.gridData[index].keys = 2
|
|
|
- updateTestPlanCase({ creator: this.userInformation, modifier: this.userInformation, id: ele.ids, status: 2, testPlanId: ele.thrr }).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
|
|
|
- } else {
|
|
|
- this.$message({ message: res.msg, type: 'error', duration: 1000, offset: 150 })
|
|
|
- }
|
|
|
- })
|
|
|
+ updateTestPlanCase({ creator: this.userInformation, modifier: this.userInformation, id: ele.ids, status: 2, testPlanId: ele.thrr }).then(res => { this.implement() })
|
|
|
},
|
|
|
Unclicked3(e, index, ele) {
|
|
|
this.gridData[index].keys = 3
|
|
|
- updateTestPlanCase({ creator: this.userInformation, modifier: this.userInformation, id: ele.ids, status: 3, testPlanId: ele.thrr }).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
|
|
|
- } else {
|
|
|
- this.$message({ message: res.msg, type: 'error', duration: 1000, offset: 150 })
|
|
|
- }
|
|
|
- })
|
|
|
+ updateTestPlanCase({ creator: this.userInformation, modifier: this.userInformation, id: ele.ids, status: 3, testPlanId: ele.thrr }).then(res => { this.implement() })
|
|
|
},
|
|
|
Unclicked4(e, index, ele) {
|
|
|
this.gridData[index].keys = 0
|
|
|
- updateTestPlanCase({ creator: this.userInformation, modifier: this.userInformation, id: ele.ids, status: 0, testPlanId: ele.thrr }).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
|
|
|
- } else {
|
|
|
- this.$message({ message: res.msg, type: 'error', duration: 1000, offset: 150 })
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- // 查询接口list
|
|
|
- query_get(e) {
|
|
|
- var data_status = { testPlanId: e, pageSize: this.pageSize, curIndex: this.curIndex }
|
|
|
- queryTestPlanCaseList(data_status).then(res => {
|
|
|
- this.gridData = []
|
|
|
- res.data.map(item => {
|
|
|
- item.caseInfo.ids = item.id
|
|
|
- item.caseInfo.status_case = item.status
|
|
|
- item.caseInfo.keys = item.status
|
|
|
- this.gridData.push(item.caseInfo)
|
|
|
- })
|
|
|
- this.total = this.gridData.total
|
|
|
- })
|
|
|
+ updateTestPlanCase({ creator: this.userInformation, modifier: this.userInformation, id: ele.ids, status: 0, testPlanId: ele.thrr }).then(res => { this.implement() })
|
|
|
},
|
|
|
|
|
|
// 跳转bug页面
|
|
@@ -677,10 +674,10 @@ export default {
|
|
|
this.num = {
|
|
|
Count1: res.data.successCount,
|
|
|
Rate1: Math.floor(res.data.successRate * 1000) / 1000,
|
|
|
- Count2: res.data.blockCount,
|
|
|
- Rate2: Math.floor(res.data.blockRate * 1000) / 1000,
|
|
|
- Count3: res.data.failCount,
|
|
|
- Rate3: Math.floor(res.data.failRate * 1000) / 1000,
|
|
|
+ Count2: res.data.failCount,
|
|
|
+ Rate2: Math.floor(res.data.failRate * 1000) / 1000,
|
|
|
+ Count3: res.data.blockCount,
|
|
|
+ Rate3: Math.floor(res.data.blockRate * 1000) / 1000,
|
|
|
Count4: res.data.defaultCount,
|
|
|
Rate4: Math.floor(res.data.defaultRate * 1000) / 1000
|
|
|
}
|
|
@@ -689,6 +686,7 @@ export default {
|
|
|
|
|
|
// 删除table信息
|
|
|
deleteCaseData(e) {
|
|
|
+ console.log(e, '删除')
|
|
|
this.$confirm('是否确认删除', '确认信息', {
|
|
|
distinguishCancelAndClose: true,
|
|
|
confirmButtonText: '确定',
|
|
@@ -696,7 +694,17 @@ export default {
|
|
|
}).then(() => {
|
|
|
deleteTestPlanCase({ id: e.ids, modifier: this.userInformation }).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
- this.query_get(e.thrr)
|
|
|
+ queryTestPlanCaseList({ testPlanId: e.thrr, pageSize: this.pageSize, curIndex: this.curIndex }).then(res => {
|
|
|
+ this.gridData = []
|
|
|
+ res.data.map(item => {
|
|
|
+ item.caseInfo.thrr = e.thrr
|
|
|
+ item.caseInfo.ids = item.id
|
|
|
+ item.caseInfo.status_case = item.status
|
|
|
+ item.caseInfo.keys = item.status
|
|
|
+ this.gridData.push(item.caseInfo)
|
|
|
+ })
|
|
|
+ this.total = this.gridData.total
|
|
|
+ })
|
|
|
this.$message({ type: 'success', message: '已删除' })
|
|
|
} else {
|
|
|
this.$message({ message: res.msg, type: 'success', duration: 1000, offset: 150 })
|