Compare commits
2 Commits
c9b41247fa
...
2a9835745a
Author | SHA1 | Date |
---|---|---|
|
2a9835745a | |
|
3989f34994 |
|
@ -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;
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue