Commit 67343365 by cwq0219

接口

1 parent 61cffd5b
{ {
"name": "multiple-pages", "name": "authority",
"version": "0.1.0", "version": "1.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
...@@ -5488,9 +5488,9 @@ ...@@ -5488,9 +5488,9 @@
} }
}, },
"glsx-vue-common": { "glsx-vue-common": {
"version": "1.1.8", "version": "1.1.9",
"resolved": "https://registry.npmjs.org/glsx-vue-common/-/glsx-vue-common-1.1.8.tgz", "resolved": "http://registry.npm.taobao.org/glsx-vue-common/download/glsx-vue-common-1.1.9.tgz",
"integrity": "sha512-+dfVGaEQ2rhGJ5wMTgUAkcVVT7tod8TD8dMLu20EUuVS9Zk9Dfi4nNnbUxvTOwvmprxoP8g0uZ74PbFYY59/hw==", "integrity": "sha1-m8GtLp4JllxlM5EghaeasPBL4Pc=",
"requires": { "requires": {
"vue": "2.5.17" "vue": "2.5.17"
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
"glsx-vue-common": "^1.1.8", "glsx-vue-common": "^1.1.9",
"glsx-vue-components": "^1.0.12", "glsx-vue-components": "^1.0.12",
"lodash": "^4.17.10", "lodash": "^4.17.10",
"node-sass": "^4.9.3", "node-sass": "^4.9.3",
......
import {
GlAxios
} from 'glsx-vue-common'
const path = 'vue'
const __sLogin = `${path}`
// const __sGetInfo = `auth/checkLogin`
// const __sLogout = `${path}/logout`
// const __sLt = `${path}/lt`
// const __sCheckLogin = `auth/checkLogin`
const getInfo = {
p: [__sLogin],
req: (subaddress, params) => GlAxios.post(__sLogin + subaddress, params)
}
export {
getInfo
}
export default{ export default{
axios: { axios: {
baseURL: 'http://192.168.3.171:7300/mock/5b0ed7dbf189006180803286/standard', baseURL: 'http://192.168.3.171:7300/mock/5b91805391b67469b43e2921/subsystem',
whiteList: ['user/login', 'user/info', 'user/logout', 'user/getInfo', 'vue/lt', 'vue/login', 'auth/checkLogin', 'vue/logout'], whiteList: ['vue/userList', 'vue/roleList'],
timeout: 15000, timeout: 15000,
result: { result: {
data_key: 'data', // 返回值数据实体存放对象 data_key: 'data', // 返回值数据实体存放对象
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<script> <script>
import { RoleCreateDialog } from '@/components/index' import { RoleCreateDialog } from '@/components/index'
import { getInfo } from '@/api/user'
export default { export default {
name: 'role', name: 'role',
components: { components: {
...@@ -30,103 +31,13 @@ export default { ...@@ -30,103 +31,13 @@ export default {
roleData: { roleData: {
border: true, border: true,
height: 500, height: 500,
data: [{ data: [],
id: '1032',
name: '好车主',
department: '研发中心-网络软件部',
state: '开启',
createTime: '2018-08-12 13:00:00'
}, {
id: '1033',
name: '运营平台',
department: '研发中心-网络软件部',
state: '开启',
createTime: '2018-08-12 13:00:00'
}, {
id: '1034',
name: '精品车主',
department: '研发中心-网络软件部',
state: '开启',
createTime: '2018-08-12 13:00:00'
}, {
id: '1035',
name: '云商分润',
department: '研发中心-网络软件部',
state: '开启',
createTime: '2018-08-12 13:00:00'
}, {
id: '1036',
name: '营销系统',
department: '研发中心-网络软件部',
state: '开启',
createTime: '2018-08-12 13:00:00'
}, {
id: '1037',
name: 'test',
department: '研发中心-网络软件部',
state: '开启',
createTime: '2018-08-12 13:00:00'
}, {
id: '1037',
name: 'test',
department: '研发中心-网络软件部',
state: '开启',
createTime: '2018-08-12 13:00:00'
}, {
id: '1037',
name: 'test',
department: '研发中心-网络软件部',
state: '开启',
createTime: '2018-08-12 13:00:00'
}, {
id: '1037',
name: 'test',
department: '研发中心-网络软件部',
state: '开启',
createTime: '2018-08-12 13:00:00'
}, {
id: '1037',
name: 'test',
department: '研发中心-网络软件部',
state: '开启',
createTime: '2018-08-12 13:00:00'
}, {
id: '1037',
name: 'test',
department: '研发中心-网络软件部',
state: '开启',
createTime: '2018-08-12 13:00:00'
}, {
id: '1037',
name: 'test',
department: '研发中心-网络软件部',
state: '开启',
createTime: '2018-08-12 13:00:00'
}, {
id: '1037',
name: 'test',
department: '研发中心-网络软件部',
state: '开启',
createTime: '2018-08-12 13:00:00'
}, {
id: '1037',
name: 'test',
department: '研发中心-网络软件部',
state: '开启',
createTime: '2018-08-12 13:00:00'
}, {
id: '1037',
name: 'test',
department: '研发中心-网络软件部',
state: '开启',
createTime: '2018-08-12 13:00:00'
}],
column: [{ column: [{
label: '序号', label: '序号',
prop: 'id' prop: 'id'
}, { }, {
label: '角色名字', label: '角色名字',
prop: 'name' prop: 'rolename'
}, { }, {
label: '所属部门', label: '所属部门',
prop: 'department' prop: 'department'
...@@ -135,7 +46,7 @@ export default { ...@@ -135,7 +46,7 @@ export default {
prop: 'state' prop: 'state'
}, { }, {
label: '创建时间', label: '创建时间',
prop: 'createTime' prop: 'createtime'
}], }],
console: { console: {
label: '操作', label: '操作',
...@@ -173,7 +84,19 @@ export default { ...@@ -173,7 +84,19 @@ export default {
} }
} }
}, },
mounted() {
getInfo.req('/roleList').then(res => {
this.roleData.data = res.roleData
console.log(this.roleData.data)
})
},
methods: { methods: {
// getData() {
// getInfo.req('/roleList').then(res => {
// this.roleData.data = res
// console.log(res)
// })
// },
message(message, type) { message(message, type) {
type && this.$message({ type && this.$message({
showClose: true, showClose: true,
...@@ -186,7 +109,6 @@ export default { ...@@ -186,7 +109,6 @@ export default {
}) })
}, },
confirmDeleteOrNot(index, rows) { confirmDeleteOrNot(index, rows) {
alert('?????')
this.$confirm('确定要删除这条数据?', '11', { this.$confirm('确定要删除这条数据?', '11', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!