This commit is contained in:
xd 2024-07-10 16:36:34 +08:00
parent 4724fca487
commit eb594c0c21
24 changed files with 1028 additions and 940 deletions

View File

@ -4,6 +4,7 @@ import dialogDrag from './dialog/drag'
import dialogDragWidth from './dialog/dragWidth'
import dialogDragHeight from './dialog/dragHeight'
import clipboard from './module/clipboard'
import tableHeight from './table/tableHeight'
const install = function(Vue) {
Vue.directive('hasRole', hasRole)
@ -12,6 +13,7 @@ const install = function(Vue) {
Vue.directive('dialogDrag', dialogDrag)
Vue.directive('dialogDragWidth', dialogDragWidth)
Vue.directive('dialogDragHeight', dialogDragHeight)
Vue.directive('tableHeight', tableHeight)
}
if (window.Vue) {

View File

@ -0,0 +1,35 @@
import { addResizeListener, removeResizeListener } from 'element-ui/src/utils/resize-event'
// 设置表格高度
const doResize = (el, binding) => {
// 获取调用传递过来的数据
const { value } = binding
// 获取距底部距离(用于展示页码等信息)
const customHeight = (value && value.customHeight) || 76
// 计算列表高度
const height = window.innerHeight - el.getBoundingClientRect().top - customHeight
// 设置高度
el.style.height = height + "px"
}
export default {
// 初始化设置
bind(el, binding) {
// 设置resize监听方法
el.resizeListener = () => {
doResize(el, binding)
}
// 绑定监听方法到addResizeListener
addResizeListener(window.document.body, el.resizeListener)
},
// 所在组件的 VNode 更新时设置
// 页面上搜索表单是可以展开收起的,当展开更多表单搜索时,表格高度没变
update(el, binding) {
doResize(el, binding)
},
// 销毁时设置
unbind(el) {
// 移除resize监听
removeResizeListener(window.document.body, el.resizeListener)
}
}

View File

@ -89,7 +89,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="clMaterialList" :row-class-name="rowClMaterialIndex" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" v-loading="loading" :data="clMaterialList" :row-class-name="rowClMaterialIndex" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="index" width="80"/>
<el-table-column label="id" align="center" prop="materialId" v-if="false"/>
@ -120,6 +121,7 @@
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"

View File

@ -116,7 +116,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="客户ID" align="center" prop="cusId" v-if="false"/>
<el-table-column fixed label="审批状态" align="center" prop="cusApprovalStatus" width="100">
@ -163,6 +164,7 @@
</el-table-column>
-->
</el-table>
</div>
<pagination
v-show="total>0"

View File

@ -69,7 +69,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table width="100%" v-loading="loading" :data="factoryList" :row-class-name="rowFactoryIndex" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" width="100%" v-loading="loading" :data="factoryList" :row-class-name="rowFactoryIndex" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="index" width="80"/>
<el-table-column label="id" align="center" prop="factoryId" v-if="false"/>
@ -102,6 +103,7 @@
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"

View File

@ -97,7 +97,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="materialList" :row-class-name="rowCMaterialIndex" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" v-loading="loading" :data="materialList" :row-class-name="rowCMaterialIndex" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="index" width="80"/>
<el-table-column label="id" align="center" prop="materialId" v-if="false"/>
@ -130,6 +131,7 @@
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"

View File

@ -79,7 +79,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="materialTypeList" :row-class-name="rowCMaterialTypeIndex" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" v-loading="loading" :data="materialTypeList" :row-class-name="rowCMaterialTypeIndex" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="index" width="80"/>
<el-table-column label="id" align="center" prop="typeId" v-if="false"/>
@ -109,6 +110,7 @@
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"

View File

@ -91,7 +91,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" v-loading="loading" :data="jobList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="任务编号" width="100" align="center" prop="jobId" />
<el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
@ -142,6 +143,7 @@
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"

View File

@ -98,7 +98,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="访问编号" align="center" prop="infoId" />
<el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
@ -118,6 +119,7 @@
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"

View File

@ -23,7 +23,10 @@
</el-form-item>
</el-form>
<div v-tableHeight="{customHeight: 76}">
<el-table
height="100%"
v-loading="loading"
:data="list.slice((pageNum-1)*pageSize,pageNum*pageSize)"
style="width: 100%;"
@ -57,6 +60,7 @@
</template>
</el-table-column>
</el-table>
</div>
<pagination v-show="total>0" :total="total" :page.sync="pageNum" :limit.sync="pageSize" />
</div>

View File

@ -111,7 +111,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="日志编号" align="center" prop="operId" />
<el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />
@ -150,6 +151,7 @@
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"

View File

@ -60,7 +60,8 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="priceVerificationList" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" v-loading="loading" :data="priceVerificationList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="核价单Id" align="center" prop="quotHjId" v-if="false"/>
<el-table-column fixed label="核价单号" align="center" prop="quotHjCode" width="280px">
@ -94,6 +95,9 @@
</template>
</el-table-column>
</el-table>
<!-- 添加或修改报价单-核价单对话框 -->
<hjDialog ref="hjDialog" @refreshList="getList"></hjDialog>
</div>
<pagination
v-show="total>0"
@ -102,9 +106,6 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改报价单-核价单对话框 -->
<hjDialog ref="hjDialog" @refreshList="getList"></hjDialog>
</div>
</template>
<style>

View File

@ -156,7 +156,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="quotList" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" v-loading="loading" :data="quotList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="报价单ID" align="center" prop="quotId" v-if="false"/>
<el-table-column fixed label="询价单号" align="center" prop="quotCode" width="250px">
@ -234,6 +235,8 @@
</el-table-column>
<el-table-column label="审核人" align="center" prop="quotCheckUserNickname" />
</el-table>
</div>
<pagination
v-show="total>0"
@ -994,7 +997,6 @@
<span style="margin-left: 10px" v-hasPermi="['quot:quot:reject']"><el-button type="danger" plain @click="rejectQuotForm" v-if="this.form.quotApprovalStatus == '1'&&this.form.quotJsxzApprovalStatus != '1'&&this.form.quotHjApprovalStatus != '1'&&this.form.quotJswApprovalStatus != '1'&&this.form.quotOAApprovalStatus != '1'">驳回</el-button></span>
</div>
</div>
</el-dialog>
<!-- 客户选择对话框-->
<CustomerSelect ref="customerSelect" :open="customerOpen" @submit="submitCustomer" @cancel="customerOpen=false"></CustomerSelect>
@ -1031,6 +1033,9 @@
<el-button @click="productUpload.open = false"> </el-button>
</div>
</el-dialog>
</el-dialog>
</div>
</template>
<style>

View File

@ -26,7 +26,8 @@
</el-form-item>
</el-form>
<el-table width="100%" v-loading="loading" :data="quotsList" :row-class-name="rowQuotsIndex">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" width="100%" v-loading="loading" :data="quotsList" :row-class-name="rowQuotsIndex">
<el-table-column fixed="left" label="序号" align="center" prop="index" width="50"/>
<el-table-column fixed="left" label="操作" align="center" width="100" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -50,6 +51,7 @@
<el-table-column label="创建日期" width="180" align="center" prop="createTime" />
<el-table-column label="更新日期" width="180" align="center" prop="updateTime" />
</el-table>
</div>
<!-- 报价详情对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1050px" v-el-drag-dialog append-to-body>

View File

@ -85,7 +85,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="sysSapUserList" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" v-loading="loading" :data="sysSapUserList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label=" ID" align="center" prop="sapUserId" v-if="false"/>
<el-table-column label="SAP账户" align="center" prop="sapUserBm" />
@ -112,6 +113,7 @@
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"

View File

@ -102,7 +102,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" v-loading="loading" :data="configList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="参数主键" align="center" prop="configId" />
<el-table-column label="参数名称" align="center" prop="configName" :show-overflow-tooltip="true" />
@ -138,6 +139,8 @@
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"

View File

@ -48,7 +48,9 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<div v-tableHeight="{customHeight: 76}">
<el-table
height="100%"
v-if="refreshTable"
v-loading="loading"
:data="deptList"
@ -95,6 +97,7 @@
</template>
</el-table-column>
</el-table>
</div>
<!-- 添加或修改部门对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>

View File

@ -107,7 +107,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="字典编号" align="center" prop="dictId" />
<el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
@ -148,6 +149,7 @@
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"

View File

@ -48,7 +48,9 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<div v-tableHeight="{customHeight: 76}">
<el-table
height="100%"
v-if="refreshTable"
v-loading="loading"
:data="menuList"
@ -101,6 +103,7 @@
</template>
</el-table-column>
</el-table>
</div>
<!-- 添加或修改菜单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>

View File

@ -69,7 +69,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="noticeId" width="100" />
<el-table-column
@ -113,6 +114,7 @@
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"

View File

@ -79,7 +79,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="岗位编号" align="center" prop="postId" />
<el-table-column label="岗位编码" align="center" prop="postCode" />
@ -114,6 +115,7 @@
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"

View File

@ -97,7 +97,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" v-loading="loading" :data="roleList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="角色编号" prop="roleId" width="120" />
<el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true" />
@ -146,6 +147,7 @@
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"

View File

@ -57,7 +57,8 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="jsqrList" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" v-loading="loading" :data="jsqrList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="quotJsqrId" v-if="false"/>
<el-table-column fixed label="技术确认单编号" align="center" prop="quotJsqrCode" width="280px">
@ -106,6 +107,9 @@
</template>
</el-table-column>
</el-table>
<!-- 添加或修改报价单-技术确认单对话框 -->
<jsqrDialog ref="jsqrDialog" @refreshList="getList"></jsqrDialog>
</div>
<pagination
v-show="total>0"
@ -114,9 +118,6 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改报价单-技术确认单对话框 -->
<jsqrDialog ref="jsqrDialog" @refreshList="getList"></jsqrDialog>
</div>
</template>
<script>

View File

@ -80,7 +80,8 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
<div v-tableHeight="{customHeight: 76}">
<el-table height="100%" v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"></el-table-column>
<el-table-column label="序号" type="index" width="50" align="center">
<template slot-scope="scope">
@ -149,6 +150,8 @@
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"
:total="total"