评价
This commit is contained in:
		@@ -23,8 +23,8 @@
 | 
			
		||||
              <span :class="'status-' + item.eventStatus">{{ $dict.getLabel('clapEventStatus',item.eventStatus) }}</span>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div v-if="item.eventStatus>1">
 | 
			
		||||
              <div class="itemBtn" @click="toEvaluate">去评价</div>
 | 
			
		||||
              <!-- <div slot="finish" class="finish">已评价</div> -->
 | 
			
		||||
              <div class="itemBtn" @click="toEvaluate" v-show="!item.evaluation">去评价</div>
 | 
			
		||||
              <div slot="finish" class="finish" v-show="item.evaluation">已评价</div>
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </u-swipe-action>
 | 
			
		||||
 
 | 
			
		||||
@@ -38,15 +38,29 @@
 | 
			
		||||
         <image class="content_img" :src="e.accessUrl" v-for="(e, indexs) in item.files" :key="indexs" @click="previewImg(e.accessUrl,item.files)"/>
 | 
			
		||||
        <u-gap height="48"/>
 | 
			
		||||
      </AiStep>
 | 
			
		||||
      <div class="bottomBtn" v-show="info.eventStatus > 1" @click="$linkTo('./evaluate')">去评价</div>
 | 
			
		||||
      <div class="bottomBtn" v-show="info.eventStatus > 1 && !info.evaluation" @click="$linkTo(`./evaluate?id=${info.id}`)">去评价</div>
 | 
			
		||||
    </AiGroup>
 | 
			
		||||
    <div v-if="currentTab=='1'">
 | 
			
		||||
      <!-- <div v-if=""></div> -->
 | 
			
		||||
      <AiEmpty :description="`暂无数据`" class="emptyWrap"/>
 | 
			
		||||
      <div v-if="info.evaluation" class="evaluation">
 | 
			
		||||
        <div class="rate">
 | 
			
		||||
          <span class="title">心愿评价:</span>
 | 
			
		||||
          <span><u-rate active-color="#F8B425" v-model="info.evaluation.evaluationScore"
 | 
			
		||||
          inactive-color="#b2b2b2" gutter="20" disabled></u-rate></span>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="detail">
 | 
			
		||||
          <div class="titles">评价详情:</div>
 | 
			
		||||
          <div>{{ info.evaluation.evaluationDetail }}</div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="photo">
 | 
			
		||||
          <div class="titles">照片</div>
 | 
			
		||||
          <div>
 | 
			
		||||
            <!-- <AiUploader v-model="info.evaluation.files" disabled></AiUploader> -->
 | 
			
		||||
            <image class="content_img" :src="v.accessUrl" v-for="(v, ind) in info.evaluation.files" :key="ind" @click="previewImg(v.accessUrl,info.evaluation.files)"/>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <AiEmpty :description="`暂无数据`" class="emptyWrap" v-else/>
 | 
			
		||||
    </div>
 | 
			
		||||
    <!-- <AiEvaluation v-if="info.eventStatus > 1" v-model="evaluation" class="fixed-bottom bg-fff" :bid="info.id">
 | 
			
		||||
      <div class="bottomBtn">去评价</div>
 | 
			
		||||
    </AiEvaluation> -->
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
@@ -120,7 +134,7 @@ export default {
 | 
			
		||||
  margin-right: 8px;
 | 
			
		||||
}
 | 
			
		||||
.photo-detail {
 | 
			
		||||
  padding: 32px 0;
 | 
			
		||||
  padding: 32px 0 50px;
 | 
			
		||||
  margin-bottom: 60px;
 | 
			
		||||
  background: #fff;
 | 
			
		||||
 | 
			
		||||
@@ -172,11 +186,41 @@ export default {
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.evaluation {
 | 
			
		||||
  padding: 0 32px;
 | 
			
		||||
  box-sizing: border-box;
 | 
			
		||||
  
 | 
			
		||||
  .rate {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    padding-bottom: 24px;
 | 
			
		||||
    box-sizing: border-box;
 | 
			
		||||
    justify-content: space-between;
 | 
			
		||||
    border-bottom: 1px solid #DDDDDD;
 | 
			
		||||
  }
 | 
			
		||||
  .detail,
 | 
			
		||||
  .photo {
 | 
			
		||||
    padding: 24px 0;
 | 
			
		||||
  }
 | 
			
		||||
  .detail {
 | 
			
		||||
    border-bottom: 1px solid #DDDDDD;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.title,
 | 
			
		||||
.titles {
 | 
			
		||||
  color: #999999;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.titles {
 | 
			
		||||
  margin-bottom: 15px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.content_img {
 | 
			
		||||
  width: 200px;
 | 
			
		||||
  height: 200px;
 | 
			
		||||
  margin-right: 8px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.bottomBtn {
 | 
			
		||||
  margin: 16px 32px 16px 0;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,21 +2,21 @@
 | 
			
		||||
  <div class="evaluate">
 | 
			
		||||
    <div class="card">
 | 
			
		||||
      <div class="title"><span class="red">*</span><span>心愿评价</span></div>
 | 
			
		||||
      <u-rate active-color="#F8B425" v-model="rate" inactive-color="#b2b2b2" size="70" gutter="70"></u-rate>
 | 
			
		||||
      <u-rate active-color="#F8B425" v-model="form.evaluationScore" inactive-color="#b2b2b2" size="70" gutter="70"></u-rate>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <div class="card">
 | 
			
		||||
      <div class="title"><span class="red">*</span><span>评价详情</span></div>
 | 
			
		||||
      <div class="textarea">
 | 
			
		||||
        <u-input v-model="value" type="textarea" height="200" :clearable="false" placeholder="请简要描述…" 
 | 
			
		||||
        <u-input v-model="form.evaluationDetail" type="textarea" height="200" :clearable="false" placeholder="请简要描述…" 
 | 
			
		||||
        placeholder-style="font-size: 16px" maxlength="500" />
 | 
			
		||||
        <div class="tips">{{value.length }}/500</div>
 | 
			
		||||
        <div class="tips">{{ form.evaluationDetail.length }}/500</div>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <div class="card">
 | 
			
		||||
      <div class="title"><span style="width: 8px;"></span><span>图片上传</span><span class="nine">(最多9张)</span></div>
 | 
			
		||||
      <AiUploader v-model="images" :limit="9"></AiUploader>
 | 
			
		||||
      <AiUploader v-model="form.files" :limit="9"></AiUploader>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <div class="btn-wrapper">
 | 
			
		||||
@@ -31,15 +31,35 @@ export default {
 | 
			
		||||
  appName: "心愿评价",
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      rate: 2,
 | 
			
		||||
      value: '',
 | 
			
		||||
      images: []
 | 
			
		||||
      images: [],
 | 
			
		||||
      form: {
 | 
			
		||||
        eventId: '',
 | 
			
		||||
        evaluationScore: '',
 | 
			
		||||
        evaluationDetail: '',
 | 
			
		||||
        files: [],
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
 | 
			
		||||
    submit() {
 | 
			
		||||
      if(!this.form.evaluationScore) {
 | 
			
		||||
        return this.$toast('请选择心愿评价')
 | 
			
		||||
      }
 | 
			
		||||
      if(!this.form.evaluationDetail) {
 | 
			
		||||
        return this.$toast('请输入评价详情')
 | 
			
		||||
      }
 | 
			
		||||
      this.$instance.post(`/app/appclapeventinfopingchang/addEvaluation`,{
 | 
			
		||||
        ...this.form
 | 
			
		||||
      }).then(res => {
 | 
			
		||||
        if(res?.code == 0) {
 | 
			
		||||
          this.$u.toast("评价成功")
 | 
			
		||||
          uni.redirectTo({url: './AppPhotoReport'})
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  onLoad() {
 | 
			
		||||
  onLoad(o) {
 | 
			
		||||
    this.form.eventId = o.id
 | 
			
		||||
    uni.setNavigationBarTitle({title: "心愿评价"})
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user