Browse Source

优化

master
陈裕财 3 years ago
parent
commit
9b8a7f3af2
  1. 50
      src/views/xm/core/xmMenuWorkItem/XmSubBugList.vue
  2. 46
      src/views/xm/core/xmMenuWorkItem/XmSubMenuList.vue
  3. 50
      src/views/xm/core/xmMenuWorkItem/XmSubTaskList.vue

50
src/views/xm/core/xmMenuWorkItem/XmSubBugList.vue

@ -21,15 +21,9 @@
</el-table-column>
<el-table-column prop="bugStatus" label="状态" width="100">
<template slot-scope="scope">
<div class="cell-text">
<el-tag v-for="(item,index) in formatDictsWithClass(dicts,'bugStatus',scope.row.bugStatus)" :key="index" :type="item.className">{{item.name}}</el-tag>
</div>
<span class="cell-bar">
<el-select @visible-change="selectVisible(scope.row,$event)" v-model="scope.row.bugStatus" placeholder="类型" style="display:block;" @change="editXmQuestionSomeFields(scope.row,'bugStatus',$event)">
<el-option :value="item.id" :label="item.name" v-for="(item,index) in dicts.bugStatus" :key="index"></el-option>
</el-select>
</span>
<template slot-scope="scope">
<mdp-select-dict-tag :dict="dicts.bugStatus" v-model="scope.row.bugStatus" placeholder="类型" style="display:block;" @change="editXmQuestionSomeFields(scope.row,'bugStatus',$event)">
</mdp-select-dict-tag>
</template>
</el-table-column>
@ -44,38 +38,21 @@
</template>
</el-table-column>
<el-table-column prop="priority" label="优先级" width="100">
<template slot-scope="scope">
<div class="cell-text">
<el-tag v-for="(item,index) in formatDictsWithClass(dicts,'priority',scope.row.priority)" :key="index" :type="item.className">{{item.name}}</el-tag>
</div>
<span class="cell-bar">
<el-select @visible-change="selectVisible(scope.row,$event)" v-model="scope.row.priority" placeholder="优先级" style="display:block;" @change="editXmQuestionSomeFields(scope.row,'priority',$event)">
<el-option :value="item.id" :label="item.name" v-for="(item,index) in dicts.priority" :key="index"></el-option>
</el-select>
</span>
<template slot-scope="scope">
<mdp-select-dict-tag :dict="dicts.priority" v-model="scope.row.priority" placeholder="优先级" style="display:block;" @change="editXmQuestionSomeFields(scope.row,'priority',$event)">
</mdp-select-dict-tag>
</template>
</el-table-column>
<el-table-column prop="solution" label="解决方案" width="100">
<template slot-scope="scope">
<div class="cell-text">
<el-tag v-for="(item,index) in formatDictsWithClass(dicts,'bugSolution',scope.row.solution)" :key="index" :type="item.className">{{item.name}}</el-tag>
</div>
<span class="cell-bar">
<el-select @visible-change="selectVisible(scope.row,$event)" v-model="scope.row.solution" placeholder="类型" style="display:block;" @change="editXmQuestionSomeFields(scope.row,'solution',$event)">
<el-option :value="item.id" :label="item.name" v-for="(item,index) in dicts.bugSolution" :key="index"></el-option>
</el-select>
</span>
<template slot-scope="scope">
<mdp-select-dict-tag :dict="dicts.bugSolution" v-model="scope.row.solution" placeholder="类型" style="display:block;" @change="editXmQuestionSomeFields(scope.row,'solution',$event)">
</mdp-select-dict-tag>
</template>
</el-table-column>
<el-table-column prop="handlerUsername" label="负责人" width="100" show-overflow-tooltip>
<template slot-scope="scope">
<div class="cell-text">
{{ scope.row.handlerUsername}}
</div>
<span class="cell-bar">
<el-button @click="showGroupUsers('editHandlerUserid',scope.row)">负责人</el-button>
</span>
<template slot-scope="scope">
<mdp-select-user-xm userid-key="handlerUserid" username-key="handlerUsername" :project-id="scope.row.projectId" v-model="scope.row" @change="editXmTaskSomeFields(scope.row,'handlerUserid',$event)"></mdp-select-user-xm>
</template>
</el-table-column>
</el-table>
@ -114,6 +91,7 @@ import treeTool from "@/common/js/treeTool"; //全局公共库
import XmGroupDialog from '../xmGroup/XmGroupDialog';
import { mapGetters } from 'vuex'
import MdpSelectUserXm from '@/views/xm/core/components/MdpSelectUserXm/index';//
export default {
computed: {
@ -332,7 +310,7 @@ export default {
},
}, //end methods
components: {
XmGroupDialog,'xm-question-edit':()=>import('../xmQuestion/XmQuestionEdit')
XmGroupDialog,'xm-question-edit':()=>import('../xmQuestion/XmQuestionEdit'),MdpSelectUserXm,
},
mounted() {
this.initData();

46
src/views/xm/core/xmMenuWorkItem/XmSubMenuList.vue

@ -28,27 +28,15 @@
</template>
</el-table-column>
<el-table-column prop="status" label="状态" min-width="80" sortable>
<template slot-scope="scope">
<div class="cell-text">
<el-tag v-for="(item,index) in formatDictsWithClass(dicts,'menuStatus',scope.row.status)" :key="index" :type="item.className">{{item.name}}</el-tag>
</div>
<span class="cell-bar">
<el-select @visible-change="selectVisible(scope.row,$event)" v-model="scope.row.status" placeholder="需求状态" style="display:block;" @change="editXmMenuSomeFields(scope.row,'status',$event)">
<el-option :value="item.id" :label="item.name" v-for="(item,index) in dicts.menuStatus" :key="index"></el-option>
</el-select>
</span>
<template slot-scope="scope">
<mdp-select-dict-tag :dict="dicts.menuStatus" v-model="scope.row.status" placeholder="需求状态" style="display:block;" @change="editXmMenuSomeFields(scope.row,'status',$event)">
</mdp-select-dict-tag>
</template>
</el-table-column>
<el-table-column prop="priority" label="优先级" width="100" sortable>
<template slot-scope="scope">
<div class="cell-text">
<el-tag v-for="(item,index) in formatDictsWithClass(dicts,'priority',scope.row.priority)" :key="index" :type="item.className">{{item.name}}</el-tag>
</div>
<span class="cell-bar">
<el-select @visible-change="selectVisible(scope.row,$event)" v-model="scope.row.priority" placeholder="优先级" style="display:block;" @change="editXmMenuSomeFields(scope.row,'priority',$event)">
<el-option :value="item.id" :label="item.name" v-for="(item,index) in dicts.priority" :key="index"> </el-option>
</el-select>
</span>
<template slot-scope="scope">
<mdp-select-dict-tag :dict="dicts.priority" v-model="scope.row.priority" placeholder="优先级" style="display:block;" @change="editXmMenuSomeFields(scope.row,'priority',$event)">
</mdp-select-dict-tag>
</template>
</el-table-column>
<el-table-column prop="iterationName" label="迭代" width="150" show-overflow-tooltip sortable>
@ -71,21 +59,14 @@
</el-table-column>
<el-table-column prop="mmUsername" label="跟进人" min-width="100" show-overflow-tooltip sortable>
<template slot-scope="scope">
<div class="cell-text">
{{scope.row.mmUsername}}
</div>
<span class="cell-bar">
<el-button @click="$refs.xmGroupDialog.open({data:scope.row,action:'editMmUserid'})">选跟进人</el-button>
</span>
<mdp-select-user-xm userid-key="mmUserid" username-key="mmUsername" :project-id="linkProjectId" v-model="scope.row" @change="editXmMenuSomeFields(scope.row,'mmUserid',$enent)"></mdp-select-user-xm>
</template>
</el-table-column>
</el-table>
</el-row>
</el-row>
<tag-dialog ref="tagDialog" :jump="true" @select-confirm="onTagSelected">
</tag-dialog>
<xm-group-dialog ref="xmGroupDialog" :isSelectSingleUser="true" :sel-project="linkProjectId?{id:linkProjectId}:null" :xm-product="parentXmMenu&&parentXmMenu.productId?{id:parentXmMenu.productId}:null" @user-confirm="onGroupUserSelect">
</xm-group-dialog>
</tag-dialog>
<el-dialog :title="'新增'+calcMenuLabel.label" :visible.sync="addFormVisible" append-to-body modal-append-to-body>
@ -121,6 +102,7 @@ import treeTool from "@/common/js/treeTool"; //全局公共库
import XmMenuWorkload from '@/views/xm/core/components/XmMenuWorkload';//
import XmGroupDialog from '@/views/xm/core/xmGroup/XmGroupDialog';//
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect.vue';//
import MdpSelectUserXm from '@/views/xm/core/components/MdpSelectUserXm/index';//
import TagDialog from "@/views/mdp/arc/tag/TagDialog";
import { mapGetters } from 'vuex'
@ -309,11 +291,7 @@ export default {
this.editXmMenuSomeFields(option.data,"tagIds",tags)
}
},
onGroupUserSelect(users,option){
this.editXmMenuSomeFields(option.data,"mmUserid",users);
},
},
//xmMenu
batchDel: function () {
if(this.sels.length==0){
@ -337,9 +315,9 @@ export default {
}, //end methods
components: {
TagDialog,
XmMenuWorkload,
XmGroupDialog,
XmMenuWorkload,
XmIterationSelect,
MdpSelectUserXm,
'xm-menu-edit':()=>import('../xmMenu/XmMenuEdit')
},
mounted() {

50
src/views/xm/core/xmMenuWorkItem/XmSubTaskList.vue

@ -23,16 +23,10 @@
type="taskState"
width="100"
>
<template slot-scope="scope">
<div class="cell-text">
<el-button style="display:block;" :type="item.className" plain round v-for="(item,index) in formatterTaskStateDicts(scope.row.taskState)" :key="index">{{item.name}}</el-button>
</div>
<span class="cell-bar">
<el-select @visible-change="selectVisible(scope.row,$event)" v-model="scope.row.taskState" placeholder="任务状态" style="display:block;" @change="editXmTaskSomeFields(scope.row,'taskState',$event)">
<el-option :value="item.id" :label="item.name" v-for="(item,index) in dicts.taskState" :key="index"></el-option>
</el-select>
</span>
</template>
<template slot-scope="scope">
<mdp-select-dict-tag :dict="dicts.taskState" v-model="scope.row.taskState" placeholder="任务状态" style="display:block;" @change="editXmTaskSomeFields(scope.row,'taskState',$event)">
</mdp-select-dict-tag>
</template>
</el-table-column>
<el-table-column prop="budgetWorkload" label="工时" width="100">
@ -60,16 +54,10 @@
type="level"
width="100"
>
<template slot-scope="scope">
<div class="cell-text">
<el-button style="display:block;" :type="item.className" plain round v-for="(item,index) in formatterPriorityDicts(scope.row.level)" :key="index">{{item.name}}</el-button>
</div>
<span class="cell-bar">
<el-select @visible-change="selectVisible(scope.row,$event)" v-model="scope.row.level" placeholder="优先级" style="display:block;" @change="editXmTaskSomeFields(scope.row,'level',$event)">
<el-option :value="item.id" :label="item.name" v-for="(item,index) in dicts.priority" :key="index"></el-option>
</el-select>
</span>
</template>
<template slot-scope="scope">
<mdp-select-dict-tag :dict="dicts.priority" v-model="scope.row.level" placeholder="优先级" style="display:block;" @change="editXmTaskSomeFields(scope.row,'level',$event)">
</mdp-select-dict-tag>
</template>
</el-table-column>
<el-table-column
sortable
@ -78,13 +66,9 @@
width="120"
show-overflow-tooltip
>
<template slot-scope="scope">
<div class="cell-text">
{{scope.row.createUsername}}
</div>
<span class="cell-bar">
<el-button @click="$refs.xmGroupDialog.open({data:scope.row,action:'createUserid'})">选负责人</el-button>
</span>
<template slot-scope="scope">
<mdp-select-user-xm userid-key="creatorUserid" username-key="creatorUsername" :project-id="scope.row.projectId" v-model="scope.row" @change="editXmTaskSomeFields(scope.row,'creatorUserid',$event)"></mdp-select-user-xm>
</template>
</el-table-column>
<el-table-column
@ -94,13 +78,8 @@
width="120"
show-overflow-tooltip
>
<template slot-scope="scope">
<div class="cell-text">
{{scope.row.executorUsername}}
</div>
<span class="cell-bar">
<el-button @click="$refs.xmGroupDialog.open({data:scope.row,action:'executorUserid'})">选执行人</el-button>
</span>
<template slot-scope="scope">
<mdp-select-user-xm userid-key="executorUserid" username-key="executorUsername" :project-id="scope.row.projectId" v-model="scope.row" @change="editXmTaskSomeFields(scope.row,'executorUserid',$event)"></mdp-select-user-xm>
</template>
</el-table-column>
</el-table>
@ -177,6 +156,7 @@ import XmTaskWorkloadRecordDialog from '../xmTaskWorkload/XmTaskWorkloadRecordDi
import XmPhaseSelect from "../xmTask/XmPhaseSelect.vue";
import { addXmTaskExecuser } from '@/api/xm/core/xmTaskExecuser';
import MdpSelectUserXm from '@/views/xm/core/components/MdpSelectUserXm/index';//
export default {
computed: {
...mapGetters(["userInfo", "roles"]),
@ -548,7 +528,7 @@ export default {
}
}, //end methods
components: {
XmTaskWorkloadRecordDialog,XmGroupDialog,'xm-task-edit':()=>import('../xmTask/XmTaskEdit'),XmPhaseSelect,
XmTaskWorkloadRecordDialog,XmGroupDialog,'xm-task-edit':()=>import('../xmTask/XmTaskEdit'),XmPhaseSelect,MdpSelectUserXm,
},
mounted() {
this.initData();

Loading…
Cancel
Save