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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<template>
    <div class="comp-container">
        <el-form :model="lsForm" label-width="180px" :rules="lsFormRules" ref="ruleFormRef">
            <div class="homeCard">
                <el-row>
                    <el-col :span="8">
                        <el-form-item label="申请部门" prop="lsDepartment">
                            <el-select v-model="lsForm.lsDepartment" 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="lsApplyName">
                            <el-input
                                    v-model="lsForm.lsApplyName"
                                    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="24">
                        <el-form-item label="受限空间名称" prop="lsUnitName">
                            <el-input
                                    v-model="lsForm.lsUnitName"
                                    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="24">
                        <el-form-item label="受限空间所属单位" prop="lsUnit">
                            <el-select v-model="lsForm.lsUnit" placeholder="请选择">
                                <el-option label="一" value="一" />
                                <el-option label="二" value="二" />
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="受限空间内原有介质名称" prop="lsUnitName">
                            <el-input
                                    v-model="lsForm.lsUnitMatterName"
                                    placeholder="请输入"
                                    class="input-with-select"
                            >
                                <template #append>
                                    <el-button :icon="Search" />
                                </template>
                            </el-input>
                        </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: 'limitedSpaceForm',
        setup() {
            const userInfo = useUserInfo()
            const { userInfos } = storeToRefs(userInfo);
            const state  = reactive<stateType>({});
            const lsForm = reactive({
                lsDepartment: '',
                lsApplyName: '',
                lsUnitName: '',
                lsUnit: '',
                lsUnitMatterName: ''
            })
            const ruleFormRef = ref<FormInstance>()
            const lsFormRules = reactive<FormRules>({
                lsDepartment:[{required: true,message: '此处不可为空',trigger: 'blur'}],
                lsApplyName:[{required: true,message: '此处不可为空',trigger: 'blur'}],
                lsUnitName: [{required: true,message: '此处不可为空',trigger: 'blur'}],
                lsUnit: [{required: true,message: '此处不可为空',trigger: 'blur'}],
                lsUnitMatterName: [{required: true,message: '此处不可为空',trigger: 'blur'}]
            })
            // 折线图
            const renderMenu = async (value: string) => {
                Session.set('projectId',value)
                userInfos.value.projectId = value
                await initBackEndControlRoutes();
            };
            return {
                renderMenu,
                lsForm,
                lsFormRules,
                ruleFormRef,
                ...toRefs(state),
            };
        },
    });
</script>
 
<style scoped lang="scss">
    .home-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>