Sfoglia il codice sorgente

Merge branch 'develop' of gitadmin/tuoheng_lc_web into release

tags/v1.2.0
zhangtao 1 anno fa
parent
commit
2b6975c503
3 ha cambiato i file con 12 aggiunte e 6 eliminazioni
  1. +2
    -2
      src/components/DataTable/tools/useDataSource.js
  2. +2
    -1
      src/views/basic-manage/material/components/MaterialDrawer.vue
  3. +8
    -3
      src/views/basic-manage/material/tools/materialTable.js

+ 2
- 2
src/components/DataTable/tools/useDataSource.js Vedi File

@@ -33,7 +33,7 @@ export function useDataSource(propsRef, { getPaginationInfo, setPagination, setL
...pageParams
}
const response = await request(params)
const res = noPagination ? response : response.data
const res = noPagination ? response.data : response.data
const resultTotal = res[totalField] || 0
const currentPage = res[listPageField]
// 如果数据异常,需获取正确的页码再次执行
@@ -47,7 +47,7 @@ export function useDataSource(propsRef, { getPaginationInfo, setPagination, setL
}
// 处理数据结构
const resultInfo = res[listField] ? res[listField] : res
dataSourceRef.value = dataType === 'tree' ? dealTree(resultInfo.data) : resultInfo
dataSourceRef.value = dataType === 'tree' ? dealTree(resultInfo) : resultInfo
setPagination({
[pageField]: currentPage,
[totalField]: Math.ceil(resultTotal / pageSize),

+ 2
- 1
src/views/basic-manage/material/components/MaterialDrawer.vue Vedi File

@@ -7,6 +7,7 @@
:columns="columns"
:row-key="(row) => row.id"
:request="loadDataTable"
:pagination="false"
size="large"
>
<template #tableTitle>
@@ -27,7 +28,7 @@ import { search } from '../tools/materialSearch.js'
import HeadSearch from '@/components/Search/index.vue'
import DataTable from '@/components/DataTable/index.vue'
import MaterialModal from './MaterialModal.vue'
import { defineComponent, reactive, unref, toRefs, computed, watch } from 'vue'
import { defineComponent, reactive, unref, toRefs, computed } from 'vue'
import { goodsList } from '@/api/basic/material.js'

export default defineComponent({

+ 8
- 3
src/views/basic-manage/material/tools/materialTable.js Vedi File

@@ -1,8 +1,7 @@
import { h, ref, reactive } from 'vue'
import TableImage from '@/components/DataTable/tools/Image.vue'
import TableTags from '@/components/DataTable/tools/Tags.vue'
import TableSwitch from '@/components/DataTable/tools/Switch.vue'
import TableAction from '@/components/DataTable/tools/Action.vue'
import { MATERIAL_TYPE } from '@/utils/dictionary.js'
import { deleteGoods } from '@/api/basic/material.js'

/* 注册table */
@@ -66,7 +65,13 @@ const data = reactive({
{
title: '物资类型',
key: 'goodsType',
align: 'center'
align: 'center',
render(row) {
return h(TableTags, {
data: row.goodsType,
filters: MATERIAL_TYPE
})
}
},
{
title: '物资库存',

Loading…
Annulla
Salva