Commit 1648b767 authored by 扫地僧's avatar 扫地僧

管理系统初始化

parent baa60211
...@@ -7,8 +7,9 @@ module.exports = { ...@@ -7,8 +7,9 @@ module.exports = {
// sit: "http://192.168.1.102:8080/logistics-mgt",//超哥本地 // sit: "http://192.168.1.102:8080/logistics-mgt",//超哥本地
// sit: "http://192.168.200.173:8080",//杨飞本地 // sit: "http://192.168.200.173:8080",//杨飞本地
// sit:"http://flynet.imwork.net:35609/logistics-mgt", // sit:"http://flynet.imwork.net:35609/logistics-mgt",
sit:"https://chalk.fqyxa.com", //上线环境 // sit:"https://chalk.fqyxa.com", //上线环境
// sit:"http://192.168.1.103:8781",//毅豪本地 // sit:"http://192.168.1.103:8781",//毅豪本地
sit:"http://192.168.1.112:8080/store-system",
// ----------------------------------------------------------------- // -----------------------------------------------------------------
prod: "http:正式环境" prod: "http:正式环境"
} }
import request from './request' import request from './request'
import qs from 'qs' import qs from 'qs'
export function getMessagePushList(data) { export function administratorsList(data) {
return request({ return request({
url: '/messagePush/getMessagePushList', url: '/administrators/administratorsList',
method: 'post', method: 'post',
data: qs.stringify(data) data: qs.stringify(data)
}) })
} }
export function addOrEditMessagePush(data) {
return request({
url: '/messagePush/addOrEditMessagePush', export function addOrEditAdministrators(data) {
method: 'post', return request({
data: qs.stringify(data) url: '/administrators/addOrEditAdministrators',
}) method: 'post',
data: qs.stringify(data)
})
} }
export function delMessagePush(data) {
return request({ export function delAdministrators(data) {
url: '/messagePush/delMessagePush', return request({
method: 'post', url: '/administrators/delAdministrators',
data: qs.stringify(data) method: 'post',
}) data: qs.stringify(data)
})
} }
export function getMessagePushRecordList(data) {
return request({
url: '/messagePushRecord/getMessagePushRecordList',
method: 'post',
data: qs.stringify(data)
})
}
\ No newline at end of file
import request from './request'
import qs from 'qs'
//品牌列表
export function getCarBrandList(data) {
return request({
url: '/carBrand/getCarBrandList',
method: 'post',
data: qs.stringify(data)
})
}
export function addOrEditCarBrand(data) {
return request({
url: '/carBrand/addOrEditCarBrand',
method: 'post',
data: qs.stringify(data)
})
}
// 车系列表
export function getCarSeriesList(data) {
return request({
url: '/carSeries/getCarSeriesList',
method: 'post',
data: qs.stringify(data)
})
}
export function addOrEditCarSeries(data) {
return request({
url: '/carSeries/addOrEditCarSeries',
method: 'post',
data: qs.stringify(data)
})
}
// 车辆年代
export function getCarPreiodList(data) {
return request({
url: '/carPeriod/getCarPreiodList',
method: 'post',
data: qs.stringify(data)
})
}
export function addOrEditCarPreiod(data) {
return request({
url: '/carPeriod/addOrEditCarPreiod',
method: 'post',
data: qs.stringify(data)
})
}
// 车辆列表
export function getCarList(data) {
return request({
url: '/car/getCarList',
method: 'post',
data: qs.stringify(data)
})
}
export function addOrEditCar(data) {
return request({
url: '/car/addOrEditCar',
method: 'post',
data: qs.stringify(data)
})
}
// 车辆删除
export function delCarByCarId(data) {
return request({
url: '/car/delCarByCarId',
method: 'post',
data: qs.stringify(data)
})
}
// 用车订单
export function getUseCarOrderList(data) {
return request({
url: '/useCarOrder/getUseCarOrderList',
method: 'post',
data: qs.stringify(data)
})
}
export function addOrEditUseCarOrder(data) {
return request({
url: '/useCarOrder/addOrEditUseCarOrder',
method: 'post',
data: qs.stringify(data)
})
}
// 用车事由
export function getUseCarReasonList(data) {
return request({
url: '/useCarReason/getUseCarReasonList',
method: 'post',
data: qs.stringify(data)
})
}
export function addOrEditUseCarReason(data) {
return request({
url: '/useCarReason/addOrEditUseCarReason',
method: 'post',
data: qs.stringify(data)
})
}
// 三级联动获取车辆接口
// 获取品牌列表
export function getCarBrands() {
return request({
url: '/carBrand/getCarBrands',
method: 'post'
})
}
// 获取车系列表
export function getCarSeries(data) {
// param carBrandId
return request({
url: '/carSeries/getCarSeries',
method: 'post',
data: qs.stringify(data)
})
}
export function getCars() {
// 可用车辆列表
return request({
url: '/car/getCars',
method: 'post'
})
}
import request from './request'
import qs from 'qs'
// 会议室列表
export function getMeetingRoomList(data) {
return request({
url: '/meetingRoom/getMeetingRoomList',
method: 'post',
data:qs.stringify(data)
})
}
export function addOrEditMeetingRoom(data) {
return request({
url: '/meetingRoom/addOrEditMeetingRoom',
method: 'post',
data:qs.stringify(data)
})
}
// 会议室订单列表
export function getMeetingRoomOrderList(data) {
return request({
url: '/meetingRoomOrder/getMeetingRoomOrderList',
method: 'post',
data:qs.stringify(data)
})
}
export function addOrEditMeetingRoomOrder(data) {
return request({
url: '/meetingRoomOrder/addOrEditMeetingRoomOrder',
method: 'post',
data:qs.stringify(data)
})
}
//会议室申请事由
export function getMeetingRoomReasonList(data) {
return request({
url: '/meetingRoomReason/getMeetingRoomReasonList',
method: 'post',
data:qs.stringify(data)
})
}
export function addOrEditMeetingRoomReason(data) {
return request({
url: '/meetingRoomReason/addOrEditMeetingRoomReason',
method: 'post',
data:qs.stringify(data)
})
}
// 获取可用会议室
export function getMeetingRooms() {
return request({
url: '/meetingRoom/getMeetingRooms',
method: 'post'
})
}
// 会议室评价
export function getMeetingRoomCommentList(data) {
return request({
url: 'meetingRoomComment/getMeetingRoomCommentList',
method: 'post',
data:qs.stringify(data)
})
}
// 获取会服信息
export function getMeetingService(data) {
return request({
url: 'meetingRoomOrder/getMeetingService',
method: 'post',
data:qs.stringify(data)
})
}
// 读取身份证
import axios from 'axios'
import { Message } from 'element-ui'
import store from '@/store'
import { getToken } from '@/utils/auth'
// create an axios instance
const service = axios.create({
baseURL: "https://localhost:24011/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4", //身份证信息获取地址
timeout: 5000, // request timeout
headers: {'Content-Type':'application/x-www-form-urlencoded'}
})
console.log('请求地址:'+process.env.BASE_API);
// request interceptor
service.interceptors.request.use(config => {
// Do something before request is sent
return config
}, error => {
// Do something with request error
console.log(error) // for debug
Promise.reject(error)
})
// respone interceptor
service.interceptors.response.use(
//暂时这先全部返回,等登录的接口完善以后,再去修改完 response.data
response => response,
/**
* 下面的注释为通过response自定义code来标示请求状态,当code返回如下情况为权限有问题,登出并返回到登录页
* 如通过xmlhttprequest 状态码标识 逻辑可写在下面error中
*/
// const res = response.data;
// if (res.code !== 20000) {
// Message({
// message: res.message,
// type: 'error',
// duration: 5 * 1000
// });
// // 50008:非法的token; 50012:其他客户端登录了; 50014:Token 过期了;
// if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
// MessageBox.confirm('你已被登出,可以取消继续留在该页面,或者重新登录', '确定登出', {
// confirmButtonText: '重新登录',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// store.dispatch('FedLogOut').then(() => {
// location.reload();// 为了重新实例化vue-router对象 避免bug
// });
// })
// }
// return Promise.reject('error');
// } else {
// return response.data;
// }
error => {
console.log('err' + error)// for debug
Message({
message: "请检查身份证读取设备是否安装成功!",
type: 'error',
duration: 2000
})
return Promise.reject(error)
})
export function readCardInfro() {
return service({
method: 'get'
})
}
...@@ -12,6 +12,7 @@ const service = axios.create({ ...@@ -12,6 +12,7 @@ const service = axios.create({
console.log('请求地址:'+process.env.BASE_API); console.log('请求地址:'+process.env.BASE_API);
// request interceptor // request interceptor
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
debugger
// Do something before request is sent // Do something before request is sent
const userInfro = getUserInfro() const userInfro = getUserInfro()
let param = config.data; let param = config.data;
......
import request from './request'
import qs from 'qs'
// 菜品列表
export function getRestaurantDishesList(data) {
return request({
url: '/restaurantDishes/getRestaurantDishesList',
method: 'post',
data: qs.stringify(data)
})
}
//添加菜品
export function addOrEditRestaurantDishes(data) {
return request({
url: '/restaurantDishes/addOrEditRestaurantDishes',
method: 'post',
data: qs.stringify(data)
})
}
export function delRestaurantDishes(data) {
return request({
url: '/restaurantDishes/delRestaurantDishes',
method: 'post',
data: qs.stringify(data)
})
}
// 菜单
export function getDailyMenuList(data) {
return request({
url: '/dailyMenu/getDailyMenuList',
method: 'post',
data: qs.stringify(data)
})
}
export function addOrEditDailyMenu(data) {
return request({
url: '/dailyMenu/addOrEditDailyMenu',
method: 'post',
data: qs.stringify(data)
})
}
// 或许可选菜品
export function getRestaurantDishes() {
return request({
url: '/restaurantDishes/getRestaurantDishes',
method: 'post'
})
}
\ No newline at end of file
import request from './request'
import qs from 'qs'
// 根据科室id查询,人员信息
export function getMemberListBySection(data) {
return request({
url: '/member/getMemberListBySection',
method: 'post',
data: qs.stringify(data)
})
}
// 添加访客信息
export function addOrEditVisitor(data) {
return request({
url: '/visitor/addOrEditVisitor',
method: 'post',
data: qs.stringify(data)
})
}
// 获取访客信息列表
export function getVisitorList(data) {
return request({
url: '/visitor/getVisitorList',
method: 'post',
data: qs.stringify(data)
})
}
// 获取访客详情
export function getVisitor(data) {
return request({
url: '/visitor/getVisitor',
method: 'post',
data: qs.stringify(data)
})
}
// 获取访客事由列表
// 获取访客事由
export function getVisitReasonList(data) {
return request({
url: '/visitReason/getVisitReasonList',
method: 'post',
data: qs.stringify(data)
})
}
// 编辑访客事由
export function addOrEditVisitReason(data) {
return request({
url: '/visitReason/addOrEditVisitReason',
method: 'post',
data: qs.stringify(data)
})
}
// 删除事由
export function deleteVisitReason(data) {
return request({
url: '/visitReason/deleteVisitReason',
method: 'post',
data: qs.stringify(data)
})
}
\ No newline at end of file
...@@ -51,23 +51,71 @@ export default new Router({ ...@@ -51,23 +51,71 @@ export default new Router({
}) })
export const asyncRouterMap = [ export const asyncRouterMap = [
// 车辆管理
// 商家管理
{ {
path: '/car', path: '/store',
alwaysShow:true,
component: Layout,
redirect: '/store/storeList',
meta: {
title: '商家管理',
icon: 'cheliang'
},
children: [
{ path: 'storeList', component: _import('store/storeList'), name: 'store_storeList', meta: { title: '商家列表' }}
]
},
// 运营管理
{
path: '/advert',
alwaysShow:true,
component: Layout,
redirect: '/advert/advertList',
meta: {
title: '运营管理',
icon: 'cheliang'
},
children: [
{ path: 'advertList', component: _import('advert/advertList'), name: 'advert_advertList', meta: { title: '活动列表' }}
]
},
// 店铺管理
{
path: '/administrators',
alwaysShow:true, alwaysShow:true,
component: Layout, component: Layout,
redirect: '/car/brandList', redirect: '/administrators/administratorstList',
meta: { meta: {
title: '车辆管理', title: '店铺管理',
icon: 'cheliang' icon: 'cheliang'
}, },
children: [ children: [
{ path: 'brandList', component: _import('car/brandList'), name: 'car_brandList', meta: { title: '品牌列表' }}, { path: 'administratorstList', component: _import('administrators/administratorstList'), name: 'administrators_administratorstList', meta: { title: '店铺管理员列表' }}
{ path: 'seriesList', component: _import('car/seriesList'), name: 'car_seriesList', meta: { title: '车系列表' }},
{ path: 'yearList', component: _import('car/yearList'), name: 'car_yearList', meta: { title: '年代列表' }},
{ path: 'carList', component: _import('car/carList'), name: 'car_carList', meta: { title: '车辆列表' }}
] ]
}, },
// 员工管理
{
path: '/worker',
alwaysShow:true,
component: Layout,
redirect: '/worker/workerList',
meta: {
title: '员工管理',
icon: 'cheliang'
},
children: [
{ path: 'workerList', component: _import('worker/workerList'), name: 'worker_workerList', meta: { title: '员工列表' }}
]
},
// 系统管理 // 系统管理
{ {
path: '/system', path: '/system',
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
</div> </div>
</div> </div>
<el-row :gutter="15"> <el-row :gutter="15">
<el-col :xl="4" :lg="6" :md="6" :sm="8"> <el-col :span="4">
<el-col class="input-name" :span="7">品牌名称</el-col> <el-col class="input-name" :span="7">维修工名称</el-col>
<el-col :span="17"><el-input placeholder="请输入关键字" v-model="seacherParam.carBrandName" @keyup.enter.native="seachFun"></el-input></el-col> <el-col :span="17"><el-input placeholder="请输入关键字" v-model="seacherParam.repairWorkerName" @keyup.enter.native="seachFun"></el-input></el-col>
</el-col> </el-col>
</el-row> </el-row>
</el-card> </el-card>
...@@ -26,7 +26,14 @@ ...@@ -26,7 +26,14 @@
<el-table empty-text="暂无数据" :stripe="true" :data="dataOption" v-loading="!dataOption"> <el-table empty-text="暂无数据" :stripe="true" :data="dataOption" v-loading="!dataOption">
<el-table-column prop="carBrandName" label="品牌名称"></el-table-column> <el-table-column prop="repairWorkerName" label="姓名"></el-table-column>
<el-table-column label="性别">
<template slot-scope="scope">
<span>{{scope.row.sex===1?'男':'女'}}</span>
</template>
</el-table-column>
<el-table-column prop="repairWorkerPhone" label="电话"></el-table-column>
<el-table-column prop="repairWorkerIdCard" label="身份证号"></el-table-column>
<el-table-column label="创建时间"> <el-table-column label="创建时间">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{fattTime(scope.row.createTime)}}</span> <span>{{fattTime(scope.row.createTime)}}</span>
...@@ -88,7 +95,6 @@ ...@@ -88,7 +95,6 @@
<!-- 查看,编辑dialog --> <!-- 查看,编辑dialog -->
<el-dialog <el-dialog
v-el-drag-dialog
:title="dialogTitle" :title="dialogTitle"
:visible.sync="dialogState" :visible.sync="dialogState"
width="30%" width="30%"
...@@ -96,13 +102,53 @@ ...@@ -96,13 +102,53 @@
<div class="dialog-body-content"> <div class="dialog-body-content">
<el-row :gutter="15"> <el-row :gutter="15">
<el-col :span="8" class="content-left"><label>品牌名称</label></el-col> <el-col :span="8" class="content-left"><label>姓名</label></el-col>
<el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入姓名" v-model="dialogBindData.repairWorkerName"></el-input>
<span v-else>{{dialogBindData.repairWorkerName}}</span>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>性别</label></el-col>
<el-col :span="16" class="content-right">
<el-radio-group v-if="dialogType===1 || dialogType===2" v-model="dialogBindData.sex">
<el-radio size="small" :label="1"></el-radio>
<el-radio size="small" :label="0"></el-radio>
</el-radio-group>
<span v-else>{{dialogBindData.sex===1?"男":"女"}}</span>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>电话</label></el-col>
<el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入电话号码" v-model="dialogBindData.repairWorkerPhone"></el-input>
<span v-else>{{dialogBindData.repairWorkerPhone}}</span>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>身份证号</label></el-col>
<el-col :span="16" class="content-right"> <el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入品牌名称" v-model="dialogBindData.carBrandName"></el-input> <el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入身份证号" v-model="dialogBindData.repairWorkerIdCard"></el-input>
<span v-else>{{dialogBindData.carBrandName}}</span> <span v-else>{{dialogBindData.repairWorkerIdCard}}</span>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row :gutter="15">
<el-col :span="8" class="content-left"><label>备注</label></el-col>
<el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" type="textarea" rows="3" placeholder="请输入备注" resize="none" v-model="dialogBindData.memo"></el-input>
<span v-else>{{dialogBindData.memo || "暂无备注"}}</span>
</el-col>
</el-row> -->
</div> </div>
<div class="btns-wrapper"> <div class="btns-wrapper">
<el-button size="small" @click="handleClose" :disabled="dialogType===3"><i class="iconfont icon-quxiao"></i>取消</el-button> <el-button size="small" @click="handleClose" :disabled="dialogType===3"><i class="iconfont icon-quxiao"></i>取消</el-button>
...@@ -114,12 +160,10 @@ ...@@ -114,12 +160,10 @@
</template> </template>
<script> <script>
import * as car from "../../api/car"; import * as repair from "../../api/repair";
import * as common from "../../api/common"; import * as common from "../../api/common";
import { fattCreateTime } from "../../utils/fattTime"; import { fattCreateTime } from "../../utils/fattTime";
import elDragDialog from "@/directive/el-dragDialog";
export default { export default {
directives:{elDragDialog},
data() { data() {
return { return {
seacherParam: { seacherParam: {
...@@ -151,8 +195,11 @@ export default { ...@@ -151,8 +195,11 @@ export default {
// visitReasonId:"1001" // visitReasonId:"1001"
dialogBindData: { dialogBindData: {
carBrandId: "", repairWorkerId: "",
carBrandName: "" repairWorkerName: "",
sex: 1,
repairWorkerPhone: "",
repairWorkerIdCard: ""
}, },
// 是否提交 // 是否提交
submmitSuccess: false submmitSuccess: false
...@@ -166,7 +213,7 @@ export default { ...@@ -166,7 +213,7 @@ export default {
methods: { methods: {
seachFun() { seachFun() {
this.$seach this.$seach
.submmit(this, car.getCarBrandList) .submmit(this, repair.getRepairWorkerList)
.then(res => { .then(res => {
this.dataOption = res.data.data; this.dataOption = res.data.data;
// 初始化分页数据 // 初始化分页数据
...@@ -234,10 +281,10 @@ export default { ...@@ -234,10 +281,10 @@ export default {
// alert(`编辑${JSON.stringify(this.dialogBindData)}`); // alert(`编辑${JSON.stringify(this.dialogBindData)}`);
// } // }
// 发送添加请求 // 发送添加请求
const isSubmitActive = this.dialogBindData.carBrandName; const isSubmitActive = this.dialogBindData.repairWorkerName&&this.dialogBindData.repairWorkerPhone&&this.dialogBindData.repairWorkerIdCard;
if (isSubmitActive) { if (isSubmitActive) {
this.submmitSuccess = true; this.submmitSuccess = true;
car.addOrEditCarBrand(this.dialogBindData).then(res => { repair.addOrEditRepairWorker(this.dialogBindData).then(res => {
this.getList(() => { this.getList(() => {
this.$message({ this.$message({
message: this.dialogType === 1 ? "添加成功" : "编辑成功", message: this.dialogType === 1 ? "添加成功" : "编辑成功",
...@@ -278,21 +325,9 @@ export default { ...@@ -278,21 +325,9 @@ export default {
}, },
// 获取表格数据 // 获取表格数据
getList(cb) { getList(cb) {
repair
let param = { .getRepairWorkerList({ pageNo: this.pageNo, pageSize: this.pageSize })
pageNo: this.pageNo,
pageSize: this.pageSize
};
// 组装搜索参数
for (const key in this.seacherParam) {
if (this.seacherParam[key]===0 || this.seacherParam[key]) {
param[key] = this.seacherParam[key]
}
}
car
.getCarBrandList(param)
.then(res => { .then(res => {
debugger
// 初始话表格数据 // 初始话表格数据
this.dataOption = res.data.data; this.dataOption = res.data.data;
// 初始化分页数据 // 初始化分页数据
......
This diff is collapsed.
...@@ -82,7 +82,6 @@ export default { ...@@ -82,7 +82,6 @@ export default {
this.loading = false this.loading = false
this.$router.push({ path: '/' }) this.$router.push({ path: '/' })
}).catch(res => { }).catch(res => {
debugger
this.loading = false this.loading = false
if(res.code==0){ if(res.code==0){
this.$message({ this.$message({
......
...@@ -371,6 +371,10 @@ export default { ...@@ -371,6 +371,10 @@ export default {
this.submmitSuccess = true; this.submmitSuccess = true;
system.addOrEditSysPermission(this.dialogBindData).then(res => { system.addOrEditSysPermission(this.dialogBindData).then(res => {
this.getList(() => { this.getList(() => {
this.$message({
message: this.dialogType === 1 ? "添加成功" : "编辑成功",
type: "success"
});
this.submmitSuccess = false; this.submmitSuccess = false;
this.handleClose(); this.handleClose();
}); });
...@@ -517,4 +521,4 @@ export default { ...@@ -517,4 +521,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -265,7 +265,7 @@ export default { ...@@ -265,7 +265,7 @@ export default {
beforeMount() { beforeMount() {
//权限添加 permName,moduleName,permType,permResource,isAvailable,menuName,ranking //权限添加 permName,moduleName,permType,permResource,isAvailable,menuName,ranking
this.getList(); this.getList();
this.getDepts(); // this.getDepts();
// const respontData = [ // const respontData = [
// { // {
// permId: "1", // permId: "1",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment