Commit 3a0a06f9 by 无尘

add: 增加登录接口,增加员工字段接口

parent 3cf7e635
...@@ -123,13 +123,18 @@ ...@@ -123,13 +123,18 @@
background-color: rgba(255,255,255,.1); background-color: rgba(255,255,255,.1);
} }
} }
.el-input {
.el-textarea {
/deep/ .el-textarea__inner { /deep/ .el-textarea__inner {
font-size: 12px; font-size: 12px;
color: #606266; color: #606266;
background-color: rgba(255,255,255,.1); background-color: rgba(255,255,255,.1);
resize: none; resize: none;
} }
}
.el-input {
.is-disabled{ .is-disabled{
......
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
<el-form-item label="店员可见权限"> <el-form-item label="店员可见权限">
<el-radio v-model="ruleForm.radio" label="0">可见所有品牌门店架构和行政架构</el-radio> <el-radio v-model="ruleForm.radio" label="0">可见所有品牌门店架构和行政架构</el-radio>
</el-form-item> </el-form-item>
<div class="permiss-child-cell">
<p>允许指定部门/人员可见:</p>
</div>
<el-form-item label=" "> <el-form-item label=" ">
<el-radio v-model="ruleForm.radio" label="1">可见所在品牌门店架构和行政架构</el-radio> <el-radio v-model="ruleForm.radio" label="1">可见所在品牌门店架构和行政架构</el-radio>
</el-form-item> </el-form-item>
...@@ -57,6 +61,22 @@ export default { ...@@ -57,6 +61,22 @@ export default {
ruleForm: { ruleForm: {
radio: '0', radio: '0',
visibleAll: [
{
id: '1',
type: 'people',
name: '张三',
img: 'http://thirdwx.qlogo.cn/mmopen/j7nX4OeBsXRNyvh6micCywssVEYCaWiaicUZq5Vn2zWktWLAyRvEAH7icQmUhLze8rrQYpM5ptwZ2RL7cX0icyBbiavhYFNTIZhibKu/0'
},
{
id: '1',
type: 'store',
name: '张三',
}
],
storeVisibleAll: [],
storeOwnBrand: [],
storeOwnStore: []
} }
} }
}, },
......
...@@ -34,6 +34,10 @@ ...@@ -34,6 +34,10 @@
showCustomDialog: { showCustomDialog: {
type: Boolean, type: Boolean,
default: false default: false
},
datailData: {
type: Array,
default: []
} }
}, },
data () { data () {
...@@ -173,31 +177,83 @@ ...@@ -173,31 +177,83 @@
console.log(value) console.log(value)
}, },
/** /**
* 获取已经勾选 * 保存已经勾选
*/ */
getCardList() { saveFields(type) {
const that = this const that = this;
var para = { const para = {
requestProject: that.repProjectName fields: that.checkList,
type: type,// 类型:1行政架构,2门店架构'
} }
that.axios.post(that.baseUrl+'/api-plug/get-coupon-list',qs.stringify(para))
postRequest('/haoban-manage-web/employee-show-field-detail.json',para)
.then((res) => { .then((res) => {
console.log(res,res.data,res.data.errorCode) // console.log(res,res.data,res.data.errorCode)
var resData = res.data var resData = res.data
if (resData.errorCode == 0) { if (resData.errorCode == 1) {
showMsg.showmsg('操作成功','success')
return; return;
} }
errMsg.errorMsg(resData)
})
.catch(function (error) {
console.log(error);
that.$message.error({ that.$message.error({
duration: 1000, duration: 1000,
message: resData.message message: error.message
})
});
},
/**
* 简单数组-->父子数组对象
*/
treeData(data){
let tree = data.filter((father)=>{ //循环所有项
let branchArr = data.filter((child)=>{
return father.fieldCode == child.parentCode; //返回每一项的子级数组
});
if(branchArr.length>0){
father.children = branchArr; //如果存在子级,则给父级添加一个children属性,并赋值
}
return father.parentCode == 0; //返回第一层
});
// 排序
tree.sort(function(a,b){
return a.sort - b.sort;
})
tree.forEach(function(ele,index){
ele.children.sort(function(a,b){
return a.sort - b.sort;
}) })
})
return tree;
},
/**
* 获取所有字段
*/
getAllFields() {
const that = this;
postRequest('/haoban-manage-web/record/employee-find-system-template.json',{})
.then((res) => {
// console.log(res.data)
let resData = res.data
if (resData.errorCode == 1) {
that.handleAllFields(resData.result)
return;
}
errMsg.errorMsg(resData)
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); // console.log(error);
// that.toLogin()
that.$message.error({ that.$message.error({
duration: 1000, duration: 1000,
message: error.message message: error.message
...@@ -205,6 +261,34 @@ ...@@ -205,6 +261,34 @@
}); });
}, },
/**
* 处理所有系统模板信息
*/
handleAllFields(result) {
const that = this
result.forEach(function(ele,index){
if (!!that.hasOwnProperty(ele.parentCode)) {
ele.fixed = parseInt(ele.fixed) === 1? true : false;
ele.isMust = parseInt(ele.isMust) === 1? true : false;
ele.fieldEdited = parseInt(ele.fieldEdited) === 1? true : false;
ele.systemFlag = true;
ele.fieldOperations = !!ele.fieldOperations? JSON.parse(ele.fieldOperations): {};
ele.staffRecordsIds = !!ele.staffRecordsIds? JSON.parse(ele.staffRecordsIds): [];
that[ele.parentCode].push(ele);
};
// 设置 fieldParent
if (!!that.fieldParent.hasOwnProperty(ele.fieldCode)) {
ele.children = [];
that.fieldParent[ele.fieldCode] = ele;
ele.systemFlag = true;
}
})
},
formatDate(time,flag) { formatDate(time,flag) {
const that = this const that = this
// (0-9)年月数字的显示 // (0-9)年月数字的显示
...@@ -222,9 +306,12 @@ ...@@ -222,9 +306,12 @@
watch: { watch: {
showCustomDialog: function(newData,oldData){ showCustomDialog: function(newData,oldData){
const that = this; const that = this;
console.log("新数据:",newData,oldData)
that.customDialog = newData that.customDialog = newData
}, },
datailData: function(newData,oldData){
const that = this;
that.checkList = !!newData && !!newData.length ? newData: [];
},
}, },
/* 接收数据 */ /* 接收数据 */
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="login-wrap-body"> <div class="login-wrap-body">
<div class="login-wrap-out"> <div class="login-wrap-out">
<div class="login-wrap-inner"> <div class="login-wrap-inner">
<div class="login-wrap-inner__block" v-if="canSelectFlag"> <div class="login-wrap-inner__block" v-if="!canSelectFlag">
<div class="login-wrap-inner__head">扫码登录</div> <div class="login-wrap-inner__head">扫码登录</div>
<div class="login-wrap-inner__body"> <div class="login-wrap-inner__body">
<!-- 二维码失效 --> <!-- 二维码失效 -->
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</div> </div>
</div> </div>
<!-- 选择企业 --> <!-- 选择企业 -->
<div class="login-wrap-inner__block" v-if="!canSelectFlag"> <div class="login-wrap-inner__block" v-if="canSelectFlag">
<div class="login-wrap-inner__head">选择已有企业</div> <div class="login-wrap-inner__head">选择已有企业</div>
<div class="login-wrap-inner__selectBody"> <div class="login-wrap-inner__selectBody">
<!-- <el-carousel :autoplay="false" arrow="always" height="100px"> <!-- <el-carousel :autoplay="false" arrow="always" height="100px">
...@@ -36,9 +36,12 @@ ...@@ -36,9 +36,12 @@
<!-- swiper --> <!-- swiper -->
<swiper :options="swiperOption"> <swiper :options="swiperOption">
<!-- <div class="login-wrap-inner__swiperWrap"> --> <!-- <div class="login-wrap-inner__swiperWrap"> -->
<swiper-slide v-for="item in enterpriseList" :key="item.id"> <swiper-slide v-for="item in enterpriseList" :key="item.enterpriseId" >
<img class="swiper-slide__img" :src="item.src" alt="src" /> <a :class="['swiper-cell',item.enterpriseId == enterpriseId? 'current-item': '']" @click="selectEnterprise(item.enterpriseId)">
<p class="swiper-slide__p">{{item.name}}</p> <div class="img-bg"><img class="swiper-slide__img" :src="item.logoUrl" alt="src" /></div>
<p class="swiper-slide__p">{{item.enterpriseName}}</p>
</a>
</swiper-slide> </swiper-slide>
<!-- </div> --> <!-- </div> -->
<!-- <div class="swiper-pagination" slot="pagination"></div> --> <!-- <div class="swiper-pagination" slot="pagination"></div> -->
...@@ -63,35 +66,44 @@ import 'swiper/dist/css/swiper.css' ...@@ -63,35 +66,44 @@ import 'swiper/dist/css/swiper.css'
import { swiper, swiperSlide } from 'vue-awesome-swiper' import { swiper, swiperSlide } from 'vue-awesome-swiper'
import QRCode from 'qrcodejs2' import QRCode from 'qrcodejs2'
import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
import strLength from '@/common/js/strlen';
import { _debounce,formatDate } from "@/common/js/public";
import { getRequest, postRequest, postJson, postForm } from '@/api/api';
export default { export default {
name: "login", name: "login",
data() { data() {
return { return {
qrcodeCase: '', // 二维码实例 qrcodeCase: '', // 二维码实例
qrcodeNum: '', qrcodeNum: '', // 二维码数据
enterpriseId: '', // 当前选择的 企业 id
expiredFlag: false, // 二维码过期标志 expiredFlag: false, // 二维码过期标志
canSelectFlag: true, // 能否选择企业标志 canSelectFlag: true, // 能否选择企业标志
ajaxTime: null,
// 企业列表 // 企业列表
enterpriseList:[ enterpriseList:[
{ {
id: '1231', enterpriseId : '1231',
src: require("../../assets/logo.png"), logoUrl: require("../../assets/logo.png"),
name: '达摩网络' enterpriseName: '达摩网络'
}, },
{ {
id: '1232', enterpriseId : '1232',
src: require("../../assets/logo.png"), logoUrl: require("../../assets/logo.png"),
name: '达摩网络2' enterpriseName: '达摩网络2'
}, },
{ {
id: '1233', enterpriseId : '1233',
src: require("../../assets/logo.png"), logoUrl: require("../../assets/logo.png"),
name: '达摩网络' enterpriseName: '达摩网络'
}, },
{ {
id: '1234', enterpriseId : '1234',
src: require("../../assets/logo.png"), logoUrl: require("../../assets/logo.png"),
name: '达摩网络2' enterpriseName: '达摩网络2'
} }
], ],
// swiper // swiper
...@@ -141,6 +153,14 @@ export default { ...@@ -141,6 +153,14 @@ export default {
}, },
/** /**
* 选择企业
*/
selectEnterprise(id) {
const that = this;
that.enterpriseId = id;
},
/**
* 生成二维码 * 生成二维码
*/ */
qrcode (text) { qrcode (text) {
...@@ -165,7 +185,7 @@ export default { ...@@ -165,7 +185,7 @@ export default {
const that = this; const that = this;
document.getElementById("qrcode").innerHTML = ''; document.getElementById("qrcode").innerHTML = '';
that.qrcodeCase.clear(); // 先清除原有的 that.qrcodeCase.clear(); // 先清除原有的
that.qrcode(5666315956663159) that.getQrcode()
that.expiredFlag = false; //隐藏过期遮罩层 that.expiredFlag = false; //隐藏过期遮罩层
}, },
...@@ -174,7 +194,7 @@ export default { ...@@ -174,7 +194,7 @@ export default {
*/ */
toIndex() { toIndex() {
const that = this; const that = this;
that.$router.push('/index') that.toLogin();
}, },
/** /**
...@@ -183,7 +203,8 @@ export default { ...@@ -183,7 +203,8 @@ export default {
toLogin() { toLogin() {
const that = this; const that = this;
let para = { let para = {
qrcode: that.qrcodeNum qrcode: that.qrcodeNum,
enterpriseId: that.enterpriseId
} }
postRequest('/haoban-manage-web/login',para) postRequest('/haoban-manage-web/login',para)
.then((res) => { .then((res) => {
...@@ -191,6 +212,7 @@ export default { ...@@ -191,6 +212,7 @@ export default {
var resData = res.data var resData = res.data
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
// showMsg.showmsg('保存成功','success') // showMsg.showmsg('保存成功','success')
that.$router.push('/index')
return; return;
} }
errMsg.errorMsg(resData) errMsg.errorMsg(resData)
...@@ -213,12 +235,17 @@ export default { ...@@ -213,12 +235,17 @@ export default {
let para = { let para = {
qrcode: that.qrcodeNum qrcode: that.qrcodeNum
} }
postRequest('/haoban-manage-web/login-qrcode',para) postRequest('/haoban-manage-web/login-check',para)
.then((res) => { .then((res) => {
console.log( res.data) console.log( res.data)
var resData = res.data var resData = res.data
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
// showMsg.showmsg('保存成功','success') // showMsg.showmsg('保存成功','success')
if (!!resData.data && !!resData.data.length) {
that.enterpriseList = resData.data;
that.canSelectFlag = true
}
return; return;
} }
errMsg.errorMsg(resData) errMsg.errorMsg(resData)
...@@ -233,6 +260,14 @@ export default { ...@@ -233,6 +260,14 @@ export default {
}); });
}, },
checkScan() {
const that = this
that.ajaxTime = null;
that.ajaxTime = setInterval(function() {
that.checkLogin()
},5000)
},
/** /**
* 登录---获取二维码字符串 API * 登录---获取二维码字符串 API
*/ */
...@@ -245,6 +280,8 @@ export default { ...@@ -245,6 +280,8 @@ export default {
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
// showMsg.showmsg('保存成功','success') // showMsg.showmsg('保存成功','success')
that.qrcodeNum = resData.qrcode; that.qrcodeNum = resData.qrcode;
that.qrcode(that.qrcodeNum)
that.checkScan()
return; return;
} }
errMsg.errorMsg(resData) errMsg.errorMsg(resData)
...@@ -262,12 +299,12 @@ export default { ...@@ -262,12 +299,12 @@ export default {
}, },
mounted() { mounted() {
const that = this const that = this
that.getQrcode()
/** /**
*生成二维码 *生成二维码
*/ */
that.qrcode(55555566767) // that.qrcode(55555566767)
}, },
components: { components: {
swiper, swiper,
...@@ -366,6 +403,7 @@ export default { ...@@ -366,6 +403,7 @@ export default {
#qrcode { #qrcode {
width: 210px; width: 210px;
height: 210px;
margin: 0 auto; margin: 0 auto;
} }
} }
...@@ -410,6 +448,30 @@ export default { ...@@ -410,6 +448,30 @@ export default {
&__swiper { &__swiper {
margin-top: 30px; margin-top: 30px;
.swiper-cell {
display: block;
-webkit-transform: scale(0.8);
-moz-transform: scale(0.8);
transform: scale(0.8);
cursor: pointer;
.img-bg {
padding: 8px 5px;
background: rgba(237,237,238,1);
border-radius: 8px;
text-align: center;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
&.current-item {
-webkit-transform: scale(1);
-moz-transform: scale(1);
transform: scale(1);
}
}
.swiper-slide { .swiper-slide {
&__img { &__img {
width: 72px; width: 72px;
...@@ -424,7 +486,7 @@ export default { ...@@ -424,7 +486,7 @@ export default {
} }
.swiper-button-prev { .swiper-button-prev {
height: 97px; height: 97px;
margin-top: -55px; margin-top: -61px;
left: 0; left: 0;
padding-top: 55px; padding-top: 55px;
background: #fff; background: #fff;
...@@ -436,7 +498,7 @@ export default { ...@@ -436,7 +498,7 @@ export default {
} }
.swiper-button-next { .swiper-button-next {
height: 97px; height: 97px;
margin-top: -55px; margin-top: -61px;
right: 0; right: 0;
padding-top: 55px; padding-top: 55px;
background: #fff; background: #fff;
......
...@@ -217,13 +217,13 @@ export default { ...@@ -217,13 +217,13 @@ export default {
// info // info
applyInfo: { applyInfo: {
photo: '', // photo: '',
applyName: '测试的', // applyName: '测试的',
sex: 2, // sex: 2,
code: '223344545fffffffffffffff4', // code: '223344545fffffffffffffff4',
phone: '13012343333', // phone: '13012343333',
job: '店长', // job: '店长',
store: '测试门店' // store: '测试门店'
}, },
// store // store
...@@ -333,7 +333,7 @@ export default { ...@@ -333,7 +333,7 @@ export default {
*/ */
getTableList(val) { getTableList(val) {
const that = this const that = this
const para = { let para = {
auditingType: '', auditingType: '',
auditingStatus: that.filterValue, auditingStatus: that.filterValue,
search: that.searchValue || '', // 搜索字段 search: that.searchValue || '', // 搜索字段
......
...@@ -333,7 +333,7 @@ export default { ...@@ -333,7 +333,7 @@ export default {
postApprove(ids) { postApprove(ids) {
const that = this; const that = this;
const para = { let para = {
enterpriseAuditingId: ids enterpriseAuditingId: ids
} }
...@@ -363,7 +363,7 @@ export default { ...@@ -363,7 +363,7 @@ export default {
postAllApprove(ids) { postAllApprove(ids) {
const that = this; const that = this;
const para = { let para = {
enterpriseAuditingIds: ids enterpriseAuditingIds: ids
} }
...@@ -407,7 +407,7 @@ export default { ...@@ -407,7 +407,7 @@ export default {
postRefuse() { postRefuse() {
const that = this; const that = this;
const para = { let para = {
enterpriseAuditingId: that.selectId, enterpriseAuditingId: that.selectId,
refuseReason: that.ruleForm.refuseReason refuseReason: that.ruleForm.refuseReason
} }
...@@ -457,7 +457,7 @@ export default { ...@@ -457,7 +457,7 @@ export default {
*/ */
getTableList(val) { getTableList(val) {
const that = this; const that = this;
const para = { let para = {
auditingType: that.filterValue, auditingType: that.filterValue,
auditingStatus: '0', auditingStatus: '0',
search: '', // 搜索字段 search: '', // 搜索字段
......
...@@ -99,6 +99,13 @@ export default { ...@@ -99,6 +99,13 @@ export default {
}, },
methods: { methods: {
/** /**
* 路由跳转
*/
changeRoute(route) {
this.$router.push(route);
},
/**
* 保存 * 保存
*/ */
submitForm: _debounce(function(formName) { submitForm: _debounce(function(formName) {
...@@ -118,7 +125,31 @@ export default { ...@@ -118,7 +125,31 @@ export default {
*/ */
postSave() { postSave() {
const that = this; const that = this;
let para = {
}
postRequest('/haoban-manage-web/',para)
.then((res) => {
// console.log(res,res.data,res.data.errorCode)
var resData = res.data
if (resData.errorCode == 1) {
showMsg.showmsg('操作成功','success')
return;
}
errMsg.errorMsg(resData)
})
.catch(function (error) {
console.log(error);
that.$message.error({
duration: 1000,
message: error.message
})
});
}, },
/** /**
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<!-- <el-input v-model="ruleForm.name" disabled placeholder="" class="w-380"></el-input> --> <!-- <el-input v-model="ruleForm.name" disabled placeholder="" class="w-380"></el-input> -->
<limitInput <limitInput
:inputWidth="500" :inputWidth="500"
:inputValue.sync="ruleForm.name" :inputValue.sync="ruleForm.roleName"
:holder="'请输入角色名称'" :holder="'请输入角色名称'"
:maxLength="20"> :maxLength="20">
</limitInput> </limitInput>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<el-form-item label="角色说明" prop="" class=""> <el-form-item label="角色说明" prop="" class="">
<limitTextarea <limitTextarea
:inputWidth="500" :inputWidth="500"
:inputValue.sync="ruleForm.name" :inputValue.sync="ruleForm.remark"
:holder="'请输入角色说明'" :holder="'请输入角色说明'"
:maxLength="50"> :maxLength="50">
</limitTextarea> </limitTextarea>
...@@ -95,7 +95,9 @@ export default { ...@@ -95,7 +95,9 @@ export default {
], ],
ruleForm: { ruleForm: {
name: '企业管理员', roleId: '',
roleName: '企业管理员',
remark: '角色说明',
leftChecked: [], leftChecked: [],
left: [ left: [
{ {
...@@ -187,7 +189,69 @@ export default { ...@@ -187,7 +189,69 @@ export default {
*/ */
postSave() { postSave() {
const that = this; const that = this;
const para = {
data: '',
roleId: that.ruleForm.roleId,
roleName: that.ruleForm.roleName,
remark: that.ruleForm.remark
}
postRequest('/haoban-manage-web/save-role',para)
.then((res) => {
// console.log(res,res.data,res.data.errorCode)
var resData = res.data
if (resData.errorCode == 1) {
showMsg.showmsg('操作成功','success')
return;
}
errMsg.errorMsg(resData)
})
.catch(function (error) {
console.log(error);
that.$message.error({
duration: 1000,
message: error.message
})
});
},
/**
* 获取角色详情
*/
getRoleDetail(roleId) {
const that = this;
const para = {
roleId: roleId
}
postRequest('/haoban-manage-web/role-detail',para)
.then((res) => {
// console.log(res,res.data,res.data.errorCode)
var resData = res.data
if (resData.errorCode == 1) {
// showMsg.showmsg('操作成功','success')
that.ruleForm.roleId = resData.data.role.roleId;
that.ruleForm.roleName = resData.data.role.roleName;
that.ruleForm.roleCode = resData.data.role.roleCode;
that.ruleForm.remark = resData.data.role.remark;
return;
}
errMsg.errorMsg(resData)
})
.catch(function (error) {
console.log(error);
that.$message.error({
duration: 1000,
message: error.message
})
});
}, },
/** /**
...@@ -219,6 +283,11 @@ export default { ...@@ -219,6 +283,11 @@ export default {
}, },
}, },
mounted() { mounted() {
const that = this
console.log(that.$router.query)
if (that.$router.query.roleId) {
that.ruleForm.roleId = that.$router.query.roleId;
}
}, },
components: { components: {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="right-box"> <div class="right-box">
<div class="setChildAdmin-wrap-body flex"> <div class="setChildAdmin-wrap-body flex">
<div class="setChildAdmin-wrap-left w-260" :style="{height: boxHeight}"> <div class="setChildAdmin-wrap-left w-260" :style="{height: boxHeight}">
<div class="text-center"><el-button>新增管理员角色</el-button></div> <div class="text-center"><el-button @click="changeRoute('/addAdminrole')">新增管理员角色</el-button></div>
<div class="m-t-20"> <div class="m-t-20">
<ul> <ul>
<li v-for="(item,index) in adminRole" :key="index" :class="['role-cell',item.id == activeId? 'role-active':'']" @click.stop="selectRole(item.id)"><i class="iconfont icon-lizhi p-r-6"></i>{{item.name}}</li> <li v-for="(item,index) in adminRole" :key="index" :class="['role-cell',item.id == activeId? 'role-active':'']" @click.stop="selectRole(item.id)"><i class="iconfont icon-lizhi p-r-6"></i>{{item.name}}</li>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</div> </div>
<div class="setChildAdmin-wrap-right box-sizing"> <div class="setChildAdmin-wrap-right box-sizing">
<div class="role-title flex flex-between"> <div class="role-title flex flex-between">
<span class="font-20 color-303133">{{roleRightObj.name}}</span><span class="font-14 color-1890ff" v-if="roleRightObj.auth==0">查看权限</span><span class="font-14 color-1890ff" v-if="roleRightObj.auth==1">编辑权限</span> <span class="font-20 color-303133">{{roleRightObj.name}}</span><span class="font-14 color-1890ff pinter" v-if="roleRightObj.auth==0" @click="toRoleDetail">查看权限</span><span class="font-14 color-1890ff pinter" v-if="roleRightObj.auth==1" @click="toRoleDetail">编辑权限</span>
</div> </div>
<div class="role-tip m-t-27 m-b-25"> <div class="role-tip m-t-27 m-b-25">
<el-alert <el-alert
...@@ -124,6 +124,15 @@ export default { ...@@ -124,6 +124,15 @@ export default {
changeRoute(path) { changeRoute(path) {
this.$router.push(path) this.$router.push(path)
}, },
/**
* role 详情
*/
toRoleDetail() {
const that = this;
that.changeRoute(`/addAdminrole?roleId=${that.activeId}`)
},
/** /**
* 选择 role * 选择 role
*/ */
...@@ -182,6 +191,10 @@ export default { ...@@ -182,6 +191,10 @@ export default {
vertical-align: middle; vertical-align: middle;
} }
.pinter {
cursor: pointer;
}
/* flex */ /* flex */
.flex { .flex {
display: -webkit-box; display: -webkit-box;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<template v-for="(item,index) in adminStruct.defineList"> <template v-for="(item,index) in adminStruct.defineList">
<el-tag class="staffDetails-cell-btn">{{item.name}} <i class="el-icon-circle-close" @click.stop="delField(index,item,adminStruct.defineList)"></i></el-tag> <el-tag class="staffDetails-cell-btn">{{item.name}} <i class="el-icon-circle-close" @click.stop="delField(index,item,adminStruct.defineList)"></i></el-tag>
</template> </template>
<el-button class="el-tag m-l-8 staffDetails-cell-btn" @click.stop="showDialogLayer('admin')"><i class="el-icon-plus"></i>添加字段</el-button> <el-button class="el-tag m-l-8 staffDetails-cell-btn" @click.stop="showDialogLayer(1)"><i class="el-icon-plus"></i>添加字段</el-button>
</div> </div>
</div> </div>
<div class="staffDetails-cell"> <div class="staffDetails-cell">
...@@ -28,14 +28,14 @@ ...@@ -28,14 +28,14 @@
<template v-for="(item,index) in storeStruct.defineList"> <template v-for="(item,index) in storeStruct.defineList">
<el-tag class="staffDetails-cell-btn">{{item.name}} <i class="el-icon-circle-close" @click.stop="delField(index,item,storeStruct.defineList)"></i></el-tag> <el-tag class="staffDetails-cell-btn">{{item.name}} <i class="el-icon-circle-close" @click.stop="delField(index,item,storeStruct.defineList)"></i></el-tag>
</template> </template>
<el-button class="el-tag m-l-8 staffDetails-cell-btn" @click.stop="showDialogLayer('store')"><i class="el-icon-plus"></i>添加字段</el-button> <el-button class="el-tag m-l-8 staffDetails-cell-btn" @click.stop="showDialogLayer(2)"><i class="el-icon-plus"></i>添加字段</el-button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<vue-gic-footer></vue-gic-footer> <vue-gic-footer></vue-gic-footer>
<!-- 自定义字段 --> <!-- 自定义字段 -->
<staff-detail-field :showCustomDialog="showCustomDialog" @customHandleConfirm="customHandleConfirm"></staff-detail-field> <staff-detail-field :datailData="datailData" :showCustomDialog="showCustomDialog" @customHandleConfirm="customHandleConfirm"></staff-detail-field>
</div> </div>
</template> </template>
<script> <script>
...@@ -167,6 +167,7 @@ export default { ...@@ -167,6 +167,7 @@ export default {
}, },
showCustomDialog: false, // 自定义弹框显示标志 showCustomDialog: false, // 自定义弹框显示标志
datailData: [], // '类型:1行政架构,2门店架构'
} }
}, },
computed: { computed: {
...@@ -176,9 +177,10 @@ export default { ...@@ -176,9 +177,10 @@ export default {
/** /**
* 自定义弹窗显示事件 * 自定义弹窗显示事件
*/ */
showDialogLayer() { showDialogLayer(type) {
const that = this const that = this
that.showCustomDialog = true; that.showCustomDialog = true;
that.detailType = type;
console.log(1) console.log(1)
}, },
...@@ -203,6 +205,38 @@ export default { ...@@ -203,6 +205,38 @@ export default {
}).catch(() => { }).catch(() => {
}); });
},
/**
* 获取已经选择的字段
*/
getSaveFields(type) {
const that = this;
const para = {
type: type,// 类型:1行政架构,2门店架构'
}
postRequest('/haoban-manage-web/employee-show-field-detail.json',para)
.then((res) => {
// console.log(res,res.data,res.data.errorCode)
var resData = res.data
if (resData.errorCode == 1) {
showMsg.showmsg('操作成功','success')
return;
}
errMsg.errorMsg(resData)
})
.catch(function (error) {
console.log(error);
that.$message.error({
duration: 1000,
message: error.message
})
});
} }
}, },
mounted() { mounted() {
......
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