This commit is contained in:
熊成强 2020-11-03 12:15:22 +08:00
parent 9d148ba4e7
commit ad893c38c1
5 changed files with 73 additions and 17 deletions

View File

@ -15,7 +15,10 @@ import { format } from '@/utils/dateFormat'
let hostList = ['lzmanagement.ldxinyong.com'] let hostList = ['lzmanagement.ldxinyong.com']
if (!hostList.includes(window.location.host)) { 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) Vue.use(VueCookie)

View File

@ -108,7 +108,7 @@
<div class="goals-bottom"> <div class="goals-bottom">
<div class="goals-bottom-content"> <div class="goals-bottom-content">
<el-button size='small' @click="handleSaveDetail()" plain>暂存</el-button> <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> </div>
</div> </div>
@ -120,7 +120,7 @@ import InfoHeader from '@/components/InfoHeader'
import PopupRight from '@/components/PopupRight' import PopupRight from '@/components/PopupRight'
import draggable from 'vuedraggable' import draggable from 'vuedraggable'
import {getDimensions} from '@/api/data' import {getDimensions} from '@/api/data'
import { apiResultGetDetail, apiSaveDetail } from '@/api/assessment' import { apiResultGetDetail, apiSaveDetail, apiSaveapproval } from '@/api/assessment'
export default { export default {
data () { data () {
return { return {
@ -173,6 +173,31 @@ export default {
this.handleGetTbale() this.handleGetTbale()
}, },
methods: { 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) { handleGetWeight (arr) {
const weight = arr.detailDtos.reduce((num, i) => { const weight = arr.detailDtos.reduce((num, i) => {
num += i.isDelete !== 1 ? i.checkWeight : 0 num += i.isDelete !== 1 ? i.checkWeight : 0
@ -192,6 +217,7 @@ export default {
let res = await apiSaveDetail(params) let res = await apiSaveDetail(params)
if (res.code !== 200) { if (res.code !== 200) {
this.$message.error(res.msg) this.$message.error(res.msg)
return
} }
this.$message({ this.$message({
message: res.msg, message: res.msg,

View File

@ -243,7 +243,7 @@ export default {
this.$router.push({ this.$router.push({
name: 'assessment-goals', name: 'assessment-goals',
query: { query: {
id: 267 || this.$route.query.id id: this.$route.query.id || ''
} }
}) })
}, },

View File

@ -30,16 +30,16 @@
<div> <div>
{{child.keyResult || ''}} {{child.keyResult || ''}}
</div> </div>
<div v-if="tableInfo.result"> <div v-if="tableInfo.result || auth.showResult">
<!-- <span>{{child.checkResult || '--'}}</span> --> <el-input v-if="tableInfo.result" style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.checkResult" clearable></el-input>
<el-input style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.checkResult" clearable></el-input> <span v-else>{{child.checkResult || '--'}}</span>
</div> </div>
<div class="quanzhomng"> <div class="quanzhomng">
{{(child.checkWeight)*100}}% {{(child.checkWeight)*100}}%
</div> </div>
<div v-if="tableInfo.score"> <div v-if="tableInfo.score || auth.showScore">
<!-- gradeGroupId=== 1 下拉 --> <!-- 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 <el-option
v-for="item in scoreList" v-for="item in scoreList"
:key="item.id" :key="item.id"
@ -47,12 +47,12 @@
:value="item.score"> :value="item.score">
</el-option> </el-option>
</el-select> </el-select>
<!-- <span>{{child.scoreDtos[child.scoreDtos.length-1].acquireScore || 0}}</span> --> <el-input v-if="tableInfo.score && obj.gradeGroupId===2" style="width:120px;" size="mini" placeholder="请输入评分值" v-model="child.superScore" clearable></el-input>
<!-- <el-input 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>
<div style="padding:10px;" v-if="tableInfo.score"> <div style="padding:10px;" v-if="tableInfo.score || auth.showScore">
<!-- <span>{{child.scoreComment || '--'}}</span> --> <el-input v-if="tableInfo.score" style="width:200px;" size="mini" type="textarea" placeholder="请输入内容" v-model="child.scoreComment" clearable></el-input>
<el-input style="width:200px;" size="mini" type="textarea" placeholder="请输入内容" v-model="child.scoreComment" clearable></el-input> <span v-else>{{child.scoreComment || '--'}}</span>
</div> </div>
</div> </div>
<div v-if="item.detailDtos.length===0" class="table-content-right-item"> <div v-if="item.detailDtos.length===0" class="table-content-right-item">
@ -83,7 +83,7 @@
<div class="table-bottom-content"> <div class="table-bottom-content">
<el-button size='small' @click="handleCancelResult" plain>取消</el-button> <el-button size='small' @click="handleCancelResult" plain>取消</el-button>
<el-button size='small' @click="handleSaveDetail()" 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> </div>
<!-- <div v-else class="table-bottoms"> <!-- <div v-else class="table-bottoms">
@ -96,7 +96,7 @@
</div> </div>
</template> </template>
<script> <script>
import { apiSaveDetail, apiGet375 } from '@/api/assessment' import { apiSaveDetail, apiGet375, apiSaveapproval } from '@/api/assessment'
export default { export default {
name: 'columnsTbale', name: 'columnsTbale',
props: { props: {
@ -116,6 +116,12 @@ export default {
score: false score: false
} }
} }
},
auth: {
type: Object,
default: () => {
return {}
}
} }
}, },
data () { data () {
@ -129,6 +135,25 @@ export default {
this.handleGrt375() this.handleGrt375()
}, },
methods: { 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 () { handleCancelResult () {
this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, {result: false, score: false})) this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, {result: false, score: false}))
}, },
@ -142,6 +167,7 @@ export default {
let res = await apiSaveDetail(params) let res = await apiSaveDetail(params)
if (res.code !== 200) { if (res.code !== 200) {
this.$message.error(res.msg) this.$message.error(res.msg)
return
} }
this.$message({ this.$message({
message: res.msg, message: res.msg,

View File

@ -69,6 +69,7 @@
</div> </div>
<div class="performance-content-bottom"> <div class="performance-content-bottom">
<tables <tables
:formList='formList.auth'
:tableInfo.sync='tableInfo' :tableInfo.sync='tableInfo'
v-if="obj.recortModelDtos.length !==0" v-if="obj.recortModelDtos.length !==0"
:obj='obj' :obj='obj'