<template>
  <div class="page-test-call">
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="电话号码">
        <el-input v-model="form.phone"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">拨号</el-button>
      </el-form-item>
    </el-form>

  </div>
</template>

<script>
  export default {
    data () {
      return {
        form: {
          phone: '13588322792'
        }
      }
    },
    methods: {
      onSubmit () {
        const phone = this.form.phone;
        if (window.CallServer !== null) {
          window.CallServer.MakeCall(phone);
        }
      }
    }
  }
</script>

<style scoped>
  .page-test-call{
    max-width: 800px;
  }
</style>
