|
|
|
|
|
|
|
|
<el-col :span="2" align="center" class="thead td" |
|
|
<el-col :span="2" align="center" class="thead td" |
|
|
><span class="cell">编号</span></el-col |
|
|
><span class="cell">编号</span></el-col |
|
|
> |
|
|
> |
|
|
<el-col :span="8" align="center" class="thead td" |
|
|
|
|
|
|
|
|
<el-col :span="6" align="center" class="thead td" |
|
|
><span class="cell">指标名称与全年目标</span></el-col |
|
|
><span class="cell">指标名称与全年目标</span></el-col |
|
|
> |
|
|
> |
|
|
<el-col :span="2" align="center" class="thead td" |
|
|
<el-col :span="2" align="center" class="thead td" |
|
|
><span class="cell">分值</span></el-col |
|
|
><span class="cell">分值</span></el-col |
|
|
> |
|
|
> |
|
|
<!-- <el-col :span="2" align="center" class="thead td" |
|
|
|
|
|
><span class="cell">得分</span></el-col |
|
|
|
|
|
> --> |
|
|
|
|
|
|
|
|
<el-col :span="2" align="center" class="thead td" |
|
|
|
|
|
><span class="cell">最终得分</span></el-col |
|
|
|
|
|
> |
|
|
<el-col :span="3" align="center" class="thead td" |
|
|
<el-col :span="3" align="center" class="thead td" |
|
|
><span class="cell">第一牵头部门</span></el-col |
|
|
><span class="cell">第一牵头部门</span></el-col |
|
|
> |
|
|
> |
|
|
|
|
|
|
|
|
<el-col :span="3" align="center" class="thead td" |
|
|
<el-col :span="3" align="center" class="thead td" |
|
|
><span class="cell">配合部门</span></el-col |
|
|
><span class="cell">配合部门</span></el-col |
|
|
> |
|
|
> |
|
|
<!-- <el-col :span="3" align="center" class="thead td" |
|
|
|
|
|
><span class="cell">打分操作记录</span></el-col |
|
|
|
|
|
> --> |
|
|
|
|
|
<el-col :span="3" align="center" class="thead td" |
|
|
<el-col :span="3" align="center" class="thead td" |
|
|
><span class="cell">操作</span></el-col |
|
|
><span class="cell">操作</span></el-col |
|
|
> |
|
|
> |
|
|
|
|
|
|
|
|
<el-col :span="2" align="center" class="td" |
|
|
<el-col :span="2" align="center" class="td" |
|
|
><span class="cell">{{ i + 1 }}</span></el-col |
|
|
><span class="cell">{{ i + 1 }}</span></el-col |
|
|
> |
|
|
> |
|
|
<el-col :span="8" align="center" class="td" |
|
|
|
|
|
|
|
|
<el-col :span="6" align="center" class="td" |
|
|
><span class="cell">{{ detail.content }}</span></el-col |
|
|
><span class="cell">{{ detail.content }}</span></el-col |
|
|
> |
|
|
> |
|
|
<el-col :span="2" align="center" class="td" |
|
|
<el-col :span="2" align="center" class="td" |
|
|
><span class="cell">{{ detail.points==0?'':detail.points }}</span></el-col |
|
|
|
|
|
|
|
|
><span class="cell">{{ |
|
|
|
|
|
detail.points == 0 ? "" : detail.points |
|
|
|
|
|
}}</span></el-col |
|
|
> |
|
|
> |
|
|
<!-- <el-col :span="2" align="center" class="td" |
|
|
|
|
|
><span class="cell">{{ detail.score==0?'':detail.score }}</span></el-col |
|
|
|
|
|
> --> |
|
|
|
|
|
|
|
|
<el-col :span="2" align="center" class="td"> |
|
|
|
|
|
<div |
|
|
|
|
|
@dblclick="showText(i, true,detail)" |
|
|
|
|
|
style=" |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
" |
|
|
|
|
|
> |
|
|
|
|
|
<el-input |
|
|
|
|
|
:ref="'input' + index+ind+i" |
|
|
|
|
|
v-model="detail.score" |
|
|
|
|
|
v-if="detail.focus" |
|
|
|
|
|
@hook:mounted="autoFocus(index,ind,i)" |
|
|
|
|
|
@blur=" |
|
|
|
|
|
showText(i, false, detail); |
|
|
|
|
|
updatePoints(detail, i); |
|
|
|
|
|
" |
|
|
|
|
|
></el-input> |
|
|
|
|
|
<span v-else style="flex: 1">{{ |
|
|
|
|
|
detail.score || 0 |
|
|
|
|
|
}}</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-col> |
|
|
<el-col :span="3" align="center" class="td" |
|
|
<el-col :span="3" align="center" class="td" |
|
|
><span class="cell"> |
|
|
><span class="cell"> |
|
|
<pre>{{ detail.leaderDeptList | formatList }}</pre> |
|
|
<pre>{{ detail.leaderDeptList | formatList }}</pre> |
|
|
|
|
|
|
|
|
icon="el-icon-edit" |
|
|
icon="el-icon-edit" |
|
|
type="primary" |
|
|
type="primary" |
|
|
:underline="false" |
|
|
:underline="false" |
|
|
:disabled="user.user.deptId != 1 && user.user.deptId != detail.leaderDept" |
|
|
|
|
|
|
|
|
:disabled=" |
|
|
|
|
|
user.user.deptId != 1 && |
|
|
|
|
|
user.user.deptId != detail.leaderDept |
|
|
|
|
|
" |
|
|
>修改</el-link |
|
|
>修改</el-link |
|
|
> |
|
|
> |
|
|
<el-popconfirm |
|
|
<el-popconfirm |
|
|
|
|
|
|
|
|
@submit.native.prevent |
|
|
@submit.native.prevent |
|
|
:rules="rules" |
|
|
:rules="rules" |
|
|
> |
|
|
> |
|
|
<el-form-item label="产业链名称:" prop="categoryId" v-if="user.user.deptId == 1"> |
|
|
|
|
|
|
|
|
<el-form-item |
|
|
|
|
|
label="产业链名称:" |
|
|
|
|
|
prop="categoryId" |
|
|
|
|
|
v-if="user.user.deptId == 1" |
|
|
|
|
|
> |
|
|
<el-select v-model="form.categoryId" filterable clearable> |
|
|
<el-select v-model="form.categoryId" filterable clearable> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="(item, index) of dataList" |
|
|
v-for="(item, index) of dataList" |
|
|
|
|
|
|
|
|
></el-option> |
|
|
></el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="考核指标:" prop="type" v-if="user.user.deptId == 1"> |
|
|
|
|
|
|
|
|
<el-form-item |
|
|
|
|
|
label="考核指标:" |
|
|
|
|
|
prop="type" |
|
|
|
|
|
v-if="user.user.deptId == 1" |
|
|
|
|
|
> |
|
|
<el-select v-model="form.type" filterable clearable> |
|
|
<el-select v-model="form.type" filterable clearable> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="(item, index) of quotaList" |
|
|
v-for="(item, index) of quotaList" |
|
|
|
|
|
|
|
|
></el-option> |
|
|
></el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="指标内容:" prop="content" v-if="user.user.deptId == 1"> |
|
|
|
|
|
|
|
|
<el-form-item |
|
|
|
|
|
label="指标内容:" |
|
|
|
|
|
prop="content" |
|
|
|
|
|
v-if="user.user.deptId == 1" |
|
|
|
|
|
> |
|
|
<el-input |
|
|
<el-input |
|
|
type="textarea" |
|
|
type="textarea" |
|
|
:rows="5" |
|
|
:rows="5" |
|
|
|
|
|
|
|
|
v-model="form.content" |
|
|
v-model="form.content" |
|
|
></el-input> |
|
|
></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="分值:" prop="points" v-if="user.user.deptId == 1"> |
|
|
|
|
|
<el-input placeholder="请输入分值" type="number" v-model="form.points"></el-input> |
|
|
|
|
|
|
|
|
<el-form-item |
|
|
|
|
|
label="分值:" |
|
|
|
|
|
prop="points" |
|
|
|
|
|
v-if="user.user.deptId == 1" |
|
|
|
|
|
> |
|
|
|
|
|
<el-input |
|
|
|
|
|
placeholder="请输入分值" |
|
|
|
|
|
type="number" |
|
|
|
|
|
v-model="form.points" |
|
|
|
|
|
></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- <el-form-item label="得分:" prop="score"> |
|
|
<!-- <el-form-item label="得分:" prop="score"> |
|
|
<el-input placeholder="请输入得分" type="number" v-model="form.score"></el-input> |
|
|
<el-input placeholder="请输入得分" type="number" v-model="form.score"></el-input> |
|
|
</el-form-item> --> |
|
|
</el-form-item> --> |
|
|
<el-form-item label="第一牵头部门:" prop="leaderDept" v-if="user.user.deptId == 1"> |
|
|
|
|
|
|
|
|
<el-form-item |
|
|
|
|
|
label="第一牵头部门:" |
|
|
|
|
|
prop="leaderDept" |
|
|
|
|
|
v-if="user.user.deptId == 1" |
|
|
|
|
|
> |
|
|
<treeselect |
|
|
<treeselect |
|
|
v-model="form.leaderDept" |
|
|
v-model="form.leaderDept" |
|
|
:disable-branch-nodes="true" |
|
|
:disable-branch-nodes="true" |
|
|
|
|
|
|
|
|
], |
|
|
], |
|
|
rules: { |
|
|
rules: { |
|
|
categoryId: [ |
|
|
categoryId: [ |
|
|
{ required: true, message: '请选择产品链名称', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
type: [ |
|
|
|
|
|
{ required: true, message: '请选择考核指标', trigger: 'blur' } |
|
|
|
|
|
|
|
|
{ required: true, message: "请选择产品链名称", trigger: "blur" }, |
|
|
], |
|
|
], |
|
|
|
|
|
type: [{ required: true, message: "请选择考核指标", trigger: "blur" }], |
|
|
content: [ |
|
|
content: [ |
|
|
{ type: 'string', required: true, message: '请输入考核内容', trigger: 'change' } |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
type: "string", |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: "请输入考核内容", |
|
|
|
|
|
trigger: "change", |
|
|
|
|
|
}, |
|
|
], |
|
|
], |
|
|
// points: [ |
|
|
// points: [ |
|
|
// { required: true, message: '请输入分值', trigger: 'change' } |
|
|
// { required: true, message: '请输入分值', trigger: 'change' } |
|
|
// ], |
|
|
// ], |
|
|
score: [ |
|
|
|
|
|
{ required: true, message: '请输入得分', trigger: 'change' } |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
score: [{ required: true, message: "请输入得分", trigger: "change" }], |
|
|
leaderDept: [ |
|
|
leaderDept: [ |
|
|
{ required: true, message: '请选择第一牵头部门', trigger: 'blur' } |
|
|
|
|
|
|
|
|
{ required: true, message: "请选择第一牵头部门", trigger: "blur" }, |
|
|
], |
|
|
], |
|
|
// cooperateDept: [ |
|
|
// cooperateDept: [ |
|
|
// { required: true, message: '请选择配合部门', trigger: 'blur' } |
|
|
// { required: true, message: '请选择配合部门', trigger: 'blur' } |
|
|
// ] |
|
|
// ] |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
preValue:null |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.getList(); |
|
|
this.getList(); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
showText(index, bool, row) { |
|
|
|
|
|
try { |
|
|
|
|
|
// data[index].focus = bool; |
|
|
|
|
|
// this.dataList = data; |
|
|
|
|
|
this.$set(row, "focus", bool); |
|
|
|
|
|
if (bool) { |
|
|
|
|
|
this.preValue = row.score; |
|
|
|
|
|
} |
|
|
|
|
|
} catch {} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
autoFocus(index,ind,i) { |
|
|
|
|
|
let info="input"+index+ind+i |
|
|
|
|
|
this.$refs[info][0].focus(); |
|
|
|
|
|
}, |
|
|
|
|
|
updatePoints(row, index) { |
|
|
|
|
|
if (row.score == this.preValue) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if (!row.id) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
type: "warning", |
|
|
|
|
|
message: "请先拆分小条", |
|
|
|
|
|
}); |
|
|
|
|
|
this.$set(row, "score", this.preValue); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if ( |
|
|
|
|
|
row.score < 0 || |
|
|
|
|
|
!row.score.trim() || |
|
|
|
|
|
Number(row.score) !== Number(row.score) |
|
|
|
|
|
) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
type: "warning", |
|
|
|
|
|
message: "请输入正数值", |
|
|
|
|
|
}); |
|
|
|
|
|
this.$set(row, "score", this.preValue); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
api |
|
|
|
|
|
.editPoints({ |
|
|
|
|
|
chainIndustryId: row.id, |
|
|
|
|
|
score: row.score, |
|
|
|
|
|
}) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
let data = res.data; |
|
|
|
|
|
if (data.code == 0) { |
|
|
|
|
|
this.$message({ type: "success", message: "修改成功" }); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(data.msg); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
this.$message.error("修改失败"); |
|
|
|
|
|
}) |
|
|
|
|
|
.finally(() => { |
|
|
|
|
|
this.getList(); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
isEmpty(data) { |
|
|
isEmpty(data) { |
|
|
for (let item of data.children) { |
|
|
for (let item of data.children) { |
|
|
if(item.children.length>0){ |
|
|
|
|
|
return true |
|
|
|
|
|
|
|
|
if (item.children.length > 0) { |
|
|
|
|
|
return true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
return false; |
|
|
return false; |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
form.otherDept = form.otherDept.join(","); |
|
|
form.otherDept = form.otherDept.join(","); |
|
|
form.cooperateDept = form.cooperateDept.join(","); |
|
|
form.cooperateDept = form.cooperateDept.join(","); |
|
|
|
|
|
|
|
|
} catch (e) { |
|
|
} catch (e) { |
|
|
// console.log(e); |
|
|
// console.log(e); |
|
|
// this.$message({ type: "warning", message: "请完善信息" }); |
|
|
// this.$message({ type: "warning", message: "请完善信息" }); |
|
|
|
|
|
|
|
|
this.$message({ |
|
|
this.$message({ |
|
|
type: "error", |
|
|
type: "error", |
|
|
message: "请检查表单信息是否符合规则", |
|
|
message: "请检查表单信息是否符合规则", |
|
|
}) |
|
|
|
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
}) |
|
|
|
|
|
|
|
|
}); |
|
|
// let params = [ |
|
|
// let params = [ |
|
|
// "categoryId", |
|
|
// "categoryId", |
|
|
// "type", |
|
|
// "type", |
|
|
|
|
|
|
|
|
// return; |
|
|
// return; |
|
|
// } |
|
|
// } |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |