<template> 
 | 
  <GlobalAlertWindow :title="title" :visible.sync="visible" :confirm-working="isWorking" width="600px" @confirm="confirm"> 
 | 
  
 | 
    <el-form :model="form" ref="form" :rules="rules" label-suffix=":"> 
 | 
      <el-form-item label="问题描述" prop="dealInfo"> 
 | 
        <div>{{ form.content }}</div> 
 | 
      </el-form-item> 
 | 
      <el-form-item label="图片/视频" prop="dealInfo"> 
 | 
        <el-image v-for="(url, index) in form.imgList" :key="index" 
 | 
          style="width: 100px; height: 100px; margin-right: 5px;" :src="url" fit="contain" 
 | 
          :prediv-src-list="form.imgList"></el-image> 
 | 
      </el-form-item> 
 | 
    </el-form> 
 | 
    <div slot="footer"> 
 | 
      <el-button @click="visible = false">返回</el-button> 
 | 
    </div> 
 | 
  </GlobalAlertWindow> 
 | 
</template> 
 | 
  
 | 
<script> 
 | 
import BaseOpera from '@/components/base/BaseOpera' 
 | 
import GlobalAlertWindow from '@/components/common/GlobalAlertWindow' 
 | 
// import { findList } from '@/api/business/roomTime' 
 | 
import { numRule } from '@/utils/form' 
 | 
export default { 
 | 
  name: 'OperaSuggestWindow', 
 | 
  extends: BaseOpera, 
 | 
  components: { GlobalAlertWindow }, 
 | 
  data() { 
 | 
    return { 
 | 
      // 表单数据 
 | 
      form: { 
 | 
        id: null, 
 | 
        content: '', 
 | 
        imgList: [], 
 | 
  
 | 
      }, 
 | 
      backInfoRequired: false, 
 | 
      // 验证规则 
 | 
      rules: { 
 | 
        duration: [ 
 | 
          { required: true, validator: numRule, message: '请输入计费时长', tigger: 'blur' } 
 | 
        ], 
 | 
        backReason: [ 
 | 
          { required: true, message: '请选择调整原因', tigger: 'change' }, 
 | 
        ] 
 | 
      } 
 | 
    } 
 | 
  }, 
 | 
  created() { 
 | 
    this.config({ 
 | 
      api: '/business/bikeRepair', 
 | 
      'field.id': 'id', 
 | 
    }) 
 | 
  
 | 
  }, 
 | 
  methods: { 
 | 
    /** 
 | 
     * 打开窗口 
 | 
     * @title 窗口标题 
 | 
     * @target 编辑的对象 
 | 
     */ 
 | 
    open(title, target) { 
 | 
      this.title = title 
 | 
      this.visible = true 
 | 
      // 新建 
 | 
      if (target == null) { 
 | 
        this.$nextTick(() => { 
 | 
          this.$refs.form.resetFields() 
 | 
          this.form[this.configData['field.id']] = null 
 | 
        }) 
 | 
        return 
 | 
      } 
 | 
      // 编辑 
 | 
      this.$nextTick(() => { 
 | 
        for (const key in this.form) { 
 | 
          this.form[key] = target[key] 
 | 
        } 
 | 
        this.form.imgList = this.form.imgList || [] 
 | 
      }) 
 | 
    }, 
 | 
  }, 
 | 
} 
 | 
</script> 
 | 
  
 | 
<style lang="scss" scoped> 
 | 
@import "@/assets/style/alertstyle.scss"; 
 | 
@import "@/assets/style/variables.scss"; 
 | 
  
 | 
::v-deep .el-input.is-disabled .el-input__inner { 
 | 
  background-color: #fff !important; 
 | 
  cursor: pointer; 
 | 
  color: aqua; 
 | 
} 
 | 
  
 | 
.time-style { 
 | 
  display: flex; 
 | 
  flex-wrap: wrap; 
 | 
  cursor: pointer; 
 | 
  
 | 
  .time-item { 
 | 
    margin-right: 8px; 
 | 
    margin-bottom: 8px; 
 | 
    border: #111 solid 1px; 
 | 
    font-size: 14px; 
 | 
    line-height: 14px; 
 | 
    padding: 5px; 
 | 
    border-radius: 5px; 
 | 
    color: #111; 
 | 
  } 
 | 
  
 | 
  .time-item-sel { 
 | 
    border-color: $primary-color; 
 | 
    background-color: $primary-color; 
 | 
    color: #fff; 
 | 
  } 
 | 
  
 | 
  .time-item-disable { 
 | 
    border-color: #999; 
 | 
    background-color: #999; 
 | 
    color: #111; 
 | 
  } 
 | 
} 
 | 
</style> 
 |