commit
db26be70ce
16 changed files with 465 additions and 0 deletions
@ -0,0 +1,6 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project version="4"> |
||||
|
<component name="JavaScriptLibraryMappings"> |
||||
|
<includedPredefinedLibrary name="Node.js Core" /> |
||||
|
</component> |
||||
|
</project> |
@ -0,0 +1,12 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<module type="WEB_MODULE" version="4"> |
||||
|
<component name="NewModuleRootManager"> |
||||
|
<content url="file://$MODULE_DIR$"> |
||||
|
<excludeFolder url="file://$MODULE_DIR$/temp" /> |
||||
|
<excludeFolder url="file://$MODULE_DIR$/.tmp" /> |
||||
|
<excludeFolder url="file://$MODULE_DIR$/tmp" /> |
||||
|
</content> |
||||
|
<orderEntry type="inheritedJdk" /> |
||||
|
<orderEntry type="sourceFolder" forTests="false" /> |
||||
|
</component> |
||||
|
</module> |
@ -0,0 +1,8 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project version="4"> |
||||
|
<component name="ProjectModuleManager"> |
||||
|
<modules> |
||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/mock.iml" filepath="$PROJECT_DIR$/.idea/mock.iml" /> |
||||
|
</modules> |
||||
|
</component> |
||||
|
</project> |
@ -0,0 +1,59 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project version="4"> |
||||
|
<component name="ChangeListManager"> |
||||
|
<list default="true" id="f6554b0f-8e9f-4d17-af66-170afe4c12e9" name="默认变更列表" comment="" /> |
||||
|
<option name="SHOW_DIALOG" value="false" /> |
||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" /> |
||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> |
||||
|
<option name="LAST_RESOLUTION" value="IGNORE" /> |
||||
|
</component> |
||||
|
<component name="FileTemplateManagerImpl"> |
||||
|
<option name="RECENT_TEMPLATES"> |
||||
|
<list> |
||||
|
<option value="JavaScript File" /> |
||||
|
</list> |
||||
|
</option> |
||||
|
</component> |
||||
|
<component name="ProjectId" id="1zqPGJ109BzDN5oqtEXo6tn6xHP" /> |
||||
|
<component name="ProjectViewState"> |
||||
|
<option name="hideEmptyMiddlePackages" value="true" /> |
||||
|
<option name="showLibraryContents" value="true" /> |
||||
|
</component> |
||||
|
<component name="PropertiesComponent"> |
||||
|
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" /> |
||||
|
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" /> |
||||
|
<property name="javascript.nodejs.core.library.configured.version" value="14.17.4" /> |
||||
|
<property name="javascript.nodejs.core.library.typings.version" value="14.17.4" /> |
||||
|
<property name="last_opened_file_path" value="$PROJECT_DIR$" /> |
||||
|
<property name="nodejs_interpreter_path" value="wsl://Ubuntu@/usr/local/bin/node " /> |
||||
|
<property name="nodejs_package_manager_path" value="npm" /> |
||||
|
<property name="settings.editor.selected.configurable" value="settings.nodejs" /> |
||||
|
<property name="vue.rearranger.settings.migration" value="true" /> |
||||
|
</component> |
||||
|
<component name="RecentsManager"> |
||||
|
<key name="MoveFile.RECENT_KEYS"> |
||||
|
<recent name="D:\ccsens\coding\腐蚀检测\mock\data" /> |
||||
|
</key> |
||||
|
</component> |
||||
|
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" /> |
||||
|
<component name="TaskManager"> |
||||
|
<task active="true" id="Default" summary="默认任务"> |
||||
|
<changelist id="f6554b0f-8e9f-4d17-af66-170afe4c12e9" name="默认变更列表" comment="" /> |
||||
|
<created>1634872548270</created> |
||||
|
<option name="number" value="Default" /> |
||||
|
<option name="presentableId" value="Default" /> |
||||
|
<updated>1634872548270</updated> |
||||
|
<workItem from="1634872549457" duration="1798000" /> |
||||
|
<workItem from="1635121020817" duration="1948000" /> |
||||
|
<workItem from="1635211315342" duration="2957000" /> |
||||
|
</task> |
||||
|
<servers /> |
||||
|
</component> |
||||
|
<component name="TypeScriptGeneratedFilesManager"> |
||||
|
<option name="version" value="3" /> |
||||
|
</component> |
||||
|
<component name="XSLT-Support.FileAssociations.UIState"> |
||||
|
<expand /> |
||||
|
<select /> |
||||
|
</component> |
||||
|
</project> |
@ -0,0 +1,6 @@ |
|||||
|
module.exports = { |
||||
|
port: 4001, |
||||
|
plugins: [ |
||||
|
|
||||
|
], |
||||
|
}; |
@ -0,0 +1,26 @@ |
|||||
|
module.exports = { |
||||
|
code: 200, |
||||
|
msg: 'ok', |
||||
|
data: { |
||||
|
deviceId: '1', // 设备id
|
||||
|
deviceFullId: '001', // 设备完整id
|
||||
|
deviceDirection: '东', // 设备朝向
|
||||
|
area: '太原', // 地区
|
||||
|
address: '炕上', // 安装地点名称
|
||||
|
contact: '冯先生', // 联系人
|
||||
|
phone: '18603333333', // 联系人电话
|
||||
|
lon: '112.48699', // 经度
|
||||
|
lat: '37.94036', // 纬度
|
||||
|
head: '冯先生', // 负责人
|
||||
|
installLocation: '后头', // 安装位置
|
||||
|
installTime: Date.now(), // 安装时间
|
||||
|
runTime: Date.now(), // 正式运行时间
|
||||
|
linkAddress: 'xx1', // 链路地址
|
||||
|
probNo: 'tt1', // 探头编号
|
||||
|
simple: '', // 试样
|
||||
|
sim1: '3131313', // sim卡1
|
||||
|
joint: 'good', // 主站后台联调情况
|
||||
|
remark: '001 remark', // 备注
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
module.exports = { |
||||
|
code: 200, |
||||
|
msg: 'OK', |
||||
|
data: [ |
||||
|
{ |
||||
|
deviceId: '1', |
||||
|
deviceFullId: '001', |
||||
|
address: '太原' |
||||
|
}, |
||||
|
{ |
||||
|
deviceId: '2', |
||||
|
deviceFullId: '002', |
||||
|
address: '大同' |
||||
|
}, |
||||
|
{ |
||||
|
deviceId: '3', |
||||
|
deviceFullId: '004', |
||||
|
address: '忻州' |
||||
|
}, |
||||
|
{ |
||||
|
deviceId: '4', |
||||
|
deviceFullId: '004', |
||||
|
address: '晋中' |
||||
|
} |
||||
|
] |
||||
|
} |
@ -0,0 +1,98 @@ |
|||||
|
module.exports = { |
||||
|
code: 200, |
||||
|
msg: 'ok', |
||||
|
data: { |
||||
|
page: { |
||||
|
count: 100, // 数据条数
|
||||
|
total: 10, // 总共多少页
|
||||
|
page: 1, // 当前页数
|
||||
|
size: 10, // 每页10条
|
||||
|
}, |
||||
|
data: [ |
||||
|
{ |
||||
|
deviceId: '1', // 设备id
|
||||
|
deviceFullId: '001', // 设备完整id
|
||||
|
deviceDirection: '东', // 设备朝向
|
||||
|
area: '太原', // 地区
|
||||
|
address: '炕上', // 安装地点名称
|
||||
|
contact: '冯先生', // 联系人
|
||||
|
phone: '18603333333', // 联系人电话
|
||||
|
lon: '112.48699', // 经度
|
||||
|
lat: '37.94036', // 纬度
|
||||
|
head: '冯先生', // 负责人
|
||||
|
installLocation: '后头', // 安装位置
|
||||
|
installTime: Date.now(), // 安装时间
|
||||
|
runTime: Date.now(), // 正式运行时间
|
||||
|
linkAddress: 'xx1', // 链路地址
|
||||
|
probNo: 'tt1', // 探头编号
|
||||
|
simple: '', // 试样
|
||||
|
sim1: '3131313', // sim卡1
|
||||
|
joint: 'good', // 主站后台联调情况
|
||||
|
remark: '001 remark', // 备注
|
||||
|
}, |
||||
|
{ |
||||
|
deviceId: '2', // 设备id
|
||||
|
deviceFullId: '002', // 设备完整id
|
||||
|
deviceDirection: '西', // 设备朝向
|
||||
|
area: '大同', // 地区
|
||||
|
address: '床上', // 安装地点名称
|
||||
|
contact: '张先生', // 联系人
|
||||
|
phone: '18603333332', // 联系人电话
|
||||
|
lon: '113.14013', // 经度
|
||||
|
lat: '40.25585', // 纬度
|
||||
|
head: '张先生', // 负责人
|
||||
|
installLocation: '左边', // 安装位置
|
||||
|
installTime: Date.now(), // 安装时间
|
||||
|
runTime: Date.now(), // 正式运行时间
|
||||
|
linkAddress: 'xx2', // 链路地址
|
||||
|
probNo: 'tt2', // 探头编号
|
||||
|
simple: '', // 试样
|
||||
|
sim1: '456466', // sim卡1
|
||||
|
joint: 'bad', // 主站后台联调情况
|
||||
|
remark: '002 remark', // 备注
|
||||
|
}, |
||||
|
{ |
||||
|
deviceId: '3', // 设备id
|
||||
|
deviceFullId: '003', // 设备完整id
|
||||
|
deviceDirection: '南', // 设备朝向
|
||||
|
area: '忻州', // 地区
|
||||
|
address: '地上', // 安装地点名称
|
||||
|
contact: '李女', // 联系人
|
||||
|
phone: '18603333334', // 联系人电话
|
||||
|
lon: '112.74619', // 经度
|
||||
|
lat: '38.40429', // 纬度
|
||||
|
head: '李女', // 负责人
|
||||
|
installLocation: '右边', // 安装位置
|
||||
|
installTime: Date.now(), // 安装时间
|
||||
|
runTime: Date.now(), // 正式运行时间
|
||||
|
linkAddress: 'xx3', // 链路地址
|
||||
|
probNo: 'tt3', // 探头编号
|
||||
|
simple: '', // 试样
|
||||
|
sim1: '7878', // sim卡1
|
||||
|
joint: 'grate', // 主站后台联调情况
|
||||
|
remark: '003 remark', // 备注
|
||||
|
}, |
||||
|
{ |
||||
|
deviceId: '4', // 设备id
|
||||
|
deviceFullId: '004', // 设备完整id
|
||||
|
deviceDirection: '北', // 设备朝向
|
||||
|
area: '晋中', // 地区
|
||||
|
address: '桌上', // 安装地点名称
|
||||
|
contact: '王婆', // 联系人
|
||||
|
phone: '18603333335', // 联系人电话
|
||||
|
lon: '112.70746', // 经度
|
||||
|
lat: '37.69978', // 纬度
|
||||
|
head: '王婆', // 负责人
|
||||
|
installLocation: '上边', // 安装位置
|
||||
|
installTime: Date.now(), // 安装时间
|
||||
|
runTime: Date.now(), // 正式运行时间
|
||||
|
linkAddress: 'xx4', // 链路地址
|
||||
|
probNo: 'tt4', // 探头编号
|
||||
|
simple: '', // 试样
|
||||
|
sim1: '909090', // sim卡1
|
||||
|
joint: 'amazing', // 主站后台联调情况
|
||||
|
remark: '004 remark', // 备注
|
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
module.exports = { |
||||
|
code: 200, |
||||
|
msg: 'ok', |
||||
|
data: [ |
||||
|
{ |
||||
|
year: "2021-01", |
||||
|
value: 6 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-02", |
||||
|
value: 1 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-03", |
||||
|
value: 2 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-04", |
||||
|
value: 5 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-05", |
||||
|
value: 3 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-06", |
||||
|
value: 4 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-07", |
||||
|
value: 7 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-08", |
||||
|
value: 9 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-09", |
||||
|
value: 1 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-10", |
||||
|
value: 8 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-11", |
||||
|
value: 5 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-12", |
||||
|
value: 6 |
||||
|
} |
||||
|
], |
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
module.exports = { |
||||
|
code: 200, |
||||
|
msg: 'ok', |
||||
|
data: [ |
||||
|
{ |
||||
|
year: "2021-01", |
||||
|
value: 5 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-02", |
||||
|
value: 2 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-03", |
||||
|
value: 4 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-04", |
||||
|
value: 6 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-05", |
||||
|
value: 7 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-06", |
||||
|
value: 3 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-07", |
||||
|
value: 1 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-08", |
||||
|
value: 9 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-09", |
||||
|
value: 6 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-10", |
||||
|
value: 8 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-11", |
||||
|
value: 5 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-12", |
||||
|
value: 4 |
||||
|
} |
||||
|
], |
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
module.exports = { |
||||
|
code: 200, |
||||
|
msg: 'ok', |
||||
|
data: [ |
||||
|
{ |
||||
|
year: "2021-01", |
||||
|
value: 3 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-02", |
||||
|
value: 1 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-03", |
||||
|
value: 6 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-04", |
||||
|
value: 5 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-05", |
||||
|
value: 8 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-06", |
||||
|
value: 4 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-07", |
||||
|
value: 6 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-08", |
||||
|
value: 9 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-09", |
||||
|
value: 4 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-10", |
||||
|
value: 8 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-11", |
||||
|
value: 6 |
||||
|
}, |
||||
|
{ |
||||
|
year: "2021-12", |
||||
|
value: 3 |
||||
|
} |
||||
|
], |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
module.exports = { |
||||
|
"code": 200, |
||||
|
"data": { |
||||
|
"id": "1237289459268063232", |
||||
|
"account": "wally", |
||||
|
"phone": "18603454788", |
||||
|
"token": "eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MzUxMjA4MzgsInN1YiI6IjEyMzcyODk0NTkyNjgwNjMyMzIiLCJhdXRoSWQiOiIxNDMzMjUzMzc2MjI4OTg2ODgwIiwiZXhwIjoxNjM1MjA3MjM4fQ.nlbn58I4z1f-nRQ8pF0xbX0WM3M3P7nlfCL9RtMkNNY", |
||||
|
"refresh_token": null, |
||||
|
"wxInfo": { |
||||
|
"nickname": "冯教授", |
||||
|
"headImgUrl": "https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83ep0f8lZWNMdprALsdqViboXH7f2ibgVMeXF4EsgUHtia2nMaEZCOfbOjW0usGBxn1ot0ItCqZGAJVdsA/132", |
||||
|
"sex": 1, |
||||
|
"province": "Shanxi", |
||||
|
"city": "Taiyuan", |
||||
|
"country": "China", |
||||
|
"language": "zh_CN" |
||||
|
} |
||||
|
}, |
||||
|
"msg": "ok", |
||||
|
"success": true, |
||||
|
"md5Status": 0 |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
{ |
||||
|
"name": "mock", |
||||
|
"version": "1.0.0", |
||||
|
"description": "", |
||||
|
"main": ".svrxrc.js", |
||||
|
"scripts": { |
||||
|
"dev": "svrx --route route.js" |
||||
|
}, |
||||
|
"keywords": [], |
||||
|
"author": "", |
||||
|
"license": "ISC" |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
const user = require('./data/user'); |
||||
|
const devices = require('./data/devices'); |
||||
|
const devicesAll = require('./data/devicesAll'); |
||||
|
const device = require('./data/device'); |
||||
|
const integralElectric = require('./data/integralElectric'); |
||||
|
const totalCorrosion = require('./data/totalCorrosion'); |
||||
|
const moistTime = require('./data/moistTime'); |
||||
|
|
||||
|
// 根据userId获取用户
|
||||
|
get('/gateway/tall3/v3.0/users/userId').to.json(user); |
||||
|
|
||||
|
// 设备列表
|
||||
|
get('/gateway/corrosion/devices').to.json(devices); |
||||
|
|
||||
|
// 获取某个设备信息
|
||||
|
get('/gateway/corrosion/devices/all/:id').to.json(device); |
||||
|
|
||||
|
// 设备列表 完整信息
|
||||
|
get('/gateway/corrosion/devices/all').to.json(devicesAll); |
||||
|
|
||||
|
// 积分电量
|
||||
|
get('/gateway/corrosion/monthes/integralElectric').to.json(integralElectric); |
||||
|
|
||||
|
// 月累计腐蚀
|
||||
|
get('/gateway/corrosion/monthes/totalCorrosion').to.json(totalCorrosion); |
||||
|
|
||||
|
// 月累计湿润时间图
|
||||
|
get('/gateway/corrosion/monthes/moistTime').to.json(moistTime); |
Loading…
Reference in new issue