|
@@ -5,6 +5,15 @@
|
|
<span>登录配置</span>
|
|
<span>登录配置</span>
|
|
</div>
|
|
</div>
|
|
<a-card :bordered="false" class="iotmenu-content">
|
|
<a-card :bordered="false" class="iotmenu-content">
|
|
|
|
+ <!-- 查询区域 -->
|
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
|
+ <div class="iotmenu-search-container">
|
|
|
|
+ <div class="item-search-btn">
|
|
|
|
+ <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 查询区域-END -->
|
|
<div>
|
|
<div>
|
|
<a-table
|
|
<a-table
|
|
ref="table"
|
|
ref="table"
|
|
@@ -24,8 +33,7 @@
|
|
</template>
|
|
</template>
|
|
<template slot="imgSlot" slot-scope="text,record">
|
|
<template slot="imgSlot" slot-scope="text,record">
|
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
|
- <img v-if="isDefault && text" :src="text" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
|
|
|
- <img v-if="!isDefault && text" :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
|
|
|
|
|
+ <img v-if="text" :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
|
</template>
|
|
</template>
|
|
<template slot="fileSlot" slot-scope="text">
|
|
<template slot="fileSlot" slot-scope="text">
|
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
|
@@ -40,11 +48,35 @@
|
|
</a-button>
|
|
</a-button>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
+ <!-- 状态渲染模板 -->
|
|
|
|
+ <template slot="customRenderStatus" slot-scope="status">
|
|
|
|
+ <a-tag v-if="status==0" color="green">启用</a-tag>
|
|
|
|
+ <a-tag v-if="status==1" color="orange">禁用</a-tag>
|
|
|
|
+ </template>
|
|
|
|
+
|
|
<span slot="action" slot-scope="text, record">
|
|
<span slot="action" slot-scope="text, record">
|
|
<a-tooltip style="margin-right: 10px;">
|
|
<a-tooltip style="margin-right: 10px;">
|
|
<template slot="title"> 设置 </template>
|
|
<template slot="title"> 设置 </template>
|
|
<span class="edit-btn" @click="handleEdit(record)"></span>
|
|
<span class="edit-btn" @click="handleEdit(record)"></span>
|
|
</a-tooltip>
|
|
</a-tooltip>
|
|
|
|
+ <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
|
|
|
+ <a-tooltip>
|
|
|
|
+ <template slot="title"> 删除 </template>
|
|
|
|
+ <span class="delete-btn"></span>
|
|
|
|
+ </a-tooltip>
|
|
|
|
+ </a-popconfirm>
|
|
|
|
+ <a-popconfirm v-if="record.status==='0'" title="确定禁用吗?" @confirm="() => handleStatus(record.id,1)">
|
|
|
|
+ <a-tooltip>
|
|
|
|
+ <template slot="title"> 禁用 </template>
|
|
|
|
+ <span class="copy-btn"></span>
|
|
|
|
+ </a-tooltip>
|
|
|
|
+ </a-popconfirm>
|
|
|
|
+ <a-popconfirm v-if="record.status==='1'" title="确定启用吗?" @confirm="() => handleStatus(record.id,0)">
|
|
|
|
+ <a-tooltip>
|
|
|
|
+ <template slot="title"> 启用 </template>
|
|
|
|
+ <span class="copy-btn"></span>
|
|
|
|
+ </a-tooltip>
|
|
|
|
+ </a-popconfirm>
|
|
</span>
|
|
</span>
|
|
|
|
|
|
</a-table>
|
|
</a-table>
|
|
@@ -60,7 +92,7 @@
|
|
import '@/assets/less/TableExpand.less'
|
|
import '@/assets/less/TableExpand.less'
|
|
import { mixinDevice } from '@/utils/mixin'
|
|
import { mixinDevice } from '@/utils/mixin'
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
- import { getAction } from '@/api/manage'
|
|
|
|
|
|
+ import { getAction, postAction } from '@/api/manage'
|
|
import LoginConfigModal from './modules/LoginConfigModal'
|
|
import LoginConfigModal from './modules/LoginConfigModal'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -72,7 +104,7 @@
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
description: '联锁登陆页配置表管理页面',
|
|
description: '联锁登陆页配置表管理页面',
|
|
- isDefault: true,
|
|
|
|
|
|
+ // isDefault: true,
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
// {
|
|
// {
|
|
@@ -118,6 +150,12 @@
|
|
dataIndex: 'companyCopyright'
|
|
dataIndex: 'companyCopyright'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
|
|
+ title:'状态',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'status',
|
|
|
|
+ scopedSlots: { customRender: 'customRenderStatus' },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
title: '操作',
|
|
title: '操作',
|
|
dataIndex: 'action',
|
|
dataIndex: 'action',
|
|
align:"center",
|
|
align:"center",
|
|
@@ -128,7 +166,8 @@
|
|
],
|
|
],
|
|
url: {
|
|
url: {
|
|
list: "/interlockLoginConfig/interlockLoginConfig/list",
|
|
list: "/interlockLoginConfig/interlockLoginConfig/list",
|
|
- // delete: "/jeecg-boot/interlockLoginConfig/interlockLoginConfig/delete",
|
|
|
|
|
|
+ delete: "/interlockLoginConfig/interlockLoginConfig/delete",
|
|
|
|
+ editStatus: "/interlockLoginConfig/interlockLoginConfig/editStatus",
|
|
// deleteBatch: "/loginConfig/loginConfig/deleteBatch",
|
|
// deleteBatch: "/loginConfig/loginConfig/deleteBatch",
|
|
// exportXlsUrl: "/loginConfig/loginConfig/exportXls",
|
|
// exportXlsUrl: "/loginConfig/loginConfig/exportXls",
|
|
// importExcelUrl: "loginConfig/loginConfig/importExcel",
|
|
// importExcelUrl: "loginConfig/loginConfig/importExcel",
|
|
@@ -162,18 +201,21 @@
|
|
if (res.success) {
|
|
if (res.success) {
|
|
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
|
var data = res.result.records||res.result
|
|
var data = res.result.records||res.result
|
|
- if(data.length === 0){
|
|
|
|
- this.isDefault = true
|
|
|
|
- this.dataSource.push({
|
|
|
|
- id: 'defalut001',
|
|
|
|
- logoPic: require('@/assets/logo.png'),
|
|
|
|
- backPic: require('@/assets/login.png'),
|
|
|
|
- companyCopyright: '© 1983-2024 Advantech Co., Ltd.',
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- this.isDefault = false
|
|
|
|
- this.dataSource = data
|
|
|
|
- }
|
|
|
|
|
|
+ // if(data.length === 0){
|
|
|
|
+ // this.isDefault = true
|
|
|
|
+ // this.dataSource.push({
|
|
|
|
+ // id: 'defalut001',
|
|
|
|
+ // logoPic: require('@/assets/logo.png'),
|
|
|
|
+ // backPic: require('@/assets/login.png'),
|
|
|
|
+ // companyCopyright: '© 1983-2024 Advantech Co., Ltd.',
|
|
|
|
+ // })
|
|
|
|
+ // } else {
|
|
|
|
+ // this.isDefault = false
|
|
|
|
+ // this.dataSource = data
|
|
|
|
+ // }
|
|
|
|
+ // this.isDefault = false
|
|
|
|
+ console.log("data", data)
|
|
|
|
+ this.dataSource = data
|
|
if(res.result.total)
|
|
if(res.result.total)
|
|
{
|
|
{
|
|
this.ipagination.total = res.result.total;
|
|
this.ipagination.total = res.result.total;
|
|
@@ -192,7 +234,20 @@
|
|
this.$refs.modalForm.edit(record);
|
|
this.$refs.modalForm.edit(record);
|
|
this.$refs.modalForm.title = "编辑";
|
|
this.$refs.modalForm.title = "编辑";
|
|
this.$refs.modalForm.disableSubmit = false;
|
|
this.$refs.modalForm.disableSubmit = false;
|
|
- this.$refs.modalForm.isDefault = this.isDefault;
|
|
|
|
|
|
+ },
|
|
|
|
+ handleStatus(id, status) {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ var params = {id: id, status: status};//查询条件
|
|
|
|
+ console.log("params", params)
|
|
|
|
+ postAction(this.url.editStatus, params).then((res) => {
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.loadData()
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.warning(res.message)
|
|
|
|
+ }
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
initDictConfig(){
|
|
initDictConfig(){
|
|
},
|
|
},
|