<template>
  <div>
    <el-select v-model="systemId" clearable placeholder="请选择系统" @change="_selectChange" style="width: 100%">
      <el-option v-for="item in systemList" :key="item.id" :value="item.id" :label="item.name" />
    </el-select>
  </div>
</template>
<script>
import { sysSystem } from '../../../api'
export default {
  data() {
    return {
      systemList: [],
      systemId: ''
    }
  },
  mounted() {
    this._getList()
  },
  methods: {
    _getList: async function() {
      const result = await sysSystem.listIdName()
      if (result) {
        this.systemList = result
      }
    },
    _selectChange(data) {
      this.$emit('on-result-change', data)
    }
  }
}
</script>
