mirror of
https://gitee.com/XiaoLFeng/JSL_OrganizeInternalOA_Web.git
synced 2025-06-08 11:43:04 +08:00
管理界面完善4.
This commit is contained in:
parent
6a5cfa8e68
commit
7b57e4cb68
@ -28,13 +28,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 表格内容-->
|
<!-- 表格内容-->
|
||||||
<div style="width: 87vw; height: 78vh; margin: 0; padding: 0">
|
<div style="width: 87vw; height: 78vh; margin: 0; padding: 0">
|
||||||
<Table border :loading="loadingTable" ref="selection" :columns="columns" :data="stateInfo.data" style="height: 72vh ;text-align: center;" :row-class-name="setRowClassName" >
|
<Table border :loading="loadingTable" ref="selection" :columns="columns" :data="states.data" style="height: 72vh ;text-align: center;" :row-class-name="setRowClassName" >
|
||||||
<template #image="{ row, index }">
|
|
||||||
<Image :src="row.image" style="width: 10px; height: 10px"></Image>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #isActive="{ row, index }">
|
<template #isActive="{ row, index }">
|
||||||
<Switch size="large" v-model="row.isActive" :before-change="handleBeforeSwitchChange">
|
<Switch size="large" v-model="states.data[index].accountNoLocked" :before-change="handleBeforeSwitchChange">
|
||||||
<template #open>
|
<template #open>
|
||||||
<span>开启</span>
|
<span>开启</span>
|
||||||
</template>
|
</template>
|
||||||
@ -48,11 +46,13 @@
|
|||||||
<Button type="primary" size="small" style="margin-right: 5px" @click="showEditDialog(index, row)">详情</Button>
|
<Button type="primary" size="small" style="margin-right: 5px" @click="showEditDialog(index, row)">详情</Button>
|
||||||
<Button type="error" size="small" @click="showDeleteDialog(index, row)">删除</Button>
|
<Button type="error" size="small" @click="showDeleteDialog(index, row)">删除</Button>
|
||||||
</template>
|
</template>
|
||||||
|
<template #image="{row,index}">
|
||||||
|
<img :src="row.image" alt="" style="width: 50px;height: 50px;text-align: center">
|
||||||
|
</template>
|
||||||
|
|
||||||
</Table>
|
</Table>
|
||||||
<div style="height: 6vh ;text-align: left;padding-top: 20px">
|
<div style="height: 6vh ;text-align: left;padding-top: 20px">
|
||||||
<Page :total="30" size="small" show-elevator show-sizer />
|
<Page :total="10" size="small" show-elevator show-sizer />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -141,7 +141,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {Image, Page, Radio, RadioGroup, Space, Switch} from "view-ui-plus";
|
import {Page, Radio, RadioGroup, Space, Switch} from "view-ui-plus";
|
||||||
import requests from "../../public/request.js"
|
import requests from "../../public/request.js"
|
||||||
import {reactive, ref} from "vue";
|
import {reactive, ref} from "vue";
|
||||||
import message from "view-ui-plus/src/components/message/index.js";
|
import message from "view-ui-plus/src/components/message/index.js";
|
||||||
@ -169,33 +169,36 @@ const columns = reactive( [
|
|||||||
{
|
{
|
||||||
title: "图片",
|
title: "图片",
|
||||||
slot: "image",
|
slot: "image",
|
||||||
|
width: 80,
|
||||||
|
align: "center"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "作者",
|
||||||
|
key: "author",
|
||||||
|
width: 150,
|
||||||
align: "center"
|
align: "center"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "标题",
|
title: "标题",
|
||||||
|
width: 200,
|
||||||
key: "title",
|
key: "title",
|
||||||
width: 150,
|
|
||||||
align: "center"
|
align: "center"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "有效时间",
|
title: "创建时间",
|
||||||
key: "imageAddress",
|
key: "createdAt",
|
||||||
width: 150,
|
|
||||||
align: "center"
|
align: "center"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "图片地址",
|
title: "图片地址",
|
||||||
key: "imageAddress",
|
key: "image",
|
||||||
width: 150,
|
|
||||||
align: "center"
|
align: "center"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: "描述",
|
|
||||||
key: "descriptionx",
|
|
||||||
align: "center"
|
|
||||||
}, {
|
|
||||||
title: "排序",
|
title: "排序",
|
||||||
key: "displayOrder",
|
key: "displayOrder",
|
||||||
|
width: 80,
|
||||||
align: "center"
|
align: "center"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -272,23 +275,17 @@ onMounted(() => {
|
|||||||
* 方法函数
|
* 方法函数
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const stateInfo = reactive({
|
|
||||||
data: []
|
|
||||||
})
|
|
||||||
|
|
||||||
function getAll() {
|
function getAll() {
|
||||||
|
|
||||||
requests.infoGetHeaderImage(null,token).then((res)=>{
|
requests.infoGetHeaderImage(null,token).then((res)=>{
|
||||||
console.log(res)
|
console.log(res)
|
||||||
stateInfo.data = res.data.data.data
|
states.data = res.data.data.data
|
||||||
console.log(stateInfo.data)
|
|
||||||
// states.data = res.data.data
|
|
||||||
// console.log(res.data.data)
|
// console.log(res.data.data)
|
||||||
loadingTable.value = false
|
loadingTable.value = false
|
||||||
// for (let i = 0; i < res.data.data.length; i++) {
|
// for (let i = 0; i < res.data.data.data.length; i++) {
|
||||||
// states.data[i] = res.data.data[i].user
|
// states.data[i] = res.data.data.data[i].user
|
||||||
// }
|
// }
|
||||||
// console.log("getAll:",states.data)
|
// // console.log("getAll:",states.data)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user