Browse Source

优化

master
陈裕财 3 years ago
parent
commit
bef872916b
  1. 31
      src/views/xm/core/xmTestCase/XmTestCaseEdit.vue
  2. 47
      src/views/xm/core/xmTestPlanCase/XmTestPlanCaseEdit.vue

31
src/views/xm/core/xmTestCase/XmTestCaseEdit.vue

@ -2,7 +2,7 @@
<section> <section>
<el-row> <el-row>
<!--编辑界面 XmTestCase 测试用例--> <!--编辑界面 XmTestCase 测试用例-->
<el-form :model="editForm" :rules="editFormRules" ref="editFormRef" label-position="left">
<el-form :model="editForm" label-width="120px" :rules="editFormRules" ref="editFormRef" label-position="left">
<el-row> <el-row>
<el-col :span="6" class="padding border"> <el-col :span="6" class="padding border">
@ -13,24 +13,26 @@
<el-form-item label="产品" prop="productId"> <el-form-item label="产品" prop="productId">
{{editForm.productName?editForm.productName:editForm.productId }} {{editForm.productName?editForm.productName:editForm.productId }}
</el-form-item> </el-form-item>
<el-form-item label="关联需求" prop="menuName">
{{editForm.menuName?editForm.menuName:'暂无关联需求'}} <el-button type="text" @click="menuVisible=true">选择需求</el-button>
<el-form-item label="关联模块" prop="menuName">
{{editForm.funcName?editForm.funcName:'暂无关联需求'}} <el-button type="text" @click="funcVisible=true">选择模块</el-button>
</el-form-item>
<el-form-item label="关联需求" prop="menuId" id="menuInfo">
{{editForm.menuName}} &nbsp;&nbsp;&nbsp; <el-link @click="menuVisible=true" type="primary">{{editForm.menuName?'更改':'设置'}}</el-link>&nbsp;&nbsp;&nbsp;
<el-link v-if="editForm.menuId" @click="menuFormVisible=true" type="primary">查看需求</el-link>
</el-form-item> </el-form-item>
<el-form-item label="版本号" prop="verNum"> <el-form-item label="版本号" prop="verNum">
<el-input v-model="editForm.verNum" placeholder="版本号" :maxlength="50" @change="editSomeFields(editForm,'verNum',$event)"></el-input> <el-input v-model="editForm.verNum" placeholder="版本号" :maxlength="50" @change="editSomeFields(editForm,'verNum',$event)"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="18" class="border padding"> <el-col :span="18" class="border padding">
<el-form-item label="" prop="caseName" label-width="0px">
<el-row class="label-font-color">
<span><span v-if="opType=='edit'">用例编号:</span>&nbsp;&nbsp;{{editForm.id}} &nbsp;&nbsp;</span><span class="label-font-color"><i class="el-icon-s-operation"></i>模块</span><span>{{editForm.funcName}} <el-button type="text" @click="funcVisible=true">选择模块</el-button></span>
<el-form-item label="用例标题" prop="caseName">
<el-input v-model="editForm.caseName" placeholder="测试用例 标题" @change="editSomeFields(editForm,'caseName',$event)"></el-input>
<el-row class="label-font-color" v-if="opType=='edit'">
<span><span >用例编号:</span>&nbsp;&nbsp;{{editForm.id}} &nbsp;&nbsp;</span>
</el-row> </el-row>
<el-row>
<my-input v-model="editForm.caseName" placeholder="测试用例 标题" @change="editSomeFields(editForm,'caseName',$event)"></my-input>
</el-row>
<el-row class="padding">
</el-form-item>
<el-row class="padding">
<el-col :span="6"> <el-col :span="6">
<mdp-select-dict-x label="状态" :dict="dicts['testCaseStatus']" v-model="editForm.caseStatus" @change="editSomeFields(editForm,'caseStatus',$event)"></mdp-select-dict-x> <mdp-select-dict-x label="状态" :dict="dicts['testCaseStatus']" v-model="editForm.caseStatus" @change="editSomeFields(editForm,'caseStatus',$event)"></mdp-select-dict-x>
@ -47,7 +49,6 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form-item>
<el-tabs v-model="activeTab"> <el-tabs v-model="activeTab">
<el-tab-pane name="1" label="基本信息"> <el-tab-pane name="1" label="基本信息">
<el-form-item label="" prop="preRmark" label-width="0px"> <el-form-item label="" prop="preRmark" label-width="0px">
@ -107,6 +108,9 @@
<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 title="需求详情" :visible.sync="menuFormVisible" :with-header="false" width="90%" top="20px" append-to-body :close-on-click-modal="false" >
<xm-menu-edit v-if="menuFormVisible" :reload="true" :xm-menu="{menuId:editForm.menuId}" :visible="menuFormVisible" @cancel="menuFormVisible=false"></xm-menu-edit>
</el-dialog>
</section> </section>
</template> </template>
@ -127,7 +131,7 @@ import MdpSelectUserXm from '@/views/xm/core/components/MdpSelectUserXm';//修
export default { export default {
name:'xmTestCaseEdit', name:'xmTestCaseEdit',
components: { components: {
XmMenuSelect,XmFuncSelect,MyInput,TestStepConfig,XmQuestionMng,XmTestPlanCaseMng,MdpSelectUserXm,
XmMenuSelect,XmFuncSelect,MyInput,TestStepConfig,XmQuestionMng,XmTestPlanCaseMng,MdpSelectUserXm,XmMenuEdit:()=>import("../xmMenu/XmMenuDetail")
}, },
computed: { computed: {
...mapGetters([ 'userInfo' ]), ...mapGetters([ 'userInfo' ]),
@ -167,6 +171,7 @@ import MdpSelectUserXm from '@/views/xm/core/components/MdpSelectUserXm';//修
}, },
maxTableHeight:300, maxTableHeight:300,
menuVisible:false, menuVisible:false,
menuFormVisible:false,
funcVisible:false, funcVisible:false,
activeTab:'1', activeTab:'1',
}//end return }//end return

47
src/views/xm/core/xmTestPlanCase/XmTestPlanCaseEdit.vue

@ -8,13 +8,21 @@
<el-form-item label="测试库" prop="casedbName"> <el-form-item label="测试库" prop="casedbName">
{{editForm.casedbName?editForm.casedbName:editForm.casedbId }} {{editForm.casedbName?editForm.casedbName:editForm.casedbId }}
</el-form-item>
<el-form-item label="产品" prop="productId">
</el-form-item>
<el-form-item label="归属计划" prop="planId">
{{editForm.planId?editForm.planId:editForm.planId }}
</el-form-item>
<el-form-item label="归属项目" prop="projectId">
{{editForm.projectId?editForm.projectId:editForm.projectId }}
</el-form-item>
<el-form-item label="归属产品" prop="productId">
{{editForm.productName?editForm.productName:editForm.productId }} {{editForm.productName?editForm.productName:editForm.productId }}
</el-form-item>
<el-form-item label="关联模块" prop="menuName">
{{editForm.funcName?editForm.funcName:'暂无关联需求'}}
</el-form-item> </el-form-item>
<el-form-item label="关联需求" prop="menuName"> <el-form-item label="关联需求" prop="menuName">
{{editForm.menuName?editForm.menuName:'暂无关联需求'}} <el-button type="text" @click="menuVisible=true">选择需求</el-button>
{{editForm.menuName?editForm.menuName:'暂无关联需求'}} <el-button type="text" @click="menuFormVisible=true">查看需求</el-button>
</el-form-item> </el-form-item>
<el-form-item label="版本号" prop="verNum"> <el-form-item label="版本号" prop="verNum">
@ -23,12 +31,13 @@
</el-col> </el-col>
<el-col :span="18" class="border padding"> <el-col :span="18" class="border padding">
<el-form-item label="" prop="caseName" label-width="0px"> <el-form-item label="" prop="caseName" label-width="0px">
<el-row class="label-font-color">
<span ><span >用例编号:</span>&nbsp;&nbsp;{{editForm.caseId}} &nbsp;&nbsp;<i class="el-icon-s-operation"></i><span>模块</span></span><span>{{editForm.funcName}}</span>
</el-row>
<el-row> <el-row>
<span class="title-font-size">{{editForm.caseName}}</span> <span class="title-font-size">{{editForm.caseName}}</span>
</el-row> </el-row>
<el-row class="label-font-color">
<span > 用例编号: {{editForm.caseId}} </span>
</el-row>
<el-row class="padding"> <el-row class="padding">
<el-col :span="8"> <el-col :span="8">
<mdp-select-user-xm label="执行人" userid-key="execUserid" username-key="execUsername" v-model="editForm" @change="editSomeFields(editForm,'execUserid',$event)"></mdp-select-user-xm> <mdp-select-user-xm label="执行人" userid-key="execUserid" username-key="execUsername" v-model="editForm" @change="editSomeFields(editForm,'execUserid',$event)"></mdp-select-user-xm>
@ -117,22 +126,7 @@
<el-input type="textarea" :rows="6" v-model="editForm.remark" placeholder="执行备注" :maxlength="2147483647" @change="editSomeFields(editForm,'remark',$event)"></el-input> <el-input type="textarea" :rows="6" v-model="editForm.remark" placeholder="执行备注" :maxlength="2147483647" @change="editSomeFields(editForm,'remark',$event)"></el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-tab-pane>
<el-tab-pane name="2" label="需求">
<el-row>
<el-col :span="12">
<el-form-item label="归属产品" prop="productId">
{{editForm.productId}}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="用户故事" prop="menuId" id="menuInfo">
{{editForm.menuName}} &nbsp;&nbsp;&nbsp; <el-link @click="menuVisible=true" type="primary">{{editForm.menuName?'更改':'设置'}}</el-link>&nbsp;&nbsp;&nbsp;
<el-link v-if="editForm.menuName" @click="menuVisible=true" type="primary">查看需求</el-link>
</el-form-item>
</el-col>
</el-row>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane name="3" label="缺陷"> <el-tab-pane name="3" label="缺陷">
<el-row v-if="activateName=='3'"> <el-row v-if="activateName=='3'">
<xm-question-mng :xm-test-plan-case="editForm" :xm-product="{id:editForm.productId,productName:editForm.productName}" :sel-project="{id:editForm.projectId,name:editForm.projectName}"></xm-question-mng> <xm-question-mng :xm-test-plan-case="editForm" :xm-product="{id:editForm.productId,productName:editForm.productName}" :sel-project="{id:editForm.projectId,name:editForm.projectName}"></xm-question-mng>
@ -163,14 +157,14 @@
</el-row> </el-row>
<el-dialog append-to-body title="需求明细" :visible.sync="menuVisible" width="80%" top="20px" :close-on-click-modal="false">
<xm-menu-edit :visible="menuVisible" :reload="true" :xm-menu="{menuId:editForm.menuId,menuName:editForm.menuName}" ></xm-menu-edit>
<el-dialog append-to-body title="需求明细" :visible.sync="menuFormVisible" width="80%" top="20px" :close-on-click-modal="false">
<xm-menu-edit :visible="menuFormVisible" :reload="true" :xm-menu="{menuId:editForm.menuId,menuName:editForm.menuName}" ></xm-menu-edit>
</el-dialog> </el-dialog>
<!--新增 XmQuestion xm_question界面--> <!--新增 XmQuestion xm_question界面-->
<el-dialog title="新增缺陷" :visible.sync="addBugVisible" width="90%" top="20px" append-to-body :close-on-click-modal="false"> <el-dialog title="新增缺陷" :visible.sync="addBugVisible" width="90%" top="20px" append-to-body :close-on-click-modal="false">
<xm-question-add op-type="add" :xm-product="{id:editForm.productId,productName:editForm.productName}" :xm-test-plan-case="editForm" :sel-project=" {id:editForm.projectId,name:editForm.projectName} " :visible="addBugVisible" @cancel="addBugVisible=false" ></xm-question-add> <xm-question-add op-type="add" :xm-product="{id:editForm.productId,productName:editForm.productName}" :xm-test-plan-case="editForm" :sel-project=" {id:editForm.projectId,name:editForm.projectName} " :visible="addBugVisible" @cancel="addBugVisible=false" ></xm-question-add>
</el-dialog>
</el-dialog>
</section> </section>
</template> </template>
@ -229,6 +223,7 @@ import MdpSelectUserXm from '@/views/xm/core/components/MdpSelectUserXm';//修
}, },
maxTableHeight:300, maxTableHeight:300,
menuVisible:false, menuVisible:false,
menuFormVisible:false,
next:false, next:false,
activateName:'1', activateName:'1',
addBugVisible:false, addBugVisible:false,

Loading…
Cancel
Save