|
@@ -13,7 +13,7 @@
|
|
}
|
|
}
|
|
.el-textarea,.el-input{
|
|
.el-textarea,.el-input{
|
|
display: inline-block;
|
|
display: inline-block;
|
|
- width: 300px;
|
|
|
|
|
|
+ width: 400px;
|
|
}
|
|
}
|
|
.text-label{
|
|
.text-label{
|
|
vertical-align: top;
|
|
vertical-align: top;
|
|
@@ -36,10 +36,11 @@
|
|
<el-table-column property="name" label="计划"></el-table-column>
|
|
<el-table-column property="name" label="计划"></el-table-column>
|
|
<el-table-column property="content" label="简要说明"></el-table-column>
|
|
<el-table-column property="content" label="简要说明"></el-table-column>
|
|
<el-table-column property="departmentName" label="部门"></el-table-column>
|
|
<el-table-column property="departmentName" label="部门"></el-table-column>
|
|
- <el-table-column fixed="right" label="操作" width="120">
|
|
|
|
|
|
+ <el-table-column fixed="right" label="操作" width="95">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button @click="changeData(scope.row, true)" type="text" size="small">详情</el-button>
|
|
<el-button @click="changeData(scope.row, true)" type="text" size="small">详情</el-button>
|
|
<el-button @click="changeData(scope.row, false)" type="text" size="small">修改</el-button>
|
|
<el-button @click="changeData(scope.row, false)" type="text" size="small">修改</el-button>
|
|
|
|
+ <el-button @click="judgePlan(scope.row)" type="text" size="small" style="margin-left:0">评价</el-button>
|
|
<el-button @click="visibleDelete = true;plan.id = scope.row.id" type="text" size="small">删除</el-button>
|
|
<el-button @click="visibleDelete = true;plan.id = scope.row.id" type="text" size="small">删除</el-button>
|
|
</template></el-table-column>
|
|
</template></el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -51,7 +52,7 @@
|
|
:title="noEdit?'详情':'编辑'"
|
|
:title="noEdit?'详情':'编辑'"
|
|
:visible.sync="visibleChange"
|
|
:visible.sync="visibleChange"
|
|
:modal="false"
|
|
:modal="false"
|
|
- width="500px">
|
|
|
|
|
|
+ width="600px">
|
|
<div>
|
|
<div>
|
|
<label>名称:</label>
|
|
<label>名称:</label>
|
|
<el-input name="name" v-model="plan.name" placeholder="请输入名称" required="required" :disabled="noEdit"></el-input>
|
|
<el-input name="name" v-model="plan.name" placeholder="请输入名称" required="required" :disabled="noEdit"></el-input>
|
|
@@ -62,7 +63,7 @@
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<label>部门:</label>
|
|
<label>部门:</label>
|
|
- <el-input v-model="currentDepart.name" required="required" disabled style="width:280px"></el-input>
|
|
|
|
|
|
+ <el-input v-model="currentDepart.name" required="required" disabled style="width:380px"></el-input>
|
|
<i class="el-icon-edit" @click="departChange = true"></i>
|
|
<i class="el-icon-edit" @click="departChange = true"></i>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
@@ -98,12 +99,26 @@
|
|
<el-button type="primary" @click="changeCheckDepart">确 定</el-button>
|
|
<el-button type="primary" @click="changeCheckDepart">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+ <el-dialog
|
|
|
|
+ :title="plan.name + ' 任务评价'"
|
|
|
|
+ :modal="false"
|
|
|
|
+ :visible.sync="visibleJudge"
|
|
|
|
+ width="800px">
|
|
|
|
+ <div v-html="plan.evaluation" v-show="noEdit"></div>
|
|
|
|
+ <Judge :planJudge="plan.evaluation" :changeSignal="changeSignal" @setEvaluation="setEvaluation" v-show="!noEdit"></Judge>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button type="primary" @click="noEdit = false;" v-if="noEdit">编辑</el-button>
|
|
|
|
+ <el-button type="primary" @click="visibleJudge = false;plan={}" v-if="!noEdit">取消</el-button>
|
|
|
|
+ <el-button type="primary" @click="saveChildPlan" v-if="!noEdit">确 定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { getPlanList,addPlan,updatePlan,deletePlan } from '@/api/childPlan';
|
|
import { getPlanList,addPlan,updatePlan,deletePlan } from '@/api/childPlan';
|
|
import UserTree from "@/components/MainPage/Department/UserTree";
|
|
import UserTree from "@/components/MainPage/Department/UserTree";
|
|
|
|
+import Judge from "@/components/MainPage/Judge/Judge";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'ChildPlan',
|
|
name: 'ChildPlan',
|
|
@@ -127,11 +142,14 @@ export default {
|
|
departChange: false,
|
|
departChange: false,
|
|
currentDepart: {
|
|
currentDepart: {
|
|
name:''
|
|
name:''
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ visibleJudge: false,
|
|
|
|
+ changeSignal: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
components:{
|
|
components:{
|
|
- UserTree
|
|
|
|
|
|
+ UserTree,
|
|
|
|
+ Judge
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getPlanList();
|
|
this.getPlanList();
|
|
@@ -167,7 +185,7 @@ export default {
|
|
},
|
|
},
|
|
deletePlan(){
|
|
deletePlan(){
|
|
deletePlan(this.plan).then((result) => {
|
|
deletePlan(this.plan).then((result) => {
|
|
- alert(result?'删除成功':'删除失败');
|
|
|
|
|
|
+ this.$message(result?'删除成功':'删除失败');
|
|
this.visibleDelete = false;
|
|
this.visibleDelete = false;
|
|
this.plan = {};
|
|
this.plan = {};
|
|
this.getPlanList();
|
|
this.getPlanList();
|
|
@@ -181,15 +199,16 @@ export default {
|
|
saveChildPlan(){
|
|
saveChildPlan(){
|
|
if(this.plan.id){
|
|
if(this.plan.id){
|
|
updatePlan(this.plan).then((result) => {
|
|
updatePlan(this.plan).then((result) => {
|
|
- alert(result.result?'更新成功':'更新失败');
|
|
|
|
|
|
+ this.$message(result.result?'更新成功':'更新失败');
|
|
this.visibleChange = false;
|
|
this.visibleChange = false;
|
|
|
|
+ this.visibleJudge = false;
|
|
this.plan = {};
|
|
this.plan = {};
|
|
this.getPlanList();
|
|
this.getPlanList();
|
|
})
|
|
})
|
|
}
|
|
}
|
|
else{
|
|
else{
|
|
addPlan(this.plan).then((result) => {
|
|
addPlan(this.plan).then((result) => {
|
|
- alert(result.result?'添加成功':'添加失败');
|
|
|
|
|
|
+ this.$message(result.result?'添加成功':'添加失败');
|
|
this.visibleChange = false;
|
|
this.visibleChange = false;
|
|
this.plan = {};
|
|
this.plan = {};
|
|
this.getPlanList();
|
|
this.getPlanList();
|
|
@@ -202,6 +221,15 @@ export default {
|
|
changeCheckDepart(){
|
|
changeCheckDepart(){
|
|
this.plan.departmentId = this.currentDepart.id;
|
|
this.plan.departmentId = this.currentDepart.id;
|
|
this.departChange = false;
|
|
this.departChange = false;
|
|
|
|
+ },
|
|
|
|
+ setEvaluation(val){
|
|
|
|
+ this.plan.evaluation = val;
|
|
|
|
+ },
|
|
|
|
+ judgePlan(item){
|
|
|
|
+ this.visibleJudge = true;
|
|
|
|
+ this.noEdit = true;
|
|
|
|
+ this.plan = JSON.parse(JSON.stringify( item ));
|
|
|
|
+ this.changeSignal = !this.changeSignal;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|