Browse Source

优化

master
陈裕财 3 years ago
parent
commit
a1caf1d545
  1. 27
      src/views/xm/core/xmQuestion/XmQuestionEdit.vue
  2. 57
      src/views/xm/core/xmTestPlanCase/XmTestPlanCaseMng.vue

27
src/views/xm/core/xmQuestion/XmQuestionEdit.vue

@ -181,6 +181,10 @@
<el-dialog append-to-body title="模块选择" :visible.sync="funcVisible" width="60%" top="20px" :close-on-click-modal="false"> <el-dialog append-to-body title="模块选择" :visible.sync="funcVisible" width="60%" top="20px" :close-on-click-modal="false">
<xm-func-select @row-click="onFuncSelected" :xm-product="{id:editForm.productId}"></xm-func-select> <xm-func-select @row-click="onFuncSelected" :xm-product="{id:editForm.productId}"></xm-func-select>
</el-dialog> </el-dialog>
<el-dialog append-to-body title="执行用例选择" :visible.sync="caseVisible" width="80%" top="20px" :close-on-click-modal="false">
<xm-test-plan-case-mng :select="true" :visible="caseVisible" :xm-product="editForm.productId?{id:editForm.productId,productName:editForm.productName}:null" @select="onTestPlanCaseSelected" ></xm-test-plan-case-mng>
</el-dialog>
</section> </section>
</template> </template>
@ -308,6 +312,7 @@
activateTabPaneName:'12', activateTabPaneName:'12',
funcVisible:false, funcVisible:false,
stepConfigVisible:false, stepConfigVisible:false,
caseVisible:false,
/**end 在上面加自定义属性**/ /**end 在上面加自定义属性**/
}//end return }//end return
},//end data },//end data
@ -518,6 +523,8 @@
params.productId=$event.productId params.productId=$event.productId
params.funcId=$event.id params.funcId=$event.id
params.funcName=$event.name params.funcName=$event.name
}else if(fieldName==='caseId'){
params=Object.assign(params,$event)
}else{ }else{
params[fieldName]=$event params[fieldName]=$event
} }
@ -613,12 +620,32 @@
} }
this.editFormBak={...this.editForm} this.editFormBak={...this.editForm}
},
onTestPlanCaseSelected(xmTestPlanCase){
var params={};
params.planId=xmTestPlanCase.planId
params.productId=xmTestPlanCase.productId
params.productName=xmTestPlanCase.productName
params.caseId=xmTestPlanCase.caseId
params.caseName=xmTestPlanCase.caseName
params.casedbId=xmTestPlanCase.casedbId
params.funcId=xmTestPlanCase.funcId
params.funcName=xmTestPlanCase.funcName
params.menuId=xmTestPlanCase.menuId
params.menuName=xmTestPlanCase.menuName
params.opStep=xmTestPlanCase.testStep
params.name=xmTestPlanCase.caseName
params.projectId=xmTestPlanCase.projectId
Object.assign(this.editForm,params)
this.editXmQuestionSomeFields(this.editForm,"caseId",params)
this.caseVisible=false;
} }
},//end method },//end method
components: { components: {
// 'xm-question-edit':XmQuestionEdit // 'xm-question-edit':XmQuestionEdit
'upload': AttachmentUpload,XmGroupMng,VueEditor,XmTaskList,xmMenuSelect,XmQuestionHandleMng,TagMng,XmProjectSelect, 'upload': AttachmentUpload,XmGroupMng,VueEditor,XmTaskList,xmMenuSelect,XmQuestionHandleMng,TagMng,XmProjectSelect,
XmMyDoFocus,XmFuncSelect,MdpSelectUserXm,TestStepConfig,TestStepResult, XmMyDoFocus,XmFuncSelect,MdpSelectUserXm,TestStepConfig,TestStepResult,
xmTestPlanCaseMng:()=>import('../xmTestPlanCase/XmTestPlanCaseMng')
}, },
mounted() { mounted() {
this.initData(); this.initData();

57
src/views/xm/core/xmTestPlanCase/XmTestPlanCaseMng.vue

@ -26,11 +26,6 @@
--> -->
<el-table-column prop="caseId" label="用例编号" width="120" show-overflow-tooltip fixed="left"></el-table-column> <el-table-column prop="caseId" label="用例编号" width="120" show-overflow-tooltip fixed="left"></el-table-column>
<el-table-column prop="execStatus" label="执行结果" width="120" show-overflow-tooltip>
<template slot-scope="scope">
<mdp-select-dict-tag :dict="dicts['testStepTcode']" v-model="scope.row.execStatus" effect="dark" @change="editSomeFields(scope.row,'execStatus',$event)"></mdp-select-dict-tag>
</template>
</el-table-column>
<el-table-column prop="caseName" label="用例名称" min-width="250"> <el-table-column prop="caseName" label="用例名称" min-width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<span> <el-link @click="showEdit( scope.row,scope.$index)">{{scope.row.caseName}} </el-link></span> <span> <el-link @click="showEdit( scope.row,scope.$index)">{{scope.row.caseName}} </el-link></span>
@ -38,22 +33,37 @@
<el-button type="primary" @click="showEdit( scope.row,scope.$index)" icon="el-icon-edit" circle plain size="mini"></el-button> <el-button type="primary" @click="showEdit( scope.row,scope.$index)" icon="el-icon-edit" circle plain size="mini"></el-button>
</span> </span>
</template> </template>
</el-table-column>
<el-table-column prop="execUsername" label="执行人姓名" min-width="120" >
<template slot-scope="scope">
<span> {{scope.row.execUsername}} </span>
</template>
</el-table-column>
<el-table-column prop="priority" label="优先级" width="120" >
<template slot-scope="scope">
<mdp-select-dict-tag :dict="dicts['priority']" v-model="scope.row.priority" @change="editSomeFields(scope.row,'priority',$event)"></mdp-select-dict-tag>
</template>
</el-table-column>
<el-table-column prop="remark" label="执行备注" min-width="150" show-overflow-tooltip>
<template slot-scope="scope">
<span> {{scope.row.remark}} </span>
</template>
</el-table-column>
</el-table-column>
<template v-if="select!==true">
<el-table-column prop="execStatus" label="执行结果" width="120" show-overflow-tooltip>
<template slot-scope="scope">
<mdp-select-dict-tag :dict="dicts['testStepTcode']" v-model="scope.row.execStatus" effect="dark" @change="editSomeFields(scope.row,'execStatus',$event)"></mdp-select-dict-tag>
</template>
</el-table-column>
<el-table-column prop="execUsername" label="执行人姓名" min-width="120" >
<template slot-scope="scope">
<span> {{scope.row.execUsername}} </span>
</template>
</el-table-column>
<el-table-column prop="priority" label="优先级" width="120" >
<template slot-scope="scope">
<mdp-select-dict-tag :dict="dicts['priority']" v-model="scope.row.priority" @change="editSomeFields(scope.row,'priority',$event)"></mdp-select-dict-tag>
</template>
</el-table-column>
<el-table-column prop="remark" label="执行备注" min-width="150" show-overflow-tooltip>
<template slot-scope="scope">
<span> {{scope.row.remark}} </span>
</template>
</el-table-column>
</template>
<template v-if="select==true">
<el-table-column label="操作" min-width="150">
<template slot-scope="scope">
<el-button type="primary" @click="$emit('select',scope.row)">选择</el-button>
</template>
</el-table-column>
</template>
</el-table> </el-table>
<el-pagination layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination> <el-pagination layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination>
</el-row> </el-row>
@ -88,10 +98,13 @@ export default {
components: { components: {
XmTestPlanCaseEdit,XmTestCaseSelect,XmFuncSelect, XmTestPlanCaseEdit,XmTestCaseSelect,XmFuncSelect,
}, },
props:['visible','xmTestPlan','xmTestCasedb','xmTestCase'],
props:['visible','xmTestPlan','xmTestCasedb','xmTestCase','xmProduct','select'],
computed: { computed: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
xmProductCpd(){ xmProductCpd(){
if(this.xmProduct&& this.xmProduct.id){
return this.xmProduct
}
if(this.xmTestCasedb && this.xmTestCasedb.id){ if(this.xmTestCasedb && this.xmTestCasedb.id){
return {id:this.xmTestCasedb.productId,productName:this.xmTestCasedb.productName} return {id:this.xmTestCasedb.productId,productName:this.xmTestCasedb.productName}
} }

Loading…
Cancel
Save