Browse Source

SBBJ-1013问题分享平台管理,没有显示图片、文档列

master
zhaoyiran 1 month ago
parent
commit
6abf7cd78e
  1. 6
      src/components/Detail/src/Detail.vue
  2. 25
      src/views/eam/device/problemSharingPlatform/index.vue
  3. 4
      src/views/eam/device/problemSharingPlatform/problemSharingPlatform.data.ts

6
src/components/Detail/src/Detail.vue

@ -45,7 +45,11 @@
:data="detailData" :data="detailData"
:schema="allSchemas.detailSchema" :schema="allSchemas.detailSchema"
:columns="2" :columns="2"
/> >
<template v-for="name in Object.keys($slots)" :key="name" #[name]="{ row }">
<slot :name="name" :row="row"></slot>
</template>
</Descriptions>
<!-- 单表切换tabs 展现table --> <!-- 单表切换tabs 展现table -->
<Table <Table
v-if="isBasic && tabsExtend" v-if="isBasic && tabsExtend"

25
src/views/eam/device/problemSharingPlatform/index.vue

@ -27,9 +27,9 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #code="{row}"> <template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '代码', row.number)">
<span>{{ row.code }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
@ -51,7 +51,20 @@
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ProblemSharingPlatform.allSchemas" /> <Detail ref="detailRef" :isBasic="true" :allSchemas="ProblemSharingPlatform.allSchemas" >
<template #uploadImgs="{row}">
<!-- {{row.uploadImgs}} -->
<el-image v-for="(cur,key) in row.uploadImgs" :key="key"
style="width: 100px; height: 100px"
:src="cur.url"
/>
</template>
<template #uploadFiles="{row}">
<el-link type="primary" v-for="(cur,key) in row.uploadFiles" :key="key" @click="open1(cur)">{{ cur.name }}</el-link>
<!-- <div v-for="(cur,key) in row.uploadFiles" :key="key">{{ cur.url }}</div> -->
</template>
</Detail>
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/question/sharing-platform/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/question/sharing-platform/import" :importTemplateData="importTemplateData" @success="importSuccess" />
@ -75,7 +88,9 @@ const route = useRoute() // 路由信息
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(ProblemSharingPlatform.allSchemas.tableColumns) const tableColumns = ref(ProblemSharingPlatform.allSchemas.tableColumns)
const open1=(cur)=>{
window.open(cur.url)
}
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {

4
src/views/eam/device/problemSharingPlatform/problemSharingPlatform.data.ts

@ -66,6 +66,9 @@ export const ProblemSharingPlatform = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isForm: false isForm: false
}, },
{ {
@ -96,6 +99,7 @@ export const ProblemSharingPlatform = useCrudSchemas(reactive<CrudSchema[]>([
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
isDetail:false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'

Loading…
Cancel
Save