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
<template>
  <el-col :md="8" :lg="6">
    <el-form-item :label="label" :prop="prop">
      <el-select v-model="svalue" filterable placeholder="请选择">
        <el-option v-for="(item, index) in options" :key="index" :label="item.valueDesc" :value="item.value">
        </el-option>
      </el-select>
    </el-form-item>
  </el-col>
</template>
 
<script>
import { projectQrycondition } from '@/api/area'
export default {
  props: ['label', 'codeNo', 'value', 'prop'],
  data: function() {
    return {
      options: []
    }
  },
  created() {
    this.initSelect()
  },
  computed: {
    svalue: {
      get() {
        return this.value
      },
      set(newVal) {
        this.$emit('input', newVal)
      }
    }
  },
  methods: {
    initSelect() {
      if (!this._.isEmpty(this.codeNo)) {
        let params = { conditionName: this.codeNo }
        projectQrycondition(params).then(res => {
          this.options = res.result
        })
      }
    }
  }
}
</script>
 
<style scoped></style>