|
@@ -0,0 +1,90 @@
|
|
|
+<script setup>
|
|
|
+import { schema } from './config.js';
|
|
|
+import { postDaily } from '@/api/daily';
|
|
|
+
|
|
|
+const form = ref({});
|
|
|
+const formInline = ref({});
|
|
|
+const testDate = ref();
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<template>
|
|
|
+ <div class="daily-container">
|
|
|
+
|
|
|
+ <el-card shadow="never" header="选择日报填写日期" class="pre-form">
|
|
|
+ <el-form :inline="true" :model="formInline">
|
|
|
+ <div class="pre-form_inner">
|
|
|
+ <el-form-item label="水厂名称">
|
|
|
+ <el-select v-model="formInline.region" placeholder="请选择水厂" clearable>
|
|
|
+ <el-option label="Zone one" value="shanghai" />
|
|
|
+ <el-option label="Zone two" value="beijing" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="日报时间">
|
|
|
+ <el-date-picker v-model="testDate" type="date" placeholder="请选择日期" :editable="false" value-format="YYYY/MM/DD"/>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <div class="next-btn">
|
|
|
+ <el-button type="primary">下一步</el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <el-card class="card" shadow="never" :header="obj.title" :key="key" v-for="obj, key in schema">
|
|
|
+ <el-form label-position="right" label-suffix=":">
|
|
|
+ <div v-for="val, k in obj" :key="key + k">
|
|
|
+ <el-divider content-position="left" v-show="val.title">{{ val.title }}</el-divider>
|
|
|
+ <el-row :gutter="100">
|
|
|
+ <el-col :span="8" v-for="item in val.list" :key="item.key">
|
|
|
+ <el-form-item :label-width="150" :label="item.label">
|
|
|
+ <el-input-number v-model="form[item.key]" :controls="false" />
|
|
|
+ <span style="padding-left: 10px; color: #999;">{{ item.unit }}</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <div class="btn-group">
|
|
|
+ <el-button>保存</el-button>
|
|
|
+ <el-button type="primary">提交</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+</template>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.daily-container {
|
|
|
+ height: 100%;
|
|
|
+ padding: 20px;
|
|
|
+ background: #fafbfa;
|
|
|
+
|
|
|
+ .card:not(:last-child) {
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.pre-form {
|
|
|
+ margin-bottom: 20px;
|
|
|
+ &_inner, .next-btn {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.btn-group {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|
|
|
+<style>
|
|
|
+.daily-container .el-card__header {
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+</style>
|