Your Name
2022-07-07 15518c9dd36749e814ab729f92b1256ae0da3ff1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<template>
    <div class="comp-container">
        <el-form :model="hwForm" label-width="150px" :rules="hwRules" ref="ruleFormRef">
            <div class="homeCard">
                <el-row>
                    <el-col :span="8">
                        <el-form-item label="申请部门" prop="hwDepartment">
                            <el-select v-model="hwForm.hwDepartment" placeholder="请选择部门">
                                <el-option label="机修班" value="机修班" />
                                <el-option label="火工班" value="火工班" />
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8">
                        <el-form-item label="申请人" prop="hwApplyName">
                            <el-input
                                    v-model="hwForm.hwApplyName"
                                    placeholder="请输入"
                                    class="input-with-select"
                            >
                                <template #append>
                                    <el-button :icon="Search" />
                                </template>
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="8">
                        <el-form-item label="作业等级" prop="hwLevel">
                            <el-select v-model="hwForm.hwLevel" placeholder="请选择">
                                <el-option label="一" value="一" />
                                <el-option label="二" value="二" />
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8">
                        <el-form-item label="作业高度" prop="hwHeight">
                            <el-input
                                    v-model="hwForm.hwHeight"
                                    placeholder="请输入"
                                    class="input-with-select"
                            />
                        </el-form-item>
                    </el-col>
                </el-row>
            </div>
        </el-form>
    </div>
</template>
 
<script lang="ts">
    import { toRefs, reactive, defineComponent, ref } from 'vue';
    import { storeToRefs } from 'pinia';
    import { initBackEndControlRoutes } from '/@/router/backEnd';
    import {useUserInfo} from "/@/stores/userInfo";
    import { Session } from '/@/utils/storage';
    import { Search } from '@element-plus/icons-vue'
    import type { FormInstance, FormRules } from 'element-plus'
    let global: any = {
        homeChartOne: null,
        homeChartTwo: null,
        homeCharThree: null,
        dispose: [null, '', undefined],
    };
 
    interface stateType {
        homeOne: Array <type>
    }
    interface type {
 
    }
    export default defineComponent({
        name: 'highWorkForm',
        setup() {
            const userInfo = useUserInfo()
            const { userInfos } = storeToRefs(userInfo);
            const state  = reactive<stateType>({});
            const hwForm = reactive({
                hwDepartment: '',
                hwApplyName: '',
                hwLevel: '',
                hwHeight: ''
            })
            const ruleFormRef = ref<FormInstance>()
            const hwRules = reactive<FormRules>({
                hwDepartment:[{required: true,message: '此处不可为空',trigger: 'blur'}],
                hwApplyName:[{required: true,message: '此处不可为空',trigger: 'blur'}],
                hwLevel: [{required: true,message: '此处不可为空',trigger: 'blur'}],
                hwHeight: [{required: true,message: '此处不可为空',trigger: 'blur'}]
            })
            // 折线图
            const renderMenu = async (value: string) => {
                Session.set('projectId',value)
                userInfos.value.projectId = value
                await initBackEndControlRoutes();
            };
            return {
                renderMenu,
                hwForm,
                ruleFormRef,
                hwRules,
                ...toRefs(state),
            };
        },
    });
</script>
 
<style scoped lang="scss">
    .comp-container {
        height: 100%;
        overflow: hidden;
        .homeCard{
            width: 100%;
            padding: 20px;
            background: #fff;
            border-radius: 4px;
            margin-bottom: 20px;
        }
        .el-row{
            margin-bottom: 20px;
        }
        .el-row:last-child {
            margin-bottom: 0;
        }
        .el-input{
            width: 100% !important;
        }
        .el-date-editor::v-deep{
            width: 100%;
        }
        .el-select{
            width: 100%;
        }
        .el-cascader{
            width: 100% !important;
        }
        .submitBtn{
            display: flex;
            justify-content: center;
        }
    }
</style>