Commit bf0f5e94 authored by 高滢's avatar 高滢

feat(评审): 增删改查

parent b42026e4
......@@ -23,7 +23,7 @@ export function listTest(query) {
headers:{
'Content-Type': 'application/json',
},
data: query
})
}
......@@ -53,7 +53,7 @@ export function testType(query) {
export function testList(query){
return request({
url: '/system/testCase/getUseCaseList',
url: '/system/testCase/getUseCaseListNewNew',
method: 'post',
headers:{
'Content-Type': 'application/json',
......@@ -178,7 +178,7 @@ export function testScene(query) {
// 发起评审页面 获取用例列表
export function testUseCaseListAll(query) {
return request({
url: '/system/testCase/getUseCaseList',
url: '/system/testCase/getUseCaseListNewNew',
method: 'post',
headers:{
'Content-Type': 'application/json',
......
......@@ -409,7 +409,7 @@ export default {
this.getStandardList()
},
mounted() {
},
methods: {
......@@ -426,26 +426,11 @@ export default {
console.error('testInitatereview接口出错', error)
})
},
// vif0 下拉框选择标准
// handleSelectStandard(selected) {
// this.selectedItem = this.standardList.find(
// item => item.id === selected
// )
// if (this.selectedItem) {
// // 将 item.name 赋值给 this.pageIndexSec.name
// this.pageIndexSec.name = this.selectedItem.name
// this.pageIndexSec.inspectStandardId = this.selectedItem.id
// this.pageIndexSec.standardNo = this.selectedItem.standardNo
// } else {
// console.log('赋值给 this.pageIndexSec.name时出现问题')
// }
// },
handleSelectStandard(selected) {
console.log(selected, "handleSelectStandard selected");
// 查找选中的项
if (selectedItem) {
// 将选中的项的属性赋值给 pageIndexSec
this.pageIndexSec.name = selectedItem.name;
......@@ -486,7 +471,7 @@ export default {
this.formModel.reviewType === '0' &&
this.formModel.reviewSubtype === '0'
) {
this.pageIndexSec.reviewSubtype = this.formModel.reviewSubtype
this.pageIndexSec.reviewType = this.formModel.reviewType
this.pageIndexSec.id = selectedItem.id
......
......@@ -54,38 +54,51 @@
<div>
<!-- 选择标准要求弹窗 -->
<el-dialog title="" :visible.sync="dialogVisible" width="70%">
<!-- 表格 -->
<el-table
:data="tableData"
style="width: 100%"
>
<el-table-column label="选择" width="50">
<template slot-scope="scope">
<el-radio-group v-model="selectedRequirement">
<el-radio
:label="scope.row"
class="hidden-lable"
></el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column prop="serialNumber" label="标准章节" width="100">
</el-table-column>
<el-table-column prop="requirements" label="标准要求">
</el-table-column>
<!-- <el-table-column prop="testMethod" label="测试方法">
</el-table-column> -->
<!-- <el-table-column prop="name" label="标准名称">
</el-table-column>
<el-table-column prop="standardNo" label="标准号">
</el-table-column> -->
</el-table>
<collapse v-model="activeNames" class="mt10">
<collapse-item
v-for="(item, key3) in tableData"
:key="key3"
:name="item.serialNumber"
>
<span slot="title" style="width: 100%">
<div class="standard-box">
<div class="standard-left">
<div class="standard-title">
<div class="standard">标准要求:</div>
{{ item.serialNumber + item.requirements }}
</div>
</div>
</div>
</span>
<table
class="table"
v-if="item.scenarioUseCases && item.scenarioUseCases.length"
>
<tr class="tr">
<th>操作</th>
<th>测试场景</th>
</tr>
<tr v-for="(scenario, key4) in item.scenarioUseCases">
<td @click="selelctData(item)">
<template>
<div>
<el-radio-group v-model="selectedRequirement">
<el-radio
:label="scenario"
class="hidden-lable"
>选择
</el-radio>
</el-radio-group>
</div>
</template>
</td>
<td>{{ scenario.testScenario }}</td>
</tr>
</table>
</collapse-item>
</collapse>
<!-- 弹窗底部 -->
<div slot="footer" class="dialog-footer">
<el-button type="primary" plain @click="dialogVisible = false"
>确认</el-button
......@@ -206,9 +219,15 @@ import {
testInitatereviewAdd,
testReviewer
} from '@/api/task/test'
import collapse from "@/components/Collapse/collapse.vue";
import collapseItem from "@/components/Collapse/collapse-item.vue";
export default {
name: 'ReviewData',
components: {
collapse: collapse,
'collapse-item': collapseItem
},
dicts: ['sys_scene_type'],
props: {
......@@ -222,6 +241,7 @@ export default {
},
data() {
return {
activeNames: [],
standardId: '',
keypointId: '',
detailsId: '',
......@@ -257,12 +277,10 @@ export default {
standardId: '',
standard: '',
type: '',
keypointId: '',
keypoint: '',
detailsId: '',
details: '',
operationSort: '',
oldText: '',
newText: '',
remark: '',
......@@ -275,11 +293,7 @@ export default {
},
selectedRequirement: {
id: '',
chapter: '',
text: '',
testMethod: '',
name: '',
standardNo: ''
testScenario:''
},
selectedRequirementSave: {},
selectedKeyPoints: {
......@@ -311,7 +325,7 @@ export default {
{
validator: (rule, value, callback) => {
// 检查 selectedRequirement.text 是否有值
if (!this.selectedRequirement.requirements) {
if (!this.selectedRequirement.id) {
callback(new Error('请选择标准要求'))
} else {
callback()
......@@ -385,6 +399,11 @@ export default {
this.newResData.name = this.pageIndexSec.name
},
methods: {
selelctData(data){
this.newResDataAdd.standardId = data.id
this.newResDataAdd.standard = data.requirements
this.newResDataAdd.chapter = data.serialNumber
},
//下拉框 选择检验类型
handleSelectType(selected) {
const selectedItem = this.dict.type.sys_scene_type.find(
......@@ -411,33 +430,20 @@ export default {
},
// 选择标准要求弹窗确认
submitRequirement() {
// this.newResData.standardNo = this.pageIndexSec.standardNo
// this.newResData.standardId = this.pageIndexSec.id
// this.newResData.name = this.pageIndexSec.name
//根据 inspectStandardId => standard/findStandardList 的id
// inspectStandardNo => standard/findStandardList 的standardNo
//operationSort => 这个在点击下一步的界面 通过选择新增场景时就已经设置好了 为新增 ADD_SENCE 或删除
this.newResDataAdd.inspectStandardId = this.pageIndexSec.id
this.newResDataAdd.inspectStandardNo = this.pageIndexSec.standardNo
this.newResDataAdd.operationSort = this.pageIndexSec.operationSort
console.log(this.newResData, '选择标准要求弹窗确认newResData')
console.log(this.newResDataAdd, '选择标准要求弹窗确认newResDataAdd')
//这里newResData有type name inspectstandardNo inspectStandardId
this.dialogVisible = false
},
// 按钮-选择标准要求
handleReSelectRequirements() {
// this.newResData.standardNo = this.pageIndexSec.standardNo
// this.newResData.standardId = this.pageIndexSec.id
// this.newResData.name = this.pageIndexSec.name
//根据 inspectStandardId => standard/findStandardList 的id
// inspectStandardNo => standard/findStandardList 的standardNo
// //operationSort => 这个在点击下一步的界面 通过选择新增场景时就已经设置好了 为新增 ADD_SENCE 或删除
// this.newResDataAdd.inspectStandardId = this.pageIndexSec.id
// this.newResDataAdd.inspectStandardNo = this.pageIndexSec.standardNo
// this.newResDataAdd.operationSort = this.pageIndexSec.operationSort
// //这里newResData有type name inspectstandardNo inspectStandardId
testList({
searchFields:{
serialNumber:'',
requirements:''
},
offset: {
offset: 0,
limit: 100
......@@ -519,8 +525,8 @@ export default {
this.newResDataAdd.name = this.pageIndexSec.name
this.newResDataAdd.usecaseId = this.formModel.yonglibianhao
this.newResDataAdd.usecaseDescribe = this.formModel.yonglimiaoshu
this.newResDataAdd.standard = this.selectedRequirement.requirements
this.newResDataAdd.chapter = this.selectedRequirement.serialNumber
this.newResDataAdd.keypointId = this.selectedRequirement.id
this.newResDataAdd.keypoint = this.selectedRequirement.testScenario
this.newResDataAdd.reviewUsecaseId = ''
this.newResDataAdd.type = 'test'
......
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