Commit ce928c61 by 蒋勇

d

parent 993f09c9
......@@ -17,12 +17,12 @@
v-model="searchValue"
/>
<Button @click="handleSearch" class="search-btn" type="text">
<Icon type="ios-locate-outline" />&nbsp;&nbsp;搜索
<Icon type="ios-locate-outline"/>&nbsp;&nbsp;搜索
</Button>
<span style="position:absolute;right:100px;">
<slot name="tblbtnarea">
<Button @click="advSearch" class="search-btn" type="text">
<Icon type="ios-search-outline" />&nbsp;&nbsp;高级
<Icon type="ios-search-outline"/>&nbsp;&nbsp;高级
</Button>
</slot>
</span>
......@@ -92,10 +92,10 @@ export default {
return [];
}
},
formatCol:{
type:Function,
default(){
return (row,key,index)=>row[key]
formatCol: {
type: Function,
default() {
return (row, key, index) => row[key];
}
},
columns: {
......@@ -115,7 +115,10 @@ export default {
type: Boolean,
default: false
},
isMulti: {
type: Boolean,
default: false
},
border: {
type: Boolean,
default: false
......@@ -189,8 +192,8 @@ export default {
};
},
methods: {
advSearch(){
this.$emit("on-adv-search")
advSearch() {
this.$emit("on-adv-search");
},
suportEdit(item, index) {
item.render = (h, params) => {
......@@ -253,7 +256,11 @@ export default {
{
props: {
type: btninfo.type,
disabled:params.row.isSystem && (btninfo.key=="delete" || btninfo.key=="edit")?true:false
disabled:
params.row.isSystem &&
(btninfo.key == "delete" || btninfo.key == "edit")
? true
: false
},
on: {
click: () => {
......@@ -283,13 +290,24 @@ export default {
return item;
},
handleColumns(columns) {
this.insideColumns = columns.map((item, index) => {
let res = item;
if (res.editable) res = this.suportEdit(res, index);
if (res.key === "handle") res = this.surportHandle(res);
return res;
});
if (this.isMulti) {
let ft = this.insideColumns.filter(it => {
it.type == "selection";
});
if (!ft || (ft && ft.length == 0)) {
this.insideColumns.unshift({
type: "selection",
width: 60,
align: "center"
});
}
}
},
setDefaultSearchKey() {
this.searchKey =
......@@ -306,12 +324,12 @@ export default {
// this.insideTableData = this.value.filter(
// item => item[this.searchKey].indexOf(this.searchValue) > -1
// );
if(this.searchKey && this.searchKey!=""){
let eobj={};
eobj[this.searchKey]=this.searchValue
this.$emit("on-rapid-query",eobj)
}else{
this.$emit("on-rapid-query",null)
if (this.searchKey && this.searchKey != "") {
let eobj = {};
eobj[this.searchKey] = this.searchValue;
this.$emit("on-rapid-query", eobj);
} else {
this.$emit("on-rapid-query", null);
}
},
handleTableData() {
......@@ -373,13 +391,15 @@ export default {
this.setDefaultSearchKey();
this.handleTableData();
},
computed:{
searchcols:function(){
return this.columns?this.columns.filter(item=>item.insearch):[]
computed: {
searchcols: function() {
return this.columns ? this.columns.filter(item => item.insearch) : [];
},
tmplcols(){
let rtns=this.columns.filter(item=>{ return item.slot && item.slot!=""})
return rtns
tmplcols() {
let rtns = this.columns.filter(item => {
return item.slot && item.slot != "";
});
return rtns;
}
}
};
......
......@@ -51,6 +51,35 @@ export default [
]
},
{
path: '/tanent',
name: 'tanent',
meta: {
icon: 'ios-settings',
title: '租户中心'
},
component: Main,
children: [
{
path: 'account_info',
name: 'account_info',
meta: {
icon: 'md-clipboard',
title: '帐户信息'
},
component: () => import('@/view/roleinfo/roleinfo_page.vue')
},
{
path: 'tanents_info',
name: 'tanents_info',
meta: {
icon: 'ios-man',
title: '租户信息'
},
component: () => import('@/view/appinfo/appinfo_page.vue')
}
]
},
{
path: '/app',
name: 'app',
meta: {
......
......@@ -5,7 +5,7 @@ export default {
{ title: 'APPKEY', key: 'appkey', sortable: true, insearch: false},//slot--自定义列 insearch--是否快速查询
{ title: '名称', key: 'name', sortable: true, insearch: true},//slot--自定义列 insearch--是否快速查询
{ title: '域名', key: 'domainName', sortable: true, insearch: true},//slot--自定义列 insearch--是否快速查询
{ title: '后端', key: 'backend', sortable: true, insearch: true},//slot--自定义列 insearch--是否快速查询
{ title: '服务', key: 'backend', sortable: true, insearch: true},//slot--自定义列 insearch--是否快速查询
{ title: '创建时间', key: 'created_at' ,slot:'created_at' },
{
title: '操作',
......
......@@ -6,7 +6,8 @@ export default {
{ title: '昵称', key: 'nickName', sortable: true, insearch: true },
{ title: '角色', key: 'roleName', sortable: false, insearch: false,slot:'roleName' },
{ title: '是否超管', key: 'isSuper', sortable: false, insearch: false,slot:'isSuper' },
{ title: '是否管理员', key: 'isAdmin', sortable: false, insearch: false,slot:'isAdmin' },
{ title: '是否租户', key: 'isAdmin', sortable: false, insearch: false,slot:'isAdmin' },
{ title: '是否启用', key: 'isEnabled', sortable: false, insearch: false,slot:'isEnabled' },
{ title: '邮件', key: 'mail', editable: true, insearch: true },
{ title: '创建时间', key: 'created_at' ,slot:'created_at' },
{
......@@ -22,12 +23,8 @@ export default {
{
"title":"关键信息",
ctls:[
{"type":"switch","label":"是否管理员","prop":"isAdmin","opentext":"是","closetext":"否","trurcolor":"","falsecolor":"","placeHolder":"请输入单次使用消耗的宝币数","style":""},
{"type":"switch","label":"是否启用","prop":"isEnabled","opentext":"是","closetext":"否","trurcolor":"","falsecolor":"","placeHolder":"","style":""},
{ "type": "input", "label": "帐户", "prop": "userName", "placeHolder": "请输入帐户名", "style": "", rules: [{ "required": true, "message": ' ', "trigger": 'blur' },] },
]
},
{
......
......@@ -29,6 +29,7 @@
@on-select="onsels"
@on-adv-search="advsearch"
:formatCol="formatCol"
:isMulti="isMulti"
>
<template v-slot:tblbtnarea="slotProps">
<Button
......@@ -43,6 +44,7 @@
<div style="text-align:center">
<Page
:total="pageInfo.total"
:page-size-opts="[15,30,50,100,200,500]"
:current.sync="pageInfo.pageNo"
:page-size="pageInfo.pageSize"
show-sizer
......@@ -360,18 +362,7 @@ export default {
this.fetchData();
},
created() {
if (this.isMulti && this.metainfo) {
let ft = this.metainfo["list"].filter(it => {
it.type == "selection";
});
if (!ft || (ft && ft.length==0)) {
this.metainfo["list"].unshift({
type: "selection",
width: 60,
align: "center"
});
}
}
},
computed: {
searchinfo() {
......
......@@ -10,7 +10,7 @@
right: 160px;
top: 50%;
transform: translateY(-60%);
width: 300px;
width: 350px;
&-header{
font-size: 16px;
font-weight: 300;
......
......@@ -5,10 +5,10 @@
<template>
<div class="login">
<div class="login-con">
<Card icon="log-in" title="欢迎登录" :bordered="false">
<Card icon="log-in" title="欢迎登录" :bordered="false" style="border-radius:0px">
<div class="form-con">
<login-form @on-success-valid="handleSubmit"></login-form>
<p class="login-tip">输入任意用户名和密码即可</p>
<p class="login-tip">注册</p>
</div>
</Card>
</div>
......
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