query-detail.vue 3.56 KB
Newer Older
geqilin's avatar
geqilin committed
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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
<template lang="pug">
  el-dialog(top="5vh" :close-on-click-modal='false', :visible.sync='visible' :modal-append-to-body='false')
    div(slot='title')
      span.title-bold 应急物资详情
    el-form(:model='dataForm',  ref='dataForm',  label-width='120px')
      el-row(:gutter='20')
        el-col(:span='12')
          el-form-item(label="应急物资名称:" )
             el-input.mywidth(v-model='dataForm.name' placeholder="请输入应急物资名称"  clearable readonly)
        el-col(:span='12')
          el-form-item(label="规格型号:")
            el-input.mywidth(v-model='dataForm.specifications' placeholder="请输入规格型号"  clearable readonly)
      el-row(:gutter='20')
        el-col(:span='12')
          el-form-item(label="类型:")
            el-input.mywidth(v-model='dataForm.typeName' placeholder="请输入规格型号"  clearable readonly)
        el-col(:span='12')
          el-form-item(label="品牌:" )
            el-input.mywidth(v-model='dataForm.brand' placeholder="请输入品牌"  clearable readonly)
      el-row(:gutter='20')
        el-col(:span='12')
          el-form-item(label="单位:")
            el-input.mywidth(v-model='dataForm.unit' placeholder="请输入单位"  clearable readonly)
        el-col(:span='12')
          el-form-item(label="可使用数量:")
            el-input.mywidth(v-model='dataForm.count' placeholder="请输入可使用数量" type='number' clearable readonly)
      el-row(:gutter='20')
        //- el-col(:span='12')
          el-form-item(label="是否使用:" prop="status")
            el-radio-group.my_radio(disabled v-model='dataForm.status')
                el-radio(:label='1') 是
                el-radio(:label='2') 否
            //- el-input.mywidth(v-model='dataForm.placeFor' placeholder=""  clearable readonly)
        el-col(:span='12')
          el-form-item(label="存放位置:" prop="placeFor")
            el-input.mywidth(v-model='dataForm.placeFor' placeholder=""  clearable readonly)
        el-col(:span='12')
          el-form-item(label="排序值:" prop="sortValue")
            el-input.mywidth(v-model='dataForm.sortValue' placeholder=""  clearable readonly)
      el-row
        el-col(:span='24')
          el-form-item(label="物资说明:")
            el-input.mywidth(v-model="dataForm.remark"  type="textarea" :rows="5" resize="none" placeholder="请输入物资说明" readonly)
    span.dialog-footer(slot='footer')
      el-button(type='primary' size='medium' @click='visible = false') 关闭
</template>

<script>
export default {
  data () {
    return {
      dataList: [],
      dataListLoading: false,
      visible: false,
      dataForm: {},
      typeList: [
        { id: '1', name: '通讯器材类' },
        { id: '2', name: '防疫类' },
        { id: '3', name: '消防器材' }
      ]
    }
  },
  created () {
    // this.getType()
  },
  methods: {
    init (row) {
      this.visible = true
      this.dataForm = row
      this.typeList.forEach(e => {
        if (e.id === this.dataForm.type) {
          this.dataForm.typeName = e.name
        }
      })
    },
    //获取物资类型
    getType () {
      this.$http({
        url: this.$http.adornUrl('/sysDictionary/getListByParent'),
        method: 'get',
        params: { parentId: 'bf8efa4ef7fc4d4b94c7b7eaab4c9bed', stationId: localStorage.getItem('stationId') }
      }).then(data => {
        if (data && data.code === 0) {
          this.typeList = data.list
        }
      })
    }

  }
}
</script>
<style>
.el-table__header {
  width: 100% !important;
}
.el-table__body {
  width: 100% !important;
}
</style>