优化暂态事件列表

This commit is contained in:
guanj
2026-06-09 19:51:31 +08:00
parent 03d302ded8
commit bda7373133
48 changed files with 1834 additions and 1474 deletions

View File

@@ -3,12 +3,8 @@
<TableHeader>
<template v-slot:select>
<el-form-item label="项目名称">
<el-input maxlength="32" show-word-limit
v-model.trim="tableStore.table.params.searchValue"
placeholder="请输入项目名称"
></el-input>
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue" clearable
placeholder="请输入项目名称"></el-input>
</el-form-item>
</template>
<template v-slot:operation>
@@ -16,11 +12,8 @@
</template>
</TableHeader>
<!-- <Table ref="tableRef" /> -->
<div
style="overflow-x: hidden; overflow-y: scroll; padding: 0 10px"
v-loading="tableStore.table.loading"
:style="{ height: tableStore.table.height }"
>
<div v-if="tableStore.table.data.length != 0" style="overflow-x: hidden; overflow-y: scroll; padding: 0 10px"
v-loading="tableStore.table.loading" :style="{ height: tableStore.table.height }">
<el-row :gutter="12">
<el-col :span="6" v-for="item in tableStore.table.data" :key="item.id" class="mt10">
<el-card class="box-card" @click="querdata(item)" shadow="hover">
@@ -28,25 +21,15 @@
<span style="display: flex; align-items: center">
{{ item.name }}
<el-tooltip
class="item"
effect="dark"
content="修改项目"
placement="top"
v-if="hasAdmin || item.createBy == adminInfo.id"
>
<Edit
style="margin-left: 5px; width: 16px"
class="xiaoshou color"
@click="editd(item)"
/>
<el-tooltip class="item" effect="dark" content="修改项目" placement="top"
v-if="hasAdmin || item.createBy == adminInfo.id">
<Edit style="margin-left: 5px; width: 16px" class="xiaoshou color"
@click="editd(item)" />
</el-tooltip>
</span>
<div style="height: 32px">
<div
style="display: flex; justify-content: end"
v-if="hasAdmin || item.createBy == adminInfo.id"
>
<div style="display: flex; justify-content: end"
v-if="hasAdmin || item.createBy == adminInfo.id">
<!-- <el-button
class="color"
icon="el-icon-Promotion"
@@ -57,54 +40,36 @@
>
绑定
</el-button> -->
<el-button
class="color"
icon="el-icon-Share"
style="padding: 3px 0"
type="text"
@click="Aclick(item)"
>
<el-button class="color" icon="el-icon-Share" style="padding: 3px 0" type="text"
@click="Aclick(item)">
设计
</el-button>
<!-- <el-button icon="el-icon-share" style="padding: 3px 0; color: green"
type="text" @click="shejid(item)">设计</el-button> -->
<!-- <el-button icon="el-icon-edit" style="padding: 3px 0; color: blue" type="text"
@click="shejid(item)">编辑</el-button> -->
<el-button
icon="el-icon-Delete"
style="padding: 3px 0; color: red"
type="text"
@click="deleted(item)"
>
<el-button icon="el-icon-Delete" style="padding: 3px 0; color: red" type="text"
@click="deleted(item)">
删除
</el-button>
</div>
</div>
</div>
<img
v-if="item.fileContent"
:src="item.fileContent"
class="image xiaoshou"
@click="imgData(item)"
/>
<img v-if="item.fileContent" :src="item.fileContent" class="image xiaoshou"
@click="imgData(item)" />
<el-empty v-else description="暂无设计" style="height: 220px" />
</el-card>
</el-col>
</el-row>
</div>
<div class="table-pagination">
<el-pagination
:currentPage="tableStore.table.params!.pageNum"
:page-size="tableStore.table.params!.pageSize"
:page-sizes="[10, 20, 50, 100]"
background
:layout="'sizes,total, ->, prev, pager, next, jumper'"
:total="tableStore.table.total"
@size-change="onTableSizeChange"
@current-change="onTableCurrentChange"
></el-pagination>
</div>
<el-empty v-else description="暂无数据" :style="{ height: tableStore.table.height }" />
<div class="table-pagination">
<el-pagination :currentPage="tableStore.table.params!.pageNum"
:page-size="tableStore.table.params!.pageSize" :page-sizes="[10, 20, 50, 100]" background
:layout="'sizes,total, ->, prev, pager, next, jumper'" :total="tableStore.table.total"
@size-change="onTableSizeChange" @current-change="onTableCurrentChange"></el-pagination>
</div>
<popup ref="popupRef" @submit="tableStore.index()" />
</div>
</template>
@@ -142,7 +107,7 @@ const tableStore = new TableStore({
method: 'POST',
publicHeight: 60,
column: [],
loadCallback: () => {}
loadCallback: () => { }
})
provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
@@ -179,14 +144,14 @@ const activate = (e: any) => {
}
})
})
.catch(() => {})
.catch(() => { })
}
const getBindId = () => {
getByUserId({ userId: adminInfo.id }).then(res => {
bindId.value = res.data.pageId
})
}
const querdata = (e: any) => {}
const querdata = (e: any) => { }
const editd = (e: any) => {
popupRef.value.open({
title: '修改项目',
@@ -198,7 +163,7 @@ const Aclick = (e: any) => {
//window.open(window.location.origin + `/zutai/?id=${e.id}&&name=${e.name}&&preview=false&&graphicDisplay=zl`)
window.open(
window.location.origin +
`/zutai/?id=${e.id}&&name=${e.name}&&preview=false&&graphicDisplay=${VITE_FLAG ? 'ypt' : 'zl'}`
`/zutai/?id=${e.id}&&name=${e.name}&&preview=false&&graphicDisplay=${VITE_FLAG ? 'ypt' : 'zl'}`
)
}
// 删除
@@ -235,9 +200,8 @@ const deleted = (e: any) => {
const imgData = (e: any) => {
window.open(
window.location.origin +
`/zutai/?id=${e.id}&&name=${e.name}&&preview=true&&graphicDisplay=${VITE_FLAG ? 'ypt' : 'zl'}#/preview_${
VITE_FLAG ? 'YPT' : 'ZL'
}`
`/zutai/?id=${e.id}&&name=${e.name}&&preview=true&&graphicDisplay=${VITE_FLAG ? 'ypt' : 'zl'}#/preview_${VITE_FLAG ? 'YPT' : 'ZL'
}`
)
// window.open('http://192.168.1.128:4001' + `/zutai/?id=${e.id}&&name=${e.name}&&preview=true&&graphicDisplay=zl#/preview_ZL`)
}
@@ -311,7 +275,7 @@ span {
// 不可全选样式
.el-tree-node {
.is-leaf + .el-checkbox .el-checkbox__inner {
.is-leaf+.el-checkbox .el-checkbox__inner {
display: inline-block;
}