Compare commits

...

2 Commits

Author SHA1 Message Date
031026 2a9835745a Merge remote-tracking branch 'origin/master' 2024-06-03 21:27:23 +08:00
031026 3989f34994 test(测试电子围栏) 2024-06-03 21:27:10 +08:00
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.getConfigKey("sys.user.initPassword").then(response => {
this.initPassword = response.data.msg; this.initPassword = response.data.msg;
}); });
this.gerCompany()
}, },
methods: { methods: {
/** 查询用户列表 */ /** 查询用户列表 */
@ -513,12 +512,6 @@ export default {
this.deptOptions = response.data; this.deptOptions = response.data;
}); });
}, },
/** 获取公司列表 */
gerCompany(){
companyList().then(res=>{
this.companyList=res.data
})
},
// //
filterNode(value, data) { filterNode(value, data) {
if (!value) return true; if (!value) return true;

View File

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