|
|
@@ -2,22 +2,24 @@
|
|
|
<div>
|
|
|
<NavBar :go="{ type: 'push', path: '/resumptionEvaluate' }" />
|
|
|
<div class="evaluate">
|
|
|
- <van-row class="cell_cls">
|
|
|
- <van-col span="24"> {{ formData.evaluateName }} </van-col>
|
|
|
- </van-row>
|
|
|
- <van-row class="cell_cls">
|
|
|
- <van-col span="24">
|
|
|
- <span class="evaluteTime">评价周期:</span>
|
|
|
- <span>{{ formData.startTime }}-{{ formData.endTime }}</span>
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- <van-row>
|
|
|
- <van-col span="24" class="evaluteMain">
|
|
|
- <span class="titleLeft"></span>
|
|
|
- <span class="text">{{ addOrInfo == 'add' ? '评价内容:' : '评价记录:' }}</span>
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- <van-form @submit="onSubmit" ref="form">
|
|
|
+ <div class="bgcwirte">
|
|
|
+ <van-row class="cell_cls">
|
|
|
+ <van-col span="24"> {{ formData.evaluateName }} </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row class="cell_cls">
|
|
|
+ <van-col span="24">
|
|
|
+ <span class="evaluteTime">评价周期:</span>
|
|
|
+ <span>{{ formData.startTime }}-{{ formData.endTime }}</span>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row>
|
|
|
+ <van-col span="24" class="evaluteMain">
|
|
|
+ <span class="titleLeft"></span>
|
|
|
+ <span class="text">{{ addOrInfo == 'add' ? '评价内容:' : '评价记录:' }}</span>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ </div>
|
|
|
+ <van-form @submit="onSubmit" ref="form" v-if="addOrInfo == 'add'">
|
|
|
<van-cell
|
|
|
:title="item.code + '.' + item.content"
|
|
|
v-for="item in formData.coreEvaluateContentList"
|
|
|
@@ -45,8 +47,57 @@
|
|
|
</template>
|
|
|
</van-cell>
|
|
|
</van-form>
|
|
|
+ <div v-else class="cardBigBox">
|
|
|
+ <div class="cardBox" v-for="item in formData.coreEvaluateTaskUserContentVOS" :key="item.id">
|
|
|
+ <p class="text">
|
|
|
+ 评价时间:<span>{{ item.completeTime }}</span>
|
|
|
+ </p>
|
|
|
+ <p>
|
|
|
+ 评价人:<span>{{ item.evaluateBy }}</span>
|
|
|
+ </p>
|
|
|
+ <van-cell v-for="i in item.coreEvaluateTaskContentList" :key="i.id" :title="i.code + '.' + i.content">
|
|
|
+ <template #label>
|
|
|
+ <div v-if="i.contentType == '1'">
|
|
|
+ <div class="textScore">{{ i.score }}</div>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <van-rate
|
|
|
+ count="10"
|
|
|
+ v-model="i.score"
|
|
|
+ :size="20"
|
|
|
+ readonly
|
|
|
+ color="#ffd21e"
|
|
|
+ void-icon="star"
|
|
|
+ void-color="#eee"
|
|
|
+ />{{ i.score }}分
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
+ <!-- <div v-for="i in item.coreEvaluateTaskContentList" :key="i.completeTime">
|
|
|
+ <span v-if="i.contentType == '1'">
|
|
|
+ {{ i.score }}
|
|
|
+ </span>
|
|
|
+ </div> -->
|
|
|
+ </div>
|
|
|
+ <!-- <van-cell v-for="item in formData.coreEvaluateTaskUserContentVOS" :key="item.id">
|
|
|
+ <template #title>
|
|
|
+
|
|
|
+ <p>评价时间:{{ item.completeTime }}</p>
|
|
|
+ <p>评价人:{{ item.evaluateBy }}</p></template
|
|
|
+ >
|
|
|
+
|
|
|
+ <template #label>
|
|
|
+ <div v-for="i in item.coreEvaluateTaskUserContentVOS" :key="i.completeTime">
|
|
|
+ <span v-if="i.contentType == '1'">
|
|
|
+ {{ i.score }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </van-cell> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <van-row class="cell-btutton">
|
|
|
+ <van-row class="cell-btutton" v-if="addOrInfo == 'add'">
|
|
|
<van-col span="24">
|
|
|
<van-button type="info" class="infoBtn" @click="onSubmit">评价</van-button>
|
|
|
</van-col>
|
|
|
@@ -55,7 +106,7 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import NavBar from '@/components/NavBar'
|
|
|
-import { getEvaluateByid, submitEvaluate } from '@/api/evaluateTask.js'
|
|
|
+import { getEvaluateByid, getEvaluateByDetails, submitEvaluate } from '@/api/evaluateTask.js'
|
|
|
import { Toast } from 'vant'
|
|
|
export default {
|
|
|
name: 'SocAppEvaluate',
|
|
|
@@ -95,26 +146,35 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
+ getEvaluateByDetails(this.id).then(res => {
|
|
|
+ let { code, data, msg } = res
|
|
|
+ if (code == 200) {
|
|
|
+ this.formData = data
|
|
|
+ console.log(this.formData)
|
|
|
+ this.formData.coreEvaluateTaskUserContentVOS.forEach(item => {
|
|
|
+ if (item.contentType == '2') {
|
|
|
+ item.score = +item.score
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
//详情
|
|
|
}
|
|
|
},
|
|
|
//评价提交
|
|
|
onSubmit() {
|
|
|
this.$refs.form.validate().then(() => {
|
|
|
- let obj =JSON.parse(JSON.stringify(this.formData))
|
|
|
- obj.coreEvaluateContentList.forEach(item=>{
|
|
|
- if(item.contentType=='2'){
|
|
|
- item.score=item.score+''
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.formData))
|
|
|
+ obj.coreEvaluateContentList.forEach(item => {
|
|
|
+ if (item.contentType == '2') {
|
|
|
+ item.score = item.score + ''
|
|
|
}
|
|
|
})
|
|
|
- submitEvaluate({ coreEvaluateTaskContentList:obj.coreEvaluateContentList , id: obj.id }).then(
|
|
|
- res => {
|
|
|
-
|
|
|
- let {code,msg}=res
|
|
|
- Toast.success(msg)
|
|
|
- this.$router.push('/resumptionEvaluate')
|
|
|
- }
|
|
|
- )
|
|
|
+ submitEvaluate({ coreEvaluateTaskContentList: obj.coreEvaluateContentList, id: obj.id }).then(res => {
|
|
|
+ let { code, msg } = res
|
|
|
+ Toast.success(msg)
|
|
|
+ this.$router.push('/resumptionEvaluate')
|
|
|
+ })
|
|
|
})
|
|
|
// this.formData.coreEvaluateContentList.forEach
|
|
|
}
|
|
|
@@ -123,11 +183,14 @@ export default {
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.evaluate {
|
|
|
- background-color: #fff;
|
|
|
- padding: 20px;
|
|
|
- margin: 20px;
|
|
|
+
|
|
|
height: 100%;
|
|
|
font-size: 30px;
|
|
|
+ .bgcwirte{
|
|
|
+ background: #fff;
|
|
|
+ padding: 20px;
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
.cell_cls {
|
|
|
font-size: 30px;
|
|
|
@@ -135,7 +198,7 @@ export default {
|
|
|
line-height: 40px;
|
|
|
margin: 20px;
|
|
|
.evaluteTime {
|
|
|
- color: #ccc;
|
|
|
+ // color: #ccc;
|
|
|
}
|
|
|
}
|
|
|
.evaluteMain {
|
|
|
@@ -161,4 +224,27 @@ export default {
|
|
|
bottom: 0%;
|
|
|
width: 100%;
|
|
|
}
|
|
|
+.cardBigBox {
|
|
|
+ background-color: #f5f5f9;
|
|
|
+
|
|
|
+ padding-top: 20px;
|
|
|
+ .cardBox {
|
|
|
+ background-color: #fff;
|
|
|
+ margin: 10px;
|
|
|
+ border-bottom: 1px solid #1989fa;
|
|
|
+ padding: 20px;
|
|
|
+ border-radius: 20px;
|
|
|
+ p {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
+ .text {
|
|
|
+ margin: 10px 0px 10px 0px;
|
|
|
+ }
|
|
|
+ .textScore {
|
|
|
+ font-size: 30px;
|
|
|
+ color: black;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|