Browse Source

Merge branch 'master' of dd.tall.wiki:song/corrosion-mock

master
wally 4 years ago
parent
commit
7c01e3db5b
  1. 0
      .idea/.gitignore
  2. 6
      .idea/jsLibraryMappings.xml
  3. 12
      .idea/mock.iml
  4. 8
      .idea/modules.xml
  5. 59
      .idea/workspace.xml
  6. 0
      README.md
  7. 54
      data/integralElectric.js
  8. 54
      data/moistTime.js
  9. 54
      data/totalCorrosion.js
  10. 16
      route.js

0
.idea/.gitignore

6
.idea/jsLibraryMappings.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<includedPredefinedLibrary name="Node.js Core" />
</component>
</project>

12
.idea/mock.iml

@ -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>

8
.idea/modules.xml

@ -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>

59
.idea/workspace.xml

@ -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
README.md

54
data/integralElectric.js

@ -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
}
],
}

54
data/moistTime.js

@ -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
}
],
}

54
data/totalCorrosion.js

@ -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
}
],
}

16
route.js

@ -2,6 +2,12 @@ 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);
@ -12,5 +18,11 @@ get('/gateway/corrosion/devices/all/:id').to.json(device);
// 设备列表 完整信息
get('/gateway/corrosion/devices/all').to.json(devicesAll);
// 根据userId获取用户
get('/gateway/tall3/v3.0/users/userId').to.json(user);
// 积分电量
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…
Cancel
Save