| | |
| | | class="grid-content" |
| | | style="font-weight: bold; font-size: 18px; margin-left: 5%" |
| | | > |
| | | <el-form :rules="routeTypeRules"> |
| | | <el-form-item |
| | | label="路由类型" |
| | | label-width="120" |
| | | prop="routerType" |
| | | > |
| | | <el-select v-model="routerType" filterable placeholder="请选择"> |
| | | <el-form :rules="routeTypeRules" :model="routerType"> |
| | | <el-form-item label="路由类型" label-width="120" prop="type"> |
| | | <el-select |
| | | v-model="routerType.type" |
| | | filterable |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in routerTypes" |
| | | :key="item.key" |
| | |
| | | active: 0, |
| | | showDetialBox: false, |
| | | routerTypes: [], |
| | | routerType: "", |
| | | routerType: { type: "" }, |
| | | deviceCodes: [], |
| | | filterDeviceCodes: [], |
| | | childDeviceCodes: [], |
| | |
| | | ], |
| | | }, |
| | | routeTypeRules: { |
| | | routerType: [ |
| | | { required: true, message: "请选择位置编号", trigger: "change" }, |
| | | type: [ |
| | | { required: true, message: "请选择路由类型", trigger: "change" }, |
| | | ], |
| | | }, |
| | | }; |
| | |
| | | methods: { |
| | | open() { |
| | | this.routerTypes = []; |
| | | this.routerType = ""; |
| | | this.routerType = { type: "" }; |
| | | this.deviceCode = ""; |
| | | this.deviceCodes = []; |
| | | this.filterDeviceCodes = []; |
| | |
| | | ]; |
| | | this.showDetialBox = true; |
| | | this.getData(); |
| | | this.$emit("parentCall", ($vue) => { |
| | | console.log($vue); |
| | | }); |
| | | }, |
| | | getData() { |
| | | this.http.post("/api/Router/GetBaseRouterInfo", {}, true).then((x) => { |
| | |
| | | }); |
| | | this.http |
| | | .post( |
| | | "/api/Router/AddRouters?routerType=" + this.routerType, |
| | | "/api/Router/AddRouters?routerType=" + this.routerType.type, |
| | | this.routers, |
| | | true |
| | | ) |