| | |
| | | trigger: ["change", "blur"], |
| | | }, |
| | | ], |
| | | lockIp: [ |
| | | { |
| | | required: true, |
| | | message: "不能为空", |
| | | trigger: ["change", "blur"], |
| | | }, |
| | | { |
| | | validator: (rule, value, callback) => { |
| | | let reg = /^((25[0-5]|2[0-4][0-9]|1[0-9]{1,2}|[1-9]|[1-9][0-9]|0)\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{1,2}|[1-9]|[1-9][0-9]|0)$/; |
| | | |
| | | if (value && !reg.test(value)) { |
| | | callback(new Error("请输入正确的IP地址")); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: ["change", "blur"], |
| | | } |
| | | ], |
| | | // 经度 |
| | | longitude: [ |
| | | { |
| | |
| | | stationName1: stationName1.value, |
| | | stationName2: stationName2.value, |
| | | stationName3: stationName3.value, |
| | | stationName4: stationName4.value |
| | | stationName4: stationName4.value, |
| | | lockIp: '127.0.0.1', |
| | | stationId: '', |
| | | }); |
| | | |
| | | const layout = { |
| | |
| | | stationName2: formLock.stationName2, |
| | | stationName3: formLock.stationName3, |
| | | stationName4: formLock.stationName4, |
| | | lockIp: formLock.lockIp, |
| | | longitude: formLock.longitude || 0, |
| | | latitude: formLock.latitude || 0, |
| | | }; |
| | |
| | | stationName2: formLock.stationName2, |
| | | stationName3: formLock.stationName3, |
| | | stationName4: formLock.stationName4, |
| | | lockIp: formLock.lockIp, |
| | | longitude: formLock.longitude || 0, |
| | | latitude: formLock.latitude || 0, |
| | | stationId: formLock.stationId |
| | | }; |
| | | let loading = $loading(); |
| | | updateLock(params) |
| | |
| | | </el-row> |
| | | <el-row :gutter="layout.gutter"> |
| | | <el-col :span="24"> |
| | | <!-- Ip --> |
| | | <el-form-item label="机房Ip" label-position="right" prop="lockIp"> |
| | | <el-input v-model="formLock.lockIp" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="layout.gutter"> |
| | | <el-col :span="24"> |
| | | <!-- 地址 --> |
| | | <el-form-item label="地址" label-position="right" prop="lockAddress"> |
| | | <el-input v-model="formLock.lockAddress" /> |
| | |
| | | <el-col :span="24"> |
| | | <!-- 锁具安装位置 类型 --> |
| | | <el-form-item |
| | | label="锁具安装位置类型" |
| | | label="屏柜类型" |
| | | label-position="right" |
| | | prop="screenBoxType" |
| | | > |
| | |
| | | <el-col :span="24"> |
| | | <!-- 锁具安装位置 品牌 --> |
| | | <el-form-item |
| | | label="锁具安装位置品牌" |
| | | label="屏柜品牌" |
| | | label-position="right" |
| | | prop="screenBoxProduct" |
| | | > |