Browse Source

优化测试用户选择

master
陈裕财 3 years ago
parent
commit
347fdc31df
  1. 10
      src/views/xm/core/components/MdpSelectUserXm/index.vue
  2. 6
      src/views/xm/core/xmGroup/XmGroupSelectForProduct.vue
  3. 9
      src/views/xm/core/xmGroup/XmGroupSelectForProject.vue
  4. 2
      src/views/xm/core/xmTestCase/XmTestCaseEdit.vue
  5. 2
      src/views/xm/core/xmTestCasedb/XmTestCasedbEdit.vue
  6. 2
      src/views/xm/core/xmTestPlan/XmTestPlanEdit.vue
  7. 4
      src/views/xm/core/xmTestPlan/XmTestPlanMng.vue

10
src/views/xm/core/components/MdpSelectUserXm/index.vue

@ -24,8 +24,8 @@
<el-option :value="myVal" disabled v-if="users && users.length>10"> <el-option :value="myVal" disabled v-if="users && users.length>10">
<el-row ><el-button v-if="users && users.length>0" :type="deptUserVisible?'':'primary'" @click.stop="deptUserVisible=false">常用用户</el-button> <el-button :type="deptUserVisible?'primary':''" @click.stop="deptUserVisible=true">部门用户</el-button> <el-row ><el-button v-if="users && users.length>0" :type="deptUserVisible?'':'primary'" @click.stop="deptUserVisible=false">常用用户</el-button> <el-button :type="deptUserVisible?'primary':''" @click.stop="deptUserVisible=true">部门用户</el-button>
<el-button v-if="projectId" :type="projectVisible?'primary':''" @click.stop="projectVisible=true">项目组</el-button>
<el-button v-if="productId" :type="productVisible?'primary':''" @click.stop="productVisible=true">产品组</el-button>
<el-button v-if="projectId||productId" :type="projectVisible?'primary':''" @click.stop="projectVisible=true">项目组</el-button>
<el-button v-if="projectId||productId" :type="productVisible?'primary':''" @click.stop="productVisible=true">产品组</el-button>
</el-row> </el-row>
</el-option> </el-option>
<el-option class="avatar-container" v-for="(item,index) in users" :key="index" :value="item" :label="item.username"> <el-option class="avatar-container" v-for="(item,index) in users" :key="index" :value="item" :label="item.username">
@ -40,7 +40,7 @@
<el-option :value="myVal" disabled> <el-option :value="myVal" disabled>
<el-row><el-button v-if="users && users.length>0" :type="deptUserVisible?'':'primary'" @click.stop="deptUserVisible=false">常用用户</el-button> <el-button :type="deptUserVisible?'primary':''" @click.stop="deptUserVisible=true">部门用户</el-button> <el-row><el-button v-if="users && users.length>0" :type="deptUserVisible?'':'primary'" @click.stop="deptUserVisible=false">常用用户</el-button> <el-button :type="deptUserVisible?'primary':''" @click.stop="deptUserVisible=true">部门用户</el-button>
<el-button v-if="projectId||productId" :type="projectVisible?'primary':''" @click.stop="projectVisible=true">项目组</el-button> <el-button v-if="projectId||productId" :type="projectVisible?'primary':''" @click.stop="projectVisible=true">项目组</el-button>
<el-button v-if="productId" :type="productVisible?'primary':''" @click.stop="productVisible=true">产品组</el-button>
<el-button v-if="projectId||productId" :type="productVisible?'primary':''" @click.stop="productVisible=true">产品组</el-button>
</el-row> </el-row>
</el-option> </el-option>
@ -56,10 +56,10 @@
</el-dialog> </el-dialog>
<el-dialog v-if="disabled!==true" :visible.sync="projectVisible" append-to-body top="20px" width="60%"> <el-dialog v-if="disabled!==true" :visible.sync="projectVisible" append-to-body top="20px" width="60%">
<xm-group-select-for-project :sel-project="projectId?{id:projectId}:null" :xm-product="productId?{id:productId}:null" :isSelectSingleUser="true" @user-confirm="onTeamUsersConfirm"></xm-group-select-for-project>
<xm-group-select-for-project :visible="projectVisible" :sel-project="projectId?{id:projectId}:null" :xm-product="productId?{id:productId}:null" :isSelectSingleUser="true" @user-confirm="onTeamUsersConfirm"></xm-group-select-for-project>
</el-dialog> </el-dialog>
<el-dialog v-if="disabled!==true" :visible.sync="productVisible" append-to-body top="20px" width="60%"> <el-dialog v-if="disabled!==true" :visible.sync="productVisible" append-to-body top="20px" width="60%">
<xm-group-select-for-product :sel-project="projectId?{id:projectId}:null" :xm-product="productId?{id:productId}:null" :isSelectSingleUser="true" @user-confirm="onTeamUsersConfirm"></xm-group-select-for-product>
<xm-group-select-for-product :visible="productVisible" :sel-project="projectId?{id:projectId}:null" :xm-product="productId?{id:productId}:null" :isSelectSingleUser="true" @user-confirm="onTeamUsersConfirm"></xm-group-select-for-product>
</el-dialog> </el-dialog>
</el-row> </el-row>
</template> </template>

6
src/views/xm/core/xmGroup/XmGroupSelectForProduct.vue

@ -66,10 +66,13 @@
}, },
'visible': function(visible) { 'visible': function(visible) {
if (visible == true) { if (visible == true) {
if(this.xmProduct && this.projectOld!=this.xmProduct.id){
this.getGroups();
}
} }
}, },
xmProduct(xmProduct){ xmProduct(xmProduct){
this.oldProductId=xmProduct?xmProduct.id:null
this.filters.xmProduct=xmProduct this.filters.xmProduct=xmProduct
}, },
@ -77,6 +80,7 @@
data() { data() {
return { return {
oldProductId:null,
filters: { filters: {
key: '', key: '',
xmProduct:null, xmProduct:null,

9
src/views/xm/core/xmGroup/XmGroupSelectForProject.vue

@ -66,10 +66,13 @@
}, },
'visible': function(visible) { 'visible': function(visible) {
if (visible == true) { if (visible == true) {
if(this.selProject && this.projectOld!=this.selProject.id){
this.getGroups();
}
} }
}, },
selProject(selProject){
selProject(selProject){
this.projectOld=this.filters.selProject?this.filters.selProject.id:null
this.filters.selProject=selProject this.filters.selProject=selProject
}, },
@ -77,6 +80,8 @@
data() { data() {
return { return {
oldProjectId:null,
filters: { filters: {
key: '', key: '',
selProject:null, selProject:null,

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

@ -39,7 +39,7 @@
<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>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<mdp-select-user-xm label="维护人" userid-key="luserid" username-key="lusername" v-model="editForm" @change="editSomeFields(editForm,'luserid',$event)"></mdp-select-user-xm>
<mdp-select-user-xm label="维护人" userid-key="luserid" username-key="lusername" v-model="editForm" @change="editSomeFields(editForm,'luserid',$event)" :product-id="editForm.productId"></mdp-select-user-xm>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">

2
src/views/xm/core/xmTestCasedb/XmTestCasedbEdit.vue

@ -18,7 +18,7 @@
<el-row class="padding"> <el-row class="padding">
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="cuserid" label-width="0px"> <el-form-item prop="cuserid" label-width="0px">
<mdp-select-user-xm label="负责人" userid-key="cuserid" username-key="cusername" v-model="editForm" @change="editSomeFields(editForm,'cuserid',$event)"></mdp-select-user-xm>
<mdp-select-user-xm label="负责人" userid-key="cuserid" username-key="cusername" v-model="editForm" @change="editSomeFields(editForm,'cuserid',$event)" :product-id="editForm.productId" :project-id="selProject?selProject.id:null"></mdp-select-user-xm>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">

2
src/views/xm/core/xmTestPlan/XmTestPlanEdit.vue

@ -20,7 +20,7 @@
</el-form-item> </el-form-item>
<el-row class="padding"> <el-row class="padding">
<el-col :span="8"> <el-col :span="8">
<mdp-select-user-xm label="负责人" userid-key="cuserid" username-key="cusername" v-model="editForm" @change="editSomeFields(editForm,'cuserid',$event)"></mdp-select-user-xm>
<mdp-select-user-xm label="负责人" userid-key="cuserid" username-key="cusername" v-model="editForm" :project-id="editForm.projectId" :product-id="editForm.productId" @change="editSomeFields(editForm,'cuserid',$event)"></mdp-select-user-xm>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<mdp-select-dict-x label="状态" :dict="dicts['testPlanStatus']" v-model="editForm.status" @change="editSomeFields(editForm,'status',$event)"></mdp-select-dict-x> <mdp-select-dict-x label="状态" :dict="dicts['testPlanStatus']" v-model="editForm.status" @change="editSomeFields(editForm,'status',$event)"></mdp-select-dict-x>

4
src/views/xm/core/xmTestPlan/XmTestPlanMng.vue

@ -69,12 +69,12 @@
<el-row> <el-row>
<!--编辑 XmTestPlan 测试计划界面--> <!--编辑 XmTestPlan 测试计划界面-->
<el-drawer title="编辑测试计划" :visible.sync="editFormVisible" size="60%" append-to-body :close-on-click-modal="false"> <el-drawer title="编辑测试计划" :visible.sync="editFormVisible" size="60%" append-to-body :close-on-click-modal="false">
<xm-test-plan-edit op-type="edit" :xm-test-plan="editForm" :visible="editFormVisible" @cancel="editFormVisible=false" @submit="afterEditSubmit" @edit-fields="onEditFields"></xm-test-plan-edit>
<xm-test-plan-edit op-type="edit" :xm-test-plan="editForm" :xm-test-casedb="xmTestCasedb" :visible="editFormVisible" @cancel="editFormVisible=false" @submit="afterEditSubmit" @edit-fields="onEditFields"></xm-test-plan-edit>
</el-drawer> </el-drawer>
<!--新增 XmTestPlan 测试计划界面--> <!--新增 XmTestPlan 测试计划界面-->
<el-drawer title="新增测试计划" :visible.sync="addFormVisible" size="60%" append-to-body :close-on-click-modal="false"> <el-drawer title="新增测试计划" :visible.sync="addFormVisible" size="60%" append-to-body :close-on-click-modal="false">
<xm-test-plan-edit op-type="add" :xm-test-plan="addForm" :visible="addFormVisible" @cancel="addFormVisible=false" @submit="afterAddSubmit"></xm-test-plan-edit>
<xm-test-plan-edit op-type="add" :xm-test-plan="addForm" :xm-test-casedb="xmTestCasedb" :visible="addFormVisible" @cancel="addFormVisible=false" @submit="afterAddSubmit"></xm-test-plan-edit>
</el-drawer> </el-drawer>
</el-row> </el-row>
</section> </section>

Loading…
Cancel
Save