|
@@ -1,32 +1,32 @@
|
|
|
<template>
|
|
|
<el-container class="BackgroundCloth">
|
|
|
- <el-header class="iteration_header">
|
|
|
+ <el-header class="public_header">
|
|
|
<div class="Layout_space_between">
|
|
|
<div class="themeName">迭代</div>
|
|
|
- <el-button size="mini" type="primary" @click="visible = true">新建迭代</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="showIteration = true">新建迭代</el-button>
|
|
|
</div>
|
|
|
<el-divider style="color: #EEF0F5; margin: 10px 0 ;" />
|
|
|
- <div class="Layout_flex_start">
|
|
|
+ <div class="Layout_flex_start" style="margin-left: 15px">
|
|
|
<div class="Layout_space_between">
|
|
|
<div class="searchName">迭代名称</div>
|
|
|
- <el-input v-model="input" size="small" placeholder="请输入迭代名称" />
|
|
|
+ <el-input v-model="filterItems.name" clearable size="small" placeholder="请输入迭代名称" @change="iteratioFilter(1)" />
|
|
|
</div>
|
|
|
<div class="Layout_space_between" style="margin: 0 3%;">
|
|
|
<div class="searchName">状态</div>
|
|
|
- <el-select v-model="input" size="small" clearable filterable placeholder="请选择">
|
|
|
- <el-option v-for="item in arr" :key="item.code" :label="item.name" :value="item.code" />
|
|
|
+ <el-select v-model="filterItems.status" size="small" clearable filterable placeholder="请选择" @change="iteratioFilter(1)">
|
|
|
+ <el-option v-for="item in statusArr" :key="item.value" :label="item.name" :value="item.value" />
|
|
|
</el-select></div>
|
|
|
<div class="Layout_space_between">
|
|
|
<div class="searchName">创建人</div>
|
|
|
- <el-input v-model="input" size="small" placeholder="请输入姓名或邮箱前缀" />
|
|
|
+ <el-input v-model="filterItems.creator" clearable size="small" placeholder="请输入姓名或邮箱前缀" @change="iteratioFilter(1)" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-header>
|
|
|
- <el-main class="iteration_main">
|
|
|
- <el-table :data="tableData" style="width: 100%">
|
|
|
- <el-table-column prop="address" label="迭代名称" align="left" min-width="350">
|
|
|
+ <el-main class="public_main">
|
|
|
+ <el-table :data="iterationTableData" style="width: 100%" show-overflow-tooltip="true">
|
|
|
+ <el-table-column label="迭代名称" align="left" min-width="350" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <span class="iterationName" @click="cilckIterationName(scope.row.id)">{{ scope.row.address }}</span>
|
|
|
+ <span class="iterationName" @click="cilckIterationName(scope.row.id)">{{ scope.row.name }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="status" label="状态" align="center" min-width="150">
|
|
@@ -38,100 +38,85 @@
|
|
|
'status_color1': scope.row.status === 1,
|
|
|
'status_color2': scope.row.status === 2
|
|
|
}"
|
|
|
- class="btns"
|
|
|
+ class="public_botton"
|
|
|
size="mini"
|
|
|
>
|
|
|
<el-option v-for="item in statusArr" :key="item.value" :label="item.name" :value="item.value" />
|
|
|
</el-select>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="date" label="开始日期" align="center" min-width="150" />
|
|
|
- <el-table-column prop="date" label="截止日期" align="center" min-width="150" />
|
|
|
- <el-table-column prop="name" label="创建人" align="center" min-width="150" />
|
|
|
- <el-table-column prop="date" label="创建日期" align="center" min-width="150" />
|
|
|
+ <el-table-column prop="startTime" label="开始日期" align="center" min-width="200" />
|
|
|
+ <el-table-column prop="endTime" label="截止日期" align="center" min-width="200" />
|
|
|
+ <el-table-column prop="creator" label="创建人" align="center" min-width="150" />
|
|
|
+ <el-table-column prop="creatTime" label="创建日期" align="center" min-width="200" />
|
|
|
</el-table>
|
|
|
</el-main>
|
|
|
- <el-footer class="iteration_footer">
|
|
|
+ <el-footer class="public_footer">
|
|
|
<el-pagination
|
|
|
- :current-page="currentPage4"
|
|
|
+ :current-page="currentPage"
|
|
|
:page-sizes="[15, 20, 30]"
|
|
|
background
|
|
|
:page-size="15"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="400"
|
|
|
+ :total="total"
|
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
/>
|
|
|
</el-footer>
|
|
|
- <normal-dialog title="新建迭代" width="60%" :show-dialog="visible" @cancel="visible = false">
|
|
|
- <el-form ref="ruleForm" :model="iteration" :rules="rules" label-width="100px">
|
|
|
- <el-form-item label="迭代名称" prop="name">
|
|
|
- <el-input v-model="iteration.name" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="开始日期" prop="startDate">
|
|
|
- <el-date-picker v-model="iteration.startDate" type="date" placeholder="选择日期" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd" style="width: 100%;" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="截止日期" prop="endDate">
|
|
|
- <el-date-picker v-model="iteration.endDate" type="date" placeholder="选择日期" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd" style="width: 100%;" />
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </normal-dialog>
|
|
|
+ <iteration-create title="新建迭代" width="60%" :show.sync="showIteration" @iteratioFilter="iteratioFilter" />
|
|
|
</el-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import '@/styles/PublicStyle/index.scss'
|
|
|
-import normalDialog from '@/components/dialog/normalDialog'
|
|
|
+import iterationCreate from '@/views/projectManage/iteration/components/create.vue'
|
|
|
+import { iterationList } from '@/api/iteration.js'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
- normalDialog
|
|
|
+ iterationCreate
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
statusArr: [{ value: 0, name: '未开始' }, { value: 1, name: '进行中' }, { value: 2, name: '已完成' }],
|
|
|
- iteration: {},
|
|
|
- input: '',
|
|
|
+ iteration: {}, // 筛选项
|
|
|
+ curIndex: 1, // 分页
|
|
|
+ pageSize: 15, // 分页
|
|
|
+ filterItems: {},
|
|
|
arr: [],
|
|
|
- visible: false,
|
|
|
- currentPage4: 4,
|
|
|
- rules: {
|
|
|
- name: [
|
|
|
- { required: true, message: '请输入迭代名称', trigger: 'blur' },
|
|
|
- { max: 100, message: '名称不能能超过100个字符', trigger: 'change' }
|
|
|
- ]
|
|
|
- },
|
|
|
- tableData: [{
|
|
|
- date: '2016-05-02',
|
|
|
- name: '王小虎',
|
|
|
- status: 0,
|
|
|
- address: '上海市普陀区金沙江路 1518 弄'
|
|
|
- },
|
|
|
- {
|
|
|
- date: '2016-05-02',
|
|
|
- name: '王小虎',
|
|
|
- status: 1,
|
|
|
- address: '上海市普陀区金沙江路 1518 弄'
|
|
|
- }, {
|
|
|
- date: '2016-05-04',
|
|
|
- name: '王小虎',
|
|
|
- status: 2,
|
|
|
- address: '上海市普陀区金沙江路 1517 弄'
|
|
|
- }]
|
|
|
+ total: 0,
|
|
|
+ showIteration: false,
|
|
|
+ currentPage: 1,
|
|
|
+ iterationTableData: []
|
|
|
}
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.iteratioFilter()
|
|
|
+ },
|
|
|
methods: {
|
|
|
- cancel(e) {
|
|
|
- this.visible = e
|
|
|
+ iteratioFilter(e) { // 筛选change
|
|
|
+ let data = {}
|
|
|
+ e === 1 ? data = this.filterItems : this.filterItems = {}
|
|
|
+ data.curIndex = this.curIndex
|
|
|
+ data.pageSize = this.pageSize
|
|
|
+ // 调用查询迭代list
|
|
|
+ iterationList(data).then(res => {
|
|
|
+ this.iterationTableData = res.data.list
|
|
|
+ this.total = res.data.total
|
|
|
+ })
|
|
|
},
|
|
|
- cilckIterationName() {
|
|
|
+
|
|
|
+ cilckIterationName(id) { // 迭代详情页跳转
|
|
|
this.$router.push({ name: '迭代详情', query: { id: '' }})
|
|
|
},
|
|
|
- handleSizeChange(val) {
|
|
|
- console.log(`每页 ${val} 条`)
|
|
|
+
|
|
|
+ handleSizeChange(val) { // 每页 ${val} 条
|
|
|
+ this.pageSize = val
|
|
|
},
|
|
|
- handleCurrentChange(val) {
|
|
|
- console.log(`当前页: ${val}`)
|
|
|
+
|
|
|
+ handleCurrentChange(val) { // 当前页: ${val}
|
|
|
+ this.curIndex = val
|
|
|
+ this.iteratioFilter()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -139,9 +124,6 @@ export default {
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
.BackgroundCloth {
|
|
|
- background: #F2F3F6;
|
|
|
- color: #333B4A;
|
|
|
- min-height: calc(100vh - 55px);
|
|
|
|
|
|
.themeName {
|
|
|
font-size: 22px;
|
|
@@ -167,88 +149,10 @@ export default {
|
|
|
vertical-align: bottom;
|
|
|
}
|
|
|
|
|
|
-.iteration_footer {
|
|
|
- margin: 0 10px 10px;
|
|
|
- background: #FFF;
|
|
|
- text-align: right;
|
|
|
- border-bottom-right-radius:4px;
|
|
|
- border-bottom-left-radius:4px;
|
|
|
-}
|
|
|
-
|
|
|
-.iteration_main {
|
|
|
- margin: 10px 10px 0;
|
|
|
- background: #FFF;
|
|
|
- border-top-left-radius:4px;
|
|
|
- border-top-right-radius:4px;
|
|
|
-}
|
|
|
-
|
|
|
-.iteration_header {
|
|
|
- margin: 10px 10px 0;
|
|
|
- background: #FFF;
|
|
|
- height: auto !important;
|
|
|
- border-radius: 4px;
|
|
|
-}
|
|
|
-
|
|
|
.iterationName:hover {
|
|
|
color:#409EFF;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
-
|
|
|
-.btns {
|
|
|
-/deep/ .el-input--suffix .el-input__inner {
|
|
|
- padding-right: 10px;
|
|
|
- padding-left: 10px;
|
|
|
- width: 73px;
|
|
|
-}
|
|
|
-}
|
|
|
-
|
|
|
-.status_color {
|
|
|
- /deep/ input {
|
|
|
- color: rgb(255, 204, 102);
|
|
|
- border: 1px solid rgb(255, 204, 102);
|
|
|
- border-color: rgb(255, 204, 102) !important;
|
|
|
- font-weight: 900;
|
|
|
- }
|
|
|
- /deep/ .el-input__suffix {
|
|
|
- color: rgb(255, 204, 102) !important;
|
|
|
- right: 1px;
|
|
|
- }
|
|
|
- /deep/ .el-select__caret {
|
|
|
- color: rgb(255, 204, 102) !important;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-.status_color1 {
|
|
|
- /deep/ input {
|
|
|
- color: rgb(102, 255, 122);
|
|
|
- border: 1px solid rgb(102, 255, 122);
|
|
|
- border-color: rgb(102, 255, 122) !important;
|
|
|
- font-weight: 900;
|
|
|
- }
|
|
|
- /deep/ .el-input__suffix {
|
|
|
- color: rgb(102, 255, 122) !important;
|
|
|
- right: 1px;
|
|
|
- }
|
|
|
- /deep/ .el-select__caret {
|
|
|
- color: rgb(102, 255, 122) !important;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-.status_color2 {
|
|
|
- /deep/ input {
|
|
|
- color: rgb(202, 22, 142);
|
|
|
- border: 1px solid rgb(202, 22, 142);
|
|
|
- border-color: rgb(202, 22, 142) !important;
|
|
|
- font-weight: 900;
|
|
|
- }
|
|
|
- /deep/ .el-input__suffix {
|
|
|
- color: rgb(202, 22, 142) !important;
|
|
|
- right: 1px;
|
|
|
- }
|
|
|
- /deep/ .el-select__caret {
|
|
|
- color: rgb(202, 22, 142) !important;
|
|
|
- }
|
|
|
-}
|
|
|
}
|
|
|
|
|
|
</style>
|