| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- <template>
- <div class="ele-body">
- <el-card shadow="never" v-loading="loading">
- <equipment-search
- @search="reload"
- :networkCounts="networkCounts"
- ref="search"
- />
- <!-- 数据表格 -->
- <ele-pro-table
- ref="table"
- :columns="columns"
- :datasource="datasource"
- height="calc(100vh - 400px)"
- tool-class="ele-toolbar-form"
- cache-key="systemOrgUserTable"
- :initLoad="false"
- @select="selectChange"
- @select-all="changeSelectAll"
- >
- <!-- 表头工具栏 -->
- <template v-slot:toolbar="{ row }">
- <el-button
- size="small"
- type="primary"
- icon="el-icon-plus"
- class="ele-btn-icon"
- @click="add"
- >
- 新建
- </el-button>
- <!-- <el-button size="small" class="ele-btn-icon" @click="handlDelete"
- >删除</el-button
- >
- <el-button
- size="small"
- @click="moveTo(checkRadioData, 'move')"
- :disabled="checkRadioData.length == 0"
- class="ele-btn-icon"
- >移动到</el-button
- > -->
- </template>
- <!-- 编码列 -->
- <template v-slot:code="{ row }">
- <el-link type="primary" :underline="false" @click="details(row)">
- {{ row.code }}
- </el-link>
- </template>
- <!-- 操作列 -->
- <template v-slot:action="{ row }">
- <el-link
- type="primary"
- :underline="false"
- icon="el-icon-edit"
- @click="handEdit(row)"
- >
- 编辑
- </el-link>
- </template>
- </ele-pro-table>
- </el-card></div
- >
- </template>
- <script>
- import { getAssetList } from '@/api/ledgerAssets';
- import dictMixins from '@/mixins/dictMixins';
- import equipmentSearch from './components/search.vue';
- export default {
- mixins: [dictMixins],
- components: {
- equipmentSearch
- },
- data() {
- return {
- isConsumer: false,
- // 表格列配置
- columns: [
- {
- width: 45,
- type: 'selection',
- columnKey: 'selection',
- align: 'center'
- },
- {
- columnKey: 'index',
- type: 'index',
- label: '序号',
- width: 55,
- align: 'center',
- showOverflowTooltip: true,
- fixed: 'left'
- },
- {
- columnKey: 'code',
- prop: 'code',
- slot: 'code',
- align: 'center',
- label: '名称',
- showOverflowTooltip: true,
- minWidth: 110
- },
- {
- columnKey: 'code',
- align: 'center',
- prop: 'code',
- slot: 'code',
- label: '编码',
- showOverflowTooltip: true,
- minWidth: 180
- },
- {
- columnKey: 'code',
- prop: 'code',
- align: 'center',
- slot: 'code',
- label: '处置方式',
- showOverflowTooltip: true
- },
- {
- columnKey: 'code',
- prop: 'code',
- align: 'center',
- slot: 'code',
- label: '物品编码',
- showOverflowTooltip: true,
- minWidth: 180
- },
- {
- prop: 'name',
- align: 'center',
- label: '物品名称',
- showOverflowTooltip: true,
- minWidth: 110
- },
- {
- prop: 'category.modelType',
- align: 'center',
- label: '型号',
- showOverflowTooltip: true,
- minWidth: 110
- },
- {
- prop: 'category.specification',
- align: 'center',
- label: '规格',
- showOverflowTooltip: true,
- minWidth: 110
- },
- {
- align: 'center',
- prop: 'usePerson',
- label: '使用人',
- showOverflowTooltip: true,
- minWidth: 80
- },
- {
- prop: 'chargePerson',
- align: 'center',
- label: '负责人',
- showOverflowTooltip: true,
- minWidth: 80
- },
- {
- prop: 'status',
- align: 'center',
- label: '状态',
- showOverflowTooltip: true
- },
- {
- columnKey: 'action',
- slot: 'action',
- align: 'center',
- label: '操作',
- minWidth: 100,
- fixed: 'right'
- }
- ],
- networkCounts: {},
- checkRadioData: [],
- QRvisible: false
- };
- },
- computed: {},
- created() {},
- methods: {
- /* 表格数据源 */
- datasource({ page, limit, where, order }) {
- console.log('------reload-------');
- // this.getNetWork(page, limit, where, order);
- return getAssetList({
- ...where,
- ...order,
- pageNum: page,
- size: limit,
- categoryLevelId: this.categoryId,
- rootCategoryLevelId: this.rootId
- });
- },
- /* 刷新表格 */
- reload(where) {
- this.$refs.table.reload({ pageNum: 1, where: where });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- @media print {
- #printSection {
- font-size: 34px;
- span {
- font-size: 34px;
- }
- }
- }
- </style>
|