代码优化

This commit is contained in:
仲么了
2024-01-31 14:14:51 +08:00
parent 5d09ad3459
commit 5bc06899d7
5 changed files with 18 additions and 24 deletions

View File

@@ -205,9 +205,6 @@ if (buttonsFilter.length > 3) {
buttons.value = buttonsFilter
}
const handlerCommand = (item: OptButton) => {
console.log('====================================')
console.log(item)
console.log('====================================')
switch (item.render) {
case 'basicButton':
onButtonClick(item)

View File

@@ -116,7 +116,7 @@ const handlerHeight = () => {
const computedSearchRow = () => {
const headerForm = document.getElementById('header-form') as HTMLElement
const headerFormSecond = document.getElementById('header-form-second') as HTMLElement
if(!headerForm) return
// 判断是否需要折叠
if (headerForm.scrollHeight > 50) {
showUnfoldButton.value = true

View File

@@ -4,7 +4,7 @@
<div style="flex: 1; font-weight: 700">待审核用户</div>
<el-button :icon="Check" type="primary" @click="addRole" class="ml10">审核通过</el-button>
</div>
<Table ref="tableRef" @checkbox-all="" @checkbox-change="" />
<Table ref="tableRef" />
</div>
</template>
<script setup lang="ts">
@@ -23,7 +23,7 @@ const tableStore = new TableStore({
method: 'POST',
url: '/user-boot/user/checkUserList',
column: [
{ width: '60', type: 'checkbox' },
// { width: '60', type: 'checkbox' },
{ title: '名称', field: 'name' },
{ title: '登录名', field: 'loginName' },
{ title: '角色', field: 'roleName' },
@@ -34,7 +34,7 @@ const tableStore = new TableStore({
{ title: '状态', field: 'stateName' },
{
title: '操作',
width: '10',
width: '180',
render: 'buttons',
buttons: [
{

View File

@@ -5,7 +5,6 @@
<el-button :icon="Refresh" type="primary" @click="refresh">刷新推荐码</el-button>
</div>
<Table ref="tableRef" />
<popupForm ref="popupRef"></popupForm>
</div>
</template>
<script setup lang="ts">

View File

@@ -1,30 +1,30 @@
<template>
<div class='dictiontary-list-detail'>
<div class="dictiontary-list-detail">
<TableHeader>
<template #select>
<el-page-header @back="$emit('close')" style='display: flex;align-items: center'>
<el-page-header @back="$emit('close')" style="display: flex; align-items: center; height: 32px">
<template #content>
<span class='text-large font-600 mr-3'> {{ props.detail.name }}详情信息 </span>
<span class="text-large font-600 mr-3">{{ props.detail.name }}详情信息</span>
</template>
</el-page-header>
<el-form-item label='过滤筛选'>
<el-form-item label="过滤筛选">
<el-input
style='width: 240px'
v-model='tableStore.table.params.searchValue'
style="width: 240px"
v-model="tableStore.table.params.searchValue"
clearable
placeholder='请输入名称或编码筛选'
placeholder="请输入名称或编码筛选"
/>
</el-form-item>
</template>
<template #operation>
<el-button :icon='Plus' type='primary' @click='add'>新增</el-button>
<el-button :icon="Plus" type="primary" @click="add">新增</el-button>
</template>
</TableHeader>
<Table ref='tableRef' />
<PopupDetailEdit ref='popupEditRef'></PopupDetailEdit>
<Table ref="tableRef" />
<PopupDetailEdit ref="popupEditRef"></PopupDetailEdit>
</div>
</template>
<script setup lang='ts'>
<script setup lang="ts">
import { Plus } from '@element-plus/icons-vue'
import { ref, onMounted, provide } from 'vue'
import TableStore from '@/utils/tableStore'
@@ -132,7 +132,7 @@ tableStore.table.params.searchValue = ''
tableStore.table.params.searchState = 0
tableStore.table.params.typeId = props.detail.id
if (props.detail.openLevel !== 1) {
tableStore.table.column = tableStore.table.column.filter((item: any) => item.field !== 'levelName' )
tableStore.table.column = tableStore.table.column.filter((item: any) => item.field !== 'levelName')
}
if (props.detail.openDescribe !== 1) {
tableStore.table.column = tableStore.table.column.filter((item: any) => item.field !== 'algoDescribe')
@@ -141,7 +141,6 @@ onMounted(() => {
tableStore.index()
})
const add = () => {
popupEditRef.value.open('新增', {
openLevel: props.detail.openLevel,
openDescribe: props.detail.openDescribe,
@@ -149,9 +148,8 @@ const add = () => {
typeId: props.detail.id
})
}
</script>
<style lang='scss'>
<style lang="scss">
.dictiontary-list-detail {
position: absolute;
top: 0;
@@ -160,4 +158,4 @@ const add = () => {
width: 100%;
background: #fff;
}
</style>
</style>