Compare commits
45 Commits
054e739905
...
caozong
| Author | SHA1 | Date | |
|---|---|---|---|
| 205e2c7ae5 | |||
| 2aabff2e90 | |||
| 185163d326 | |||
| 052fcd60b8 | |||
| fc2404a5b8 | |||
|
|
72d19bfb02 | ||
|
|
ac798f3f94 | ||
|
|
0ba4d3fe26 | ||
| a2c29e8dda | |||
| 9631dba573 | |||
| ed848edfd9 | |||
| f8eda78cf7 | |||
| 6b22078098 | |||
| 13f3fd4377 | |||
| d41a186e22 | |||
| 0a771cfa54 | |||
|
|
fe708bd2a8 | ||
| 6c71bccd83 | |||
| 2c0bc99c03 | |||
| fd24f914f7 | |||
| 59f5885669 | |||
| f83a81c02a | |||
| 153e7e766c | |||
| 8bc6ec10c4 | |||
| 85a36e7fd9 | |||
| f727796d1f | |||
|
|
e756980625 | ||
| be38cebe38 | |||
|
|
3454ff1bd5 | ||
| 50a64770ee | |||
|
|
cf049fc1e8 | ||
|
|
00fa8e4d84 | ||
|
|
dd53612b39 | ||
| 25cd675698 | |||
| 15622a2e5a | |||
| ca533e85e3 | |||
| b27a46f037 | |||
| 7b1afb53da | |||
| 63eb91e64c | |||
| ba59394115 | |||
| 2cdb072ab8 | |||
|
|
155f9009fc | ||
| 9800001876 | |||
| 60a2a27e61 | |||
| 01d8c27b48 |
@@ -1,11 +1,20 @@
|
||||
###
|
||||
# @Author: riverQiu
|
||||
# @Date: 2023-08-16 22:04:23
|
||||
# @LastEditors: riverQiu
|
||||
# @LastEditTime: 2023-08-18 23:22:27
|
||||
# @Description:
|
||||
###
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 若依管理系统
|
||||
VUE_APP_TITLE = 开心学车管理系统
|
||||
|
||||
# 开发环境配置
|
||||
ENV = 'development'
|
||||
|
||||
# 对嘛管理系统/开发环境
|
||||
# 开心学车管理系统/开发环境
|
||||
VUE_APP_BASE_API = '/dev-api'
|
||||
|
||||
JWL_API = ''
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 对嘛管理系统
|
||||
VUE_APP_TITLE = 开心学车管理系统
|
||||
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
||||
# 对嘛管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/duima'
|
||||
# 开心学车管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/zhaosheng'
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 对嘛管理系统
|
||||
VUE_APP_TITLE = 开心学车管理系统
|
||||
|
||||
NODE_ENV = production
|
||||
|
||||
# 测试环境配置
|
||||
ENV = 'staging'
|
||||
|
||||
# 对嘛管理系统/测试环境
|
||||
# 开心学车管理系统/测试环境
|
||||
VUE_APP_BASE_API = '/stage-api'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "river",
|
||||
"version": "1.0.0",
|
||||
"description": "若依管理系统",
|
||||
"author": "对嘛",
|
||||
"description": "开心学车管理系统",
|
||||
"author": "开心学车",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
|
||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 20 KiB |
BIN
public/favicon1.ico
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
public/favicon2.ico
Normal file
|
After Width: | Height: | Size: 137 KiB |
@@ -27,13 +27,13 @@
|
||||
padding: 0.2em 0;
|
||||
}
|
||||
.logo {
|
||||
position: absolute;
|
||||
/* position: absolute; */
|
||||
display: block;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
/* left: 50%;
|
||||
top: 50%; */
|
||||
width: 100px;
|
||||
/* height: 162px; */
|
||||
transform: translate3d(-50%, -80px, 0);
|
||||
/* transform: translate3d(-50%, -80px, 0); */
|
||||
animation: twinkling 1.2s infinite ease-in-out;
|
||||
}
|
||||
/* .animated {
|
||||
@@ -54,21 +54,22 @@
|
||||
}
|
||||
}
|
||||
.loading {
|
||||
position: absolute;
|
||||
/* position: absolute; */
|
||||
margin-top: 40px;
|
||||
display: block;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate3d(-50%, 80px, 0);
|
||||
/* left: 50%; */
|
||||
/* top: 50%; */
|
||||
/* transform: translate3d(-50%, 80px, 0); */
|
||||
color: #fefeff;
|
||||
font-size: 14px;
|
||||
}
|
||||
canvas {
|
||||
/* canvas {
|
||||
display: block;
|
||||
left: 50%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate3d(-50%, 100px, 0);
|
||||
}
|
||||
} */
|
||||
|
||||
#loader-wrapper {
|
||||
position: relative;
|
||||
@@ -76,6 +77,10 @@
|
||||
height: 100%;
|
||||
background: #1a1a34;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
<script src="/loading/prefixfree.min.js"></script>
|
||||
@@ -90,10 +95,10 @@
|
||||
<script src="/loading/index.js"></script>
|
||||
<script type="text/javascript">
|
||||
window._AMapSecurityConfig = {
|
||||
securityJsCode:'420463f2f8c849ab78b9d29548aff7d3',
|
||||
}
|
||||
</script>
|
||||
<script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
|
||||
<script src="https://webapi.amap.com/maps?v=1.4.15&key=ec6b7ebe38f7ff27126f7088d87a9091&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder,AMap.Scale"></script>
|
||||
</body>
|
||||
securityJsCode: 'e7783f9551b7b38e1f485f99cb7d986f'
|
||||
};
|
||||
</script>
|
||||
<script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
|
||||
<script src="https://webapi.amap.com/maps?v=1.4.15&key=e92870cebfb5c7a9139f77bca1e7997a&plugin=AMap.Autocomplete,AMap.PlaceSearch,AMap.Geocoder,AMap.Scale"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
BIN
public/logo.png
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 20 KiB |
BIN
public/logo1.png
Normal file
|
After Width: | Height: | Size: 137 KiB |
54
src/api/finance/expense/accountExpense.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询报销列表
|
||||
export function listExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/account/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 新增报销
|
||||
export function addExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/account',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改报销
|
||||
export function updateExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/account',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除报销
|
||||
export function removeExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/account/' + data,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出报销
|
||||
export function exportExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/account/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 审核报销
|
||||
export function checkExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/account/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
54
src/api/finance/expense/meituanExpense.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询报销列表
|
||||
export function listExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 新增报销
|
||||
export function addExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改报销
|
||||
export function updateExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除报销
|
||||
export function removeExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan/' + data,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出报销
|
||||
export function exportExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 审核报销
|
||||
export function checkExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/meituan/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
54
src/api/finance/expense/officeExpense.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询报销列表
|
||||
export function listExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/office/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 新增报销
|
||||
export function addExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/office',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改报销
|
||||
export function updateExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/office',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除报销
|
||||
export function removeExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/office/remove/' + data,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出报销
|
||||
export function exportExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/office/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 审核报销
|
||||
export function checkExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/office/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
54
src/api/finance/expense/placeSignExpense.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询报销列表
|
||||
export function listExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 新增报销
|
||||
export function addExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改报销
|
||||
export function updateExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除报销
|
||||
export function removeExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign/' + data,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出报销
|
||||
export function exportExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 审核报销
|
||||
export function checkExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/placeSign/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
54
src/api/finance/expense/signExpense.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询报销列表
|
||||
export function listExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/sign/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 新增报销
|
||||
export function addExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/sign',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改报销
|
||||
export function updateExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/sign',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除报销
|
||||
export function removeExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/sign/remove/' + data,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
// 导出报销
|
||||
export function exportExpense(query) {
|
||||
return request({
|
||||
url: '/finance/expense/sign/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 审核报销
|
||||
export function checkExpense(data) {
|
||||
return request({
|
||||
url: '/finance/expense/sign/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
56
src/api/home.js
Normal file
@@ -0,0 +1,56 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取首页统计信息
|
||||
export function getCount() {
|
||||
return request({
|
||||
url: '/system/home/count',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getTodayPeopleRange() {
|
||||
return request({
|
||||
url: '/system/home/range/today',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getMonthPeopleRange() {
|
||||
return request({
|
||||
url: '/system/home/range/month',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//查询成交率
|
||||
export function dealRate() {
|
||||
return request({
|
||||
url: '/system/home/rate/total',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
//查询本月成交率
|
||||
export function getMonthDealRateRange() {
|
||||
return request({
|
||||
url: '/system/home/rate/month',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//查询上月成交率
|
||||
export function getLastDealRateRange() {
|
||||
return request({
|
||||
url: '/system/home/rate/last',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//查询考勤异常信息
|
||||
export function getCheckin() {
|
||||
return request({
|
||||
url: '/system/home/checkin',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -68,3 +68,12 @@ export function getCodeImg() {
|
||||
timeout: 20000
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function getMsgCode(data) {
|
||||
return request({
|
||||
url: '/msgcode',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
35
src/api/question.js
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-08-17 20:30:56
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-08-19 00:26:04
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 获取首页统计信息
|
||||
export function searchQuestion(param) {
|
||||
return request({
|
||||
url: '/driver-api/tdQuestion/duima/list',
|
||||
method: 'get',
|
||||
params: param
|
||||
});
|
||||
}
|
||||
|
||||
export function updateQuestion(data) {
|
||||
return request({
|
||||
url: '/driver-api/tdQuestion/duima/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function addQuestion(data) {
|
||||
return request({
|
||||
url: '/driver-api/tdQuestion/duima/add',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,16 @@ export function getClassTypeTableList(query) {
|
||||
});
|
||||
}
|
||||
|
||||
// 查询班型列表
|
||||
export function getAllList(query) {
|
||||
return request({
|
||||
url: '/sch/classType/all',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 新增班型
|
||||
export function insertClassType(params) {
|
||||
return request({
|
||||
|
||||
59
src/api/sch/coach.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-07 17:14:32
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-10 17:00:57
|
||||
* @Description:教练接口
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询教练列表
|
||||
export function listCoach(query) {
|
||||
return request({
|
||||
url: '/sch/coach/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询教练详细
|
||||
export function getCoach(coachId) {
|
||||
return request({
|
||||
url: '/sch/coach/' + coachId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增教练
|
||||
export function addCoach(data) {
|
||||
return request({
|
||||
url: '/sch/coach',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改教练
|
||||
export function updateCoach(data) {
|
||||
return request({
|
||||
url: '/sch/coach',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除教练
|
||||
export function delCoach(coachId) {
|
||||
return request({
|
||||
url: '/sch/coach/' + coachId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
export function getAllCoaches(query){
|
||||
return request({
|
||||
url: '/sch/coach/all',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
@@ -17,8 +17,8 @@ export async function updateSchoolStatus(data) {
|
||||
});
|
||||
}
|
||||
|
||||
// 保存场地状态
|
||||
export function savePlace(data) {
|
||||
// 新增
|
||||
export function addPlace(data) {
|
||||
return request({
|
||||
url: '/sch/place',
|
||||
method: 'post',
|
||||
@@ -27,6 +27,16 @@ export function savePlace(data) {
|
||||
}
|
||||
|
||||
|
||||
// 修改场地
|
||||
export function updatePlace(data) {
|
||||
return request({
|
||||
url: '/sch/place',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 查询场地
|
||||
export function getAllPlaces(param) {
|
||||
return request({
|
||||
|
||||
@@ -7,6 +7,13 @@ export default {
|
||||
params: data
|
||||
});
|
||||
},
|
||||
allList(data = {}) {
|
||||
return request({
|
||||
url: '/sch/school/all',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
},
|
||||
getById(id) {
|
||||
return request({
|
||||
url: `/sch/school/${id}`,
|
||||
@@ -32,5 +39,11 @@ export default {
|
||||
url: `/sch/school/${id}`,
|
||||
method: 'delete'
|
||||
});
|
||||
},
|
||||
createCode(id){
|
||||
return request({
|
||||
url: `/sch/school/create/${id}`,
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
44
src/api/sch/shop.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询抖音门店列表
|
||||
export function listShop(query) {
|
||||
return request({
|
||||
url: '/system/shop/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询抖音门店详细
|
||||
export function getShop(shopId) {
|
||||
return request({
|
||||
url: '/system/shop/' + shopId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增抖音门店
|
||||
export function addShop(data) {
|
||||
return request({
|
||||
url: '/system/shop',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改抖音门店
|
||||
export function updateShop(data) {
|
||||
return request({
|
||||
url: '/system/shop',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除抖音门店
|
||||
export function delShop(shopId) {
|
||||
return request({
|
||||
url: '/system/shop/' + shopId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
10
src/api/statistic/areaStudent.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询场地学员统计
|
||||
export function listReport(query) {
|
||||
return request({
|
||||
url: '/statistic/area/student/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
10
src/api/statistic/placeStudent.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询场地学员统计
|
||||
export function listReport(query) {
|
||||
return request({
|
||||
url: '/statistic/place/student/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
@@ -38,5 +38,12 @@ export default {
|
||||
url: '/system/employee/getEmployees',
|
||||
method: 'get'
|
||||
});
|
||||
},
|
||||
|
||||
getSignPlace(userId) {
|
||||
return request({
|
||||
url: '/system/employee/signPlace/' + userId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
59
src/api/system/skill.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-14 00:31:37
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-15 00:37:52
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询关键话术列表
|
||||
export function listSkill(query) {
|
||||
return request({
|
||||
url: '/system/skill/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询关键话术详细
|
||||
export function getSkill(skillId) {
|
||||
return request({
|
||||
url: '/system/skill/' + skillId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function getSkillKey() {
|
||||
return request({
|
||||
url: '/system/skill/key',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增关键话术
|
||||
export function addSkill(data) {
|
||||
return request({
|
||||
url: '/system/skill',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改关键话术
|
||||
export function updateSkill(data) {
|
||||
return request({
|
||||
url: '/system/skill',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除关键话术
|
||||
export function delSkill(skillId) {
|
||||
return request({
|
||||
url: '/system/skill/' + skillId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
39
src/api/vip.js
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询车型列表
|
||||
export function getCarList(param) {
|
||||
return request({
|
||||
url: '/driver-api/tdSysUserMember/duima/car/list',
|
||||
method: 'get',
|
||||
params: param
|
||||
});
|
||||
}
|
||||
|
||||
// 查询会员列表
|
||||
export function getMemberList(param) {
|
||||
return request({
|
||||
url: '/driver-api/tdSysUserMember/duima/member/list',
|
||||
method: 'get',
|
||||
params: param
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 查询用户会员列表
|
||||
export function getUserMemberList(param) {
|
||||
return request({
|
||||
url: '/driver-api/tdSysUserMember/duima/user/member/list',
|
||||
method: 'get',
|
||||
params: param
|
||||
});
|
||||
}
|
||||
|
||||
//新增会员
|
||||
export function addUserMember(data) {
|
||||
return request({
|
||||
url: '/driver-api/tdSysUserMember/duima/user/member',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
@@ -117,17 +117,16 @@ export function getDistributeRecord(param) {
|
||||
// 查询跟踪记录
|
||||
export function getFollowRecord(param) {
|
||||
return request({
|
||||
url: '/zs/clue/followrecord',
|
||||
url: '/zs/followrecord/list',
|
||||
method: 'get',
|
||||
params: param
|
||||
});
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
//查询咨询记录
|
||||
export function getConsultRecord(param) {
|
||||
return request({
|
||||
url: '/zs/clue/consultrecord',
|
||||
url: '/zs/consultrecord/list',
|
||||
method: 'get',
|
||||
params: param
|
||||
});
|
||||
@@ -192,3 +191,30 @@ export function updateAccept(data) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//查询线索分发信息
|
||||
export function getCluePlaceList(data) {
|
||||
return request({
|
||||
url: `/zs/clue/place/info`,
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
}
|
||||
|
||||
//保存线索分发信息
|
||||
export function saveCluePlace(data) {
|
||||
return request({
|
||||
url: `/zs/clue/place`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
export function getFollowCount() {
|
||||
return request({
|
||||
url: `/zs/clue/follow/count`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
51
src/api/zs/feedback.js
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-07 17:14:38
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-07 17:14:44
|
||||
* @Description: 线索反馈接口
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询线索反馈列表
|
||||
export function listFeedback(query) {
|
||||
return request({
|
||||
url: '/zs/feedback/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索反馈详细
|
||||
export function getFeedback(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/' + feedbackId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增线索反馈
|
||||
export function addFeedback(data) {
|
||||
return request({
|
||||
url: '/zs/feedback',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改线索反馈
|
||||
export function updateFeedback(data) {
|
||||
return request({
|
||||
url: '/zs/feedback',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除线索反馈
|
||||
export function delFeedback(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/' + feedbackId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
93
src/api/zs/feedbackDetail.js
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-11 20:48:02
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-11 20:57:06
|
||||
* @Description:
|
||||
*/
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-10 16:08:39
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-10 16:10:06
|
||||
* @Description: 反馈单
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询线索反馈列表
|
||||
export function listFeedbackDetail(query) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索反馈详细
|
||||
export function getFeedbackDetail(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail/' + feedbackId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
export function getFeedbackDetailInfo(query){
|
||||
return request({
|
||||
url: '/zs/feedback/detail/info',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索反馈详细
|
||||
export function getFeedbackDetailByClueId(clueId) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail/' + clueId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增线索反馈
|
||||
export function addFeedbackDetail(data) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改线索反馈
|
||||
export function updateFeedbackDetail(data) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除线索反馈
|
||||
export function delFeedbackDetail(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/detail/' + feedbackId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
//查询接待人统计
|
||||
export function getCount(param){
|
||||
return request({
|
||||
url: '/zs/feedback/detail/count',
|
||||
method: 'get',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//查询接待人接待详情
|
||||
export function getCountDetail(param){
|
||||
return request({
|
||||
url: '/zs/feedback/detail/count/detail',
|
||||
method: 'get',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
59
src/api/zs/feedbackOrder.js
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-10-10 16:08:39
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-10 16:10:06
|
||||
* @Description: 反馈单
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询线索反馈列表
|
||||
export function listFeedbackOrder(query) {
|
||||
return request({
|
||||
url: '/zs/feedback/order/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索反馈详细
|
||||
export function getFeedbackOrder(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/order/' + feedbackId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 查询线索反馈详细
|
||||
export function getFeedbackOrderByClueId(clueId) {
|
||||
return request({
|
||||
url: '/zs/feedback/order/' + clueId,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 新增线索反馈
|
||||
export function addFeedbackOrder(data) {
|
||||
return request({
|
||||
url: '/zs/feedback/order',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 修改线索反馈
|
||||
export function updateFeedbackOrder(data) {
|
||||
return request({
|
||||
url: '/zs/feedback/order',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 删除线索反馈
|
||||
export function delFeedbackOrder(feedbackId) {
|
||||
return request({
|
||||
url: '/zs/feedback/order/' + feedbackId,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
53
src/api/zs/invitation.js
Normal file
@@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询邀约列表
|
||||
export function listInvitation(query) {
|
||||
return request({
|
||||
url: '/zs/invitation/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询邀约详细
|
||||
export function getInvitation(invitationId) {
|
||||
return request({
|
||||
url: '/zs/invitation/' + invitationId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询邀约详细
|
||||
export function getInvitationByClue(query) {
|
||||
return request({
|
||||
url: '/zs/invitation/clue',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 新增邀约
|
||||
export function addInvitation(data) {
|
||||
return request({
|
||||
url: '/zs/invitation',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改邀约
|
||||
export function updateInvitation(data) {
|
||||
return request({
|
||||
url: '/zs/invitation',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除邀约
|
||||
export function delInvitation(invitationId) {
|
||||
return request({
|
||||
url: '/zs/invitation/' + invitationId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -3,16 +3,16 @@ import request from '@/utils/request'
|
||||
// 查询报名点成交登记列表
|
||||
export function listSign(query) {
|
||||
return request({
|
||||
url: '/zs/officesign/list',
|
||||
url: '/zs/placeSign/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询报名点成交登记详细
|
||||
export function getSign(officesignId) {
|
||||
export function getSign(placeSignId) {
|
||||
return request({
|
||||
url: '/zs/officesign/' + officesignId,
|
||||
url: '/zs/placeSign/' + placeSignId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -20,7 +20,7 @@ export function getSign(officesignId) {
|
||||
// 新增报名点成交登记
|
||||
export function addSign(data) {
|
||||
return request({
|
||||
url: '/zs/officesign',
|
||||
url: '/zs/placeSign',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -29,16 +29,16 @@ export function addSign(data) {
|
||||
// 修改报名点成交登记
|
||||
export function updateSign(data) {
|
||||
return request({
|
||||
url: '/zs/officesign',
|
||||
url: '/zs/placeSign',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除报名点成交登记
|
||||
export function delSign(officesignId) {
|
||||
export function delSign(placeSignId) {
|
||||
return request({
|
||||
url: '/zs/officesign/' + officesignId,
|
||||
url: '/zs/placeSign/' + placeSignId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -46,7 +46,7 @@ export function delSign(officesignId) {
|
||||
//审核登记
|
||||
export function checkSign(data) {
|
||||
return request({
|
||||
url: '/zs/officesign/check',
|
||||
url: '/zs/placeSign/check',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 20 KiB |
BIN
src/assets/logo/logo1.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
src/assets/logo/logo2.png
Normal file
|
After Width: | Height: | Size: 137 KiB |
@@ -10,7 +10,6 @@ export default {
|
||||
const { value } = binding;
|
||||
const all_permission = '*:*:*';
|
||||
const permissions = store.getters && store.getters.permissions;
|
||||
|
||||
if (value && value instanceof Array && value.length > 0) {
|
||||
const permissionFlag = value;
|
||||
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
<div class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
|
||||
<breadcrumb v-if="!topNav" id="breadcrumb-container" class="breadcrumb-container" />
|
||||
<top-nav v-if="topNav" id="topmenu-container" class="topmenu-container" />
|
||||
<!-- <breadcrumb v-if="!topNav" id="breadcrumb-container" class="breadcrumb-container" /> -->
|
||||
<!-- <top-nav v-if="topNav" id="topmenu-container" class="topmenu-container" /> -->
|
||||
<!-- <tags-view v-if="needTagsView" /> -->
|
||||
|
||||
<div class="right-menu">
|
||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||
@@ -32,12 +33,15 @@ import { mapGetters } from 'vuex';
|
||||
import Breadcrumb from '@/components/Breadcrumb';
|
||||
import TopNav from '@/components/TopNav';
|
||||
import Hamburger from '@/components/Hamburger';
|
||||
import TagsView from '././TagsView';
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Breadcrumb,
|
||||
TopNav,
|
||||
Hamburger
|
||||
Hamburger,
|
||||
TagsView
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['sidebar', 'avatar', 'device']),
|
||||
@@ -56,6 +60,11 @@ export default {
|
||||
get() {
|
||||
return this.$store.state.settings.topNav;
|
||||
}
|
||||
},
|
||||
needTagsView: {
|
||||
get() {
|
||||
return this.$store.state.settings.tagsView;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -73,7 +82,7 @@ export default {
|
||||
location.href = '/index';
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '若依管理系统',
|
||||
title: '开心学车管理系统',
|
||||
logo: logoImg
|
||||
};
|
||||
},
|
||||
|
||||
@@ -1,22 +1,33 @@
|
||||
/*
|
||||
* @Author: riverQiu
|
||||
* @Date: 2023-08-16 22:04:23
|
||||
* @LastEditors: riverQiu
|
||||
* @LastEditTime: 2023-10-11 22:17:43
|
||||
* @Description:
|
||||
*/
|
||||
import router from './router';
|
||||
import store from './store';
|
||||
import {
|
||||
Message
|
||||
} from 'element-ui';
|
||||
import { Message } from 'element-ui';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
import {
|
||||
getToken
|
||||
} from '@/utils/auth';
|
||||
import {
|
||||
isRelogin
|
||||
} from '@/utils/request';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { isRelogin } from '@/utils/request';
|
||||
|
||||
NProgress.configure({
|
||||
showSpinner: false
|
||||
});
|
||||
|
||||
const whiteList = ['/login', '/auth-redirect', '/bind', '/register'];
|
||||
const whiteList = [
|
||||
'/login',
|
||||
'/auth-redirect',
|
||||
'/bind',
|
||||
'/register',
|
||||
'/question',
|
||||
'/clue/feedback/follow',
|
||||
'/clue/feedback/arrival',
|
||||
'/coach/count',
|
||||
'/coach/count/detail'
|
||||
];
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
NProgress.start();
|
||||
|
||||
@@ -29,14 +29,17 @@ import Layout from '@/layout';
|
||||
*/
|
||||
|
||||
// 公共路由
|
||||
export const constantRoutes = [{
|
||||
export const constantRoutes = [
|
||||
{
|
||||
path: '/redirect',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: '/redirect/:path(.*)',
|
||||
component: () => import('@/views/redirect')
|
||||
}]
|
||||
children: [
|
||||
{
|
||||
path: '/redirect/:path(.*)',
|
||||
component: () => import('@/views/redirect')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
@@ -48,6 +51,31 @@ export const constantRoutes = [{
|
||||
component: () => import('@/views/register'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/question',
|
||||
component: () => import('@/views/question'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/clue/feedback/follow',
|
||||
component: () => import('@/views/zs/feedback/follow'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/clue/feedback/arrival',
|
||||
component: () => import('@/views/zs/feedback/arrival'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/coach/count',
|
||||
component: () => import('@/views/sch/coach/count'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/coach/count/detail',
|
||||
component: () => import('@/views/sch/coach/count/detail'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: () => import('@/views/error/404'),
|
||||
@@ -62,16 +90,18 @@ export const constantRoutes = [{
|
||||
path: '',
|
||||
component: Layout,
|
||||
redirect: 'index',
|
||||
children: [{
|
||||
path: 'index',
|
||||
component: () => import('@/views/index'),
|
||||
name: 'Index',
|
||||
meta: {
|
||||
title: '首页',
|
||||
icon: 'dashboard',
|
||||
affix: true
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/index'),
|
||||
name: 'Index',
|
||||
meta: {
|
||||
title: '首页',
|
||||
icon: 'dashboard',
|
||||
affix: true
|
||||
}
|
||||
}
|
||||
}]
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/demo',
|
||||
@@ -106,93 +136,106 @@ export const constantRoutes = [{
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
redirect: 'noredirect',
|
||||
children: [{
|
||||
path: 'profile',
|
||||
component: () => import('@/views/system/user/profile/index'),
|
||||
name: 'Profile',
|
||||
meta: {
|
||||
title: '个人中心',
|
||||
icon: 'user'
|
||||
children: [
|
||||
{
|
||||
path: 'profile',
|
||||
component: () => import('@/views/system/user/profile/index'),
|
||||
name: 'Profile',
|
||||
meta: {
|
||||
title: '个人中心',
|
||||
icon: 'user'
|
||||
}
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
// 动态路由,基于用户权限动态去加载
|
||||
export const dynamicRoutes = [{
|
||||
export const dynamicRoutes = [
|
||||
{
|
||||
path: '/system/user-auth',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:user:edit'],
|
||||
children: [{
|
||||
path: 'role/:userId(\\d+)',
|
||||
component: () => import('@/views/system/user/authRole'),
|
||||
name: 'AuthRole',
|
||||
meta: {
|
||||
title: '分配角色',
|
||||
activeMenu: '/system/user'
|
||||
children: [
|
||||
{
|
||||
path: 'role/:userId(\\d+)',
|
||||
component: () => import('@/views/system/user/authRole'),
|
||||
name: 'AuthRole',
|
||||
meta: {
|
||||
title: '分配角色',
|
||||
activeMenu: '/system/user'
|
||||
}
|
||||
}
|
||||
}]
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/system/role-auth',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:role:edit'],
|
||||
children: [{
|
||||
path: 'user/:roleId(\\d+)',
|
||||
component: () => import('@/views/system/role/authUser'),
|
||||
name: 'AuthUser',
|
||||
meta: {
|
||||
title: '分配用户',
|
||||
activeMenu: '/system/role'
|
||||
children: [
|
||||
{
|
||||
path: 'user/:roleId(\\d+)',
|
||||
component: () => import('@/views/system/role/authUser'),
|
||||
name: 'AuthUser',
|
||||
meta: {
|
||||
title: '分配用户',
|
||||
activeMenu: '/system/role'
|
||||
}
|
||||
}
|
||||
}]
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/system/dict-data',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['system:dict:list'],
|
||||
children: [{
|
||||
path: 'index/:dictId(\\d+)',
|
||||
component: () => import('@/views/system/dict/data'),
|
||||
name: 'Data',
|
||||
meta: {
|
||||
title: '字典数据',
|
||||
activeMenu: '/system/dict'
|
||||
children: [
|
||||
{
|
||||
path: 'index/:dictId(\\d+)',
|
||||
component: () => import('@/views/system/dict/data'),
|
||||
name: 'Data',
|
||||
meta: {
|
||||
title: '字典数据',
|
||||
activeMenu: '/system/dict'
|
||||
}
|
||||
}
|
||||
}]
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/monitor/job-log',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['monitor:job:list'],
|
||||
children: [{
|
||||
path: 'index',
|
||||
component: () => import('@/views/monitor/job/log'),
|
||||
name: 'JobLog',
|
||||
meta: {
|
||||
title: '调度日志',
|
||||
activeMenu: '/monitor/job'
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/monitor/job/log'),
|
||||
name: 'JobLog',
|
||||
meta: {
|
||||
title: '调度日志',
|
||||
activeMenu: '/monitor/job'
|
||||
}
|
||||
}
|
||||
}]
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/zs/clue-form',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['zs:clue:add', 'zs:clue:edit'],
|
||||
children: [{
|
||||
path: 'index/:clueId(\\d+)',
|
||||
component: () => import('@/views/zs/clue/ClueForm'),
|
||||
name: 'ClueForm',
|
||||
meta: {
|
||||
title: '线索详情',
|
||||
activeMenu: '/zs/clue'
|
||||
children: [
|
||||
{
|
||||
path: 'index/:clueId(\\d+)',
|
||||
component: () => import('@/views/zs/clue/ClueForm'),
|
||||
name: 'ClueForm',
|
||||
meta: {
|
||||
title: '线索详情',
|
||||
activeMenu: '/zs/clue'
|
||||
}
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ const user = {
|
||||
.then((res) => {
|
||||
setToken(res.token);
|
||||
commit('SET_TOKEN', res.token);
|
||||
resolve();
|
||||
resolve(res);
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
|
||||
@@ -34,7 +34,7 @@ const service = axios.create({
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
// 超时
|
||||
timeout: 10000
|
||||
timeout: 120000
|
||||
});
|
||||
|
||||
// request拦截器
|
||||
|
||||
@@ -73,20 +73,10 @@ export function addDateRange(params, dateRange, propName) {
|
||||
|
||||
// 回显数据字典
|
||||
export function selectDictLabel(datas, value) {
|
||||
if (value === undefined) {
|
||||
if (value == undefined) {
|
||||
return '';
|
||||
}
|
||||
var actions = [];
|
||||
Object.keys(datas).some((key) => {
|
||||
if (datas[key].value === '' + value) {
|
||||
actions.push(datas[key].label);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (actions.length === 0) {
|
||||
actions.push(value);
|
||||
}
|
||||
return actions.join('');
|
||||
return datas.find((item) => item.dictValue == value).dictLabel;
|
||||
}
|
||||
|
||||
// 回显数据字典(字符串数组)
|
||||
|
||||
111
src/views/dashboard/BarChart-bak.vue
Normal file
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<div :class="className" :style="{height:height,width:width}" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts';
|
||||
require('echarts/theme/macarons'); // echarts theme
|
||||
import resize from './mixins/resize';
|
||||
|
||||
const animationDuration = 6000;
|
||||
|
||||
export default {
|
||||
mixins: [resize],
|
||||
props: {
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initChart();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return;
|
||||
}
|
||||
this.chart.dispose();
|
||||
this.chart = null;
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
this.chart = echarts.init(this.$el, 'macarons');
|
||||
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
// 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top: 10,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
axisTick: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: 'pageA',
|
||||
type: 'bar',
|
||||
stack: 'vistors',
|
||||
barWidth: '60%',
|
||||
data: [79, 52, 200, 334, 390, 330, 220],
|
||||
animationDuration
|
||||
},
|
||||
{
|
||||
name: 'pageB',
|
||||
type: 'bar',
|
||||
stack: 'vistors',
|
||||
barWidth: '60%',
|
||||
data: [80, 52, 200, 334, 390, 330, 220],
|
||||
animationDuration
|
||||
},
|
||||
{
|
||||
name: 'pageC',
|
||||
type: 'bar',
|
||||
stack: 'vistors',
|
||||
barWidth: '60%',
|
||||
data: [30, 52, 200, 334, 390, 330, 220],
|
||||
animationDuration
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,111 +1,101 @@
|
||||
<template>
|
||||
<div :class="className" :style="{height:height,width:width}" />
|
||||
<div class="chart" style="height:200px;width:100%;" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts';
|
||||
require('echarts/theme/macarons'); // echarts theme
|
||||
import resize from './mixins/resize';
|
||||
import * as echarts from 'echarts'
|
||||
require('echarts/theme/macarons') // echarts theme
|
||||
import resize from './mixins/resize'
|
||||
import { getTodayPeopleRange, getMonthPeopleRange } from '@/api/home'
|
||||
|
||||
const animationDuration = 6000;
|
||||
const animationDuration = 6000
|
||||
|
||||
export default {
|
||||
mixins: [resize],
|
||||
props: {
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
}
|
||||
},
|
||||
// props: {
|
||||
// className: {
|
||||
// type: String,
|
||||
// default: 'chart'
|
||||
// },
|
||||
// width: {
|
||||
// type: String,
|
||||
// default: '100%'
|
||||
// },
|
||||
// height: {
|
||||
// type: String,
|
||||
// default: '300px'
|
||||
// }
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
};
|
||||
chart: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initChart();
|
||||
});
|
||||
getTodayPeopleRange().then((resp) => {
|
||||
this.initChart(resp.data)
|
||||
})
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
this.chart.dispose();
|
||||
this.chart = null;
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
this.chart = echarts.init(this.$el, 'macarons');
|
||||
initChart(item) {
|
||||
this.chart = echarts.init(this.$el, 'macarons')
|
||||
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
// 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
type: 'shadow', // 默认为直线,可选为:'line' | 'shadow'
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
top: 10,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
containLabel: true,
|
||||
},
|
||||
legend: {
|
||||
data: ['人数'],
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
}
|
||||
}
|
||||
data: item.people,
|
||||
// axisTick: {
|
||||
// alignWithLabel: true
|
||||
// }
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
axisTick: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
// axisTick: {
|
||||
// show: false
|
||||
// }
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: 'pageA',
|
||||
name: '成交学员数',
|
||||
type: 'bar',
|
||||
stack: 'vistors',
|
||||
barWidth: '60%',
|
||||
data: [79, 52, 200, 334, 390, 330, 220],
|
||||
animationDuration
|
||||
// stack: 'vistors',
|
||||
barWidth: 40,
|
||||
data: item.data,
|
||||
// animationDuration
|
||||
},
|
||||
{
|
||||
name: 'pageB',
|
||||
type: 'bar',
|
||||
stack: 'vistors',
|
||||
barWidth: '60%',
|
||||
data: [80, 52, 200, 334, 390, 330, 220],
|
||||
animationDuration
|
||||
},
|
||||
{
|
||||
name: 'pageC',
|
||||
type: 'bar',
|
||||
stack: 'vistors',
|
||||
barWidth: '60%',
|
||||
data: [30, 52, 200, 334, 390, 330, 220],
|
||||
animationDuration
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
],
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
102
src/views/dashboard/BarChart1.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<!-- 本月成交排行榜 -->
|
||||
<div class="chart" style="height:200px;width:100%;" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
require('echarts/theme/macarons') // echarts theme
|
||||
import resize from './mixins/resize'
|
||||
import { getTodayPeopleRange, getMonthPeopleRange } from '@/api/home'
|
||||
|
||||
const animationDuration = 6000
|
||||
|
||||
export default {
|
||||
mixins: [resize],
|
||||
// props: {
|
||||
// className: {
|
||||
// type: String,
|
||||
// default: 'chart'
|
||||
// },
|
||||
// width: {
|
||||
// type: String,
|
||||
// default: '100%'
|
||||
// },
|
||||
// height: {
|
||||
// type: String,
|
||||
// default: '300px'
|
||||
// }
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
getMonthPeopleRange().then((resp) => {
|
||||
this.initChart(resp.data)
|
||||
})
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart(item) {
|
||||
this.chart = echarts.init(this.$el, 'macarons')
|
||||
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
// 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow', // 默认为直线,可选为:'line' | 'shadow'
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
top: 10,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true,
|
||||
},
|
||||
legend: {
|
||||
data: ['人数'],
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: item.people,
|
||||
// axisTick: {
|
||||
// alignWithLabel: true
|
||||
// }
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
// axisTick: {
|
||||
// show: false
|
||||
// }
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '成交学员数',
|
||||
type: 'bar',
|
||||
// stack: 'vistors',
|
||||
barWidth: 40,
|
||||
data: item.data,
|
||||
// animationDuration
|
||||
},
|
||||
],
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
102
src/views/dashboard/BarChart2.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<!-- 本月成交排行榜 -->
|
||||
<div class="chart" style="height:200px;width:100%;" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
require('echarts/theme/macarons') // echarts theme
|
||||
import resize from './mixins/resize'
|
||||
import { getMonthDealRateRange } from '@/api/home'
|
||||
|
||||
const animationDuration = 6000
|
||||
|
||||
export default {
|
||||
mixins: [resize],
|
||||
// props: {
|
||||
// className: {
|
||||
// type: String,
|
||||
// default: 'chart'
|
||||
// },
|
||||
// width: {
|
||||
// type: String,
|
||||
// default: '100%'
|
||||
// },
|
||||
// height: {
|
||||
// type: String,
|
||||
// default: '300px'
|
||||
// }
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
getMonthDealRateRange().then((resp) => {
|
||||
this.initChart(resp.data)
|
||||
})
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart(item) {
|
||||
this.chart = echarts.init(this.$el, 'macarons')
|
||||
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
// 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow', // 默认为直线,可选为:'line' | 'shadow'
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
top: 10,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true,
|
||||
},
|
||||
legend: {
|
||||
data: ['成交率'],
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: item.people,
|
||||
// axisTick: {
|
||||
// alignWithLabel: true
|
||||
// }
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
// axisTick: {
|
||||
// show: false
|
||||
// }
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '成交率',
|
||||
type: 'bar',
|
||||
// stack: 'vistors',
|
||||
barWidth: 40,
|
||||
data: item.data,
|
||||
// animationDuration
|
||||
},
|
||||
],
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
102
src/views/dashboard/BarChart3.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<!-- 本月成交排行榜 -->
|
||||
<div class="chart" style="height:200px;width:100%;" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
require('echarts/theme/macarons') // echarts theme
|
||||
import resize from './mixins/resize'
|
||||
import { getLastDealRateRange } from '@/api/home'
|
||||
|
||||
const animationDuration = 6000
|
||||
|
||||
export default {
|
||||
mixins: [resize],
|
||||
// props: {
|
||||
// className: {
|
||||
// type: String,
|
||||
// default: 'chart'
|
||||
// },
|
||||
// width: {
|
||||
// type: String,
|
||||
// default: '100%'
|
||||
// },
|
||||
// height: {
|
||||
// type: String,
|
||||
// default: '300px'
|
||||
// }
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
chart: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
getLastDealRateRange().then((resp) => {
|
||||
this.initChart(resp.data)
|
||||
})
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart(item) {
|
||||
this.chart = echarts.init(this.$el, 'macarons')
|
||||
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
// 坐标轴指示器,坐标轴触发有效
|
||||
type: 'shadow', // 默认为直线,可选为:'line' | 'shadow'
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
top: 10,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
containLabel: true,
|
||||
},
|
||||
legend: {
|
||||
data: ['成交率'],
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: item.people,
|
||||
// axisTick: {
|
||||
// alignWithLabel: true
|
||||
// }
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
// axisTick: {
|
||||
// show: false
|
||||
// }
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '成交率',
|
||||
type: 'bar',
|
||||
// stack: 'vistors',
|
||||
barWidth: 40,
|
||||
data: item.data,
|
||||
// animationDuration
|
||||
},
|
||||
],
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -1,24 +1,289 @@
|
||||
export const defaultColumns = {
|
||||
1: [
|
||||
{ key: 0, prop: 'spotName', label: `报名点`, visible: true },
|
||||
{ key: 1, prop: 'expenseType', label: `报销款项`, visible: true },
|
||||
{ key: 2, prop: 'expenseTotal', label: `报销金额`, visible: true },
|
||||
{ key: 3, prop: 'applyUser', label: `申请人`, visible: true },
|
||||
{ key: 4, prop: 'applyDate', label: `申请时间`, visible: true },
|
||||
{ key: 5, prop: 'applyRemark', label: `申请备注`, visible: true },
|
||||
{ key: 6, prop: 'auditStatus', label: `审批状态`, visible: true },
|
||||
{ key: 7, prop: 'auditUser', label: `审批人`, visible: true },
|
||||
{ key: 8, prop: 'auditDate', label: `审批时间`, visible: true }
|
||||
1: [{
|
||||
key: 0,
|
||||
prop: 'spotName',
|
||||
label: `报名点`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 1,
|
||||
prop: 'expenseType',
|
||||
label: `报销款项`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
prop: 'expenseTotal',
|
||||
label: `报销金额`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
prop: 'applyUser',
|
||||
label: `申请人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
prop: 'applyDate',
|
||||
label: `申请时间`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
prop: 'applyRemark',
|
||||
label: `申请备注`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
prop: 'auditStatus',
|
||||
label: `审批状态`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 7,
|
||||
prop: 'auditUser',
|
||||
label: `审批人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
prop: 'auditDate',
|
||||
label: `审批时间`,
|
||||
visible: true
|
||||
}
|
||||
],
|
||||
2: [
|
||||
{ key: 0, prop: 'stuName', label: `成交学员`, visible: true },
|
||||
{ key: 1, prop: 'expenseType', label: `报销款项`, visible: true },
|
||||
{ key: 2, prop: 'expenseTotal', label: `报销金额`, visible: true },
|
||||
{ key: 3, prop: 'applyUser', label: `申请人`, visible: true },
|
||||
{ key: 4, prop: 'applyDate', label: `申请时间`, visible: true },
|
||||
{ key: 5, prop: 'applyRemark', label: `申请备注`, visible: true },
|
||||
{ key: 6, prop: 'auditStatus', label: `审批状态`, visible: true },
|
||||
{ key: 7, prop: 'auditUser', label: `审批人`, visible: true },
|
||||
{ key: 8, prop: 'auditDate', label: `审批时间`, visible: true }
|
||||
2: [{
|
||||
key: 0,
|
||||
prop: 'stuName',
|
||||
label: `成交学员`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 1,
|
||||
prop: 'expenseType',
|
||||
label: `报销款项`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
prop: 'expenseTotal',
|
||||
label: `报销金额`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
prop: 'applyUser',
|
||||
label: `申请人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
prop: 'applyDate',
|
||||
label: `申请时间`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
prop: 'applyRemark',
|
||||
label: `申请备注`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
prop: 'auditStatus',
|
||||
label: `审批状态`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 7,
|
||||
prop: 'auditUser',
|
||||
label: `审批人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
prop: 'auditDate',
|
||||
label: `审批时间`,
|
||||
visible: true
|
||||
}
|
||||
],
|
||||
3: [{
|
||||
key: 0,
|
||||
prop: 'shop',
|
||||
label: `门店`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 1,
|
||||
prop: 'expenseType',
|
||||
label: `报销人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
prop: 'expenseTotal',
|
||||
label: `申请日期`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
prop: 'applyUser',
|
||||
label: `成交班型`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
prop: 'applyDate',
|
||||
label: `成交价格`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
prop: 'applyDate1',
|
||||
label: `实际入账`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
prop: 'applyDate1',
|
||||
label: `手续费`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 7,
|
||||
prop: 'applyRemark',
|
||||
label: `备注`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
prop: 'auditStatus',
|
||||
label: `审批状态`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 9,
|
||||
prop: 'auditUser',
|
||||
label: `审批人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 10,
|
||||
prop: 'auditDate',
|
||||
label: `审批时间`,
|
||||
visible: true
|
||||
}
|
||||
],
|
||||
4: [{
|
||||
key: 0,
|
||||
prop: 'stuName',
|
||||
label: `报销人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 1,
|
||||
prop: 'expenseType',
|
||||
label: `报销款项`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
prop: 'applyDate',
|
||||
label: `申请时间`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
prop: 'expenseTotal',
|
||||
label: `报销金额`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
prop: 'applyUser',
|
||||
label: `发票`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
prop: 'applyRemark',
|
||||
label: `备注`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
prop: 'auditStatus',
|
||||
label: `审批状态`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 7,
|
||||
prop: 'auditUser',
|
||||
label: `审批人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
prop: 'auditDate',
|
||||
label: `审批时间`,
|
||||
visible: true
|
||||
}
|
||||
],
|
||||
5: [{
|
||||
key: 0,
|
||||
prop: 'stuName',
|
||||
label: `报销人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 1,
|
||||
prop: 'expenseType',
|
||||
label: `报销款项`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
prop: 'applyDate',
|
||||
label: `申请时间`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
prop: 'applyUser',
|
||||
label: `充值对公账号`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
prop: 'expenseTotal',
|
||||
label: `报销金额`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
prop: 'applyRemark',
|
||||
label: `备注`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
prop: 'auditStatus',
|
||||
label: `审批状态`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 7,
|
||||
prop: 'auditUser',
|
||||
label: `审批人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
prop: 'auditDate',
|
||||
label: `审批时间`,
|
||||
visible: true
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<el-dialog v-if="show" title="账户充值报销" :visible.sync="show" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="报销人" prop="createUser">
|
||||
<el-select v-model="form.createUser" placeholder="请选择" filterable clearable>
|
||||
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报销项目" prop="expenseType">
|
||||
<el-input v-model="form.expenseType" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="日期" prop="expenseDate">
|
||||
<el-date-picker v-model="form.expenseDate" value-format="yyyy-MM-dd" type="date" />
|
||||
</el-form-item>
|
||||
<el-form-item label="对公账户" prop="account">
|
||||
<el-input v-model="form.account" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报销金额" prop="money">
|
||||
<el-input v-model="form.money" placeholder="请输入" type="number" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer">
|
||||
<!--有权限 且 新增或修改时展示 -->
|
||||
<!-- <el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(0)">保存</el-button> -->
|
||||
<el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(1)">提交</el-button>
|
||||
<!--有权限 且 审核时展示 -->
|
||||
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(2)">通过</el-button>
|
||||
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(3)">驳回</el-button>
|
||||
<el-button @click="show = false">关闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { addExpense, updateExpense, checkExpense } from '@/api/finance/expense/accountExpense'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
userOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
showColumns: [],
|
||||
userId: localStorage.getItem('userId'),
|
||||
form: {
|
||||
createUser: undefined,
|
||||
expenseDate: undefined,
|
||||
expenseType: undefined,
|
||||
money: undefined,
|
||||
remark: undefined,
|
||||
state: 0
|
||||
},
|
||||
rules: {
|
||||
createUser: { required: true, message: '请选择', trigger: 'blur' },
|
||||
expenseType: { required: true, message: '请输入', trigger: 'blur' },
|
||||
expenseDate: { required: true, message: '请输入', trigger: 'blur' },
|
||||
money: { required: true, message: '请输入', trigger: 'blur' },
|
||||
account: { required: true, message: '请输入', trigger: 'blur' }
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(data) {
|
||||
this.$nextTick(() => {
|
||||
this.resetForm();
|
||||
if (data) {
|
||||
this.form = this.deepClone(data);
|
||||
// this.$refs['form'].resetFields();
|
||||
}
|
||||
this.show = true
|
||||
});
|
||||
},
|
||||
resetForm() {
|
||||
this.form = {
|
||||
createUser: this.userId,
|
||||
expenseDate: undefined,
|
||||
expenseType: undefined,
|
||||
money: undefined,
|
||||
remark: undefined,
|
||||
state: 0
|
||||
}
|
||||
},
|
||||
handleSave(state) {
|
||||
this.form.state = state;
|
||||
this.$refs.form.validate(async valid => {
|
||||
if (valid) {
|
||||
|
||||
if (state == 1) {
|
||||
this.$confirm('提交后将进入审核阶段,是否提交确认提交?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then((res) => {
|
||||
this.handleExpenseSave();
|
||||
})
|
||||
.catch(function () { });
|
||||
} else {
|
||||
this.handleExpenseSave();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleExpenseSave() {
|
||||
// 提交申请
|
||||
if (this.form.expenseId) {
|
||||
updateExpense(this.form).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('修改成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
} else {
|
||||
addExpense(this.form).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('新增成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
handleCheck(state) {
|
||||
this.form.state = state;
|
||||
checkExpense(this.form).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('审核成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<el-form ref="searchForm" :model="searchForm" inline label-width="100px">
|
||||
<el-form-item label="报销人:" label-width="90px">
|
||||
<el-select v-model="searchForm.createUser" placeholder="请选择" filterable clearable>
|
||||
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报销时间:">
|
||||
<el-date-picker v-model="searchForm.createTimeRange" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="$emit('update:value', searchForm)" />
|
||||
</el-form-item>
|
||||
<el-form-item label-width="0">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
value: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
userOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler(val) {
|
||||
this.searchForm = this.deepClone(val);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,61 @@
|
||||
export const defaultColumns = [{
|
||||
key: 0,
|
||||
prop: 'createUserName',
|
||||
label: `姓名`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 1,
|
||||
prop: 'expenseType',
|
||||
label: `报销项目`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
prop: 'expenseDate',
|
||||
label: `日期`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
prop: 'account',
|
||||
label: `充值对公账号`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
prop: 'money',
|
||||
label: `报销金额`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
prop: 'remark',
|
||||
label: `备注`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
prop: 'createTime',
|
||||
label: `申请时间`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 7,
|
||||
prop: 'state',
|
||||
label: `审批状态`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
prop: 'checkUser',
|
||||
label: `审批人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 9,
|
||||
prop: 'checkTime',
|
||||
label: `审批时间`,
|
||||
visible: true
|
||||
}
|
||||
]
|
||||
142
src/views/finance/expense/components/AccountExpense/index.vue
Normal file
@@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<div>
|
||||
<SearchForm v-show="showSearch" :value.sync="searchForm" ref="SearchForm" @search="_getTableList" :userOptions="userOptions" />
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" v-hasPermi="['finance:expense:account:add']" @click="handleDialog(null)">新增</el-button>
|
||||
<el-button type="warning" icon="el-icon-download" v-hasPermi="['finance:expense:account:export']" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" />
|
||||
</el-row>
|
||||
<el-table :data="tableList">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<template v-for="item in columns">
|
||||
<el-table-column v-if="item.visible && item.prop != 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop" />
|
||||
<el-table-column v-if="item.visible && item.prop == 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop">
|
||||
<template scope="scope">
|
||||
<el-tag v-if="scope.row.state == 0">保存中</el-tag>
|
||||
<el-tag type="warning" v-if="scope.row.state == 1">待审核</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.state == 2">已审核</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.state == 3">驳回</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleDialog(scope.row)">详情</el-button>
|
||||
<el-button type="text" v-if="scope.row.state == 1" v-hasPermi="['finance:expense:account:check']" @click="handleDialog(scope.row)">审核</el-button>
|
||||
<el-button type="text" v-if="scope.row.state == 0" v-hasPermi="['finance:expense:account:remove']" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||
|
||||
<AccountDialog ref="AccountDialog" @refreshDataList="_getTableList" :userOptions="userOptions" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SearchForm from './SearchForm.vue';
|
||||
import AccountDialog from './AccountDialog.vue';
|
||||
import { defaultColumns } from './columns.js';
|
||||
import empApi from '@/api/system/employee';
|
||||
|
||||
|
||||
import { listExpense, removeExpense, exportExpense } from '@/api/finance/expense/accountExpense'
|
||||
|
||||
export default {
|
||||
// name: "AccountExpense",
|
||||
components: {
|
||||
SearchForm, AccountDialog
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: '1'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
createUser: undefined,
|
||||
createTimeRange: [],
|
||||
pageNum: 1,
|
||||
pageSize: 20
|
||||
},
|
||||
showSearch: true,
|
||||
tableList: [],
|
||||
total: 0,
|
||||
columns: [],
|
||||
userOptions: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
type: {
|
||||
handler() {
|
||||
this.columns = defaultColumns
|
||||
this._getTableList();
|
||||
this.getEmployee()
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async _getTableList() {
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
const params = { ...this.searchForm, ...tempForm };
|
||||
// api.list(params)
|
||||
listExpense(params).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.tableList = resp.rows
|
||||
this.total = resp.total
|
||||
}
|
||||
})
|
||||
// this.tableList = [];
|
||||
// for (let i = 0; i < 20; i++) {
|
||||
// this.tableList.push({ applyUser: `数据${i + 1}` });
|
||||
// }
|
||||
},
|
||||
handleDialog(row) {
|
||||
this.$refs.AccountDialog && this.$refs.AccountDialog.init(row);
|
||||
},
|
||||
//删除
|
||||
handleDelete(item) {
|
||||
this.$confirm('是否确认删除该条报销(“' + item.expenseType + '/' + item.expenseDate + '”)?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then((res) => {
|
||||
removeExpense(item.expenseId).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.$message.success('删除成功');
|
||||
this._getTableList();
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(function () { });
|
||||
},
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所查询报销信息项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
this.download('finance/expense/account/export', tempForm, `账户充值报销信息_${new Date().getTime()}.xlsx`);
|
||||
});
|
||||
},
|
||||
getEmployee() {
|
||||
empApi.getEmployee().then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.userOptions = resp.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
<template>
|
||||
<el-dialog v-if="show" title="美团刷单报销" :visible.sync="show" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="门店" prop="shop">
|
||||
<el-input v-model="form.shop" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报销人" prop="createUser">
|
||||
<el-select v-model="form.createUser" placeholder="请选择" filterable clearable>
|
||||
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期" prop="expenseDate">
|
||||
<el-date-picker v-model="form.expenseDate" value-format="yyyy-MM-dd" type="date" />
|
||||
</el-form-item>
|
||||
<el-form-item label="成交班型" prop="signClass">
|
||||
<el-input v-model="form.signClass" placeholder="请输入" />
|
||||
|
||||
<!-- <el-select v-model="form.typeId" placeholder="请选择" filterable clearable>
|
||||
<el-option v-for="dict in classTypeOptions" :key="dict.typeId" :label="dict.schoolName +'-'+ dict.placeName +'-'+ dict.typeName" :value="dict.typeId" />
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="成交价格" prop="signPrice">
|
||||
<el-input v-model="form.signPrice" placeholder="请输入" type="number" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实际入账" prop="actualEntry">
|
||||
<el-input v-model="form.actualEntry" placeholder="请输入" type="number" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手续费" prop="commission">
|
||||
<el-input v-model="form.commission" placeholder="请输入" type="number" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer">
|
||||
<!--有权限 且 新增或修改时展示 -->
|
||||
<!-- <el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(0)">保存</el-button> -->
|
||||
<el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(1)">提交</el-button>
|
||||
<!--有权限 且 审核时展示 -->
|
||||
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(2)">通过</el-button>
|
||||
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(3)">驳回</el-button>
|
||||
<el-button @click="show = false">关闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { addExpense, updateExpense, checkExpense } from '@/api/finance/expense/meituanExpense'
|
||||
import { getClassTypeTableList } from '@/api/sch/classType';
|
||||
|
||||
|
||||
export default {
|
||||
props: {
|
||||
userOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userId: localStorage.getItem('userId'),
|
||||
show: false,
|
||||
showColumns: [],
|
||||
form: {
|
||||
createUser: undefined,
|
||||
expenseDate: undefined,
|
||||
shop: undefined,
|
||||
typeId: undefined,
|
||||
signPrice: undefined,
|
||||
actualEntry: undefined,
|
||||
commission: undefined,
|
||||
remark: undefined,
|
||||
state: 0
|
||||
},
|
||||
rules: {
|
||||
createUser: { required: true, message: '请选择', trigger: 'blur' },
|
||||
shop: { required: true, message: '请输入', trigger: 'blur' },
|
||||
expenseDate: { required: true, message: '请输入', trigger: 'blur' },
|
||||
signClass: { required: true, message: '请输入', trigger: 'blur' },
|
||||
signPrice: { required: true, message: '请输入', trigger: 'blur' },
|
||||
actualEntry: { required: true, message: '请输入', trigger: 'blur' },
|
||||
commission: { required: true, message: '请输入', trigger: 'blur' }
|
||||
},
|
||||
classTypeOptions: []
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(data) {
|
||||
this.getClassTypes()
|
||||
this.$nextTick(() => {
|
||||
this.resetForm();
|
||||
if (data) {
|
||||
this.form = this.deepClone(data);
|
||||
// this.$refs['form'].resetFields();
|
||||
}
|
||||
this.show = true
|
||||
});
|
||||
},
|
||||
resetForm() {
|
||||
this.form = {
|
||||
createUser: this.userId,
|
||||
expenseDate: undefined,
|
||||
shop: undefined,
|
||||
typeId: undefined,
|
||||
signPrice: undefined,
|
||||
actualEntry: undefined,
|
||||
commission: undefined,
|
||||
remark: undefined,
|
||||
state: 0
|
||||
}
|
||||
},
|
||||
handleSave(state) {
|
||||
this.form.state = state;
|
||||
this.$refs.form.validate(async valid => {
|
||||
if (valid) {
|
||||
|
||||
if (state == 1) {
|
||||
this.$confirm('提交后将进入审核阶段,是否提交确认提交?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then((res) => {
|
||||
this.handleExpenseSave();
|
||||
})
|
||||
.catch(function () { });
|
||||
} else {
|
||||
this.handleExpenseSave();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleExpenseSave() {
|
||||
// 提交申请
|
||||
if (this.form.expenseId) {
|
||||
updateExpense(this.form).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('修改成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
} else {
|
||||
addExpense(this.form).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('新增成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
handleCheck(state) {
|
||||
this.form.state = state;
|
||||
checkExpense(this.form).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('审核成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
},
|
||||
getClassTypes() {
|
||||
getClassTypeTableList({}).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.classTypeOptions = resp.rows;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<el-form ref="searchForm" :model="searchForm" inline label-width="100px">
|
||||
<el-form-item label="门店" label-width="90px">
|
||||
<el-input v-model="searchForm.shop" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报销人:" label-width="90px">
|
||||
<el-select v-model="searchForm.createUser" placeholder="请选择" filterable clearable>
|
||||
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报销时间:">
|
||||
<el-date-picker v-model="searchForm.createTimeRange" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="$emit('update:value', searchForm)" />
|
||||
</el-form-item>
|
||||
<el-form-item label-width="0">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
value: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
userOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler(val) {
|
||||
this.searchForm = this.deepClone(val);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,73 @@
|
||||
export const defaultColumns = [{
|
||||
key: 0,
|
||||
prop: 'shop',
|
||||
label: `门店`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 1,
|
||||
prop: 'createUserName',
|
||||
label: `报销人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
prop: 'expenseDate',
|
||||
label: `日期`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
prop: 'signClass',
|
||||
label: `成交班型`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
prop: 'signPrice',
|
||||
label: `报销金额`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
prop: 'actualEntry',
|
||||
label: `实际入账`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
prop: 'commission',
|
||||
label: `手续费`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
prop: 'remark',
|
||||
label: `备注`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 7,
|
||||
prop: 'createTime',
|
||||
label: `申请时间`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
prop: 'state',
|
||||
label: `审批状态`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 9,
|
||||
prop: 'checkUser',
|
||||
label: `审批人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 10,
|
||||
prop: 'checkTime',
|
||||
label: `审批时间`,
|
||||
visible: true
|
||||
}
|
||||
]
|
||||
143
src/views/finance/expense/components/MeituanExpense/index.vue
Normal file
@@ -0,0 +1,143 @@
|
||||
<template>
|
||||
<div>
|
||||
<SearchForm v-show="showSearch" :value.sync="searchForm" ref="SearchForm" @search="_getTableList" :userOptions="userOptions" />
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" v-hasPermi="['finance:expense:meituan:add']" @click="handleDialog(null)">新增</el-button>
|
||||
<el-button type="warning" icon="el-icon-download" v-hasPermi="['finance:expense:meituan:export']" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" />
|
||||
</el-row>
|
||||
<el-table :data="tableList">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<template v-for="item in columns">
|
||||
<el-table-column v-if="item.visible && item.prop != 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop" />
|
||||
<el-table-column v-if="item.visible && item.prop == 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.state == 0">保存中</el-tag>
|
||||
<el-tag type="warning" v-if="scope.row.state == 1">待审核</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.state == 2">已审核</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.state == 3">驳回</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleDialog(scope.row)">详情</el-button>
|
||||
<el-button type="text" v-if="scope.row.state == 1" v-hasPermi="['finance:expense:meituan:check']" @click="handleDialog(scope.row)">审核</el-button>
|
||||
<el-button type="text" v-if="scope.row.state == 0" v-hasPermi="['finance:expense:meituan:remove']" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||
|
||||
<MeituanDialog ref="MeituanDialog" @refreshDataList="_getTableList" :userOptions="userOptions" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SearchForm from './SearchForm.vue';
|
||||
import MeituanDialog from './MeituanDialog.vue';
|
||||
import { defaultColumns } from './columns.js';
|
||||
import empApi from '@/api/system/employee';
|
||||
|
||||
|
||||
import { listExpense, removeExpense, exportExpense } from '@/api/finance/expense/meituanExpense'
|
||||
|
||||
export default {
|
||||
// name: "AccountExpense",
|
||||
components: {
|
||||
SearchForm, MeituanDialog
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: '1'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
createUser: undefined,
|
||||
createTimeRange: [],
|
||||
shop: undefined,
|
||||
pageNum: 1,
|
||||
pageSize: 20
|
||||
},
|
||||
showSearch: true,
|
||||
tableList: [],
|
||||
total: 0,
|
||||
columns: [],
|
||||
userOptions: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
type: {
|
||||
handler() {
|
||||
this.columns = defaultColumns
|
||||
this._getTableList();
|
||||
this.getEmployee()
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async _getTableList() {
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
const params = { ...this.searchForm, ...tempForm };
|
||||
// api.list(params)
|
||||
listExpense(params).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.tableList = resp.rows
|
||||
this.total = resp.total
|
||||
}
|
||||
})
|
||||
// this.tableList = [];
|
||||
// for (let i = 0; i < 20; i++) {
|
||||
// this.tableList.push({ applyUser: `数据${i + 1}` });
|
||||
// }
|
||||
},
|
||||
handleDialog(row) {
|
||||
this.$refs.MeituanDialog && this.$refs.MeituanDialog.init(row);
|
||||
},
|
||||
//删除
|
||||
handleDelete(item) {
|
||||
this.$confirm('是否确认删除该条报销(“' + item.shop + '/' + item.expenseDate + '”)?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then((res) => {
|
||||
removeExpense(item.expenseId).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.$message.success('删除成功');
|
||||
this._getTableList();
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(function () { });
|
||||
},
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所查询报销信息项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
this.download('finance/expense/meituan/export', tempForm, `美团刷单报销信息_${new Date().getTime()}.xlsx`);
|
||||
});
|
||||
},
|
||||
getEmployee() {
|
||||
empApi.getEmployee().then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.userOptions = resp.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<el-dialog v-if="show" title="办公费用报销" :visible.sync="show" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="报销人" prop="createUser">
|
||||
<el-select v-model="form.createUser" placeholder="请选择" filterable clearable>
|
||||
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报销项目" prop="expenseType">
|
||||
<el-input v-model="form.expenseType" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="日期" prop="expenseDate">
|
||||
<el-date-picker v-model="form.expenseDate" value-format="yyyy-MM-dd" type="date" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报销金额" prop="money">
|
||||
<el-input v-model="form.money" placeholder="请输入" type="number" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发票" prop="files">
|
||||
<el-upload class="avatar-uploader" accept="image/*" action="https://jsonplaceholder.typicode.com/posts/" :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
|
||||
<img v-if="form.files" :src="form.files" class="avatar">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer">
|
||||
<!--有权限 且 新增或修改时展示 -->
|
||||
<!-- <el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(0)">保存</el-button> -->
|
||||
<el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(1)">提交</el-button>
|
||||
<!--有权限 且 审核时展示 -->
|
||||
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(2)">通过</el-button>
|
||||
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(3)">驳回</el-button>
|
||||
<el-button @click="show = false">关闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { addExpense, updateExpense, checkExpense } from '@/api/finance/expense/officeExpense'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
userOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
showColumns: [],
|
||||
form: {
|
||||
createUser: undefined,
|
||||
expenseDate: undefined,
|
||||
expenseType: undefined,
|
||||
money: undefined,
|
||||
remark: undefined,
|
||||
files: undefined,
|
||||
state: 0
|
||||
},
|
||||
rules: {
|
||||
createUser: { required: true, message: '请选择', trigger: 'blur' },
|
||||
expenseType: { required: true, message: '请输入', trigger: 'blur' },
|
||||
expenseDate: { required: true, message: '请输入', trigger: 'blur' },
|
||||
money: { required: true, message: '请输入', trigger: 'blur' },
|
||||
account: { required: true, message: '请输入', trigger: 'blur' }
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(data) {
|
||||
this.$nextTick(() => {
|
||||
this.resetForm();
|
||||
if (data) {
|
||||
this.form = this.deepClone(data);
|
||||
// this.$refs['form'].resetFields();
|
||||
}
|
||||
this.show = true
|
||||
});
|
||||
},
|
||||
resetForm() {
|
||||
this.form = {
|
||||
createUser: undefined,
|
||||
expenseDate: undefined,
|
||||
expenseType: undefined,
|
||||
money: undefined,
|
||||
remark: undefined,
|
||||
state: 0
|
||||
}
|
||||
},
|
||||
handleSave(state) {
|
||||
this.form.state = state;
|
||||
this.$refs.form.validate(async valid => {
|
||||
if (valid) {
|
||||
|
||||
if (state == 1) {
|
||||
this.$confirm('提交后将进入审核阶段,是否提交确认提交?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then((res) => {
|
||||
this.handleExpenseSave();
|
||||
})
|
||||
.catch(function () { });
|
||||
} else {
|
||||
this.handleExpenseSave();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleExpenseSave() {
|
||||
// 提交申请
|
||||
if (this.form.expenseId) {
|
||||
updateExpense(this.form).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('修改成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
} else {
|
||||
addExpense(this.form).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('新增成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
handleCheck(state) {
|
||||
this.form.state = state;
|
||||
checkExpense(this.form).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('审核成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
console.log(file)
|
||||
this.form.files = URL.createObjectURL(file.raw);
|
||||
},
|
||||
beforeAvatarUpload(file) {
|
||||
const isLt2M = file.size / 1024 / 1024 < 10;
|
||||
if (!isLt2M) {
|
||||
this.$message.error('上传文件大小不能超过 10MB!');
|
||||
}
|
||||
return isLt2M;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: #409eff;
|
||||
}
|
||||
.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
line-height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
.avatar {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<el-form ref="searchForm" :model="searchForm" inline label-width="100px">
|
||||
<el-form-item label="报销人:" label-width="90px">
|
||||
<el-select v-model="searchForm.createUser" placeholder="请选择" filterable clearable>
|
||||
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报销时间:">
|
||||
<el-date-picker v-model="searchForm.createTimeRange" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="$emit('update:value', searchForm)" />
|
||||
</el-form-item>
|
||||
<el-form-item label-width="0">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
value: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
userOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler(val) {
|
||||
this.searchForm = this.deepClone(val);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,55 @@
|
||||
export const defaultColumns = [{
|
||||
key: 0,
|
||||
prop: 'createUserName',
|
||||
label: `报销人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 1,
|
||||
prop: 'expenseType',
|
||||
label: `报销项目`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
prop: 'expenseDate',
|
||||
label: `日期`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
prop: 'money',
|
||||
label: `金额`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
prop: 'remark',
|
||||
label: `备注`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
prop: 'createTime',
|
||||
label: `申请时间`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
prop: 'state',
|
||||
label: `审批状态`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 7,
|
||||
prop: 'checkUser',
|
||||
label: `审批人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
prop: 'checkTime',
|
||||
label: `审批时间`,
|
||||
visible: true
|
||||
}
|
||||
]
|
||||
142
src/views/finance/expense/components/OfficeExpense/index.vue
Normal file
@@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<div>
|
||||
<SearchForm v-show="showSearch" :value.sync="searchForm" ref="SearchForm" @search="_getTableList" :userOptions="userOptions" />
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" v-hasPermi="['finance:expense:meituan:add']" @click="handleDialog(null)">新增</el-button>
|
||||
<el-button type="warning" icon="el-icon-download" v-hasPermi="['finance:expense:meituan:export']" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" />
|
||||
</el-row>
|
||||
<el-table :data="tableList">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<template v-for="item in columns">
|
||||
<el-table-column v-if="item.visible && item.prop != 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop" />
|
||||
<el-table-column v-if="item.visible && item.prop == 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop">
|
||||
<template scope="scope">
|
||||
<el-tag v-if="scope.row.state == 0">保存中</el-tag>
|
||||
<el-tag type="warning" v-if="scope.row.state == 1">待审核</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.state == 2">已审核</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.state == 3">驳回</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleDialog(scope.row)">详情</el-button>
|
||||
<el-button type="text" v-if="scope.row.state == 1" v-hasPermi="['finance:expense:meituan:check']" @click="handleDialog(scope.row)">审核</el-button>
|
||||
<el-button type="text" v-if="scope.row.state == 0" v-hasPermi="['finance:expense:meituan:remove']" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||
|
||||
<OfficeDialog ref="OfficeDialog" @refreshDataList="_getTableList" :userOptions="userOptions" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SearchForm from './SearchForm.vue';
|
||||
import OfficeDialog from './OfficeDialog.vue';
|
||||
import { defaultColumns } from './columns.js';
|
||||
import empApi from '@/api/system/employee';
|
||||
|
||||
|
||||
import { listExpense, removeExpense, exportExpense } from '@/api/finance/expense/officeExpense'
|
||||
|
||||
export default {
|
||||
// name: "AccountExpense",
|
||||
components: {
|
||||
SearchForm, OfficeDialog
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: '1'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
createUser: undefined,
|
||||
createTimeRange: [],
|
||||
pageNum: 1,
|
||||
pageSize: 20
|
||||
},
|
||||
showSearch: true,
|
||||
tableList: [],
|
||||
total: 0,
|
||||
columns: [],
|
||||
userOptions: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
type: {
|
||||
handler() {
|
||||
this.columns = defaultColumns
|
||||
this._getTableList();
|
||||
this.getEmployee()
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async _getTableList() {
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
const params = { ...this.searchForm, ...tempForm };
|
||||
// api.list(params)
|
||||
listExpense(params).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.tableList = resp.rows
|
||||
this.total = resp.total
|
||||
}
|
||||
})
|
||||
// this.tableList = [];
|
||||
// for (let i = 0; i < 20; i++) {
|
||||
// this.tableList.push({ applyUser: `数据${i + 1}` });
|
||||
// }
|
||||
},
|
||||
handleDialog(row) {
|
||||
this.$refs.OfficeDialog && this.$refs.OfficeDialog.init(row);
|
||||
},
|
||||
//删除
|
||||
handleDelete(item) {
|
||||
this.$confirm('是否确认删除该条报销(“' + item.expenseType + '/' + item.expenseDate + '”)?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then((res) => {
|
||||
removeExpense(item.expenseId).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.$message.success('删除成功');
|
||||
this._getTableList();
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(function () { });
|
||||
},
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所查询报销信息项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
this.download('finance/expense/office/export', tempForm, `办公费用报销信息_${new Date().getTime()}.xlsx`);
|
||||
});
|
||||
},
|
||||
getEmployee() {
|
||||
empApi.getEmployee().then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.userOptions = resp.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -0,0 +1,216 @@
|
||||
<template>
|
||||
<el-dialog v-if="show" title="报名点报销" :visible.sync="show" width="600px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="检索">
|
||||
<el-autocomplete v-model="searchValue" :fetch-suggestions="querySearchAsync" style="width: 100%;" placeholder="请输入姓名/联系方式进行学员检索" @select="handleSelect">
|
||||
<template slot-scope="{ item }">
|
||||
<span class="name">{{ item.name }}</span>
|
||||
<span class="addr">{{ item.phone }}</span>
|
||||
</template>
|
||||
</el-autocomplete>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="报名时间" prop="dealDate">
|
||||
<el-date-picker v-model="form.dealDate" value-format="yyyy-MM-dd" type="date" disabled></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="成交价格" prop="signPrice">
|
||||
<el-input v-model="form.signPrice" placeholder="请输入" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="报名驾校" prop="schoolName">
|
||||
<el-input v-model="form.schoolName" placeholder="请输入" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="班型" prop="className">
|
||||
<el-input v-model="form.className" placeholder="请输入" type="number" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="利润" prop="profit">
|
||||
<el-input v-model="form.profit" placeholder="请输入" type="number" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="额外支出项目" prop="expenseType">
|
||||
<el-select v-model="form.expenseType" placeholder="请选择" filterable clearable disabled>
|
||||
<el-option v-for="dict in extraOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="额外支出金额" prop="money">
|
||||
<el-input v-model="form.money" placeholder="请输入" type="number" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学员归属" prop="followUser">
|
||||
<el-select v-model="form.followUser" placeholder="请选择" filterable clearable disabled>
|
||||
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer">
|
||||
<!--有权限 且 新增或修改时展示 -->
|
||||
<!-- <el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(0)">保存</el-button> -->
|
||||
<el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(1)">提交</el-button>
|
||||
<!--有权限 且 审核时展示 -->
|
||||
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(2)">通过</el-button>
|
||||
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(3)">驳回</el-button>
|
||||
<el-button @click="show = false">关闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { addExpense, updateExpense, checkExpense } from '@/api/finance/expense/signExpense'
|
||||
import { listSign } from '@/api/zs/placeSign'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
userOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
extraOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
showColumns: [],
|
||||
searchValue: undefined,
|
||||
form: {
|
||||
signId: undefined,
|
||||
expenseType: undefined,
|
||||
money: undefined,
|
||||
remark: undefined,
|
||||
state: 0,
|
||||
// 登记信息
|
||||
name: undefined,
|
||||
phone: undefined,
|
||||
dealDate: undefined,
|
||||
signPrice: undefined,
|
||||
schoolName: undefined,
|
||||
className: undefined,
|
||||
profit: undefined
|
||||
|
||||
},
|
||||
rules: {
|
||||
name: { required: true, message: '请输入', trigger: 'blur' },
|
||||
phone: { required: true, message: '请输入', trigger: 'blur' },
|
||||
expenseType: { required: true, message: '请输入', trigger: 'blur' },
|
||||
money: { required: true, message: '请输入', trigger: 'blur' },
|
||||
},
|
||||
restaurants: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(data) {
|
||||
this.$nextTick(() => {
|
||||
this.resetForm();
|
||||
if (data) {
|
||||
this.form = this.deepClone(data);
|
||||
// this.$refs['form'].resetFields();
|
||||
}
|
||||
this.show = true
|
||||
});
|
||||
},
|
||||
resetForm() {
|
||||
this.form = {
|
||||
signId: undefined,
|
||||
expenseType: undefined,
|
||||
money: undefined,
|
||||
remark: undefined,
|
||||
state: 0,
|
||||
name: undefined,
|
||||
phone: undefined,
|
||||
dealDate: undefined,
|
||||
signPrice: undefined,
|
||||
schoolName: undefined,
|
||||
className: undefined,
|
||||
profit: undefined
|
||||
|
||||
}
|
||||
},
|
||||
//检索查询登记信息
|
||||
async querySearchAsync(queryString, cb) {
|
||||
if (queryString) {
|
||||
const resp = listSign({
|
||||
name: queryString
|
||||
});
|
||||
cb(resp.rows);
|
||||
}
|
||||
},
|
||||
//选择对应的查询结果
|
||||
handleSelect(item) {
|
||||
this.$set(this.form, "signId", item.signId);
|
||||
this.$set(this.form, "name", item.name);
|
||||
this.$set(this.form, "phone", item.phone);
|
||||
this.$set(this.form, "dealDate", item.dealDate);
|
||||
this.$set(this.form, "signPrice", item.signPrice);
|
||||
this.$set(this.form, "schoolName", item.schoolName);
|
||||
this.$set(this.form, "className", item.className);
|
||||
this.$set(this.form, "profit", item.profit);
|
||||
},
|
||||
handleSave(state) {
|
||||
this.form.state = state;
|
||||
this.$refs.form.validate(async valid => {
|
||||
if (valid) {
|
||||
|
||||
if (state == 1) {
|
||||
this.$confirm('提交后将进入审核阶段,是否提交确认提交?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then((res) => {
|
||||
this.handleExpenseSave();
|
||||
})
|
||||
.catch(function () { });
|
||||
} else {
|
||||
this.handleExpenseSave();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleExpenseSave() {
|
||||
// 提交申请
|
||||
if (this.form.expenseId) {
|
||||
updateExpense(this.form).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('修改成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
} else {
|
||||
addExpense(this.form).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('新增成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
handleCheck(state) {
|
||||
this.form.state = state;
|
||||
checkExpense(this.form).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('审核成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<el-form ref="searchForm" :model="searchForm" inline label-width="100px">
|
||||
<el-form-item label="报名点:" label-width="90px">
|
||||
<el-select v-model="searchForm.signPlace" placeholder="请选择" filterable clearable>
|
||||
<el-option v-for="dict in signPlaceOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报销人:" label-width="90px">
|
||||
<el-select v-model="searchForm.createUser" placeholder="请选择" filterable clearable>
|
||||
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报销时间:">
|
||||
<el-date-picker v-model="searchForm.createTimeRange" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="$emit('update:value', searchForm)" />
|
||||
</el-form-item>
|
||||
<el-form-item label-width="0">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
value: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
userOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
signPlaceOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler(val) {
|
||||
this.searchForm = this.deepClone(val);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,96 @@
|
||||
export const defaultColumns = [{
|
||||
key: 0,
|
||||
prop: 'signPlace',
|
||||
label: `报名点`,
|
||||
visible: true
|
||||
}, {
|
||||
key: 1,
|
||||
prop: 'name',
|
||||
label: `姓名`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
prop: 'phone',
|
||||
label: `联系方式`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
prop: 'dealDate',
|
||||
label: `报名时间`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
prop: 'signPrice',
|
||||
label: `成交价`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
prop: 'className',
|
||||
label: `班型`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
prop: 'schoolName',
|
||||
label: `报名驾校`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 7,
|
||||
prop: 'profit',
|
||||
label: `利润`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
prop: 'expenseType',
|
||||
label: `额外支出项目`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 9,
|
||||
prop: 'money',
|
||||
label: `额外支出金额`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 10,
|
||||
prop: 'followUserName',
|
||||
label: `学员归属`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 11,
|
||||
prop: 'remark',
|
||||
label: `备注`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 12,
|
||||
prop: 'createTime',
|
||||
label: `申请时间`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 13,
|
||||
prop: 'state',
|
||||
label: `审批状态`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 14,
|
||||
prop: 'checkUser',
|
||||
label: `审批人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 15,
|
||||
prop: 'checkTime',
|
||||
label: `审批时间`,
|
||||
visible: true
|
||||
}
|
||||
]
|
||||
155
src/views/finance/expense/components/PlaceSignExpense/index.vue
Normal file
@@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<div>
|
||||
<SearchForm v-show="showSearch" :value.sync="searchForm" ref="SearchForm" @search="_getTableList" :userOptions="userOptions" :signPlaceOptions="signPlaceOptions" />
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" v-hasPermi="['finance:expense:placeSign:add']" @click="handleDialog(null)">新增</el-button>
|
||||
<el-button type="warning" icon="el-icon-download" v-hasPermi="['finance:expense:placeSign:export']" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" />
|
||||
</el-row>
|
||||
<el-table :data="tableList">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<template v-for="item in columns">
|
||||
<el-table-column v-if="item.visible && item.prop != 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop" />
|
||||
<el-table-column v-if="item.visible && item.prop == 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop">
|
||||
<template scope="scope">
|
||||
<el-tag v-if="scope.row.state == 0">保存中</el-tag>
|
||||
<el-tag type="warning" v-if="scope.row.state == 1">待审核</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.state == 2">已审核</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.state == 3">驳回</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleDialog(scope.row)">详情</el-button>
|
||||
<el-button type="text" v-if="scope.row.state == 1" v-hasPermi="['finance:expense:placeSign:check']" @click="handleDialog(scope.row)">审核</el-button>
|
||||
<el-button type="text" v-if="scope.row.state == 0" v-hasPermi="['finance:expense:placeSign:remove']" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||
|
||||
<PlaceSignDialog ref="PlaceSignDialog" @refreshDataList="_getTableList" :userOptions="userOptions" :extraOptions="extraOptions" :signPlaceOptions="signPlaceOptions" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SearchForm from './SearchForm.vue';
|
||||
import PlaceSignDialog from './PlaceSignDialog.vue';
|
||||
import { defaultColumns } from './columns.js';
|
||||
import empApi from '@/api/system/employee';
|
||||
|
||||
import { listExpense, removeExpense, exportExpense } from '@/api/finance/expense/placeSignExpense'
|
||||
|
||||
export default {
|
||||
// name: "AccountExpense",
|
||||
components: {
|
||||
SearchForm, PlaceSignDialog
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: '1'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
createUser: undefined,
|
||||
createTimeRange: [],
|
||||
signPlace: undefined,
|
||||
pageNum: 1,
|
||||
pageSize: 20
|
||||
},
|
||||
showSearch: true,
|
||||
tableList: [],
|
||||
total: 0,
|
||||
columns: [],
|
||||
userOptions: [],
|
||||
extraOptions: [],
|
||||
signPlaceOptions: []
|
||||
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
type: {
|
||||
handler() {
|
||||
this.columns = defaultColumns
|
||||
this._getTableList();
|
||||
this.getEmployee()
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 额外支出
|
||||
this.getDicts('dm_extra_pay').then((response) => {
|
||||
this.extraOptions = response.data;
|
||||
});
|
||||
// 报名点
|
||||
this.getDicts('sign_place').then((response) => {
|
||||
this.signPlaceOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
async _getTableList() {
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
const params = { ...this.searchForm, ...tempForm };
|
||||
// api.list(params)
|
||||
listExpense(params).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.tableList = resp.rows
|
||||
this.total = resp.total
|
||||
}
|
||||
})
|
||||
// this.tableList = [];
|
||||
// for (let i = 0; i < 20; i++) {
|
||||
// this.tableList.push({ applyUser: `数据${i + 1}` });
|
||||
// }
|
||||
},
|
||||
handleDialog(row) {
|
||||
this.$refs.PlaceSignDialog && this.$refs.PlaceSignDialog.init(row);
|
||||
},
|
||||
//删除
|
||||
handleDelete(item) {
|
||||
this.$confirm('是否确认删除该条线索(“' + item.expenseType + '/' + item.expenseDate + '”)?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then((res) => {
|
||||
removeExpense(item.expenseId).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.$message.success('删除成功');
|
||||
this._getTableList();
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(function () { });
|
||||
},
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所查询学员信息项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
this.download('finance/expense/account/export', tempForm, `账户充值报销信息_${new Date().getTime()}.xlsx`);
|
||||
});
|
||||
},
|
||||
getEmployee() {
|
||||
empApi.getEmployee().then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.userOptions = resp.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<el-form ref="searchForm" :model="searchForm" inline label-width="100px">
|
||||
<el-form-item label="报销人:" label-width="90px">
|
||||
<el-select v-model="searchForm.createUser" placeholder="请选择" filterable clearable>
|
||||
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报销时间:">
|
||||
<el-date-picker v-model="searchForm.createTimeRange" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="$emit('update:value', searchForm)" />
|
||||
</el-form-item>
|
||||
<el-form-item label-width="0">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
value: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
userOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler(val) {
|
||||
this.searchForm = this.deepClone(val);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
217
src/views/finance/expense/components/SignExpense/SignDialog.vue
Normal file
@@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<el-dialog v-if="show" title="成交登记报销" :visible.sync="show" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="检索">
|
||||
<el-autocomplete v-model="searchValue" :fetch-suggestions="querySearchAsync" style="width: 100%;" placeholder="请输入姓名/联系方式进行学员检索" :trigger-on-focus="false" @select="handleSelect">
|
||||
<template slot-scope="{ item }">
|
||||
<span class="name">{{ item.name }}</span>
|
||||
<span class="addr">/{{ item.phone }}</span>
|
||||
</template>
|
||||
</el-autocomplete>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="报名时间" prop="dealDate">
|
||||
<el-date-picker v-model="form.dealDate" value-format="yyyy-MM-dd" type="date" disabled></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="成交价格" prop="signPrice">
|
||||
<el-input v-model="form.signPrice" placeholder="请输入" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="报名驾校" prop="schoolName">
|
||||
<el-input v-model="form.schoolName" placeholder="请输入" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="班型" prop="className">
|
||||
<el-input v-model="form.className" placeholder="请输入" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="利润" prop="profit">
|
||||
<el-input v-model="form.profit" placeholder="请输入" type="number" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="额外支出项目" prop="expenseType">
|
||||
<el-select v-model="form.expenseType" placeholder="请选择" filterable clearable>
|
||||
<el-option v-for="dict in extraOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="额外支出金额" prop="money">
|
||||
<el-input v-model="form.money" placeholder="请输入" type="number" />
|
||||
</el-form-item>
|
||||
<el-form-item label="学员归属" prop="followUser">
|
||||
<el-select v-model="form.followUser" placeholder="请选择" multiple filterable clearable disabled>
|
||||
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer">
|
||||
<!--有权限 且 新增或修改时展示 -->
|
||||
<!-- <el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(0)">保存</el-button> -->
|
||||
<el-button type="primary" v-if="form.state==0 || form.state==3" v-hasPermi="['finance:expense:account:add', 'finance:expense:account:edit']" @click="handleSave(1)">提交</el-button>
|
||||
<!--有权限 且 审核时展示 -->
|
||||
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(2)">通过</el-button>
|
||||
<el-button type="primary" v-if="form.state==1" v-hasPermi="['finance:expense:account:check']" @click="handleCheck(3)">驳回</el-button>
|
||||
<el-button @click="show = false">关闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { addExpense, updateExpense, checkExpense } from '@/api/finance/expense/signExpense'
|
||||
import { getSignList } from '@/api/zs/sign'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
userOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
extraOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
showColumns: [],
|
||||
searchValue: undefined,
|
||||
form: {
|
||||
signId: undefined,
|
||||
expenseType: undefined,
|
||||
money: undefined,
|
||||
remark: undefined,
|
||||
state: 0,
|
||||
// 登记信息
|
||||
name: undefined,
|
||||
phone: undefined,
|
||||
dealDate: undefined,
|
||||
signPrice: undefined,
|
||||
schoolName: undefined,
|
||||
className: undefined,
|
||||
profit: undefined
|
||||
|
||||
},
|
||||
rules: {
|
||||
name: { required: true, message: '请输入', trigger: 'blur' },
|
||||
phone: { required: true, message: '请输入', trigger: 'blur' },
|
||||
expenseType: { required: true, message: '请输入', trigger: 'blur' },
|
||||
money: { required: true, message: '请输入', trigger: 'blur' },
|
||||
},
|
||||
restaurants: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(data) {
|
||||
this.$nextTick(() => {
|
||||
this.resetForm();
|
||||
if (data) {
|
||||
this.form = this.deepClone(data);
|
||||
// this.$refs['form'].resetFields();
|
||||
}
|
||||
this.show = true
|
||||
});
|
||||
},
|
||||
resetForm() {
|
||||
this.form = {
|
||||
signId: undefined,
|
||||
expenseType: undefined,
|
||||
money: undefined,
|
||||
remark: undefined,
|
||||
state: 0,
|
||||
name: undefined,
|
||||
phone: undefined,
|
||||
dealDate: undefined,
|
||||
signPrice: undefined,
|
||||
schoolName: undefined,
|
||||
className: undefined,
|
||||
profit: undefined
|
||||
|
||||
}
|
||||
},
|
||||
//检索查询登记信息
|
||||
async querySearchAsync(queryString, cb) {
|
||||
if (queryString) {
|
||||
const resp = await getSignList({
|
||||
name: queryString
|
||||
});
|
||||
cb(resp.rows);
|
||||
}
|
||||
},
|
||||
//选择对应的查询结果
|
||||
handleSelect(item) {
|
||||
this.$set(this.form, "signId", item.signId);
|
||||
this.$set(this.form, "name", item.name);
|
||||
this.$set(this.form, "phone", item.phone);
|
||||
this.$set(this.form, "dealDate", item.dealDate);
|
||||
this.$set(this.form, "signPrice", item.signPrice);
|
||||
this.$set(this.form, "schoolName", item.schoolName);
|
||||
this.$set(this.form, "className", item.className);
|
||||
this.$set(this.form, "profit", item.profit);
|
||||
this.$set(this.form, "followUser", item.followUser);
|
||||
},
|
||||
handleSave(state) {
|
||||
this.form.state = state;
|
||||
this.$refs.form.validate(async valid => {
|
||||
if (valid) {
|
||||
|
||||
if (state == 1) {
|
||||
this.$confirm('提交后将进入审核阶段,是否提交确认提交?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then((res) => {
|
||||
this.handleExpenseSave();
|
||||
})
|
||||
.catch(function () { });
|
||||
} else {
|
||||
this.handleExpenseSave();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleExpenseSave() {
|
||||
// 提交申请
|
||||
if (this.form.expenseId) {
|
||||
updateExpense(this.form).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('修改成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
} else {
|
||||
addExpense(this.form).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('新增成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
handleCheck(state) {
|
||||
this.form.state = state;
|
||||
checkExpense(this.form).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('审核成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.show = false;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
91
src/views/finance/expense/components/SignExpense/columns.js
Normal file
@@ -0,0 +1,91 @@
|
||||
export const defaultColumns = [{
|
||||
key: 0,
|
||||
prop: 'name',
|
||||
label: `姓名`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 1,
|
||||
prop: 'phone',
|
||||
label: `联系方式`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
prop: 'dealDate',
|
||||
label: `报名时间`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 3,
|
||||
prop: 'signPrice',
|
||||
label: `成交价`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 4,
|
||||
prop: 'className',
|
||||
label: `班型`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 5,
|
||||
prop: 'schoolName',
|
||||
label: `报名驾校`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 6,
|
||||
prop: 'profit',
|
||||
label: `利润`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 7,
|
||||
prop: 'expenseType',
|
||||
label: `额外支出项目`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 8,
|
||||
prop: 'money',
|
||||
label: `额外支出金额`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 9,
|
||||
prop: 'followUserName',
|
||||
label: `学员归属`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 10,
|
||||
prop: 'remark',
|
||||
label: `备注`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 11,
|
||||
prop: 'createTime',
|
||||
label: `申请时间`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 12,
|
||||
prop: 'state',
|
||||
label: `审批状态`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 13,
|
||||
prop: 'checkUser',
|
||||
label: `审批人`,
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
key: 14,
|
||||
prop: 'checkTime',
|
||||
label: `审批时间`,
|
||||
visible: true
|
||||
}
|
||||
]
|
||||
149
src/views/finance/expense/components/SignExpense/index.vue
Normal file
@@ -0,0 +1,149 @@
|
||||
<template>
|
||||
<div>
|
||||
<SearchForm v-show="showSearch" :value.sync="searchForm" ref="SearchForm" @search="_getTableList" :userOptions="userOptions" />
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" v-hasPermi="['finance:expense:meituan:add']" @click="handleDialog(null)">新增</el-button>
|
||||
<el-button type="warning" icon="el-icon-download" v-hasPermi="['finance:expense:meituan:export']" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" />
|
||||
</el-row>
|
||||
<el-table :data="tableList">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<template v-for="item in columns">
|
||||
<el-table-column v-if="item.visible && item.prop != 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop" />
|
||||
<el-table-column v-if="item.visible && item.prop == 'state'" :key="item.prop" :label="item.label" align="center" min-width="100" :prop="item.prop">
|
||||
<template scope="scope">
|
||||
<el-tag v-if="scope.row.state == 0">保存中</el-tag>
|
||||
<el-tag type="warning" v-if="scope.row.state == 1">待审核</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.state == 2">已审核</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.state == 3">驳回</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleDialog(scope.row)">详情</el-button>
|
||||
<el-button type="text" v-if="scope.row.state == 1" v-hasPermi="['finance:expense:meituan:check']" @click="handleDialog(scope.row)">审核</el-button>
|
||||
<el-button type="text" v-if="scope.row.state == 0" v-hasPermi="['finance:expense:meituan:remove']" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||
|
||||
<SignDialog ref="SignDialog" @refreshDataList="_getTableList" :userOptions="userOptions" :extraOptions="extraOptions" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SearchForm from './SearchForm.vue';
|
||||
import SignDialog from './SignDialog.vue';
|
||||
import { defaultColumns } from './columns.js';
|
||||
import empApi from '@/api/system/employee';
|
||||
|
||||
|
||||
import { listExpense, removeExpense, exportExpense } from '@/api/finance/expense/signExpense'
|
||||
|
||||
export default {
|
||||
// name: "AccountExpense",
|
||||
components: {
|
||||
SearchForm, SignDialog
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: '1'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
createUser: undefined,
|
||||
createTimeRange: [],
|
||||
pageNum: 1,
|
||||
pageSize: 20
|
||||
},
|
||||
showSearch: true,
|
||||
tableList: [],
|
||||
total: 0,
|
||||
columns: [],
|
||||
userOptions: [],
|
||||
extraOptions: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
type: {
|
||||
handler() {
|
||||
this.columns = defaultColumns
|
||||
this._getTableList();
|
||||
this.getEmployee()
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 额外支出
|
||||
this.getDicts('dm_extra_pay').then((response) => {
|
||||
this.extraOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
async _getTableList() {
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
const params = { ...this.searchForm, ...tempForm };
|
||||
// api.list(params)
|
||||
listExpense(params).then(resp => {
|
||||
if (resp.code == 200) {
|
||||
this.tableList = resp.rows
|
||||
this.total = resp.total
|
||||
}
|
||||
})
|
||||
// this.tableList = [];
|
||||
// for (let i = 0; i < 20; i++) {
|
||||
// this.tableList.push({ applyUser: `数据${i + 1}` });
|
||||
// }
|
||||
},
|
||||
handleDialog(row) {
|
||||
this.$refs.SignDialog && this.$refs.SignDialog.init(row);
|
||||
},
|
||||
//删除
|
||||
handleDelete(item) {
|
||||
this.$confirm('是否确认删除该条线索(“' + item.expenseType + '/' + item.expenseDate + '”)?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then((res) => {
|
||||
removeExpense(item.expenseId).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.$message.success('删除成功');
|
||||
this._getTableList();
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(function () { });
|
||||
},
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所查询学员信息项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
this.download('finance/expense/account/export', tempForm, `账户充值报销信息_${new Date().getTime()}.xlsx`);
|
||||
});
|
||||
},
|
||||
getEmployee() {
|
||||
empApi.getEmployee().then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.userOptions = resp.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
<template>
|
||||
<div class="p20">
|
||||
<el-tabs v-model="expenseType" tab-position="left">
|
||||
<el-tab-pane label="报名点报销" name="1">
|
||||
<RightPane :type="expenseType" />
|
||||
<el-tab-pane label="报名点报销" v-hasPermi="['finance:expense:signPlace']" name="1">
|
||||
<PlaceSignExpense v-if="expenseType==1" :type="expenseType" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="学员成交报销" name="2">
|
||||
<RightPane :type="expenseType" />
|
||||
<el-tab-pane label="学员成交报销" v-hasPermi="['finance:expense:sign']" name="2">
|
||||
<SignExpense v-if="expenseType==2" :type="expenseType" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="美团刷单报销" v-hasPermi="['finance:expense:meituan']" name="3">
|
||||
<MeituanExpense v-if="expenseType==3" :type="expenseType" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="办公费用报销" v-hasPermi="['finance:expense:office']" name="4">
|
||||
<OfficeExpense v-if="expenseType==4" :type="expenseType" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="账户充值报销" v-hasPermi="['finance:expense:account']" name="5">
|
||||
<AccountExpense v-if="expenseType==5" :type="expenseType" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
@@ -14,9 +23,16 @@
|
||||
|
||||
<script>
|
||||
import RightPane from './RightPane';
|
||||
import SignExpense from './components/SignExpense'
|
||||
import PlaceSignExpense from './components/PlaceSignExpense'
|
||||
import OfficeExpense from './components/OfficeExpense'
|
||||
|
||||
import AccountExpense from './components/AccountExpense'
|
||||
import MeituanExpense from './components/MeituanExpense'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
RightPane
|
||||
RightPane, AccountExpense, MeituanExpense, OfficeExpense, PlaceSignExpense, SignExpense
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -1,19 +1,443 @@
|
||||
<template>
|
||||
<div class="main-content">
|
||||
<el-card>
|
||||
<div>这是首页</div>
|
||||
</el-card>
|
||||
<div class="dashboard-editor-container">
|
||||
<!-- 招生团队首页 -->
|
||||
<div>
|
||||
<el-row :gutter="40" class="panel-group" style="margin-bottom: 20px">
|
||||
<!-- <el-col :span="6">
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
问候
|
||||
</div>
|
||||
<div class="task-pane">
|
||||
<p>亲爱的{{user.nickName}},您好!</p>
|
||||
<p>人生的路,漫长且孤独,短暂也快乐,漫长的是考验,短暂的是幸福,平坦的路途,让我们心怀感恩,泥泞的路途,让我们努力加油。</p>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="6">
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
计划总结
|
||||
<span style="float:right">
|
||||
<el-button type="text" size="mini" @click="handleEditTask(1)">本月计划</el-button>
|
||||
<el-button type="text" size="mini" @click="handleEditTask(2 )">今日计划</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="task-pane">
|
||||
<div v-html="task" />
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col> -->
|
||||
|
||||
<el-col :span="12">
|
||||
<el-card>
|
||||
<div slot="header">团队业绩概况</div>
|
||||
<div class="card-panel">
|
||||
<div class="card-panel-icon-wrapper icon-people">
|
||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" style="color: #EE7621;" />
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div>
|
||||
<span class="card-panel-text">本月报名数:</span>
|
||||
<count-to :start-val="0" :end-val="count.monthSign" :duration="5" class="card-panel-num" />
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<span class="card-panel-text">今日报名数:</span>
|
||||
<count-to :start-val="0" :end-val="count.todaySign" :duration="5" class="card-panel-num" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-card>
|
||||
<div slot="header">转化率</div>
|
||||
<div class="card-panel">
|
||||
<div class="card-panel-icon-wrapper icon-people">
|
||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" style="color: #EE7621;" />
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div>
|
||||
<span class="card-panel-text">本月转化率:</span>
|
||||
<span class="card-panel-num">{{rate.currentSignRate}}</span>
|
||||
<!-- <count-to
|
||||
:start-val="0"
|
||||
:end-val="rate.currentSignRate"
|
||||
:duration="0.1"
|
||||
class="card-panel-num"
|
||||
/>-->
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<span class="card-panel-text">上月转化率:</span>
|
||||
<span class="card-panel-num">{{rate.lastSignRate}}</span>
|
||||
<!-- <count-to
|
||||
:start-val="0"
|
||||
:end-val="rate.lastSignRate"
|
||||
:duration="5"
|
||||
class="card-panel-num"
|
||||
/>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<!-- </el-row>
|
||||
<el-row :gutter="40" class="panel-group" style="margin-bottom: 20px"> -->
|
||||
|
||||
<!-- 考勤信息 -->
|
||||
<!-- <el-col :span="6">
|
||||
<el-card>
|
||||
<div slot="header">打卡异常信息</div>
|
||||
<div class="card-panel">
|
||||
<el-carousel :interval="3000" arrow="always">
|
||||
<el-carousel-item v-for="item in countNum" :key="item">
|
||||
<ul style="overflow:auto">
|
||||
<li v-for="i in 5" :key="i" class="infinite-list-item">
|
||||
<span v-for="(d,index ) in checkin_datas" :key="index" v-if="index == ((item-1)*5 + i - 1)">
|
||||
<span style="float:left">{{d.name}}</span>
|
||||
<span style="float:right">{{d.error_days}} 天</span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
<!-- 成交数排行榜 -->
|
||||
<el-row :gutter="32">
|
||||
<!-- 本月个人成交数排行榜 -->
|
||||
<el-col :xs="12" :sm="12" :lg="24">
|
||||
<div class="chart-wrapper">
|
||||
<span>本月成交排行榜</span>
|
||||
<bar-chart-1 />
|
||||
</div>
|
||||
</el-col>
|
||||
<!-- 今日个人成交数排行榜 -->
|
||||
<el-col :xs="12" :sm="12" :lg="24">
|
||||
<div class="chart-wrapper">
|
||||
<span>今日成交排行榜</span>
|
||||
<bar-chart />
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<!-- 成交率排行榜 -->
|
||||
<el-row :gutter="32">
|
||||
<!-- 本月个人成交率排行榜 -->
|
||||
<el-col :xs="12" :sm="12" :lg="24">
|
||||
<div class="chart-wrapper">
|
||||
<span>本月成交率排行榜</span>
|
||||
<bar-chart-2 />
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<!-- 上月个人成交率排行榜 -->
|
||||
<el-col :xs="12" :sm="12" :lg="24">
|
||||
<div class="chart-wrapper">
|
||||
<span>上月成交率排行榜</span>
|
||||
<bar-chart-3 />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<!-- 添加或修改公告对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="24" v-if="taskType === 2">
|
||||
<el-form-item label="日期" prop="day">
|
||||
<el-date-picker v-model="form.day" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="任务内容">
|
||||
<editor v-model="form.content" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer" style="padding-top:20px">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="open=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BarChart from './dashboard/BarChart'
|
||||
import { getCount, dealRate, getCheckin } from '@/api/home'
|
||||
import { saveTask, getTask } from '@/api/system/summary'
|
||||
import CountTo from 'vue-count-to'
|
||||
import BarChart1 from './dashboard/BarChart1'
|
||||
import { getUserProfile } from '@/api/system/user'
|
||||
import BarChart2 from './dashboard/BarChart2'
|
||||
import BarChart3 from './dashboard/BarChart3'
|
||||
import editor from '@/components/Editor'
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
data() {
|
||||
return {};
|
||||
components: {
|
||||
BarChart,
|
||||
BarChart1,
|
||||
BarChart2,
|
||||
BarChart3,
|
||||
CountTo,
|
||||
editor,
|
||||
},
|
||||
methods: {}
|
||||
};
|
||||
data() {
|
||||
return {
|
||||
count: {},
|
||||
user: {},
|
||||
userId: localStorage.getItem('userId'),
|
||||
rate: {},
|
||||
checkin_datas: [],
|
||||
task: undefined,
|
||||
countNum: 0,
|
||||
title: undefined,
|
||||
open: false,
|
||||
form: {
|
||||
taskType: 1,
|
||||
userId: undefined,
|
||||
month: undefined,
|
||||
day: undefined,
|
||||
content: undefined,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
day: [{ required: true, message: '日期不能为空', trigger: 'blur' }],
|
||||
content: [
|
||||
{ required: true, message: '任务内容不能为空', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
taskType: 1,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getUser()
|
||||
getCount().then((response) => {
|
||||
this.count = response.data
|
||||
})
|
||||
dealRate().then((response) => {
|
||||
this.rate = response.data
|
||||
})
|
||||
this.getCheckin()
|
||||
this.getTask(1)
|
||||
},
|
||||
methods: {
|
||||
getUser() {
|
||||
getUserProfile().then((response) => {
|
||||
this.user = response.data
|
||||
})
|
||||
},
|
||||
// getCheckin() {
|
||||
// getCheckin().then((resp) => {
|
||||
// this.checkin_datas = resp.data
|
||||
// this.countNum = Math.ceil(this.checkin_datas.length / 5)
|
||||
// })
|
||||
// },
|
||||
handleEditTask(type) {
|
||||
this.taskType = type
|
||||
if (type === 2) {
|
||||
this.title = '今日任务'
|
||||
} else {
|
||||
this.title = '本月任务'
|
||||
}
|
||||
this.getTask(type)
|
||||
this.open = true
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
saveTask(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.$message.success('保存成功')
|
||||
this.open = false
|
||||
if (this.taskType == 1) {
|
||||
this.task = this.form.content
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getTask(type) {
|
||||
this.form = {
|
||||
taskType: type,
|
||||
userId: this.userId,
|
||||
month: undefined,
|
||||
day: undefined,
|
||||
content: undefined,
|
||||
}
|
||||
//查询当前任务,编辑查询当前月的,细化查询当日的
|
||||
let now = new Date()
|
||||
let year = now.getFullYear() //得到年份
|
||||
let month = now.getMonth() + 1 //得到月份
|
||||
let day = now.getDate() //得到日期
|
||||
this.$set(this.form, 'month', month)
|
||||
if (type === 2) {
|
||||
this.$set(this.form, 'day', year + '-' + month + '-' + day)
|
||||
}
|
||||
getTask(this.form).then((resp) => {
|
||||
if (resp.code == 200 && resp.data) {
|
||||
this.form = resp.data
|
||||
if (type == 1) {
|
||||
this.task = resp.data.content
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
<style lang="scss" scoped>
|
||||
.task-pane {
|
||||
overflow-y: auto;
|
||||
height: 120px;
|
||||
max-height: 120px;
|
||||
}
|
||||
.dashboard-editor-container {
|
||||
padding: 25px;
|
||||
background-color: rgb(240, 242, 245);
|
||||
position: relative;
|
||||
|
||||
.chart-wrapper {
|
||||
background: #fff;
|
||||
padding: 16px 16px 0;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.chart-wrapper {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.card-panel-col {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.panel-group {
|
||||
margin-top: 5px;
|
||||
|
||||
.card-panel-col {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.card-panel {
|
||||
height: 120px;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
background: #fff;
|
||||
box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
|
||||
border-color: rgba(0, 0, 0, 0.05);
|
||||
|
||||
&:hover {
|
||||
.card-panel-icon-wrapper {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.icon-people {
|
||||
background: #40c9c6;
|
||||
}
|
||||
|
||||
.icon-message {
|
||||
background: #36a3f7;
|
||||
}
|
||||
|
||||
.icon-money {
|
||||
background: #f4516c;
|
||||
}
|
||||
|
||||
.icon-shopping {
|
||||
background: #34bfa3;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-people {
|
||||
color: #40c9c6;
|
||||
}
|
||||
|
||||
.icon-message {
|
||||
color: #36a3f7;
|
||||
}
|
||||
|
||||
.icon-money {
|
||||
color: #f4516c;
|
||||
}
|
||||
|
||||
.icon-shopping {
|
||||
color: #34bfa3;
|
||||
}
|
||||
|
||||
.card-panel-icon-wrapper {
|
||||
float: left;
|
||||
margin: 20px 0 0 10px;
|
||||
padding: 16px;
|
||||
transition: all 0.38s ease-out;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.card-panel-icon {
|
||||
float: left;
|
||||
font-size: 48px;
|
||||
}
|
||||
|
||||
.card-panel-description {
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin: 26px;
|
||||
margin-left: 0px;
|
||||
|
||||
.card-panel-text {
|
||||
line-height: 18px;
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
font-size: 16px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.card-panel-num {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.infinite-list-item {
|
||||
height: 20px;
|
||||
margin: 2px;
|
||||
list-style: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 550px) {
|
||||
.card-panel-description {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.card-panel-icon-wrapper {
|
||||
float: none !important;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0 !important;
|
||||
|
||||
.svg-icon {
|
||||
display: block;
|
||||
margin: 14px auto !important;
|
||||
float: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<div class="login-form">
|
||||
<h3 class="title">若依管理系统</h3>
|
||||
<h3 class="title">开心学车管理系统</h3>
|
||||
<el-tabs v-model="activeName" type="card">
|
||||
<el-tab-pane label="微信扫码" name="wx" style="height:200px">
|
||||
<wxlogin v-if="!code && activeName === 'wx'" appid="wx203f734baa9c9845" :scope="'snsapi_login'" :theme="'black'" redirect_uri="https://xueche.ahduima.com/login" :href="href">
|
||||
<wxlogin v-if="!code && activeName === 'wx'" appid="wxc9e106a4afd2b9dd" :scope="'snsapi_login'" :theme="'black'" redirect_uri="https://xueche.kxxc.top/login" :href="href">
|
||||
</wxlogin>
|
||||
<!-- <div id="wxcode" v-if="!code && activeName === 'wx'"></div> -->
|
||||
<!-- 绑定手机号框 -->
|
||||
|
||||
<div v-else v-loading="loading">
|
||||
<WxCode v-if="codeShow" :code="code" :openId="openId" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="账号密码" name="password" style="height:200px">
|
||||
<el-tab-pane label="短信验证码" name="password" style="height:200px">
|
||||
<Password v-if="activeName === 'password'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -72,22 +71,26 @@ export default {
|
||||
methods: {
|
||||
async wxLogin(code) {
|
||||
//根据code和openId查询是否关联了手机号,如果没有关联 需先关联手机号
|
||||
const resp = this.$store.dispatch('WXLogin', { code: code, type: 1 });
|
||||
if (resp.token) {
|
||||
this.$router.push({ path: this.redirect || '/' }).catch(() => { });
|
||||
} else if (resp.openId) {
|
||||
//如果返回openId则是没有绑定手机号
|
||||
this.openId = resp.openId;
|
||||
this.loading = false
|
||||
this.codeShow = true
|
||||
}
|
||||
this.$store.dispatch('WXLogin', { code: code, type: 1 }).then(resp => {
|
||||
if (resp && resp.token != undefined) {
|
||||
this.$router.push({ path: this.redirect || '/' }).catch(() => { });
|
||||
} else if (resp.openId) {
|
||||
//如果返回openId则是没有绑定手机号
|
||||
this.openId = resp.openId;
|
||||
this.loading = false
|
||||
this.codeShow = true
|
||||
} else {
|
||||
this.$message.error("二维码失效,请刷新!");
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
createWxQrcode() {
|
||||
// 生成微信登录二维码
|
||||
var obj = new WxLogin({
|
||||
self_redirect: true,
|
||||
id: "wxcode", // 页面显示二维码的容器id
|
||||
appid: "wx203f734baa9c9845", // 微信官方提供的测试id
|
||||
appid: "wxc9e106a4afd2b9dd", // 微信官方提供的测试id
|
||||
scope: "snsapi_login",
|
||||
redirect_uri: "https://xueche.ahduima.com/login", // 微信官方中的测试地址
|
||||
state: "bind",
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCodeImg } from '@/api/login';
|
||||
import { getCodeImg, getMsgCode } from '@/api/login';
|
||||
import Cookies from 'js-cookie';
|
||||
import { encrypt, decrypt } from '@/utils/jsencrypt';
|
||||
|
||||
|
||||
211
src/views/question/components/QuestionAddForm.vue
Normal file
@@ -0,0 +1,211 @@
|
||||
<template>
|
||||
<el-dialog title="试题" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="900px" @close="closeDialog">
|
||||
<div>
|
||||
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" label-position="left" @keyup.enter.native="dialogFormSubmit()">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="题目" prop="question">
|
||||
<el-input v-model="dialogForm.question" maxlength="200" placeholder="请输入题目" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="选项A" prop="question">
|
||||
<el-input v-model="dialogForm.chooseA" maxlength="200" placeholder="请输入" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="选项B" prop="question">
|
||||
<el-input v-model="dialogForm.chooseB" maxlength="200" placeholder="请输入" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="选项C" prop="question">
|
||||
<el-input v-model="dialogForm.chooseC" maxlength="200" placeholder="请输入" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="选项D" prop="question">
|
||||
<el-input v-model="dialogForm.chooseD" maxlength="200" placeholder="请输入" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="选项E" prop="question">
|
||||
<el-input v-model="dialogForm.chooseE" maxlength="200" placeholder="请输入" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="选项F" prop="question">
|
||||
<el-input v-model="dialogForm.chooseF" maxlength="200" placeholder="请输入" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="选项G" prop="question">
|
||||
<el-input v-model="dialogForm.chooseG" maxlength="200" placeholder="请输入" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="答案" prop="trueAnswer">
|
||||
<el-input v-model="dialogForm.trueAnswer" maxlength="200" placeholder="请输入" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="科目" prop="subject">
|
||||
<span v-if="dialogForm.subject == 1">科一</span>
|
||||
<span v-if="dialogForm.subject == 4">科四</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="精选500题" prop="isVip">
|
||||
<el-radio-group v-model="dialogForm.isVip" size="small">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="精选600题" prop="isVip2">
|
||||
<el-radio-group v-model="dialogForm.isVip2" size="small">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否易错题" prop="isError">
|
||||
<el-radio-group v-model="dialogForm.isError" size="small">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否新规" prop="isNew">
|
||||
<el-radio-group v-model="dialogForm.isNew" size="small">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否密卷1" prop="isExam1">
|
||||
<el-radio-group v-model="dialogForm.isExam1" size="small">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否密卷2" prop="isExam2">
|
||||
<el-radio-group v-model="dialogForm.isExam2" size="small">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="考点" prop="examKeys">
|
||||
<el-input v-model="dialogForm.examKeys" maxlength="200" placeholder="请输入考点" clearable />
|
||||
<span style="color:red;">包含多个考点,以英文";"分割!</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="答题技巧" prop="skillInfo">
|
||||
<el-input v-model="dialogForm.skillInfo" maxlength="200" placeholder="请输入" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button plain @click="(visible=false)">取消</el-button>
|
||||
<el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addQuestion } from '@/api/question';
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: true,
|
||||
dialogForm: {
|
||||
questionId: undefined,
|
||||
isVip: 0,
|
||||
isVip2: 0,
|
||||
isError: 0,
|
||||
isNew: 0,
|
||||
isExam1: 0,
|
||||
isExam2: 0,
|
||||
examKeys: undefined
|
||||
},
|
||||
dataRule: {
|
||||
schoolName: [{ required: true, message: '驾校名称不能为空', trigger: 'blur' }],
|
||||
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init (info = undefined) {
|
||||
// debugger
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.resetDialogForm();
|
||||
// this.$refs['dialogForm'].resetFields();
|
||||
if (info) {
|
||||
this.dialogForm = this.deepClone(info);
|
||||
}
|
||||
});
|
||||
},
|
||||
resetDialogForm () {
|
||||
this.dialogForm = {
|
||||
questionId: undefined,
|
||||
isVip: 0,
|
||||
isVip2: 0,
|
||||
isError: 0,
|
||||
isNew: 0,
|
||||
isExam1: 0,
|
||||
isExam2: 0,
|
||||
examKeys: undefined
|
||||
};
|
||||
},
|
||||
closeDialog () {
|
||||
this.$emit('update:dialogVisible', false);
|
||||
},
|
||||
// 表单提交
|
||||
dialogFormSubmit () {
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
updateQuestion(this.dialogForm).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
// this.visible = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
183
src/views/question/components/QuestionForm.vue
Normal file
@@ -0,0 +1,183 @@
|
||||
<template>
|
||||
<el-dialog title="试题" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="800px" @close="closeDialog">
|
||||
<div>
|
||||
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" label-position="left" @keyup.enter.native="dialogFormSubmit()">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="题目" prop="question">
|
||||
<div>{{ dialogForm.question }}</div>
|
||||
<img v-if="dialogForm.imageUrl" :src="dialogForm.imageUrl" width="100" alt="">
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="选项" prop="question">
|
||||
<span v-if="dialogForm.chooseA">A:{{ dialogForm.chooseA }}<span>
|
||||
<span v-if="dialogForm.chooseB">B:{{ dialogForm.chooseB }} </span>
|
||||
<span v-if="dialogForm.chooseC">C:{{ dialogForm.chooseC }} </span>
|
||||
<span v-if="dialogForm.chooseD">D:{{ dialogForm.chooseD }}</span>
|
||||
<span v-if="dialogForm.chooseE">E:{{ dialogForm.chooseE }}</span>
|
||||
<span v-if="dialogForm.chooseF">F:{{ dialogForm.chooseF }}</span>
|
||||
<span v-if="dialogForm.chooseG">G:{{ dialogForm.chooseG }}</span>
|
||||
</span></span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="答案" prop="trueAnswer">
|
||||
<span>{{ dialogForm.trueAnswer }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="科目" prop="subject">
|
||||
<span v-if="dialogForm.subject == 1">科一</span>
|
||||
<span v-if="dialogForm.subject == 4">科四</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="精选500题" prop="isVip">
|
||||
<el-radio-group v-model="dialogForm.isVip" size="small">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="精选600题" prop="isVip2">
|
||||
<el-radio-group v-model="dialogForm.isVip2" size="small">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否易错题" prop="isError">
|
||||
<el-radio-group v-model="dialogForm.isError" size="small">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否新规" prop="isNew">
|
||||
<el-radio-group v-model="dialogForm.isNew" size="small">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否密卷1" prop="isExam1">
|
||||
<el-radio-group v-model="dialogForm.isExam1" size="small">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否密卷2" prop="isExam2">
|
||||
<el-radio-group v-model="dialogForm.isExam2" size="small">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="考点" prop="examKeys">
|
||||
<el-input v-model="dialogForm.examKeys" maxlength="200" placeholder="请输入考点" clearable />
|
||||
<span style="color:red;">包含多个考点,以英文";"分割!</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="答题技巧" prop="skillInfo">
|
||||
<el-input v-model="dialogForm.skillInfo" maxlength="200" placeholder="请输入" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button plain @click="(visible = false)">取消</el-button>
|
||||
<el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateQuestion } from '@/api/question';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: true,
|
||||
dialogForm: {
|
||||
questionId: undefined,
|
||||
isVip: 0,
|
||||
isVip2: 0,
|
||||
isError: 0,
|
||||
isNew: 0,
|
||||
isExam1: 0,
|
||||
isExam2: 0,
|
||||
examKeys: undefined
|
||||
},
|
||||
dataRule: {
|
||||
schoolName: [{ required: true, message: '驾校名称不能为空', trigger: 'blur' }],
|
||||
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(info = undefined) {
|
||||
// debugger
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.resetDialogForm();
|
||||
// this.$refs['dialogForm'].resetFields();
|
||||
if (info) {
|
||||
this.dialogForm = this.deepClone(info);
|
||||
}
|
||||
});
|
||||
},
|
||||
resetDialogForm() {
|
||||
this.dialogForm = {
|
||||
questionId: undefined,
|
||||
isVip: 0,
|
||||
isVip2: 0,
|
||||
isError: 0,
|
||||
isNew: 0,
|
||||
isExam1: 0,
|
||||
isExam2: 0,
|
||||
examKeys: undefined
|
||||
};
|
||||
},
|
||||
closeDialog() {
|
||||
this.$emit('update:dialogVisible', false);
|
||||
},
|
||||
// 表单提交
|
||||
dialogFormSubmit() {
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
updateQuestion(this.dialogForm).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.$emit('update');
|
||||
// this.visible = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
143
src/views/question/index.vue
Normal file
@@ -0,0 +1,143 @@
|
||||
<template>
|
||||
<div class="app-container" style="text-align:center">
|
||||
<el-form size="small" :inline="true" label-width="68px" @submit.native.prevent>
|
||||
<el-row :gutter="20">
|
||||
<el-form-item label="车型">
|
||||
<el-radio-group v-model="queryParams.carTypeId">
|
||||
<el-radio :label="1001">小车</el-radio>
|
||||
<el-radio :label="1002">摩托车</el-radio>
|
||||
<el-radio :label="1003">货车</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="科目">
|
||||
<el-radio-group v-model="queryParams.subject">
|
||||
<el-radio :label="1">科一</el-radio>
|
||||
<el-radio :label="4">科四</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-form-item label="题目">
|
||||
<el-input v-model="queryParams.question" placeholder="请输入题目" clearable style="width:400px" @keyup.enter.native="handleQuery" />
|
||||
</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>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="tableList" style="width:80%;margin:auto" @row-click="handleEdit">
|
||||
<el-table-column type="index" width="55" align="center" />
|
||||
<el-table-column label="题目" align="center" prop="question" min-width="140" />
|
||||
<el-table-column label="选项" align="center" min-width="140">
|
||||
<template slot-scope="{row}">
|
||||
<p v-if="row.chooseA">A:{{ row.chooseA }}</p>
|
||||
<p v-if="row.chooseB">B:{{ row.chooseB }}</p>
|
||||
<p v-if="row.chooseC">C:{{ row.chooseC }}</p>
|
||||
<p v-if="row.chooseD">D:{{ row.chooseD }}</p>
|
||||
<p v-if="row.chooseE">E:{{ row.chooseE }}</p>
|
||||
<p v-if="row.chooseF">F:{{ row.chooseF }}</p>
|
||||
<p v-if="row.chooseG">G:{{ row.chooseG }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="答案" align="center" prop="trueAnswer" min-width="100" />
|
||||
<el-table-column label="科目" align="center" prop="subject" min-width="100">
|
||||
<template slot-scope="{row}">
|
||||
<p v-if="row.subject == 1">科一</p>
|
||||
<p v-if="row.subject == 4">科四</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否新规" align="center" min-width="100">
|
||||
<template slot-scope="{row}">
|
||||
{{ row.isNew ? '是' : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车型" align="center" min-width="100">
|
||||
<template slot-scope="{row}">
|
||||
{{ row.carTypeId == 1001 ? '小车' : '摩托车' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-download" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> -->
|
||||
<QuestionForm v-if="dialogVisible" ref="dialogForm" :dialog-visible="dialogVisible" @update="getList" />
|
||||
<QuestionAddForm v-if="dialogAddVisible" ref="dialogAddForm" :dialog-visible="dialogAddVisible" @update="getList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchQuestion } from '@/api/question';
|
||||
import QuestionForm from './components/QuestionForm.vue';
|
||||
import QuestionAddForm from './components/QuestionAddForm.vue';
|
||||
|
||||
export default {
|
||||
name: 'Question',
|
||||
components: {
|
||||
QuestionForm, QuestionAddForm
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
tableList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
question: '',
|
||||
carTypeId: 1001,
|
||||
subject: 1
|
||||
},
|
||||
dialogVisible: false,
|
||||
dialogAddVisible: false
|
||||
};
|
||||
},
|
||||
created () {
|
||||
// this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询文件列表 */
|
||||
getList () {
|
||||
this.loading = true;
|
||||
searchQuestion(this.queryParams).then(response => {
|
||||
this.tableList = response.data;
|
||||
// this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery () {
|
||||
if (this.queryParams.question) {
|
||||
this.getList();
|
||||
} else {
|
||||
this.$modal.msgWarning('请输入题目');
|
||||
}
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery () {
|
||||
this.queryParams.question = '';
|
||||
this.handleQuery();
|
||||
},
|
||||
handleEdit (item) {
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dialogForm.init(item);
|
||||
});
|
||||
},
|
||||
handleAdd (item) {
|
||||
this.dialogAddVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dialogAddForm.init(item);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="register">
|
||||
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
||||
<h3 class="title">对嘛管理系统</h3>
|
||||
<h3 class="title">开心学车管理系统</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
@@ -110,7 +110,7 @@ export default {
|
||||
.then(() => {
|
||||
this.$router.push('/login');
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
<el-button v-hasPermi="['sch:classType:add']" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
|
||||
<el-button v-hasPermi="['sch:classType:remove']" type="danger" icon="el-icon-delete" :disabled="multiple" @click="handleDelete">删除</el-button>
|
||||
<el-button v-hasPermi="['sch:classType:clone']" type="primary" icon="el-icon-copy" :disabled="multiple" @click="handleClone">克隆</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
@@ -41,13 +40,13 @@
|
||||
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="驾校" prop="schoolName" />
|
||||
<el-table-column label="场地" prop="placeName" />
|
||||
<el-table-column label="场地" prop="placeName" min-width="200" />
|
||||
<el-table-column label="班型名称" prop="typeName" />
|
||||
<el-table-column label="驾照类型" prop="licenseType" :formatter="licenseTypeFormat" width="80" />
|
||||
<!-- <el-table-column label="原价" prop="originalPrice" /> -->
|
||||
<el-table-column label="报价" prop="currentPrice" width="60" />
|
||||
<el-table-column label="底价" prop="minPrice" width="60" />
|
||||
<el-table-column label="描述" prop="description" />
|
||||
<el-table-column label="描述" prop="description" min-width="200" show-overflow-tooltip />
|
||||
<el-table-column label="状态" prop="status" :formatter="statusFormat" width="80" />
|
||||
<el-table-column label="创建时间" width="160">
|
||||
<template slot-scope="scope">
|
||||
@@ -110,24 +109,24 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="甩单低价" prop="orderMinPrice">
|
||||
<el-form-item label="甩单底价" prop="orderMinPrice">
|
||||
<el-input v-model="modalForm.orderMinPrice" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入账低价" prop="enterMinPrice">
|
||||
<el-form-item label="入账底价" prop="enterMinPrice">
|
||||
<el-input v-model="modalForm.enterMinPrice" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="公司低价" prop="companyMinPrice">
|
||||
<el-form-item label="公司底价" prop="companyMinPrice">
|
||||
<el-input v-model="modalForm.companyMinPrice" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="员工低价" prop="employeeMinPrice">
|
||||
<el-form-item label="员工底价" prop="employeeMinPrice">
|
||||
<el-input v-model="modalForm.employeeMinPrice" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -441,7 +440,7 @@ export default {
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(function () {});
|
||||
.catch(function () { });
|
||||
},
|
||||
handleClone() {
|
||||
this.cloneOpen = true;
|
||||
|
||||
138
src/views/sch/coach/components/CoachForm.vue
Normal file
@@ -0,0 +1,138 @@
|
||||
|
||||
<template>
|
||||
<el-dialog title="接待人信息" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="600px" @close="closeDialog">
|
||||
<div>
|
||||
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" label-position="top" @keyup.enter.native="dialogFormSubmit()">
|
||||
<!-- <el-form-item label="所属驾校" prop="schoolId">
|
||||
<el-select v-model="dialogForm.schoolId" filterable placeholder="请选择" value-key="schoolId" clearable size="small" style="width:100%">
|
||||
<el-option v-for="(dict, index) in schoolOptions" :key="index" :label="dict.schoolName" :value="dict.schoolId" />
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="接待人" prop="coachName">
|
||||
<el-input v-model="dialogForm.coachName" placeholder="请输入教练名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式" prop="phone">
|
||||
<el-input v-model="dialogForm.phone" placeholder="请输入联系方式" />
|
||||
</el-form-item>
|
||||
<el-form-item label="微信openid" prop="openId">
|
||||
<el-input v-model="dialogForm.openId" placeholder="请输入微信openid" />
|
||||
</el-form-item>
|
||||
<el-form-item label="负责场地" prop="placeIdList">
|
||||
<el-select v-model="dialogForm.placeIdList" multiple filterable placeholder="请选择" clearable size="small" style="width:100%">
|
||||
<el-option v-for="(dict, index) in placeOptions" :key="index" :label="dict.name" :value="dict.placeId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button plain @click="(visible=false)">取消</el-button>
|
||||
<el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addCoach, updateCoach } from '@/api/sch/coach';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
schoolOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
placeOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: true,
|
||||
dialogForm: {
|
||||
coachId: null,
|
||||
deptId: null,
|
||||
// schoolId: null,
|
||||
placeIdList: null,
|
||||
placeNames: null,
|
||||
coachName: null,
|
||||
phone: null,
|
||||
openId: null
|
||||
},
|
||||
dataRule: {
|
||||
// schoolId: [{ required: true, message: '所属驾校不能为空', trigger: 'blur' }],
|
||||
placeIdList: [{ required: true, message: '负责场地不能为空', trigger: 'blur' }],
|
||||
coachName: [{ required: true, message: '教练名不能为空', trigger: 'blur' }],
|
||||
phone: [{ required: true, message: '联系方式不能为空', trigger: 'blur' }],
|
||||
openId: [{ required: true, message: '微信openId不能为空', trigger: 'blur' }]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init (info = undefined) {
|
||||
// debugger
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.resetDialogForm();
|
||||
this.$refs['dialogForm'].resetFields();
|
||||
if (info) {
|
||||
this.dialogForm = this.deepClone(info);
|
||||
}
|
||||
});
|
||||
},
|
||||
resetDialogForm () {
|
||||
this.dialogForm = {
|
||||
coachId: null,
|
||||
deptId: null,
|
||||
schoolId: null,
|
||||
placeIdList: null,
|
||||
coachName: null,
|
||||
phone: null,
|
||||
openId: null
|
||||
};
|
||||
},
|
||||
closeDialog () {
|
||||
this.$emit('update:dialogVisible', false);
|
||||
},
|
||||
// 表单提交
|
||||
dialogFormSubmit () {
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
|
||||
if (this.dialogForm.coachId) {
|
||||
// 校验完成,调接口
|
||||
updateCoach(this.dialogForm)
|
||||
.then((resp) => {
|
||||
this.canSubmit = true;
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('保存成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addCoach(this.dialogForm)
|
||||
.then((resp) => {
|
||||
this.canSubmit = true;
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('保存成功');
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
85
src/views/sch/coach/count/detail.vue
Normal file
@@ -0,0 +1,85 @@
|
||||
<!-- 接待人员详情页 -->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px" label-position="top">
|
||||
<el-form-item label="时间" prop="type">
|
||||
<el-radio-group v-model="queryParams.type">
|
||||
<el-radio label="1">今日接待</el-radio>
|
||||
<el-radio label="2">本月接待</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="到场状态" prop="arrivalStatusList">
|
||||
<el-checkbox-group v-model="queryParams.arrivalStatusList">
|
||||
<el-checkbox :label="1">未到场</el-checkbox>
|
||||
<el-checkbox :label="2">到场未成交</el-checkbox>
|
||||
<el-checkbox :label="3">到场已成交</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="getList">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-back" size="mini" @click="back">返回</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="coachList">
|
||||
<el-table-column type="index" width="50" align="center" />
|
||||
<el-table-column label="学员姓名" align="center" prop="name" />
|
||||
<el-table-column label="联系方式" align="center" prop="phone" />
|
||||
<el-table-column label="到场状态" align="center" prop="arrivalStatus" >
|
||||
<template scope="scope">
|
||||
<el-tag v-if="scope.row.arrivalStatus == 1">未到场</el-tag>
|
||||
<el-tag v-if="scope.row.arrivalStatus == 2">到场未成交</el-tag>
|
||||
<el-tag v-if="scope.row.arrivalStatus == 3">到场已成交</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCountDetail} from '@/api/zs/feedbackDetail';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 教练表格数据
|
||||
coachList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
type: null, // 1本日统计 2本月统计
|
||||
coachId: null,
|
||||
arrivalStatusList: undefined
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.queryParams.type = this.$route.query.type;
|
||||
this.queryParams.coachId = this.$route.query.coachId
|
||||
if(this.queryParams.arrivalStatusList == undefined){
|
||||
this.queryParams.arrivalStatusList = [1,2]
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询教练列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getCountDetail(this.queryParams).then(resp=> {
|
||||
if(resp.code == 200 && resp.data){
|
||||
this.coachList = resp.data
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
back(){
|
||||
window.history.back()
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
91
src/views/sch/coach/count/index.vue
Normal file
@@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<!-- 接待人统计页面 -->
|
||||
<div class="app-container" style="max-width: 600px; margin: auto;">
|
||||
<el-form ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px" style="text-align: center;">
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input v-model="queryParams.phone" placeholder="请输入手机号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="验证码" prop="code">
|
||||
<el-input v-model="queryParams.code" placeholder="请输入验证码" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="getCount">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-card class="box-card" v-if="show">
|
||||
<div slot="header" class="clearfix" style="text-align: center;">
|
||||
<span>接待统计</span>
|
||||
</div>
|
||||
<div>
|
||||
<div><span>今日接到人数:{{countInfo.todayTotal == undefined ? 0 : countInfo.todayTotal}}</span></div>
|
||||
<div><span>今日成交人数:{{countInfo.todaySuccess == undefined ? 0 : countInfo.todaySuccess}}</span></div>
|
||||
<div><span>今日未成交人数:{{countInfo.todayUnSuccess == undefined ? 0 : countInfo.todayUnSuccess}}</span>
|
||||
<router-link :to="'/coach/count/detail?coachId=' + coachId +'&type=1'" style="color: blue;"> 详情</router-link>
|
||||
</div>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div>
|
||||
<div><span>本月接到人数:{{countInfo.monthTotal}}</span></div>
|
||||
<div><span>本月成交人数:{{countInfo.monthSuccess}}</span></div>
|
||||
<div><span>本月未成交人数:{{countInfo.monthUnSuccess}}</span>
|
||||
<router-link :to="'/coach/count/detail?coachId=' + coachId+'&type=2'" style="color: blue;"> 详情</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCount} from '@/api/zs/feedbackDetail';
|
||||
|
||||
export default {
|
||||
name: 'Count',
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
phone: null,
|
||||
code: null
|
||||
},
|
||||
countInfo: {
|
||||
todayTotal: 0,
|
||||
todaySuccess: 0,
|
||||
todayUnSuccess:0,
|
||||
monthTotal: 0,
|
||||
monthSuccess: 0,
|
||||
monthUnSuccess:0
|
||||
},
|
||||
coachId: undefined,
|
||||
show:false
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
/** 查询统计结果 */
|
||||
getCount() {
|
||||
this.resetCount();
|
||||
this.loading = true;
|
||||
getCount(this.queryParams).then(resp => {
|
||||
if(resp.code == 200 && resp.data ){
|
||||
this.countInfo = resp.data;
|
||||
this.coachId = resp.data.coachId;
|
||||
this.show = true;
|
||||
}
|
||||
})
|
||||
},
|
||||
resetCount(){
|
||||
this.countInfo= {
|
||||
todayTotal: 0,
|
||||
todaySuccess: 0,
|
||||
todayUnSuccess:0,
|
||||
monthTotal: 0,
|
||||
monthSuccess: 0,
|
||||
monthUnSuccess:0
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
153
src/views/sch/coach/index.vue
Normal file
@@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="所属场地" prop="placeId">
|
||||
<el-select v-model="queryParams.placeId" filterable placeholder="请选择" clearable value-key="placeId" size="small">
|
||||
<el-option v-for="(dict, index) in placeOptions" :key="index" :label="dict.name" :value="dict.placeId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="接待人" prop="coachName">
|
||||
<el-input v-model="queryParams.coachName" placeholder="请输入" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式" prop="phone">
|
||||
<el-input v-model="queryParams.phone" placeholder="请输入联系方式" clearable @keyup.enter.native="handleQuery" />
|
||||
</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>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button v-hasPermi="['sch:coach:add']" type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddAndUpdate(undefined)">新增</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="coachList">
|
||||
<el-table-column type="index" width="55" align="center" />
|
||||
<el-table-column label="接待人" align="center" prop="coachName" />
|
||||
<el-table-column label="联系方式" align="center" prop="phone" />
|
||||
<el-table-column label="负责场地" align="center" prop="placeNames" />
|
||||
<el-table-column label="微信openid" align="center" prop="openId" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-hasPermi="['sch:coach:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleAddAndUpdate(scope.row)">修改</el-button>
|
||||
<el-button v-hasPermi="['sch:coach:remove']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<!-- 添加或修改教练对话框 -->
|
||||
<coach-form v-if="dialogVisible" ref="dialogForm" :dialog-visible="dialogVisible" :school-options="schoolOptions" :place-options="placeOptions" @refreshDataList="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCoach, getCoach, delCoach } from '@/api/sch/coach';
|
||||
import CoachForm from './components/CoachForm.vue';
|
||||
import schoolAPi from '@/api/sch/school';
|
||||
import { getAllPlaces } from '@/api/sch/place';
|
||||
|
||||
export default {
|
||||
name: 'Coach',
|
||||
components: { CoachForm },
|
||||
data () {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 教练表格数据
|
||||
coachList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
schoolId: null,
|
||||
placeId: null,
|
||||
coachName: null,
|
||||
phone: null
|
||||
},
|
||||
dialogVisible: false,
|
||||
schoolOptions: [],
|
||||
placeOptions: []
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this.getSchools();
|
||||
this.getPlaces();
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询教练列表 */
|
||||
getList () {
|
||||
this.loading = true;
|
||||
listCoach(this.queryParams).then(response => {
|
||||
this.coachList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel () {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery () {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery () {
|
||||
this.resetForm('queryForm');
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增或修改按钮操作 */
|
||||
handleAddAndUpdate (item) {
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dialogForm.init(item);
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete (row) {
|
||||
const coachIds = row.coachId || this.ids;
|
||||
this.$modal.confirm('是否确认删除教练编号为"' + coachIds + '"的数据项?').then(function () {
|
||||
return delCoach(coachIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess('删除成功');
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport () {
|
||||
this.download('system/coach/export', {
|
||||
...this.queryParams
|
||||
}, `coach_${new Date().getTime()}.xlsx`);
|
||||
},
|
||||
getSchools () {
|
||||
schoolAPi.allList().then((resp) => {
|
||||
this.schoolOptions = resp.data;
|
||||
});
|
||||
},
|
||||
getPlaces () {
|
||||
getAllPlaces({ status: '0', showInMap: true }).then((resp) => {
|
||||
this.placeOptions = resp.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
747
src/views/sch/place/index copy.vue
Normal file
@@ -0,0 +1,747 @@
|
||||
|
||||
<template>
|
||||
<div class="amap-page-container">
|
||||
<div id="map" class="amap-cavans" />
|
||||
<el-input id="search" v-model="searchBody" class="search-body" placeholder="请输入..." @keyup.enter.native="submitSearch">
|
||||
<el-button slot="append" icon="el-icon-search" @click="submitSearch" />
|
||||
</el-input>
|
||||
<div class="asider" :class="showSchool ? '' : 'hidden-school'">
|
||||
<el-card class="box-card" :body-style="{ flex: 1, 'overflow-y': 'scroll', padding: 0 }">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="map-card-title">驾校列表</div>
|
||||
</div>
|
||||
<div v-for="school in schoolList" :key="school.schoolId" style="margin:10px;" :class="currentdeptId == school.schoolId ? 'actived-school' : ''">
|
||||
<el-card :body-style="{ padding: '10px' }">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="map-card-title">{{ school.schoolName }}</div>
|
||||
<el-switch v-model="school.showInMap" v-hasPermi="['sch:place:edit']" class="add-icon" active-text="展示" inactive-text="隐藏" @change="changeSchoolStatus(school)" />
|
||||
</div>
|
||||
<el-button @click="handleClickSchool(school)">{{ `数据管理(${getCount(school.schoolId)})` }}</el-button>
|
||||
<el-tooltip v-hasPermi="['sch:place:add']" content="新增场地" placement="left" effect="dark">
|
||||
<el-button icon="el-icon-plus" class="add-place-btn" @click="handleInsertPlace(school.schoolId)" />
|
||||
</el-tooltip>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="asider-sub">
|
||||
<el-tooltip content="放大" placement="left" effect="dark">
|
||||
<el-button icon="el-icon-plus" class="is-circle" :disabled="zomm >= 18" @click="bigger" />
|
||||
</el-tooltip>
|
||||
<el-tooltip content="缩小" placement="left" effect="dark">
|
||||
<el-button icon="el-icon-minus" class="is-circle" :disabled="zomm <= 8" @click="smaller" />
|
||||
</el-tooltip>
|
||||
<div class="mt10">
|
||||
<el-tooltip content="驾校" placement="left" effect="dark">
|
||||
<el-button icon="el-icon-school" class="is-circle" @click="toggleSchool" />
|
||||
</el-tooltip>
|
||||
<el-tooltip content="定位" placement="left" effect="dark">
|
||||
<el-button icon="el-icon-help" class="is-circle" @click="geolocation" />
|
||||
</el-tooltip>
|
||||
<el-tooltip content="测距" placement="left" effect="dark">
|
||||
<el-button icon="el-icon-thumb" class="is-circle" @click="ranging" />
|
||||
</el-tooltip>
|
||||
<el-tooltip content="分享" placement="left" effect="dark">
|
||||
<el-button icon="el-icon-share" class="is-circle" />
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-card v-if="placeDialogShow" class="place-dialog" :body-style="{ padding: '10px' }">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="map-card-title">场地设置</div>
|
||||
<el-tooltip content="取点" placement="right" effect="dark">
|
||||
<el-button icon="el-icon-location" class="add-icon" @click="getPoint" />
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-form ref="placeForm" :model="placeForm" label-width="70px">
|
||||
<el-form-item label="所属驾校" prop="schoolId">
|
||||
<el-select v-model="placeForm.schoolId" placeholder="请选择" clearable>
|
||||
<el-option v-for="dict in schoolList" :key="dict.schoolId" :label="dict.schoolName" :value="dict.schoolId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="placeForm.name" placeholder="输入名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="旗子颜色" prop="flagColor">
|
||||
<el-radio-group v-model="placeForm.flagColor">
|
||||
<el-radio v-for="(item, index) in colorOptions" :key="index" :label="item">
|
||||
<img :src="require(`@/assets/images/place/flag_${item}.png`)" width="20px">
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input v-model="placeForm.address" placeholder="输入地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="经度" prop="lng">
|
||||
<el-input v-model="placeForm.lng" placeholder="输入经度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="纬度" prop="lat">
|
||||
<el-input v-model="placeForm.lat" placeholder="输入纬度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属区域" prop="area">
|
||||
<el-select v-model="placeForm.area" placeholder="请选择" clearable size="small">
|
||||
<el-option v-for="dict in areaOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="phone">
|
||||
<el-input v-model="placeForm.phone" placeholder="输入电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人" prop="contact">
|
||||
<el-input v-model="placeForm.contact" placeholder="输入负责人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否推荐" prop="contact">
|
||||
<el-radio v-model="placeForm.recommend" :label="true">是</el-radio>
|
||||
<el-radio v-model="placeForm.recommend" :label="false">否</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="placeForm.remark" placeholder="输入备注" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" />
|
||||
</el-form-item>
|
||||
<el-form-item style="text-align:right;">
|
||||
<el-button v-hasPermi="['sch:place:edit']" type="primary" @click="onSubmit">保存</el-button>
|
||||
<el-button @click="closePlaceDialog">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card :class="placeListDialogShow ? '' : 'hidden-place-list'" class="place-list-dialog" :style="{ right: showSchool ? '300px' : '0', top: fullScreenPlaceList ? '0px' : '420px' }" :body-style="{ padding: '10px', height: 'calc(100% - 52px)' }">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="map-card-title">
|
||||
{{ placeListDialogTitle }}
|
||||
<el-input v-model="tableSearch" placeholder="请输入搜索的内容" clearable />
|
||||
</div>
|
||||
<el-tooltip content="全屏" placement="top" effect="dark">
|
||||
<el-button icon="el-icon-full-screen" class="add-icon" @click="fullScreenPlaceList = !fullScreenPlaceList" />
|
||||
</el-tooltip>
|
||||
<el-tooltip content="关闭" placement="top" effect="dark">
|
||||
<el-button icon="el-icon-close" class="add-icon" @click="() => { placeListDialogShow = false; fullScreenPlaceList = false }" />
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-table :data="placeTableData" border stripe class="place-table-list" height="100%">
|
||||
<el-table-column label="序号" type="index" fixed="left" width="50" />
|
||||
<el-table-column prop="name" label="名称" min-width="100" />
|
||||
<el-table-column prop="phone" label="电话" width="120" />
|
||||
<el-table-column prop="contact" label="负责人" width="120" />
|
||||
<el-table-column prop="address" label="地址" min-width="100" />
|
||||
<el-table-column prop="lng" label="经度" width="110" />
|
||||
<el-table-column prop="lat" label="纬度" width="110" />
|
||||
<el-table-column prop="area" label="所属区域" width="110" />
|
||||
<el-table-column label="展示" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.showInMap" v-hasPermi="['sch:place:edit']" @change="changePlaceStatus(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip v-hasPermi="['sch:place:edit']" content="编辑" placement="top" effect="dark">
|
||||
<el-button icon="el-icon-edit" type="primary" style="padding: 4px 8px;" @click="handleEditPlace(scope.row)" />
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<div v-if="isPointing || isRanging" class="map-tip" :style="{ transform: 'translate3D(' + (tipPostion.x + 15) + 'px,' + (tipPostion.y - 10) + 'px, 0)' }">{{ mapHelpText }}</div>
|
||||
<i v-if="isPointing" class="el-icon-s-flag circle" :style="{ transform: 'translate3D(' + tipPostion.x + 'px,' + tipPostion.y + 'px, 0)' }" />
|
||||
</div>
|
||||
</template>
|
||||
<!-- eslint-disable no-undef -->
|
||||
<script>
|
||||
import AMap from 'AMap';
|
||||
import { getMapData, addPlace, updatePlace, updateSchoolStatus } from '@/api/sch/place';
|
||||
export default {
|
||||
name: 'Place',
|
||||
data() {
|
||||
return {
|
||||
aMap: null,
|
||||
zomm: 12,
|
||||
showSchool: true,
|
||||
isRanging: false,
|
||||
aMapLocation: null,
|
||||
aMouseTool: null,
|
||||
searchBody: '',
|
||||
placeSearch: null,
|
||||
placeDialogShow: false,
|
||||
isPointing: false,
|
||||
placeForm: {
|
||||
lat: undefined,
|
||||
lng: undefined,
|
||||
name: undefined,
|
||||
address: undefined,
|
||||
remark: undefined,
|
||||
phone: undefined,
|
||||
flagColor: 'red'
|
||||
},
|
||||
colorOptions: ['red', 'yellow', 'blue', 'green', 'purple', 'black'],
|
||||
mapHelpText: '',
|
||||
tipPostion: {
|
||||
x: 0,
|
||||
y: 0
|
||||
},
|
||||
geocoder: null,
|
||||
locationMarker: null,
|
||||
selectMarker: null,
|
||||
placeListDialogShow: false,
|
||||
placeListDialogTitle: '',
|
||||
fullScreenPlaceList: false,
|
||||
tableSearch: '',
|
||||
tableData: [],
|
||||
schoolList: [],
|
||||
currentdeptId: undefined,
|
||||
placeMarkerList: [],
|
||||
areaOptions: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
placeTableData: function () {
|
||||
if (this.tableSearch) {
|
||||
return this.tableData.filter((dataNews) => {
|
||||
return (
|
||||
dataNews.schoolId === this.currentdeptId &&
|
||||
Object.keys(dataNews).some((key) => {
|
||||
return String(dataNews[key]).toLowerCase().indexOf(this.tableSearch) > -1;
|
||||
})
|
||||
);
|
||||
});
|
||||
}
|
||||
return this.tableData.filter((dataNews) => dataNews.schoolId === this.currentdeptId);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initMap();
|
||||
this.getDicts('dm_area').then((response) => {
|
||||
this.areaOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initMap() {
|
||||
window.onLoad = () => {
|
||||
this.aMap = new AMap.Map('map', {
|
||||
zoom: this.zomm,
|
||||
center: [117.226095, 31.814372],
|
||||
zooms: [8, 18]
|
||||
});
|
||||
// 监听缩放
|
||||
this.aMap.on('zoomend', () => {
|
||||
this.zomm = this.aMap.getZoom();
|
||||
this.$message('当前缩放等级:' + this.zomm);
|
||||
});
|
||||
// 监听点击
|
||||
this.aMap.on('click', (ev) => {
|
||||
if (this.isPointing) {
|
||||
this.placeForm.lat = ev.lnglat.lat;
|
||||
this.placeForm.lng = ev.lnglat.lng;
|
||||
this.regeoCode();
|
||||
if (this.selectMarker) {
|
||||
this.selectMarker.setPosition([this.placeForm.lng, this.placeForm.lat]);
|
||||
} else {
|
||||
this.locationMarker.setPosition([this.placeForm.lng, this.placeForm.lat]);
|
||||
this.aMap.add(this.locationMarker);
|
||||
}
|
||||
this.isPointing = false;
|
||||
}
|
||||
});
|
||||
// 监听移动
|
||||
this.aMap.on('mousemove', (ev) => {
|
||||
if (this.isRanging) {
|
||||
this.mapHelpText = '左键单击选点,双击/右键单击完成选点,再次点击测距按钮可退出测距模式,并清除测距结果';
|
||||
this.tipPostion = {
|
||||
x: ev.pixel.x,
|
||||
y: ev.pixel.y
|
||||
};
|
||||
} else if (this.isPointing) {
|
||||
this.mapHelpText = '点击地图添加标注';
|
||||
this.tipPostion = {
|
||||
x: ev.pixel.x,
|
||||
y: ev.pixel.y
|
||||
};
|
||||
}
|
||||
});
|
||||
// 添加地图插件
|
||||
AMap.plugin(['AMap.Scale', 'AMap.Geolocation', 'AMap.MouseTool', 'AMap.PlaceSearch', 'AMap.Autocomplete', 'AMap.Geocoder'], () => {
|
||||
this.aMap.addControl(new AMap.Scale());
|
||||
const geoLoca = new AMap.Geolocation({
|
||||
showButton: false
|
||||
});
|
||||
this.aMapLocation = geoLoca;
|
||||
this.aMap.addControl(geoLoca);
|
||||
this.aMouseTool = new AMap.MouseTool(this.aMap);
|
||||
const auto = new AMap.Autocomplete({
|
||||
input: 'search' // 前端搜索框
|
||||
});
|
||||
this.placeSearch = new AMap.PlaceSearch({
|
||||
map: this.aMap
|
||||
});
|
||||
AMap.event.addListener(auto, 'select', this.select);
|
||||
this.geocoder = new AMap.Geocoder();
|
||||
this.locationMarker = new AMap.Marker({
|
||||
icon: require(`@/assets/images/place/flag_red.png`)
|
||||
});
|
||||
});
|
||||
this.getPageData();
|
||||
};
|
||||
// this.importMap();
|
||||
},
|
||||
// 导入地图
|
||||
// importMap() {
|
||||
// const url = 'https://webapi.amap.com/maps?v=1.4.15&key=0e62be0896c6b8d27d453445f0fb8bc4&callback=onLoad';
|
||||
// var jsapi = document.createElement('script');
|
||||
// jsapi.charset = 'utf-8';
|
||||
// jsapi.src = url;
|
||||
// document.head.appendChild(jsapi);
|
||||
// },
|
||||
toggleSchool() {
|
||||
this.showSchool = !this.showSchool;
|
||||
},
|
||||
// 经纬度 -> 地址
|
||||
regeoCode() {
|
||||
this.geocoder.getAddress([this.placeForm.lng, this.placeForm.lat], (status, result) => {
|
||||
if (status === 'complete' && result.regeocode) {
|
||||
this.placeForm.address = result.regeocode.formattedAddress;
|
||||
} else {
|
||||
console.log('根据经纬度查询地址失败');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 定位
|
||||
geolocation() {
|
||||
this.aMapLocation.getCurrentPosition();
|
||||
},
|
||||
// 测距
|
||||
ranging() {
|
||||
this.isPointing = false;
|
||||
this.isRanging = !this.isRanging;
|
||||
if (this.isRanging) {
|
||||
this.aMap.setDefaultCursor('crosshair');
|
||||
this.drawLine();
|
||||
} else {
|
||||
this.aMap.setDefaultCursor('default');
|
||||
this.aMouseTool.close(true);
|
||||
}
|
||||
},
|
||||
// 画线
|
||||
drawLine() {
|
||||
this.aMouseTool.rule({
|
||||
startMarkerOptions: {
|
||||
// 可缺省
|
||||
icon: new AMap.Icon({
|
||||
size: new AMap.Size(19, 31), // 图标大小
|
||||
imageSize: new AMap.Size(19, 31),
|
||||
image: 'https://webapi.amap.com/theme/v1.3/markers/b/start.png'
|
||||
})
|
||||
},
|
||||
endMarkerOptions: {
|
||||
// 可缺省
|
||||
icon: new AMap.Icon({
|
||||
size: new AMap.Size(19, 31), // 图标大小
|
||||
imageSize: new AMap.Size(19, 31),
|
||||
image: 'https://webapi.amap.com/theme/v1.3/markers/b/end.png'
|
||||
}),
|
||||
offset: new AMap.Pixel(-9, -31)
|
||||
},
|
||||
midMarkerOptions: {
|
||||
// 可缺省
|
||||
icon: new AMap.Icon({
|
||||
size: new AMap.Size(19, 31), // 图标大小
|
||||
imageSize: new AMap.Size(19, 31),
|
||||
image: 'https://webapi.amap.com/theme/v1.3/markers/b/mid.png'
|
||||
}),
|
||||
offset: new AMap.Pixel(-9, -31)
|
||||
},
|
||||
lineOptions: {
|
||||
// 可缺省
|
||||
strokeStyle: 'solid',
|
||||
strokeColor: '#FF33FF',
|
||||
strokeOpacity: 1,
|
||||
strokeWeight: 2
|
||||
},
|
||||
tmpLineOptions: {
|
||||
strokeStyle: 'dashed',
|
||||
strokeColor: '#FF33FF',
|
||||
strokeOpacity: 1,
|
||||
strokeWeight: 2
|
||||
}
|
||||
});
|
||||
},
|
||||
// 选择查询结果
|
||||
select(e) {
|
||||
this.placeSearch.setCity(e.poi.adcode);
|
||||
this.placeSearch.search(e.poi.name); // 关键字查询查询
|
||||
},
|
||||
// 查询按钮/回车事件
|
||||
submitSearch() {
|
||||
this.placeSearch.search(this.searchBody);
|
||||
},
|
||||
// 缩放
|
||||
bigger() {
|
||||
this.zomm++;
|
||||
this.aMap.setZoom(this.zomm);
|
||||
},
|
||||
smaller() {
|
||||
this.zomm--;
|
||||
this.aMap.setZoom(this.zomm);
|
||||
},
|
||||
|
||||
// 点击数据管理
|
||||
handleClickSchool(item) {
|
||||
this.placeListDialogShow = true;
|
||||
this.placeListDialogTitle = `数据管理 [${item.schoolName}]`;
|
||||
this.currentdeptId = item.schoolId;
|
||||
},
|
||||
// 新增场地
|
||||
handleInsertPlace(schoolId) {
|
||||
if (this.selectMarker) {
|
||||
this.selectMarker.setAnimation('AMAP_ANIMATION_NONE');
|
||||
this.selectMarker = null;
|
||||
}
|
||||
this.placeDialogShow = true;
|
||||
this.aMap.setDefaultCursor('default');
|
||||
this.isRanging = false;
|
||||
this.placeForm = {
|
||||
lat: undefined,
|
||||
lng: undefined,
|
||||
name: undefined,
|
||||
address: undefined,
|
||||
remark: undefined,
|
||||
phone: undefined,
|
||||
schoolId: schoolId,
|
||||
showInMap: true,
|
||||
flagColor: 'red'
|
||||
};
|
||||
},
|
||||
// 编辑场地
|
||||
handleEditPlace(item) {
|
||||
this.placeDialogShow = true;
|
||||
this.aMap.setDefaultCursor('default');
|
||||
if (this.selectMarker) {
|
||||
this.selectMarker.setAnimation('AMAP_ANIMATION_NONE');
|
||||
}
|
||||
this.isRanging = false;
|
||||
this.placeForm = Object.assign({}, item);
|
||||
this.selectMarker = this.placeMarkerList.filter((marker) => marker.getExtData().placeId === item.placeId)[0];
|
||||
this.selectMarker && this.selectMarker.setAnimation('AMAP_ANIMATION_BOUNCE');
|
||||
this.aMap.setCenter([item.lng, item.lat]);
|
||||
},
|
||||
getPoint() {
|
||||
this.isPointing = !this.isPointing;
|
||||
},
|
||||
// 保存
|
||||
async onSubmit() {
|
||||
// 保存接口
|
||||
if (this.checkPlaceFormValidate()) {
|
||||
// 先访问接口,返回id插入placeForm
|
||||
const resp = this.savePlace(this.placeForm);
|
||||
if (resp.code != 200) {
|
||||
return;
|
||||
} else {
|
||||
this.$message.success('操作成功');
|
||||
}
|
||||
if (!this.placeForm.placeId && resp.data) {
|
||||
this.$set(this.placeForm, 'placeId', resp.data);
|
||||
}
|
||||
// 移除选点用 的标记
|
||||
this.aMap.remove(this.locationMarker);
|
||||
// 根据form创建新marker 并添加到地图上
|
||||
const tmpMarker = new AMap.Marker({
|
||||
map: this.aMap,
|
||||
position: [this.placeForm.lng, this.placeForm.lat],
|
||||
icon: require(`@/assets/images/place/flag_${this.placeForm.flagColor}.png`),
|
||||
label: {
|
||||
content: this.placeForm.name,
|
||||
direction: 'right'
|
||||
},
|
||||
extData: this.placeForm
|
||||
});
|
||||
// 新marker事件
|
||||
tmpMarker.on('click', this.handleClickMarker);
|
||||
// 如果当前选择的marker点存在(编辑)
|
||||
if (this.selectMarker) {
|
||||
// 地图上 移除选择的点
|
||||
this.aMap.remove(this.selectMarker);
|
||||
this.selectMarker = null;
|
||||
}
|
||||
// 关闭场地弹窗
|
||||
this.placeDialogShow = false;
|
||||
this.isPointing = false;
|
||||
|
||||
// 场地列表 移除原列表中操作的场地数据
|
||||
const tmpArr = this.tableData.filter((item) => item.placeId !== this.placeForm.placeId);
|
||||
// 新增新的场地
|
||||
tmpArr.push(this.placeForm);
|
||||
// 重置场地数组
|
||||
this.tableData = tmpArr;
|
||||
// 地图marker列表 移除操作的原marker 添加新marker进数组
|
||||
const tmpArr1 = this.placeMarkerList.filter((item) => item.getExtData().placeId !== this.placeForm.placeId);
|
||||
tmpArr1.push(tmpMarker);
|
||||
this.placeMarkerList = tmpArr1;
|
||||
}
|
||||
},
|
||||
async savePlace(item) {
|
||||
if (item.placeId) {
|
||||
return updatePlace(item);
|
||||
} else {
|
||||
return addPlace(item);
|
||||
}
|
||||
},
|
||||
checkPlaceFormValidate() {
|
||||
const valid = [];
|
||||
if (!this.placeForm.name) {
|
||||
valid.push('名称');
|
||||
}
|
||||
if (!this.placeForm.address) {
|
||||
valid.push('地址');
|
||||
}
|
||||
if (!this.placeForm.lng) {
|
||||
valid.push('经度');
|
||||
}
|
||||
if (!this.placeForm.lat) {
|
||||
valid.push('纬度');
|
||||
}
|
||||
if (!this.placeForm.phone) {
|
||||
valid.push('电话');
|
||||
}
|
||||
if (valid.length == 0) {
|
||||
return true;
|
||||
} else {
|
||||
this.$message.error(`请将以下填写完整: ${valid.join(',')}`);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 关闭场地弹窗
|
||||
closePlaceDialog() {
|
||||
this.placeDialogShow = false;
|
||||
this.isPointing = false;
|
||||
this.aMap.remove(this.locationMarker);
|
||||
if (this.selectMarker) {
|
||||
this.selectMarker.setAnimation('AMAP_ANIMATION_NONE');
|
||||
this.selectMarker = null;
|
||||
}
|
||||
},
|
||||
handleClickMarker(ev) {
|
||||
if (this.selectMarker) {
|
||||
this.selectMarker.setAnimation('AMAP_ANIMATION_NONE');
|
||||
}
|
||||
this.placeForm = ev.target.getExtData();
|
||||
this.placeDialogShow = true;
|
||||
ev.target.setAnimation('AMAP_ANIMATION_BOUNCE');
|
||||
this.selectMarker = ev.target;
|
||||
},
|
||||
getPageData() {
|
||||
getMapData().then((resp) => {
|
||||
if (resp.code == 200) {
|
||||
this.schoolList = resp.data.schoolList;
|
||||
this.tableData = resp.data.placeList;
|
||||
this.currentdeptId = this.schoolList[0].schoolId;
|
||||
this.createMarkersInMap();
|
||||
}
|
||||
});
|
||||
},
|
||||
getCount(schoolId) {
|
||||
return this.tableData.filter((item) => item.schoolId === schoolId).length;
|
||||
},
|
||||
// 重置markers
|
||||
resetMarkers() {
|
||||
this.aMap.clearMap();
|
||||
this.createMarkersInMap();
|
||||
},
|
||||
// 生成markers
|
||||
createMarkersInMap() {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
const element = this.tableData[i];
|
||||
const tempSchool = this.schoolList.filter((item) => item.schoolId === element.schoolId)[0];
|
||||
if (!element.schoolShow || !element.showInMap) {
|
||||
continue;
|
||||
}
|
||||
const tmpMarker = new AMap.Marker({
|
||||
map: this.aMap,
|
||||
position: [element.lng, element.lat],
|
||||
icon: require(`@/assets/images/place/flag_${element.flagColor}.png`),
|
||||
label: {
|
||||
content: element.name,
|
||||
direction: 'right'
|
||||
},
|
||||
extData: element
|
||||
});
|
||||
tmpMarker.on('click', this.handleClickMarker);
|
||||
this.placeMarkerList.push(tmpMarker);
|
||||
}
|
||||
},
|
||||
// 修改驾校状态
|
||||
changeSchoolStatus(item) {
|
||||
// 访问接口,成功后重置markers
|
||||
updateSchoolStatus(item).then((resp) => {
|
||||
if (resp.code == 200) {
|
||||
this.$message.success('操作成功');
|
||||
// this.aMap.clearMap()
|
||||
// this.getPageData()
|
||||
this.resetMarkers();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改场地状态
|
||||
async changePlaceStatus(item) {
|
||||
const resp = await updatePlace(item);
|
||||
if (resp.code == 200) {
|
||||
this.resetMarkers();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.amap-page-container {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.amap-cavans {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.asider {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 300px;
|
||||
height: 100%;
|
||||
transition: 0.3s;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.box-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
::v-deep .el-card__header {
|
||||
padding: 10px 15px;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.clearfix .map-card-title {
|
||||
flex: 1;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.clearfix .add-icon {
|
||||
width: auto;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.asider-sub {
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
left: -45px;
|
||||
padding: 10px 10px 0 0;
|
||||
z-index: 900;
|
||||
}
|
||||
|
||||
.asider-sub .is-circle {
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
color: #464646;
|
||||
border-radius: 0;
|
||||
font-size: 16px;
|
||||
box-shadow: 2px 2px 2px rgba(80, 80, 80, 0.67);
|
||||
}
|
||||
|
||||
.mt10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.hidden-school {
|
||||
transform: translateX(300px);
|
||||
}
|
||||
|
||||
.search-body {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.add-place-btn {
|
||||
float: right;
|
||||
border: none;
|
||||
font-size: 16px;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
::v-deep .place-dialog {
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: 60px;
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
.map-tip {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
max-width: 150px;
|
||||
padding: 5px;
|
||||
border-radius: 2px;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
opacity: 0.7;
|
||||
font-size: 12px;
|
||||
transition-duration: 1ms;
|
||||
}
|
||||
|
||||
.circle {
|
||||
position: absolute;
|
||||
left: -8px;
|
||||
top: -25px;
|
||||
font-size: 24px;
|
||||
color: red;
|
||||
transition-duration: 1ms;
|
||||
}
|
||||
|
||||
.place-dialog .el-form .el-form-item {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.place-list-dialog {
|
||||
position: absolute;
|
||||
top: 420px;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
transition: 0.3s;
|
||||
z-index: 151;
|
||||
background: #e2e5ea;
|
||||
}
|
||||
|
||||
.place-list-dialog .add-icon {
|
||||
font-size: 18px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.hidden-place-list {
|
||||
transform: translateY(100%);
|
||||
}
|
||||
|
||||
.place-list-dialog .clearfix .map-card-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.place-list-dialog .clearfix .map-card-title .el-input {
|
||||
margin-left: 20px;
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
.actived-school {
|
||||
border: 2px solid #409eff !important;
|
||||
}
|
||||
|
||||
::v-deep .el-radio__label {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
@@ -5,12 +5,12 @@
|
||||
<el-input id="search" v-model="searchBody" class="search-body" placeholder="请输入..." @keyup.enter.native="submitSearch">
|
||||
<el-button slot="append" icon="el-icon-search" @click="submitSearch" />
|
||||
</el-input>
|
||||
<div class="asider" :class="showSchool ? '':'hidden-school'">
|
||||
<el-card class="box-card" :body-style="{ flex: 1,'overflow-y': 'scroll', padding: 0 }">
|
||||
<div class="asider" :class="showSchool ? '' : 'hidden-school'">
|
||||
<el-card class="box-card" :body-style="{ flex: 1, 'overflow-y': 'scroll', padding: 0 }">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="map-card-title">驾校列表</div>
|
||||
</div>
|
||||
<div v-for="school in schoolList" :key="school.schoolId" style="margin:10px;" :class="currentdeptId == school.schoolId?'actived-school':''">
|
||||
<div v-for="school in schoolList" :key="school.schoolId" style="margin:10px;" :class="currentdeptId == school.schoolId ? 'actived-school' : ''">
|
||||
<el-card :body-style="{ padding: '10px' }">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="map-card-title">{{ school.schoolName }}</div>
|
||||
@@ -94,7 +94,7 @@
|
||||
<el-radio v-model="placeForm.recommend" :label="false">否</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="placeForm.remark" placeholder="输入备注" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" />
|
||||
<el-input v-model="placeForm.remark" placeholder="输入备注" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" />
|
||||
</el-form-item>
|
||||
<el-form-item style="text-align:right;">
|
||||
<el-button v-hasPermi="['sch:place:edit']" type="primary" @click="onSubmit">保存</el-button>
|
||||
@@ -102,7 +102,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card :class="placeListDialogShow ? '':'hidden-place-list'" class="place-list-dialog" :style="{ right: showSchool ? '300px' : '0', top : fullScreenPlaceList?'0px':'420px' }" :body-style="{ padding: '10px', height: 'calc(100% - 52px)' }">
|
||||
<el-card :class="placeListDialogShow ? '' : 'hidden-place-list'" class="place-list-dialog" :style="{ right: showSchool ? '300px' : '0', top: fullScreenPlaceList ? '0px' : '420px' }" :body-style="{ padding: '10px', height: 'calc(100% - 52px)' }">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="map-card-title">
|
||||
{{ placeListDialogTitle }}
|
||||
@@ -112,7 +112,7 @@
|
||||
<el-button icon="el-icon-full-screen" class="add-icon" @click="fullScreenPlaceList = !fullScreenPlaceList" />
|
||||
</el-tooltip>
|
||||
<el-tooltip content="关闭" placement="top" effect="dark">
|
||||
<el-button icon="el-icon-close" class="add-icon" @click="() => { placeListDialogShow = false;fullScreenPlaceList = false }" />
|
||||
<el-button icon="el-icon-close" class="add-icon" @click="() => { placeListDialogShow = false; fullScreenPlaceList = false }" />
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-table :data="placeTableData" border stripe class="place-table-list" height="100%">
|
||||
@@ -139,13 +139,14 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<div v-if="isPointing || isRanging" class="map-tip" :style="{ transform: 'translate3D(' + (tipPostion.x + 15) +'px,' + (tipPostion.y - 10) + 'px, 0)' }">{{ mapHelpText }}</div>
|
||||
<i v-if="isPointing" class="el-icon-s-flag circle" :style="{ transform: 'translate3D(' + tipPostion.x +'px,' + tipPostion.y + 'px, 0)' }" />
|
||||
<div v-if="isPointing || isRanging" class="map-tip" :style="{ transform: 'translate3D(' + (tipPostion.x + 15) + 'px,' + (tipPostion.y - 10) + 'px, 0)' }">{{ mapHelpText }}</div>
|
||||
<i v-if="isPointing" class="el-icon-s-flag circle" :style="{ transform: 'translate3D(' + tipPostion.x + 'px,' + tipPostion.y + 'px, 0)' }" />
|
||||
</div>
|
||||
</template>
|
||||
<!-- eslint-disable no-undef -->
|
||||
<script>
|
||||
import { getMapData, savePlace, updateSchoolStatus } from '@/api/sch/place';
|
||||
import AMap from 'AMap';
|
||||
import { getMapData, addPlace, updatePlace, updateSchoolStatus } from '@/api/sch/place';
|
||||
export default {
|
||||
name: 'Place',
|
||||
data() {
|
||||
@@ -212,9 +213,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initMap() {
|
||||
window.onLoad = () => {
|
||||
this.aMap = new AMap.Map('map', {
|
||||
zoom: this.zomm,
|
||||
center: [121.448641, 31.2071],
|
||||
zooms: [8, 18]
|
||||
});
|
||||
// 监听缩放
|
||||
@@ -275,17 +276,16 @@ export default {
|
||||
});
|
||||
});
|
||||
this.getPageData();
|
||||
};
|
||||
this.importMap();
|
||||
// this.importMap();
|
||||
},
|
||||
// 导入地图
|
||||
importMap() {
|
||||
const url = 'https://webapi.amap.com/maps?v=1.4.15&key=f2f35d6adc4a16bb879d303cead56237&callback=onLoad';
|
||||
var jsapi = document.createElement('script');
|
||||
jsapi.charset = 'utf-8';
|
||||
jsapi.src = url;
|
||||
document.head.appendChild(jsapi);
|
||||
},
|
||||
// importMap() {
|
||||
// const url = 'https://webapi.amap.com/maps?v=1.4.15&key=0e62be0896c6b8d27d453445f0fb8bc4&callback=onLoad';
|
||||
// var jsapi = document.createElement('script');
|
||||
// jsapi.charset = 'utf-8';
|
||||
// jsapi.src = url;
|
||||
// document.head.appendChild(jsapi);
|
||||
// },
|
||||
toggleSchool() {
|
||||
this.showSchool = !this.showSchool;
|
||||
},
|
||||
@@ -426,7 +426,7 @@ export default {
|
||||
// 保存接口
|
||||
if (this.checkPlaceFormValidate()) {
|
||||
// 先访问接口,返回id插入placeForm
|
||||
const resp = await savePlace(this.placeForm);
|
||||
const resp = this.savePlace(this.placeForm);
|
||||
if (resp.code != 200) {
|
||||
return;
|
||||
} else {
|
||||
@@ -472,6 +472,13 @@ export default {
|
||||
this.placeMarkerList = tmpArr1;
|
||||
}
|
||||
},
|
||||
async savePlace(item) {
|
||||
if (item.placeId) {
|
||||
return updatePlace(item);
|
||||
} else {
|
||||
return addPlace(item);
|
||||
}
|
||||
},
|
||||
checkPlaceFormValidate() {
|
||||
const valid = [];
|
||||
if (!this.placeForm.name) {
|
||||
@@ -538,7 +545,7 @@ export default {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
const element = this.tableData[i];
|
||||
const tempSchool = this.schoolList.filter((item) => item.schoolId === element.schoolId)[0];
|
||||
if (!tempSchool.showInMap || !element.showInMap) {
|
||||
if (!element.schoolShow || !element.showInMap) {
|
||||
continue;
|
||||
}
|
||||
const tmpMarker = new AMap.Marker({
|
||||
@@ -569,7 +576,7 @@ export default {
|
||||
},
|
||||
// 修改场地状态
|
||||
async changePlaceStatus(item) {
|
||||
const resp = await savePlace(item);
|
||||
const resp = await updatePlace(item);
|
||||
if (resp.code == 200) {
|
||||
this.resetMarkers();
|
||||
}
|
||||
@@ -731,6 +738,7 @@ export default {
|
||||
.actived-school {
|
||||
border: 2px solid #409eff !important;
|
||||
}
|
||||
|
||||
::v-deep .el-radio__label {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,12 @@
|
||||
<el-table-column label="负责人" prop="leader" />
|
||||
<el-table-column label="联系方式" prop="phone" />
|
||||
<el-table-column label="备注" prop="remark" />
|
||||
<el-table-column label="小程序二维码" prop="jwlCodePath" >
|
||||
<template slot-scope="scope">
|
||||
<el-image v-if="scope.row.jwlCodePath != undefined" style="width: 100px; height: 100px" :src="baseUrl + scope.row.jwlCodePath" ></el-image>
|
||||
<el-button v-else v-hasPermi="['sch:school:create']" type="text" icon="el-icon-edit" @click="handleCreate(scope.row)">生成</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
@@ -31,7 +37,6 @@
|
||||
<template slot-scope="scope">
|
||||
<el-button v-hasPermi="['sch:school:edit']" type="text" icon="el-icon-edit" @click="addOrUpdateHandle(scope.row)">修改</el-button>
|
||||
<el-button v-hasPermi="['sch:school:remove']" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -63,7 +68,8 @@ export default {
|
||||
loading: {
|
||||
tableLoading: false
|
||||
},
|
||||
dialogVisible: false
|
||||
dialogVisible: false,
|
||||
baseUrl: process.env.VUE_APP_BASE_API
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -102,6 +108,14 @@ export default {
|
||||
this.$refs.dialogForm.init(item);
|
||||
});
|
||||
},
|
||||
handleCreate(item){
|
||||
schoolApi.createCode(item.schoolId).then(resp => {
|
||||
if (resp.code === 200) {
|
||||
this.getPageList();
|
||||
this.$modal.msgSuccess('生成成功');
|
||||
}
|
||||
})
|
||||
},
|
||||
// 删除操作
|
||||
handleDelete(item) {
|
||||
this.$modal
|
||||
|
||||
338
src/views/sch/shop/index.vue
Normal file
@@ -0,0 +1,338 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="店铺名称" prop="shopName">
|
||||
<el-input
|
||||
v-model="queryParams.shopName"
|
||||
placeholder="请输入店铺名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域" prop="area">
|
||||
<el-input
|
||||
v-model="queryParams.area"
|
||||
placeholder="请输入区域"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="城市" prop="city">
|
||||
<el-input
|
||||
v-model="queryParams.city"
|
||||
placeholder="请输入城市"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="contacts">
|
||||
<el-input
|
||||
v-model="queryParams.contacts"
|
||||
placeholder="请输入联系人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注名" prop="remarkName">
|
||||
<el-input
|
||||
v-model="queryParams.remarkName"
|
||||
placeholder="请输入备注名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注id" prop="remarkId">
|
||||
<el-input
|
||||
v-model="queryParams.remarkId"
|
||||
placeholder="请输入备注id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:shop:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:shop:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:shop:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:shop:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="shopList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="门店id 和抖音门店id 一致" align="center" prop="shopId" />
|
||||
<el-table-column label="店铺名称" align="center" prop="shopName" />
|
||||
<el-table-column label="门店品类" align="center" prop="shopType" />
|
||||
<el-table-column label="主营类目" align="center" prop="businessCategory" />
|
||||
<el-table-column label="区域" align="center" prop="area" />
|
||||
<el-table-column label="城市" align="center" prop="city" />
|
||||
<el-table-column label="地址" align="center" prop="address" />
|
||||
<el-table-column label="联系人" align="center" prop="contacts" />
|
||||
<el-table-column label="营业状态" align="center" prop="status" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="备注名" align="center" prop="remarkName" />
|
||||
<el-table-column label="备注id" align="center" prop="remarkId" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:shop:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:shop:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改抖音门店对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="店铺名称" prop="shopName">
|
||||
<el-input v-model="form.shopName" placeholder="请输入店铺名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="主营类目" prop="businessCategory">
|
||||
<el-input v-model="form.businessCategory" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域" prop="area">
|
||||
<el-input v-model="form.area" placeholder="请输入区域" />
|
||||
</el-form-item>
|
||||
<el-form-item label="城市" prop="city">
|
||||
<el-input v-model="form.city" placeholder="请输入城市" />
|
||||
</el-form-item>
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input v-model="form.address" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="contacts">
|
||||
<el-input v-model="form.contacts" placeholder="请输入联系人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注名" prop="remarkName">
|
||||
<el-input v-model="form.remarkName" placeholder="请输入备注名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注id" prop="remarkId">
|
||||
<el-input v-model="form.remarkId" placeholder="请输入备注id" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listShop, getShop, delShop, addShop, updateShop } from "@/api/sch/shop";
|
||||
|
||||
export default {
|
||||
name: "Shop",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 抖音门店表格数据
|
||||
shopList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
shopName: null,
|
||||
shopType: null,
|
||||
businessCategory: null,
|
||||
area: null,
|
||||
city: null,
|
||||
address: null,
|
||||
contacts: null,
|
||||
status: null,
|
||||
remarkName: null,
|
||||
remarkId: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询抖音门店列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listShop(this.queryParams).then(response => {
|
||||
this.shopList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
shopId: null,
|
||||
shopName: null,
|
||||
shopType: null,
|
||||
businessCategory: null,
|
||||
area: null,
|
||||
city: null,
|
||||
address: null,
|
||||
contacts: null,
|
||||
status: "0",
|
||||
remark: null,
|
||||
remarkName: null,
|
||||
remarkId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.shopId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加抖音门店";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const shopId = row.shopId || this.ids
|
||||
getShop(shopId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改抖音门店";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.shopId != null) {
|
||||
updateShop(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addShop(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const shopIds = row.shopId || this.ids;
|
||||
this.$modal.confirm('是否确认删除抖音门店编号为"' + shopIds + '"的数据项?').then(function() {
|
||||
return delShop(shopIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/shop/export', {
|
||||
...this.queryParams
|
||||
}, `shop_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
55
src/views/statistic/areaStudent/components/SearchForm.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="searchForm" :model="searchForm" inline>
|
||||
<el-form-item label="区域" prop="area">
|
||||
<el-select v-model="searchForm.area" filterable placeholder="请选择" clearable size="mini">
|
||||
<el-option v-for="(dict, index) in areaOptions" :key="index" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="月份" prop="month">
|
||||
<el-date-picker v-model="searchForm.month" type="month" placeholder="选择月" value-format="yyyy-MM" format="yyyy-MM">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="0">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import DMRadio from '@/components/DMRadio';
|
||||
const date = new Date();
|
||||
const month = date.getFullYear() + "-" + (date.getMonth() + 1);
|
||||
export default {
|
||||
components: {
|
||||
DMRadio
|
||||
},
|
||||
props: {
|
||||
areaOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
area: undefined,
|
||||
month: month
|
||||
},
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
resetQuery() {
|
||||
this.searchForm = {
|
||||
placeId: undefined,
|
||||
month: undefined
|
||||
};
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
105
src/views/statistic/areaStudent/index.vue
Normal file
@@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索插件 -->
|
||||
<SearchForm v-show="showSearch" ref="SearchForm" @search="_getTableList" :areaOptions="areaOptions" />
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['statistic:areaStudent:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" :columns="columns" @queryTable="_getTableList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList">
|
||||
<el-table-column type="index" width="55" align="center" />
|
||||
<el-table-column label="区域" align="center" min-width="120" prop="areaName" />
|
||||
<el-table-column label="月份" align="center" min-width="120" prop="month" />
|
||||
<el-table-column label="线索数" align="center" min-width="120" prop="clueNum" />
|
||||
<el-table-column label="成交数" align="center" min-width="120" prop="signNum" />
|
||||
<el-table-column label="成交率" align="center" min-width="120" sortable prop="dealRate" />
|
||||
<el-table-column label="平均利润" align="center" min-width="120" sortable prop="avgProfit" />
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total>0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listReport } from "@/api/statistic/areaStudent";
|
||||
import SearchForm from "./components/SearchForm.vue";
|
||||
import { getAllPlaces } from '@/api/sch/place'
|
||||
|
||||
const date = new Date();
|
||||
const month = date.getFullYear() + "-" + (date.getMonth() + 1);
|
||||
export default {
|
||||
name: "AreaStudent",
|
||||
components: {
|
||||
SearchForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 列表数据
|
||||
dataList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
searchForm: {
|
||||
month: month,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
columns: [],
|
||||
dialogVisible: false,
|
||||
areaOptions: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this._getTableList();
|
||||
this.getDicts('dm_area').then((response) => {
|
||||
this.areaOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询报名点成交登记列表 */
|
||||
_getTableList() {
|
||||
this.loading = true;
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
const params = { ...this.searchForm, ...tempForm };
|
||||
listReport(params).then(response => {
|
||||
this.dataList = response.data;
|
||||
// this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
async getAllPlaces() {
|
||||
const resp = await getAllPlaces();
|
||||
if (resp.code == 200) {
|
||||
this.placeOptions = resp.data;
|
||||
}
|
||||
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
const params = { ...this.searchForm, ...tempForm };
|
||||
this.download('/statistic/area/student/export', params, `区域学员报表_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
57
src/views/statistic/placeStudent/components/SearchForm.vue
Normal file
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="searchForm" :model="searchForm" inline>
|
||||
<el-form-item label="场地">
|
||||
<el-select v-model="searchForm.placeId" filterable placeholder="请选择" clearable size="mini">
|
||||
<el-option v-for="(dict, index) in placeOptions" :key="index" :label="dict.name" :value="dict.placeId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="月份" prop="month">
|
||||
<el-date-picker v-model="searchForm.month" type="month" placeholder="选择月" value-format="yyyy-MM" format="yyyy-MM">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label-width="0">
|
||||
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import DMRadio from '@/components/DMRadio';
|
||||
const date = new Date();
|
||||
const month = date.getFullYear() + "-" + (date.getMonth() + 1);
|
||||
export default {
|
||||
components: {
|
||||
DMRadio
|
||||
},
|
||||
props: {
|
||||
placeOptions: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {
|
||||
placeId: undefined,
|
||||
month: month
|
||||
},
|
||||
dateRange: []
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
resetQuery() {
|
||||
this.searchForm = {
|
||||
placeId: undefined,
|
||||
month: undefined
|
||||
};
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
103
src/views/statistic/placeStudent/index.vue
Normal file
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索插件 -->
|
||||
<SearchForm v-show="showSearch" ref="SearchForm" @search="_getTableList" :placeOptions="placeOptions" />
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['statistic:placeStudent:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" :columns="columns" @queryTable="_getTableList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList">
|
||||
<el-table-column type="index" width="55" align="center" />
|
||||
<el-table-column label="场地名" align="center" min-width="120" prop="placeName" />
|
||||
<el-table-column label="月份" align="center" min-width="120" prop="month" />
|
||||
<el-table-column label="线索数" align="center" min-width="120" prop="clueNum" />
|
||||
<el-table-column label="成交数" align="center" min-width="120" prop="signNum" />
|
||||
<el-table-column label="成交率" align="center" min-width="120" sortable prop="dealRate" />
|
||||
<el-table-column label="平均利润" align="center" min-width="120" sortable prop="avgProfit" />
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total>0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listReport } from "@/api/statistic/placeStudent";
|
||||
import SearchForm from "./components/SearchForm.vue";
|
||||
import { getAllPlaces } from '@/api/sch/place'
|
||||
|
||||
const date = new Date();
|
||||
const month = date.getFullYear() + "-" + (date.getMonth() + 1);
|
||||
export default {
|
||||
name: "PlaceStudent",
|
||||
components: {
|
||||
SearchForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 列表数据
|
||||
dataList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
searchForm: {
|
||||
month: month,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
columns: [],
|
||||
dialogVisible: false,
|
||||
placeOptions: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getAllPlaces()
|
||||
this._getTableList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询报名点成交登记列表 */
|
||||
_getTableList() {
|
||||
this.loading = true;
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
const params = { ...this.searchForm, ...tempForm };
|
||||
listReport(params).then(response => {
|
||||
this.dataList = response.data;
|
||||
// this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
async getAllPlaces() {
|
||||
const resp = await getAllPlaces();
|
||||
if (resp.code == 200) {
|
||||
this.placeOptions = resp.data;
|
||||
}
|
||||
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const tempForm = this.$refs.SearchForm?.searchForm || {};
|
||||
const params = { ...this.searchForm, ...tempForm };
|
||||
this.download('/statistic/area/student/export', params, `场地学员报表_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button v-hasPermi="['system:config:add']" type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
@@ -38,7 +38,7 @@
|
||||
<el-button v-hasPermi="['system:config:remove']" type="danger" plain icon="el-icon-refresh" size="mini" @click="handleRefreshCache">刷新缓存</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
|
||||
<el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
@@ -60,7 +60,7 @@
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-hasPermi="['system:config:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button v-hasPermi="['system:config:remove']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
<!-- <el-button v-hasPermi="['system:config:remove']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -25,23 +25,19 @@
|
||||
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
|
||||
</el-row>
|
||||
|
||||
<el-table v-if="refreshTable" v-loading="loading" :data="deptList" row-key="deptId" :default-expand-all="isExpandAll" :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
||||
<el-table v-if="refreshTable" v-loading="loading" :data="deptList" row-key="deptId" :default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
|
||||
<el-table-column prop="deptName" label="部门名称" width="260" />
|
||||
<el-table-column prop="orderNum" label="排序" width="200" />
|
||||
<el-table-column prop="areaList" label="所属区域" width="200" />
|
||||
<el-table-column prop="status" label="状态" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="200">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" width="200" show-overflow-tooltip />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-hasPermi="['system:dept:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button v-hasPermi="['system:dept:add']" size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)">新增</el-button>
|
||||
<el-button v-hasPermi="['system:dept:add']" size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)">新增子部门</el-button>
|
||||
<el-button v-if="scope.row.parentId != 0" v-hasPermi="['system:dept:remove']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -56,8 +52,6 @@
|
||||
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="部门名称" prop="deptName">
|
||||
<el-input v-model="form.deptName" placeholder="请输入部门名称" />
|
||||
@@ -68,8 +62,6 @@
|
||||
<el-input-number v-model="form.orderNum" controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人" prop="leader">
|
||||
<el-input v-model="form.leader" placeholder="请输入负责人" maxlength="20" />
|
||||
@@ -80,13 +72,6 @@
|
||||
<el-input v-model="form.phone" placeholder="请输入联系电话" maxlength="11" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="部门状态">
|
||||
<el-radio-group v-model="form.status">
|
||||
@@ -94,6 +79,18 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="所属区域" prop="areaList">
|
||||
<el-select v-model="form.areaList" placeholder="请选择" filterable multiple>
|
||||
<el-option label="区域1" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" placeholder="请输入" type="textarea" :autosize="{ minRows: 3 }" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -156,6 +153,13 @@ export default {
|
||||
message: '请输入正确的手机号码',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
areaList: [
|
||||
{
|
||||
required: true,
|
||||
message: '所属区域不能为空',
|
||||
trigger: 'blur,change'
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -198,7 +202,8 @@ export default {
|
||||
leader: undefined,
|
||||
phone: undefined,
|
||||
email: undefined,
|
||||
status: '0'
|
||||
status: '0',
|
||||
areaList: []
|
||||
};
|
||||
this.resetForm('form');
|
||||
},
|
||||
@@ -278,7 +283,7 @@ export default {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess('删除成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
296
src/views/system/dictData/index.vue
Normal file
@@ -0,0 +1,296 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!-- 字典类型 -->
|
||||
<el-col :span="4">
|
||||
<el-menu :default-active="navselected" @select="selectItems" class="el-menu-vertical-demo">
|
||||
<el-menu-item :index="index.toString()" v-for="(item, index) in typeList" :key="item.dictId">
|
||||
<span slot="title">{{ item.dictName }}</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</el-col>
|
||||
<!-- 字典数据 -->
|
||||
<el-col :span="20">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<template>
|
||||
<el-col :span="8">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:dict:add']">新增</el-button>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange" size="mini">
|
||||
<el-table-column label="字典标签" align="center" prop="dictLabel" />
|
||||
<!-- <el-table-column label="字典编码" align="center" prop="dictValue" /> -->
|
||||
<el-table-column label="字典排序" align="center" prop="dictSort" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope" v-if="ishidden&&!scope.row.default">
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:dict:edit']">修改</el-button> -->
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:dict:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" :width="dialogWidth" append-to-body v-loading="loading" :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="数据标签" prop="dictLabel">
|
||||
<el-input v-model="form.dictLabel" placeholder="请输入数据标签" />
|
||||
</el-form-item>
|
||||
<el-form-item label="显示排序" prop="dictSort">
|
||||
<el-input-number v-model="form.dictSort" controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio label="0">正常</el-radio>
|
||||
<el-radio label="1">停用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="open=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listType, } from "@/api/system/dict/type";
|
||||
import { listData, getData, delData, addData, updateData, changeDictDataStatus, } from "@/api/system/dict/data";
|
||||
|
||||
export default {
|
||||
name: "Dict",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 字典表格数据
|
||||
typeList: [],
|
||||
//字典模板表格数据
|
||||
dataList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 数据标签回显样式
|
||||
listClassOptions: [
|
||||
{
|
||||
value: "default",
|
||||
label: "默认"
|
||||
},
|
||||
{
|
||||
value: "primary",
|
||||
label: "主要"
|
||||
},
|
||||
{
|
||||
value: "success",
|
||||
label: "成功"
|
||||
},
|
||||
{
|
||||
value: "info",
|
||||
label: "信息"
|
||||
},
|
||||
{
|
||||
value: "warning",
|
||||
label: "警告"
|
||||
},
|
||||
{
|
||||
value: "danger",
|
||||
label: "危险"
|
||||
}
|
||||
],
|
||||
// 类型数据字典
|
||||
typeOptions: [],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
menuleftnav: undefined,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
dictName: undefined,
|
||||
dictType: undefined,
|
||||
status: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
dictLabel: [
|
||||
{ required: true, message: "数据标签不能为空", trigger: "blur" }
|
||||
],
|
||||
dictValue: [
|
||||
{ required: true, message: "数据键值不能为空", trigger: "blur" }
|
||||
],
|
||||
dictSort: [
|
||||
{ required: true, message: "数据顺序不能为空", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
navselected: "0",
|
||||
ishidden: true,
|
||||
dialogWidth: '500px'
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getTypeList();
|
||||
//this.getDataTemplateList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询字典类型列表 */
|
||||
getTypeList() {
|
||||
this.loading = true;
|
||||
listType().then((response) => {
|
||||
this.typeList = response.rows;
|
||||
this.loading = false;
|
||||
//左边菜单加载完毕才加载右边的菜单
|
||||
this.queryParams.dictType = this.typeList[this.navselected].dictType;
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
/** 查询字典数据列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listData(this.queryParams).then(response => {
|
||||
this.dataList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
selectItems(index) {
|
||||
this.menuleftnav = index;
|
||||
this.queryParams.dictType = this.typeList[index].dictType;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
dictCode: undefined,
|
||||
dictLabel: undefined,
|
||||
dictValue: undefined,
|
||||
cssClass: undefined,
|
||||
listClass: 'default',
|
||||
dictSort: 0,
|
||||
status: '0',
|
||||
remark: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.dictType = this.typeList[this.menuleftnav].dictType;
|
||||
this.getList();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加字典数据";
|
||||
this.$set(
|
||||
this.form,
|
||||
"dictType",
|
||||
this.typeList[this.menuleftnav].dictType
|
||||
);
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const dictCode = row.dictCode || this.ids
|
||||
getData(dictCode).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改字典数据";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.form.dictType = this.queryParams.dictType;
|
||||
this.form.dictValue = this.form.dictLabel
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.dictCode != undefined) {
|
||||
updateData(this.form).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
|
||||
});
|
||||
} else {
|
||||
addData(this.form).then(response => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictCodes = row.dictCode || this.ids;
|
||||
this.$modal.confirm('是否确认删除字典编码为"' + row.dictValue + '"的数据项?').then(function () {
|
||||
return delData(dictCodes);
|
||||
}).then((resp) => {
|
||||
if (resp.code == 200) {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}
|
||||
|
||||
}).catch(() => { });
|
||||
},
|
||||
// 字典模板状态修改
|
||||
handleStatusChange(row) {
|
||||
let text = row.status === true ? "启用" : "停用";
|
||||
this.$modal
|
||||
.confirm('确认要"' + text + '""' + row.dictLabel + '"标签吗?')
|
||||
.then(function () {
|
||||
return changeDictDataStatus(row.dictCode, row.status);
|
||||
})
|
||||
.then((resp) => {
|
||||
if (resp.code == 200) {
|
||||
this.$modal.msgSuccess(text + "成功");
|
||||
}
|
||||
})
|
||||
.catch(function () {
|
||||
row.status = row.status === false ? true : false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
<el-form-item prop="userOrPhone">
|
||||
<el-input v-model="queryParams.employeeName" placeholder="请输入姓名/手机号" clearable style="width: 240px" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入职时间">
|
||||
<el-date-picker v-model="queryParams.hiredate" style="width: 240px" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="用户状态" clearable>
|
||||
<el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="入职时间">
|
||||
<el-date-picker v-model="queryParams.hiredate" style="width: 240px" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
@@ -43,7 +43,10 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="260">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-hasPermi="['system:employee:edit']" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button v-hasPermi="['system:employee:edit']" type="text" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button v-hasPermi="['system:employee:logoff']" type="text" @click="handleLogoff(scope.row)">注销</el-button>
|
||||
<el-button v-hasPermi="['system:employee:release']" type="text" @click="handleRelease(scope.row)">释放线索</el-button>
|
||||
<el-button v-hasPermi="['system:employee:remove']" type="text" @click="handleRemove(scope.row)">删除</el-button>
|
||||
<!-- <el-button
|
||||
v-hasPermi="['system:employee:resetPwd']"
|
||||
type="text"
|
||||
@@ -54,7 +57,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -76,14 +79,74 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="角色" prop="roleIdList">
|
||||
<el-select v-model="form.roleIdList" multiple placeholder="请选择">
|
||||
<el-select v-model="form.roleIdList" multiple placeholder="请选择" class="wp100">
|
||||
<el-option v-for="item in roleOptions" :key="item.id" :label="item.name" :value="item.id" :disabled="item.status == 1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="归属部门" prop="orgId">
|
||||
<treeselect v-model="form.orgId" :options="deptOptions" :disable-branch-nodes="true" :show-count="true" placeholder="请选择归属部门" />
|
||||
<treeselect v-model="form.orgId" class="wp100" :options="deptOptions" :disable-branch-nodes="true" :show-count="true" placeholder="请选择归属部门" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="权重" prop="weight">
|
||||
<el-input v-model="form.weight" placeholder="权重,1-100" type="number" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="用户性别">
|
||||
<el-select v-model="form.sex" placeholder="请选择" class="wp100">
|
||||
<el-option v-for="dict in sexOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入职日期">
|
||||
<el-date-picker v-model="form.hiredate" :editable="false" type="date" value-format="yyyy-MM-dd" placeholder="请选择入职时间" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态">
|
||||
<el-radio-group v-model="form.status" class="wp100">
|
||||
<el-radio v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属报名点">
|
||||
<el-select v-model="form.signPlace" placeholder="请选择" class="wp100">
|
||||
<el-option v-for="dict in signPlaceOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="最大线索数">
|
||||
<el-input v-model="form.maxClueNum" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否考勤">
|
||||
<el-radio-group v-model="form.checkin" class="wp100">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否参与统计">
|
||||
<el-radio-group v-model="form.count" class="wp100">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -95,100 +158,30 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="微信openId" prop="openId">
|
||||
<el-input v-model="form.openId" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="权重" prop="weight">
|
||||
<el-input v-model="form.weight" placeholder="权重,1-100" type="number" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="用户性别">
|
||||
<el-select v-model="form.sex" placeholder="请选择">
|
||||
<el-option v-for="dict in sexOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入职日期">
|
||||
<el-date-picker v-model="form.hiredate" :editable="false" type="date" value-format="yyyy-MM-dd" placeholder="请选择入职时间" />
|
||||
<el-col :span="24">
|
||||
<el-form-item label="数据权限" prop="openId">
|
||||
<el-radio-group v-model="form.dataScope">
|
||||
<el-radio :label="1">全部数据</el-radio>
|
||||
<!-- <el-radio :label="2">部门数据</el-radio> -->
|
||||
<el-radio :label="3">个人数据</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="上级领导">
|
||||
<el-select v-model="form.leader" placeholder="请选择">
|
||||
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否释放线索">
|
||||
<el-radio-group v-model="form.discardClue">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="最大线索数">
|
||||
<el-input v-model="form.maxClueNum" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否考勤">
|
||||
<el-radio-group v-model="form.checkin">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否参与统计">
|
||||
<el-radio-group v-model="form.count">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="小程序权限">
|
||||
<el-radio-group v-model="form.hasStudent">
|
||||
<el-radio :label="true">开通</el-radio>
|
||||
<el-radio :label="false">关闭</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="管理系统权限">
|
||||
<el-radio-group v-model="form.hasSys">
|
||||
<el-radio :label="true">开通</el-radio>
|
||||
<el-radio :label="false">关闭</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注">
|
||||
<!-- <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input> -->
|
||||
<editor v-model="form.remark" />
|
||||
<editor v-model="form.remark" :height="200" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -272,13 +265,6 @@ export default {
|
||||
trigger: 'blur,change'
|
||||
}
|
||||
],
|
||||
areaList: [
|
||||
{
|
||||
required: true,
|
||||
message: '所属区域不能为空',
|
||||
trigger: 'blur,change'
|
||||
}
|
||||
],
|
||||
weight: [
|
||||
{
|
||||
required: true,
|
||||
@@ -296,7 +282,8 @@ export default {
|
||||
]
|
||||
},
|
||||
userOptions: [],
|
||||
areaOptions: []
|
||||
areaOptions: [],
|
||||
signPlaceOptions: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -319,6 +306,9 @@ export default {
|
||||
this.getDicts('dm_area').then((response) => {
|
||||
this.areaOptions = response.data;
|
||||
});
|
||||
this.getDicts('sign_place').then((response) => {
|
||||
this.signPlaceOptions = response.data;
|
||||
});
|
||||
this.getConfigKey('sys.user.initPassword').then((response) => {
|
||||
this.initPassword = response.msg;
|
||||
});
|
||||
@@ -407,7 +397,9 @@ export default {
|
||||
checkin: true,
|
||||
areaList: [],
|
||||
weight: undefined,
|
||||
count: true
|
||||
count: true,
|
||||
signPlace: undefined,
|
||||
dataScope: 3// 默认个人数据
|
||||
};
|
||||
this.resetForm('form');
|
||||
},
|
||||
@@ -445,7 +437,7 @@ export default {
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
submitForm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$set(this.form, 'deptId', this.$store.getters.schoolId);
|
||||
@@ -468,6 +460,43 @@ export default {
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleLogoff(row) {
|
||||
this.$confirm('注销后将立即释放线索,并禁用该员工,是否确认注销?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function () {
|
||||
// 走释放线索逻辑,并禁用该用户
|
||||
empAPi.delete(row.employeeId);
|
||||
this.getList();
|
||||
}).then(() => {
|
||||
this.msgSuccess('注销成功!');
|
||||
});
|
||||
},
|
||||
handleRelease(row) {
|
||||
this.$confirm('是否立刻释放该员工拥有的线索?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function () {
|
||||
// 应该只释放未成交的线索
|
||||
}).then(() => {
|
||||
this.msgSuccess('释放成功!');
|
||||
});
|
||||
},
|
||||
handleRemove(row) {
|
||||
this.$confirm('是否删除该员工,建议只在数据错误时删除?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// 检查一下,如果被使用,提示不可删除
|
||||
empAPi.delete(row.employeeId);
|
||||
this.getList();
|
||||
}).then(() => {
|
||||
this.msgSuccess('删除成功!');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -478,6 +507,7 @@ export default {
|
||||
cursor: pointer;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.el-icon-arrow-down {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
193
src/views/system/skill/index.vue
Normal file
@@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="关键词" prop="skillKey">
|
||||
<el-input v-model="queryParams.skillKey" placeholder="请输入关键词" clearable @keyup.enter.native="handleQuery" />
|
||||
</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>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button v-hasPermi="['system:skill:add']" type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="skillList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="index" width="55" align="center" />
|
||||
<el-table-column label="关键词" align="center" prop="skillKey" />
|
||||
<el-table-column label="话术内容" align="center" prop="content" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-hasPermi="['system:skill:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button v-hasPermi="['system:skill:remove']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<!-- 添加或修改关键话术对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="关键词" prop="skillKey">
|
||||
<el-input v-model="form.skillKey" placeholder="请输入关键词" />
|
||||
</el-form-item>
|
||||
<el-form-item label="话术内容">
|
||||
<editor v-model="form.content" :min-height="192" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listSkill, getSkill, delSkill, addSkill, updateSkill } from '@/api/system/skill';
|
||||
|
||||
export default {
|
||||
name: 'Skill',
|
||||
data () {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 关键话术表格数据
|
||||
skillList: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: null,
|
||||
skillKey: null,
|
||||
content: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
skillKey: [{ required: true, message: '关键词不能为空', trigger: 'blur' }],
|
||||
content: [{ required: true, message: '话术内容不能为空', trigger: 'blur' }]
|
||||
}
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询关键话术列表 */
|
||||
getList () {
|
||||
this.loading = true;
|
||||
listSkill(this.queryParams).then(response => {
|
||||
this.skillList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel () {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset () {
|
||||
this.form = {
|
||||
skillId: null,
|
||||
deptId: null,
|
||||
skillKey: null,
|
||||
content: null
|
||||
};
|
||||
this.resetForm('form');
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery () {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery () {
|
||||
this.resetForm('queryForm');
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange (selection) {
|
||||
this.ids = selection.map(item => item.skillId);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd () {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = '添加关键话术';
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate (row) {
|
||||
this.reset();
|
||||
const skillId = row.skillId || this.ids;
|
||||
getSkill(skillId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = '修改关键话术';
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm () {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.skillId != null) {
|
||||
updateSkill(this.form).then(response => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addSkill(this.form).then(response => {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete (row) {
|
||||
const skillIds = row.skillId || this.ids;
|
||||
this.$modal.confirm('是否确认删除关键话术编号为"' + skillIds + '"的数据项?').then(function () {
|
||||
return delSkill(skillIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess('删除成功');
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport () {
|
||||
this.download('system/skill/export', {
|
||||
...this.queryParams
|
||||
}, `skill_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="60px" size="mini">
|
||||
<el-form-item label="员工" prop="userId" v-hasPermi="['system:task:send']">
|
||||
<el-form ref="queryForm" :model="queryParams" :inline="true" label-width="60px" size="mini">
|
||||
<el-form-item v-hasPermi="['system:task:send']" label="员工" prop="userId">
|
||||
<el-select v-model="queryParams.userId" placeholder="请选择" size="mini">
|
||||
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
@@ -24,7 +24,7 @@
|
||||
<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>
|
||||
<el-button type="primary" icon="el-icon-plus" v-hasPermi="['system:summary:add']" size="mini" @click="handleAdd()">新增</el-button>
|
||||
<el-button v-hasPermi="['system:summary:add']" type="primary" icon="el-icon-plus" size="mini" @click="handleAdd()">新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="月份" align="center" prop="month" />
|
||||
= <el-table-column label="日期" align="center" prop="day" width="100" />
|
||||
<el-table-column label="日期" align="center" prop="day" width="100" />
|
||||
<el-table-column label="内容" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<div v-html="scope.row.content" />
|
||||
@@ -49,12 +49,12 @@
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" v-hasPermi="['system:summary:edit']" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button v-hasPermi="['system:summary:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<!-- 添加或修改公告对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
||||
@@ -82,7 +82,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="form.summaryType === 2">
|
||||
<el-col v-if="form.summaryType === 2" :span="24">
|
||||
<el-form-item label="日期" prop="day">
|
||||
<el-date-picker v-model="form.day" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" :disabled="dayEdit" />
|
||||
</el-form-item>
|
||||
@@ -90,8 +90,8 @@
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="任务内容" prop="content">
|
||||
<!-- <editor v-model="form.content" /> -->
|
||||
<el-input type="textarea" :rows="13" v-model="form.content"></el-input>
|
||||
<editor v-model="form.content" />
|
||||
<!-- <el-input v-model="form.content" type="textarea" :rows="13" /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -103,16 +103,16 @@
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { saveTask, getList } from '@/api/system/summary'
|
||||
import Editor from '@/components/Editor'
|
||||
import empAPi from '@/api/system/employee'
|
||||
|
||||
<script>
|
||||
import { saveTask, getList } from '@/api/system/summary';
|
||||
import Editor from '@/components/Editor';
|
||||
import empAPi from '@/api/system/employee';
|
||||
|
||||
export default {
|
||||
name: 'Summary',
|
||||
components: {
|
||||
Editor,
|
||||
Editor
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -133,7 +133,7 @@ export default {
|
||||
userId: undefined,
|
||||
summaryType: 1,
|
||||
month: undefined,
|
||||
day: undefined,
|
||||
day: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@@ -143,42 +143,42 @@ export default {
|
||||
month: [{ required: true, message: '月份不能为空', trigger: 'blur' }],
|
||||
day: [{ required: true, message: '日期不能为空', trigger: 'blur' }],
|
||||
content: [
|
||||
{ required: true, message: '任务内容不能为空', trigger: 'blur' },
|
||||
{ required: true, message: '任务内容不能为空', trigger: 'blur' }
|
||||
],
|
||||
summaryType: [{ required: true, message: '总结类型不能为空', trigger: 'blur' }],
|
||||
summaryType: [{ required: true, message: '总结类型不能为空', trigger: 'blur' }]
|
||||
},
|
||||
taskType: 1,
|
||||
userOptions: [],
|
||||
month: undefined,
|
||||
day: undefined,
|
||||
dayEdit: false,
|
||||
userId: localStorage.getItem('userId'),
|
||||
}
|
||||
userId: localStorage.getItem('userId')
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getEmployee()
|
||||
let now = new Date()
|
||||
let year = now.getFullYear() //得到年份
|
||||
let month = now.getMonth() + 1 //得到月份
|
||||
let date = now.getDate() //得到日期
|
||||
this.month = month
|
||||
this.day = year + '-' + month + '-' + date
|
||||
this.getList();
|
||||
this.getEmployee();
|
||||
const now = new Date();
|
||||
const year = now.getFullYear(); // 得到年份
|
||||
const month = now.getMonth() + 1; // 得到月份
|
||||
const date = now.getDate(); // 得到日期
|
||||
this.month = month;
|
||||
this.day = year + '-' + month + '-' + date;
|
||||
},
|
||||
methods: {
|
||||
/** 查询公告列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
this.loading = true;
|
||||
getList(this.queryParams).then((response) => {
|
||||
this.taskList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
this.taskList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
@@ -187,73 +187,73 @@ export default {
|
||||
userId: undefined,
|
||||
month: this.month,
|
||||
day: undefined,
|
||||
content: undefined,
|
||||
}
|
||||
this.resetForm('form')
|
||||
content: undefined
|
||||
};
|
||||
this.resetForm('form');
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
this.resetForm('queryForm');
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.$set(this.form, 'userId', this.userId)
|
||||
this.$set(this.form, 'day', this.day)
|
||||
this.dayEdit = false
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.$set(this.form, 'userId', this.userId);
|
||||
this.$set(this.form, 'day', this.day);
|
||||
this.dayEdit = false;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
this.reset();
|
||||
|
||||
this.form = Object.assign({}, row)
|
||||
this.taskType = this.form.taskType
|
||||
this.form = Object.assign({}, row);
|
||||
this.taskType = this.form.taskType;
|
||||
if (this.form.taskType == 1) {
|
||||
this.title = this.month + '月-总结'
|
||||
this.title = this.month + '月-总结';
|
||||
} else {
|
||||
this.title = this.month + '月-总结'
|
||||
this.title = this.month + '月-总结';
|
||||
}
|
||||
this.open = true
|
||||
this.dayEdit = true
|
||||
this.open = true;
|
||||
this.dayEdit = true;
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.summaryType === 1) {
|
||||
this.form.day = undefined
|
||||
this.form.day = undefined;
|
||||
}
|
||||
saveTask(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.$message.success('保存成功');
|
||||
this.open = false
|
||||
this.getList()
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
//查询员工
|
||||
// 查询员工
|
||||
getEmployee() {
|
||||
empAPi.getEmployee({ coach: false }).then((resp) => {
|
||||
if (resp.code == 200) {
|
||||
//this.userOptions = resp.data;
|
||||
// this.userOptions = resp.data;
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
resp.data.forEach((item) => {
|
||||
this.userOptions.push(item)
|
||||
})
|
||||
this.userOptions.push(item);
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
106
src/views/tool/build/CodeTypeDialog.vue
Normal file
@@ -0,0 +1,106 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-bind="$attrs"
|
||||
width="500px"
|
||||
:close-on-click-modal="false"
|
||||
:modal-append-to-body="false"
|
||||
v-on="$listeners"
|
||||
@open="onOpen"
|
||||
@close="onClose"
|
||||
>
|
||||
<el-row :gutter="15">
|
||||
<el-form
|
||||
ref="elForm"
|
||||
:model="formData"
|
||||
:rules="rules"
|
||||
size="medium"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="生成类型" prop="type">
|
||||
<el-radio-group v-model="formData.type">
|
||||
<el-radio-button
|
||||
v-for="(item, index) in typeOptions"
|
||||
:key="index"
|
||||
:label="item.value"
|
||||
:disabled="item.disabled"
|
||||
>
|
||||
{{ item.label }}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="showFileName" label="文件名" prop="fileName">
|
||||
<el-input v-model="formData.fileName" placeholder="请输入文件名" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<div slot="footer">
|
||||
<el-button @click="close">
|
||||
取消
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleConfirm">
|
||||
确定
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
inheritAttrs: false,
|
||||
props: ['showFileName'],
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
fileName: undefined,
|
||||
type: 'file'
|
||||
},
|
||||
rules: {
|
||||
fileName: [{
|
||||
required: true,
|
||||
message: '请输入文件名',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
type: [{
|
||||
required: true,
|
||||
message: '生成类型不能为空',
|
||||
trigger: 'change'
|
||||
}]
|
||||
},
|
||||
typeOptions: [{
|
||||
label: '页面',
|
||||
value: 'file'
|
||||
}, {
|
||||
label: '弹窗',
|
||||
value: 'dialog'
|
||||
}]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
watch: {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
onOpen() {
|
||||
if (this.showFileName) {
|
||||
this.formData.fileName = `${+new Date()}.vue`
|
||||
}
|
||||
},
|
||||
onClose() {
|
||||
},
|
||||
close(e) {
|
||||
this.$emit('update:visible', false)
|
||||
},
|
||||
handleConfirm() {
|
||||
this.$refs.elForm.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$emit('confirm', { ...this.formData })
|
||||
this.close()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||