Commit f4a28d4c authored by liudong1993's avatar liudong1993

1

parent cc999715
...@@ -49,7 +49,8 @@ module.exports = function(ctx) { ...@@ -49,7 +49,8 @@ module.exports = function(ctx) {
env: ctx.dev ? { env: ctx.dev ? {
//http://192.168.1.27:8300/api //http://192.168.1.27:8300/api
//https://localhost:5001/api //https://localhost:5001/api
API: 'http://192.168.1.27:8300/api' // API: 'http://192.168.1.27:8300/api'
API:'http://192.168.1.48:8017/api'
} : { } : {
API: 'https://prod.api.com' API: 'https://prod.api.com'
}, },
...@@ -147,6 +148,7 @@ module.exports = function(ctx) { ...@@ -147,6 +148,7 @@ module.exports = function(ctx) {
'QCheckbox', 'QCheckbox',
'QTree', 'QTree',
'QOptionGroup', 'QOptionGroup',
'QRadio'
], ],
// directives: [], // directives: [],
......
...@@ -12,7 +12,7 @@ export default { ...@@ -12,7 +12,7 @@ export default {
<style> <style>
@import url('~assets/css/font.css'); @import url('~assets/css/font.css');
@import url('//at.alicdn.com/t/font_2077629_q3ogqen6wec.css'); @import url('//at.alicdn.com/t/font_2077629_32amtmfykbo.css');
html, html,
body, body,
......
...@@ -298,3 +298,15 @@ export function SetRolePermission(data) { ...@@ -298,3 +298,15 @@ export function SetRolePermission(data) {
data data
}) })
} }
/**
* 获取短信配置发送状态下拉
*/
export function getConfigStatus(data) {
return request({
url: '/Public/GetStoreTypeEnumList',
method: 'post',
data
});
}
import request from '../../utils/request' import request from '../../utils/request'
/** /**
* 获取部门分页列表 * 获取短信流水分页列表
*/ */
export function getDeptPage(data) { export function getMsgPage(data) {
return request({ return request({
url: '/User/GetDeptPageList', url: '/Msg/GetMsgLogPageList',
method: 'post', method: 'post',
data data
}); });
} }
/** /**
* 获取部门列表 * 获取短信配置分页列表
*/ */
export function getDeptList(data) { export function getConfigPage(data) {
return request({ return request({
url: '/User/GetDeptList', url: '/Msg/GetMsgBasePageList',
method: 'post', method: 'post',
data data
}); });
} }
/** /**
* 获取部门树形列表 * 新增修改短信配置
*/ */
export function getDeptTree(data) { export function EditMsgConfig(data) {
return request({ return request({
url: '/User/GetDeptTree', url: '/Msg/SetMsgBase',
method: 'post', method: 'post',
data data
}); });
} }
/** /**
* 获取组织机构图 * 根据ID获取配置信息
*/ */
export function getOrganizationChart(data) { export function GetMsgBaseList(data) {
return request({ return request({
url: '/User/GetOrganizationChart', url: '/Msg/GetMsgBaseList',
method: 'post', method: 'post',
data data
}); });
} }
/** /**
* 新增修改部门信息 * 获取短信设置列表
*/ */
export function saveDeptInfo(data) { export function GetMsgBaseTemplatePageList(data) {
return request({ return request({
url: '/User/SetDept', url: '/Msg/GetMsgBaseTemplatePageList',
method: 'post', method: 'post',
data data
}); });
} }
/** /**
* 获取部门信息 * 获取短信设置模板类型
*/ */
export function getDeptInfo(data) { export function GetBaseTemplateTypeEnumList(data) {
return request({ return request({
url: '/User/GetDept', url: '/Msg/GetBaseTemplateTypeEnumList',
method: 'post', method: 'post',
data data
}); });
} }
/** /**
* 设置部门状态 * 短信设置 保存数据
*/ */
export function setDeptStatusInfo(data) { export function SetMsgBaseTemplate(data) {
return request({ return request({
url: '/User/RemoveDept', url: '/Msg/SetMsgBaseTemplate',
method: 'post', method: 'post',
data data
}); });
} }
import request from '../../utils/request'
/**
* 获取文件站点配置列表
*/
export function getSiteConfig(data) {
return request({
url: '/Public/GetFileStoreList',
method: 'post',
data
});
}
/**
* 文件站点配置新增修改
*/
export function setSiteConfig(data) {
return request({
url: '/Public/AddOrUpdateFileStore',
method: 'post',
data
});
}
<template>
<q-select filled stack-label
:option-value="optionValue"
:option-label="optionLabel"
v-model="vdata_model"
ref="DeptTier"
:options="newData"
:label="label"
:class="classStr"
:dense ='densetype'
:reactive-rules = 'reactiveRules'
emit-value
map-options
clearable
:use-input="useInput"
@input="resetSearch"
@filter="filterFn"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</template>
<script>
export default {
name: "select-search",
props: {
//样式字符串
classStr: {
type: String,
default: ''
},
//选中数据
vModel:{
type: String,
default: ''
},
//下拉的数据
Data: {
type: Array,
default: []
},
//是否紧凑
densetype:{
type: Boolean,
default: false
},
//是否能输入
useInput:{
type: Boolean,
default: false
},
//是否验证
reactiveRules:{
type: Boolean,
default: false
},
//选项的值
optionValue: {
type: String,
default: ''
},
//选项的标签
optionLabel: {
type: String,
default: ''
},
//名称
label:{
type: String,
default: ''
},
//指定的下拉 当前是那个下啦模块
type:{
type: String,
default: ''
}
},
data(){
return{
vdata_model:'',
newData:[]
}
},
created(){
this.vdata_model = this.vModel.toString();//赋值
this.newData = this.Data
},
methods:{
resetSearch(){
let data= this.vdata_model!=null ? this.vdata_model.toString():'';
this.$emit('returnData',data ,this.type);
},
filterFn(val, update) {
update(() => {
let Name = this.optionLabel
if (val === '') {
this.newData = JSON.parse(JSON.stringify(this.Data))
} else {
const needle = val.toLowerCase()
let that = this
that.newData=[]
that.newData = that.Data.filter(v => v[Name].indexOf(needle) > -1)
}
})
},
}
}
</script>
<style scoped>
</style>
...@@ -7,9 +7,25 @@ ...@@ -7,9 +7,25 @@
<q-card-section class="q-pt-none scroll" style="max-height: 70vh"> <q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="text-caption q-mb-lg q-px-md text-grey-6">部门信息</div> <div class="text-caption q-mb-lg q-px-md text-grey-6">部门信息</div>
<div class="row wrap"> <div class="row wrap">
<q-select filled stack-label option-value="SId" option-label="SName" v-model="objOption.School_Id" <!-- <q-select filled stack-label option-value="SId" option-label="SName" v-model="objOption.School_Id"-->
ref="School_Id" :options="schoolList" label="所属校区" :dense="false" class="col-6 q-pr-lg q-pb-lg" emit-value <!-- ref="School_Id" :options="schoolList" label="所属校区" :dense="false" class="col-6 q-pr-lg q-pb-lg" emit-value-->
map-options :rules="[val => !!val || '请选择所属校区']" /> <!-- map-options />-->
<div class="col-6">
<selectSearch
classStr="col-12 q-pr-lg q-pb-lg"
:Data='schoolList'
optionValue="SId"
optionLabel="SName"
:densetype="false"
:vModel="objOption.School_Id"
label="所属校区"
@returnData="returnData"
:useInput="true"
:reactiveRules="false"
type="1"
>
</selectSearch>
</div>
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.DeptName" ref="DeptName" <q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.DeptName" ref="DeptName"
class="col-6 q-pr-lg q-pb-lg" label="部门名称" :rules="[val => !!val || '请填写部门名称']" /> class="col-6 q-pr-lg q-pb-lg" label="部门名称" :rules="[val => !!val || '请填写部门名称']" />
<q-select filled stack-label option-value="value" option-label="label" v-model="objOption.DeptTier" <q-select filled stack-label option-value="value" option-label="label" v-model="objOption.DeptTier"
...@@ -52,6 +68,8 @@ ...@@ -52,6 +68,8 @@
<script> <script>
import selectTree from '../common/select-tree' import selectTree from '../common/select-tree'
import selectSearch from '../../components/common/select-search'
import { import {
getDeptTree, getDeptTree,
saveDeptInfo, saveDeptInfo,
...@@ -74,7 +92,8 @@ ...@@ -74,7 +92,8 @@
} }
}, },
components: { components: {
selectTree selectTree,
selectSearch
}, },
data() { data() {
return { return {
...@@ -86,7 +105,7 @@ ...@@ -86,7 +105,7 @@
DeptTel: "", //部门联系电话 DeptTel: "", //部门联系电话
ManagerIds: "", //部门负责人编号 ManagerIds: "", //部门负责人编号
Status: 0, //状态(0-正常,1-禁用), Status: 0, //状态(0-正常,1-禁用),
School_Id: 0, //校区编号 School_Id: '', //校区编号
DeptTier: 0, //部门层级 DeptTier: 0, //部门层级
DeptSort: 0, //部门排序 DeptSort: 0, //部门排序
}, },
...@@ -193,7 +212,7 @@ ...@@ -193,7 +212,7 @@
this.objOption.Status = 0; this.objOption.Status = 0;
this.objOption.DeptSort = 0; this.objOption.DeptSort = 0;
this.objOption.DeptTier = 0; this.objOption.DeptTier = 0;
this.objOption.School_Id = 0; this.objOption.School_Id = '';
this.tempManager = []; this.tempManager = [];
} }
}, },
...@@ -232,6 +251,12 @@ ...@@ -232,6 +251,12 @@
}).catch(() => { }).catch(() => {
this.saveLoading = false this.saveLoading = false
}) })
},
returnData(data,type){
if(type==1){
this.objOption.School_Id = data;
}
} }
}, },
} }
......
...@@ -39,6 +39,10 @@ ...@@ -39,6 +39,10 @@
saveObj: { saveObj: {
type: Object, type: Object,
default: null default: null
},
paramObj:{
type:Number,
default:0
} }
}, },
data() { data() {
...@@ -46,7 +50,7 @@ ...@@ -46,7 +50,7 @@
persistent: true, persistent: true,
objOption: { objOption: {
Id: 0, //主键编号 Id: 0, //主键编号
Menu_Id: 0, //菜单编号 MenuId: 0, //菜单编号
FunctionName: "", //权限名称 FunctionName: "", //权限名称
FunctionCode: "", //权限编号 FunctionCode: "", //权限编号
Remarks: "", //权限备注 Remarks: "", //权限备注
...@@ -67,7 +71,7 @@ ...@@ -67,7 +71,7 @@
Id: this.saveObj.Id Id: this.saveObj.Id
}).then(res => { }).then(res => {
this.objOption.Id = res.Data.Id; this.objOption.Id = res.Data.Id;
this.objOption.Menu_Id = res.Data.Menu_Id; this.objOption.MenuId = res.Data.MenuId;
this.objOption.FunctionName = res.Data.FunctionName; this.objOption.FunctionName = res.Data.FunctionName;
this.objOption.FunctionCode = res.Data.FunctionCode; this.objOption.FunctionCode = res.Data.FunctionCode;
this.objOption.Remarks = res.Data.Remarks; this.objOption.Remarks = res.Data.Remarks;
...@@ -77,7 +81,7 @@ ...@@ -77,7 +81,7 @@
} else { } else {
this.optionTitle = "新增菜单功能权限" this.optionTitle = "新增菜单功能权限"
this.objOption.Id = 0; this.objOption.Id = 0;
this.objOption.Menu_Id = 0; this.objOption.MenuId = this.paramObj;
this.objOption.FunctionName = ""; this.objOption.FunctionName = "";
this.objOption.FunctionCode = ""; this.objOption.FunctionCode = "";
this.objOption.Remarks = ""; this.objOption.Remarks = "";
......
<style>
.post-form .tranbox .el-transfer-panel{
width: 300px;
}
.post-form .tranbox .el-button{
padding: 7px 10px;
}
</style>
<template> <template>
<q-dialog v-model="persistent" persistent transition-show="scale" transition-hide="scale"> <q-dialog v-model="persistent" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 800px;max-width:900px;"> <q-card style="width: 800px;max-width:900px;" class="post-form">
<q-card-section> <q-card-section>
<div class="text-h6">{{objOption.MenuId==0?'新增岗位信息':'修改岗位信息'}}</div> <div class="text-h6">{{objOption.MenuId==0?'新增岗位信息':'修改岗位信息'}}</div>
</q-card-section> </q-card-section>
...@@ -18,6 +26,21 @@ ...@@ -18,6 +26,21 @@
<div class="text-grey-6 text-caption">注意:关闭后,岗位将无法正常使用.</div> <div class="text-grey-6 text-caption">注意:关闭后,岗位将无法正常使用.</div>
</div> </div>
</div> </div>
<div class="text-caption q-mb-lg q-px-md text-grey-6">绑定角色</div>
<div class="row wrap tranbox" >
<template>
<el-transfer
filterable
:filter-method="filterMethod"
filter-placeholder="请输入城市拼音"
:props="{key: 'RoleId',label: 'RoleName'}"
v-model="value"
:titles="['可选角色', '已选角色']"
:data="data">
</el-transfer>
</template>
</div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
...@@ -39,6 +62,11 @@ ...@@ -39,6 +62,11 @@
savePostInfo savePostInfo
} }
from '../../api/system/post' from '../../api/system/post'
//角色相关
import {
queryRoleDropdown
}
from '../../api/system/index'
export default { export default {
props: { props: {
saveObj: { saveObj: {
...@@ -57,22 +85,36 @@ ...@@ -57,22 +85,36 @@
PostName: "", //岗位名称 PostName: "", //岗位名称
RB_Dept_Id: 0, //所属部门 RB_Dept_Id: 0, //所属部门
Status: 0, //状态(0-正常,1-禁用), Status: 0, //状态(0-正常,1-禁用),
PostRoleList: [], //岗位角色列表
}, },
optionTitle: "", optionTitle: "",
returnString: [], returnString: [],
//岗位树形列表 //岗位树形列表
DeptTreeList: [], DeptTreeList: [],
saveLoading: false, saveLoading: false,
PersionList: [], RoleList: [], //角色列表
data: [],
value: [],
filterMethod(query, item) {//根据名称搜索
return item.RoleName.indexOf(query) > -1;
}
} }
}, },
created() { created() {
this.getRoleList();
this.queryDeptTree(); this.queryDeptTree();
}, },
mounted() { mounted() {
this.initObj() this.initObj()
}, },
methods: { methods: {
//获取角色列表
getRoleList() {
queryRoleDropdown({}).then(res => {
this.RoleList = res.Data;
this.data = res.Data;
})
},
getChild(menuArray) { getChild(menuArray) {
var tempStr = ""; var tempStr = "";
if (menuArray && menuArray != '') { if (menuArray && menuArray != '') {
...@@ -99,6 +141,12 @@ ...@@ -99,6 +141,12 @@
this.returnString.push(this.objOption.RB_Dept_Id); this.returnString.push(this.objOption.RB_Dept_Id);
this.objOption.PostName = res.Data.PostName; this.objOption.PostName = res.Data.PostName;
this.objOption.Status = res.Data.Status; this.objOption.Status = res.Data.Status;
if(res.Data.PostRoleList.length>0){
res.Data.PostRoleList.forEach(x=>{
this.value.push(x.RoleId)
})
}
}) })
this.optionTitle = "修改岗位信息" this.optionTitle = "修改岗位信息"
} else { } else {
...@@ -109,6 +157,7 @@ ...@@ -109,6 +157,7 @@
this.objOption.Status = 0; this.objOption.Status = 0;
} }
}, },
//关闭弹窗 //关闭弹窗
closeSaveForm() { closeSaveForm() {
this.$emit('close') this.$emit('close')
...@@ -116,7 +165,18 @@ ...@@ -116,7 +165,18 @@
}, },
//保存岗位 //保存岗位
savePost() { savePost() {
this.saveLoading = true var tempRole = [];
if (this.RoleList && this.RoleList.length > 0) {
this.RoleList.forEach(x => {
this.value.forEach(j=>{
if(x.RoleId==j){
tempRole.push(x)
}
})
})
}
this.objOption.PostRoleList=tempRole;
this.saveLoading = true;
savePostInfo(this.objOption).then(res => { savePostInfo(this.objOption).then(res => {
this.saveLoading = false this.saveLoading = false
this.$q.notify({ this.$q.notify({
......
...@@ -17,29 +17,38 @@ ...@@ -17,29 +17,38 @@
font-size: 12px; font-size: 12px;
white-space: nowrap; white-space: nowrap;
} }
.role-form .role_TreeList{
height:250px;
.role-form .role_TreeList {
height: 250px;
overflow: auto; overflow: auto;
} }
.role-form .role_TreeList::-webkit-scrollbar { .role-form li{
width: 3px; list-style-type:none
height: 3px;
background-color: #F5F5F5;
} }
.role_TreeList ul{
/*定义滚动条轨道 内阴影+圆角*/ margin-left: 10px;
.role-form .role_TreeList::-webkit-scrollbar-track { padding: 0;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
border-radius: 10px;
background-color: #F5F5F5;
} }
/*.role-form .role_TreeList::-webkit-scrollbar {*/
/* width: 3px;*/
/* height: 3px;*/
/* background-color: #F5F5F5;*/
/*}*/
/*定义滑块 内阴影+圆角*/ /*!*定义滚动条轨道 内阴影+圆角*!*/
.role-form .role_TreeList::-webkit-scrollbar-thumb { /*.role-form .role_TreeList::-webkit-scrollbar-track {*/
border-radius: 10px; /* -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);*/
-webkit-box-shadow: -webkit-gradient(linear, 0 0, 0 100%, color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.5, transparent), to(transparent)); /* border-radius: 10px;*/
background-color: #0ae; /* background-color: #F5F5F5;*/
} /*}*/
/*!*定义滑块 内阴影+圆角*!*/
/*.role-form .role_TreeList::-webkit-scrollbar-thumb {*/
/* border-radius: 10px;*/
/* -webkit-box-shadow: -webkit-gradient(linear, 0 0, 0 100%, color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.5, transparent), to(transparent));*/
/* background-color: #0ae;*/
/*}*/
.role-form .role_MenuList span { .role-form .role_MenuList span {
...@@ -50,6 +59,9 @@ ...@@ -50,6 +59,9 @@
line-height: 38px; line-height: 38px;
cursor: pointer; cursor: pointer;
} }
.role-form .q-checkbox--dense span{
width: 0px;
}
.role-form .checkedRole { .role-form .checkedRole {
background-color: #2961FE; background-color: #2961FE;
...@@ -65,6 +77,7 @@ ...@@ -65,6 +77,7 @@
border-radius: 4px; border-radius: 4px;
overflow: auto; overflow: auto;
} }
.role-form .role_ItemList::-webkit-scrollbar { .role-form .role_ItemList::-webkit-scrollbar {
width: 3px; width: 3px;
height: 6px; height: 6px;
...@@ -111,7 +124,7 @@ ...@@ -111,7 +124,7 @@
width: 100%; width: 100%;
height: 40px; height: 40px;
background-color: #3fc4ff; background-color: #3fc4ff;
padding:0 10px 0 20px; padding: 0 10px 0 20px;
display: flex; display: flex;
align-items: center; align-items: center;
color: #fff; color: #fff;
...@@ -122,11 +135,13 @@ ...@@ -122,11 +135,13 @@
margin: 20px 0; margin: 20px 0;
white-space: nowrap; white-space: nowrap;
overflow: auto; overflow: auto;
padding-bottom:20px; padding-bottom: 20px;
} }
.role-form .role_textarea .q-field__control-container{
height:85px; .role-form .role_textarea .q-field__control-container {
height: 85px;
} }
</style> </style>
<template> <template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale"> <q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
...@@ -143,7 +158,8 @@ ...@@ -143,7 +158,8 @@
</div> </div>
</div> </div>
<div class="row wrap role_textarea"> <div class="row wrap role_textarea">
<q-input filled v-model="objOption.RoleIntro" class="col-12 row-2" maxlength="100" label="角色介绍" type="textarea" /> <q-input filled v-model="objOption.RoleIntro" class="col-12 row-2" maxlength="100" label="角色介绍"
type="textarea" />
<div class="col-12 q-pr-lg q-pb-lg q-pt-lg"> <div class="col-12 q-pr-lg q-pb-lg q-pt-lg">
<q-toggle size="md" label="状态" color="primary" :false-value="1" :true-value="0" v-model="objOption.Status" <q-toggle size="md" label="状态" color="primary" :false-value="1" :true-value="0" v-model="objOption.Status"
title="注意:关闭后,角色将无法正常使用." /> title="注意:关闭后,角色将无法正常使用." />
...@@ -152,48 +168,36 @@ ...@@ -152,48 +168,36 @@
<div class="text-caption q-mb-lg q-px-md text-grey-6">权限设置</div> <div class="text-caption q-mb-lg q-px-md text-grey-6">权限设置</div>
<div class="role_MenuList"> <div class="role_MenuList">
<span @click="getItem(item,index)" :class="{'checkedRole':index==checkedIndex}" <span @click="getItem(item,index)" :class="{'checkedRole':index==checkedIndex}"
v-for="(item,index) in AuthMenuList" :key="index">{{item.MenuName}}</span> v-for="(item,index) in AuthMenuList" :key="index">{{item.MenuName}}
<q-checkbox v-model="item.IsChecked" dense color="red" size="30px" style="margin-bottom: 2px" @input="onecheck(index)"></q-checkbox>
</span>
</div> </div>
<div class="Item_Main"> <div class="Item_Main">
<div class="role_ItemList" v-for="(subItem,subIndex) in SubMenuList"> <div class="role_ItemList" v-for="(subItem,subIndex) in SubMenuList">
<div class="role_SecondItem"> <div class="role_SecondItem">
<span>{{subItem.MenuName}}</span> <span>{{subItem.MenuName}}</span>
<q-checkbox v-model="subItem.IsChecked" /> <q-checkbox v-model="subItem.IsChecked" @input="twocheck(subIndex)"/>
</div> </div>
<div class="role_TreeList"> <div class="role_TreeList">
<q-tree v-if="subItem.SubList.length>0" :nodes="subItem.SubList" node-key="MenuId" <ul>
label-key="MenuName" children-key="SubList" tick-strategy="strict" :default-expand-all="true" <li v-for="(x,j) in subItem.SubList">
no-connectors :ticked.sync="chooseCategroyArray"> <span style="width: 15px;display: inline-block" @click="x.showChildren=!x.showChildren,$forceUpdate()">
</q-tree> <i class="iconfont icon-sanjiaoxing-you" v-if="x.showChildren==false && x.SubList.length>0" style="font-size: 5px;color: #DDDEE0"></i>
<i class="iconfont icon-sanjiaoxingx" v-if="x.showChildren==true && x.SubList.length>0" style="font-size: 5px;color: #DDDEE0" ></i>
</span>
<q-checkbox v-model="x.IsChecked" size="30px" style="margin-bottom: 2px" @input="threecheck(subIndex,j)"></q-checkbox>
<span >{{x.MenuName}}</span>
<ul v-if="x.SubList.length>0&& x.showChildren==true" style="margin-left: 35px">
<li v-for="(a,b) in x.SubList">
<q-checkbox v-model="a.IsChecked" size="30px" style="margin-bottom: 2px" @input="fourcheck(subIndex,j,b)"></q-checkbox>
<span>{{a.MenuName}}</span>
</li>
</ul>
</li>
</ul>
</div> </div>
</div> </div>
</div> </div>
<!-- <q-card>
<template v-for="(item,index) in AuthMenuList">
<q-checkbox v-model="item.IsChecked" :label="item.MenuName"
@input="menuChange(item)" />
</template>
<div class="row wrap">
<template v-if="SubMenuList&&SubMenuList.length>0" v-for="(subItem,subIndex) in SubMenuList">
<q-card class="my-card" flat style="width:200px;border:1px solid red;float:left;">
<q-card-section>
<div class="text-h6">
<q-checkbox v-model="subItem.IsChecked" :false-value="subItem.IsChecked"
:label="subItem.MenuName" />
</div>
<template v-if="subItem.SubList&&subItem.SubList.length>0"
v-for="(chiildItem,index) in subItem.SubList">
<span style="display:inline-block">
&nbsp;&nbsp;
<q-checkbox v-model="chiildItem.IsChecked" :false-value="chiildItem.IsChecked"
:label="chiildItem.MenuName" />
</span>
</template>
</q-card-section>
</q-card>
</template>
</div>
</q-card> -->
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
...@@ -229,7 +233,9 @@ ...@@ -229,7 +233,9 @@
RoleId: 0, //角色编号 RoleId: 0, //角色编号
RoleName: "", //角色名称 RoleName: "", //角色名称
RoleIntro: "", //角色介绍 RoleIntro: "", //角色介绍
Status: 0, //状态(0-正常,1-禁用)}, Status: 0, //状态(0-正常,1-禁用),
RolePermissionList: [], //菜单权限
RoleFunctionList: [], //功能权限
}, },
returnString: [], returnString: [],
optionTitle: "", optionTitle: "",
...@@ -238,7 +244,7 @@ ...@@ -238,7 +244,7 @@
SubMenuList: [], //下级菜单权限 SubMenuList: [], //下级菜单权限
group: [], group: [],
checkedIndex: 0, //默认选中 checkedIndex: 0, //默认选中
chooseCategroyArray:[], chooseCategroyArray: [],
} }
}, },
computed: { computed: {
...@@ -251,39 +257,43 @@ ...@@ -251,39 +257,43 @@
methods: { methods: {
//菜单切换 //菜单切换
menuChange(item) { menuChange(item) {
console.log(item, 'item111');
this.SubMenuList = []; this.SubMenuList = [];
if (item.IsChecked) { if (item.IsChecked) {
this.SubMenuList = item.SubList; this.SubMenuList = item.SubList;
} }
console.log(this.SubMenuList, 'submenuList');
}, },
//点击选中 //点击选中
getItem(item, index) { getItem(item, index) {
if(this.checkedIndex != index){ if (this.checkedIndex != index) {
this.checkedIndex = index; this.checkedIndex = index;
this.SubMenuList = []; this.SubMenuList = [];
this.SubMenuList = item.SubList; this.SubMenuList = item.SubList;
}else{
this.checkedIndex=-1;
this.SubMenuList = [];
} }
// this.checkedIndex = index;
// this.SubMenuList = [];
// this.SubMenuList = item.SubList;
}, },
//获取权限 //获取权限
queryRolePermission() { queryRolePermission() {
var qMsg = { var qMsg = {
Role_Id: this.objOption.RoleId RoleId: this.saveObj&& this.saveObj.RoleId?this.saveObj.RoleId:0
}; };
GetRolePermission(qMsg).then(res => { GetRolePermission(qMsg).then(res => {
console.log("res", res.Data)
if (res.Code == 1) { if (res.Code == 1) {
this.AuthMenuList = res.Data; this.AuthMenuList = res.Data;
if(this.AuthMenuList.length>0){ if (this.AuthMenuList.length > 0) {
this.SubMenuList=this.AuthMenuList[0].SubList; this.SubMenuList = this.AuthMenuList[0].SubList;
} }
this.AuthMenuList.forEach(x=>{
if(x.SubList.length>0){
x.SubList.forEach(j=>{
if(j.SubList.length>0){
j.SubList.forEach(k=>{
if(k.SubList.length>0){
k.showChildren=false
}
})
}
})
}
})
} }
}).catch(() => {}) }).catch(() => {})
}, },
...@@ -309,6 +319,145 @@ ...@@ -309,6 +319,145 @@
this.objOption.Status = 0; this.objOption.Status = 0;
} }
}, },
onecommon(AuthMenuList,checkedIndex,type){
if(AuthMenuList[checkedIndex].SubList.length>0){
AuthMenuList[checkedIndex].SubList.forEach((x,xa)=>{
x.IsChecked=type;
if(AuthMenuList[checkedIndex].SubList[xa].SubList.length>0){
AuthMenuList[checkedIndex].SubList[xa].SubList.forEach((j,ja)=>{
j.IsChecked=type
let threesub = AuthMenuList[checkedIndex].SubList[xa].SubList[ja].SubList
if(threesub.length>0){
threesub.forEach((k,ka)=>{
k.IsChecked=type
})
}
})
}
})
}
},
onecheck(index){//第1级的操作
let AuthMenuList = this.AuthMenuList;//全部数据
let checkedIndex = index;//当前选择
if(AuthMenuList[checkedIndex].IsChecked==true){
this.onecommon(AuthMenuList,checkedIndex,true)
}else {
this.onecommon(AuthMenuList,checkedIndex,false)
}
this.AuthMenuList = AuthMenuList;
},
twocommon(AuthMenuList,twoiIsChecked,type){
if(twoiIsChecked.SubList.length>0){
twoiIsChecked.SubList.forEach((x,xa)=>{
x.IsChecked=type;
let trsub = twoiIsChecked.SubList[xa].SubList
if(trsub.length>0){
trsub.forEach((j,ja)=>{
j.IsChecked=type
})
}
})
}
},
twocheck(twoindex){//第2级的操作
let AuthMenuList = this.AuthMenuList;//全部数据
let checkedIndex = this.checkedIndex;//当前选择
let twoiIsChecked = AuthMenuList[checkedIndex].SubList[twoindex]
if(twoiIsChecked.IsChecked==true){
this.twocommon(AuthMenuList,twoiIsChecked,true)
AuthMenuList[checkedIndex].IsChecked=true
}else {
this.twocommon(AuthMenuList,twoiIsChecked,false)
let type = false
AuthMenuList[checkedIndex].SubList.forEach(x=>{
if(x.IsChecked==true){
type=true
}
})
if(type==false){
AuthMenuList[checkedIndex].IsChecked=false
}
}
},
threecheck(twoindex,threeindex){//第3级的操作
let AuthMenuList = this.AuthMenuList;//全部数据
let checkedIndex = this.checkedIndex;//当前选择
let threeIsChecked = AuthMenuList[checkedIndex].SubList[twoindex].SubList[threeindex];
if(threeIsChecked.IsChecked == true){
if(threeIsChecked.SubList.length>0){
threeIsChecked.SubList.forEach(x=>{ //下级处理
x.IsChecked = true
})
}
//上级处理
AuthMenuList[checkedIndex].IsChecked=true;
AuthMenuList[checkedIndex].SubList[twoindex].IsChecked=true;
}else {
if(threeIsChecked.SubList.length>0){
threeIsChecked.SubList.forEach(x=>{
x.IsChecked = false
})
}
let type2 = false; //找第三级有选择的内容
AuthMenuList[checkedIndex].SubList[twoindex].SubList.forEach(x=>{
if(x.IsChecked==true){
type2=true
}
})
if(type2==false){
AuthMenuList[checkedIndex].SubList[twoindex].IsChecked=false
}
let type = false//找第二级有选择的内容
AuthMenuList[checkedIndex].SubList.forEach(x=>{
if(x.IsChecked==true){
type=true
}
})
if(type==false){
AuthMenuList[checkedIndex].IsChecked=false
}
}
},
fourcheck(twoindex,threeindex,fourindex){//第4级的操作
let AuthMenuList = this.AuthMenuList;//全部数据
let checkedIndex = this.checkedIndex;//当前选择
let threeIsChecked = AuthMenuList[checkedIndex].SubList[twoindex].SubList[threeindex].SubList[fourindex];
if(threeIsChecked.IsChecked==true){
//上级处理
AuthMenuList[checkedIndex].IsChecked=true;
AuthMenuList[checkedIndex].SubList[twoindex].IsChecked=true;
AuthMenuList[checkedIndex].SubList[twoindex].SubList[threeindex].IsChecked=true;
}else {
let type3 = false; //找第四级有选择的内容
AuthMenuList[checkedIndex].SubList[twoindex].SubList[threeindex].SubList.forEach(x=>{
if(x.IsChecked==true){
type3=true
}
})
if(type3==false){
AuthMenuList[checkedIndex].SubList[twoindex].SubList[threeindex].IsChecked=false
}
let type2 = false; //找第三级有选择的内容
AuthMenuList[checkedIndex].SubList[twoindex].SubList.forEach(x=>{
if(x.IsChecked==true){
type2=true
}
})
if(type2==false){
AuthMenuList[checkedIndex].SubList[twoindex].IsChecked=false
}
let type = false//找第二级有选择的内容
AuthMenuList[checkedIndex].SubList.forEach(x=>{
if(x.IsChecked==true){
type=true
}
})
if(type==false){
AuthMenuList[checkedIndex].IsChecked=false
}
}
},
//关闭弹窗 //关闭弹窗
closeSaveForm() { closeSaveForm() {
this.$emit('close') this.$emit('close')
...@@ -317,18 +466,60 @@ ...@@ -317,18 +466,60 @@
//保存菜单 //保存菜单
saveRole() { saveRole() {
this.saveLoading = true; this.saveLoading = true;
var tempArray = []; //角色菜单权限
var rolePermissionList = [];
//角色功能权限
var roleFunctionList = [];
if (this.AuthMenuList && this.AuthMenuList.length > 0) { if (this.AuthMenuList && this.AuthMenuList.length > 0) {
this.AuthMenuList.forEach(item => { this.AuthMenuList.forEach(item => {
//一级菜单权限
if (item.IsChecked) { if (item.IsChecked) {
tempArray.push({ rolePermissionList.push({
ID: 0,
Role_Id: this.objOption.RoleId,
Menu_Id: item.MenuId
}); });
} }
//二级菜单权限
if (item.SubList && item.SubList.length > 0) {
item.SubList.forEach(secondItem => {
if (secondItem.IsChecked) {
rolePermissionList.push({
ID: 0,
Role_Id: this.objOption.RoleId,
Menu_Id: secondItem.MenuId
});
}
//三级菜单权限
if (secondItem.SubList && secondItem.SubList.length > 0) {
secondItem.SubList.forEach(thirdItem => {
if (thirdItem.IsChecked) {
rolePermissionList.push({
ID: 0,
Role_Id: this.objOption.RoleId,
Menu_Id: thirdItem.MenuId
});
}
//四级--功能权限
if (thirdItem.SubList && thirdItem.SubList.length > 0) {
thirdItem.SubList.forEach(fourthItem => {
if (fourthItem.IsChecked) {
roleFunctionList.push({
ID: 0,
Role_Id: this.objOption.RoleId,
Action_Id: fourthItem.MenuId
});
}
})
}
});
}
})
}
}) })
} }
console.log() this.objOption.RolePermissionList = rolePermissionList;
this.objOption.RoleFunctionList = roleFunctionList;
saveRoleInfo(this.objOption).then(res => { saveRoleInfo(this.objOption).then(res => {
this.saveLoading = false this.saveLoading = false
this.$q.notify({ this.$q.notify({
......
<style>
</style>
<template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 800px;max-width:900px;">
<q-card-section>
<div class="text-h6">{{objOption.StoreType==0?'新增存储桶':'修改存储桶'}}</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="row wrap">
<div class="col-12" style="margin-bottom:10px;">
存储位置
<q-radio v-model="objOption.StoreType" v-for="(item,index) in statusData" :key="index" :val="item.Id" :label="item.Name" />
</div>
<q-input filled stack-label maxlength="100" :dense="false" v-model="objOption.Bucket" ref="Bucket"
class="col-6 q-pr-lg q-pb-lg" label="空间名称(Bucket)" :rules="[val => !!val || '请填写空间名称']" />
<q-input filled stack-label maxlength="100" :dense="false" v-model="objOption.Region" ref="Region"
class="col-6 q-pr-lg q-pb-lg" label="所属地域" :rules="[val => !!val || '请填写所属地域']" />
<q-input filled stack-label maxlength="100" :dense="false" v-model="objOption.SecretId" ref="SecretId"
class="col-6 q-pr-lg q-pb-lg" label="SecretId" :rules="[val => !!val || '请填写SecretId']" />
<q-input filled stack-label maxlength="100" :dense="false" v-model="objOption.SecretKey" ref="SecretKey"
class="col-6 q-pr-lg q-pb-lg" label="SecretKey" :rules="[val => !!val || '请填写SecretKey']" />
<q-input filled stack-label maxlength="100" :dense="false" v-model="objOption.CustomDomain" ref="CustomDomain"
class="col-6 q-pr-lg q-pb-lg" label="自定义域名"/>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" color="dark" style="font-weight:400 !important" @click="closeSaveForm" />
<q-btn label="立即提交" color="accent" class="q-px-md" style="font-weight:400 !important" :loading="saveLoading"
@click="setConfig" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
setSiteConfig,
} from '../../api/system/sitecfg'
import {
getConfigStatus,
} from '../../api/system/index'
export default {
props: {
saveObj: {
type: Object,
default: null
}
},
data() {
return {
persistent: true,
saveLoading: false,
objOption: {
ID:0,
StoreType: 0,
Bucket: '',
Region: '',
CustomDomain: '',
SecretId: '',
SecretKey: '',
ImgStyle: '',
},
statusData:[], //状态数据
}
},
computed: {
},
mounted() {
if(this.saveObj){
this.objOption.ID = this.saveObj.ID;
this.objOption.StoreType=this.saveObj.StoreType;
this.objOption.Bucket=this.saveObj.Bucket;
this.objOption.Region=this.saveObj.Region;
this.objOption.CustomDomain=this.saveObj.CustomDomain;
this.objOption.SecretId=this.saveObj.SecretId;
this.objOption.SecretKey=this.saveObj.SecretKey;
}
this.getStatus();
},
methods: {
//保存数据
setConfig() {
if(this.objOption.StoreType==0){
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择存储位置`
})
return;
}
if(this.objOption.Bucket==''){
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写空间域名`
})
return;
}
if(this.objOption.Region==''){
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写所属地域`
})
return;
}
if(this.objOption.SecretId==''){
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写SecretId`
})
return;
}
if(this.objOption.SecretKey==''){
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写SecretKey`
})
return;
}
setSiteConfig(this.objOption).then(res => {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.$emit("success");
this.closeSaveForm();
}).catch(() => {
this.saveLoading = false
})
},
//关闭弹窗
closeSaveForm() {
this.$emit('close')
this.persistent = false
},
//获去下拉状态
getStatus(){
getConfigStatus().then(res => {
if(res.Code==1){
this.statusData = res.Data;
}
})
},
},
}
</script>
...@@ -3,19 +3,19 @@ ...@@ -3,19 +3,19 @@
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.MName" label="姓名" /> <q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.EmployeeName"
</div> label="员工姓名/账号" />
<div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.MTel" label="电话" />
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" clearable filled stack-label option-value="SId" option-label="SName" <q-select @input="resetSearch" clearable filled stack-label option-value="SId" option-label="SName"
v-model="schoolTemp" ref="School_Id" :options="schoolList" label="所属校区" :dense="false" /> v-model="schoolTemp" ref="School_Id" :options="schoolList" label="所属校区" :dense="false" />
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.Status" :options="AuditOpts" <q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.MTel" label="电话" />
emit-value map-options label="状态" />
</div> </div>
</div> </div>
<div class="page-option"> <div class="page-option">
<q-btn color="accent" class="q-mr-md" icon="add" label="新增管理者" @click="EditManager(null)" /> <q-btn color="accent" class="q-mr-md" icon="add" label="新增管理者" @click="EditManager(null)" />
...@@ -23,18 +23,18 @@ ...@@ -23,18 +23,18 @@
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-right-column-table sticky-tow-column-table" separator="none" title="后台用户信息" :data="data" class="sticky-right-column-table sticky-tow-column-table" separator="none" title="员工管理" :data="data"
:columns="columns" row-key="name"> :columns="columns" row-key="name">
<template v-slot:body-cell-MHead="props"> <template v-slot:body-cell-EmployeeIcon="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
<q-avatar size="md" v-if="props.value"> <q-avatar size="md" v-if="props.value">
<img :src="props.value" /> <img :src="props.value" />
</q-avatar> </q-avatar>
<q-avatar size="md" color="teal-10" text-color="white" v-if="!props.value"> <q-avatar size="md" color="teal-10" text-color="white" v-if="!props.value">
{{props.row.MName}}</q-avatar> {{props.row.EmployeeName}}</q-avatar>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-MName="props"> <template v-slot:body-cell-EmployeeName="props">
<q-td :props="props"> <q-td :props="props">
<div class="text-blue cursor-pointer">{{props.value}}</div> <div class="text-blue cursor-pointer">{{props.value}}</div>
</q-td> </q-td>
...@@ -59,12 +59,10 @@ ...@@ -59,12 +59,10 @@
<div style="min-width:190px;width:100%"> <div style="min-width:190px;width:100%">
<q-btn v-if="props.row.ManagerAccount==''" flat size="xs" icon="iconfont icon-ziyuan" color="warning" <q-btn v-if="props.row.ManagerAccount==''" flat size="xs" icon="iconfont icon-ziyuan" color="warning"
style="font-weight:400" class="q-mr-xs" label="创建账号" @click="createAccount(props.row.MId)" /> style="font-weight:400" class="q-mr-xs" label="创建账号" @click="createAccount(props.row.MId)" />
<q-btn flat size="xs" icon="iconfont icon-ziyuan" color="warning" style="font-weight:400" class="q-mr-xs"
label="重置密码" @click="resetPw(props.row.MId)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑" <q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditManager(props.row)" /> @click="EditManager(props.row)" />
<q-btn flat size="xs" icon="iconfont icon-ziyuan" color="warning" style="font-weight:400" class="q-mr-xs"
label="更多" @click="resetPw(props.row.MId)" />
</div> </div>
</q-td> </q-td>
</template> </template>
...@@ -84,6 +82,7 @@ ...@@ -84,6 +82,7 @@
import { import {
resetPassword resetPassword
} from '../../api/users/user.js' } from '../../api/users/user.js'
import{getChildDepartment}from '../../api/system/dept.js'
import managerForm from '../../components/school/manager/manager-form' import managerForm from '../../components/school/manager/manager-form'
export default { export default {
meta: { meta: {
...@@ -96,28 +95,22 @@ ...@@ -96,28 +95,22 @@
return { return {
currentUrl: "", currentUrl: "",
columns: [{ columns: [{
name: 'MHead', name: 'EmployeeIcon',
label: '', label: '',
field: 'MHead', field: 'EmployeeIcon',
align: 'left', align: 'left',
}, },
{ {
name: 'MName', name: 'EmployeeName',
required: true, required: true,
label: '管理者姓名', label: '姓名',
align: 'left', align: 'left',
field: row => row.MName field: row => row.EmployeeName
},
{
name: 'MTel',
label: '手机号码',
field: 'MTel',
align: 'left'
}, },
{ {
name: 'SName', name: 'SchoolName',
label: '所属校区', label: '公司',
field: 'SName', field: 'SchoolName',
align: 'left', align: 'left',
}, },
{ {
...@@ -128,33 +121,51 @@ ...@@ -128,33 +121,51 @@
}, },
{ {
name: 'PostName', name: 'PostName',
label: '位', label: '位',
field: 'PostName', field: 'PostName',
align: 'left', align: 'left',
}, },
{ {
name: 'Status', name: 'Sex',
label: '状态', label: '性别',
field: 'Status', field: 'Sex',
align: 'left', align: 'left'
}, },
{ {
name: 'CreateByName', name: 'Account',
label: '创建人', label: '账号',
align: 'left', align: 'left',
field: 'CreateByName' field: 'Account'
}, },
{ {
name: 'CreateTimeStr', name: 'EmployeePhone',
label: '创建时间', label: '联系电话',
field: 'EmployeePhone',
align: 'left'
},
{
name: 'BirthDate',
label: '生日',
field: 'BirthDate',
align: 'left'
},
{
name: 'Education',
label: '学历',
field: 'Education',
align: 'left'
},
{
name: 'LeaveStatus',
label: '状态',
field: 'LeaveStatus',
align: 'left', align: 'left',
field: 'CreateTimeStr'
}, },
{ {
name: 'ManagerAccount', name: 'Remarks',
label: '账号', label: '行政备注',
field: 'Remarks',
align: 'left', align: 'left',
field: 'ManagerAccount'
}, },
{ {
name: 'optioned', name: 'optioned',
...@@ -164,27 +175,22 @@ ...@@ -164,27 +175,22 @@
], ],
data: [], data: [],
loading: true, loading: true,
AuditOpts: [{
label: '全部',
value: '-1'
},
{
label: '正常',
value: '0'
},
{
label: '禁用',
value: '1'
},
],
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 12, pageSize: 12,
rowsPerPage: 12, rowsPerPage: 12,
MName: "", School_Id: 0, //校区
MTel: "", Dept_Id: 0, //部门
Status: "-1", Post_Id: 0, //岗位编号
School_Id: 0, LeaveStatus: -1, //在职状态
StartEntryTime: "", //入职开始时间
EndEntryTime: "", //入职结束时间
StartLeaveTime: "", //开始离职时间
EndLeaveTime: "", //结束离职时间
StartBirthDate: "", //开始生日
EndBirthDate: "", //结束生日
EmployeeName: "", //员工姓名电话
}, },
schoolTemp: "", schoolTemp: "",
pageCount: 0, pageCount: 0,
...@@ -325,7 +331,7 @@ ...@@ -325,7 +331,7 @@
refreshPage() { refreshPage() {
if (!this.managerOption) { if (!this.managerOption) {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.msg.MName = ""; this.msg.EmployeeName = "";
this.msg.MTel = ""; this.msg.MTel = "";
this.msg.Status = "-1"; this.msg.Status = "-1";
this.msg.School_Id = 0; this.msg.School_Id = 0;
......
...@@ -2,10 +2,27 @@ ...@@ -2,10 +2,27 @@
<div class="page-body"> <div class="page-body">
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<!-- <div class="col-3">-->
<!-- <q-select @input="resetSearch" filled stack-label option-value="SId" option-label="SName"-->
<!-- v-model="msg.School_Id" :options="schoolList" label="校区" :dense="false" class="col-6 q-pr-lg q-pb-lg"-->
<!-- emit-value map-options clearable @clear="resetSearch" />-->
<!-- </div>-->
<div class="col-3"> <div class="col-3">
<q-select @input="resetSearch" filled stack-label option-value="SId" option-label="SName" <selectSearch
v-model="msg.School_Id" :options="schoolList" label="校区" :dense="false" class="col-6 q-pr-lg q-pb-lg" classStr="col-12 q-pr-lg q-pb-lg"
emit-value map-options clearable @clear="resetSearch" /> :Data='schoolList'
optionValue="SId"
optionLabel="SName"
:densetype="false"
:vModel="msg.School_Id"
label="校区"
@returnData="returnData"
:useInput="true"
:reactiveRules="false"
type="1"
>
</selectSearch>
</div> </div>
<div class="col-3"> <div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.DeptName" <q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.DeptName"
...@@ -40,6 +57,11 @@ ...@@ -40,6 +57,11 @@
title="注意:关闭后,分类将无法正常使用." @input="SetDeptStatus(props.row)" /> title="注意:关闭后,分类将无法正常使用." @input="SetDeptStatus(props.row)" />
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-School_Id="props">
<q-td :props="props">
{{props.row.School_Id>0? props.row.SchoolName:'总部'}}
</q-td>
</template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" /> :input="true" @input="changePage" />
...@@ -70,30 +92,31 @@ ...@@ -70,30 +92,31 @@
} from '../../api/system/index' } from '../../api/system/index'
import deptForm from '../../components/system/dept-form' import deptForm from '../../components/system/dept-form'
import selectTree from '../../components/common/select-tree' import selectTree from '../../components/common/select-tree'
import selectSearch from '../../components/common/select-search'
export default { export default {
meta: { meta: {
title: "部门管理" title: "部门管理"
}, },
components: { components: {
deptForm, deptForm,
selectTree selectTree,
selectSearch
}, },
data() { data() {
return { return {
currentUrl: "", currentUrl: "",
columns: [{ columns: [{
name: 'SchoolName',
label: '校区',
field: 'SchoolName',
align: 'left'
},
{
name: 'DeptName', name: 'DeptName',
required: true,
label: '部门名称', label: '部门名称',
align: 'left', align: 'left',
field: row => row.DeptName field: row => row.DeptName
}, },
{
name: 'School_Id',
label: '是否为公司',
field: 'School_Id',
align: 'left'
},
{ {
name: 'DeptTier', name: 'DeptTier',
label: '部门层级', label: '部门层级',
...@@ -307,7 +330,15 @@ ...@@ -307,7 +330,15 @@
}).onCancel(() => { }).onCancel(() => {
obj.Status = obj.Status == 1 ? 0 : 1; obj.Status = obj.Status == 1 ? 0 : 1;
}); });
},
returnData(data,type){
if(type==1){
this.msg.School_Id = data;
}
this.resetSearch()
} }
} }
} }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
<menufunction-form v-if="isShowMenuForm" :save-obj="menuObjOption" @close="closeMenuSaveForm" @success="refreshPage"> <menufunction-form v-if="isShowMenuForm" :save-obj="menuObjOption" :paramObj="MenuId" @close="closeMenuSaveForm" @success="refreshPage">
</menufunction-form> </menufunction-form>
</div> </div>
</div> </div>
......
<style>
.msgmanage .order_List {
width: 300px;
height: 180px;
box-shadow: #dee5ec 0px 0px 5px;
border-radius: 5px;
padding: 5px 20px;
background-color: #fff;
position: relative;
}
.msgmanage .order_top {
padding: 5px 0 10px 0;
display: flex;
align-items: center;
color: #111111;
border-bottom: 1px solid #E2E2E2;
justify-content: space-between;
align-items: center;
}
.msgmanage .order_info {
color: #999999;
margin-top: 15px;
}
.msgmanage .sendStatus {
font-weight: bold;
margin-left: 10px;
}
.msgmanage .lineMsg {
display: inline-block;
width: 100px;
}
.msgmanage .lineMsg::after {
content: "";
display: block;
background: #000;
width: 100%;
height: 1px;
}
.msgmanage .order_Success {
position: absolute;
bottom: 20px;
align-items: center;
display: flex;
width: 90%;
justify-content: space-between;
}
.msgmanage .SuccessInput {
border: none;
width: 150px;
outline: none;
border-bottom: 1px solid #d1d1d1;
}
.msgmanage .drawerTop {
width: 100%;
height: 50px;
display: flex;
justify-content: space-between;
background-color: #F0F5FB;
padding: 5px 10px;
align-items: center;
}
.msgmanage .drawer_Span {
font-weight: bold;
font-size: 14px;
margin-left: 5px;
}
</style>
<template>
<div class="page-body msgmanage">
<q-tabs style="margin-bottom:20px;" v-model="tabCheck" @input="tabChange()" narrow-indicator dense align="left"
class="text-primary">
<q-tab :ripple="false" name="first" label="短信流水" />
<q-tab :ripple="false" name="second" label="短信配置" />
<q-tab :ripple="false" name="third" label="短信设置" />
</q-tabs>
<template v-if="tabCheck=='first'">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input clearable @change="getList" standout="bg-primary text-white" v-model="waterMsg.ReceiverName"
label="收信人/电话" />
</div>
<div class="col-3">
<q-input clearable @change="getList" standout="bg-primary text-white" v-model="waterMsg.SendContent"
label="内容" />
</div>
<div class="col-3">
<q-input filled v-model="waterMsg.StartDate" mask="date" label="开始日期">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale">
<q-date v-model="waterMsg.StartDate" @input="getList(),() => $refs.qDateProxy.hide()" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div>
<div class="col-3">
<q-input filled v-model="waterMsg.EndDate" mask="date" label="结束日期">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy2" transition-show="scale" transition-hide="scale">
<q-date v-model="waterMsg.EndDate" @input="getList(),() => $refs.qDateProxy2.hide()" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div>
<div class="col-3">
<q-select @input="getList" standout="bg-primary text-white" v-model="waterMsg.SendStatus"
:options="ShowOpts" emit-value map-options label="发送状态" />
</div>
</div>
</div>
<div class="page-content">
<q-table :pagination="waterMsg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table"
separator="none" title="" :data="data" :columns="columns" row-key="name">
<template v-slot:body-cell-SendStatus="props">
<q-td :props="props" style="display:flex;align-items:center;">
<template v-if="props.row.SendStatus==2">
<img src="../../assets/images/myimg/success.png" alt="" />
<span class="sendStatus" style="color:#02C499;">发送成功</span>
</template>
<template v-if="props.row.SendStatus==1">
<img src="../../assets/images/myimg/failed.png" alt="" />
<span class="sendStatus" style="color:#F72E52;">发送失败</span>
</template>
</q-td>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="waterMsg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
</q-table>
</div>
</template>
<template v-if="tabCheck=='second'">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-select @input="getConfigList" standout="bg-primary text-white" v-model="ConfigMsg.StoreType"
:options="statusData" option-value="Id" option-label="Name" emit-value map-options label="类型" />
</div>
</div>
<div class="page-option">
<q-btn color="accent" class="q-mr-md" icon="add" label="新增配置" @click="addConfig(null)" />
</div>
</div>
<div class="page-content">
<q-table :pagination="ConfigMsg" :loading="loading2" no-data-label="暂无相关数据" flat class="sticky-tow-column-table"
separator="none" title="" :data="configData" :columns="columns2" row-key="name">
<template v-slot:body-cell-StoreType="props">
<q-td :props="props">
<template v-if="props.row.StoreType==1">
<img src="../../assets/images/myimg/tencent.png" alt="" />
<span class="sendStatus" style="color:#02C499;">腾讯云</span>
</template>
<template v-if="props.row.StoreType==2">
<img src="../../assets/images/myimg/ali.png" alt="" />
<span class="sendStatus" style="color:#F72E52;">阿里云</span>
</template>
</q-td>
</template>
<template v-slot:body-cell-MsgBase="props">
<q-td :props="props">
<div>地区:{{props.row.MsgBase.RegionId}}</div>
<div>域名:{{props.row.MsgBase.Domain}}</div>
<div>AccessKeyId:{{props.row.MsgBase.AccessKeyId}}</div>
<div>AccessSecret:{{props.row.MsgBase.AccessSecret}}</div>
</q-td>
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditConfig(props.row)" />
</q-td>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="ConfigMsg.PageIndex" color="primary"
:max="pageCountConfig" :input="true" @input="changePage2" />
</template>
</q-table>
</div>
</template>
<template v-if="tabCheck=='third'">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-select @input="getSetingMsg" standout="bg-primary text-white" v-model="setMsg.StoreType"
:options="statusData" option-value="Id" option-label="Name" emit-value map-options label="类型" />
</div>
</div>
<div class="page-option">
<q-btn color="accent" class="q-mr-md" icon="add" label="新增设置" @click="addSetcfig()" />
</div>
</div>
<div style="display:flex;">
<div class="order_List" v-for="item in setUpData" style="margin-right:15px;">
<div class="order_top">
<div style="display:flex;align-items:center;">
<img v-if="item.BaseTemplateType==1" src="../../assets/images/myimg/gou.png" />
<img v-if="item.BaseTemplateType==2" style="width:30px;height:30px;" src="../../assets/images/myimg/failed.png" />
<span style="margin-left:10px;">{{item.BaseTemplateTypeStr}}</span>
</div>
<div>
<i style="cursor:pointer;" @click="getMsgInfo(item)" class="iconfont icon-xiugai"></i>
</div>
</div>
<div class="order_info">
<template v-if="item.StoreType==1">
<img src="../../assets/images/myimg/tencent.png" alt="" />
<span class="sendStatus" style="color:#02C499;">腾讯云</span>
</template>
<template v-if="item.StoreType==2">
<img src="../../assets/images/myimg/ali.png" alt="" />
<span class="sendStatus" style="color:#02C499;">阿里云</span>
</template>
</div>
<div style="margin-top:10px;">
模板id:{{item.TemplateId}}
</div>
<div class="order_Success">
<div>
签名:{{item.Sign}}
</div>
<div>
<q-toggle size="md" color="primary" :disable="true" v-model="item.TemplateStaus" :false-value="1"
:true-value="0" />
</div>
</div>
</div>
</div>
<q-pagination class="full-width justify-end" v-model="setMsg.PageIndex" color="primary" :max="setDataCount"
:input="true" @input="changePage3" />
</template>
<el-drawer title="" :visible.sync="drawer" :with-header="false">
<div class="drawerTop">
<div style="display:flex;align-items:center;">
<img src="../../assets/images/myimg/success.png" alt="" />
<span class="drawer_Span">短信账号配置</span>
</div>
<div>
<i class="iconfont icon-guanbi" @click="drawer=false"></i>
</div>
</div>
<div style="padding:20px 15px;">
<q-radio v-model="configEditMsg.StoreType" style="margin-right:20px;" v-for="(item,index) in statusData"
v-if="item.Id>0" :val="item.Id" :label="item.Name" :key="index" />
</div>
<div class="col-12" style="margin:0 24px;">
<q-input filled stack-label maxlength="20" :dense="false" v-model="configEditMsg.MsgBase.RegionId"
class="col-12" label="地区" :rules="[val => !!val || '请填写地区']" />
</div>
<div class="col-12" style="margin:20px 24px;">
<q-input filled stack-label maxlength="20" :dense="false" v-model="configEditMsg.MsgBase.Domain" class="col-12"
label="域名" :rules="[val => !!val || '请填写域名']" />
</div>
<div filled class="col-12" style="margin:20px 24px;">
<q-input filled stack-label maxlength="20" :dense="false" v-model="configEditMsg.MsgBase.AccessKeyId"
class="col-12" label="秘钥Key" :rules="[val => !!val || '请填写秘钥Key']" />
</div>
<div filled class="col-12" style="margin:0 24px;">
<q-input filled stack-label maxlength="20" :dense="false" v-model="configEditMsg.MsgBase.AccessSecret"
class="col-12" label="秘钥Secret" :rules="[val => !!val || '请填写秘钥Secret']" />
</div>
<div style="margin:30px 10px 0 0;text-align:right;">
<q-btn color="accent" class="q-mr-md" icon="add" label="保存" @click="saveConfig()" />
</div>
</el-drawer>
<el-drawer title="" :visible.sync="msgDrawdia" :with-header="false">
<div class="drawerTop">
<div style="display:flex;align-items:center;">
<img src="../../assets/images/myimg/success.png" alt="" />
<span class="drawer_Span">短信设置</span>
</div>
<div>
<i class="iconfont icon-guanbi" @click="msgDrawdia=false"></i>
</div>
</div>
<div style="padding:20px 15px;">
<q-radio v-model="baseEditMsg.StoreType" style="margin-right:20px;" v-for="(item,index) in statusData" :key="index" v-if="item.Id>0"
:val="item.Id" :label="item.Name" />
</div>
<div class="col-12" style="margin:0 20px;">
<q-toggle size="md" label="模板状态" color="primary" :false-value="1" :true-value="0"
v-model="baseEditMsg.TemplateStaus" />
</div>
<div class="col-12" style="margin:20px 24px;">
<q-select standout="bg-primary text-white" v-model="baseEditMsg.BaseTemplateType" :options="moduleList"
option-value="Id" option-label="Name" emit-value map-options label="模板类型" />
</div>
<div filled class="col-12" style="margin:30px 24px 0 24px;">
<q-input filled stack-label maxlength="20" :dense="false" v-model="baseEditMsg.Sign" class="col-12" label="签名"
:rules="[val => !!val || '请填写签名']" />
</div>
<div filled class="col-12" style="margin:20px 24px 0 24px;">
<q-input filled stack-label maxlength="20" :dense="false" v-model="baseEditMsg.TemplateId" class="col-12"
label="模板id" :rules="[val => !!val || '请填写模板id']" />
</div>
<div style="margin:30px 10px 0 0;text-align:right;">
<q-btn color="accent" class="q-mr-md" icon="add" label="保存" @click="saveSatMsg()" />
</div>
</el-drawer>
</div>
</template>
<script>
import {
getMsgPage,
getConfigPage,
EditMsgConfig,
GetMsgBaseList,
GetMsgBaseTemplatePageList,
GetBaseTemplateTypeEnumList,
SetMsgBaseTemplate
} from '../../api/system/msg';
import {
getConfigStatus
} from '../../api/system/index';
export default {
meta: {
title: "短信管理"
},
data() {
return {
tabCheck: 'first',
//短信流水column
columns: [{
name: 'SendStatus',
label: '状态',
field: 'SendStatus',
align: 'left'
},
{
name: 'ReceiverName',
required: true,
field: 'ReceiverName',
label: '目标',
align: 'left',
},
{
name: 'SendContent',
label: '内容',
field: 'SendContent',
align: 'left'
},
{
name: 'CreateDateStr',
label: '发送时间',
field: 'CreateDateStr',
align: 'left'
},
{
name: 'CreateByName',
label: '创建人',
align: 'left',
field: 'CreateByName'
}
],
//短信配置column
columns2: [{
name: 'StoreType',
label: '类型',
field: 'StoreType',
align: 'left'
}, {
name: 'MsgBase',
label: '配置信息 ',
field: 'MsgBase',
align: 'left'
}, {
name: 'optioned',
label: '操作',
field: 'optioned'
}],
data: [],
loading: true,
loading2: true,
waterMsg: {
pageIndex: 1,
pageSize: 12,
SendStatus: 0, //发送状态
StartDate: '', //开始时间
EndDate: '', //结束时间
ReceiverName: '', //接收人
SendContent: '' //发送内容
},
ShowOpts: [{
label: '全部',
value: 0
},
{
label: '失败',
value: 1
},
{
label: '成功',
value: 2
}
],
drawer: false, //显示右侧抽屉
ConfigMsg: {
PageIndex: 1,
PageSize: 12,
StoreType: 0 //类型
},
configEditMsg: {
ID: 0,
StoreType: 1,
MsgBase: {
RegionId: '', //地区
Domain: '', //域名
AccessKeyId: '', //秘钥Key
AccessSecret: '' //秘钥Secret
}
},
//获取短信设置msg
setMsg: {
PageIndex: 1,
StoreType: 0,
PageSize: 12
},
statusData: [], //发送状态
//短信配置数据
configData: [],
pageCountConfig: 0, //配置 页数
msgDrawdia: false, //短信设置右侧弹窗
baseEditMsg: {
ID: 0,
StoreType: 1, //短信供应商 1-腾讯云,2-阿里,3-其他
TemplateStaus: 0, //模板状态,0-正常,1-禁用
BaseTemplateType: 1, //模板类型
Sign: '', //签名
TemplateId: '' //模板id
},
moduleList: [], //配置类型列表
setUpData: [], //短信设置数据
setDataCount: 0, //短信设置页数
}
},
mounted() {
this.getStatus();
this.getList();
},
methods: {
tabChange() {
if (this.tabCheck == 'first') {
this.getList();
} else if (this.tabCheck == 'second') {
this.getConfigList();
} else {
this.getSetingMsg();
this.getModoleType();
}
},
//获取短信流水数据
getList() {
this.loading = false;
getMsgPage(this.waterMsg).then(res => {
this.data = res.Data.PageData;
this.loading = false;
this.pageCount = res.Data.PageCount;
}).catch(() => {
this.loading = false
})
},
//翻页
changePage(val) {
this.waterMsg.pageIndex = val;
this.getList()
},
//翻页!
changePage2(val) {
this.ConfigMsg.pageIndex = val;
this.getConfigList()
},
//短信配置翻页
changePage3(val) {
this.setMsg.pageIndex = val;
this.getSetingMsg()
},
//获去下拉状态
getStatus() {
getConfigStatus().then(res => {
if (res.Code == 1) {
this.statusData = res.Data;
let obj = {
Name: '全部',
Id: 0
}
this.statusData.unshift(obj);
}
})
},
//获取短信配置数据
getConfigList() {
this.loading2 = true;
getConfigPage(this.ConfigMsg).then(res => {
this.loading2 = false;
if (res.Code == 1) {
this.configData = res.Data.PageData;
this.pageCountConfig = res.Data.PageCount;
}
}).catch(() => {
this.loading2 = false;
})
},
//新增配置
addConfig() {
this.drawer = true;
this.configEditMsg.ID = 0;
this.configEditMsg.StoreType = 1;
this.configEditMsg.MsgBase.RegionId = '';
this.configEditMsg.MsgBase.Domain = '';
this.configEditMsg.MsgBase.AccessKeyId = '';
this.configEditMsg.MsgBase.AccessSecret = '';
},
//修改配置
EditConfig(obj) {
let msg = {
ID: obj.ID
}
this.drawer = true;
GetMsgBaseList(msg).then(res => {
if (res.Code == 1) {
var data = res.Data;
this.configEditMsg.ID = data.ID;
this.configEditMsg.StoreType = data.StoreType;
this.configEditMsg.MsgBase.RegionId = data.MsgBase.RegionId;
this.configEditMsg.MsgBase.Domain = data.MsgBase.Domain;
this.configEditMsg.MsgBase.AccessKeyId = data.MsgBase.AccessKeyId;
this.configEditMsg.MsgBase.AccessSecret = data.MsgBase.AccessSecret;
}
})
},
//保存配置
saveConfig() {
if (this.configEditMsg.MsgBase.RegionId == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写地区`
})
return;
}
if (this.configEditMsg.MsgBase.Domain == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写域名`
})
return;
}
if (this.configEditMsg.MsgBase.AccessKeyId == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写秘钥Key`
})
return;
}
if (this.configEditMsg.MsgBase.AccessSecret == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写秘钥Secret`
})
return;
}
EditMsgConfig(this.configEditMsg).then(res => {
this.$q.notify({
type: 'iconfont icon-chenggong',
position: "top",
message: `保存成功`
})
this.drawer = false;
this.getConfigList();
}).catch(() => {
})
},
//获取短信设置下拉模板类型
getModoleType() {
GetBaseTemplateTypeEnumList().then(res => {
if (res.Code == 1) {
this.moduleList = res.Data;
}
}).catch(() => {
})
},
//获取短信设置数据
getSetingMsg() {
GetMsgBaseTemplatePageList(this.setMsg).then(res => {
if (res.Code == 1) {
this.setUpData = res.Data.PageData;
this.setDataCount = res.Data.PageCount;
}
}).catch(() => {
})
},
//新增短信设置数据
addSetcfig() {
this.baseEditMsg.ID = 0;
this.baseEditMsg.StoreType = 1;
this.baseEditMsg.TemplateStaus = 0;
this.baseEditMsg.BaseTemplateType = 1;
this.baseEditMsg.Sign = '';
this.baseEditMsg.TemplateId = '';
this.msgDrawdia = true;
},
//修改数据
getMsgInfo(item) {
this.msgDrawdia = true;
this.baseEditMsg.ID = item.ID;
this.baseEditMsg.StoreType = item.StoreType;
this.baseEditMsg.TemplateStaus = item.TemplateStaus;
this.baseEditMsg.BaseTemplateType = item.BaseTemplateType;
this.baseEditMsg.Sign = item.Sign;
this.baseEditMsg.TemplateId = item.TemplateId;
},
//保存短信设置数据
saveSatMsg() {
if (this.baseEditMsg.Sign == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写签名`
})
return;
}
if (this.baseEditMsg.TemplateId == '') {
this.$q.notify({
type: 'negative',
position: "top",
message: `请填写模板id`
})
return;
}
SetMsgBaseTemplate(this.baseEditMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
type: 'iconfont icon-chenggong',
position: "top",
message: `保存成功`
})
this.getSetingMsg();
this.msgDrawdia = false;
}
}).catch(() => {
})
}
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass');
</style>
<style>
.site_ListDiv {
margin-bottom: 10px;
}
</style>
<template>
<div class="page-body">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
</div>
<div class="page-option">
<q-btn color="accent" class="q-mr-md" icon="add" label="新增站点" @click="addSite(null)" />
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table"
separator="none" title="文件站点配置" :data="data" :columns="columns" row-key="name">
<template v-slot:body-cell-StoreType="props">
<q-td :props="props" style="position:relative;">
<template v-if="props.row.StoreType==1">
<img src="../../assets/images/myimg/tencent.png" alt="" />
</template>
<template v-if="props.row.StoreType==2">
<img src="../../assets/images/myimg/ali.png" alt="" />
</template>
<div style="position:absolute;top:0;left:0;">
<img v-if="props.row.IsDefault==1" style="width:50px;" src="../../assets/images/myimg/default.png" />
</div>
</q-td>
</template>
<template v-slot:body-cell-Using="props">
<q-td :props="props">
<div class="site_ListDiv">空间名称(Bucket):{{props.row.Bucket}}</div>
<div class="site_ListDiv">所属地域:{{props.row.Region}}</div>
<div class="site_ListDiv">自定义域名:{{props.row.CustomDomain}}</div>
<div class="site_ListDiv">SecretId:{{props.row.SecretId}}</div>
<div>SecretKey:{{props.row.SecretKey}}</div>
</q-td>
</template>
<template v-slot:bottom>
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="addSite(props.row)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="设为默认"
@click="setMoren(props.row)" />
</q-td>
</template>
</q-table>
<site-form v-if="isShowSiteForm" :save-obj="roleObjOption" @close="closeSiteSaveForm" @success="refreshPage">
</site-form>
</div>
</div>
</template>
<script>
import {
getSiteConfig,
setSiteConfig
} from '../../api/system/sitecfg'
import siteForm from '../../components/system/site-form'
export default {
meta: {
title: "站点配置"
},
components: {
siteForm,
},
data() {
return {
isShowSiteForm: false,
columns: [{
name: 'StoreType',
label: '类型',
field: 'StoreType',
align: 'left'
},
{
name: 'Bucket',
label: '存储位置',
field: 'Bucket',
align: 'left'
},
{
name: 'Using',
label: '使用中',
field: 'Using',
align: 'left'
},
{
name: 'optioned',
label: '操作',
field: 'StoreType'
}
],
data: [],
// loading: true,
loading: false,
msg: {
pageIndex: 1,
pageSize: 20,
},
roleObjOption: null,
}
},
mounted() {
this.getList();
},
methods: {
getList() {
getSiteConfig(this.msg).then(res => {
if (res.Code == 1) {
this.data = res.Data;
}
}).catch(() => {
})
},
//新增站点
addSite(obj) {
if (obj) {
this.roleObjOption = obj
} else {
this.roleObjOption = null
}
this.isShowSiteForm = true;
},
//设为默认
setMoren(obj) {
let msg = obj;
msg.IsDefault = 1;
setSiteConfig(msg).then(res => {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '设置默认成功!',
position: 'top'
})
this.getList();
}).catch(() => {
})
},
//关闭弹窗
closeSiteSaveForm() {
this.isShowSiteForm = false
},
//刷新页面
refreshPage() {
this.getList()
},
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass');
</style>
...@@ -77,6 +77,16 @@ const routes = [{ ...@@ -77,6 +77,16 @@ const routes = [{
component: () => component: () =>
import("pages/system/role.vue") import("pages/system/role.vue")
}, },
{
path: "/system/siteconfig", //站点配置
component: () =>
import("pages/system/siteconfig.vue")
},
{
path: "/system/msgmanage", //短信管理
component: () =>
import("pages/system/msgmanage.vue")
},
{ {
path: "/course/catagory", //课程分类 path: "/course/catagory", //课程分类
component: () => component: () =>
......
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