费用申请

szh-new
lijingjia 5 months ago
parent f2f819ea11
commit 5004dc3485

@ -16,6 +16,7 @@
<TableSetting
v-if="showTableSetting"
:setting="tableSetting"
:id="id"
@columns-change="handleColumnChange"
/>
</div>
@ -52,6 +53,10 @@
type: [String, Array] as PropType<string | string[]>,
default: '',
},
id: {
type: Number,
default: 0
}
},
emits: ['columns-change'],
setup(_, { emit }) {

@ -161,8 +161,14 @@
Icon,
},
emits: ['columns-change'],
props: {
id: {
type: Number,
default: 0
}
},
setup(_, { emit, attrs }) {
setup(props, { emit, attrs }) {
const { t } = useI18n()
const table = useTableContext()
@ -505,6 +511,7 @@
})
if (!type) {
let Apidata = {
id: props.id,
permissionId: '',
content: JSON.stringify({
columns: data,

@ -5,6 +5,7 @@
<ColumnSetting
v-if="getSetting.setting"
:get-popup-container="getTableContainer"
:id="id"
@columns-change="handleColumnChange"
/>
<FullScreenSetting v-if="getSetting.fullScreen" :get-popup-container="getTableContainer" />
@ -34,6 +35,10 @@
type: Object as PropType<TableSetting>,
default: () => ({}),
},
id: {
type: Number,
default: 0
}
},
emits: ['columns-change'],
setup(props, { emit }) {

@ -11,7 +11,7 @@ export function useTableHeader(
handlers: InnerHandlers,
) {
const getHeaderProps = computed((): Recordable => {
const { title, showTableSetting, titleHelpMessage, tableSetting } = unref(propsRef)
const { title, showTableSetting, titleHelpMessage, tableSetting, id } = unref(propsRef)
const hideTitle = !slots.tableTitle && !title && !slots.toolbar && !showTableSetting
if (hideTitle && !isString(title)) {
return {}
@ -25,6 +25,7 @@ export function useTableHeader(
TableHeader,
{
title,
id,
titleHelpMessage,
showTableSetting,
tableSetting,

@ -151,5 +151,10 @@ export const basicProps = {
showSearchForm: {
type: Boolean,
default: true
},
// 表格的id增加全选使用
id: {
type: Number,
default: 0
}
}

@ -214,7 +214,8 @@ export interface BasicTableProps<T = any> {
// 分页配置
pagination?: PaginationProps | boolean
// loading加载
loading?: boolean
loading?: boolean,
id?: Number,
/**
* The column contains children to display

@ -1,3 +1,5 @@
import { router } from "/@/router"
import { useMultipleTabStore } from '/@/store/modules/multipleTab'
// 格式表格时间
export function formatTableData(v) {
if (v) {
@ -8,3 +10,27 @@ export function formatTableData(v) {
return ''
}
}
/* ()
* topath: path
*/
export function closePage(topath) {
const tabStore = useMultipleTabStore()
// 当前路由
const fullPath = router?.currentRoute?._value?.fullPath
// 有目标路径则跳转
if (topath) {
router.push(topath)
} else {
// 父级路由
const parent = router?.options?.history?.state?.back
console.log(router)
// 如果存在父级路由,直接返回父级
if (parent) {
router.push(parent)
} else {
// 否则返回上一级路由
router.back()
}
}
}

@ -95,7 +95,8 @@
showIndexColumn: true,
canResize: false,
rowSelection: { type: 'checkbox' },
immediate: false
immediate: false,
id: 1
})
//
const add = () => {

@ -8,6 +8,7 @@
<a-spin :spinning="dloading">
<div class="ds-card">
<a-button @click="save" type="link">保存</a-button>
<a-button @click="deleteItem" type="link">删除</a-button>
</div>
<!-- 表单区域 -->
<div class="form-area">
@ -47,6 +48,7 @@
import { onMounted, ref } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import { useMessage } from '/@/hooks/web/useMessage'
import { closePage } from '/@/hooks/web/common'
import { BasicForm, useForm } from '/@/components/Form'
import ApplyInfo from './components/applyInfo.vue'
//
@ -153,6 +155,10 @@
init()
})
}
//
const deleteItem = () => {
closePage()
}
//
const init = () => {
const id = route.query.id

Loading…
Cancel
Save