提交修改
This commit is contained in:
parent
3c8c63548b
commit
49a2e1912d
26
package-lock.json
generated
26
package-lock.json
generated
@ -8849,9 +8849,9 @@
|
||||
}
|
||||
},
|
||||
"js-base64": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz",
|
||||
"integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw=="
|
||||
"version": "3.4.5",
|
||||
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.4.5.tgz",
|
||||
"integrity": "sha512-Ub/AANierdcT8nm4ndBn3KzpZQ3MdHX4a+bwoVdjgeHCZ0ZEcP+UB4nmR4Z5lR6SH3Y+qAPmgVR0RxKJNHNHEg=="
|
||||
},
|
||||
"js-beautify": {
|
||||
"version": "1.11.0",
|
||||
@ -8907,6 +8907,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"js-md5": {
|
||||
"version": "0.7.3",
|
||||
"resolved": "https://registry.npmjs.org/js-md5/-/js-md5-0.7.3.tgz",
|
||||
"integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
|
||||
@ -14512,6 +14517,11 @@
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
|
||||
"integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo="
|
||||
},
|
||||
"js-base64": {
|
||||
"version": "2.6.4",
|
||||
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
|
||||
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
|
||||
@ -16436,6 +16446,11 @@
|
||||
"source-map": "^0.4.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"js-base64": {
|
||||
"version": "2.6.4",
|
||||
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
|
||||
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.4.4",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
|
||||
@ -18806,6 +18821,11 @@
|
||||
"makeerror": "1.0.x"
|
||||
}
|
||||
},
|
||||
"wangeditor": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/wangeditor/-/wangeditor-3.1.1.tgz",
|
||||
"integrity": "sha1-+9PB1JdpI8nt67hbKdMLNVEq0Dk="
|
||||
},
|
||||
"watch": {
|
||||
"version": "0.18.0",
|
||||
"resolved": "https://registry.npmjs.org/watch/-/watch-0.18.0.tgz",
|
||||
|
||||
@ -25,6 +25,8 @@
|
||||
"gulp-load-plugins": "1.5.0",
|
||||
"gulp-replace": "0.6.1",
|
||||
"gulp-shell": "0.6.5",
|
||||
"js-base64": "^3.4.5",
|
||||
"js-md5": "^0.7.3",
|
||||
"lodash": "^4.17.15",
|
||||
"moment": "^2.26.0",
|
||||
"node-sass": "^4.14.1",
|
||||
@ -35,7 +37,8 @@
|
||||
"vue": "2.5.16",
|
||||
"vue-cookie": "1.1.4",
|
||||
"vue-router": "3.0.1",
|
||||
"vuex": "3.0.1"
|
||||
"vuex": "3.0.1",
|
||||
"wangeditor": "^3.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "7.1.2",
|
||||
|
||||
@ -9,7 +9,18 @@ export const departmentQuery = params => {
|
||||
return http({url: '/lz_management/user/lzresultrecord/departmentQuery', method: 'get', params})
|
||||
}
|
||||
|
||||
|
||||
export const getStaffResultDetail = params => {
|
||||
return http({url: '/lz_management/user/lzresultrecord/getStaffResultDetail', method: 'get', params})
|
||||
}
|
||||
|
||||
export const apiDetailInfo = params => {
|
||||
return http({url: '/lz_management/user/lzresultrecord/detail/' + params, method: 'post'})
|
||||
}
|
||||
|
||||
export const recorddetailAddOrUpdate = params => {
|
||||
return http({url: '/lz_management/user/lzresultrecord/detailAddOrUpdate', method: 'post', params})
|
||||
}
|
||||
|
||||
export const recorddetailDelete = params => {
|
||||
return http({url: '/lz_management/user/lzresultrecord/recorddetailDelete/' + params, method: 'post'})
|
||||
}
|
||||
|
||||
@ -3,144 +3,156 @@
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="是否删除状态,1:删除,0:有效" prop="isDelete">
|
||||
<el-input v-model="dataForm.isDelete" placeholder="是否删除状态,1:删除,0:有效"></el-input>
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm"
|
||||
label-width="80px">
|
||||
<el-form-item label="目标/指标" prop="target">
|
||||
<el-input v-model="dataForm.target" placeholder="目标/指标"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="gmtCreate">
|
||||
<el-input v-model="dataForm.gmtCreate" placeholder="创建时间"></el-input>
|
||||
<el-form-item label="关键结果" prop="keyResult">
|
||||
<div id="keyResultEditorElem" class="editor"></div>
|
||||
</el-form-item>
|
||||
<el-form-item label="最后修改时间" prop="gmtModified">
|
||||
<el-input v-model="dataForm.gmtModified" placeholder="最后修改时间"></el-input>
|
||||
<el-form-item label="考核权重" prop="checkWeight">
|
||||
<el-input v-model="dataForm.checkWeight" placeholder="考核权重"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="月份" prop="monthTime">
|
||||
<el-input v-model="dataForm.monthTime" placeholder="月份"></el-input>
|
||||
<el-form-item label="考核结果" prop="checkResult">
|
||||
<div id="checkResultEditorElem" class="editor"></div>
|
||||
</el-form-item>
|
||||
<el-form-item label="0.新建,1 提交审批中,2 拒绝" prop="status">
|
||||
<el-input v-model="dataForm.status" placeholder="0.新建,1 提交审批中,2 拒绝"></el-input>
|
||||
<el-form-item label="上级评分" prop="superScore">
|
||||
<el-input v-model="dataForm.superScore" placeholder="直属上级评分(100%)"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="最后得分" prop="lastScore">
|
||||
<el-input v-model="dataForm.lastScore" placeholder="最后得分"></el-input>
|
||||
<el-form-item label="得分" prop="acquireScore">
|
||||
<el-input v-model="dataForm.acquireScore" placeholder="得分"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="总分" prop="allScore">
|
||||
<el-input v-model="dataForm.allScore" placeholder="总分"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
|
||||
<el-form-item label="评分说明" prop="scoreComment">
|
||||
<el-input v-model="dataForm.scoreComment" placeholder="评分说明(直属上级填写)"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
<el-button type="danger" @click="dataFormDelete()" >删除</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import {apiDetailInfo, recorddetailAddOrUpdate, recorddetailDelete} from '@/api/api_result'
|
||||
import E from 'wangeditor'
|
||||
|
||||
var Base64 = require('js-base64').Base64
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
keyResultEditor: null,
|
||||
checkResultEditor: null,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
isDelete: '',
|
||||
gmtCreate: '',
|
||||
gmtModified: '',
|
||||
monthTime: '',
|
||||
status: '',
|
||||
lastScore: '',
|
||||
allScore: '',
|
||||
remark: ''
|
||||
target: '',
|
||||
keyResult: '',
|
||||
checkWeight: '',
|
||||
checkResult: '',
|
||||
superScore: '',
|
||||
acquireScore: '',
|
||||
scoreComment: ''
|
||||
},
|
||||
dataRule: {
|
||||
isDelete: [
|
||||
{ required: true, message: '是否删除状态,1:删除,0:有效不能为空', trigger: 'blur' }
|
||||
],
|
||||
gmtCreate: [
|
||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
gmtModified: [
|
||||
{ required: true, message: '最后修改时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
monthTime: [
|
||||
{ required: true, message: '月份不能为空', trigger: 'blur' }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: '0.新建,1 提交审批中,2 拒绝不能为空', trigger: 'blur' }
|
||||
],
|
||||
lastScore: [
|
||||
{ required: true, message: '最后得分不能为空', trigger: 'blur' }
|
||||
],
|
||||
allScore: [
|
||||
{ required: true, message: '总分不能为空', trigger: 'blur' }
|
||||
],
|
||||
remark: [
|
||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
||||
scoreComment: [
|
||||
{required: true, message: '月份不能为空', trigger: 'blur'}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
this.dataForm.id = 30 || 0
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$nextTick(async () => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
this.keyResultEditor = new E('#keyResultEditorElem')
|
||||
this.keyResultEditor.customConfig.uploadImgServer = '/uploadPicture'
|
||||
this.keyResultEditor.customConfig.uploadFileName = 'file'
|
||||
this.keyResultEditor.customConfig.uploadImgParams = ''
|
||||
this.keyResultEditor.customConfig.debug = true
|
||||
this.keyResultEditor.create()
|
||||
|
||||
this.checkResultEditor = new E('#checkResultEditorElem')
|
||||
this.checkResultEditor.customConfig.uploadImgServer = '/uploadPicture'
|
||||
this.checkResultEditor.customConfig.uploadFileName = 'file'
|
||||
this.checkResultEditor.customConfig.uploadImgParams = ''
|
||||
this.checkResultEditor.customConfig.debug = true
|
||||
this.checkResultEditor.create()
|
||||
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/user/lzresultrecord/info/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.isDelete = data.lzresultrecord.isDelete
|
||||
this.dataForm.gmtCreate = data.lzresultrecord.gmtCreate
|
||||
this.dataForm.gmtModified = data.lzresultrecord.gmtModified
|
||||
this.dataForm.monthTime = data.lzresultrecord.monthTime
|
||||
this.dataForm.status = data.lzresultrecord.status
|
||||
this.dataForm.lastScore = data.lzresultrecord.lastScore
|
||||
this.dataForm.allScore = data.lzresultrecord.allScore
|
||||
this.dataForm.remark = data.lzresultrecord.remark
|
||||
const data = await apiDetailInfo(this.dataForm.id)
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.target = data.detailInfo.target
|
||||
this.dataForm.keyResult = data.detailInfo.keyResult
|
||||
this.dataForm.checkWeight = data.detailInfo.checkWeight
|
||||
this.dataForm.checkResult = data.detailInfo.checkResult
|
||||
this.dataForm.superScore = data.detailInfo.superScore
|
||||
this.dataForm.acquireScore = data.detailInfo.acquireScore
|
||||
this.dataForm.scoreComment = data.detailInfo.scoreComment
|
||||
this.keyResultEditor.txt.html(this.dataForm.keyResult || '')
|
||||
this.checkResultEditor.txt.html(this.dataForm.checkResult || '')
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
dataFormSubmit () {
|
||||
recorddetailAddOrUpdate({
|
||||
'id': this.dataForm.id || undefined,
|
||||
'target': this.dataForm.target,
|
||||
'keyResult': Base64.encode(this.keyResultEditor.txt.html()),
|
||||
'checkWeight': this.dataForm.checkWeight,
|
||||
'checkResult': Base64.encode(this.checkResultEditor.txt.html()),
|
||||
'superScore': this.dataForm.superScore,
|
||||
'acquireScore': this.dataForm.acquireScore,
|
||||
'scoreComment': this.dataForm.scoreComment
|
||||
}).then(res => {
|
||||
if (res && res.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/user/lzresultrecord/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
'id': this.dataForm.id || undefined,
|
||||
'isDelete': this.dataForm.isDelete,
|
||||
'gmtCreate': this.dataForm.gmtCreate,
|
||||
'gmtModified': this.dataForm.gmtModified,
|
||||
'monthTime': this.dataForm.monthTime,
|
||||
'status': this.dataForm.status,
|
||||
'lastScore': this.dataForm.lastScore,
|
||||
'allScore': this.dataForm.allScore,
|
||||
'remark': this.dataForm.remark
|
||||
})
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
async dataFormDelete () {
|
||||
let id = this.dataForm.id
|
||||
if (typeof id === 'undefined' || id === null || id === '') {
|
||||
this.$message({
|
||||
message: '是添加按钮,不能删除',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
const data = await recorddetailDelete(this.dataForm.id)
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
<!--列表表头-->
|
||||
<div class="title">
|
||||
<div class="titleTop">
|
||||
|
||||
<el-steps :active="active" finish-status="success">
|
||||
<el-step title="03-23 11:21"></el-step>
|
||||
<el-step title="03-23 11:21"></el-step>
|
||||
@ -26,8 +25,6 @@
|
||||
|
||||
<div class="titleBottom">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
@ -37,7 +34,13 @@
|
||||
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="target" align="center" width="200"></el-table-column>
|
||||
<el-table-column label="关键结果" prop="keyResult" width="400" align="center"></el-table-column>
|
||||
<el-table-column label="关键结果" prop="keyResult" width="800" align="left">
|
||||
<template slot-scope="scope">
|
||||
<div v-html="scope.row.keyResult" class="rich">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="考核权重" prop="checkWeight" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<div class="conatnt-name">
|
||||
@ -45,8 +48,13 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="考核结果(员工填写)" prop="checkResult" width="400"></el-table-column>
|
||||
<el-table-column label="直属上级评分(100%)" prop="superScore" align="center" width="300"></el-table-column>
|
||||
<el-table-column label="考核结果(员工填写)" prop="checkResult" width="800" align="left">
|
||||
<template slot-scope="scope">
|
||||
<div v-html="scope.row.checkResult" class="rich">
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="直属上级评分(100%)" prop="superScore" align="left" width="300"></el-table-column>
|
||||
<el-table-column label="得分" prop="acquireScore" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div class="conatnt-name">
|
||||
@ -55,23 +63,29 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="评分说明(直属上级填写)" width="300" prop="scoreComment"></el-table-column>
|
||||
|
||||
<el-table-column width="80" label="操作" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" style="margin-left:0px;" v-if="scope.row.isAdd===1">添加</el-button>
|
||||
<el-button size="mini" style="margin-left:0px;" @click="handleAddOrUpdate()" v-if="scope.row.isAdd >=0 " >修改</el-button>
|
||||
<el-button size="mini" style="margin-left:0px;background: mistyrose" v-if="scope.row.isAdd >=0 " >删除</el-button>
|
||||
<el-button size="mini" type="primary" style="margin-left:0px;" @click="handleAddOrUpdate()" 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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import {getStaffResultDetail} from '@/api/api_result'
|
||||
import AddOrUpdate from './recorddetail-add-or-update'
|
||||
|
||||
export default {
|
||||
created () {
|
||||
@ -97,17 +111,22 @@ export default {
|
||||
department1: '业务中台',
|
||||
department2: '金融业务组',
|
||||
department3: '技术部门',
|
||||
superStaff: '吴林'
|
||||
|
||||
superStaff: '吴林',
|
||||
addOrUpdateVisible: false,
|
||||
loading: false,
|
||||
xxxx: '1资产盘点系统<div> 1.2 我们是宁产的</div><div> 1.3 我们要取东西</div><div> 1.4 我觉得这个东西是好的</div><div> 1.5 我们的这这东西是这样的</div><div> 1.632323232233232<p><br></p></div>'
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate
|
||||
},
|
||||
activated () {
|
||||
this.getDataList(this.recordResultId)
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
getDataList (val) {
|
||||
getDataList () {
|
||||
getStaffResultDetail({
|
||||
'recordResultId': val
|
||||
'recordResultId': this.recordResultId
|
||||
}).then(data => {
|
||||
if (data && data.code === 0) {
|
||||
this.tableData = data.list
|
||||
@ -133,7 +152,9 @@ export default {
|
||||
handleAddOrUpdate (id) {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
setTimeout(() => {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
cellStyle ({row, column, rowIndex, columnIndex}) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user