优化
This commit is contained in:
parent
9d148ba4e7
commit
ad893c38c1
@ -15,7 +15,10 @@ import { format } from '@/utils/dateFormat'
|
||||
|
||||
let hostList = ['lzmanagement.ldxinyong.com']
|
||||
if (!hostList.includes(window.location.host)) {
|
||||
var vConsole = new VConsole()
|
||||
var vConsole = new VConsole({
|
||||
vConsole_switch_x: 0,
|
||||
vConsole_switch_y: 0
|
||||
})
|
||||
}
|
||||
|
||||
Vue.use(VueCookie)
|
||||
|
||||
@ -108,7 +108,7 @@
|
||||
<div class="goals-bottom">
|
||||
<div class="goals-bottom-content">
|
||||
<el-button size='small' @click="handleSaveDetail()" plain>暂存</el-button>
|
||||
<el-button size='small' type="primary" >提交</el-button>
|
||||
<el-button size='small' type="primary" @click="handleGetNext" >提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -120,7 +120,7 @@ import InfoHeader from '@/components/InfoHeader'
|
||||
import PopupRight from '@/components/PopupRight'
|
||||
import draggable from 'vuedraggable'
|
||||
import {getDimensions} from '@/api/data'
|
||||
import { apiResultGetDetail, apiSaveDetail } from '@/api/assessment'
|
||||
import { apiResultGetDetail, apiSaveDetail, apiSaveapproval } from '@/api/assessment'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
@ -173,6 +173,31 @@ export default {
|
||||
this.handleGetTbale()
|
||||
},
|
||||
methods: {
|
||||
async handleGetNext () {
|
||||
for (let i in this.obj.recortModelDtos) {
|
||||
if (!this.obj.recortModelDtos[i].isTrue) {
|
||||
this.$message.error(this.obj.recortModelDtos[i].name + '维度内的权重和必须为' + Math.round((this.obj.recortModelDtos[i].weight * 100) * 1000) / 1000)
|
||||
return
|
||||
}
|
||||
}
|
||||
let res1 = await apiSaveDetail(this.obj)
|
||||
if (res1.code !== 200) {
|
||||
this.$message.error(res1.msg)
|
||||
return
|
||||
}
|
||||
const obj = {status: 1, menuName: this.tableInfo.result ? '提交了结果值' : '提交了评分'}
|
||||
const params = Object.assign({}, {resultRecordId: this.$route.query.id || ''}, obj)
|
||||
let res = await apiSaveapproval(params)
|
||||
if (res.code !== 200) {
|
||||
this.$message.error(res.msg)
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
history.go(0)
|
||||
},
|
||||
handleGetWeight (arr) {
|
||||
const weight = arr.detailDtos.reduce((num, i) => {
|
||||
num += i.isDelete !== 1 ? i.checkWeight : 0
|
||||
@ -192,6 +217,7 @@ export default {
|
||||
let res = await apiSaveDetail(params)
|
||||
if (res.code !== 200) {
|
||||
this.$message.error(res.msg)
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
|
||||
@ -243,7 +243,7 @@ export default {
|
||||
this.$router.push({
|
||||
name: 'assessment-goals',
|
||||
query: {
|
||||
id: 267 || this.$route.query.id
|
||||
id: this.$route.query.id || ''
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@ -30,16 +30,16 @@
|
||||
<div>
|
||||
{{child.keyResult || ''}}
|
||||
</div>
|
||||
<div v-if="tableInfo.result">
|
||||
<!-- <span>{{child.checkResult || '--'}}</span> -->
|
||||
<el-input style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.checkResult" clearable></el-input>
|
||||
<div v-if="tableInfo.result || auth.showResult">
|
||||
<el-input v-if="tableInfo.result" style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.checkResult" clearable></el-input>
|
||||
<span v-else>{{child.checkResult || '--'}}</span>
|
||||
</div>
|
||||
<div class="quanzhomng">
|
||||
{{(child.checkWeight)*100}}%
|
||||
</div>
|
||||
<div v-if="tableInfo.score">
|
||||
<div v-if="tableInfo.score || auth.showScore">
|
||||
<!-- gradeGroupId=== 1 下拉 -->
|
||||
<el-select style="width:140px;" size="mini" v-model="child.scoreDtos[child.scoreDtos.length-1].acquireScore">
|
||||
<el-select v-if="tableInfo.score && obj.gradeGroupId===1" style="width:140px;" size="mini" v-model="child.scoreDtos[child.scoreDtos.length-1].acquireScore">
|
||||
<el-option
|
||||
v-for="item in scoreList"
|
||||
:key="item.id"
|
||||
@ -47,12 +47,12 @@
|
||||
:value="item.score">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <span>{{child.scoreDtos[child.scoreDtos.length-1].acquireScore || 0}}</span> -->
|
||||
<!-- <el-input style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.superScore" clearable></el-input> -->
|
||||
<el-input v-if="tableInfo.score && obj.gradeGroupId===2" style="width:120px;" size="mini" placeholder="请输入评分值" v-model="child.superScore" clearable></el-input>
|
||||
<span v-if="!tableInfo.score">{{child.scoreDtos[child.scoreDtos.length-1].acquireScore || 0}}</span>
|
||||
</div>
|
||||
<div style="padding:10px;" v-if="tableInfo.score">
|
||||
<!-- <span>{{child.scoreComment || '--'}}</span> -->
|
||||
<el-input style="width:200px;" size="mini" type="textarea" placeholder="请输入内容" v-model="child.scoreComment" clearable></el-input>
|
||||
<div style="padding:10px;" v-if="tableInfo.score || auth.showScore">
|
||||
<el-input v-if="tableInfo.score" style="width:200px;" size="mini" type="textarea" placeholder="请输入内容" v-model="child.scoreComment" clearable></el-input>
|
||||
<span v-else>{{child.scoreComment || '--'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="item.detailDtos.length===0" class="table-content-right-item">
|
||||
@ -83,7 +83,7 @@
|
||||
<div class="table-bottom-content">
|
||||
<el-button size='small' @click="handleCancelResult" plain>取消</el-button>
|
||||
<el-button size='small' @click="handleSaveDetail()" plain>暂存</el-button>
|
||||
<el-button size='small' type="primary" >{{tableInfo.result?'提交结果值':'提交评分'}}</el-button>
|
||||
<el-button size='small' @click="handleGetNext" type="primary" >{{tableInfo.result?'提交结果值':'提交评分'}}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div v-else class="table-bottoms">
|
||||
@ -96,7 +96,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { apiSaveDetail, apiGet375 } from '@/api/assessment'
|
||||
import { apiSaveDetail, apiGet375, apiSaveapproval } from '@/api/assessment'
|
||||
export default {
|
||||
name: 'columnsTbale',
|
||||
props: {
|
||||
@ -116,6 +116,12 @@ export default {
|
||||
score: false
|
||||
}
|
||||
}
|
||||
},
|
||||
auth: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@ -129,6 +135,25 @@ export default {
|
||||
this.handleGrt375()
|
||||
},
|
||||
methods: {
|
||||
async handleGetNext () {
|
||||
let res1 = await apiSaveDetail(this.obj)
|
||||
if (res1.code !== 200) {
|
||||
this.$message.error(res1.msg)
|
||||
return
|
||||
}
|
||||
const obj = {status: 1, menuName: this.tableInfo.result ? '提交了结果值' : '提交了评分'}
|
||||
const params = Object.assign({}, {resultRecordId: this.$route.query.id || ''}, obj)
|
||||
let res = await apiSaveapproval(params)
|
||||
if (res.code !== 200) {
|
||||
this.$message.error(res.msg)
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
history.go(0)
|
||||
},
|
||||
handleCancelResult () {
|
||||
this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, {result: false, score: false}))
|
||||
},
|
||||
@ -142,6 +167,7 @@ export default {
|
||||
let res = await apiSaveDetail(params)
|
||||
if (res.code !== 200) {
|
||||
this.$message.error(res.msg)
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
|
||||
@ -69,6 +69,7 @@
|
||||
</div>
|
||||
<div class="performance-content-bottom">
|
||||
<tables
|
||||
:formList='formList.auth'
|
||||
:tableInfo.sync='tableInfo'
|
||||
v-if="obj.recortModelDtos.length !==0"
|
||||
:obj='obj'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user