test(测试电子围栏)
commit
3989f34994
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue