提交修改
This commit is contained in:
parent
49a2e1912d
commit
504306a0cf
@ -47,6 +47,8 @@ export default {
|
|||||||
visible: false,
|
visible: false,
|
||||||
keyResultEditor: null,
|
keyResultEditor: null,
|
||||||
checkResultEditor: null,
|
checkResultEditor: null,
|
||||||
|
recordResultId: null,
|
||||||
|
type: 0,
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: 0,
|
id: 0,
|
||||||
target: '',
|
target: '',
|
||||||
@ -68,26 +70,31 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init (id) {
|
init (id, type, recordResultId) {
|
||||||
|
this.type = type
|
||||||
|
this.recordResultId = recordResultId
|
||||||
this.dataForm.id = id || 0
|
this.dataForm.id = id || 0
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(async () => {
|
this.$nextTick(async () => {
|
||||||
this.$refs['dataForm'].resetFields()
|
this.$refs['dataForm'].resetFields()
|
||||||
|
if (this.keyResultEditor === null) {
|
||||||
this.keyResultEditor = new E('#keyResultEditorElem')
|
this.keyResultEditor = new E('#keyResultEditorElem')
|
||||||
this.keyResultEditor.customConfig.uploadImgServer = '/uploadPicture'
|
this.keyResultEditor.customConfig.uploadImgServer = '/uploadPicture'
|
||||||
this.keyResultEditor.customConfig.uploadFileName = 'file'
|
this.keyResultEditor.customConfig.uploadFileName = 'file'
|
||||||
this.keyResultEditor.customConfig.uploadImgParams = ''
|
this.keyResultEditor.customConfig.uploadImgParams = ''
|
||||||
this.keyResultEditor.customConfig.debug = true
|
this.keyResultEditor.customConfig.debug = true
|
||||||
this.keyResultEditor.create()
|
this.keyResultEditor.create()
|
||||||
|
}
|
||||||
|
if (this.checkResultEditor === null) {
|
||||||
this.checkResultEditor = new E('#checkResultEditorElem')
|
this.checkResultEditor = new E('#checkResultEditorElem')
|
||||||
this.checkResultEditor.customConfig.uploadImgServer = '/uploadPicture'
|
this.checkResultEditor.customConfig.uploadImgServer = '/uploadPicture'
|
||||||
this.checkResultEditor.customConfig.uploadFileName = 'file'
|
this.checkResultEditor.customConfig.uploadFileName = 'file'
|
||||||
this.checkResultEditor.customConfig.uploadImgParams = ''
|
this.checkResultEditor.customConfig.uploadImgParams = ''
|
||||||
this.checkResultEditor.customConfig.debug = true
|
this.checkResultEditor.customConfig.debug = true
|
||||||
this.checkResultEditor.create()
|
this.checkResultEditor.create()
|
||||||
|
}
|
||||||
|
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id && this.dataForm.id > 0) {
|
||||||
const data = await apiDetailInfo(this.dataForm.id)
|
const data = await apiDetailInfo(this.dataForm.id)
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.dataForm.target = data.detailInfo.target
|
this.dataForm.target = data.detailInfo.target
|
||||||
@ -107,13 +114,15 @@ export default {
|
|||||||
dataFormSubmit () {
|
dataFormSubmit () {
|
||||||
recorddetailAddOrUpdate({
|
recorddetailAddOrUpdate({
|
||||||
'id': this.dataForm.id || undefined,
|
'id': this.dataForm.id || undefined,
|
||||||
|
'type': this.type,
|
||||||
'target': this.dataForm.target,
|
'target': this.dataForm.target,
|
||||||
'keyResult': Base64.encode(this.keyResultEditor.txt.html()),
|
'keyResult': Base64.encode(this.keyResultEditor.txt.html()),
|
||||||
'checkWeight': this.dataForm.checkWeight,
|
'checkWeight': this.dataForm.checkWeight,
|
||||||
'checkResult': Base64.encode(this.checkResultEditor.txt.html()),
|
'checkResult': Base64.encode(this.checkResultEditor.txt.html()),
|
||||||
'superScore': this.dataForm.superScore,
|
'superScore': this.dataForm.superScore,
|
||||||
'acquireScore': this.dataForm.acquireScore,
|
'acquireScore': this.dataForm.acquireScore,
|
||||||
'scoreComment': this.dataForm.scoreComment
|
'scoreComment': this.dataForm.scoreComment,
|
||||||
|
'recordId': this.recordResultId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res && res.code === 0) {
|
if (res && res.code === 0) {
|
||||||
this.$message({
|
this.$message({
|
||||||
|
|||||||
@ -33,7 +33,13 @@
|
|||||||
v-loading.body="loading"
|
v-loading.body="loading"
|
||||||
element-loading-text="Loading" border fit highlight-current-row>
|
element-loading-text="Loading" border fit highlight-current-row>
|
||||||
<el-table-column label="考核维度" prop="checkRange" align="center" width="80"></el-table-column>
|
<el-table-column label="考核维度" prop="checkRange" align="center" width="80"></el-table-column>
|
||||||
<el-table-column label="目标/指标" prop="target" align="center" width="200"></el-table-column>
|
<el-table-column label="目标/指标" prop="target" align="center" width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div v-html="scope.row.target" class="rich">
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="关键结果" prop="keyResult" width="800" align="left">
|
<el-table-column label="关键结果" prop="keyResult" width="800" align="left">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-html="scope.row.keyResult" class="rich">
|
<div v-html="scope.row.keyResult" class="rich">
|
||||||
@ -66,8 +72,8 @@
|
|||||||
|
|
||||||
<el-table-column width="80" label="操作" align="center" fixed="right">
|
<el-table-column width="80" label="操作" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="primary" style="margin-left:0px;" @click="handleAddOrUpdate()" v-if="scope.row.isAdd===1">添加</el-button>
|
<el-button size="mini" type="primary" style="margin-left:0px;" @click="handleAddOrUpdate(0,scope.row.type )" v-if="scope.row.isAdd===1">添加</el-button>
|
||||||
<el-button size="mini" style="margin-left:0px;" @click="handleAddOrUpdate(scope.row.id)" v-if="scope.row.isAdd >=0 " >编辑</el-button>
|
<el-button size="mini" style="margin-left:0px;" @click="handleAddOrUpdate(scope.row.id,scope.row.type)" v-if="scope.row.isAdd >=0 " >编辑</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -149,11 +155,11 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 新增 / 编辑
|
// 新增 / 编辑
|
||||||
handleAddOrUpdate (id) {
|
handleAddOrUpdate (id, type) {
|
||||||
this.addOrUpdateVisible = true
|
this.addOrUpdateVisible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$refs.addOrUpdate.init(id)
|
this.$refs.addOrUpdate.init(id, type, this.recordResultId)
|
||||||
}, 500)
|
}, 500)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user