Compare commits

..

No commits in common. "2a9835745a87499937e6936fc0163d414a652e1d" and "c9b41247fa57b0ba209ae4c0dfd8312e9c120673" have entirely different histories.

2 changed files with 36 additions and 42 deletions

View File

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

View File

@ -239,6 +239,12 @@
<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>
@ -250,7 +256,6 @@
<script>
import { listVehicle, getVehicle, delVehicle, addVehicle, updateVehicle } from "@/api/vehicle/vehicle";
import {getInfo} from "@/api/login";
export default {
name: "Vehicle",
@ -298,30 +303,21 @@ export default {
form: {},
//
rules: {
},
userList:null,
}
};
},
created() {
this.getList();
},
methods: {
/** 查询车辆列表 */
getList() {
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;
});
})
this.loading = true;
listVehicle(this.queryParams).then(response => {
this.vehicleList = response.data.rows;
this.total = response.data.total;
this.loading = false;
});
},
//
cancel() {
@ -389,32 +385,23 @@ export default {
},
/** 提交按钮 */
submitForm() {
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();
})
}
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) {