|
@@ -67,18 +67,18 @@ table{
|
|
|
placeholder="选择年"
|
|
|
@change="getPlanList">
|
|
|
</el-date-picker>
|
|
|
- <el-button type="primary" @click="visibleChange = true;" v-if="ableEdit">新增季度计划</el-button>
|
|
|
+ <el-button type="primary" @click="visibleChange = true;">新增季度计划</el-button>
|
|
|
</div>
|
|
|
<table>
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th>计划名</th>
|
|
|
- <th>部门</th>
|
|
|
+ <th style="min-width:50px">部门</th>
|
|
|
<!-- <th>参与成员</th> -->
|
|
|
<th>年份</th>
|
|
|
- <th>季度</th>
|
|
|
+ <th style="width:50px">季度</th>
|
|
|
<th>简要说明</th>
|
|
|
- <th style="width:150px" v-if="ableEdit">操作</th>
|
|
|
+ <th style="width:150px">操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
@@ -89,9 +89,13 @@ table{
|
|
|
<td>{{item.year}}</td>
|
|
|
<td>{{item.quarter}}</td>
|
|
|
<td>{{item.content}}</td>
|
|
|
- <td v-if="ableEdit">
|
|
|
+ <td>
|
|
|
+ <a @click="changeData(item,true)">详情</a>
|
|
|
+
|
|
|
<a @click="changeData(item)">修改</a>
|
|
|
|
|
|
+ <a @click="changeData(item)">子项</a>
|
|
|
+
|
|
|
<a @click="visibleDelete = true;plan.id = item.id">删除</a>
|
|
|
|
|
|
<a>完成</a>
|
|
@@ -101,7 +105,7 @@ table{
|
|
|
</table>
|
|
|
<el-dialog
|
|
|
class="dialog-style"
|
|
|
- title="编辑"
|
|
|
+ :title="noEdit?'详情':'编辑'"
|
|
|
:visible.sync="visibleChange"
|
|
|
width="500px">
|
|
|
<div>
|
|
@@ -166,24 +170,13 @@ export default {
|
|
|
year: ''
|
|
|
},
|
|
|
visibleChange: false,
|
|
|
- visibleDelete: false
|
|
|
+ visibleDelete: false,
|
|
|
+ noEdit: false
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
this.getPlanList();
|
|
|
},
|
|
|
- computed: {
|
|
|
- ableEdit() {
|
|
|
- // return this.$store.state.loginUser.id == this.$store.state.checkUser.id;
|
|
|
- return true;
|
|
|
- },
|
|
|
- },
|
|
|
- watch: {
|
|
|
- // '$store.state.checkUser.id'(val){
|
|
|
- // this.params.userId = val;
|
|
|
- // this.getPlanList();
|
|
|
- // }
|
|
|
- },
|
|
|
methods: {
|
|
|
getPlanList(){
|
|
|
let params = JSON.parse(JSON.stringify(this.params));
|
|
@@ -200,8 +193,9 @@ export default {
|
|
|
this.getPlanList();
|
|
|
})
|
|
|
},
|
|
|
- changeData(item){
|
|
|
+ changeData(item,flag){
|
|
|
this.visibleChange = true;
|
|
|
+ this.noEdit = flag;
|
|
|
this.plan = JSON.parse(JSON.stringify( item ));
|
|
|
this.yearData = new Date(item.year,1,1);
|
|
|
},
|