This commit is contained in:
xiongchengqiang 2020-12-07 09:45:55 +08:00
parent da3de51df7
commit 43676551ba

View File

@ -11,48 +11,45 @@
}" />
</div>
<div class="goals-content-tabbar">
<el-tabs
:value="activeId"
>
<el-tab-pane
v-for="(i,index) in obj.recortModelDtos"
<el-tabs :value="activeId">
<el-tab-pane v-for="(i,index) in obj.recortModelDtos"
:key="i.id"
:label="i.name + ' ( '+( i.maxCount===null?(handleNumber(i)):(handleNumber(i)+'/'+i.maxCount))+' ) '"
:name="String(i.id)">
<div class="goals-content-tabbar-table">
<div class="goals-content-tabbar-table-header commonFont">
<span style="width:30%">指标名称</span>
<span class="kaohe" style="width:30%">考核标准</span>
<span class="kaohe"
style="width:30%">考核标准</span>
<span style="width:30%">权重</span>
<span style="width:10%">操作</span>
</div>
<div
style="justify-content:center;"
<div style="justify-content:center;"
v-if="handleFilter(i.detailDtos).length===0"
class="goals-content-tabbar-table-content commonFont items">
暂无指标
</div>
<draggable
v-model="i.tagetLibItems"
:options='options1'
>
<div
class="goals-content-tabbar-table-content commonFont items"
<draggable v-model="i.tagetLibItems"
:options='options1'>
<div class="goals-content-tabbar-table-content commonFont items"
v-for="(j,indexJ) in handleFilter(i.detailDtos)"
:key="indexJ"
>
<div style="width:30%" class="my-handle"><img style="width:20px;height:20px;" src="@/assets/img/yidong.png" alt="">{{j.target}}</div>
<div style="width:30%" class="kaohe" ><pre >{{j.keyResult}}</pre></div>
:key="indexJ">
<div style="width:30%"
class="my-handle"><img style="width:20px;height:20px;"
src="@/assets/img/yidong.png"
alt="">{{j.target}}</div>
<div style="width:30%"
class="kaohe">
<pre>{{j.keyResult}}</pre>
</div>
<div style="width:30%">{{ Math.round((j.checkWeight * 100)*1000)/1000}}%</div>
<div style="width:10%">
<el-button
@click="hanidleEdit(j,indexJ,index)"
<el-button @click="hanidleEdit(j,indexJ,index)"
type="text"
size="small">
编辑
</el-button>
<el-button
@click="handleDelateWeidu(j,indexJ,index)"
<el-button @click="handleDelateWeidu(j,indexJ,index)"
type="text"
size="small">
删除
@ -60,7 +57,8 @@
</div>
</div>
</draggable>
<div style=" padding: 10px;font-size:16px;" class="commonFont">
<div style=" padding: 10px;font-size:16px;"
class="commonFont">
<div>
业务指标权重{{handleGetWeight(i)}}% <span v-if="i.weight !== null">/{{Math.round((i.weight * 100)*1000)/1000}}%</span>
</div>
@ -70,33 +68,58 @@
</div>
<div style=" padding: 10px;">
<!-- <el-button size="mini" plain>选择指标项</el-button> -->
<el-button @click="hanidleEdit(i,-1,index)" type="primary" icon="el-icon-plus" size="small" plain>增加指标项</el-button>
<el-button @click="hanidleEdit(i,-1,index)"
type="primary"
icon="el-icon-plus"
size="small"
plain>增加指标项</el-button>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
<popup-right v-if="showIndicators" @cancel='handleCancelZhibiao' @submit="handleSubmitZhibiao" :title="zhibiaoTitle">
<div slot="content" class="weiduManage">
<el-form label-position="left" ref="formIndicators" :model="formIndicators" :rules="ruleIndicators" label-width="180px">
<popup-right v-if="showIndicators"
@cancel='handleCancelZhibiao'
@submit="handleSubmitZhibiao"
:title="zhibiaoTitle">
<div slot="content"
class="weiduManage">
<el-form label-position="left"
ref="formIndicators"
:model="formIndicators"
:rules="ruleIndicators"
label-width="180px">
<el-form-item label="指标类型">
<el-select v-model="formIndicators.type" disabled placeholder="请选择维度类型">
<el-option
v-for="i in dimensionsList"
<el-select v-model="formIndicators.type"
disabled
placeholder="请选择维度类型">
<el-option v-for="i in dimensionsList"
:key="i.id"
:label="i.name"
:value="i.id"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="target" label='指标名称'>
<el-input clearable size="small" v-model="formIndicators.target"></el-input>
<el-form-item prop="target"
label='指标名称'>
<el-input clearable
size="small"
v-model="formIndicators.target"></el-input>
</el-form-item>
<el-form-item label="考核标准" prop="keyResult">
<el-input size="small" clearable :rows="24" type="textarea" v-model="formIndicators.keyResult"></el-input>
<el-form-item label="考核标准"
prop="keyResult">
<el-input size="small"
clearable
:rows="24"
type="textarea"
v-model="formIndicators.keyResult"></el-input>
</el-form-item>
<el-form-item label="权重" prop="weight">
<el-input size="small" @blur="$handleBlur('formIndicators.checkWeight')" @input.native="$handleInputInt('formIndicators.checkWeight')" v-model="formIndicators.checkWeight">
<el-form-item label="权重"
prop="weight">
<el-input size="small"
@blur="$handleBlur('formIndicators.checkWeight')"
@input.native="$handleInputInt('formIndicators.checkWeight')"
v-model="formIndicators.checkWeight">
<template slot="append">%</template>
</el-input>
</el-form-item>
@ -105,8 +128,12 @@
</popup-right>
<div class="goals-bottom">
<div class="goals-bottom-content">
<el-button size='small' @click="handleSaveDetail()" plain>暂存</el-button>
<el-button size='small' type="primary" @click="handleGetNext" >提交</el-button>
<el-button size='small'
@click="handleSaveDetail()"
plain>暂存</el-button>
<el-button size='small'
type="primary"
@click="handleGetNext">提交</el-button>
</div>
</div>
</div>
@ -127,17 +154,23 @@ export default {
dimensionsList: [],
formIndicators: {},
ruleIndicators: {
target: [{ required: true,
target: [{
required: true,
message: '请输入指标名称',
trigger: 'blur' }
trigger: 'blur'
}
],
keyResult: [{ required: true,
keyResult: [{
required: true,
message: '请输入考核标准',
trigger: 'blur' }
trigger: 'blur'
}
],
checkWeight: [{ required: true,
checkWeight: [{
required: true,
message: '请输入权重大小',
trigger: 'blur' }
trigger: 'blur'
}
]
},
activeId: null,
@ -199,16 +232,16 @@ export default {
}
}
}
let res1 = await apiSaveDetail(this.obj)
if (res1.code !== 200) {
this.$message.error(res1.msg)
}
const obj = { status: 1, menuName: '制定了' }
const params = Object.assign({}, { resultRecordId: this.$route.query.id || '' }, obj)
let res = await apiSaveapproval(params)
if (res.code !== 200) {
this.$message.error(res.msg || '出错了 ')
}
let res1 = await apiSaveDetail(Object.assign({}, { commentId: res.commentId }, this.obj))
if (res1.code !== 200) {
this.$message.error(res1.msg)
}
this.$message({
message: res.msg,
type: 'success'
@ -368,7 +401,7 @@ export default {
justify-content: space-between;
}
&-title {
margin: 0 0 10PX 0;
margin: 0 0 10px 0;
display: flex;
align-items: center;
&-img {