Commit f4a28d4c authored by liudong1993's avatar liudong1993

1

parent cc999715
......@@ -49,7 +49,8 @@ module.exports = function(ctx) {
env: ctx.dev ? {
//http://192.168.1.27:8300/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'
},
......@@ -147,6 +148,7 @@ module.exports = function(ctx) {
'QCheckbox',
'QTree',
'QOptionGroup',
'QRadio'
],
// directives: [],
......
......@@ -12,7 +12,7 @@ export default {
<style>
@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,
body,
......
......@@ -298,3 +298,15 @@ export function SetRolePermission(data) {
data
})
}
/**
* 获取短信配置发送状态下拉
*/
export function getConfigStatus(data) {
return request({
url: '/Public/GetStoreTypeEnumList',
method: 'post',
data
});
}
import request from '../../utils/request'
/**
* 获取部门分页列表
* 获取短信流水分页列表
*/
export function getDeptPage(data) {
return request({
url: '/User/GetDeptPageList',
method: 'post',
data
});
export function getMsgPage(data) {
return request({
url: '/Msg/GetMsgLogPageList',
method: 'post',
data
});
}
/**
* 获取部门列表
* 获取短信配置分页列表
*/
export function getDeptList(data) {
export function getConfigPage(data) {
return request({
url: '/User/GetDeptList',
url: '/Msg/GetMsgBasePageList',
method: 'post',
data
});
}
/**
* 获取部门树形列表
* 新增修改短信配置
*/
export function getDeptTree(data) {
export function EditMsgConfig(data) {
return request({
url: '/User/GetDeptTree',
url: '/Msg/SetMsgBase',
method: 'post',
data
});
}
/**
* 获取组织机构图
* 根据ID获取配置信息
*/
export function getOrganizationChart(data) {
export function GetMsgBaseList(data) {
return request({
url: '/User/GetOrganizationChart',
url: '/Msg/GetMsgBaseList',
method: 'post',
data
});
}
/**
* 新增修改部门信息
* 获取短信设置列表
*/
export function saveDeptInfo(data) {
export function GetMsgBaseTemplatePageList(data) {
return request({
url: '/User/SetDept',
url: '/Msg/GetMsgBaseTemplatePageList',
method: 'post',
data
});
}
/**
* 获取部门信息
* 获取短信设置模板类型
*/
export function getDeptInfo(data) {
export function GetBaseTemplateTypeEnumList(data) {
return request({
url: '/User/GetDept',
url: '/Msg/GetBaseTemplateTypeEnumList',
method: 'post',
data
});
}
/**
* 设置部门状态
* 短信设置 保存数据
*/
export function setDeptStatusInfo(data) {
export function SetMsgBaseTemplate(data) {
return request({
url: '/User/RemoveDept',
url: '/Msg/SetMsgBaseTemplate',
method: 'post',
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 @@
<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="row wrap">
<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
map-options :rules="[val => !!val || '请选择所属校区']" />
<!-- <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-->
<!-- 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"
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"
......@@ -52,6 +68,8 @@
<script>
import selectTree from '../common/select-tree'
import selectSearch from '../../components/common/select-search'
import {
getDeptTree,
saveDeptInfo,
......@@ -74,7 +92,8 @@
}
},
components: {
selectTree
selectTree,
selectSearch
},
data() {
return {
......@@ -86,7 +105,7 @@
DeptTel: "", //部门联系电话
ManagerIds: "", //部门负责人编号
Status: 0, //状态(0-正常,1-禁用),
School_Id: 0, //校区编号
School_Id: '', //校区编号
DeptTier: 0, //部门层级
DeptSort: 0, //部门排序
},
......@@ -193,7 +212,7 @@
this.objOption.Status = 0;
this.objOption.DeptSort = 0;
this.objOption.DeptTier = 0;
this.objOption.School_Id = 0;
this.objOption.School_Id = '';
this.tempManager = [];
}
},
......@@ -232,6 +251,12 @@
}).catch(() => {
this.saveLoading = false
})
},
returnData(data,type){
if(type==1){
this.objOption.School_Id = data;
}
}
},
}
......
......@@ -39,6 +39,10 @@
saveObj: {
type: Object,
default: null
},
paramObj:{
type:Number,
default:0
}
},
data() {
......@@ -46,7 +50,7 @@
persistent: true,
objOption: {
Id: 0, //主键编号
Menu_Id: 0, //菜单编号
MenuId: 0, //菜单编号
FunctionName: "", //权限名称
FunctionCode: "", //权限编号
Remarks: "", //权限备注
......@@ -67,7 +71,7 @@
Id: this.saveObj.Id
}).then(res => {
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.FunctionCode = res.Data.FunctionCode;
this.objOption.Remarks = res.Data.Remarks;
......@@ -77,7 +81,7 @@
} else {
this.optionTitle = "新增菜单功能权限"
this.objOption.Id = 0;
this.objOption.Menu_Id = 0;
this.objOption.MenuId = this.paramObj;
this.objOption.FunctionName = "";
this.objOption.FunctionCode = "";
this.objOption.Remarks = "";
......
<style>
.post-form .tranbox .el-transfer-panel{
width: 300px;
}
.post-form .tranbox .el-button{
padding: 7px 10px;
}
</style>
<template>
<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>
<div class="text-h6">{{objOption.MenuId==0?'新增岗位信息':'修改岗位信息'}}</div>
</q-card-section>
......@@ -18,6 +26,21 @@
<div class="text-grey-6 text-caption">注意:关闭后,岗位将无法正常使用.</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-separator />
<q-card-actions align="right" class="bg-white">
......@@ -39,6 +62,11 @@
savePostInfo
}
from '../../api/system/post'
//角色相关
import {
queryRoleDropdown
}
from '../../api/system/index'
export default {
props: {
saveObj: {
......@@ -57,22 +85,36 @@
PostName: "", //岗位名称
RB_Dept_Id: 0, //所属部门
Status: 0, //状态(0-正常,1-禁用),
PostRoleList: [], //岗位角色列表
},
optionTitle: "",
returnString: [],
//岗位树形列表
DeptTreeList: [],
saveLoading: false,
PersionList: [],
RoleList: [], //角色列表
data: [],
value: [],
filterMethod(query, item) {//根据名称搜索
return item.RoleName.indexOf(query) > -1;
}
}
},
created() {
this.getRoleList();
this.queryDeptTree();
},
mounted() {
this.initObj()
},
methods: {
//获取角色列表
getRoleList() {
queryRoleDropdown({}).then(res => {
this.RoleList = res.Data;
this.data = res.Data;
})
},
getChild(menuArray) {
var tempStr = "";
if (menuArray && menuArray != '') {
......@@ -99,6 +141,12 @@
this.returnString.push(this.objOption.RB_Dept_Id);
this.objOption.PostName = res.Data.PostName;
this.objOption.Status = res.Data.Status;
if(res.Data.PostRoleList.length>0){
res.Data.PostRoleList.forEach(x=>{
this.value.push(x.RoleId)
})
}
})
this.optionTitle = "修改岗位信息"
} else {
......@@ -109,6 +157,7 @@
this.objOption.Status = 0;
}
},
//关闭弹窗
closeSaveForm() {
this.$emit('close')
......@@ -116,7 +165,18 @@
},
//保存岗位
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 => {
this.saveLoading = false
this.$q.notify({
......
This diff is collapsed.
<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 @@
<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 @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.MName" label="姓名" />
</div>
<div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.MTel" label="电话" />
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.EmployeeName"
label="员工姓名/账号" />
</div>
<div class="col-3">
<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" />
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.Status" :options="AuditOpts"
emit-value map-options label="状态" />
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.MTel" label="电话" />
</div>
</div>
<div class="page-option">
<q-btn color="accent" class="q-mr-md" icon="add" label="新增管理者" @click="EditManager(null)" />
......@@ -23,18 +23,18 @@
</div>
<div class="page-content">
<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">
<template v-slot:body-cell-MHead="props">
<template v-slot:body-cell-EmployeeIcon="props">
<q-td auto-width :props="props">
<q-avatar size="md" v-if="props.value">
<img :src="props.value" />
</q-avatar>
<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>
</template>
<template v-slot:body-cell-MName="props">
<template v-slot:body-cell-EmployeeName="props">
<q-td :props="props">
<div class="text-blue cursor-pointer">{{props.value}}</div>
</q-td>
......@@ -59,12 +59,10 @@
<div style="min-width:190px;width:100%">
<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)" />
<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="编辑"
@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>
</q-td>
</template>
......@@ -84,6 +82,7 @@
import {
resetPassword
} from '../../api/users/user.js'
import{getChildDepartment}from '../../api/system/dept.js'
import managerForm from '../../components/school/manager/manager-form'
export default {
meta: {
......@@ -96,28 +95,22 @@
return {
currentUrl: "",
columns: [{
name: 'MHead',
name: 'EmployeeIcon',
label: '',
field: 'MHead',
field: 'EmployeeIcon',
align: 'left',
},
{
name: 'MName',
name: 'EmployeeName',
required: true,
label: '管理者姓名',
label: '姓名',
align: 'left',
field: row => row.MName
},
{
name: 'MTel',
label: '手机号码',
field: 'MTel',
align: 'left'
field: row => row.EmployeeName
},
{
name: 'SName',
label: '所属校区',
field: 'SName',
name: 'SchoolName',
label: '公司',
field: 'SchoolName',
align: 'left',
},
{
......@@ -128,33 +121,51 @@
},
{
name: 'PostName',
label: '位',
label: '位',
field: 'PostName',
align: 'left',
},
{
name: 'Status',
label: '状态',
field: 'Status',
align: 'left',
name: 'Sex',
label: '性别',
field: 'Sex',
align: 'left'
},
{
name: 'CreateByName',
label: '创建人',
name: 'Account',
label: '账号',
align: 'left',
field: 'CreateByName'
field: 'Account'
},
{
name: 'CreateTimeStr',
label: '创建时间',
name: 'EmployeePhone',
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',
field: 'CreateTimeStr'
},
{
name: 'ManagerAccount',
label: '账号',
name: 'Remarks',
label: '行政备注',
field: 'Remarks',
align: 'left',
field: 'ManagerAccount'
},
{
name: 'optioned',
......@@ -164,27 +175,22 @@
],
data: [],
loading: true,
AuditOpts: [{
label: '全部',
value: '-1'
},
{
label: '正常',
value: '0'
},
{
label: '禁用',
value: '1'
},
],
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
MName: "",
MTel: "",
Status: "-1",
School_Id: 0,
School_Id: 0, //校区
Dept_Id: 0, //部门
Post_Id: 0, //岗位编号
LeaveStatus: -1, //在职状态
StartEntryTime: "", //入职开始时间
EndEntryTime: "", //入职结束时间
StartLeaveTime: "", //开始离职时间
EndLeaveTime: "", //结束离职时间
StartBirthDate: "", //开始生日
EndBirthDate: "", //结束生日
EmployeeName: "", //员工姓名电话
},
schoolTemp: "",
pageCount: 0,
......@@ -325,7 +331,7 @@
refreshPage() {
if (!this.managerOption) {
this.msg.pageIndex = 1;
this.msg.MName = "";
this.msg.EmployeeName = "";
this.msg.MTel = "";
this.msg.Status = "-1";
this.msg.School_Id = 0;
......
......@@ -2,10 +2,27 @@
<div class="page-body">
<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="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">
<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" />
<selectSearch
classStr="col-12 q-pr-lg q-pb-lg"
:Data='schoolList'
optionValue="SId"
optionLabel="SName"
:densetype="false"
:vModel="msg.School_Id"
label="校区"
@returnData="returnData"
:useInput="true"
:reactiveRules="false"
type="1"
>
</selectSearch>
</div>
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.DeptName"
......@@ -40,6 +57,11 @@
title="注意:关闭后,分类将无法正常使用." @input="SetDeptStatus(props.row)" />
</q-td>
</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>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
......@@ -70,30 +92,31 @@
} from '../../api/system/index'
import deptForm from '../../components/system/dept-form'
import selectTree from '../../components/common/select-tree'
import selectSearch from '../../components/common/select-search'
export default {
meta: {
title: "部门管理"
},
components: {
deptForm,
selectTree
selectTree,
selectSearch
},
data() {
return {
currentUrl: "",
columns: [{
name: 'SchoolName',
label: '校区',
field: 'SchoolName',
align: 'left'
},
{
name: 'DeptName',
required: true,
label: '部门名称',
align: 'left',
field: row => row.DeptName
},
{
name: 'School_Id',
label: '是否为公司',
field: 'School_Id',
align: 'left'
},
{
name: 'DeptTier',
label: '部门层级',
......@@ -307,7 +330,15 @@
}).onCancel(() => {
obj.Status = obj.Status == 1 ? 0 : 1;
});
},
returnData(data,type){
if(type==1){
this.msg.School_Id = data;
}
this.resetSearch()
}
}
}
......
......@@ -27,7 +27,7 @@
</q-td>
</template>
</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>
</div>
</div>
......
This diff is collapsed.
<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 = [{
component: () =>
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", //课程分类
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