|
|
|
@ -6,19 +6,21 @@ import {
|
|
|
|
|
delRepTemplateListApi,
|
|
|
|
|
delRepTemplateApi,
|
|
|
|
|
queryRepTemplateApi,
|
|
|
|
|
getCategory,
|
|
|
|
|
} from '@/api/reporting/RepTemplate/RepTemplate'
|
|
|
|
|
import { TableData } from '@/api/reporting/RepTemplate/RepTemplate/types'
|
|
|
|
|
import { useTable } from '@/hooks/web/useTable'
|
|
|
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
|
|
|
import { Table, TableColumn } from '@/components/Table'
|
|
|
|
|
import { ElButton, ElLink, ElLoading, ElPopconfirm, ElMessage } from 'element-plus'
|
|
|
|
|
import { ElButton, ElLink, ElLoading, ElPopconfirm, ElMessage, ElTag } from 'element-plus'
|
|
|
|
|
import { Search } from '@/components/Search'
|
|
|
|
|
import { FormSchema } from '@/components/Form'
|
|
|
|
|
import { ContentWrap } from '@/components/ContentWrap'
|
|
|
|
|
import Write from './components/Write.vue'
|
|
|
|
|
import { Dialog } from '@/components/Dialog'
|
|
|
|
|
import { getWidth } from '@/utils';
|
|
|
|
|
import { getWidth, transfDictList } from '@/utils';
|
|
|
|
|
import Detail from './components/Detail.vue'
|
|
|
|
|
import { REPORTING_TATUS_LIST } from './constants'
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
|
|
|
|
@ -68,10 +70,6 @@ const tableColumns = reactive<TableColumn[]>([
|
|
|
|
|
field: 'uploadUser',
|
|
|
|
|
label: '上传人'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'tStatus',
|
|
|
|
|
label: '状态'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'tVersion',
|
|
|
|
|
label: '版本'
|
|
|
|
@ -88,6 +86,19 @@ const tableColumns = reactive<TableColumn[]>([
|
|
|
|
|
field: 'tDescription',
|
|
|
|
|
label: '描述'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'tStatus',
|
|
|
|
|
label: '状态',
|
|
|
|
|
formatter:(row:Recordable,_:TableColumn) =>{
|
|
|
|
|
const state=REPORTING_TATUS_LIST.find((item)=>item.value===row.tStatus)
|
|
|
|
|
if(state&&state.value =='1'){
|
|
|
|
|
return <ElTag type="primary">{state.label}</ElTag>
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
return <ElTag type="info">停用</ElTag>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'action',
|
|
|
|
|
label: t('tableDemo.action'),
|
|
|
|
@ -127,8 +138,12 @@ const searchSchema = reactive<FormSchema[]>([
|
|
|
|
|
{
|
|
|
|
|
field: 'tCategory',
|
|
|
|
|
label: '报告分类',
|
|
|
|
|
componentProps: {},
|
|
|
|
|
component: 'Select'
|
|
|
|
|
component: 'Select',
|
|
|
|
|
optionApi: async () => {
|
|
|
|
|
const res = await getCategory({ paramName: 'reportingType_param', systemCode: 'ordb' });
|
|
|
|
|
return transfDictList(res.body.result);
|
|
|
|
|
},
|
|
|
|
|
value: '1'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'createUser',
|
|
|
|
@ -242,7 +257,6 @@ const disabled = ref(true)
|
|
|
|
|
const onSelectionChange = (selection: TableData[]) => {
|
|
|
|
|
disabled.value = selection.length === 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|