初始化项目

This commit is contained in:
18500206848
2024-02-02 15:04:47 +08:00
parent 12664d0204
commit 7aec486f06
718 changed files with 152280 additions and 1 deletions

43
src/mock/index.js Normal file
View File

@@ -0,0 +1,43 @@
import agentpay from './manage/agentpay'
import insure from './manage/insure'
import main from './manage/main'
import order from './manage/order';
import station from './manage/station'
import menu from './menu';
import oauth from './oauth';
import param from './param';
import talents from './tenant/talents/person';
import wage from './tenant/wage'
import user from './user';
/**
* 模拟数据mock
*
* mock是否开启模拟数据拦截
*/
const options = {
mock: false
};
user(options);
menu(options);
oauth(options);
param(options);
station(options);
main(options);
insure(options);
order(options);
agentpay(options);
talents(options);
wage(options)

View File

@@ -0,0 +1,88 @@
import Mock from 'mockjs'
function fakeSuccess() {
return {code: 200, success: true, msg: '操作成功'};
}
let Random = Mock.Random;
export default ({mock}) => {
if (!mock) return;
Mock.mock(/\/api\/jobslink-system\/agentpay\/waiting[.]*?/, 'get', () => {
const json = {code: 200, success: true, msg: '操作成功'};
const list = [];
for (let i = 0; i < 5; i++) {
list.push(Mock.mock({
telphone: '@increment',
identity: '@increment',
name: Mock.mock('@cname'),
companyName: Mock.mock('@cname'),
'total|1-99.0-99': 1,
}))
}
json.data = {
total: 10,
size: 10,
current: 1,
searchCount: true,
pages: 1,
records: list,
};
return json;
})
Mock.mock(/\/api\/jobslink-system\/agentpay\/taxcount[.]*?/, 'get', () => {
const json = {code: 200, success: true, msg: '操作成功'};
const list = [];
for (let i = 0; i < 5; i++) {
list.push(Mock.mock({
taxPayrollNo: '@increment',
insureNo: '@increment',
name: Mock.mock('@cname'),
'preTotal|1-99': 1,
'taxStatus|0-1': 1,
'orderStatus|0-1': 1,
createUser: Mock.mock('@cname'),
createTime: Random.datetime('yyyy-MM-dd'),
}))
}
json.data = {
total: 10,
size: 10,
current: 1,
searchCount: true,
pages: 1,
records: list,
};
return json;
})
Mock.mock(/\/api\/jobslink-system\/agentpay\/detail/, 'get', () => {
const json = {code: 200, success: true, msg: '操作成功'};
const list = [];
for (let i = 0; i < 5; i++) {
list.push(Mock.mock({
id: '@increment',
realName: Mock.mock('@cname'),
cardNumber: '123456789987654321',
'wage|1-9999.0-99': 1,
'wageReal|1-9999.0-99': 1,
'tax|1-9999.0-99': 1,
}))
}
json.data = {
total: 10,
size: 10,
current: 1,
searchCount: true,
pages: 1,
records: list,
};
return json;
})
Mock.mock(/\/api\/jobslink-system\/insure\/submit/, 'post', fakeSuccess);
}

43
src/mock/manage/fp.js Normal file
View File

@@ -0,0 +1,43 @@
import Mock from 'mockjs'
export default ({mock}) => {
if (!mock) return;
Mock.mock(/\/api\/jobslink-system\/order\/detail/, 'get', () => {
const json = {code: 200, success: true, msg: '操作成功'};
const list = [];
for (let index = 0; index < 5; index++) {
let name = Mock.mock('@cname');
list.push(Mock.mock({
id: '@increment',
businessNo: index,
titles: name,
type: 1,
'total|1-99999.00-99': 1,
}))
list.push(Mock.mock({
id: '@increment',
businessNo: index,
titles: name,
type: 2,
'total|1-99999.00-99': 1,
}))
}
list.push(Mock.mock({
id: '@increment',
businessNo: 4,
titles: name,
type: 3,
'total|1-99999.00-99': 1,
}))
json.data = {
total: 10,
size: 10,
current: 1,
searchCount: true,
pages: 1,
records: list,
};
return json;
})
}

106
src/mock/manage/insure.js Normal file
View File

@@ -0,0 +1,106 @@
import Mock from 'mockjs'
function fakeSuccess() {
return {code: 200, success: true, msg: '操作成功'};
}
let Random = Mock.Random;
export default ({mock}) => {
if (!mock) return;
//获取表格数据
Mock.mock(/\/api\/jobslink-system\/insure\/list[.]*?/, 'get', () => {
const json = {code: 200, success: true, msg: '操作成功'};
const list = [];
for (let i = 0; i < 5; i++) {
list.push(Mock.mock({
insureName: '@increment',
insureNo: '@increment',
companyName: Mock.mock('@cname'),
manager: Mock.mock('@cname'),
'quantity|1-99': 1,
'percent|0.1-99': 0.1,
'status|0-1': 1,
'orderStatus|0-1': 1,
payOrderId: i % 2 ? undefined : 1,
stime: Random.datetime(''),
etime: Random.datetime('yyyy-MM-dd')
}))
}
list.push(Mock.mock({
insureName: '@increment',
insureNo: '@increment',
companyName: Mock.mock('@cname'),
manager: Mock.mock('@cname'),
'quantity|1-99': 1,
'percent|0.1-99': 0.1,
'status|0-1': 1,
'orderStatus|0-1': 1,
payOrderId: 1,
stime: '1999-1-1',
etime: '2099-1-1'
}))
list.push(Mock.mock({
insureName: '@increment',
insureNo: '@increment',
companyName: Mock.mock('@cname'),
manager: Mock.mock('@cname'),
'quantity|1-99': 1,
'percent|0.1-99': 0.1,
'status|0-1': 1,
'orderStatus|0-1': 1,
payOrderId: 1,
stime: '2999-1-1',
etime: '3099-1-1'
}))
list.push(Mock.mock({
insureName: '@increment',
insureNo: '@increment',
companyName: Mock.mock('@cname'),
manager: Mock.mock('@cname'),
'quantity|1-99': 1,
'percent|0.1-99': 0.1,
'status|0-1': 1,
'orderStatus|0-1': 1,
payOrderId: 1,
stime: '1999-1-1',
etime: '1099-2-1'
}))
json.data = {
total: 10,
size: 10,
current: 1,
searchCount: true,
pages: 1,
records: list,
};
return json;
})
Mock.mock(/\/api\/jobslink-system\/insure\/detail/, 'get', () => {
const json = {code: 200, success: true, msg: '操作成功'};
json.data = Mock.mock({
id: '@increment',
stationId: '@increment',
companyName: Mock.mock('@cname'),
manager: Mock.mock('@cname'),
'telphone|11': '1',
'percent|0.1-99': 0.1,
'status|1-4': 1,
'companyTid|18': '2',
masterName: Mock.mock('@cname'),
'masterIdentity|18': '1',
'cityId': 12,
companyAddress: Random.county(true),
authUrlId:
'https://dss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1906469856,4113625838&fm=26&gp=0.jpg',
identityUrl4Id:
'https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2534506313,1688529724&fm=26&gp=0.jpg',
identityUrl5Id:
'https://dss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1035415831,1465727770&fm=26&gp=0.jpg'
});
return json;
})
Mock.mock(/\/api\/jobslink-system\/insure\/submit/, 'post', fakeSuccess);
}

65
src/mock/manage/main.js Normal file
View File

@@ -0,0 +1,65 @@
import Mock from 'mockjs'
function fakeSuccess() {
return {code: 200, success: true, msg: '操作成功'};
}
let Random = Mock.Random;
export default ({mock}) => {
if (!mock) return;
//获取表格数据
Mock.mock(/\/api\/jobslink-system\/main\/list[.]*?/, 'get', () => {
const json = {code: 200, success: true, msg: '操作成功'};
const list = [];
for (let i = 0; i < 5; i++) {
list.push(Mock.mock({
id: '@increment',
stationId: '@increment',
companyName: Mock.mock('@cname'),
manager: Mock.mock('@cname'),
'telphone|11': '1',
'percent|0.1-99': 0.1,
'status|1-4': 1,
}))
}
json.data = {
total: 10,
size: 10,
current: 1,
searchCount: true,
pages: 1,
records: list,
};
return json;
})
Mock.mock(/\/api\/jobslink-system\/main\/detail/, 'get', () => {
const json = {code: 200, success: true, msg: '操作成功'};
json.data = Mock.mock({
id: '@increment',
stationId: '@increment',
companyName: Mock.mock('@cname'),
manager: Mock.mock('@cname'),
'telphone|11': '1',
'percent|0.1-99': 0.1,
'status|1-4': 1,
'companyTid|18': '2',
masterName: Mock.mock('@cname'),
'masterIdentity|18': '1',
'cityId': 12,
companyAddress: Random.county(true),
authUrlId:
'https://dss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1906469856,4113625838&fm=26&gp=0.jpg',
identityUrl4Id:
'https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2534506313,1688529724&fm=26&gp=0.jpg',
identityUrl5Id:
'https://dss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1035415831,1465727770&fm=26&gp=0.jpg'
});
return json;
})
Mock.mock(/\/api\/jobslink-system\/main\/submit/, 'post', fakeSuccess);
Mock.mock(/\/api\/jobslink-system\/main\/remove/, 'post', fakeSuccess);
}

71
src/mock/manage/order.js Normal file
View File

@@ -0,0 +1,71 @@
import Mock from 'mockjs'
let Random = Mock.Random;
export default ({mock}) => {
if (!mock) return;
Mock.mock(/\/api\/jobslink-system\/order\/detail/, 'get', () => {
const json = {code: 200, success: true, msg: '操作成功'};
const list = [];
for (let index = 0; index < 5; index++) {
let name = Mock.mock('@cname');
list.push(Mock.mock({
id: '@increment',
businessNo: index,
titles: name,
type: 1,
'total|1-99999.00-99': 1,
}))
list.push(Mock.mock({
id: '@increment',
businessNo: index,
titles: name,
type: 2,
'total|1-99999.00-99': 1,
}))
}
list.push(Mock.mock({
id: '@increment',
businessNo: 4,
titles: name,
type: 3,
'total|1-99999.00-99': 1,
}))
json.data = {
total: 10,
size: 10,
current: 1,
searchCount: true,
pages: 1,
records: list,
};
return json;
})
Mock.mock(/\/api\/jobslink-system\/order\/list/, 'get', () => {
const json = {code: 200, success: true, msg: '操作成功'};
const list = [];
for (let index = 0; index < 5; index++) {
list.push(Mock.mock({
invoiceNo: '@increment',
businessNo: index,
'type|0-1': 1,
'natureType|0-1': 1,
'total|1-99999.00-99': 1,
fastmailName: '顺丰',
fastmailOrder: '123456789987654321',
invoiceUrl: Random.url('http')
}))
}
json.data = {
total: 10,
size: 10,
current: 1,
searchCount: true,
pages: 1,
records: list,
};
return json;
})
}

View File

@@ -0,0 +1,38 @@
import Mock from 'mockjs'
function fakeSuccess() {
return {code: 200, success: true, msg: '操作成功'};
}
export default ({mock}) => {
if (!mock) return;
let Random = Mock.Random;
//获取表格数据
Mock.mock(/\/api\/jobslink-system\/station\/list[.]*?/, 'get', () => {
const json = {code: 200, success: true, msg: '操作成功'};
const list = [];
for (let i = 0; i < 5; i++) {
list.push(Mock.mock({
id: '@increment',
stationName: Mock.mock('@cname'),
linkman: Mock.mock('@last'),
websiteUrl: Random.url('http'),
'state|1-5': 1,
introduce: Mock.mock('@cparagraph(1, 3)')
}))
}
json.data = {
total: 10,
size: 10,
current: 1,
searchCount: true,
pages: 1,
records: list,
};
return json;
})
Mock.mock(/\/api\/jobslink-system\/station\/submit/, 'post', fakeSuccess);
Mock.mock(/\/api\/jobslink-system\/station\/remove/, 'post', fakeSuccess);
}

47
src/mock/menu.js Normal file
View File

@@ -0,0 +1,47 @@
import Mock from 'mockjs'
const top = [{
label: "首页",
path: "/wel/index",
icon: 'el-icon-menu',
meta: {
i18n: 'dashboard',
},
parentId: 0
},
{
label: "jobslinkX",
icon: 'el-icon-document',
meta: {
i18n: 'website',
},
path: "",
parentId: 1
},
{
label: "avuex",
icon: 'el-icon-document',
meta: {
i18n: 'avuexwebsite',
},
path: "",
parentId: 2
},
{
label: "测试",
icon: 'el-icon-document',
path: "/test/index",
meta: {
i18n: 'test',
},
parentId: 3
}]
export default ({mock}) => {
if (!mock) return;
Mock.mock('/user/getTopMenu', 'get', () => {
return {
data: top
}
})
}

22
src/mock/oauth.js Normal file
View File

@@ -0,0 +1,22 @@
import Mock from 'mockjs'
export default ({mock}) => {
if (!mock) return;
Mock.mock('/api/jobslink-auth/oauth/token/refresh', 'post', () => {
return {
data: {
"account": "admin",
"user_name": "admin",
"nick_name": "管理员",
"role_name": "administrator",
"avatar": "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
"access_token": "eyJ0eXAiOiJKc29uV2ViVG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3N1c2VyIiwiYXVkIjoiYXVkaWVuY2UiLCJyb2xlX25hbWUiOiJhZG1pbmlzdHJhdG9yIiwidXNlcl9pZCI6IjExMjM1OTg4MjE3Mzg2NzUyMDEiLCJyb2xlX2lkIjoiMTEyMzU5ODgxNjczODY3NTIwMSIsInVzZXJfbmFtZSI6ImFkbWluIiwibmlja19uYW1lIjoi566h55CG5ZGYIiwiYWNjb3VudCI6ImFkbWluIiwidGVuYW50X2NvZGUiOiIwMDAwMDAiLCJjbGllbnRfaWQiOiJzd29yZCIsImV4cCI6MTU1Nzk0Njc5OSwibmJmIjoxNTU3ODgxODg0fQ.FT8y1v1tg8hOAAoQpKlarKMgmsSXol-561edqtvOwa4",
"refresh_token": "eyJ0eXAiOiJKc29uV2ViVG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3N1c2VyIiwiYXVkIjoiYXVkaWVuY2UiLCJyb2xlX25hbWUiOiJhZG1pbmlzdHJhdG9yIiwidXNlcl9pZCI6IjExMjM1OTg4MjE3Mzg2NzUyMDEiLCJyb2xlX2lkIjoiMTEyMzU5ODgxNjczODY3NTIwMSIsInVzZXJfbmFtZSI6ImFkbWluIiwibmlja19uYW1lIjoi566h55CG5ZGYIiwiYWNjb3VudCI6ImFkbWluIiwidGVuYW50X2NvZGUiOiIwMDAwMDAiLCJjbGllbnRfaWQiOiJzd29yZCIsImV4cCI6MTU1Nzk0Njc5OSwibmJmIjoxNTU3ODgxODg0fQ.FT8y1v1tg8hOAAoQpKlarKMgmsSXol-561edqtvOwa4",
"token_type": "bearer",
"expires_in": 64915,
"license": "powered by jobslinx"
}
}
})
}

59
src/mock/param.js Normal file
View File

@@ -0,0 +1,59 @@
import Mock from 'mockjs'
function getFakeList() {
const json = {code: 200, success: true, msg: '操作成功'};
const list = [];
list.push(
{
id: '1',
paramName: '是否开启注册功能--mock测试',
paramKey: 'account.registerUser',
paramValue: 'true',
remark: '描述',
},
{
id: '2',
paramName: '账号初始密码--mock测试',
paramKey: 'account.initPassword',
paramValue: '123456',
remark: '描述',
}
);
json.data = {
total: 10,
size: 10,
current: 1,
searchCount: true,
pages: 1,
records: list,
};
return json;
}
function getFakeDetail() {
const json = {code: 200, success: true, msg: '操作成功'};
json.data = {
id: '1',
paramName: '是否开启注册功能',
paramKey: 'account.registerUser',
paramValue: 'true',
remark: '描述',
};
return json;
}
function fakeSuccess() {
return {code: 200, success: true, msg: '操作成功'};
}
export default ({mock}) => {
if (!mock) return;
Mock.mock(/\/api\/jobslink-system\/param\/list/, 'get', getFakeList);
Mock.mock(/\/api\/jobslink-system\/param\/detail/, 'get', getFakeDetail);
Mock.mock(/\/api\/jobslink-system\/param\/submit/, 'post', fakeSuccess);
Mock.mock(/\/api\/jobslink-system\/param\/remove/, 'post', fakeSuccess);
}

View File

@@ -0,0 +1,220 @@
import Mock from 'mockjs'
function getList () {
const json = { code: 200, success: true, msg: '操作成功' };
const list = [];
list.push(
{
id: '1',
title: '保洁人员',
state: '1',
no: 'M2020351400011212',
applicantCount: 2,
employCount: 12,
remainDay: 2,
wageCount: 55,
wageDate: "2020-06-09",
siginDate: '2020-05-02',
startDate: '2020-05-09',
endDate: '2020-05-20',
content: '',
industryCategory: '1',
workCategory: '2',
hireNumber: 5,
wage: '2000',
skill: [{
name: '技能1',
id: '1'
}, {
name: '技能2',
id: '2'
}, {
name: '技能3',
id: '3'
}],
description: '描述',
personCategory: '2',
sex: '2',
age: '1',
education: '2',
experience: '1',
contactsName: "高",
contactsPhone: "15227117870",
contactsTel: "80887875",
province: "1",
city: '2',
county: '1',
appraise: true,
rate: 5,
group: "1123598813738675201",
inviteState: '2',
address: '石家庄传媒大厦',
addrPoint: { // 详细地址经纬度
lng: 114.626155,
lat: 38.143449
}
}, {
id: '2',
state: '2',
title: '栾城齐鲁村镇银行',
no: 'M2020351400011212',
applicantCount: 10,
employCount: 0,
remainDay: 5,
wageCount: 0,
wageDate: "2020-06-09",
siginDate: '2020-04-11',
startDate: '2020-04-12',
endDate: '2020-04-20',
content: '备注',
industryCategory: '1',
workCategory: '2',
hireNumber: 5,
wage: '2000',
skill: [{
name: '技能1',
id: '1'
}, {
name: '技能2',
id: '2'
}],
description: '描述',
personCategory: '2',
sex: '2',
age: '2',
education: '2',
experience: '1',
contactsName: "高",
contactsPhone: "15227117870",
contactsTel: "80887875",
province: "2",
city: '2',
county: '1',
appraise: false,
rate: 0,
group: "1260853936219303938",
inviteState: '1',
address: '河北进出口大厦',
addrPoint: { // 详细地址经纬度
lng: 114.463488,
lat: 38.06616
}
}, {
id: '3',
title: '电焊工',
state: '4',
no: 'M2020351400011212',
applicantCount: 0,
employCount: 0,
wageCount: 5,
remainDay: 20,
wageDate: "2020-07-10",
siginDate: '2020-04-09',
startDate: '2020-04-10',
endDate: '2020-05-09',
content: '备注',
industryCategory: '1',
workCategory: '2',
hireNumber: 5,
wage: '1,525,000.00',
skill: [],
description: '描述',
personCategory: '3',
sex: '1',
age: '1',
education: '2',
experience: '1',
contactsName: "高",
contactsPhone: "15227117870",
contactsTel: "80887875",
province: "1",
city: '2',
county: '1',
appraise: false,
rate: 0,
group: "1123598813738675201",
inviteState: '1',
address: '',
addrPoint: { // 详细地址经纬度
lng: 0,
lat: 0
}
}, {
id: '4',
title: '企业安保人员',
state: '3',
no: 'M2020351400011212',
applicantCount: 0,
employCount: 0,
wageCount: 5,
remainDay: 20,
wageDate: "2020-07-10",
siginDate: '2020-03-30',
startDate: '2020-04-02',
endDate: '2020-05-02',
content: '备注',
industryCategory: '1',
workCategory: '2',
hireNumber: 5,
wage: '2000',
skill: [{
name: '技能1',
id: '1'
}],
description: '描述',
personCategory: '1',
sex: '2',
age: '2',
education: '2',
experience: '1',
contactsName: "高",
contactsPhone: "15227117870",
contactsTel: "80887875",
province: "2",
city: '2',
county: '2',
appraise: true,
rate: 4,
group: "1260853936219303938",
inviteState: '2',
address: '',
addrPoint: { // 详细地址经纬度
lng: 0,
lat: 0
}
}
);
json.data = {
total: 50,
size: 20,
current: 1,
searchCount: true,
pages: 1,
records: list,
};
return json;
}
function remove () {
const json = { code: 200, success: true, msg: '操作成功' };
return json;
}
function add () {
const json = { code: 200, success: true, msg: '操作成功' };
return json;
}
function employ () {
const json = { code: 200, success: true, msg: '操作成功' };
return json;
}
export default ({ mock }) => {
if (!mock) return;
Mock.mock(/\/api\/jobslink-talents\/person\/list/, 'get', getList);
Mock.mock(/\/api\/jobslink-talents\/person\/remove/, 'post', remove);
Mock.mock(/\/api\/jobslink-talents\/person\/submit/, 'post', add);
Mock.mock(/\/api\/jobslink-talents\/person\/employ/, 'post', employ);
}

39
src/mock/tenant/wage.js Normal file
View File

@@ -0,0 +1,39 @@
import Mock from 'mockjs'
function getList() {
const json = {code: 200, success: true, msg: '操作成功'};
const list = [];
list.push(Mock.mock({
id: '@increment',
name: '蒋涛',
'sex|0-1': 1,
'age|1-99': 1,
identity: '123456789987654321',
}))
for (let index = 0; index < 1000; index++) {
list.push(Mock.mock({
id: '@increment',
name: Mock.mock('@cname'),
'sex|0-1': 1,
'age|1-99': 1,
identity: Mock.mock('@id'),
}))
}
json.data = {
total: list.length,
size: 20,
current: 1,
searchCount: true,
pages: 1,
records: list,
};
return json;
}
export default ({mock}) => {
if (!mock) return;
Mock.mock(/\/api\/jobslink-talents\/wage\/mission/, 'get', getList);
}

44
src/mock/user.js Normal file
View File

@@ -0,0 +1,44 @@
import Mock from 'mockjs'
export default ({ mock }) => {
if (!mock) return;
// 用户登录
Mock.mock('/user/login', 'post', {
data: new Date().getTime() + ''
});
//用户退出
Mock.mock('/user/logout', 'get', {
data: true,
});
//刷新token
Mock.mock('/user/refesh', 'post', {
data: new Date().getTime() + ''
});
//获取表格数据
Mock.mock('/user/getTable', 'get', () => {
let list = []
for (let i = 0; i < 5; i++) {
list.push(Mock.mock({
id: '@increment',
name: Mock.mock('@cname'),
username: Mock.mock('@last'),
type: [0, 2],
checkbox: [0, 1],
'number|0-100': 0,
datetime: 1532932422071,
'sex|0-1': 0,
moreselect: [0, 1],
"grade": 0,
address: Mock.mock('@cparagraph(1, 3)'),
check: [1, 3, 4]
}))
}
return {
data: {
total: 11,
pageSize: 10,
tableData: list
}
}
})
}