<template>
	<div>
<!--		工作流引用  显示表单-->
<!--		{{workflow.workId}}-->
    <H4>测试表单展示</H4>
	</div>
  <el-form :model="form" label-width="80px" label-position="right" inline ref="ruleFormRef" :rules="rules">
    <el-form-item label="生日">
      <el-date-picker v-model="form.birthDate" type="date" style="width: 200px;" value-format="YYYY-MM-DD"
                      format="YYYY-MM-DD"></el-date-picker>
    </el-form-item>
    <el-form-item label="性别">
      <el-input v-model="form.sex" clearable style="width: 200px"></el-input>
    </el-form-item>
    <el-form-item label="类型">
      <el-input v-model="form.type" clearable style="width: 200px"></el-input>
    </el-form-item>
    <el-form-item label="年龄">
      <el-input v-model="form.age" clearable style="width: 200px"></el-input>
    </el-form-item>
    <el-form-item label="工号" prop="code">
      <el-input v-model="form.code" clearable style="width: 200px"></el-input>
    </el-form-item>
    <el-form-item label="姓名" prop="name">
      <el-input v-model="form.name" clearable style="width: 200px"></el-input>
    </el-form-item>
  </el-form>

</template>

<script setup>
	
	import {
		ref,
		reactive,
		onMounted,
		getCurrentInstance,
		nextTick
	} from 'vue'
	const {
		proxy
	} = getCurrentInstance()
	import style from '@/tools/style'
	const cardBodyStyle = ref(style.card)

  const form = ref({
    birthDate: '',
    sex: '',
    type: '',
    age: '',
    code: '',
    name: ''
  })
 
	import {
		useWorkflowStore
	} from "@/stores/workflow"
	const workflow = useWorkflowStore()
  //
	onMounted(() => { 
		console.log(workflow.workId)
    var url = 'exp/Auto/queryByWorkId'
    var param = {
      workId: workflow.workId
    }
    proxy.$axios.get(url, param).then(response => {
      if (response.data.code == '0') {
        console.log(response.data.data)
        form.value = response.data.data
      } else {
        ElMessage.error('操作失败！' + response.data.msg)
      }
    })
	})
	
	
</script>

<style>
</style>