Commit 79e49fa5 by 张杰

Merge branch 'v1.10.0' into 'develop'

V1.10.0版本需求上线,合并代码到develop

See merge request !28
2 parents 65ef0632 9cb37853
This diff could not be displayed because it is too large.
......@@ -5,7 +5,7 @@
"port": 10200,
"scripts": {
"serve": "vue-cli-service serve",
"dev": "vue-cli-service serve",
"dev": "vue-cli-service serve --progress",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
......@@ -15,7 +15,6 @@
"core-js": "^3.6.5",
"echarts": "^5.2.2",
"element-ui": "^2.15.7",
"glsx-common": "^1.4.9",
"js-md5": "^0.7.3",
"moment": "^2.29.1",
"sass": "^1.45.1",
......@@ -31,7 +30,8 @@
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"sass-loader": "^10.0.3",
"vue-template-compiler": "^2.6.11"
"vue-template-compiler": "^2.6.11",
"webpack-bundle-analyzer": "^4.6.1"
},
"eslintConfig": {
"root": true,
......
This diff could not be displayed because it is too large.
......@@ -11,7 +11,9 @@ import './core/public-path';
import { Common } from '@/utils/common.js'
import Constants from '@/utils/constants.js'
import actions from '@/core/actions';
import GlsxDialog from "@/components/dialog";
// import axios from 'axios'
Vue.component('glsx-dialog', GlsxDialog)
Vue.prototype.btn_size = 'mini'
Vue.prototype.$Common = Common
Vue.prototype.$Constants = Constants
......
......@@ -98,3 +98,14 @@ export const UPDATE_ORDER_IMAGE = params => {
export const DELETE_ORDER_INFO = params => {
return request(params, "/trialdrive/workorder/delete");
}
// 工单管理-工单列表-关联车辆-根据车架号获取车辆列表
export const GET_VEHICLE_LIST_BY_VIN = params => {
return request(params, "/trialdrive/workorder/getLinkVehicleList");
}
// 工单管理-工单列表-关联车辆-保存数据
export const SAVE_RELINKVEHICLE_INFO = params => {
return request(params, "/trialdrive/workorder/reLinkVehicle",'POST');
}
......@@ -2,44 +2,50 @@ import { ORGINIZA_API } from '@/config/config'
import request from '@/services/request'
// 获取组织列表
function getTableList (params) {
function getTableList(params) {
const url = ORGINIZA_API.ORGINIZA_SEARCH
return request(params, url)
}
// 根据根节点,获取子节点列表
function getChildren (params) {
function getChildren(params) {
const url = ORGINIZA_API.ORGINIZA_CHILDREN
return request(params, url)
}
// 获取组织列表树
function getSimpleList (params) {
function getSimpleList(params) {
const url = ORGINIZA_API.ORGINIZA_SIMPLElIST
return request(params, url)
}
// 组织架构
function getTreeOrg (params) {
function getTreeOrg(params) {
const url = ORGINIZA_API.ORGINIZA_TREEORY
return request(params, url)
}
// 添加组织
function addOrganiza (params) {
function addOrganiza(params) {
const url = ORGINIZA_API.ORGINIZA_ADD
return request(params, url, 'post')
}
// 编辑组织
function editOrganiza (params) {
function editOrganiza(params) {
const url = ORGINIZA_API.ORGINIZA_EDIT
return request(params, url, 'post')
}
// 删除组织
function deleteOrganiza (params) {
function deleteOrganiza(params) {
const url = ORGINIZA_API.ORGINIZA_DELETE
return request(params, url)
}
// 组织详情
function organizaInfo (params) {
function organizaInfo(params) {
const url = ORGINIZA_API.ORGINIZA_INFO
return request(params, url)
}
// 获取组织架构
export const GET_ORIGINIZATION_LIST = params => {
return request(params, ORGINIZA_API.ORGINIZA_TREEORY);
}
export { getTableList, getChildren, getSimpleList, getTreeOrg, addOrganiza, editOrganiza, deleteOrganiza, organizaInfo }
......@@ -70,6 +70,17 @@ export const GET_USER_ASSIGN_INFO = params => {
return request(params,'/trialdrive/vehicle/permit/assigndetails')
}
// 用户管理-指定数据-按组织授权-获取详情
export const GET_ORGZ_ASSIGN_INFO = params => {
return request(params,'/trialdrive/vehicle/orgz/assigndetails')
}
// 用户管理-指定数据-按组织授权-保存数据
export const SAVE_ORGZ_ASSIGN_INFO = params => {
return request(params,'/trialdrive/vehicle/orgz/assign','POST')
}
// 用户管理-指定数据-文件导入接口
export const IMPORT_VEHICLE_TEMPLATE = '/trialdrive/vehicle/permit/import'
......@@ -78,5 +89,10 @@ export const DOWNLOAD_ASSIGNPERMIT_TEMPLATE_FILE = params => {
return request(params,'/publiccenter/dict/data/type/excelTemplate/assignPermit')
}
// 用户管理-删除用户-查询用户是否绑定车辆
export const JUDGE_USER_BINDVEHICLE = params => {
return request(params,'/trialdrive/data/sniff','POST')
}
export { getUserList, getSuperUser, addUser, editUser, detailUser, deleteUser, roleList, dictInfo, resetPassword}
......@@ -2,7 +2,8 @@ const getters = {
// 获取车型数据
getTreeData:state => {
let arr = state.vehicleTree;
let n = localStorage.getItem('carTree') ? JSON.parse(localStorage.getItem('carTree')) : []
//let n = localStorage.getItem('carTree') ? JSON.parse(localStorage.getItem('carTree')) : []
let n = state.vehicleCarTree
if(!arr || arr.length<=0){
arr = n;
}
......
import state from "./state";
export default {
//更新全局baseURL
updateBaseURL(state, newBaseURL) {
......@@ -9,6 +11,11 @@ export default {
state.vehicleTree = list;
},
// 更新车型数据
updateVehicleCarTree(state, list) {
state.vehicleCarTree = list;
},
// 更新定制后的车型数据
updateVehicleCustomTree(state, list) {
state.vehicleCustomTree = list;
......@@ -28,4 +35,10 @@ export default {
updateUserOrganizationTree(state, list) {
state.userVehicleTree = list;
},
// 系统管理-用户管理-指定数据-按组织授权-更新组织树
updateTreeByOrganization(state,list){
state.organizationUserTree = list
}
};
......@@ -13,10 +13,12 @@ const state = {
position: ''
},
vehicleTree:[], // 车形数据
vehicleCarTree:[],// 车型原始数据
vehicleCustomTree:[], // 新增工单-新增车辆-车型数据
deviceAssembly:[], // 新增工单-新增车辆-设备组合
organizationTree:[], // 组织树
userVehicleTree:[], // 用户管理-指定数据-组织树
organizationUserTree:[], // 用户管理-指定数据-按组织授权-树
}
try {
......
.sort_select {
width: 100px;
width: 120px;
}
.small_select {
width: 120px;
......@@ -114,3 +114,16 @@
}
}
}
/* 关联车辆 */
.car_info_box{
.cell{
display:flex;
align-items: center;
line-height:30px;
}
}
.btn_mini_size{
padding:2px 12px !important;
min-height: 24px;
}
\ No newline at end of file
......@@ -205,7 +205,12 @@ import {
GET_HOME_NEWBINDDEVICEINFO,
} from "@/services/home";
//import chartConfig from "@/chart/chartConfig.js";
import * as echarts from "echarts";
import * as echarts from "echarts/core";
import { LineChart,PieChart } from 'echarts/charts';
echarts.use([
LineChart,
PieChart
])
export default {
data() {
return {
......
......@@ -2,10 +2,13 @@
<div class="">
<el-tabs v-model="activeTabs">
<el-tab-pane label="选择数据" name="1">
<select-info ref="selectInfoCom" v-if="activeTabs == 1" :id="id" :key="id"></select-info>
<select-info ref="selectInfoCom" :id="id" :key="id"></select-info>
</el-tab-pane>
<el-tab-pane label="导入数据" name="2">
<import-vehicle ref="importVehicleCom" v-if="activeTabs == 2" :id="id" :key="id"></import-vehicle>
<import-vehicle ref="importVehicleCom" :id="id" :key="id"></import-vehicle>
</el-tab-pane>
<el-tab-pane label="按组织授权" name="3">
<authorization-info ref="authorizationInfoCom" :id="id" :key="id"></authorization-info>
</el-tab-pane>
</el-tabs>
</div>
......@@ -13,11 +16,13 @@
<script>
import SelectInfo from "./select.vue";
import ImportVehicle from "./import.vue";
import AuthorizationInfo from "./authorization";
export default {
name: "AssignInfo",
components: {
SelectInfo,
ImportVehicle,
AuthorizationInfo,
},
props: {
id: {
......@@ -29,16 +34,16 @@ export default {
return {
activeTabs: "1",
userId: "",
randomKey:''
randomKey: "",
};
},
watch:{
id:{
handler:function(){
console.log('key:',Math.random())
this.randomKey = Math.random()
}
}
watch: {
id: {
handler: function () {
console.log("key:", Math.random());
this.randomKey = Math.random();
},
},
},
mounted() {
this.userId = this.id;
......@@ -46,10 +51,16 @@ export default {
methods: {
// 保存数据
saveInfo() {
if (this.activeTabs == 1) {
let _id = this.activeTabs;
if (_id == 1) {
this.$refs.selectInfoCom.saveInfo();
return false;
}
if (_id == 3) {
this.$refs.authorizationInfoCom.saveInfo();
return false;
}
this.$refs.importVehicleCom.saveInfo();
},
},
......
<template>
<div class="select_info_page">
<h2 class="title">注:按车辆所属组织层级直接授权数据,包括后续增加的车辆</h2>
<div class="device_box">
<div class="card_box">
<div class="head">请选择组织层级(支持多选)</div>
<div class="info_box">
<div class="search_box">
<el-input v-model="term" placeholder="请输入两位以上组织层级名称" suffix-icon="el-icon-search" @input="onSearch" @keyup.enter.native="onSearch"></el-input>
</div>
<div class="tree_box" v-loading="treeLoading">
<el-scrollbar class="el_scroll">
<el-tree ref="elTree" :data="organizationList" default-expand-all :props="treeProps" :default-checked-keys="checkKeys" show-checkbox node-key="id" :filter-node-method="filterNode">
</el-tree>
</el-scrollbar>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { GET_ORGZ_ASSIGN_INFO, SAVE_ORGZ_ASSIGN_INFO } from "@/services/user";
import { GET_ORIGINIZATION_LIST } from "@/services/orginizaManage";
import { deepClone, showToast, broadcast, received } from "@/utils/util";
export default {
name: "AuthorizationInfo",
props: {
id: {
type: [String, Number],
default: "",
},
},
data() {
return {
term: "",
organizationList: this.$store.state.organizationUserTree,
treeLoading: false,
treeProps: {
label: "label",
children: "children",
isLeaf: "leaf",
["node-key"]: "id",
},
checkKeys: [],
};
},
created() {
},
mounted() {
let list = this.$store.state.organizationUserTree;
if (!list || list.length <= 0) {
this.getList();
}
this.getInfo();
},
methods: {
// 获取组织树列表
getList() {
this.treeLoading = true;
GET_ORIGINIZATION_LIST().then((res) => {
this.treeLoading = false;
this.organizationList = res.data || [];
this.$store.commit("updateTreeByOrganization", res.data || []);
});
},
// 搜索树
onSearch() {
let term = this.term;
if (term && term.length < 2) {
return false;
}
this.$refs.elTree.filter(term);
},
// 筛选树
filterNode(value, data) {
return data.label.indexOf(value) !== -1;
},
// 保存数据
async saveInfo() {
let _keys = this.$refs.elTree.getCheckedKeys();
let oParams = {};
oParams.receiverId = this.id;
oParams.orgzIds = _keys;
console.log(_keys);
let res = await SAVE_ORGZ_ASSIGN_INFO(oParams);
console.log(res);
broadcast("cancel-loading");
if (res.code == 200) {
showToast({
message: "保存成功",
type: "success",
});
broadcast("assign-success");
}
},
// 获取详情
getInfo() {
let oParams = {};
oParams.receiverId = this.id;
GET_ORGZ_ASSIGN_INFO(oParams).then((res) => {
this.checkKeys = res.data || [];
});
},
},
};
</script>
<style lang="scss" scoped>
.select_info_page {
.title {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #666666;
font-weight: 400;
}
.device_box {
display: flex;
justify-content: space-between;
.card_box {
flex: 1;
//width: 380px;
flex-shrink: 0;
box-sizing: border-box;
.head {
height: 54px;
line-height: 54px;
background: #f5f7fa;
padding: 0 16px;
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
font-weight: 400;
}
.info_box {
border: 1px solid #eee;
.search_box {
padding: 10px;
.input_select {
width: 100%;
::v-deep .el-input-group__prepend {
background: #fff !important;
//padding: 0 10px;
padding-left: 10px;
.el-select {
width: 90px;
box-sizing: border-box;
}
}
}
}
.tree_box {
border-top: 1px solid #eee;
.el_scroll {
padding: 10px 0;
height: 340px;
box-sizing: border-box;
overflow-y: auto;
}
}
}
}
}
}
</style>
\ No newline at end of file
......@@ -82,12 +82,13 @@ import {
roleList,
dictInfo,
resetPassword,
JUDGE_USER_BINDVEHICLE,
} from "services/user";
import { getSimpleList, getTreeOrg } from "services/orginizaManage";
import GlsxDialog from "@/components/dialog";
import AssignInfo from "./assign.vue";
import AuthLink from "@/components/auth-button/link";
import {received} from '@/utils/util'
import { received, showModal, showToast } from "@/utils/util";
export default {
components: {
GlsxDialog,
......@@ -327,6 +328,7 @@ export default {
},
mounted() {
let _this = this;
received("assign-success", this.closeDialog);
received("cancel-loading", function () {
_this.loading = false;
......@@ -402,7 +404,7 @@ export default {
// 组织架构节点
handleNodeClick(data) {
this.searchForm.departmentId = data.id;
this.$refs.userTable.handleCurrentChange(1)
this.$refs.userTable.handleCurrentChange(1);
// this.$refs.userTable.refreshTable();
},
// 树节点内容区的渲染
......@@ -504,31 +506,65 @@ export default {
});
},
// 删除触发事件
deleteEvent(id) {
async deleteEvent(id) {
const that = this;
const tipData = {
that: that,
tipText: "是否删除当前记录",
tipTitle: "提示",
let res = await JUDGE_USER_BINDVEHICLE({ userId: id, types: [1] });
// true:可以删除,false:不能删除用户
if (!res.data) {
showModal({
title: "提示",
message: "该账户下有绑定车辆,若需要删除账户,请先移除对应车辆!",
type: "warning",
});
return false;
}
// const tipData = {
// that: that,
// tipText: "是否删除当前记录",
// tipTitle: "提示",
// type: "error",
// callBack: () => {
// deleteUser({ id: id }).then((res) => {
// if (res.code == "200") {
// this.$message({
// type: "success",
// message: "删除成功!",
// });
// this.$refs.userTable.refreshTable();
// } else {
// this.$message({
// type: "error",
// message: res.message,
// });
// }
// });
// },
// };
// this.$Common.confirmDialog(tipData);
showModal({
title: "提示",
message: "是否删除当前记录?",
type: "error",
callBack: () => {
showCancelButton: true,
success: function () {
deleteUser({ id: id }).then((res) => {
if (res.code == "200") {
this.$message({
showToast({
type: "success",
message: "删除成功!",
});
this.$refs.userTable.refreshTable();
that.$refs.userTable.refreshTable();
} else {
this.$message({
showToast({
type: "error",
message: res.message,
});
}
});
},
};
this.$Common.confirmDialog(tipData);
});
},
// 部门弹窗
selectDepart() {
......@@ -701,6 +737,7 @@ export default {
this.loading = true;
this.$refs.assignInfo.saveInfo();
},
},
};
</script>
......
......@@ -33,7 +33,7 @@
</div>
<div class="tree_box">
<el-scrollbar class="el_scroll" v-loading="treeLoading">
<el-tree :key="id" :data="vehicleList" :props="treeProps" :default-checked-keys="checkKeys" show-checkbox lazy node-key="id" :load="loadNode" :render-content="renderTreeContent" @check="onCheckChange">
<el-tree :data="vehicleList" :props="treeProps" :default-checked-keys="checkKeys" show-checkbox lazy node-key="id" :load="loadNode" :render-content="renderTreeContent" @check="onCheckChange">
</el-tree>
</el-scrollbar>
</div>
......
......@@ -179,7 +179,8 @@ export default {
let oParams = {};
oParams.full = true;
getMenuTree(oParams).then((res) => {
localStorage.setItem("carTree", JSON.stringify(res.data || []));
//localStorage.setItem("carTree", JSON.stringify(res.data || []));
_this.$store.commit("updateVehicleCarTree", res.data);
// 分线程处理数据
_this.mainWorker(res.data).then((e) => {
let _obj = e.data;
......
......@@ -87,7 +87,7 @@
<el-table-column label="安装技工" prop="mechanicName" :width="tdWidth"></el-table-column> -->
<el-table-column label="工单归属" prop="createdBy" :width="longTdWidth" show-overflow-tooltip></el-table-column>
<el-table-column label="创建时间" prop="createdDate" :width="tdWidth"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="180px">
<el-table-column label="操作" fixed="right" align="left" width="210px">
<template slot-scope="{row}">
<el-link class="el_link" type="primary" @click="lookDetail(row,1)">查看</el-link>
<el-link class="el_link" type="primary" v-if="row.status == 0 ||row.status == 1" @click="lookDetail(row,2)">编辑</el-link>
......@@ -95,6 +95,12 @@
<el-link class="el_link" type="primary" v-if="row.status == 0 ||row.status == 1" @click="lookDetail(row,3)">激活</el-link>
<el-link class="el_link" type="primary" v-if="row.status == 5" @click="lookDetail(row,4)">审核</el-link>
<auth-link class="el_link" type="primary" v-if="row.status == 2" uid="14010101" name="照片编辑" @click.native="lookDetail(row,5)">照片编辑</auth-link>
<el-dropdown trigger="click" @command="e => onCommand(e,row)" v-if="hasPermission('work_order_associated') && (row.status == 1 || row.status == 0)">
<el-button class="btn_mini_size" icon="el-icon-arrow-down" size="mini"></el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="1" v-if="hasPermission('work_order_associated')">关联车辆</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
......@@ -164,10 +170,44 @@
</glsx-dialog>
<!-- 查看工单 end -->
<!-- 关联车辆 开始 -->
<glsx-dialog :show="showCarDialog" title="关联车辆" width="600px" :appendtobody="true" @close="closeCarDialog()">
<div v-loading="carLoading">
<el-form ref="carInfoForm" :model="carInfoForm" :rules="carInfoFormRules" label-width="140px">
<el-form-item label="请选择对应车辆:" prop="vehicleId">
<el-select class="a_select" v-model="carInfoForm.vehicleId" @change="onCarChange">
<el-option v-for="(item,index) in vehicleList" :key="index" :value="item.vehicleId" :label="item.vin"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="currentVehicle.ownerName || currentVehicle.shopName || currentVehicle.bizOrderNo">
<div class="car_info_box">
<div class="cell">
<div class="name">姓名:</div>
<div class="txt">{{currentVehicle.ownerName||'--'}}</div>
</div>
<div class="cell">
<div class="name">店面名称:</div>
<div class="txt">{{currentVehicle.shopName||'--'}}</div>
</div>
<div class="cell">
<div class="name">业务工单:</div>
<div class="txt">{{currentVehicle.bizOrderNo||'--'}}</div>
</div>
</div>
</el-form-item>
</el-form>
</div>
<div slot="footer">
<el-button type="primary" size="small" :loading="aloading" @click="saveLinkInfo()">保存</el-button>
<el-button type="default" size="small" @click="closeCarDialog()">关闭</el-button>
</div>
</glsx-dialog>
<!-- 关联车辆 end -->
</div>
</template>
<script>
import GlsxDialog from "@/components/dialog";
// import GlsxDialog from "@/components/dialog";
import {
GET_WORKORDER_SEARCH,
GET_WORKORDER_EXPORT,
......@@ -175,18 +215,18 @@ import {
GET_WORKORDER_TEMPLATEFILE,
IMPORT_WORKORDER_FILES,
GET_WORKORDER_STATUSOPTION,
DELETE_ORDER_INFO
DELETE_ORDER_INFO,
GET_VEHICLE_LIST_BY_VIN,
SAVE_RELINKVEHICLE_INFO,
} from "@/services/order";
import { deepClone, showToast, showModal } from "@/utils/util";
import store from "@/store";
import GlsxOrganization from "@/components/glsx-organization";
import EditOrder from "./edit.vue";
import moment from "moment";
import AuthLink from "@/components/auth-button/link";
import axios from "axios";
export default {
components: {
GlsxDialog,
// GlsxDialog,
GlsxOrganization,
EditOrder,
AuthLink,
......@@ -235,12 +275,22 @@ export default {
tdWidth: 140,
longTdWidth: 180,
orderInfo: {},
// 关联车辆弹框
showCarDialog: false,
carInfoForm: {},
vehicleList: [],
currentVehicle: {},
carInfoFormRules: {
vehicleId: [
{ required: true, message: "请选择对应车辆", trigger: "change" },
],
},
carLoading: false,
};
},
watch: {
$route: {
handler: function (n, o) {
console.log(n);
if (n.query && n.query.refresh) {
this.currentPage = 1;
this.getList();
......@@ -305,7 +355,6 @@ export default {
// 监听文件导入
onFileChange(file, fileList) {
console.log(file);
if (!file.response) {
this.uploadFile = file;
}
......@@ -332,7 +381,6 @@ export default {
});
return false;
}
console.log(this.uploadFile);
this.loading = true;
this.$refs.elUpload.submit();
},
......@@ -432,7 +480,6 @@ export default {
// 监听树
onChange(e) {
this.filterVisible = false;
console.log(e);
if (e) {
this.orgInfo = e.origin;
this.searchForm.orgId = e.origin.orgId;
......@@ -497,7 +544,6 @@ export default {
// 编辑工单
saveInfo() {
console.log("保存工单");
this.aloading = true;
this.$refs.editOrderCom.saveInfo();
},
......@@ -519,7 +565,6 @@ export default {
// 激活工单
activeDevice() {
console.log("保存工单");
this.aloading = true;
this.$refs.editOrderCom.activeDevice();
},
......@@ -578,6 +623,99 @@ export default {
},
});
},
// 关闭关联车辆弹框
closeCarDialog() {
let _this = this;
this.showCarDialog = false;
this.vehicleList = [];
this.currentVehicle = {};
this.carInfoForm = {};
this.orderId = "";
setTimeout(function () {
_this.$refs.carInfoForm.clearValidate();
}, 100);
},
// 点击下拉菜单
onCommand(e, row) {
console.log(row);
if (e == 1) {
this.showCarDialog = true;
this.orderId = row.id;
this.getVehicleList(row.vin);
}
},
// 是否有权限
hasPermission(id) {
let list = this.$root.parentCommon.getAuthData();
let idx = list.findIndex((k) => k.origin.permissionTag == id);
if (idx < 0) {
return false;
} else {
return true;
}
},
// 获取车辆列表
getVehicleList(vin) {
let _this = this;
_this.carLoading = true;
GET_VEHICLE_LIST_BY_VIN({ vin: vin })
.then((res) => {
_this.carLoading = false;
let list = res.data || [];
_this.vehicleList = list;
_this.currentVehicle = list[0] || {};
if (list[0]) {
_this.$set(_this.carInfoForm, "vehicleId", list[0].vehicleId);
}
})
.catch((error) => {
_this.carLoading = false;
});
},
// 订单关联车辆
async saveLinkInfo() {
let _this = this;
let oParams = {};
let _pass = await _this.$refs.carInfoForm
.validate()
.catch((err) => false);
console.log(_pass);
if (!_pass) {
return false;
}
_this.aloading = true;
oParams.orderId = this.orderId;
oParams.vehicleId = this.currentVehicle.vehicleId;
let res = await SAVE_RELINKVEHICLE_INFO(oParams);
_this.aloading = false;
if (res.code != 200) {
showToast({
message: res.message,
type: "error",
});
return false;
}
showToast({
message: "关联成功",
type: "success",
});
_this.closeCarDialog();
_this.getList(1);
console.log(res);
},
// 监听车辆选择
onCarChange(e) {
console.log(e);
let list = this.vehicleList;
let n = list.find((k) => k.vehicleId == e);
this.currentVehicle = n || {};
},
},
};
</script>
......
......@@ -8,6 +8,8 @@ function resolve(dir) {
const dev = process.env.NODE_ENV === "development";
const getPublicPath = dev ? `//localhost:${port}` : 'http://e-shield-system.glsx.com.cn';
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
module.exports = {
// publicPath: dev ? `//localhost:${port}` : "/",
outputDir: "dist",
......@@ -29,6 +31,7 @@ module.exports = {
}
},
lintOnSave: false,
chainWebpack: config => {
config.resolve.alias
.set('@', resolve('src'))
......@@ -36,16 +39,16 @@ module.exports = {
.set('config', resolve('src/config'))
.set('utils', resolve('src/utils'))
.set('services', resolve('src/services'))
const fontRule = config.module.rule('fonts');
fontRule.uses.clear();
fontRule
.use('file-loader')
.loader('file-loader')
.options({
name: 'fonts/[name].[hash:8].[ext]',
//publicPath: getPublicPath
})
.end()
// const fontRule = config.module.rule('fonts');
// fontRule.uses.clear();
// fontRule
// .use('file-loader')
// .loader('file-loader')
// .options({
// name: 'fonts/[name].[hash:8].[ext]',
// //publicPath: getPublicPath
// })
// .end()
},
configureWebpack: {
output: {
......@@ -55,6 +58,12 @@ module.exports = {
libraryTarget: 'umd',
// 按需加载相关
jsonpFunction: `webpackJsonp_${name}`
}
},
plugins: [
new BundleAnalyzerPlugin({
analyzerMode: 'disabled', // 不启动打包报告http服务器
generateStatsFile: false, // 是否生成stats.json文件
})
],
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!