292 lines
29 KiB
JavaScript
292 lines
29 KiB
JavaScript
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-abce4b42", "chunk-2d0aa9e6"], { "127f": function(e, t, r) {
|
|
"use strict";
|
|
r.d(t, "a", (function() {
|
|
return a;
|
|
}));
|
|
var a = function() {
|
|
function e2() {
|
|
return (65536 * (1 + Math.random()) | 0).toString(16).substring(1);
|
|
}
|
|
return "".concat(+/* @__PURE__ */ new Date(), "_").concat(e2()).concat(e2());
|
|
};
|
|
}, "5f23": function(e, t, r) {
|
|
"use strict";
|
|
r("bd40");
|
|
}, "66b4": function(e, t, r) {
|
|
"use strict";
|
|
r.d(t, "e", (function() {
|
|
return i;
|
|
})), r.d(t, "f", (function() {
|
|
return s;
|
|
})), r.d(t, "d", (function() {
|
|
return o;
|
|
})), r.d(t, "h", (function() {
|
|
return n;
|
|
})), r.d(t, "b", (function() {
|
|
return l;
|
|
})), r.d(t, "a", (function() {
|
|
return c;
|
|
})), r.d(t, "c", (function() {
|
|
return u;
|
|
})), r.d(t, "i", (function() {
|
|
return d;
|
|
})), r.d(t, "g", (function() {
|
|
return m;
|
|
}));
|
|
var a = r("b775");
|
|
function i(e2) {
|
|
return Object(a["a"])({ url: "/appproject/CarFile/pageList", method: "post", data: e2 });
|
|
}
|
|
function s(e2) {
|
|
return Object(a["a"])({ url: "/appproject/CarFile/update", method: "post", data: e2 });
|
|
}
|
|
function o(e2) {
|
|
return Object(a["a"])({ url: "/appproject/CarFile/create", method: "post", data: e2 });
|
|
}
|
|
function n(e2) {
|
|
return Object(a["a"])({ url: "/project/houseMember/findByHouseId", method: "post", data: e2 });
|
|
}
|
|
function l(e2) {
|
|
return Object(a["a"])({ url: "/appproject/CarPlaceRecord/pageList", method: "post", data: e2 });
|
|
}
|
|
function c(e2) {
|
|
return Object(a["a"])({ url: "/appproject/CarPlaceRecord/create", method: "post", data: e2 });
|
|
}
|
|
function u(e2) {
|
|
return Object(a["a"])({ url: "/appproject/CarPlaceRecord/update", method: "post", data: e2 });
|
|
}
|
|
function d(e2, t2) {
|
|
return Object(a["a"])({ url: "/appproject/CarPlaceRecord/importExcel/".concat(t2), method: "post", isReturnResponse: true, responseType: "blob", headers: { "Content-Type": "multipart/form-data;charset=UTF-8" }, data: e2 });
|
|
}
|
|
function m(e2, t2) {
|
|
return Object(a["a"])({ url: "/appproject/CarFile/importExcel/".concat(t2), method: "post", isReturnResponse: true, responseType: "blob", headers: { "Content-Type": "multipart/form-data;charset=UTF-8" }, data: e2 });
|
|
}
|
|
}, bd40: function(e, t, r) {
|
|
}, ec82: function(e, t, r) {
|
|
"use strict";
|
|
r.r(t);
|
|
var a = function() {
|
|
var e2 = this, t2 = e2.$createElement, r2 = e2._self._c || t2;
|
|
return r2("div", { staticClass: "workPointsManage" }, [r2("div", { staticClass: "workPointsRuleList" }, [r2("el-card", { staticClass: "box-card secarch-box" }, [r2("el-row", [r2("el-col", { staticClass: "elCol", attrs: { span: 5 } }, [r2("el-select", { attrs: { clearable: "", placeholder: "请选择管理区" }, on: { change: function(t3) {
|
|
return e2.selectArea(t3, "query");
|
|
} }, model: { value: e2.query.precinctId, callback: function(t3) {
|
|
e2.$set(e2.query, "precinctId", t3);
|
|
}, expression: "query.precinctId" } }, e2._l(e2.areaOptions, (function(e3, t3) {
|
|
return r2("el-option", { key: t3, attrs: { label: e3.name, value: e3.id } });
|
|
})), 1)], 1), e2._v(" "), r2("el-col", { staticClass: "elCol", attrs: { span: 5 } }, [r2("el-select", { attrs: { clearable: "", placeholder: "请选择楼栋" }, on: { change: function(t3) {
|
|
return e2.selectBuild(t3, "query");
|
|
} }, model: { value: e2.query.buildingId, callback: function(t3) {
|
|
e2.$set(e2.query, "buildingId", t3);
|
|
}, expression: "query.buildingId" } }, e2._l(e2.buildingList, (function(e3, t3) {
|
|
return r2("el-option", { key: t3, attrs: { label: e3.name, value: e3.id } });
|
|
})), 1)], 1), e2._v(" "), r2("el-col", { staticClass: "elCol", attrs: { span: 5 } }, [r2("el-select", { attrs: { clearable: "", placeholder: "请选择单元" }, on: { change: function(t3) {
|
|
return e2.selectUnit(t3, "query");
|
|
} }, model: { value: e2.query.unitId, callback: function(t3) {
|
|
e2.$set(e2.query, "unitId", t3);
|
|
}, expression: "query.unitId" } }, e2._l(e2.unitOptions, (function(e3, t3) {
|
|
return r2("el-option", { key: t3, attrs: { label: e3.name, value: e3.id } });
|
|
})), 1)], 1), e2._v(" "), r2("el-col", { staticClass: "elCol", attrs: { span: 5 } }, [r2("el-input", { attrs: { placeholder: "请输入房间名" }, model: { value: e2.query.roomNum, callback: function(t3) {
|
|
e2.$set(e2.query, "roomNum", t3);
|
|
}, expression: "query.roomNum" } })], 1)], 1), e2._v(" "), r2("el-row", [r2("el-col", { staticClass: "elCol", attrs: { span: 5 } }, [r2("el-input", { attrs: { type: "text", clearable: "", placeholder: "车牌号" }, model: { value: e2.query.carNumber, callback: function(t3) {
|
|
e2.$set(e2.query, "carNumber", "string" === typeof t3 ? t3.trim() : t3);
|
|
}, expression: "query.carNumber" } })], 1), e2._v(" "), r2("el-col", { staticClass: "elCol", attrs: { span: 5 } }, [r2("el-select", { attrs: { clearable: "", placeholder: "请选择状态" }, model: { value: e2.query.status, callback: function(t3) {
|
|
e2.$set(e2.query, "status", t3);
|
|
}, expression: "query.status" } }, e2._l(e2.statusList, (function(e3) {
|
|
return r2("el-option", { key: e3.value, attrs: { label: e3.label, value: e3.value } });
|
|
})), 1)], 1), e2._v(" "), r2("el-col", { staticClass: "elCol", attrs: { span: 4 } }, [r2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], on: { click: function(t3) {
|
|
return e2.resetForm();
|
|
} } }, [e2._v("重置")]), e2._v(" "), r2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "primary" }, on: { click: e2.onSearch } }, [e2._v("查询")])], 1)], 1)], 1), e2._v(" "), r2("el-card", { staticClass: "box-card", staticStyle: { "margin-top": "15px" } }, [r2("div", { staticClass: "planLst", attrs: { slot: "header" }, slot: "header" }, [r2("span", { staticClass: "planTitle" }, [e2._v("车辆信息列表")]), e2._v(" "), r2("div", { staticStyle: { display: "flex" } }, [r2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], staticClass: "el-icon-plus", attrs: { type: "primary" }, on: { click: e2.addCar } }, [e2._v("添加")]), e2._v(" "), r2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "primary" }, on: { click: e2.downloadCar } }, [e2._v("导出模版")]), e2._v(" "), r2("el-upload", { ref: "upload", staticStyle: { "margin-left": "10px" }, attrs: { "auto-upload": true, "show-file-list": false, accept: ".xls,.xlsx", "http-request": e2.importData, loading: e2.importDataBtn, action: "" } }, [r2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "primary" } }, [e2._v("导入数据")])], 1)], 1)]), e2._v(" "), r2("el-table", { staticStyle: { width: "100%", "margin-top": "15px" }, attrs: { border: "", data: e2.tableData, "header-cell-style": e2.headClass } }, [r2("el-table-column", { attrs: { label: "#", align: "center", "min-width": "50", fixed: "", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
|
|
return [r2("span", [e2._v(e2._s(t3.$index + (e2.query.pageNumber - 1) * e2.query.pageSize + 1) + "\n ")])];
|
|
} }]) }), e2._v(" "), r2("el-table-column", { attrs: { align: "center", prop: "precinctName", label: "管理区", "min-width": "80", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
|
|
return [r2("span", [e2._v(e2._s(t3.row.precinctName))])];
|
|
} }]) }), e2._v(" "), r2("el-table-column", { attrs: { align: "center", prop: "buildingName", label: "楼栋", "min-width": "120", "show-overflow-tooltip": "" } }), e2._v(" "), r2("el-table-column", { attrs: { align: "center", prop: "unitName", label: "单元", "min-width": "80", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
|
|
return [e2._v("\n " + e2._s(t3.row.unitName) + "\n ")];
|
|
} }]) }), e2._v(" "), r2("el-table-column", { attrs: { align: "center", prop: "roomNum", label: "房间号", "min-width": "100", "show-overflow-tooltip": "" } }), e2._v(" "), r2("el-table-column", { attrs: { align: "center", prop: "carNumber", label: "车牌号", "min-width": "130", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
|
|
return [e2._v("\n " + e2._s(t3.row.carNumber) + "\n ")];
|
|
} }]) }), e2._v(" "), r2("el-table-column", { attrs: { align: "center", prop: "memberName", label: "车辆所属人", "min-width": "150", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
|
|
return [r2("span", [e2._v(e2._s(t3.row.memberName))])];
|
|
} }]) }), e2._v(" "), r2("el-table-column", { attrs: { align: "center", prop: "mobile", label: "联系电话", "min-width": "100", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
|
|
return [r2("span", [e2._v(e2._s(t3.row.mobile))])];
|
|
} }]) }), e2._v(" "), r2("el-table-column", { attrs: { align: "center", prop: "status", label: "状态", "min-width": "100", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
|
|
return [r2("span", [e2._v(e2._s(0 == t3.row.status ? "启用" : "禁用"))])];
|
|
} }]) }), e2._v(" "), r2("el-table-column", { attrs: { align: "center", prop: "updateTime", label: "更新时间", "min-width": "180", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
|
|
return [r2("span", [e2._v(e2._s(t3.row.updateTime))])];
|
|
} }]) }), e2._v(" "), r2("el-table-column", { attrs: { align: "center", fixed: "right", label: "操作", "min-width": "140", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
|
|
return [r2("span", [r2("el-button", { attrs: { type: "text" }, on: { click: function(r3) {
|
|
return e2.detailsClick(t3.row, "view");
|
|
} } }, [e2._v("查看")])], 1), e2._v(" "), r2("span", [r2("el-button", { attrs: { type: "text" }, on: { click: function(r3) {
|
|
return e2.detailsClick(t3.row, "edit");
|
|
} } }, [e2._v("编辑")])], 1), e2._v(" "), r2("span", [r2("el-button", { attrs: { type: "text" }, on: { click: function(r3) {
|
|
return e2.changeStatus(t3.row);
|
|
} } }, [e2._v(e2._s(0 == t3.row.status ? "禁用" : "启用"))])], 1)];
|
|
} }]) })], 1), e2._v(" "), r2("div", { staticClass: "paginations" }, [r2("el-pagination", { attrs: { background: "", "current-page": e2.query.pageNumber, "page-sizes": [10, 30, 50, 100, 200], "page-size": e2.query.pageSize, layout: "total, sizes, prev, pager, next, jumper", total: e2.pageTotal }, on: { "update:currentPage": function(t3) {
|
|
return e2.$set(e2.query, "pageNumber", t3);
|
|
}, "update:current-page": function(t3) {
|
|
return e2.$set(e2.query, "pageNumber", t3);
|
|
}, "size-change": e2.handleSizeChange, "current-change": e2.handleCurrentChange } })], 1)], 1)], 1), e2._v(" "), r2("el-dialog", { attrs: { title: e2.title, visible: e2.show, "close-on-click-modal": false, "close-on-press-escape": false, width: "70%" }, on: { "update:visible": function(t3) {
|
|
e2.show = t3;
|
|
} } }, [r2("el-form", { ref: "carForm", attrs: { model: e2.carForm, rules: e2.carRule, "label-width": "100px" } }, [r2("div", { staticClass: "form-box" }, [r2("div", { staticClass: "left" }, [r2("el-form-item", { attrs: { label: "车牌号", prop: "carNumber" } }, [r2("el-input", { attrs: { disabled: e2.carNumberDisabled, placeholder: "请输入车牌号" }, model: { value: e2.carForm.carNumber, callback: function(t3) {
|
|
e2.$set(e2.carForm, "carNumber", t3);
|
|
}, expression: "carForm.carNumber" } })], 1), e2._v(" "), r2("el-form-item", { attrs: { label: "管理区", prop: "precinctId" } }, [r2("el-select", { attrs: { disabled: e2.carFormDisabled, placeholder: "请选择管理区", clearable: "" }, on: { change: function(t3) {
|
|
return e2.selectArea(t3, "carForm");
|
|
} }, model: { value: e2.carForm.precinctId, callback: function(t3) {
|
|
e2.$set(e2.carForm, "precinctId", t3);
|
|
}, expression: "carForm.precinctId" } }, e2._l(e2.areaOptions2, (function(e3, t3) {
|
|
return r2("el-option", { key: t3, attrs: { label: e3.name, value: e3.id } });
|
|
})), 1)], 1), e2._v(" "), r2("el-form-item", { attrs: { label: "单元", prop: "unitId" } }, [r2("el-select", { attrs: { disabled: e2.carFormDisabled, placeholder: "请选择单元", clearable: "" }, on: { change: function(t3) {
|
|
return e2.selectUnit(t3, "carForm");
|
|
} }, model: { value: e2.carForm.unitId, callback: function(t3) {
|
|
e2.$set(e2.carForm, "unitId", t3);
|
|
}, expression: "carForm.unitId" } }, e2._l(e2.unitOptions2, (function(e3, t3) {
|
|
return r2("el-option", { key: t3, attrs: { label: e3.name, value: e3.id } });
|
|
})), 1)], 1), e2._v(" "), r2("el-form-item", { attrs: { label: "车辆所属人", prop: "memberId" } }, [r2("el-select", { attrs: { disabled: e2.carFormDisabled, placeholder: "请选择车辆所属人", clearable: "" }, on: { change: e2.selectMember }, model: { value: e2.carForm.memberId, callback: function(t3) {
|
|
e2.$set(e2.carForm, "memberId", t3);
|
|
}, expression: "carForm.memberId" } }, e2._l(e2.userList2, (function(e3, t3) {
|
|
return r2("el-option", { key: t3, attrs: { label: e3.realName, value: e3.id } });
|
|
})), 1)], 1), e2._v(" "), "查看车辆信息" == e2.title ? r2("el-form-item", { attrs: { label: "创建人" } }, [r2("el-input", { attrs: { disabled: e2.carNumberDisabled }, model: { value: e2.carForm.createName, callback: function(t3) {
|
|
e2.$set(e2.carForm, "createName", t3);
|
|
}, expression: "carForm.createName" } })], 1) : e2._e(), e2._v(" "), "查看车辆信息" == e2.title ? r2("el-form-item", { attrs: { label: "创建时间" } }, [r2("el-input", { attrs: { disabled: e2.carNumberDisabled }, model: { value: e2.carForm.createTime, callback: function(t3) {
|
|
e2.$set(e2.carForm, "createTime", t3);
|
|
}, expression: "carForm.createTime" } })], 1) : e2._e(), e2._v(" "), r2("el-form-item", { attrs: { label: "状态", prop: "status" } }, [r2("el-switch", { attrs: { disabled: e2.carFormDisabled, "active-color": "#169bd5", "inactive-color": "#8c8c8c", "active-value": 0, "inactive-value": 1 }, model: { value: e2.carForm.status, callback: function(t3) {
|
|
e2.$set(e2.carForm, "status", t3);
|
|
}, expression: "carForm.status" } }), e2._v(" "), r2("span", [e2._v(e2._s(0 == e2.carForm.status ? "启用" : "禁用"))])], 1)], 1), e2._v(" "), r2("div", { staticClass: "right" }, [r2("el-form-item", { attrs: { label: "车型号", prop: "carModel" } }, [r2("el-input", { attrs: { disabled: e2.carFormDisabled, clearable: "", placeholder: "请输入车型号" }, model: { value: e2.carForm.carModel, callback: function(t3) {
|
|
e2.$set(e2.carForm, "carModel", t3);
|
|
}, expression: "carForm.carModel" } })], 1), e2._v(" "), r2("el-form-item", { attrs: { label: "楼栋", prop: "buildingId" } }, [r2("el-select", { attrs: { disabled: e2.carFormDisabled, placeholder: "请选择房屋楼栋", clearable: "" }, on: { change: function(t3) {
|
|
return e2.selectBuild(t3, "carForm");
|
|
} }, model: { value: e2.carForm.buildingId, callback: function(t3) {
|
|
e2.$set(e2.carForm, "buildingId", t3);
|
|
}, expression: "carForm.buildingId" } }, e2._l(e2.buildingList2, (function(e3, t3) {
|
|
return r2("el-option", { key: t3, attrs: { label: e3.name, value: e3.id } });
|
|
})), 1)], 1), e2._v(" "), r2("el-form-item", { attrs: { label: "房间", prop: "houseId" } }, [r2("el-select", { attrs: { disabled: e2.carFormDisabled, "value-key": "id", placeholder: "请选择房间", clearable: "" }, on: { change: function(t3) {
|
|
return e2.selectHouse(t3, 1);
|
|
} }, model: { value: e2.carForm.houseId, callback: function(t3) {
|
|
e2.$set(e2.carForm, "houseId", t3);
|
|
}, expression: "carForm.houseId" } }, e2._l(e2.homeList2, (function(e3, t3) {
|
|
return r2("el-option", { key: t3, attrs: { label: e3.roomNum, value: e3.id } });
|
|
})), 1)], 1), e2._v(" "), r2("el-form-item", { attrs: { label: "联系电话", prop: "mobile" } }, [r2("el-input", { attrs: { disabled: true, clearable: "", placeholder: "请输入联系电话" }, model: { value: e2.carForm.mobile, callback: function(t3) {
|
|
e2.$set(e2.carForm, "mobile", t3);
|
|
}, expression: "carForm.mobile" } })], 1), e2._v(" "), "查看车辆信息" == e2.title ? r2("el-form-item", { attrs: { label: "更新时间" } }, [r2("el-input", { attrs: { disabled: e2.carNumberDisabled }, model: { value: e2.carForm.updateTime, callback: function(t3) {
|
|
e2.$set(e2.carForm, "updateTime", t3);
|
|
}, expression: "carForm.updateTime" } })], 1) : e2._e(), e2._v(" "), r2("div", { staticClass: "upload-box" }, [r2("span", [e2._v("行驶证: ")]), e2._v(" "), r2("AliOSSUpload", { attrs: { allowFileType: e2.allowFileType1, showFileList: false, fileList: e2.drivingLicenseSrcList, disabled: e2.carFormDisabled, limit: 1 }, on: { getUploadData: function(t3) {
|
|
return e2.getUploadData(t3, "drivingLicense");
|
|
} } }), e2._v(" "), r2("span", { staticStyle: { margin: "0 30px" } }, [e2._v("驾驶证: ")]), e2._v(" "), r2("AliOSSUpload", { attrs: { disabled: e2.carFormDisabled, allowFileType: e2.allowFileType1, showFileList: false, fileList: e2.steerLicenseSrcList, limit: 1 }, on: { getUploadData: function(t3) {
|
|
return e2.getUploadData(t3, "steerLicense");
|
|
} } })], 1)], 1)]), e2._v(" "), r2("div", { staticClass: "close-box" }, ["添加车辆信息" == e2.title || "编辑车辆信息" == e2.title ? r2("el-button", { attrs: { type: "primary" }, on: { click: e2.saveCar } }, [e2._v("保 存")]) : e2._e(), e2._v(" "), r2("el-button", { on: { click: e2.carCancel } }, [e2._v("取 消")])], 1)])], 1)], 1);
|
|
}, i = [], s = r("2b74"), o = r("8988"), n = r("66b4"), l = { components: { AliOSSUpload: o["a"] }, data: function() {
|
|
return { title: "添加车辆信息", statusList: [{ label: "启用", value: 0 }, { label: "禁用", value: 1 }], query: { precinctId: "", buildingId: "", unitId: "", houseId: "", carNumber: "", status: "", roomNum: "", companyId: this.$store.state.companyId, projectUuid: this.$store.state.community_uuid, pageNumber: 1, pageSize: 10 }, carForm: { precinctName: "", unitName: "", roomNum: "", memberName: "", buildingName: "", carNumber: "", precinctId: "", buildingId: "", unitId: "", houseId: "", status: 0, memberId: "", mobile: "", carModel: "" }, tableData: [], pageTotal: 0, areaOptions: [], buildingList: [], unitOptions: [], homeList: [], userList: [], areaOptions2: [], buildingList2: [], unitOptions2: [], homeList2: [], userList2: [], show: false, carNumberDisabled: false, carFormDisabled: false, importDataBtn: false, carRule: { carNumber: [{ required: true, message: "请填写车牌号", trigger: "blur" }, { pattern: /^[\u4e00-\u9fa5]{1}[A-Z]{1}[A-Z_0-9]{5}$/, message: "车牌号格式错误", trigger: "blur" }], precinctId: [{ required: true, message: "请选择管理区", trigger: "change" }], unitId: [{ required: true, message: "请选择单元", trigger: "change" }], memberId: [{ required: true, message: "请选择车辆所属人", trigger: "change" }], houseId: [{ required: true, message: "请选择房间", trigger: "change" }], buildingId: [{ required: true, message: "请选择房屋楼栋", trigger: "change" }], mobile: [{ required: true, message: "请输入联系人电话", trigger: "change" }] }, allowFileType1: ["image"], steerLicenseSrcList: [], drivingLicenseSrcList: [], cloneObj: {} };
|
|
}, mounted: function() {
|
|
this.headClass(), this.getlistData(), this.getAreaOptions();
|
|
}, methods: { downloadImportDetailes: function(e2) {
|
|
var t2 = "application/vnd.ms-excel", r2 = new Blob([e2], { type: t2 }), a2 = "车辆信息导入失败信息.xls";
|
|
if (window.navigator.msSaveOrOpenBlob) navigator.msSaveBlob(r2);
|
|
else {
|
|
var i2 = document.createElement("a");
|
|
i2.download = a2, i2.style.display = "none", i2.href = URL.createObjectURL(r2), document.body.appendChild(i2), i2.click(), document.body.removeChild(i2);
|
|
}
|
|
}, importData: function(e2) {
|
|
var t2 = this, r2 = e2.file, a2 = r2.size / 1024 / 1024 < 20, i2 = r2.name.lastIndexOf("."), s2 = r2.name.length, o2 = r2.name.substring(i2 + 1, s2);
|
|
if ("xls" == o2 || "xlsx" == o2) if (a2) {
|
|
var l2 = new FormData();
|
|
this.fileName = r2.name, l2.append("file", r2, r2.name);
|
|
var c2 = "".concat(this.$store.state.community_uuid, "/").concat(this.$store.state.user.userInfo.memberId);
|
|
this.importDataBtn = true, Object(n["g"])(l2, c2).then((function(e3) {
|
|
var r3 = e3.headers, a3 = e3.data;
|
|
if (r3.count) {
|
|
var i3 = JSON.parse(r3.count);
|
|
0 == i3.code ? i3.errorCount > 0 ? (t2.$message({ message: "上传结果:总条数".concat(i3.totalCount, "条,成功").concat(i3.successCount, "条,失败").concat(i3.errorCount, "条。"), type: "warning" }), t2.downloadImportDetailes(a3), t2.query.pageNumber = 1, t2.getlistData()) : (t2.$message({ message: "导入数据成功!", type: "success" }), t2.query.pageNumber = 1, t2.getlistData(), t2.alert()) : t2.$message({ message: "数据导入失败,请检查模板数据格式是否规范!", type: "error" }), t2.importDataBtn = false;
|
|
} else t2.$message({ message: "数据导入失败,请检查模板数据格式是否规范!", type: "error" }), t2.importDataBtn = false;
|
|
}));
|
|
} else this.$message("上传文件大小不能超过20M!");
|
|
else this.$message("只能上传Excel文件!");
|
|
}, downloadCar: function() {
|
|
var e2 = "/static/template/vehicleFileTemplate.xlsx", t2 = "车辆档案导入模板.xlsx", r2 = document.createElement("a");
|
|
r2.setAttribute("type", "download"), r2.setAttribute("download", t2), r2.style.display = "none", r2.href = e2, document.body.appendChild(r2), r2.click(), document.body.removeChild(r2);
|
|
}, selectHouse: function(e2, t2) {
|
|
var r2 = this;
|
|
Object(s["E"])({ id: e2 }).then((function(e3) {
|
|
r2.userList2 = e3.data;
|
|
})), 1 == t2 && (this.carForm.roomNum = this.homeList2.find((function(t3) {
|
|
return t3.id == e2;
|
|
})).roomNum, this.carForm.memberId = "");
|
|
}, saveCar: function() {
|
|
var e2 = this;
|
|
this.$refs["carForm"].validate((function(t2) {
|
|
t2 && (e2.carForm.projectUuid = e2.$store.state.community_uuid, "添加车辆信息" == e2.title ? (e2.carForm.createName = e2.$store.state.user.name, Object(n["d"])(e2.carForm).then((function(t3) {
|
|
0 == t3.code && (e2.show = false, e2.$message.success("保存成功"), e2.getlistData(), e2.$refs.carForm.resetFields());
|
|
}))) : "编辑车辆信息" == e2.title && Object(n["f"])(e2.carForm).then((function(t3) {
|
|
0 == t3.code && (e2.show = false, e2.$message.success("保存成功"), e2.getlistData(), e2.$refs.carForm.resetFields());
|
|
})));
|
|
}));
|
|
}, carCancel: function() {
|
|
this.carForm.precinctName = "", this.carForm.unitName = "", this.carForm.roomNum = "", this.carForm.memberName = "", this.carForm.buildingName = "", this.carForm.carNumber = "", this.carForm.precinctId = "", this.carForm.buildingId = "", this.carForm.unitId = "", this.carForm.status = 0, this.carForm.memberId = "", this.carForm.mobile = "", this.carForm.carModel = "", this.carForm.houseId = "", this.show = false, this.drivingLicenseSrcList = [], this.steerLicenseSrcList = [];
|
|
}, selectMember: function(e2) {
|
|
this.carForm.mobile = this.userList2.find((function(t2) {
|
|
return t2.id == e2;
|
|
})).mobile, this.carForm.memberName = this.userList2.find((function(t2) {
|
|
return t2.id == e2;
|
|
})).realName;
|
|
}, getUploadData: function(e2, t2) {
|
|
var r2 = [];
|
|
e2 && e2.length > 0 ? e2.forEach((function(e3) {
|
|
r2.push(e3.filePath);
|
|
})) : "drivingLicense" == t2 ? this.drivingLicenseSrcList = [] : this.steerLicenseSrcList = [], this.carForm[t2] = r2.join(",");
|
|
}, detailsClick: function(e2, t2) {
|
|
this.getHome(e2.unitId, 2), this.drivingLicenseSrcList = [], this.steerLicenseSrcList = [], Object.assign(this.carForm, e2), this.getBuilding(e2.buildingId, 2), this.getUnit(e2.buildingId, 2), this.selectHouse(e2.houseId, 2), "view" == t2 ? (this.title = "查看车辆信息", this.carNumberDisabled = true, this.carFormDisabled = true, this.carForm.drivingLicense && (this.drivingLicenseSrcList = [{ url: this.carForm.drivingLicense }]), this.carForm.steerLicense && (this.steerLicenseSrcList = [{ url: this.carForm.steerLicense }])) : "edit" == t2 && (this.title = "编辑车辆信息", this.carNumberDisabled = true, this.carFormDisabled = false, this.carForm.drivingLicense ? this.drivingLicenseSrcList = [{ url: this.carForm.drivingLicense }] : this.drivingLicenseSrcList = [], this.carForm.steerLicense ? this.steerLicenseSrcList = [{ url: this.carForm.steerLicense }] : this.steerLicenseSrcList = []), this.show = true;
|
|
}, addCar: function() {
|
|
this.title = "添加车辆信息", this.carForm.precinctName = "", this.carForm.unitName = "", this.carForm.roomNum = "", this.carForm.memberName = "", this.carForm.buildingName = "", this.carForm.carNumber = "", this.carForm.precinctId = "", this.carForm.buildingId = "", this.carForm.unitId = "", this.carForm.status = 0, this.carForm.memberId = "", this.carForm.mobile = "", this.carForm.carModel = "", this.carForm.houseId = "", this.carNumberDisabled = false, this.carFormDisabled = false, this.show = true, this.drivingLicenseSrcList = [], this.steerLicenseSrcList = [];
|
|
}, changeStatus: function(e2) {
|
|
var t2 = this;
|
|
0 == e2.status ? e2.status = 1 : e2.status = 0, Object(n["f"])(e2).then((function(e3) {
|
|
0 == e3.code && t2.$message.success("修改成功");
|
|
}));
|
|
}, getAreaOptions: function() {
|
|
var e2 = this, t2 = { projectUuid: this.$store.state.community_uuid, pageNumber: -1, pageSize: -1 };
|
|
Object(s["f"])(t2).then((function(t3) {
|
|
e2.areaOptions = t3.data, e2.areaOptions2 = t3.data;
|
|
}));
|
|
}, selectArea: function(e2, t2) {
|
|
this.userList = [], this.buildingList = [], this.unitOptions = [], this.homeList = [], this.userList2 = [], this.buildingList2 = [], this.unitOptions2 = [], this.homeList2 = [], "query" == t2 ? (this.query.buildingId = "", this.query.unitId = "", this.query.houseId = "", this.getBuilding(e2, 1)) : (this.carForm.buildingId = "", this.carForm.unitId = "", this.carForm.houseId = "", this.carForm.memberId = "", this.carForm.mobile = "", this.carForm.precinctName = this.areaOptions2.find((function(t3) {
|
|
return t3.id == e2;
|
|
})).name, this.getBuilding(e2, 2));
|
|
}, getBuilding: function(e2, t2) {
|
|
var r2 = this;
|
|
Object(s["x"])({ precinctId: e2, projectCode: this.$store.state.community_uuid, projectName: this.$store.state.community_name, pageNumber: -1, pageSize: -1 }).then((function(e3) {
|
|
1 == t2 ? r2.buildingList = e3.data : r2.buildingList2 = e3.data;
|
|
}));
|
|
}, selectBuild: function(e2, t2) {
|
|
"query" == t2 ? (this.query.unitId = "", this.query.houseId = "", this.getUnit(e2, 1)) : (this.carForm.unitId = "", this.carForm.houseId = "", this.carForm.memberId = "", this.carForm.mobile = "", this.carForm.buildingName = this.buildingList2.find((function(t3) {
|
|
return t3.id == e2;
|
|
})).name, this.getUnit(e2, 2)), this.unitOptions = [], this.homeList = [], this.unitOptions2 = [], this.homeList2 = [];
|
|
}, getUnit: function(e2, t2) {
|
|
var r2 = this;
|
|
Object(s["mb"])({ pageNumber: -1, pageSize: -1, projectCode: this.$store.state.community_uuid, buildingId: e2 }).then((function(e3) {
|
|
1 == t2 ? r2.unitOptions = e3.data.records : r2.unitOptions2 = e3.data.records;
|
|
}));
|
|
}, selectUnit: function(e2, t2) {
|
|
this.homeList = [], "query" == t2 ? (this.query.houseId = "", this.getHome(e2, 1)) : (this.carForm.houseId = "", this.carForm.memberId = "", this.carForm.mobile = "", this.carForm.unitName = this.unitOptions2.find((function(t3) {
|
|
return t3.id == e2;
|
|
})).name, this.getHome(e2, 2));
|
|
}, getHome: function(e2, t2) {
|
|
var r2 = this, a2 = { pageNumber: -1, pageSize: -1, unitId: e2 };
|
|
Object(s["M"])(a2).then((function(e3) {
|
|
1 == t2 ? r2.homeList = e3.data.records : r2.homeList2 = e3.data.records;
|
|
}));
|
|
}, onSearch: function() {
|
|
this.query.pageNumber = 1, this.getlistData();
|
|
}, getlistData: function() {
|
|
var e2 = this;
|
|
Object(n["e"])(this.query).then((function(t2) {
|
|
0 === t2.code && t2.data ? (e2.tableData = t2.data.records, e2.pageTotal = t2.data.rowsCount) : e2.tableData = [];
|
|
}));
|
|
}, handleSizeChange: function(e2) {
|
|
this.query.pageSize = e2, this.getlistData();
|
|
}, handleCurrentChange: function(e2) {
|
|
this.query.pageNumber = e2, this.getlistData();
|
|
}, resetForm: function() {
|
|
this.query.pageNumber = 1, this.query.precinctId = "", this.query.buildingId = "", this.query.unitId = "", this.query.houseId = "", this.query.carNumber = "", this.query.status = "", this.query.roomNum = "", this.getlistData();
|
|
}, headClass: function() {
|
|
return "text-align:center;background:#FAFAFA;";
|
|
} } }, c = l, u = (r("5f23"), r("829d")), d = Object(u["a"])(c, a, i, false, null, "495883d6", null);
|
|
t["default"] = d.exports;
|
|
} }]);
|