Browse Source

优化

master
陈裕财 3 years ago
parent
commit
eb72b257db
  1. 516
      src/views/xm/core/xmQuestion/XmQuestionAddForTask.vue
  2. 14
      src/views/xm/core/xmQuestion/XmQuestionEdit.vue
  3. 1131
      src/views/xm/core/xmQuestion/XmQuestionForTask.vue
  4. 8
      src/views/xm/core/xmQuestion/XmQuestionMng.vue
  5. 7
      src/views/xm/core/xmTask/XmTaskEdit.vue
  6. 2
      src/views/xm/core/xmTestCase/XmTestCaseEdit.vue
  7. 6
      src/views/xm/core/xmTestCasedb/XmTestCasedbMng.vue

516
src/views/xm/core/xmQuestion/XmQuestionAddForTask.vue

@ -1,516 +0,0 @@
<template>
<section>
<el-row class="page-main">
<el-form :model="addForm" label-width="120px" :rules="addFormRules" ref="addForm">
<el-form-item label="缺陷标题" prop="name">
<el-input v-model="addForm.name" placeholder="缺陷标题" ></el-input>
</el-form-item>
<el-row>
<el-col :span="8">
<el-form-item label="归属项目" prop="projectId">
<font v-if="filters.selProject">{{this.filters.selProject?this.filters.selProject.name:''}}</font>
<xm-project-select ref="xmProjectSelect" v-if="!selProject" @row-click="onPorjectConfirm"></xm-project-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="隶属需求" prop="menuId">
<el-tag title="隶属需求" closable @click="showSelectMenu" @close.stop="handleCloseMenuTag">
<div class="icon" :style="{backgroundColor: 'rgb(79, 140, 255)' }">
<i :class=" 'el-icon-document' " ></i>
</div> {{addForm.menuName?addForm.menuName:"未关联需求"}}</el-tag>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="负责人" prop="handlerUsername">
{{addForm.handlerUsername}}
<el-popover
placement="top-start"
title="重新指派给"
width="200"
trigger="hover" >
<el-row>
<el-button type="text" @click="sendToAsk">提出人</el-button><br>
<el-button type="text" @click="sendToCreater">创建人</el-button><br>
<el-button type="text" @click="showGroupUsers('handlerUsername')">其它人</el-button><br>
</el-row>
<el-button slot="reference" type="text">指派给</el-button>
</el-popover>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="严重程度" prop="bugSeverity">
<el-select v-model="addForm.bugSeverity" placeholder="请选择严重程度">
<el-option v-for="(i,index) in dicts['bugSeverity']" :label="i.name" :value="i.id" :key="index">{{i.name}}</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="优先级别" prop="priority">
<el-select v-model="addForm.priority" placeholder="请选择优先级">
<el-option v-for="(i,index) in dicts['priority']" :label="i.name" :value="i.id" :key="index">{{i.name}}</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="结束时间" prop="endTime">
<el-date-picker value-format="yyyy-MM-dd HH:mm:ss" v-model="addForm.endTime"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-tabs value="1">
<el-tab-pane name="1" label="基本信息">
<el-row>
<el-col :span="6">
<el-form-item label="复现频率" prop="repRate">
<el-select v-model="addForm.repRate" placeholder="请选择复现频率">
<el-option v-for="(i,index) in dicts['bugRepRate']" :label="i.name" :value="i.id" :key="index">{{i.name}}</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="复现版本" prop="verNum">
<el-select v-model="addForm.verNum" placeholder="请选择版本">
<el-option v-for="(i,index) in xmProductVersions" :label="i.name" :value="i.id" :key="index">{{i.id}}</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="缺陷类别" prop="bugType">
<el-select v-model="addForm.bugType" placeholder="请选择缺陷类别">
<el-option v-for="(i,index) in dicts['bugType']" :label="i.name" :value="i.id" :key="index">{{i.name}}</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="提出人" prop="askUsername">
<el-tag @click="showGroupUsers('askUsername')">{{addForm.askUsername?addForm.askUsername:'未关联提出人'}}</el-tag>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="缺陷描述" prop="description">
<el-tooltip content="点击切换为富文本编辑|普通文本">
<el-button icon="el-icon-refresh" @click="descriptionEditorVisible=!descriptionEditorVisible" type="text"></el-button>
</el-tooltip>
<div v-if="descriptionEditorVisible==false">
<el-input style="width:100%;" v-model="addForm.description" type="textarea" :rows="6"> </el-input>
</div>
<div v-else>
<vue-editor class="rich-context" :id="'description_'+addForm.id" :branch-id="userInfo.branchId" v-model="addForm.description"></vue-editor>
</div>
</el-form-item>
</el-tab-pane>
<el-tab-pane label="测试步骤" name="2">
<el-form-item label="测试步骤" prop="opStep">
<el-tooltip content="点击切换为富文本编辑|普通文本">
<el-button icon="el-icon-refresh" @click="opStepEditorVisible=!opStepEditorVisible" type="text"></el-button>
</el-tooltip>
<div v-if="opStepEditorVisible==false">
<el-input style="width:100%;" v-model="addForm.opStep" type="textarea" :rows="6"> </el-input>
</div>
<div v-else>
<vue-editor :id="'opStep'+addForm.id" :branch-id="userInfo.branchId" v-model="addForm.opStep" ref="opStep"></vue-editor>
</div>
</el-form-item>
</el-tab-pane>
<el-tab-pane label="预期结果" name="3">
<el-form-item label="预期结果" prop="expectResult">
<el-tooltip content="点击切换为富文本编辑|普通文本">
<el-button icon="el-icon-refresh" @click="expectResultEditorVisible=!expectResultEditorVisible" type="text"></el-button>
</el-tooltip>
<div v-if="expectResultEditorVisible==false">
<el-input style="width:100%;" v-model="addForm.expectResult" type="textarea" :rows="6"> </el-input>
</div>
<div v-else>
<vue-editor v-if="expectResultEditorVisible==true" :id="'expectResult'+addForm.id" :branch-id="userInfo.branchId" v-model="addForm.expectResult" ref="expectResult"></vue-editor>
</div>
</el-form-item>
</el-tab-pane>
</el-tabs>
</el-form>
<el-drawer title="选中用户" :visible.sync="selectUserVisible" size="70%" append-to-body :close-on-click-modal="false">
<xm-group-mng :sel-project="filters.selProject" :is-select-single-user="1" @user-confirm="onUserConfirm"></xm-group-mng>
</el-drawer>
<el-drawer title="选中任务" :visible.sync="selectTaskVisible" fullscreen size="70%" append-to-body :close-on-click-modal="false">
<xm-task-list :sel-project="filters.selProject" @task-selected="onSelectedTask"></xm-task-list>
</el-drawer>
<el-drawer append-to-body title="需求选择" :visible.sync="selectMenuVisible" size="70%" :close-on-click-modal="false">
<xm-menu-select :is-select-menu="true" checkScope="3" @selected="onSelectedMenu" :sel-project="filters.selProject" :xm-product="xmProduct"></xm-menu-select>
</el-drawer>
</el-row>
<el-row>
<el-button @click.native="handleCancel">取消</el-button>
<el-button v-loading="load.add" type="primary" @click.native="addSubmit" :disabled="load.add==true">保存</el-button>
</el-row>
</section>
</template>
<script>
import util from '@/common/js/util';//
import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { addXmQuestion } from '@/api/xm/core/xmQuestion';
import { mapGetters } from 'vuex';
import AttachmentUpload from "@/views/mdp/arc/archiveAttachment/AttachmentUpload"; //
import {sn} from '@/common/js/sequence';
import VueEditor from '@/components/Tinymce/index';
import XmGroupMng from '../xmGroup/XmGroupSelect';
import xmMenuSelect from '../xmMenu/XmMenuSelect';
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';
import XmTaskList from '../xmTask/XmTaskList';
export default {
computed: {
...mapGetters([
'userInfo','roles'
]),
calcBugStep(){
if(this.dicts['bugStatus'] && this.addForm){
var index=this.dicts['bugStatus'].findIndex(i=>{
if(i.id==this.addForm.bugStatus){
return true;
}else{
return false;
}
})
return index+1;
}else{
return 0;
}
}
},
props:['xmTask','xmQuestion','visible',"selProject",'xmProduct'],
watch: {
'xmQuestion':function( xmQuestion ) {
this.addForm=Object.assign(this.addForm, this.xmQuestion);
this.addForm.qtype=this.qtype
},
'visible':function(visible) {
if(visible==true){
//
if(this.qtype){
this.addForm.qtype=this.qtype
}else{
this.addForm.qtype='1'
}
this.addForm.id=sn()
this.initByTask();
}
},
selProject:function(selProject){
if(!selProject){
this.filters.selProject=null;
this.addForm.projectId=''
this.addForm.projectName=''
}else{
this.filters.selProject=selProject
this.addForm.projectId=selProject.id
this.addForm.projectName=selProject.name
}
}
},
data() {
return {
filters:{
selProject:null,
},
dicts:{
priority:[],
bugSeverity:[],
bugSolution:[],
bugStatus:[],
bugType:[],
bugRepRate:[],
},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
load:{ list: false, edit: false, del: false, add: false },//...
addFormRules: {
name: [
{required: true, message: '缺陷标题不可为空', trigger: 'blur' }
],
askUsername: [
{required: true, message: '提出人不可为空', trigger: 'blur' }
],
handlerUsername: [
{required: true, message: '请指派给一个人', trigger: 'blur' }
],
},
// xm_question
addForm: {
id:'',name:'',projectId:'',projectName:'',taskId:'',taskName:'',endTime:'',askUserid:'',askUsername:'',handlerUserid:'',handlerUsername:'',priority:'3',solution:'',processTime:'',receiptMessage:'',receiptTime:'',description:'',createUserid:'',createUsername:'',createTime:'',status:'',bugSeverity:'3',
qtype:'',
attachment: [],
repRate:'',
verNum:'',
bugReason:'',
},
/**begin 在下面加自定义属性,记得补上面的一个逗号**/
fileVisible: true,
selectUserVisible: false,
userFieldName:'',
selectTaskVisible:false,
selectMenuVisible:false,
selectProjectVisible:false,
opStepEditorVisible:false,
expectResultEditorVisible:false,
descriptionEditorVisible:false,
xmProductVersions:[{id:"1.0.0" ,name:'1.0.0'}],
/**end 在上面加自定义属性**/
}//end return
},//end data
methods: {
// @cancel="addFormVisible=false"
handleCancel:function(){
this.setDefaultData();
this.$emit('cancel');
},
//XmQuestion xm_question @submit="afterAddSubmit"
addSubmit: function () {
this.$refs.addForm.validate((valid) => {
console.log(this.addForm.handlerUserid);
if (valid) {
this.$confirm('确认提交吗?', '提示', {}).then(() => {
this.load.add=true
let params = Object.assign({}, this.addForm);
if(params.expectResult){
params.expectResult=params.expectResult.replace(/<p>\n<br>\n<\p>/g,"");
params.expectResult=params.expectResult.replace(/<p><br><\p>/g,"");
}
if(params.opStep){
params.opStep=params.opStep.replace(/<p>\n<br>\n<\p>/g,"");
params.opStep=params.opStep.replace("<p><br><\p>","");
}
if(params.description){
params.description=params.description.replace(/<p>\n<br>\n<\p>/g,"");
params.description=params.description.replace("<p><br><\p>","");
}
if(this.xmProduct && this.xmProduct.id){
params.productId=this.xmProduct.id
}
addXmQuestion(params).then((res) => {
this.load.add=false
var tips=res.data.tips;
if(tips.isOk){
this.$emit('submit');// @submit="afterAddSubmit"
this.handleCancel();
}
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' });
}).catch( err => this.load.add=false);
});
}
});
},
/**begin 在下面加自定义方法,记得补上面的一个逗号**/
//
onChange : function(file,fileList){
let list = [];
if(fileList != null && fileList.length > 0){
fileList.forEach( (item)=>{
let fileOne = {
id: item.id,
name: item.name,
addr: item.url,
type: item.fileSuffix,
remark: item.remark,
}
list.push(fileOne);
} );
this.addForm.attachment = list;
console.log(list);
}
},
setDefaultData() {
this.addForm.id = sn();
if(this.filters.selProject){
this.addForm.projectId = this.filters.selProject.id;
this.addForm.projectName = this.filters.selProject.name;
}
this.addForm.createUserid = this.userInfo.userid;
this.addForm.createUsername = this.userInfo.username;
this.addForm.askUserid = this.userInfo.userid;
this.addForm.askUsername = this.userInfo.username;
this.addForm.handlerUserid = this.userInfo.userid;
this.addForm.handlerUsername = this.userInfo.username;
this.addForm.endTime = this.formateDate(new Date().getTime() + 7*24*3600*1000);
this.fileVisible = this.visible;
console.log("set default data success");
},
formateDate(time) {
const date = new Date(time);
const m = date.getMonth()+1;
const d = date.getDate();
return date.getFullYear()+"-"+(m < 10 ? "0"+m : m)+"-"+ (d < 10 ? "0"+d : d) + " 00:00:00";
},
showGroupUsers:function(fieldName){
this.userFieldName=fieldName;
this.selectUserVisible=true;
},
onUserConfirm:function(groupUsers){
if(groupUsers==null || groupUsers.length==0){
if(this.userFieldName=='askUsername'){
this.addForm.askUserid=''
this.addForm.askUsername=''
}else if(this.userFieldName=='handlerUsername'){
this.addForm.handlerUserid=''
this.addForm.handlerUsername='';
}
}else{
var user=groupUsers[0]
if(this.userFieldName=='askUsername'){
this.addForm.askUserid=user.userid
this.addForm.askUsername=user.username
}else if(this.userFieldName=='handlerUsername'){
this.addForm.handlerUserid=user.userid
this.addForm.handlerUsername=user.username
}
}
this.selectUserVisible=false
},
showSelectTask:function(){
if(this.filters.selProject==null){
this.$notify({position:'bottom-left',showClose:true,message: "请先选项目", type: 'error' });
return ;
}
this.selectTaskVisible=true;
},
onSelectedTask(task){
this.addForm.taskId=task.id
this.addForm.taskName=task.name
this.selectTaskVisible=false;
if(task.menuId){
this.addForm.menuId=task.menuId
this.addForm.menuName=task.menuName
this.addForm.productId=task.productId
}
this.addForm.handlerUserid=task.executorUserid
this.addForm.handlerUsername=task.executorUsername
},
handleCloseTaskTag:function(){
this.addForm.taskId=''
this.addForm.taskName=""
},
showSelectMenu:function(){
if(this.filters.selProject==null){
this.$notify({position:'bottom-left',showClose:true,message: "请先选项目", type: 'error' });
this.$refs.xmProjectSelect.projectVisible=true;
return ;
}
this.selectMenuVisible=true;
},
onSelectedMenu(menu){
this.addForm.menuId=menu.menuId
this.addForm.menuName=menu.menuName
this.addForm.iterationId=menu.iterationId
this.addForm.iterationName=menu.iterationName
this.addForm.productId=menu.productId
this.selectMenuVisible=false;
},
handleCloseMenuTag:function(){
this.addForm.menuId=''
this.addForm.menuName=""
},
sendToCreater(){
this.addForm.handlerUsername=this.addForm.createUsername
this.addForm.handlerUserid=this.addForm.createUserid
},
sendToAsk(){
this.addForm.handlerUsername=this.addForm.askUsername
this.addForm.handlerUserid=this.addForm.askUserid
},
onPorjectConfirm:function(project){
this.filters.selProject=project
this.addForm.projectId=project.id
this.addForm.projectName=project.name
this.selectProjectVisible=false;
},
clearProject(){
this.filters.selProject=null
this.addForm.projectId=''
this.addForm.projectName=''
},
initByTask(){
if(this.xmTask && this.xmTask.id){
this.addForm.menuId=this.xmTask.menuId
this.addForm.menuName=this.xmTask.menuName
this.addForm.taskId=this.xmTask.id
this.addForm.taskName=this.xmTask.name
this.addForm.projectId=this.xmTask.projectId
this.addForm.productId=this.xmTask.productId
if(this.xmTask.executorUserid){
this.addForm.handlerUserid = this.xmTask.executorUserid;
this.addForm.handlerUsername = this.xmTask.executorUsername;
}else{
this.addForm.handlerUserid = this.xmTask.createUserid;
this.addForm.handlerUsername = this.xmTask.createUsername;
}
}
}
/**end 在上面加自定义方法**/
},//end method
components: {
// 'xm-question-edit':XmQuestionEdit
'upload': AttachmentUpload,XmGroupMng,VueEditor,XmTaskList,xmMenuSelect,XmProjectSelect
},
mounted() {
console.log("question_add");
this.addForm=Object.assign(this.addForm, this.xmQuestion);
if(!this.selProject){
this.filters.selProject=null
}else{
this.filters.selProject=this.selProject
}
this.addForm.qtype=this.qtype
this.setDefaultData();
this.initByTask();
initSimpleDicts('all',['bugSeverity','bugSolution','bugStatus','bugType','priority','bugRepRate']).then(res=>{
if(res.data.tips.isOk){
this.dicts['bugSeverity']=res.data.data.bugSeverity
this.dicts['bugSolution']=res.data.data.bugSolution
this.dicts['bugStatus']=res.data.data.bugStatus
this.dicts['bugType']=res.data.data.bugType
this.dicts['priority']=res.data.data.priority
this.dicts['bugRepRate']=res.data.data.bugRepRate
}
});
/**在下面写其它函数***/
}//end mounted
}
</script>
<style lang="scss" scoped>
.wf-main-context-box {
border:1px dashed #000;
margin-bottom: 10px;
margin-top: 30px;
padding:10px;
}
.wf-main-context p {
color: #585858;
}
.wf-main-context p > img {
max-width: 100%;
}
</style>

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

@ -228,7 +228,7 @@
}
},
props:['xmQuestion','visible',"selProject",'opType','xmProduct','xmTestCase','xmTestPlanCase'],
props:['xmQuestion','visible',"selProject",'opType','xmProduct','xmTestCase','xmTestPlanCase','xmMenu'],
watch: {
'xmQuestion':function( xmQuestion ) {
this.editForm = {...xmQuestion};
@ -597,6 +597,18 @@
this.editForm.name=this.xmTestPlanCase.caseName
this.editForm.projectId=this.xmTestPlanCase.projectId
}
if(this.xmMenu && this.xmMenu.menuId){
this.editForm.menuId=this.xmMenu.menuId
this.editForm.menuName=this.xmMenu.menuName
if(this.xmMenu.productId){
this.editForm.productId=this.xmMenu.id
this.editForm.productName=this.xmMenu.productName
}
if(this.xmMenu.funcId){
this.editForm.funcId=this.xmTestPlanCase.funcId
this.editForm.funcName=this.xmTestPlanCase.funcName
}
}
}else{
}

1131
src/views/xm/core/xmQuestion/XmQuestionForTask.vue
File diff suppressed because it is too large
View File

8
src/views/xm/core/xmQuestion/XmQuestionMng.vue

@ -227,7 +227,7 @@
<!--新增 XmQuestion xm_question界面-->
<el-dialog title="新增缺陷" :visible.sync="addFormVisible" width="90%" top="20px" append-to-body :close-on-click-modal="false">
<xm-question-add op-type="add" :xm-test-plan-case="xmTestPlanCase" :xm-test-plan="xmTestPlan" :xm-product="filters.product" :xm-test-case="xmTestCase" :qtype="qtype" :sel-project=" filters.selProject " :xm-question="addForm" :visible="addFormVisible" @cancel="addFormVisible=false" @submit="afterAddSubmit"></xm-question-add>
<xm-question-add :xm-menu="xmMenu" op-type="add" :xm-test-plan-case="xmTestPlanCase" :xm-test-plan="xmTestPlan" :xm-product="filters.product" :xm-test-case="xmTestCase" :qtype="qtype" :sel-project=" filters.selProject " :xm-question="addForm" :visible="addFormVisible" @cancel="addFormVisible=false" @submit="afterAddSubmit"></xm-question-add>
</el-dialog>
<xm-group-dialog ref="xmGroupDialog" :sel-project=" filters.selProject " :is-select-single-user="1" @user-confirm="onUserConfirm"></xm-group-dialog>
<el-drawer append-to-body title="需求选择" :visible.sync="menuVisible" size="60%" :close-on-click-modal="false">
@ -262,7 +262,7 @@
'userInfo','roles'
]),
},
props: ["selProject",'qtype','xmTestPlanCase','xmTestCase','xmTestPlan','xmIteration','xmProduct','queryScene'],
props: ["selProject",'qtype','xmTestPlanCase','xmTestCase','xmTestPlan','xmIteration','xmProduct','queryScene','xmMenu'],
watch:{
selProject:function(selProject){
this.filters.selProject=this.selProject
@ -512,6 +512,10 @@
params.linkIterationId=this.xmIteration.id
}
if(this.xmMenu){
params.menuId=this.xmMenu.menuId
}
if(this.filters.key){
params.key='%'+this.filters.key+'%'
}

7
src/views/xm/core/xmTask/XmTaskEdit.vue

@ -283,7 +283,8 @@
<xm-sub-work-item v-if="activateTabPaneName=='4'" :parent-xm-task="editForm" @sub-work-item-num="setSubWorkItemNum" @add-sub-task="onAddSubTask"></xm-sub-work-item>
</el-tab-pane>
<el-tab-pane label="缺陷" name="41" v-if="editForm.ntype!='1'">
<xm-question-for-task v-if="activateTabPaneName=='41'" :xm-task="editForm" :sel-project="xmProject"></xm-question-for-task>
<xm-question-mng v-if="activateTabPaneName=='41' && editForm.menuId" :xm-product="editForm.productId?{id:editForm.productId,productName:editForm.productName}:null" :xm-menu="editForm.menuId?{menuId:editForm.menuId,menuName:editForm.menuName}:null" :sel-project="xmProject"></xm-question-mng>
<div v-else-if="activateTabPaneName=='41'">缺陷由用户故事关联得出请先关联用户故事. <el-button @click="activateTabPaneName=3">去关联</el-button></div>
</el-tab-pane>
<el-tab-pane label="执行人" name="42" v-if="editForm.ntype!='1'">
@ -565,7 +566,7 @@
import XmRecord from '../xmRecord/XmRecord'
import MdpSelectUserXm from '@/views/xm/core/components/MdpSelectUserXm'
import XmSubWorkItem from "@/views/xm/core/xmTaskWorkItem/XmSubWorkItem";
import xmQuestionForTask from "@/views/xm/core/xmQuestion/XmQuestionForTask";
import xmQuestionMng from "@/views/xm/core/xmQuestion/XmQuestionMng";
import XmTaskWorkloadRecord from "../xmTaskWorkload/XmTaskWorkloadRecord"
import XmMenuEdit from '../xmMenu/XmMenuEdit.vue';
import XmMyDoFocus from '@/views/myWork/my/components/DoFocus';
@ -996,7 +997,7 @@
components: {
xmSkillMng,
skillMng,xmMenuSelect,XmTaskList,XmExecuserMng,XmGroupSelect,XmMenuRichDetail,TagMng,XmSubWorkItem,XmTaskWorkloadRecord,XmMenuEdit,
XmRecord,xmQuestionForTask,XmMyDoFocus,XmTaskExecuserForTask,XmPhaseSelect,ToPay,MdpSelectUserXm,'xm-task-edit':()=>import("./XmTaskDetail"),
XmRecord,xmQuestionMng,XmMyDoFocus,XmTaskExecuserForTask,XmPhaseSelect,ToPay,MdpSelectUserXm,'xm-task-edit':()=>import("./XmTaskDetail"),
// 'xm-task-edit':XmTaskEdit
},
mounted() {

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

@ -114,7 +114,7 @@
</el-dialog>
<el-dialog title="选择测试库" :visible.sync="testCasedbVisible" :with-header="false" width="90%" top="20px" append-to-body :close-on-click-modal="false" >
<xm-test-casedb-mng v-if="testCasedbVisible" :select="true" :xm-product="xmProduct?xmProduct:(xmMenu?{id:xmMenu.productId,productName:xmMenu.productName}:null)" :visible="testCasedbVisible" @cancel="testCasedbVisible=false" @select="onTestCasedbSelect"></xm-test-casedb-mng>
<xm-test-casedb-mng v-if="testCasedbVisible" :select="true" :xm-product="xmProduct&&xmProduct.id?xmProduct:(xmMenu&&xmMenu.menuId?{id:xmMenu.productId,productName:xmMenu.productName}:null)" :visible="testCasedbVisible" @cancel="testCasedbVisible=false" @select="onTestCasedbSelect"></xm-test-casedb-mng>
</el-dialog>
</section>
</template>

6
src/views/xm/core/xmTestCasedb/XmTestCasedbMng.vue

@ -22,8 +22,10 @@
-->
<el-table-column prop="name" label="用例库名称" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
<span><el-link @click="goCasedbInfo(scope.row)">{{scope.row.name}} </el-link> </span>
<span class="tool-bar">
<span v-if="select!==true"><el-link @click="goCasedbInfo(scope.row)">{{scope.row.name}} </el-link> </span>
<span v-else> {{scope.row.name}} </span>
<span class="tool-bar">
<el-button type="warning" @click="goCasedbInfo(scope.row)" icon="el-icon-s-data" plain circle title="视图"></el-button>
<el-button type="primary" @click="showEdit( scope.row,scope.$index)" icon="el-icon-edit" plain circle></el-button>
</span>
</template>

Loading…
Cancel
Save