预览模式完成绑定

This commit is contained in:
Hcat
2023-12-30 16:39:48 +08:00
parent d0c2648a2e
commit 0e949a65b8
5 changed files with 147 additions and 82 deletions

View File

@@ -20,11 +20,7 @@
<el-input v-model="form.serialNumber" placeholder="请输入序列号" />
</el-form-item>
<el-form-item label="隧道长度">
<el-input
type="number"
v-model="form.totalLength"
placeholder="请输入隧道长度"
/>
<el-input type="number" v-model="form.totalLength" placeholder="请输入隧道长度" />
</el-form-item>
<el-form-item label="是否默认">
<el-radio-group v-model="form.isDefault">
@@ -39,14 +35,8 @@
</div>
<!-- 这里就导入正常的编辑模式就是我们之前写的部分 -->
<tunnel-scene
id="tunnel-box"
:isedit="true"
:tunnelId="tunnelId"
:form="form"
ref="tunnelScene"
:tunnelLength="tunnelLength"
/>
<tunnel-scene id="tunnel-box" :isedit="true" :tunnelId="tunnelId" :form="form" ref="tunnelScene"
:tunnelLength="tunnelLength" />
</div>
</template>
<script setup>
@@ -93,11 +83,11 @@ const handleSave = async () => {
tunnelName: form.value.tunnelName,
serialNumber: form.value.serialNumber,
remarks: form.value.remarks,
constructionLength:form.value.constructionLength,
constructionLength: form.value.constructionLength,
// constructionLength: 500,
tunnelLength: form.value.totalLength,
isDefault: form.value.isDefault,
modelEquipmentList: await store.getEquipmentList(),
modelEquipmentList: await modelStore.getEquipmentList(),
};
editTunnel(data).then((res) => {
if (res?.code === 1000) {
@@ -188,6 +178,7 @@ const handleSave = async () => {
background-image: url(@/assets/images/transducer/bg.png);
padding: 20px 30px;
box-sizing: border-box;
:deep(.el-radio-group) {
margin-top: 10px;
}