From b46de49b14769a0d06d1cb02c57c36aa386a87c9 Mon Sep 17 00:00:00 2001
From: wjt <1797368093@qq.com>
Date: 星期六, 22 六月 2024 19:24:18 +0800
Subject: [PATCH] Merge branch 'master' of http://218.28.192.34:9999/r/sqys/sqys_xcx

---
 qiye/record/evaluate.vue |  164 ++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 104 insertions(+), 60 deletions(-)

diff --git a/qiye/record/evaluate.vue b/qiye/record/evaluate.vue
index e5b7151..5b648c4 100644
--- a/qiye/record/evaluate.vue
+++ b/qiye/record/evaluate.vue
@@ -3,88 +3,132 @@
 		<view class="wbox2">
 			<view class="t">
 				鎵ф硶璇勪环
-			</view>
-			<view class="sbox">
-				<view class="t2">
-					鏈鎵ф硶杩樻弧鎰忕▼搴�
-				</view>
-				<view class="xbox">
-					<view @click="daxing(1)">
-						<img src="/static/qiye/xing1.png" alt="" />
-						<view>
-							寰堢碂绯�
-						</view>
-					</view>
-					<view @click="daxing(2)">
-						<img v-if="xing>=2" src="/static/qiye/xing1.png" alt="" />
-						<img v-else src="/static/qiye/xing2.png" alt="" />
-						<view :class="xing==2?'hei':''">
-							涓嶆弧鎰�
-						</view>
-					</view>
-					<view @click="daxing(3)">
-						<img v-if="xing>=3" src="/static/qiye/xing1.png" alt="" />
-						<img v-else src="/static/qiye/xing2.png" alt="" />
-						<view :class="xing==3?'hei':''">
-							涓�鑸埇
-						</view>
-					</view>
-					<view @click="daxing(4)">
-						<img v-if="xing>=4" src="/static/qiye/xing1.png" alt="" />
-						<img v-else src="/static/qiye/xing2.png" alt="" />
-						<view :class="xing==4?'hei':''">
-							婊℃剰
-						</view>
-					</view>
-					<view @click="daxing(5)">
-						<img v-if="xing>=5" src="/static/qiye/xing1.png" alt="" />
-						<img v-else src="/static/qiye/xing2.png" alt="" />
-						<view :class="xing==5?'hei':''">
-							闈炲父婊℃剰
-						</view>
-					</view>
-				</view>
-				<view class="line"></view>
-			</view>
-			<view class="sbox">
-				<view class="t2">
-					杩欐槸涓�涓崟閫夐鐨勯骞诧紵
-				</view>
-				<u-radio-group v-model="value">
-					<u-radio name="orange">閫変腑</u-radio>
-					<u-radio name="1" :disabled="true">鏈�変腑</u-radio>
-				</u-radio-group>
-				<view class="line"></view>
-			</view>
+			</view>
+			<template v-for="(item,index) in msg">
+				<view class="sbox" v-if="item.questionType==2">
+					<view class="t2">
+						{{item.questionName}}
+					</view>
+					<view class="xbox">
+						<view @click="daxing(index,1)">
+							<img src="/static/qiye/xing1.png" alt="" />
+							<view>
+								寰堢碂绯�
+							</view>
+						</view>
+						<view @click="daxing(index,2)">
+							<img v-if="item.getScore>=2" src="/static/qiye/xing1.png" alt="" />
+							<img v-else src="/static/qiye/xing2.png" alt="" />
+							<view :class="item.getScore==2?'hei':''">
+								涓嶆弧鎰�
+							</view>
+						</view>
+						<view @click="daxing(index,3)">
+							<img v-if="item.getScore>=3" src="/static/qiye/xing1.png" alt="" />
+							<img v-else src="/static/qiye/xing2.png" alt="" />
+							<view :class="item.getScore==3?'hei':''">
+								涓�鑸埇
+							</view>
+						</view>
+						<view @click="daxing(index,4)">
+							<img v-if="item.getScore>=4" src="/static/qiye/xing1.png" alt="" />
+							<img v-else src="/static/qiye/xing2.png" alt="" />
+							<view :class="item.getScore==4?'hei':''">
+								婊℃剰
+							</view>
+						</view>
+						<view @click="daxing(index,5)">
+							<img v-if="item.getScore>=5" src="/static/qiye/xing1.png" alt="" />
+							<img v-else src="/static/qiye/xing2.png" alt="" />
+							<view :class="item.getScore==5?'hei':''">
+								闈炲父婊℃剰
+							</view>
+						</view>
+					</view>
+					<view class="line"></view>
+				</view>
+				<view class="sbox" v-if="item.questionType==1">
+					<view class="t2">
+						{{item.questionName}}
+					</view>
+					<u-radio-group v-model="item.remark" @change="radioGroupChange">
+						<u-radio v-for="(aa, ii) in item.answerList" :key="ii" :name="aa.answerId">
+							{{aa.answerName}}
+						</u-radio>
+					</u-radio-group>
+					<view class="line"></view>
+				</view>
+			</template>
+	
+			
 			<view class="sbox">
 				<view class="t2" style="margin-bottom: 30rpx;">
 					瀵规垜浠殑璇勪环
 				</view>
-				<u-textarea placeholder="璇疯緭鍏�..."></u-textarea>
+				<u-textarea v-model="questionRemark" placeholder="璇疯緭鍏�..."></u-textarea>
 			</view>
 		</view>
 		<view style="height: 200rpx;"></view>
 		<view class="bottom">
-			<view class="b1">
+			<view class="b1" @click="submit()">
 				鎻愪氦
 			</view>
 		</view>
 	</view>
 </template>
 
-<script>
+<script>
+	import { evaluate,saveOrder } from '@/api/qiye.js'
+	
 	export default {
 		data() {
 			return {
 				xing: 5,
-				value: 'orange',
+				value: 'orange',
+				msg:[],
+				questionRemark:'',
+				orderId:''
 			}
+		},
+		onLoad(options) {
+			this.orderId = options.id
+			//this.getdata(options.id)
+			evaluate().then(val => {
+				this.msg = val.data.data.questionList
+				for(let i = 0;i<this.msg.length;i++){
+					if(this.msg[i].questionType==2){
+						this.msg[i].getScore = 5
+					}
+				}
+				//console.log(this.msg)
+			})
 		},
 		methods: {
-			daxing(a) {
-				this.xing = a
+			daxing(i,a) {
+				this.msg[i].getScore = a
+				//this.xing = a
 			},
-
+			radioGroupChange(e){
+				//console.log(this.msg)
+			},
+			submit(){
+				let data = {
+					orderId:this.orderId,
+					questionList:this.msg,
+					questionRemark:this.questionRemark
+				}
+				console.log(data)
+				//return;
+				saveOrder(data).then(val => {
+					uni.showToast({
+						title: '鎻愪氦鎴愬姛',
+						icon: 'none'
+					})
+					setTimeout(() => {
+						uni.navigateBack()
+					}, 500)
+				})
+			}
 		}
 	}
 </script>

--
Gitblit v1.9.1