| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="归属部门" prop="deptId"> |
| | | <el-select v-model="queryParams.deptId" placeholder="请选择部门" clearable size="small"> |
| | | <el-option |
| | | v-for="dept in deptOptions" |
| | | :key="dept.deptId" |
| | | :label="dept.deptName" |
| | | :value="dept.deptId" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| | |
| | | <dict-tag :options="dict.type.sys_platform" :value="scope.row.platformCode"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="归属部门" align="center" prop="deptName" /> |
| | | <el-table-column label="状态" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="归属部门" prop="deptId"> |
| | | <el-select v-model="form.deptId" placeholder="请选择部门" clearable> |
| | | <el-option |
| | | v-for="dept in deptOptions" |
| | | :key="dept.deptId" |
| | | :label="dept.deptName" |
| | | :value="dept.deptId" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | |
| | | |
| | | <script> |
| | | import { listVehicle, getVehicle, delVehicle, addVehicle, updateVehicle } from "@/api/system/vehicle"; |
| | | import { listDept } from "@/api/system/dept"; |
| | | |
| | | export default { |
| | | name: "Vehicle", |
| | |
| | | total: 0, |
| | | // 车辆信息表格数据 |
| | | vehicleList: [], |
| | | // 部门选项 |
| | | deptOptions: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | |
| | | vehicleBrand: null, |
| | | vehicleModel: null, |
| | | status: null, |
| | | platformCode: null |
| | | platformCode: null, |
| | | deptId: null |
| | | }, |
| | | // 表单参数 |
| | | form: { |
| | |
| | | vehicleModel: null, |
| | | status: "0", |
| | | remark: null, |
| | | platformCode: null |
| | | platformCode: null, |
| | | deptId: null |
| | | }, |
| | | // 表单校验 |
| | | rules: { |
| | |
| | | ], |
| | | platformCode: [ |
| | | { required: true, message: "平台标识不能为空", trigger: "change" } |
| | | ], |
| | | deptId: [ |
| | | { required: true, message: "归属部门不能为空", trigger: "change" } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getDeptList(); |
| | | }, |
| | | methods: { |
| | | /** 查询车辆信息列表 */ |
| | |
| | | this.vehicleList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | /** 查询部门列表 */ |
| | | getDeptList() { |
| | | listDept().then(response => { |
| | | this.deptOptions = response.data; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | |
| | | vehicleModel: null, |
| | | status: "0", |
| | | remark: null, |
| | | platformCode: null |
| | | platformCode: null, |
| | | deptId: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |