|
|
@@ -4,36 +4,36 @@
|
|
|
|
|
|
<div class="mainItem">
|
|
|
<div class="label">标题</div>
|
|
|
- <div>{{ trainingData?.title }}</div>
|
|
|
+ <div>{{ trainingData.title }}</div>
|
|
|
</div>
|
|
|
<div class="mainItem">
|
|
|
<div class="label">单位名称</div>
|
|
|
- <div>{{ trainingData?.orgName }}</div>
|
|
|
+ <div>{{ trainingData.orgName }}</div>
|
|
|
</div>
|
|
|
<div class="mainItem">
|
|
|
<div class="label">演练时间</div>
|
|
|
- <div>{{ trainingData?.startDate }}</div>
|
|
|
+ <div>{{ trainingData.startDate }}</div>
|
|
|
</div>
|
|
|
<div class="mainItem">
|
|
|
<div class="label">演练地点</div>
|
|
|
- <div>{{ trainingData?.drillSite }}</div>
|
|
|
+ <div>{{ trainingData.drillSite }}</div>
|
|
|
</div>
|
|
|
<div class="mainItem">
|
|
|
<div class="label">指挥人</div>
|
|
|
- <div>{{ trainingData?.hostName }}</div>
|
|
|
+ <div>{{ trainingData.hostName }}</div>
|
|
|
</div>
|
|
|
<div class="mainItem">
|
|
|
<div class="label">演练项目</div>
|
|
|
- <div>{{ trainingData?.typeText }}</div>
|
|
|
+ <div>{{ trainingData.typeText }}</div>
|
|
|
</div>
|
|
|
<div class="mainItem">
|
|
|
<div class="label">预设案由</div>
|
|
|
- <div>{{ trainingData?.presetCase }}</div>
|
|
|
+ <div>{{ trainingData.presetCase }}</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="mainItem">
|
|
|
<div class="label">演练情况</div>
|
|
|
- <div>{{ trainingData?.drillSituation }}</div>
|
|
|
+ <div>{{ trainingData.drillSituation }}</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="mainItem">
|
|
|
@@ -49,19 +49,13 @@
|
|
|
|
|
|
<imgCom :width="'100'" v-for="item in imgList" :key="item" :height="'100'" :src="item"></imgCom>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="mainItem"
|
|
|
- v-if="peopleShow"
|
|
|
- >
|
|
|
+ <div class="mainItem" v-if="peopleShow">
|
|
|
<div class="label labelPeople">参与人员签名图片</div>
|
|
|
<template v-for="item in signUserList">
|
|
|
<imgCom :width="'100'" v-if="item.signImage" :key="item.userId" :height="'100'" :src="item.signImage"></imgCom>
|
|
|
</template>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="mainItem"
|
|
|
- v-if="evaluateShow"
|
|
|
- >
|
|
|
+ <div class="mainItem" v-if="evaluate">
|
|
|
<div class="label">评分</div>
|
|
|
<div><van-rate :disabled="disabledShow" v-model="value" :count="10" /></div>
|
|
|
</div>
|
|
|
@@ -70,7 +64,6 @@
|
|
|
required
|
|
|
:rules="[{ required: true, message: '评语不能为空' }]"
|
|
|
v-model="content"
|
|
|
-
|
|
|
name="content"
|
|
|
label="评语"
|
|
|
type="textarea"
|
|
|
@@ -79,6 +72,27 @@
|
|
|
show-word-limit
|
|
|
placeholder="请填写评语"
|
|
|
/>
|
|
|
+
|
|
|
+ <div class="mainItem" v-if="disabledShow">
|
|
|
+ <div class="label">评分</div>
|
|
|
+ <div>{{ value }}分</div>
|
|
|
+ </div>
|
|
|
+ <div class="mainItem" v-if="disabledShow">
|
|
|
+ <div class="label">评语</div>
|
|
|
+ <div>{{ content }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="mainItem" v-if="islearning">
|
|
|
+ <div class="label">评优状态</div>
|
|
|
+ <div>{{ content }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="mainItem">
|
|
|
+ <!-- <div class="label"></div> -->
|
|
|
+ <div>
|
|
|
+ <van-checkbox-group v-model="result" direction="horizontal" >
|
|
|
+ <van-checkbox v-for="item in resultList" :key="item.value" @change="clickChekcBox($event,item)" :disabled="disabledCheck(item)" shape="square" :name="item.value">{{ item.name }}</van-checkbox>
|
|
|
+ </van-checkbox-group>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<van-row>
|
|
|
<van-col span="24" class="btns">
|
|
|
<!-- 签名 -->
|
|
|
@@ -99,10 +113,7 @@
|
|
|
>
|
|
|
</van-col>
|
|
|
</van-row>
|
|
|
- <div class="mainItem" v-if="disabledShow">
|
|
|
- <div class="label">评语</div>
|
|
|
- <div>{{ content }}</div>
|
|
|
- </div>
|
|
|
+
|
|
|
<van-action-sheet v-model="show" title="签署名字" class="sheet">
|
|
|
<writingPad ref="esign" @resultImg="resultImg"></writingPad>
|
|
|
</van-action-sheet>
|
|
|
@@ -111,7 +122,7 @@
|
|
|
<script>
|
|
|
import NavBar from '@/components/NavBar'
|
|
|
import writingPad from '@/components/writingPad/index.vue'
|
|
|
-import { getrehearsalInfo, singrehearsalTask, drillInfo } from '@/api/drillTask.js'
|
|
|
+import { getrehearsalInfo, singrehearsalTask, drillInfo, drillSignInfo } from '@/api/drillTask.js'
|
|
|
import { upload } from '@/api/public'
|
|
|
import imgCom from '@/components/imgCom/index.vue'
|
|
|
import { base64ToBlob } from '@/utils/base64TurnImg.js'
|
|
|
@@ -130,10 +141,13 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ result: [],
|
|
|
+ orgType: '', //机构类型
|
|
|
content: '', //评语
|
|
|
value: 0, //评分
|
|
|
this_window: window,
|
|
|
show: false,
|
|
|
+ resultList:[],
|
|
|
taskUserList: [], //参与人员
|
|
|
qsUserList: [], //缺席人员
|
|
|
imgList: [], //图片数组
|
|
|
@@ -144,53 +158,109 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
goBack() {
|
|
|
- if (this.$route.params.id.split('_')[1] === 'evaluate' || this.$route.params.id.split('_')[1] === 'edit'||this.$route.params.id.split('_')[1] === 'info') {
|
|
|
+ if (
|
|
|
+ this.$route.params.id.split('_')[1] === 'evaluate' ||
|
|
|
+ this.$route.params.id.split('_')[1] === 'edit' ||
|
|
|
+ this.$route.params.id.split('_')[1] === 'info'
|
|
|
+ ) {
|
|
|
return '/rehearsalTask'
|
|
|
} else if (this.$route.params.id.split('_')[1] === 'comment') {
|
|
|
return '/rehearsaloptimal'
|
|
|
+ } else if (this.$route.params.id.split('_')[1] === 'learning') {
|
|
|
+ return '/rehearsallearning'
|
|
|
}
|
|
|
},
|
|
|
- evaluate(){
|
|
|
- if(this.$route.params.id.split('_')[1] === 'evaluate' || this.$route.params.id.split('_')[1] === 'comment'){
|
|
|
+ evaluate() {
|
|
|
+ if (this.$route.params.id.split('_')[1] === 'evaluate') {
|
|
|
return true
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return false
|
|
|
}
|
|
|
},
|
|
|
- evaluateShow(){
|
|
|
- if(this.$route.params.id.split('_')[1] === 'info'||this.$route.params.id.split('_')[1] === 'evaluate' || this.$route.params.id.split('_')[1] === 'comment'){
|
|
|
+
|
|
|
+ disabledShow() {
|
|
|
+ if (
|
|
|
+ this.$route.params.id.split('_')[1] === 'info' ||
|
|
|
+ this.$route.params.id.split('_')[1] === 'comment' ||
|
|
|
+ this.$route.params.id.split('_')[1] === 'learning'
|
|
|
+ ) {
|
|
|
return true
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return false
|
|
|
}
|
|
|
},
|
|
|
- disabledShow(){
|
|
|
- if(this.$route.params.id.split('_')[1] === 'info'){
|
|
|
+ islearning() {
|
|
|
+ if (this.$route.params.id.split('_')[1] === 'learning') {
|
|
|
return true
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
}
|
|
|
},
|
|
|
- peopleShow(){
|
|
|
- if(this.$route.params.id.split('_')[1] === 'info' || this.$route.params.id.split('_')[1] === 'comment'){
|
|
|
+ peopleShow() {
|
|
|
+ if (
|
|
|
+ this.$route.params.id.split('_')[1] === 'info' ||
|
|
|
+ this.$route.params.id.split('_')[1] === 'comment' ||
|
|
|
+ this.$route.params.id.split('_')[1] === 'learning'
|
|
|
+ ) {
|
|
|
return true
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
created() {
|
|
|
+ //获取当前登录人机构类型
|
|
|
+ this.orgType = window.sessionStorage.getItem('SET_USER_ORGTYPE')
|
|
|
+ console.log( this.orgType );
|
|
|
+ if (this.orgType == 1) {
|
|
|
+ //省联社
|
|
|
+ this.resultList = [
|
|
|
+ {
|
|
|
+ name: '设置为省级优秀案例',
|
|
|
+ value: 5
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ } else if (this.orgType == 2) {
|
|
|
+ //办事处
|
|
|
+ this.resultList = [
|
|
|
+ {
|
|
|
+ name: '设置为地区优秀案例',
|
|
|
+ value: 3
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '推荐为省级优秀案例',
|
|
|
+ value: 4
|
|
|
+ }
|
|
|
+
|
|
|
+ ]
|
|
|
+ } else if (this.orgType == 3) {
|
|
|
+ //行社
|
|
|
+ this.resultList = [
|
|
|
+ {
|
|
|
+ name: '设置为行社优秀案例',
|
|
|
+ value: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '推荐为地区优秀案例',
|
|
|
+ value: 2
|
|
|
+ }
|
|
|
+
|
|
|
+ ]
|
|
|
+ }
|
|
|
//获取详情信息
|
|
|
getrehearsalInfo(this.$route.params.id.split('_')[0]).then(res => {
|
|
|
let { code, data, msg } = res
|
|
|
if (code == 200) {
|
|
|
- this.content=data.comment
|
|
|
- this.value=data.commentScore
|
|
|
+ this.content = data.comment
|
|
|
+ this.value = +data.commentScore
|
|
|
this.trainingData = data
|
|
|
- this.trainingData?.taskUserList?.map(item => {
|
|
|
+ this.trainingData.taskUserList.map(item => {
|
|
|
if (item.type == 1) {
|
|
|
this.taskUserList.push(item.userName)
|
|
|
}
|
|
|
})
|
|
|
this.taskUserList = this.taskUserList.join(',')
|
|
|
- this.trainingData?.taskUserList?.map(item => {
|
|
|
+ this.trainingData.taskUserList.map(item => {
|
|
|
if (item.type == 2) {
|
|
|
this.qsUserList.push(item.userName)
|
|
|
}
|
|
|
@@ -211,13 +281,24 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- this.imgList = this.trainingData?.imageList?.split(',') || []
|
|
|
+ this.imgList = this.trainingData.imageList.split(',') || []
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- mounted() {},
|
|
|
+ mounted() {
|
|
|
+
|
|
|
+ },
|
|
|
|
|
|
methods: {
|
|
|
+ disabledCheck(item){
|
|
|
+ //当前是最后一个复选框禁用
|
|
|
+ if(this.resultList.length>1&&item.value==this.resultList[this.resultList.length-1].value){
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ clickChekcBox(v,item){
|
|
|
+ console.log(v,item);
|
|
|
+ },
|
|
|
signatureHandler() {
|
|
|
this.show = true
|
|
|
},
|
|
|
@@ -241,20 +322,18 @@ export default {
|
|
|
message: `是否提交评价?`
|
|
|
})
|
|
|
.then(() => {
|
|
|
- let obj = this.trainingData
|
|
|
- obj.commentScore = this.value
|
|
|
- obj.comment = this.content
|
|
|
- drillInfo({
|
|
|
- id: this.trainingData.id,
|
|
|
+ drillSignInfo({
|
|
|
+ taskId: this.trainingData.id,
|
|
|
// type: this.trainingData.type,
|
|
|
- submitType: 2,
|
|
|
-
|
|
|
- ...obj
|
|
|
+ score: this.value,
|
|
|
+ comment: this.content
|
|
|
}).then(res => {
|
|
|
let { code, msg } = res
|
|
|
if (code == 200) {
|
|
|
- Toast('登记成功')
|
|
|
- this.$router.push('/rehearsalTask')
|
|
|
+ Toast('评价成功')
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$router.push('/rehearsalTask')
|
|
|
+ }, 1000)
|
|
|
} else {
|
|
|
Toast(msg)
|
|
|
}
|
|
|
@@ -265,6 +344,10 @@ export default {
|
|
|
})
|
|
|
} else {
|
|
|
//评价推优
|
|
|
+ if(this.result.length==0){
|
|
|
+ Toast('推荐优秀或设置优秀不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
clearHandler() {
|