<template>
  <div>
    <el-card>
      <el-form ref="caseFormRef" :model="caseForm" label-width="90px">
        <el-form-item label="模块名称:" style="width:200px">
          <el-input v-model="sqlMonitorForm.taskName" placeholder="请输入监控名称"></el-input>
        </el-form-item>
        <el-form-item label="数据源">
          <el-select v-model="sqlMonitorForm.dsId" placeholder="请选择数据源" clearable>
            <el-option v-for="item in dataSourceList" :key="item.id" :label="item.name" :value="item.id"></el-option>
          </el-select>
        </el-form-item>

      </el-form>
    </el-card>
  </div>
</template>
<script>
import { getSqlMonitorData } from '@/api/sqlMonitor'
export default {
  data() {
    return {
      sqlMonitorForm: {},
      dataSourceList: []
    }
  },
  created() {
    this.getSqlMonitorDataSource()
  },
  methods: {
    // 获取数据源列表
    getSqlMonitorDataSource() {
      getSqlMonitorData().then((resp) => {
        console.log('www', resp)
      })
    }
  }
}
</script>
