|
@@ -2,7 +2,7 @@
|
|
|
<div class="rule-type">
|
|
<div class="rule-type">
|
|
|
<DialogCom
|
|
<DialogCom
|
|
|
@colse="onHide"
|
|
@colse="onHide"
|
|
|
- :title="`外包评价${isEvaluate ? '查看' : '评价'}`"
|
|
|
|
|
|
|
+ :title="`外包评价${isEvaluate == 1 ? '查看' : ''}`"
|
|
|
:visible.sync="isShow"
|
|
:visible.sync="isShow"
|
|
|
width="1500px"
|
|
width="1500px"
|
|
|
>
|
|
>
|
|
@@ -35,23 +35,11 @@
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="评价人:">
|
|
|
|
|
- {{ formData.evaluateBy }}
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
- <el-form-item label="评价时间:">
|
|
|
|
|
- {{ formData.completeTime }}
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="8">
|
|
|
|
|
<el-form-item label="状态:">
|
|
<el-form-item label="状态:">
|
|
|
{{ formData.status | filterStatus }}
|
|
{{ formData.status | filterStatus }}
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
|
|
- <el-row>
|
|
|
|
|
- <el-col :span="24">
|
|
|
|
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="评价周期:">
|
|
<el-form-item label="评价周期:">
|
|
|
{{ formData.evaluateCycle }}
|
|
{{ formData.evaluateCycle }}
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -62,10 +50,12 @@
|
|
|
<!-- tableData -->
|
|
<!-- tableData -->
|
|
|
<div class="line_box">
|
|
<div class="line_box">
|
|
|
<div class="line"></div>
|
|
<div class="line"></div>
|
|
|
- <div class="titleEvaluate">评价内容</div>
|
|
|
|
|
|
|
+ <div class="titleEvaluate">
|
|
|
|
|
+ {{ isEvaluate == 1 ? "评价记录" : "评价内容" }}
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <el-form >
|
|
|
|
|
|
|
+ <el-form v-if="isEvaluate == 0">
|
|
|
<el-row v-for="(item, index) in tableData" :key="item.id">
|
|
<el-row v-for="(item, index) in tableData" :key="item.id">
|
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
@@ -80,7 +70,7 @@
|
|
|
<el-input
|
|
<el-input
|
|
|
type="textarea"
|
|
type="textarea"
|
|
|
:rows="2"
|
|
:rows="2"
|
|
|
- :disabled="isEvaluate=='1'"
|
|
|
|
|
|
|
+ :disabled="isEvaluate == '1'"
|
|
|
placeholder="请输入内容"
|
|
placeholder="请输入内容"
|
|
|
v-model="item.score"
|
|
v-model="item.score"
|
|
|
>
|
|
>
|
|
@@ -92,7 +82,6 @@
|
|
|
<el-form-item label=" ">
|
|
<el-form-item label=" ">
|
|
|
<el-rate
|
|
<el-rate
|
|
|
:max="10"
|
|
:max="10"
|
|
|
- :disabled="isEvaluate=='1'"
|
|
|
|
|
v-model="item.score"
|
|
v-model="item.score"
|
|
|
text-color="#ff9900"
|
|
text-color="#ff9900"
|
|
|
show-score
|
|
show-score
|
|
@@ -102,11 +91,63 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
+ <div v-else>
|
|
|
|
|
+ <el-form v-for="(item, index) in tableDataContentVOS" :key="item.id">
|
|
|
|
|
+ <el-card class="box-card">
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="评价时间"
|
|
|
|
|
+ >{{ item.completeTime }}
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="评价人"
|
|
|
|
|
+ >{{ item.evaluateBy }}
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row
|
|
|
|
|
+ v-for="sonItem in item.coreEvaluateTaskContentList"
|
|
|
|
|
+ :key="sonItem.code"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ class="formItemTitle"
|
|
|
|
|
+ :label="`${sonItem.code}.${sonItem.content}`"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <!-- 文本 -->
|
|
|
|
|
+ <el-col :span="24" v-if="sonItem.contentType == 1">
|
|
|
|
|
+ <el-form-item label=" ">
|
|
|
|
|
+ <span class="scoreText">
|
|
|
|
|
+ {{ sonItem.score }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <!-- 评分 -->
|
|
|
|
|
+ <el-col :span="24" v-else>
|
|
|
|
|
+ <el-form-item label=" ">
|
|
|
|
|
+ <el-rate
|
|
|
|
|
+ :max="10"
|
|
|
|
|
+ v-model="sonItem.score"
|
|
|
|
|
+ text-color="#ff9900"
|
|
|
|
|
+ show-score
|
|
|
|
|
+ score-template="{value}星"
|
|
|
|
|
+ ></el-rate>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="onHide">取消</el-button>
|
|
|
|
|
- <el-button type="primary" @click="onSubmit" v-if="isEvaluate=='0'">确定</el-button>
|
|
|
|
|
|
|
+ <el-button @click="onHide">关闭</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="onSubmit" v-if="isEvaluate == '0'"
|
|
|
|
|
+ >确定</el-button
|
|
|
|
|
+ >
|
|
|
</div>
|
|
</div>
|
|
|
</DialogCom>
|
|
</DialogCom>
|
|
|
</div>
|
|
</div>
|
|
@@ -114,12 +155,17 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
|
-import { getEvaluateById,editEvaluate } from "@/api/core/evalulateTask.js";
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ getEvaluateById,
|
|
|
|
|
+ editEvaluate,
|
|
|
|
|
+ getevaluateByid,
|
|
|
|
|
+} from "@/api/core/evalulateTask.js";
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
isEvaluate: "",
|
|
isEvaluate: "",
|
|
|
tableData: [],
|
|
tableData: [],
|
|
|
|
|
+ tableDataContentVOS: [],
|
|
|
id: null,
|
|
id: null,
|
|
|
isShow: false,
|
|
isShow: false,
|
|
|
formData: {},
|
|
formData: {},
|
|
@@ -139,7 +185,7 @@ export default {
|
|
|
return "已完成";
|
|
return "已完成";
|
|
|
break;
|
|
break;
|
|
|
case "3":
|
|
case "3":
|
|
|
- return "已超期";
|
|
|
|
|
|
|
+ return "已逾期";
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -153,21 +199,41 @@ export default {
|
|
|
async show(id = "", isEvaluate) {
|
|
async show(id = "", isEvaluate) {
|
|
|
this.id = id;
|
|
this.id = id;
|
|
|
this.tableData = [];
|
|
this.tableData = [];
|
|
|
- this.isEvaluate = isEvaluate+'';
|
|
|
|
|
|
|
+ this.tableDataContentVOS = [];
|
|
|
|
|
+ this.isEvaluate = isEvaluate + "";
|
|
|
|
|
|
|
|
// isEvaluate 1 查看 0 评价
|
|
// isEvaluate 1 查看 0 评价
|
|
|
-
|
|
|
|
|
- await getEvaluateById(id).then((res) => {
|
|
|
|
|
- let { code, msg, data } = res;
|
|
|
|
|
- if (code == 200) {
|
|
|
|
|
- Object.assign(this.formData, data);
|
|
|
|
|
-
|
|
|
|
|
- this.tableData = data.coreEvaluateContentList;
|
|
|
|
|
- delete this.formData.coreEvaluateContentList;
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message.error(msg);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (isEvaluate == 1) {
|
|
|
|
|
+ await getevaluateByid(id).then((res) => {
|
|
|
|
|
+ let { code, msg, data } = res;
|
|
|
|
|
+ if (code == 200) {
|
|
|
|
|
+ Object.assign(this.formData, data);
|
|
|
|
|
+ this.tableDataContentVOS = data.coreEvaluateTaskUserContentVOS;
|
|
|
|
|
+ this.tableDataContentVOS.forEach((item) => {
|
|
|
|
|
+ item.coreEvaluateTaskContentList.forEach((i) => {
|
|
|
|
|
+ if (i.contentType == 2) {
|
|
|
|
|
+ i.score = +i.score;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log(this.tableDataContentVOS);
|
|
|
|
|
+ delete this.formData.coreEvaluateTaskUserContentVOS;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error(msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ await getEvaluateById(id).then((res) => {
|
|
|
|
|
+ let { code, msg, data } = res;
|
|
|
|
|
+ if (code == 200) {
|
|
|
|
|
+ Object.assign(this.formData, data);
|
|
|
|
|
+ this.tableData = data.coreEvaluateContentList;
|
|
|
|
|
+ delete this.formData.coreEvaluateContentList;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error(msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
this.isShow = true;
|
|
this.isShow = true;
|
|
|
},
|
|
},
|
|
@@ -189,21 +255,25 @@ export default {
|
|
|
falg = true;
|
|
falg = true;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- if(falg){
|
|
|
|
|
- return this.$message.error('存在未评价的项,请检查!')
|
|
|
|
|
|
|
+ if (falg) {
|
|
|
|
|
+ return this.$message.error("存在未评价的项,请检查!");
|
|
|
}
|
|
}
|
|
|
let obj = {
|
|
let obj = {
|
|
|
id: this.formData.id,
|
|
id: this.formData.id,
|
|
|
- coreEvaluateTaskContentList: this.tableData,
|
|
|
|
|
|
|
+ coreEvaluateTaskContentList: JSON.parse(JSON.stringify(this.tableData)),
|
|
|
};
|
|
};
|
|
|
- editEvaluate(obj).then(res=>{
|
|
|
|
|
- let {code}=res
|
|
|
|
|
- if(code==200){
|
|
|
|
|
|
|
+ obj.coreEvaluateTaskContentList.forEach((item) => {
|
|
|
|
|
+ item.score = item.score + "";
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
- this.$emit('success')
|
|
|
|
|
- this.onHide()
|
|
|
|
|
|
|
+ editEvaluate(obj).then((res) => {
|
|
|
|
|
+ let { code } = res;
|
|
|
|
|
+ if (code == 200) {
|
|
|
|
|
+ this.$emit("success");
|
|
|
|
|
+ this.$message.success('评价成功')
|
|
|
|
|
+ this.onHide();
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
@@ -219,6 +289,7 @@ export default {
|
|
|
.line_box {
|
|
.line_box {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
height: 20px;
|
|
height: 20px;
|
|
|
|
|
+ margin-bottom: 20px;
|
|
|
.titleEvaluate {
|
|
.titleEvaluate {
|
|
|
color: #008cd6;
|
|
color: #008cd6;
|
|
|
vertical-align: middle;
|
|
vertical-align: middle;
|
|
@@ -236,6 +307,13 @@ export default {
|
|
|
color: black;
|
|
color: black;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+.box-card {
|
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
|
+ .scoreText {
|
|
|
|
|
+ font-size: 20px !important;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.form-item-comment {
|
|
.form-item-comment {
|
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
|
color: #999;
|
|
color: #999;
|