Commit fc41d7e6 authored by Your Name's avatar Your Name

htf

parent f246e3c9
......@@ -16,7 +16,6 @@ import homeUrl from './homeURL'
*/
// 获取权限节点列表
export function getMenuList(parameter) {
console.log('111111111111111111111111111111111111111111111')
console.log(parameter)
return axios({
url: 'authority/authority-nodes/node-list',
......@@ -83,6 +82,26 @@ export function getMangeList(parameter) {
params: parameter
})
}
// 获取管理员详情
export function getManageUserInfo(parameter) {
console.log(parameter)
return axios({
url: 'authority/manage-lists/get-user-info',
method: 'get',
params: {
'GUID':parameter
}
})
}
// 获取角色列表
export function getManageGroupList() {
return axios({
url: 'authority/manage-lists/manage-group-list',
method: 'get',
params: {}
})
}
/**
* get user 2step code open?
* @param parameter {*}
......
const homeUrl= 'http://localhost/dengxueyun/newshopBack/backend/web/v1/';
const homeUrl= 'http://localhost/hantengfei/newShopBack1/backend/web/v1/';
export default homeUrl
\ No newline at end of file
......@@ -184,6 +184,13 @@ export const asyncRouterMap = [
name: 'manageList',
component: () => import('@/views/authority/manageList'),
meta: { title: '管理员列表', keepAlive: false, permission: ['table'] }
},
{
path: '/authority/details/Manage_editor',
name: 'Manageeditor',
hidden:true,
component: () => import('@/views/authority/details/Manage_editor'),
meta: { title: '编辑管理员', keepAlive: false, permission: ['table'] }
}
]
},
......
<template>
<a-card :body-style="{ padding: '24px 32px' }" :bordered="false">
<a-form :form="form">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="姓名">
<a-input
v-decorator="['GUID', { rules: [{ required: true, message: '请输入姓名' }] }]"
name="GUID"
placeholder="请输入姓名"
/>
</a-form-item>
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="省级公司">
<a-input
v-decorator="['NAME', { rules: [{ required: true, message: '请输入省级公司' }] }]"
name="NAME"
placeholder="请输入省级公司"
/>
</a-form-item>
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="所属门店">
<a-input v-decorator="['EMPLOYEE_CODE']" name="EMPLOYEE_CODE" />
</a-form-item>
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="拥有权限" >
<a-radio-group v-model="res.ROLE_ID">
<a-radio v-for="(group, index) in grouplist" :key="index" :value="group.ID">{{ group.NAME }}</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item :wrapperCol="{ span: 24 }" style="text-align: center">
<a-button v-if="GUID" @click.stop.prevent="handleSubmit" htmlType="submit" type="primary">提交</a-button>
<a-button v-else @click.stop.prevent="handleSubmit1()" htmlType="submit" type="primary">提交</a-button>
<a-button @click="goBack" style="margin-left: 8px">返回</a-button>
</a-form-item>
</a-form>
</a-card>
</template>
<script>
import moment from 'moment'
import { getManageUserInfo, getManageGroupList } from '@/api/authority'
export default {
name: 'authority',
data() {
return {
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 12 }
},
// count: 2,
description: '表单页用于向用户收集或验证信息,基础表单常见于数据项较少的表单场景。',
// goId: 1,
GUID: '',
res:[],
grouplist: [],
// form
form: this.$form.createForm(this)
}
},
mounted() {
var id = this.$route.query.GUID
console.log(id)
// var gooId = this.$route.query.goid
// this.goId = gooId
this.GUID = id
if (id) {
getManageGroupList()
.then(res => {
console.log(res)
this.grouplist = res.info;
return getManageUserInfo(id)
})
// getManageUserInfo(id)
.then(res => {
console.log(res)
this.form.setFieldsValue(res)
this.res = res
})
.catch(err => {})
}
//获取所有权限
// getManageGroupList()
// .then(res => {
// console.log(res)
// this.grouplist = res.info
// })
// .catch(err => {})
},
methods: {
// checkboxGroup处理
checkRadio(value) {
if (value) {
return value.toString()
}
},
//time
DateCheck(value) {
if (value || value != null || value != '') {
console.log(value)
return moment(value, 'YYYY-MM-DD')
}
},
checkRadio(value) {
if (value == null || value == '') {
return '0'
} else {
return value.toString()
}
},
handleSubmit() {
console.log(validateFields)
const {
form: { validateFields }
} = this
validateFields({ force: true }, (err, values) => {
console.log(values)
if (!err) {
console.log(err)
const EminformanParams = { ...values }
addEminforman(EminformanParams)
this.$router.push({ path: '/authority/manageList' })
}
})
},
handleSubmit1() {
let guid = this.GUID
const {
form: { validateFields }
} = this
validateFields({ force: true }, (err, values) => {
if (!err) {
const EminformanModify = Object.assign({ ...values }, { GUID: guid })
if (EminformanModify.CONTACTBIRTH_DATE) {
EminformanModify.CONTACTBIRTH_DATE = EminformanModify.CONTACTBIRTH_DATE.format('YYYY-MM-DD')
}
modifyEminformanDetails(EminformanModify)
this.$router.push({ path: '/authority/manageList' })
}
})
},
goBack() {
this.$router.push({ path: '/authority/manageList' })
}
}
}
</script>
......@@ -3,7 +3,7 @@
<a-card style="margin-bottom:10px">
<div class="table-operator">
<a-button-group>
<a-button type='primary' icon='plus' @click="goEdit(1)">添加管理员</a-button>
<a-button type='primary' icon='plus' @click="goEdit()">添加管理员</a-button>
</a-button-group>
</div>
<s-table
......@@ -17,7 +17,7 @@
>
<span slot="action" slot-scope="text, record">
<template>
<a @click="handleEdit(record)">角色分配</a>
<a @click="goEdit(record.GUID)">角色分配</a>
<!-- <a-divider type="vertical" /> -->
<!-- <a-popconfirm title="是否要删除此行?" @confirm="remove(record.ID)">
<a>删除</a>
......@@ -93,8 +93,17 @@ export default {
}
},
methods: {
goEdit (GUID='') {
if(GUID){
this.$router.push({path:'/authority/details/Manage_editor',query:{GUID:GUID}})
// this.$router.push({path:'/authority/details/Manage_editor',query:{goid:1}})
}else{
console.log(value)
this.$router.push({path:'/authority/details/Manage_editor',query:{goid:0,GUID:value.GUID}})
}
},
}
}
</script>
......
......@@ -45,6 +45,7 @@
rowKey="ID"
:columns="columns"
:data="loadData"
:scroll="{ x: 1200, y:300 }"
:showPagination="pagination"
>
<span slot="action" slot-scope="text, record">
......@@ -161,11 +162,17 @@ export default {
columns: [
{
title: '菜单名称',
dataIndex: 'TITLE'
dataIndex: 'TITLE',
width:200,
key:'TITLE',
fixed:'left'
},
{
title: '节点id',
dataIndex: 'ID'
dataIndex: 'ID',
width:90,
key:'ID',
fixed:'left'
// customRender: (value, row, index) => {
// var ret = []
// // 添加icon
......@@ -184,27 +191,33 @@ export default {
},
{
title: '菜单地址',
dataIndex: 'NAME'
dataIndex: 'NAME',
width:200
},
{
title: '菜单状态',
dataIndex: 'STATUS'
dataIndex: 'STATUS',
width:150
},
{
title: '是否为菜单',
dataIndex: 'IS_MENU'
dataIndex: 'IS_MENU',
width:100
},
{
title: '是否顶部菜单',
dataIndex: 'IS_TOP_MENU'
dataIndex: 'IS_TOP_MENU',
width:100
},
{
title: '是否默认显示',
dataIndex: 'IS_DEFAULT_SHOW'
dataIndex: 'IS_DEFAULT_SHOW',
width:150
},
{
title: '描述',
dataIndex: 'REMARK'
dataIndex: 'REMARK',
width:90
},
// {
// title: '类型',
......@@ -225,11 +238,13 @@ export default {
// },
{
title: '排序',
dataIndex: 'SORT'
dataIndex: 'SORT',
width:100
},
{
title: '类型',
dataIndex: 'LEVEL'
dataIndex: 'LEVEL',
width:100
// customRender: (state, row, index) => {
// return <div>{state === 0 ? <a-tag color="cyan">显示</a-tag> : <a-tag color="red">隐藏</a-tag>}</div>
// }
......@@ -238,7 +253,8 @@ export default {
{
title: '操作',
dataIndex: 'action',
width: '150px',
fixed:'right',
width:100,
scopedSlots: { customRender: 'action' }
}
],
......
......@@ -102,7 +102,7 @@ const vueConfig = {
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
proxy: {
'/apis': {
target: 'http://localhost/dengxueyun/newshopBack/backend/web/v1/',
target: 'http://localhost/hantengfei/newShopBack1/backend/web/v1/',
ws: false,
changeOrigin: true,
pathRewrite:{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment