兴安优化-车场不重复添加设备
This commit is contained in:
@@ -42,3 +42,11 @@ export function delCarPark(id) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询车场下拉数据
|
||||
export function getCarParkSelect(id) {
|
||||
return request({
|
||||
url: '/system/carPark/getCarParkSelect/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -575,8 +575,10 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
if(this.form.value2!=null){
|
||||
this.form.segTime=this.form.value2[0]+"-"+this.form.value2[1];
|
||||
if (this.form.value2 != null) {
|
||||
this.form.segTime = this.form.value2[0] + "-" + this.form.value2[1];
|
||||
} else {
|
||||
delete this.form.segTime;
|
||||
}
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
|
||||
@@ -67,6 +67,13 @@
|
||||
<el-table-column label="所属空间" align="center" prop="spaceName" />
|
||||
<el-table-column label="车位总数" align="center" prop="carsNum" />
|
||||
<el-table-column label="余位数" align="center" prop="surplusNum" />
|
||||
<el-table-column label="满车位是否自动锁杆" align="center" prop="autoLock" min-width="100">
|
||||
<template v-slot="scope">
|
||||
<el-switch :value="scope.row.autoLock === 1" disabled>
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上级车场" align="center" prop="parentIdName" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
@@ -120,6 +127,26 @@
|
||||
<el-input-number v-model="form.surplusNum" placeholder="请输入余位数" :min="0"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="上级车场" prop="parentId">
|
||||
<el-select v-model="form.parentId" placeholder="请选择" clearable >
|
||||
<el-option
|
||||
v-for="item in parentIds"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="满车位是否自动锁杆" prop="autoLock" label-width="150px">
|
||||
<el-switch v-model="form.autoLock"
|
||||
:active-value=1
|
||||
:inactive-value=0>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" >
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
@@ -182,7 +209,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCarPark, getCarPark, delCarPark, addCarPark, updateCarPark } from "@/api/vehicle/carPark";
|
||||
import {listCarPark, getCarPark, delCarPark, addCarPark, updateCarPark, getCarParkSelect} from "@/api/vehicle/carPark";
|
||||
import {alllistEquipment} from "@/api/system/equipment";
|
||||
import {spaceTreeSelect} from "@/api/system/space";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
@@ -214,6 +241,7 @@ export default {
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
parentIds: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@@ -322,7 +350,16 @@ export default {
|
||||
this.open = true;
|
||||
this.title = "修改车场信息";
|
||||
});
|
||||
|
||||
getCarParkSelect(id).then(response => {
|
||||
this.parentIds = response.data;
|
||||
this.parentIds.push({
|
||||
id: 0,
|
||||
name: "无",
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
|
||||
@@ -41,6 +41,11 @@
|
||||
label="已下发"
|
||||
value="1"
|
||||
></el-option>
|
||||
<el-option
|
||||
key="2"
|
||||
label="已删除"
|
||||
value="2"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -103,7 +108,7 @@
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.sync==0">未下发</span>
|
||||
<span v-if="scope.row.sync==1">已下发</span>
|
||||
<span v-if="scope.row.sync==2">已下发</span>
|
||||
<span v-if="scope.row.sync==2">已删除</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
|
||||
Reference in New Issue
Block a user