Browse Source

优化

master
陈裕财 4 years ago
parent
commit
e3313f1db0
  1. 14
      src/views/xm/core/xmIteration/XmIterationAdd.vue
  2. 93
      src/views/xm/core/xmIteration/XmIterationMng.vue

14
src/views/xm/core/xmIteration/XmIterationAdd.vue

@ -7,17 +7,17 @@
<xm-product-select v-if="!xmProduct||!xmProduct.id" ref="xmProductSelect" :auto-select="true" :link-project-id="selProject?selProject.id:null" @row-click="onProductRowClick" @clear="onProductClearSelect" @close="productSelectVisible=false"></xm-product-select> <xm-product-select v-if="!xmProduct||!xmProduct.id" ref="xmProductSelect" :auto-select="true" :link-project-id="selProject?selProject.id:null" @row-click="onProductRowClick" @clear="onProductClearSelect" @close="productSelectVisible=false"></xm-product-select>
<span v-else>{{addForm.productName}}</span> <span v-else>{{addForm.productName}}</span>
</el-form-item>
</el-form-item>
<el-form-item label="上线时间" prop="onlineTime">
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.onlineTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd" @change="editSomeFields(editForm,'onlineTime',$event)"></el-date-picker>
</el-form-item>
<el-form-item label="起止时间" prop="startTime">
<date-range :auto-default="true" start-key="startTime" end-key="endTime" v-model="addForm" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd" ></date-range>
</el-form-item>
<el-form-item label="迭代名称" prop="iterationName"> <el-form-item label="迭代名称" prop="iterationName">
<el-input v-model="addForm.iterationName" placeholder="迭代名称" minlength="10"></el-input> <el-input v-model="addForm.iterationName" placeholder="迭代名称" minlength="10"></el-input>
<font color="blue">格式如下 上线日期+主题+V版本号 例如 2021.6.15购书商城V1.0.9 &nbsp;&nbsp;留空选日期后自动填写迭代名称</font> <font color="blue">格式如下 上线日期+主题+V版本号 例如 2021.6.15购书商城V1.0.9 &nbsp;&nbsp;留空选日期后自动填写迭代名称</font>
</el-form-item> </el-form-item>
<el-form-item label="起止时间" prop="startTime">
<date-range :auto-default="true" start-key="startTime" end-key="endTime" v-model="addForm" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd" ></date-range>
</el-form-item>
<el-form-item label="上线时间" prop="onlineTime">
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.onlineTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd" @change="editSomeFields(editForm,'onlineTime',$event)"></el-date-picker>
</el-form-item>
<el-form-item label="负责人姓名" prop="adminUsername"> <el-form-item label="负责人姓名" prop="adminUsername">
{{addForm.adminUsername}} <el-button @click="userSelectVisible=true">选择负责人</el-button> {{addForm.adminUsername}} <el-button @click="userSelectVisible=true">选择负责人</el-button>
</el-form-item> </el-form-item>

93
src/views/xm/core/xmIteration/XmIterationMng.vue

@ -5,7 +5,7 @@
v-if="!xmProduct || !xmProduct.id" v-if="!xmProduct || !xmProduct.id"
ref="xmProductSelect1" ref="xmProductSelect1"
style="display: inline" style="display: inline"
:auto-select="true"
:auto-select="false"
:link-project-id="selProject ? selProject.id : null" :link-project-id="selProject ? selProject.id : null"
@row-click="onProductSelected" @row-click="onProductSelected"
@clear="onProductClearSelect" @clear="onProductClearSelect"
@ -124,14 +124,14 @@
aria-disabled aria-disabled
width="55" width="55"
></el-table-column> ></el-table-column>
<el-table-column prop="iterationName" label="迭代名称" min-width="260">
<el-table-column prop="iterationName" label="迭代名称" min-width="260" sortable>
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" @click="intoInfo(scope.row, scope.$index)"> <el-link type="primary" @click="intoInfo(scope.row, scope.$index)">
{{ scope.row.seqNo }} &nbsp;&nbsp;{{ scope.row.iterationName }}
{{ scope.row.iterationName }}
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="finishRate" label="总进度" min-width="80">
<el-table-column prop="finishRate" label="总进度" min-width="80" sortable>
<template slot-scope="scope"> <template slot-scope="scope">
<font <font
><el-tag ><el-tag
@ -149,14 +149,14 @@
</font> </font>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
<el-table-column sortable
prop="startTime" prop="startTime"
label="开始时间" label="开始时间"
min-width="80" min-width="80"
:formatter="formatterDate" :formatter="formatterDate"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column
<el-table-column sortable
prop="endTime" prop="endTime"
label="结束时间" label="结束时间"
min-width="80" min-width="80"
@ -164,26 +164,26 @@
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="onlineTime"
prop="onlineTime" sortable
label="上线时间" label="上线时间"
min-width="80" min-width="80"
:formatter="formatterDate" :formatter="formatterDate"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column
<el-table-column sortable
prop="adminUsername" prop="adminUsername"
label="负责人姓名" label="负责人姓名"
min-width="80" min-width="80"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column
prop="distBudgetWorkload"
<el-table-column sortable
prop="budgetWorkload"
label="已分配工作量" label="已分配工作量"
min-width="80" min-width="80"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="actWorkload"
prop="actWorkload" sortable
label="实际工作量" label="实际工作量"
min-width="80" min-width="80"
show-overflow-tooltip show-overflow-tooltip
@ -302,9 +302,11 @@ import {
listXmIteration, listXmIteration,
listXmIterationWithState, listXmIterationWithState,
delXmIteration, delXmIteration,
batchDelXmIteration,
loadTasksToXmIterationState,
batchDelXmIteration,
} from "@/api/xm/core/xmIteration"; } from "@/api/xm/core/xmIteration";
import {
loadTasksToXmIterationState,
} from "@/api/xm/core/xmIterationState";
import { import {
addXmIterationLink, addXmIterationLink,
delXmIterationLink, delXmIterationLink,
@ -353,6 +355,7 @@ export default {
key: "", key: "",
queryScope: "", // iterationId\branchId\compete\'' queryScope: "", // iterationId\branchId\compete\''
id: "", // id: "", //
xmProduct:null,
}, },
pickerOptions: util.getPickerOptions("datarange"), pickerOptions: util.getPickerOptions("datarange"),
dateRanger: [], // dateRanger: [], //
@ -729,69 +732,7 @@ export default {
} else { } else {
return cellValue; return cellValue;
} }
},
onXmIterationSelect: function (row) {
var xmIteration = row;
var xmProduct = this.xmProduct;
this.$confirm(
"确认将产品【" +
xmProduct.productName +
"】加入迭代计划【" +
xmIteration.iterationName +
"】吗?",
"提示",
{
type: "warning",
}
).then(() => {
addXmIterationLink({
iterationId: xmIteration.id,
productId: xmProduct.id,
}).then((res) => {
var tips = res.data.tips;
if (tips.isOk) {
this.getXmIterations();
}
this.$notify({
position: "bottom-left",
showClose: true,
message: tips.msg,
type: tips.isOk ? "success" : "error",
});
});
});
},
doDelXmIterationLink(row) {
var xmIteration = row;
var xmProduct = this.xmProduct;
this.$confirm(
"确认将产品【" +
xmProduct.productName +
"】与迭代【" +
xmIteration.iterationName +
"】进行脱钩吗?脱钩后,产品与迭代互相查看不到对方信息。",
"提示",
{
type: "warning",
}
).then(() => {
delXmIterationLink({
iterationId: xmIteration.id,
productId: xmProduct.id,
}).then((res) => {
var tips = res.data.tips;
if (tips.isOk) {
this.getXmIterations();
}
this.$notify({
position: "bottom-left",
showClose: true,
message: tips.msg,
type: tips.isOk ? "success" : "error",
});
});
});
},
},
focusOrUnfocus: function (row) { focusOrUnfocus: function (row) {
if (this.menukey == "myFocus") { if (this.menukey == "myFocus") {
delUserFocus({ delUserFocus({

Loading…
Cancel
Save