This commit is contained in:
2022-10-14 17:45:04 +08:00
5 changed files with 454 additions and 36 deletions

View File

@@ -8,28 +8,44 @@
{
"name": "手持请求LMS",
"description": "",
"item": [
"item": [],
"event": [
{
"name": "登录",
"request": {
"method": "GET",
"header": [],
"body": {},
"url": {
"raw": "http://localhost:8010/api/param/getStageCodeByCode",
"protocol": "http",
"host": [
"localhost"
],
"port": "8010",
"path": [
"api",
"param",
"getStageCodeByCode"
]
}
},
"response": []
"listen": "prerequest",
"script": {
"id": "49a0ac7b-36e4-4dd8-8a13-2abd34b2b4e0",
"type": "text/javascript",
"exec": [
"var data = {",
"\"username\":\"admin\",",
"\"password\":\"uefvHbyUCADkudW1MV+/yw9XBWR2Z+KDyq+dqQ+ozr1loClUgqm4XQPsUl87IsXetYBWRDLo7HC++20VHlW80g==\"",
"}",
"var url='http://127.0.0.1:8010'",
"const echoPostRequest = {",
"  url: url+'/mobile/auth/login',",
"  method: 'POST',",
"  header: 'Content-Type:application/json',",
"  body: {",
"    mode: 'raw',",
"    raw: JSON.stringify(data)",
"  }",
"};",
"pm.sendRequest(echoPostRequest, function (err, res) {",
"  console.log(err ? err : res.json());",
"  console.log(res.json());",
"});"
]
}
},
{
"listen": "test",
"script": {
"id": "91ab2f46-03b4-4418-9784-1e21f402e4eb",
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
@@ -149,6 +165,399 @@
"name": "LMS请求SAP",
"description": "",
"item": []
},
{
"name": "示例",
"description": "",
"item": [
{
"name": "LMS登录",
"event": [
{
"listen": "prerequest",
"script": {
"id": "56672d9d-9bac-4f23-b77e-809647ef5df4",
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"id": "48d9e766-7014-4243-80de-81d63be07da5",
"type": "text/javascript",
"exec": [
"//postman使用:https://blog.csdn.net/wangyiyan315/article/details/122441791",
"",
"var JsonData = JSON.parse(responseBody); //定义一个变量,并且将请求返回的内容赋给该变量",
"pm.globals.set(\"lms_token\", JsonData.token.slice(7)); //7代表去掉token前面的Bearer加空格",
""
]
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\n\t\"username\":\"admin\",\n\t\"password\":\"uefvHbyUCADkudW1MV+/yw9XBWR2Z+KDyq+dqQ+ozr1loClUgqm4XQPsUl87IsXetYBWRDLo7HC++20VHlW80g==\"\n}"
},
"url": {
"raw": "{{lms_url}}/mobile/auth/login",
"host": [
"{{lms_url}}"
],
"path": [
"mobile",
"auth",
"login"
]
},
"description": "LMS登录并设置返回的token"
},
"response": []
},
{
"name": "系统参数分页查询-示例",
"event": [
{
"listen": "prerequest",
"script": {
"id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246",
"type": "text/javascript",
"exec": [
""
]
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{lms_token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "/api/param"
},
"url": {
"raw": "{{lms_url}}/api/param?sort=id,desc&size=10&page=0",
"host": [
"{{lms_url}}"
],
"path": [
"api",
"param"
],
"query": [
{
"key": "sort",
"value": "id,desc"
},
{
"key": "size",
"value": "10"
},
{
"key": "page",
"value": "0"
},
{
"key": null,
"value": null
},
{
"key": null,
"value": null
}
]
},
"description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}"
},
"response": []
},
{
"name": "根据编码获取值-示例",
"event": [
{
"listen": "prerequest",
"script": {
"id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246",
"type": "text/javascript",
"exec": [
""
]
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{lms_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "IS_CONNECT_ACS"
},
"url": {
"raw": "{{lms_url}}/api/param/getValueByCode",
"host": [
"{{lms_url}}"
],
"path": [
"api",
"param",
"getValueByCode"
]
},
"description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}"
},
"response": []
},
{
"name": "删除参数-示例",
"event": [
{
"listen": "prerequest",
"script": {
"id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246",
"type": "text/javascript",
"exec": [
""
]
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{lms_token}}",
"type": "string"
}
]
},
"method": "DELETE",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "[\"0c1d96d335cd4dd6aa0a4bee4b1c45fe\"]"
},
"url": {
"raw": "{{lms_url}}/api/param",
"host": [
"{{lms_url}}"
],
"path": [
"api",
"param"
]
},
"description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}"
},
"response": []
},
{
"name": "新增参数-示例",
"event": [
{
"listen": "prerequest",
"script": {
"id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246",
"type": "text/javascript",
"exec": [
""
]
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{lms_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\"code\":\"test22\",\"is_active\":\"1\",\"remark\":\"test11\",\"name\":\"test11\",\"value\":\"test11\"}"
},
"url": {
"raw": "{{lms_url}}/api/param",
"host": [
"{{lms_url}}"
],
"path": [
"api",
"param"
]
},
"description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}"
},
"response": []
},
{
"name": "修改参数-示例",
"event": [
{
"listen": "prerequest",
"script": {
"id": "4f07b550-ab9c-41a4-8dbf-f889ae50b246",
"type": "text/javascript",
"exec": [
""
]
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{lms_token}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\"code\":\"test22\",\"is_active\":\"8\",\"create_time\":\"2022-10-14 13:33:52\",\"remark\":\"888\",\"update_time\":\"2022-10-14 13:33:52\",\"update_optname\":\"管理员\",\"create_id\":1,\"name\":\"888\",\"id\":\"3f1901b5814d40908bad602854b22aa6\",\"value\":\"8888\",\"update_optid\":1,\"create_name\":\"管理员\"}"
},
"url": {
"raw": "{{lms_url}}/api/param",
"host": [
"{{lms_url}}"
],
"path": [
"api",
"param"
]
},
"description": "求方法参数:{\"whereJson\":{\"sort\":\"id,desc\",\"size\":\"10\",\"page\":\"0\"}}"
},
"response": []
}
]
}
],
"event": [
{
"listen": "prerequest",
"script": {
"id": "bea134f1-29ee-4ea7-8450-66c01dce0cf5",
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"id": "6d0b3712-c0bd-4190-b567-90695243bd0e",
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"id": "254153fe-2272-4cc8-af50-1dcfe5b7cad2",
"key": "lms_url",
"value": "http://localhost:8010",
"type": "string",
"description": ""
},
{
"id": "573a2380-1342-41a5-bb29-dbb830a86a55",
"key": "acs_url",
"value": "http://localhost:8010",
"type": "string",
"description": ""
},
{
"id": "1388a0e2-20e0-4da8-a84e-6604694ad4a5",
"key": "mes_url",
"value": "http://localhost:8010",
"type": "string",
"description": ""
},
{
"id": "a0d1ff39-8d91-4636-8d5d-34ba2906b15b",
"key": "sap_url",
"value": "http://localhost:8010",
"type": "string",
"description": ""
},
{
"id": "1e6fff53-e106-4875-aacf-8b39e8d2a577",
"key": "crm_url",
"value": "http://localhost:8010",
"type": "string",
"description": ""
}
]
}

View File

@@ -78,3 +78,24 @@ security:
- /api/localStorage/pictures
# 参数
- /api/param/getValueByCode
# Sa-Token配置
sa-token:
# token 名称 (同时也是cookie名称)
token-name: Authorization
# token 有效期单位s 默认30天, -1代表永不过期
timeout: 2592000
# token 临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
activity-timeout: -1
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
is-concurrent: true
# 在多人登录同一账号时是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
is-share: false
# token风格
token-style: random-128
# 是否输出操作日志
is-log: false
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
# 是否在初始化配置时打印版本字符画
is-print: false
# token 前缀
token-prefix: Bearer

View File

@@ -29,7 +29,7 @@
<el-table-column prop="ip" label="登录IP" />
<el-table-column show-overflow-tooltip prop="address" label="登录地点" />
<el-table-column prop="browser" label="浏览器" width="145px" />
<el-table-column prop="loginTime" label="登录时间">
<el-table-column prop="loginTime" label="登录时间" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.loginTime) }}</span>
</template>

View File

@@ -99,7 +99,7 @@
@selection-change="crud.selectionChangeHandler"
>
<el-table-column :selectable="checkboxT" type="selection" width="55" />
<!-- <el-table-column label="编码" prop="code" />-->
<!-- <el-table-column label="编码" prop="code" />-->
<el-table-column label="名称" prop="name" />
<el-table-column label="排序" prop="deptSort" />
<el-table-column label="状态" align="center" prop="enabled">

View File

@@ -110,19 +110,7 @@
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="info"
:loading="syncLoading"
icon="el-icon-refresh"
size="mini"
@click="sync()"
>
仓位同步
</el-button>
</crudOperation>
<crudOperation :permission="permission" />
<!--表单组件-->
<el-dialog
:close-on-click-modal="false"