| | |
| | | <Form-item label="购置年份"> |
| | | <Row> |
| | | <Col span="11"> |
| | | <Date-picker @on-change="change1" type="date" value="yyyy-MM-dd" placeholder="选择日期" v-model="carForm.buyYear"></Date-picker> |
| | | <Date-picker @on-change="change1" type="date" |
| | | value="yyyy-MM-dd" placeholder="选择日期" v-model="carForm.buyYear"></Date-picker> |
| | | </Col> |
| | | </Row> |
| | | </Form-item> |
| | |
| | | >提交</Button |
| | | > |
| | | </div> |
| | | </Modal> |
| | | <Modal :title="modalTitle" v-model="equipmentVisible" :mask-closable="false" :width="1200"> |
| | | <Table :loading="loading" border :columns="columns2" :data="data2" ref="table" |
| | | sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"> |
| | | |
| | | |
| | | </Table> |
| | | </Modal> |
| | | <!-- 菜单权限 --> |
| | | <Drawer |
| | |
| | | getCarList, |
| | | editCar, |
| | | deleteCar, |
| | | getEquipment, |
| | | } from "@/api/open"; |
| | | import util from "@/libs/util.js"; |
| | | export default { |
| | |
| | | sortType: "desc", |
| | | modalType: 0, |
| | | roleModalVisible: false, |
| | | equipmentVisible: false, |
| | | carModalVisible: false, |
| | | permModalVisible: false, |
| | | depModalVisible: false, |
| | |
| | | { |
| | | on: { |
| | | click: () => { |
| | | this.equipment(params.row); |
| | | }, |
| | | }, |
| | | }, |
| | | "设备" |
| | | ), |
| | | h("Divider", { |
| | | props: { |
| | | type: "vertical", |
| | | }, |
| | | }), |
| | | h( |
| | | "a", |
| | | { |
| | | on: { |
| | | click: () => { |
| | | this.removeCar(params.row); |
| | | }, |
| | | }, |
| | |
| | | }, |
| | | }, |
| | | ], |
| | | columns2: [ |
| | | { |
| | | type: "selection", |
| | | width: 60, |
| | | align: "center", |
| | | }, |
| | | { |
| | | type: "index", |
| | | width: 60, |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "设备类型", |
| | | key: "type", |
| | | width: 100, |
| | | sortable: true, |
| | | }, |
| | | { |
| | | title: "编号", |
| | | key: "code", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "状态", |
| | | key: "status", |
| | | width: 100, |
| | | sortable: true, |
| | | render: (h, params) => { |
| | | let re = ""; |
| | | if (params.row.status == 0) { |
| | | return h("div", [ |
| | | h("Badge", { |
| | | props: { |
| | | status: "success", |
| | | text: "正常", |
| | | }, |
| | | }), |
| | | ]); |
| | | } else if (params.row.status == 1) { |
| | | return h("div", [ |
| | | h("Badge", { |
| | | props: { |
| | | status: "error", |
| | | text: "移除", |
| | | }, |
| | | }), |
| | | ]); |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | title: "ip地址", |
| | | key: "ip", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "端口号", |
| | | key: "port", |
| | | width: 100, |
| | | sortable: true, |
| | | }, |
| | | { |
| | | title: "操作", |
| | | key: "action", |
| | | align: "center", |
| | | width: 280, |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h( |
| | | "a", |
| | | { |
| | | on: { |
| | | click: () => { |
| | | this.equipment(params.row); |
| | | }, |
| | | }, |
| | | }, |
| | | "设备" |
| | | ), |
| | | h("Divider", { |
| | | props: { |
| | | type: "vertical", |
| | | }, |
| | | }), |
| | | h( |
| | | "a", |
| | | { |
| | | on: { |
| | | click: () => { |
| | | this.removeCar(params.row); |
| | | }, |
| | | }, |
| | | }, |
| | | "移除车辆" |
| | | ), |
| | | h("Divider", { |
| | | props: { |
| | | type: "vertical", |
| | | }, |
| | | }), |
| | | h( |
| | | "a", |
| | | { |
| | | on: { |
| | | click: () => { |
| | | this.edit(params.row); |
| | | }, |
| | | }, |
| | | }, |
| | | "编辑" |
| | | ), |
| | | h("Divider", { |
| | | props: { |
| | | type: "vertical", |
| | | }, |
| | | }), |
| | | h( |
| | | "a", |
| | | { |
| | | on: { |
| | | click: () => { |
| | | this.remove(params.row); |
| | | }, |
| | | }, |
| | | }, |
| | | "删除" |
| | | ), |
| | | ]); |
| | | }, |
| | | }, |
| | | ], |
| | | data: [], |
| | | data2: [], |
| | | total: 0, |
| | | permData: [], |
| | | editRolePermId: "", |
| | |
| | | } |
| | | }); |
| | | }, |
| | | getEquipmentList() { |
| | | this.loading = true; |
| | | getEquipment(this.searchForm).then((res) => { |
| | | this.loading = false; |
| | | if (res.success) { |
| | | this.data2 = res.result.records; |
| | | this.total = res.result.total; |
| | | } |
| | | }); |
| | | }, |
| | | getPermList() { |
| | | this.treeLoading = true; |
| | | getAllPermissionList().then((res) => { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | equipment() { |
| | | this.getEquipmentList(); |
| | | this.modalType = 0; |
| | | this.modalTitle = "设备信息"; |
| | | this.$refs.carForm.resetFields(); |
| | | delete this.carForm.id; |
| | | this.equipmentVisible = true; |
| | | }, |
| | | addCar() { |
| | | this.modalType = 0; |
| | | this.modalTitle = "添加车辆"; |