feat : 隧道管理新增施工长度输入框
This commit is contained in:
@@ -25,9 +25,9 @@
|
||||
<el-form-item label="隧道长度">
|
||||
<el-input type="number" v-model="form.totalLength" placeholder="请输入隧道长度"/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="施工长度">-->
|
||||
<!-- <el-input type="number" v-model="form.constructionLength" placeholder="请输入施工长度"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="施工长度">
|
||||
<el-input type="number" v-model="form.constructionLength" placeholder="请输入施工长度"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否默认">
|
||||
<el-radio-group v-model="form.isDefault">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
@@ -56,7 +56,6 @@ const router = useRouter();
|
||||
const tunnelId = reactive(router.currentRoute.value.params.tunnelId);
|
||||
const userId = reactive(router.currentRoute.value.params.userId);
|
||||
const type = reactive(router.currentRoute.value.params.type);
|
||||
const constructionLength = ref(0)
|
||||
const modelEquipmentList = ref(null)
|
||||
const form = ref({
|
||||
tunnelName: "",
|
||||
@@ -65,13 +64,10 @@ const form = ref({
|
||||
isDefault: false,
|
||||
remarks: "",
|
||||
});
|
||||
const getTunnel = (type) => {
|
||||
const getTunnel = () => {
|
||||
getTunnelDetail(tunnelId).then((res) => {
|
||||
if (res?.code === 1000) {
|
||||
form.value = res.data;
|
||||
if (type == 1) {
|
||||
constructionLength.value = res.data.constructionLength
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -89,11 +85,7 @@ const handleGoTunnelMgr = () => {
|
||||
};
|
||||
const getTunnelInfo = () => {
|
||||
initSceneData(tunnelId).then((res) => {
|
||||
constructionLength.value = res.data.constructionLength
|
||||
modelEquipmentList.value = JSON.parse(res.data.tunnelThreeConfig)
|
||||
if(constructionLength.value===null){
|
||||
constructionLength.value=0
|
||||
}
|
||||
if(modelEquipmentList.value===null){
|
||||
modelEquipmentList.value=[]
|
||||
}
|
||||
@@ -103,8 +95,7 @@ const getTunnelInfo = () => {
|
||||
tunnelAlias: form.value.tunnelAlias,
|
||||
serialNumber: form.value.serialNumber,
|
||||
remarks: form.value.remarks,
|
||||
constructionLength: constructionLength.value,
|
||||
// constructionLength: form.value.constructionLength,
|
||||
constructionLength: form.value.constructionLength,
|
||||
tunnelLength: form.value.totalLength,
|
||||
isDefault: form.value.isDefault,
|
||||
modelEquipmentList: modelEquipmentList.value,
|
||||
|
||||
@@ -79,9 +79,9 @@
|
||||
<el-form-item label="隧道长度" prop="totalLength">
|
||||
<el-input type="number" v-model="form.totalLength" placeholder="请输入隧道长度"/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="施工长度" prop="constructionLength">-->
|
||||
<!-- <el-input type="number" v-model="form.constructionLength" placeholder="请输入施工长度"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="施工长度" prop="constructionLength">
|
||||
<el-input type="number" v-model="form.constructionLength" placeholder="请输入施工长度"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否默认">
|
||||
<el-radio-group v-model="form.isDefault">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
|
||||
Reference in New Issue
Block a user