Browse Source

优化

master
陈裕财 3 years ago
parent
commit
6e00c8bb52
  1. 11
      src/router/routes_xm.js
  2. 2
      src/views/xm/core/xmGroup/XmGroupDialog.vue
  3. 4
      src/views/xm/core/xmGroup/XmGroupSelectForProduct.vue
  4. 4
      src/views/xm/core/xmGroup/XmGroupSelectForProject.vue
  5. 837
      src/views/xm/core/xmIteration/XmIterationInfo.vue
  6. 81
      src/views/xm/core/xmIteration/XmIterationInfoRoute.vue
  7. 27
      src/views/xm/core/xmQuestion/XmQuestionEdit.vue
  8. 5
      src/views/xm/core/xmTask/XmTaskEdit.vue
  9. 2
      src/views/xm/core/xmTask/XmTaskMng.vue

11
src/router/routes_xm.js

@ -627,17 +627,6 @@ export default {
]
},
{
path: '/xm/core/xmIteration/XmIterationInfoRoute',
component: _import('xm/core/xmIteration/XmIterationInfoRoute'),
name: 'XmIterationInfoRoute',
iconCls: 'fa el-icon-menu',
meta: {
title: '迭代管理-路由跳转',
icon: 'flow',roles:["user"]
},
hidden:true
},
{
path: '/xm/core',
component: Layout,

2
src/views/xm/core/xmGroup/XmGroupDialog.vue

@ -11,7 +11,7 @@
import {
mapGetters
} from 'vuex'
import XmGroupSelect from "./XmGroupSelect.vue"
import XmGroupSelect from "./XmGroupSelectForProject.vue"
export default {
name:"tagDialog",
computed: {

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

@ -2,7 +2,7 @@
<section class="border padding-left">
<el-row class="padding-top">
<xm-product-select style="display:inline;" v-if="!xmProduct" :auto-select="false" :xm-product="xmProduct" @row-click="onProductRowClick" @clear="onProductClose"></xm-product-select>
<xm-product-select style="display:inline;" v-if="!xmProduct||!xmProduct.id" :auto-select="false" :link-project-id="selProject?selProject.id:null" @row-click="onProductRowClick" @clear="onProductClose"></xm-product-select>
<el-button type="primary" @click="userConfirm" icon="el-icon-finished">确认选择</el-button>
@ -49,7 +49,7 @@
])
},
//
props: ['visible','isSelectSingleUser','isSelectMultiUser','xmProduct'],
props: ['visible','isSelectSingleUser','isSelectMultiUser','selProject','xmProduct'],
watch: {
"selGroups": function(selGroups) {
if(this.selGroups){

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

@ -2,7 +2,7 @@
<section class="border padding-left">
<el-row class="padding-top">
<xm-project-select style="display:inline;" v-if="!selProject" :auto-select="false" :xm-product="xmProduct" @row-click="onProjectRowClick" @clear="onProjectClose"></xm-project-select>
<xm-project-select style="display:inline;" v-if="!selProject||!selProject.id" :auto-select="false" :link-product-id="xmProduct?xmProduct.id:null" @row-click="onProjectRowClick" @clear="onProjectClose"></xm-project-select>
<el-button type="primary" @click="userConfirm" icon="el-icon-finished">确认选择</el-button>
@ -49,7 +49,7 @@
])
},
//
props: ['visible','selProject','isSelectSingleUser','isSelectMultiUser'],
props: ['visible','selProject','isSelectSingleUser','isSelectMultiUser','xmProduct'],
watch: {
"selGroups": function(selGroups) {
if(this.selGroups){

837
src/views/xm/core/xmIteration/XmIterationInfo.vue

@ -1,837 +0,0 @@
<template>
<section>
<el-row>
<el-menu
:default-active="infotype"
mode="horizontal"
@select="setInfotype"
class="menus"
background-color="rgb(48, 65, 86)"
text-color="rgb(191, 203, 217)"
active-text-color="#409eff"
>
<el-menu-item index="迭代概览">
<span
slot="title"
style="font-size: 18px; color: #ff8c00"
class="hidden-md-and-down"
:title="xmIteration.iterationName"
>
<font v-if="xmIteration.iterationName.length >= 15"
><strong
>&nbsp;<el-avatar class="top-icon" icon="el-icon-connection" style="background-color:#ff8c00"></el-avatar>&nbsp;:&nbsp;&nbsp;{{
xmIteration.iterationName.substring(0, 15)
}}</strong
></font
>
<font type="danger" v-else
><strong
>&nbsp;<el-avatar class="top-icon" icon="el-icon-connection" style="background-color:#ff8c00"></el-avatar>&nbsp;:&nbsp;&nbsp;{{ xmIteration.iterationName }}</strong
></font
>
</span>
<span
slot="title"
style="color: #ff8c00"
class="hidden-lg-and-up"
:title="xmIteration.iterationName"
>
<font v-if="xmIteration.iterationName.length >= 15"
>&nbsp;<el-avatar class="top-icon" icon="el-icon-connection" style="background-color:#ff8c00"></el-avatar>&nbsp;:&nbsp;{{ xmIteration.iterationName.substring(0, 15) }}</font
>
<font type="danger" v-else
>&nbsp;<el-avatar class="top-icon" icon="el-icon-connection" style="background-color:#ff8c00"></el-avatar>&nbsp;:&nbsp;{{ xmIteration.iterationName }}</font
>
</span>
</el-menu-item>
<el-menu-item label="项目" index="项目" class="hidden-sm-and-down">
<span slot="title"><i class="el-icon-document"></i>项目</span>
</el-menu-item>
<el-menu-item label="需求" index="需求">
<span slot="title"><i class="el-icon-document"></i>需求</span>
</el-menu-item>
<el-menu-item index="任务">
<span slot="title"><i class="el-icon-s-operation"></i>任务</span>
</el-menu-item>
<el-menu-item index="缺陷">
<span slot="title"><i class="el-icon-question"></i>缺陷</span>
</el-menu-item>
<el-menu-item index="效能">
<span slot="title"><i class="el-icon-s-data"></i>效能</span>
</el-menu-item>
<el-submenu index="回退">
<template slot="title"><i class="el-icon-back"></i>回退</template>
<el-menu-item index="上一页" @click.native="goBack">
<span slot="title"
><i class="el-icon-back"></i>上一页</span
>
</el-menu-item>
<el-menu-item index="首页" @click.native="goHome">
<span slot="title"
><i class="el-icon-s-home"></i>首页</span
>
</el-menu-item>
</el-submenu>
</el-menu>
</el-row>
<el-row ref="pageMainRef">
<el-col
:span="infotype == '迭代概览' ? 4 : 0"
class="padding border"
:style="{ maxHeight: maxTableHeight + 'px', overflowY: 'auto' }"
>
<h4 class="padding-bottom">常用功能导航</h4>
<el-steps
:active="calcIterationStatusStep"
finish-status="success"
direction="vertical"
>
<el-step
v-for="(i, index) in dicts['iterationStatus']"
:title="i.name"
:key="index"
>
<el-row slot="description">
<el-row v-if="i.id == '0'"
><!--打开-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="infotype = '需求'"
>需求管理</el-button
>
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="showIterationMenu"
>配置需求范围</el-button
>
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '1')"
>开启需求评审</el-button
>
</span>
<span v-if="xmIteration.istatus != i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="infotype = '需求'"
>需求管理</el-button
>
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="showIterationMenu"
>需求范围</el-button
>
</span>
</el-row>
<el-row v-else-if="i.id == '1'"
><!--需求评审-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="showIterationMenu"
>确认需求范围</el-button
>
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="infotype='缺陷'"
>缺陷登记</el-button
>
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '2')"
>进入计划会</el-button
>
</span>
<span v-if="xmIteration.istatus != i.id">
</span>
</el-row>
<el-row v-else-if="i.id == '2'"
><!--计划会-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="showIterationDetail"
>迭代计划</el-button
>
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="infotype = '任务'"
>任务管理</el-button
>
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '3')"
>设为研发中</el-button
>
</span>
<span v-if="xmIteration.istatus != i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="showIterationDetail"
>迭代计划</el-button
>
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="infotype = '任务'"
>任务管理</el-button
>
</span>
</el-row>
<el-row v-else-if="i.id == '3'"
><!--研发中-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="infotype = '任务'"
>任务管理</el-button
>
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="infotype = '效能'"
>效能分析</el-button
>
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '4')"
>设为测试中</el-button
>
</span>
<span v-if="xmIteration.istatus != i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="infotype = '效能'"
>效能分析</el-button
>
</span>
</el-row>
<el-row v-else-if="i.id == '4'"
><!--测试中-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="warning"
size="mini"
plain
@click="infotype = '缺陷'"
>缺陷管理</el-button
>
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '5')"
>设为待上线</el-button
>
</span>
</el-row>
<el-row v-else-if="i.id == '5'"
><!--上线中-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '6')"
>设为已完成</el-button
>
</span>
<span v-if="xmIteration.istatus != i.id">
</span>
</el-row>
<el-row v-else-if="i.id == '6'"
><!--已完成-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '7')"
>设为已关闭</el-button
>
</span>
<span v-if="xmIteration.istatus != i.id">
</span>
</el-row>
<el-row v-else-if="i.id == '7'"
><!--已关闭-->
<span v-if="xmIteration.istatus == i.id">
<el-button
class="step-btn"
type="danger"
size="mini"
plain
icon="el-icon-d-caret"
@click="editSomeFields(xmIteration, 'istatus', '0')"
>重新打开</el-button
>
</span>
</el-row>
</el-row>
</el-step>
</el-steps>
</el-col>
<el-col :span="infotype == '迭代概览' ? 20 : 24">
<xm-iteration-overview-complex
v-if="infotype == '迭代概览'"
ref="迭代概览"
:xm-iteration="xmIteration"
@edit-fields="onEditFields"
></xm-iteration-overview-complex>
<xm-project-complex
v-if="infotype == '项目'"
ref="xmProjectComplex"
:xm-iteration="xmIteration"
></xm-project-complex>
<xm-menu-mng
v-if="infotype == '需求'"
:xm-iteration="xmIteration"
:xm-product="{id:xmIteration.productId,name:xmIteration.productName}"
></xm-menu-mng>
<xm-task-mng
v-if="infotype == '任务'"
ref="xmTaskMng"
ptype=""
queryScope="task"
:xm-iteration="xmIteration"
></xm-task-mng>
<xm-question
v-if="infotype == '缺陷'"
:xm-iteration="xmIteration"
ref="xmQuestion"
></xm-question>
<xm-group-mng
v-if="infotype == '团队'"
:xm-iteration="xmIteration"
></xm-group-mng>
<xm-report
v-if="infotype == '效能'"
:xm-iteration="xmIteration"
></xm-report>
<el-drawer
title="选中团队成员"
:visible.sync="groupUserVisible"
size="50%"
append-to-body
:close-on-click-modal="false"
>
<xm-group-select
:xm-iteration="xmIteration"
:visible="groupUserVisible"
is-select-multi-user="1"
@user-confirm="onUserSelected"
></xm-group-select>
</el-drawer>
</el-col>
</el-row>
</section>
</template>
<script>
import util from "@/common/js/util"; //
//import Sticky from '@/components/Sticky' // header
import { initSimpleDicts } from "@/api/mdp/meta/item"; //
import { mapGetters } from "vuex";
import xmTaskMng from "../xmTask/XmTaskMng";
import xmGroupMng from "../xmGroup/XmGroupMng";
import xmGroupSelect from "../xmGroup/XmGroupSelect";
import xmQuestion from "../xmQuestion/XmQuestionMng";
import xmFileMng from "../xmFile/XmFileMng";
import xmDetail from "../xmProject/XmProjectDetail";
import xmProjectKpi from "../xmProjectKpi/XmProjectKpiMng";
import xmRecord from "../xmRecord/XmRecordMng";
import xmCost from "../xmProject/XmProjectCost";
import xmBudget from "../xmProject/XmProjectBudgetCost";
import xmContract from "../xmContract/XmContractMng";
import xmEnvList from "../xmEnvList/XmEnvListMng";
import xmMenuMng from "../xmMenu/XmMenuBox";
import xmMenuWithPlan from "../xmMenu/XmMenuWithPlan";
import xmProjectStateMng from "../xmProjectState/XmProjectStateMng";
import XmIterationForProjectComplex from "./XmIterationForLinkComplex.vue";
import XmIterationOverviewComplex from "../xmIteration/XmIterationOverviewComplex.vue";
import XmProductForProjectComplex from "../xmProduct/XmProductForLinkComplex.vue";
import XmProjectComplex from "../xmProject/XmProjectForLinkComplex.vue";
import {initDicts, listXmIteration, editSomeFieldsXmIteration } from '@/api/xm/core/xmIteration';
import XmReport from "@/views/xm/rpt/reportIndex";
export default {
props: ["xmIteration", "visible"],
computed: {
...mapGetters(["userInfo", "roles"]),
calcIterationStatusStep() {
if (this.dicts["iterationStatus"] && this.xmIteration) {
var index = this.dicts["iterationStatus"].findIndex((i) => {
if (i.id == this.xmIteration.istatus) {
return true;
} else {
return false;
}
});
return index + 1;
} else {
return 0;
}
},
},
watch: {},
data() {
return {
dicts: { iterationStatus: [] },
platformViewVisible: false,
tabPosition: "left",
infotype: "迭代概览",
load: { list: false, edit: false },
groupUserVisible: false,
exportArr: ["任务", "计划", "需求监控"],
maxTableHeight: 300,
/**end 自定义属性请在上面加 请加备注**/
};
}, //end data
methods: {
...util,
afterEditSubmit: function (project) {
this.$emit("submit", project);
},
toArchive: function () {
this.$router.push({
path: "/mdp/arc/mate/archive/ArchiveMng",
});
},
toIm: function () {
this.groupUserVisible = true;
},
toHelpMe: function () {
this.$router.push({
path: "/mdp/im/messages/crmChat",
query: {
categoryId: "css",
sendContent: "咨询",
},
});
},
handleMenuSelect(menuId) {
this.infotype = menuId;
},
onUserSelected: function (users) {
if (this.groupUserVisible == true) {
var query = {};
if (users) {
if (users.length == 1) {
var user = users[0];
query.toUserid = user.userid;
query.toUsername = user.username;
query.msgType = "prichat";
} else if (users.length >= 2) {
query.users = JSON.stringify(
users.map((i) => {
return { userid: i.userid, username: i.username };
})
);
query.categoryId = "common";
query.msgType = "group";
}
}
this.$router.push({
path: "/mdp/im/messages/messageChat",
query: query,
});
}
},
setInfotype(infotype) {
this.infotype = infotype;
if (infotype == "返回") {
this.goBack();
} else {
localStorage.setItem("iteration-infotype", infotype);
}
},
handleExport() {
this.downloadLoading = true;
let list = [];
let header = [];
let keyList = [];
let pageNum = 1;
let infotypeKey = "";
if (this.infotype === "任务") {
header = [
"序号",
"任务名称",
"需求",
"预算(万)",
"工作量(人时)",
"执行人",
"进度",
"任务开始时间",
"任务结束时间",
"任务技能需求",
];
keyList = [
"sortLevel",
"name",
"menuName",
"budgetCost",
"budgetWorkload",
"exeUsernames",
"rate",
"startTime",
"endTime",
"taskSkillNames",
];
list = this.$refs.xmTaskMng.tasksTreeData;
pageNum = this.$refs.xmTaskMng.pageInfo.pageNum;
} else if (this.infotype === "计划") {
header = [
"序号",
"计划名称",
"开始时间",
"结束时间",
"进度(%)",
"状态",
"计划人数",
"实际人数",
"计划工期",
"实际工期",
"计划工作量(人时)",
"实际工作量(人时)",
"计划非人力成本(元)",
"实际非人力成本(元)",
"计划内购人力成本(元)",
"实际内购人力成本(元)",
"计划外购人力成本(元)",
"实际外购人力成本(元)",
"计划成本合计(元)",
"实际成本合计(元)",
"审批状态",
"备注",
];
keyList = [
"seqNo",
"name",
"beginDate",
"endDate",
"actRate",
"phaseStatus",
"budgetOuserCnt",
"actStaffNu",
"budgetHours",
"actHours",
"budgetWorkload",
"actWorkload",
"budgetNouserAt",
"actNouserAt",
"budgetIuserAt",
"actIuserAt",
"budgetOuserAt",
"actOuserAt",
"budgetCostAt",
"actCostAt",
"bizFlowState",
"remark",
];
list = this.$refs.xmPhaseMng.projectPhaseTreeData;
pageNum = this.$refs.xmPhaseMng.pageInfo.pageNum;
} else if (this.infotype === "需求监控") {
header = [
"序号",
"需求名称",
"计划状态",
"负责人",
"上线时间",
"计划开始时间",
"实际开始时间",
"计划结束时间",
"实际结束时间",
"计划工作量(人时)",
"实际工作量(人时)",
"计划成本(元)",
"实际成本(元)",
"总体完成比例%",
"需求完成比例%",
"设计完成比例%",
"开发完成比例%",
"sit完成比例%",
"uat完成比例%",
"上线状态",
];
keyList = [
"seqNo",
"menuName",
"planStatus",
"chargeUsername",
"onlineTime",
"planStartTime",
"actStartTime",
"planEndTime",
"actEndTime",
"planWorkload",
"actWorkload",
"planCostAmount",
"actCostAmount",
"finishRate",
"demandRate",
"designRate",
"devRate",
"sitRate",
"uatRate",
"onlineStatus",
];
list = this.$refs.xmMenuWithPlan.xmMenusTreeData;
pageNum = this.$refs.xmMenuWithPlan.pageInfo.pageNum;
}
const filename = `${this.xmIteration.iterationName}_${this.infotype}_第${pageNum}`;
const data = this.formatJson(keyList, list);
import("@/vendor/Export2Excel").then((excel) => {
excel.export_json_to_excel({
header,
data,
filename,
// autoWidth: this.autoWidth,
bookType: "xlsx",
});
this.downloadLoading = false;
});
},
formatJson(filterVal, jsonData, dataList = []) {
if (this.infotype == "任务") {
jsonData.forEach((v) => {
const row = filterVal.map((j) => {
let key = "";
return v[j];
});
dataList.push(row);
if (v.children && v.children.length) {
dataList = this.formatJson(filterVal, v.children, dataList);
}
});
return dataList;
} else if (this.infotype == "计划") {
const bizFlowStateDict = {
0: "未发审",
1: "审核中",
2: "已通过",
3: "未通过",
4: "已取消",
};
jsonData.forEach((v) => {
const row = filterVal.map((j) => {
let key = "";
if (j == "phaseStatus") {
return this.$refs.xmPhaseMng.formateOption(
"xmPhaseStatus",
v.phaseStatus
);
} else if (j == "bizFlowState") {
return `${bizFlowStateDict[parseInt(v[j]) || 0]}`;
} else {
return v[j];
}
});
dataList.push(row);
if (v.children && v.children.length) {
dataList = this.formatJson(filterVal, v.children, dataList);
}
});
return dataList;
} else if (this.infotype == "需求监控") {
jsonData.forEach((v) => {
const row = filterVal.map((j) => {
let key = "";
if (j == "planStatus") {
key = "xmMenuPlanStatus";
} else if (j == "onlineStatus") {
return parseInt(v[j]) ? "已上线" : "未上线";
} else {
return v[j];
}
const dicts = this.$refs.xmMenuWithPlan.dicts;
if (
dicts[key] == undefined ||
dicts[key] == null ||
dicts[key].length == 0
) {
return v[j];
}
var rowData = dicts[key].filter((i) => i.id == v[j]);
if (rowData.length > 0) {
return rowData[0].name;
} else {
return v[j];
}
});
dataList.push(row);
if (v.children && v.children.length) {
dataList = this.formatJson(filterVal, v.children, dataList);
}
});
return dataList;
}
},
getDateString(dateStr) {
if (dateStr == null || dateStr == "" || dateStr == undefined) {
return "";
} else {
return dateStr.substr(0, 10);
}
},
goBack() {
localStorage.setItem("iteration-infotype", "迭代概览");
this.$router.back(-1);
},
goHome(){
localStorage.setItem("iteration-infotype", "迭代概览");
this.$router.push({path:'/'})
},
editSomeFields(row,fieldName,$event){
let params={};
params['ids']=[row].map(i=>i.id)
params[fieldName]=$event
var func = editSomeFieldsXmIteration
func(params).then(res=>{
let tips = res.data.tips;
if(tips.isOk){
Object.assign(row,params)
this.$emit('edit-fields',params)
}else{
this.$notify({position:'bottom-left',showClose:true,message:tips.msg,type:tips.isOk?'success':'error'})
}
}).catch((e)=>Object.assign(this.editForm,this.editFormBak))
},
showIterationMenu(){
this.$refs['迭代概览'].showPanelName='iterationMenuMng'
},
showIterationDetail(){
this.$refs['迭代概览'].showPanelName='detail'
},
onEditFields(row){
Object.assign(this.xmIteration,row)
this.$emit('edit-fields',row)
}
}, //end methods
components: {
xmTaskMng,
xmGroupMng,
xmQuestion,
xmFileMng,
xmDetail,
xmProjectKpi,
xmRecord,
xmCost,
xmBudget,
xmContract,
xmEnvList,
xmMenuMng,
xmMenuWithPlan,
xmProjectStateMng,
xmGroupSelect,
XmIterationForProjectComplex,
XmIterationOverviewComplex,
XmProductForProjectComplex,
XmProjectComplex,
XmReport,
//
},
mounted() {
this.$nextTick(() => {
initDicts(this);
var infotype = localStorage.getItem("iteration-infotype");
if (infotype) {
this.infotype = infotype;
}
});
this.$nextTick(() => {
this.maxTableHeight = util.calcTableMaxHeight(this.$refs.pageMainRef.$el);
});
},
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.menus {
.el-menu-item {
padding-left: 0px !important;
}
}
/* 超过宽度则用...代替 */
.truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.step-btn{
margin-left:0px;margin-bottom: 5px;
}
</style>

81
src/views/xm/core/xmIteration/XmIterationInfoRoute.vue

@ -1,81 +0,0 @@
<template>
<section>
<xm-iteration-info v-if="xmIteration" :xm-iteration="xmIteration" :visible="showInfo" @edit-fields="onEditFields"></xm-iteration-info>
</section>
</template>
<script>
import util from '@/common/js/util';//
import { mapGetters } from 'vuex';
import XmIterationInfo from './XmIterationInfo'
import { listXmIterationWithState } from '@/api/xm/core/xmIteration';
export default {
computed: {
...mapGetters([
'userInfo','roles'
]),
},
watch:{
},
data() {
return {
xmIteration:null,
showInfo:false,
}
},//end data
methods: {
initByQueryId(){
if(this.$route.query && this.$route.query.id){
var localStorageIteration=localStorage.getItem("xm-iteration-info-route")
var iteration=null;
if(localStorageIteration && localStorageIteration!='undefined'){
iteration=JSON.parse(localStorageIteration)
if(iteration && iteration.id==this.$route.query.id){
this.xmIteration=iteration
this.showInfo=true;
}else{
this.getIteration(this.$route.query.id);
}
}else{
this.getIteration(this.$route.query.id);
}
}
},
getIteration(id){
listXmIterationWithState({id:id}).then(res=>{
var tips = res.data.tips;
if(tips.isOk){
this.xmIteration=res.data.data[0]
localStorage.setItem("xm-iteration-info-route",JSON.stringify(this.xmIteration))
this.showInfo=true;
}else{
}
})
},
onEditFields(row){
Object.assign(this.xmIteration,row)
localStorage.setItem("xm-iteration-info-route",JSON.stringify(this.xmIteration));
}
},//end methods
components: {
XmIterationInfo,
//
},
activated(){
this.initByQueryId();
},
mounted() {
this.initByQueryId();
}
}
</script>
<style scoped>
</style>

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

@ -179,9 +179,6 @@
<el-button type="primary" @click="saveSubmit">保存</el-button>
</el-row>
</el-form>
<el-drawer title="选中用户" :visible.sync="selectUserVisible" size="70%" append-to-body :close-on-click-modal="false">
<xm-group-mng v-if="selectUserVisible" :sel-project="selProject" :is-select-single-user="1" @user-confirm="onUserConfirm"></xm-group-mng>
</el-drawer>
<el-drawer title="选中任务" :visible.sync="selectTaskVisible" size="70%" append-to-body :close-on-click-modal="false">
<xm-task-list v-if="selectTaskVisible" :sel-project="selProject" @task-selected="onSelectedTask"></xm-task-list>
</el-drawer>
@ -212,8 +209,6 @@
import { mapGetters } from 'vuex';
import AttachmentUpload from "@/views/mdp/arc/archiveAttachment/AttachmentUpload"; //
import {sn} from '@/common/js/sequence';
import XmGroupMng from '../xmGroup/XmGroupSelect';
import VueEditor from '@/components/Tinymce/index';
import XmTaskList from '../xmTask/XmTaskList';
import xmMenuSelect from '../xmMenu/XmMenuSelect';
@ -343,7 +338,6 @@
},
/**begin 在下面加自定义属性,记得补上面的一个逗号**/
fileVisible: true,
selectUserVisible: false,
userFieldName:'',
xmQuestionHandles:[],
selectTaskVisible:false,
@ -426,25 +420,6 @@
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){
}else{
if(this.userFieldName==='handlerUserid'){
this.editForm.handlerUserid=groupUsers[0].userid
this.editForm.handlerUsername=groupUsers[0].username
}else if(this.userFieldName==='askUserid'){
this.editForm.askUserid=groupUsers[0].userid
this.editForm.askUsername=groupUsers[0].username
}
this.editXmQuestionSomeFields(this.editForm,this.userFieldName,groupUsers)
}
this.selectUserVisible=false
},
handleQuestion:function(tardgetBugStatus){
this.editSubmit(tardgetBugStatus);
},
@ -700,7 +675,7 @@
},//end method
components: {
// 'xm-question-edit':XmQuestionEdit
'upload': AttachmentUpload,XmGroupMng,VueEditor,XmTaskList,xmMenuSelect,XmQuestionHandleMng,TagMng,XmProjectSelect,XmProductSelect,
'upload': AttachmentUpload,VueEditor,XmTaskList,xmMenuSelect,XmQuestionHandleMng,TagMng,XmProjectSelect,XmProductSelect,
XmMyDoFocus,XmFuncSelect,MdpSelectUserXm,TestStepConfig,TestStepResult,
xmTestPlanCaseMng:()=>import('../xmTestPlanCase/XmTestPlanCaseSelect'),
'xm-workload-record':()=>import("../xmWorkload/XmWorkloadRecord"),

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

@ -561,7 +561,6 @@
import xmMenuSelect from '../xmMenu/XmMenuSelect';
import XmTaskList from '../xmTask/XmTaskList';
import XmExecuserMng from '../xmTaskExecuser/XmTaskExecuserForTask';
import XmGroupSelect from '../xmGroup/XmGroupSelect.vue';
import XmMenuRichDetail from '../xmMenu/XmMenuRichDetail';
import TagMng from "@/views/mdp/arc/tag/TagMng";
import XmRecord from '../xmRecord/XmRecord'
@ -720,8 +719,6 @@
skillVisible: false,
taskSkills: [],
selectTaskVisible:false,
groupUserSelectVisible:false,
execGroupUserSelectVisible:false,
pickerOptions: util.getPickerOptions('datarange'),
tagSelectVisible:false,
subWorkItemNum:0,
@ -1060,7 +1057,7 @@
},//end method
components: {
xmSkillMng,
skillMng,xmMenuSelect,XmTaskList,XmExecuserMng,XmGroupSelect,XmMenuRichDetail,TagMng,XmSubWorkItem,XmWorkloadRecord,XmMenuEdit,
skillMng,xmMenuSelect,XmTaskList,XmExecuserMng,XmMenuRichDetail,TagMng,XmSubWorkItem,XmWorkloadRecord,XmMenuEdit,
XmRecord,xmQuestionMng,XmMyDoFocus,XmTaskExecuserForTask,XmPhaseSelect,ToPay,MdpSelectUserXm,'xm-task-edit':()=>import("./XmTaskDetail"),
'xm-workload-record':()=>import("../xmWorkload/XmWorkloadRecord"),
"v-region":RegionGroup ,

2
src/views/xm/core/xmTask/XmTaskMng.vue

@ -887,7 +887,6 @@ import XmMenuRichDetail from "../xmMenu/XmMenuRichDetail";
import TagMng from "@/views/mdp/arc/tag/TagMng";
import XmGantt from "../components/xm-gantt";
import XmGroupSelect from "../xmGroup/XmGroupSelect.vue";
import XmTaskList from '../xmTask/XmTaskList';
import XmTableConfig from '@/views/xm/core/components/XmTableConfig';//
@ -2189,7 +2188,6 @@ export default {
xmMenuSelect,
XmMenuRichDetail,
XmGantt,
XmGroupSelect,
XmProductSelect,
XmTaskAgileKanban,
TagMng,

Loading…
Cancel
Save