zhaoxiaoqiang1
2026-01-04 f1d30d03186c79ca2cbcfe60d6d2ce7d73fba97b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!--
 * @Author: your name
 * @Date: 2019-10-21 15:40:58
 * @LastEditTime: 2019-11-22 17:28:21
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \cts-web\src\views\area\projectManagement\details\components\DetailsInput.vue
 -->
<template>
  <el-col  :span="8" v-if="config.visible">
    <el-form-item :label="config.filedDescription + ':'">
      <el-tooltip v-if="showTooltip" class="item" effect="dark" :content="svalue" placement="top-start">
        <!-- <el-input v-model="svalue" readonly="readonly"></el-input> -->
        <p class="content">{{svalue === '' ? '--' : svalue}}</p>
      </el-tooltip>
      <!-- <el-input v-if="!showTooltip" v-model="svalue" readonly="readonly"></el-input> -->
      <p class="content" v-if="!showTooltip">{{svalue === '' ? '--' : svalue}}</p>
    </el-form-item>
  </el-col>
</template>
 
<script>
export default {
  props: ['config'],
  data: function() {
    return {
      showTooltip: false
    }
  },
  computed: {
    svalue() {
      if (this._.isEmpty(this.config.codeNo)) {
        this.showTooltip = Boolean(this.config.value.length > 14)
        return this.config.value
      } else {
        this.showTooltip = Boolean(this.config.valueDesc.length > 14)
        return this.config.valueDesc
      }
    }
  }
}
</script>
 
<style lang="stylus" scoped>
>>> .el-form-item
  height 48px
  margin-bottom 0px
.content
  // max-width 220px
  // max-height 30px
  display -webkit-box
  -webkit-line-clamp 2
  text-overflow ellipsis
  overflow hidden
  word-wrap break-word
  line-height 16px
  -webkit-box-orient vertical
</style>