test(测试电子围栏)

master
031026 2024-06-02 22:46:25 +08:00
commit 3989f34994
2 changed files with 42 additions and 36 deletions

View File

@ -494,7 +494,6 @@ export default {
this.getConfigKey("sys.user.initPassword").then(response => {
this.initPassword = response.data.msg;
});
this.gerCompany()
},
methods: {
/** 查询用户列表 */
@ -513,12 +512,6 @@ export default {
this.deptOptions = response.data;
});
},
/** 获取公司列表 */
gerCompany(){
companyList().then(res=>{
this.companyList=res.data
})
},
//
filterNode(value, data) {
if (!value) return true;

View File

@ -239,12 +239,6 @@
<el-form-item label="车牌号码" prop="licenseNumber">
<el-input v-model="form.licenseNumber" placeholder="请输入车牌号码" />
</el-form-item>
<el-form-item label="持有者" prop="holder">
<el-input v-model="form.holder" placeholder="请输入持有者" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -256,6 +250,7 @@
<script>
import { listVehicle, getVehicle, delVehicle, addVehicle, updateVehicle } from "@/api/vehicle/vehicle";
import {getInfo} from "@/api/login";
export default {
name: "Vehicle",
@ -303,21 +298,30 @@ export default {
form: {},
//
rules: {
}
},
userList:null,
};
},
created() {
this.getList();
},
methods: {
/** 查询车辆列表 */
getList() {
this.loading = true;
listVehicle(this.queryParams).then(response => {
this.vehicleList = response.data.rows;
this.total = response.data.total;
this.loading = false;
});
getInfo().then(res=>{
this.userList=res.data.user.nickName
console.log(this.userList)
this.queryParams.holder=this.userList
this.loading = true;
console.log(this.queryParams)
listVehicle(this.queryParams).then(response => {
this.vehicleList = response.data.rows;
this.total = response.data.total;
this.loading = false;
});
})
},
//
cancel() {
@ -385,23 +389,32 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateVehicle(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addVehicle(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
getInfo().then(res=>{
this.userList=res.data.user.nickName
console.log(this.userList)
this.form.holder=this.userList
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateVehicle(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addVehicle(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
})
}
}
}
});
})
})
},
/** 删除按钮操作 */
handleDelete(row) {