|
|
@@ -5,14 +5,13 @@
|
|
|
:title="`${id ? '编辑' : '新增'}外包履职评价计划`"
|
|
|
:visible.sync="isShow"
|
|
|
width="1500px"
|
|
|
-
|
|
|
>
|
|
|
<div class="page-body">
|
|
|
<el-form
|
|
|
:model="formData"
|
|
|
:rules="formDataRules"
|
|
|
size="small"
|
|
|
- ref="form"
|
|
|
+ ref="formData"
|
|
|
label-position="right"
|
|
|
label-width="130px"
|
|
|
label-prefix=":"
|
|
|
@@ -95,7 +94,12 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
- <el-button @click="openSelect" type="primary" style="margin-bottom: 10px;">新增评价内容</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="openSelect"
|
|
|
+ type="primary"
|
|
|
+ style="margin-bottom: 10px"
|
|
|
+ >新增评价内容</el-button
|
|
|
+ >
|
|
|
|
|
|
<el-table :data="tableData" style="width: 100%" height="400px">
|
|
|
<el-table-column label="序号" type="index" width="100">
|
|
|
@@ -110,7 +114,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作">
|
|
|
<template v-slot="{ row }">
|
|
|
- <el-button type="text" @click="removeRow(row)" v-if="row.code!==0">移除</el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ @click="removeRow(row)"
|
|
|
+ v-if="row.code !== 0"
|
|
|
+ >移除</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -121,12 +130,11 @@
|
|
|
<el-button @click="onHide">取消</el-button>
|
|
|
</div>
|
|
|
<DialogSelect
|
|
|
- ref="dialogEvaluate"
|
|
|
- :orgType="formData.orgType"
|
|
|
- @submitHandler="onSelect"
|
|
|
- ></DialogSelect>
|
|
|
+ ref="dialogEvaluate"
|
|
|
+ :orgType="formData.orgType"
|
|
|
+ @submitHandler="onSelect"
|
|
|
+ ></DialogSelect>
|
|
|
</DialogCom>
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -165,7 +173,14 @@ export default {
|
|
|
],
|
|
|
id: null,
|
|
|
isShow: false,
|
|
|
- formData: {},
|
|
|
+ formData: {
|
|
|
+ evaluateName: "",
|
|
|
+ roleIds: [],
|
|
|
+ orgType: "",
|
|
|
+ evaluateCycle: "",
|
|
|
+ planStatus: "",
|
|
|
+ buildTaskNow:'',
|
|
|
+ },
|
|
|
formDataRules: {
|
|
|
evaluateName: [{ required: true, message: "请输入评价名称" }],
|
|
|
roleIds: [
|
|
|
@@ -286,9 +301,15 @@ export default {
|
|
|
},
|
|
|
// 事件
|
|
|
onHide() {
|
|
|
- this.$refs.form.resetFields();
|
|
|
+ this.$refs.formData.resetFields();
|
|
|
this.isShow = false;
|
|
|
- this.formData = {};
|
|
|
+ this.formData = {
|
|
|
+ evaluateName: "",
|
|
|
+ roleIds: [],
|
|
|
+ orgType: "",
|
|
|
+ evaluateCycle: "",
|
|
|
+ planStatus: "",
|
|
|
+ };
|
|
|
|
|
|
this.tableData = [];
|
|
|
},
|
|
|
@@ -297,28 +318,29 @@ export default {
|
|
|
this.$refs.dialogEvaluate.show();
|
|
|
},
|
|
|
onSubmit() {
|
|
|
- this.$refs.form.validate(async (isValidate) => {
|
|
|
+ this.$refs.formData.validate((isValidate) => {
|
|
|
if (isValidate) {
|
|
|
if (this.tableData.length == 0) {
|
|
|
return this.$message.error("评价内容项,不能为空");
|
|
|
}
|
|
|
- if (falg) {
|
|
|
- return this.$message.error(
|
|
|
- "评价内容所有项,至少有一项评价类型为打分"
|
|
|
- );
|
|
|
- }
|
|
|
|
|
|
let obj = {
|
|
|
...this.formData,
|
|
|
coreEvaluateContentList: this.tableData,
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
let falg = true;
|
|
|
+
|
|
|
this.tableData.forEach((item) => {
|
|
|
if (item.contentType == "2") {
|
|
|
falg = false;
|
|
|
}
|
|
|
});
|
|
|
+ if (falg) {
|
|
|
+ return this.$message.error(
|
|
|
+ "评价内容所有项,至少有一项评价类型为打分"
|
|
|
+ );
|
|
|
+ }
|
|
|
if (this.formData.id) {
|
|
|
//编辑
|
|
|
|