Browse Source

附件样式修改

master
xuhuajiao 1 year ago
parent
commit
f05c8423a6
  1. 39
      src/assets/styles/yxk-admin.scss
  2. 24
      src/views/archivesManage/managementLibrary/file/index.vue
  3. 36
      src/views/archivesManage/managementLibrary/module/uploadFile/index.vue
  4. 4
      src/views/collectReorganizi/batchPaper/index.vue
  5. 38
      src/views/collectReorganizi/collectionLibrary/file/index.vue
  6. 4
      src/views/collectReorganizi/collectionLibrary/module/archivesInfo/index.vue
  7. 35
      src/views/collectReorganizi/collectionLibrary/module/uploadFile/index.vue

39
src/assets/styles/yxk-admin.scss

@ -2006,4 +2006,43 @@ input[type ='number'] {
} }
.vue-treeselect--disabled .vue-treeselect__single-value{ .vue-treeselect--disabled .vue-treeselect__single-value{
color: #c0c4cc !important; color: #c0c4cc !important;
}
.fileIcon{
display: block;
width: 32px;
height: 32px;
margin: 0 auto;
&.icon-image{
background: url("~@/assets/images/fileIcon/image.png") no-repeat;
background-size: 100% 100%;
}
&.icon-excel{
background: url("~@/assets/images/fileIcon/excel.png") no-repeat;
background-size: 100% 100%;
}
&.icon-pdf{
background: url("~@/assets/images/fileIcon/pdf.png") no-repeat;
background-size: 100% 100%;
}
&.icon-ppt{
background: url("~@/assets/images/fileIcon/ppt.png") no-repeat;
background-size: 100% 100%;
}
&.icon-word{
background: url("~@/assets/images/fileIcon/word.png") no-repeat;
background-size: 100% 100%;
}
&.icon-zip{
background: url("~@/assets/images/fileIcon/zip.png") no-repeat;
background-size: 100% 100%;
}
&.icon-txt{
background: url("~@/assets/images/fileIcon/txt.png") no-repeat;
background-size: 100% 100%;
}
&.icon-other{
background: url("~@/assets/images/fileIcon/attachment.png") no-repeat;
background-size: 100% 100%;
}
} }

24
src/views/archivesManage/managementLibrary/file/index.vue

@ -31,7 +31,7 @@
> >
<el-table-column type="selection" width="55" :reserve-selection="true" align="center" /> <el-table-column type="selection" width="55" :reserve-selection="true" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" /> <el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="file_name" label="原文名称" show-overflow-tooltip min-width="140" align="center" />
<el-table-column prop="file_name" label="原文名称" show-overflow-tooltip min-width="140" />
<el-table-column prop="file_type" label="格式" min-width="60" align="center" /> <el-table-column prop="file_type" label="格式" min-width="60" align="center" />
<el-table-column prop="file_size" label="大小" min-width="85" align="center"> <el-table-column prop="file_size" label="大小" min-width="85" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -47,10 +47,28 @@
<el-table-column prop="file_thumbnail" label="缩览图" min-width="60" align="center"> <el-table-column prop="file_thumbnail" label="缩览图" min-width="60" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.file_type === 'jpg' || scope.row.file_type === 'jpeg' || scope.row.file_type === 'png' || scope.row.file_type === 'bmp'|| scope.row.file_type === 'gif'"> <div v-if="scope.row.file_type === 'jpg' || scope.row.file_type === 'jpeg' || scope.row.file_type === 'png' || scope.row.file_type === 'bmp'|| scope.row.file_type === 'gif'">
<img width="60px" height="32px" class="screenshot" :src="baseApi+ '/downloadFile' +scope.row.file_path" :onerror="defaultImg" @click="showCoverPreview(scope.row)">
<i class="fileIcon icon-image" />
</div>
<div v-else-if="scope.row.file_type === 'xlsx' || scope.row.file_type === 'xls'">
<i class="fileIcon icon-excel" />
</div>
<div v-else-if="scope.row.file_type === 'docx' || scope.row.file_type === 'doc'">
<i class="fileIcon icon-word" />
</div>
<div v-else-if="scope.row.file_type === 'pdf'">
<i class="fileIcon icon-pdf" />
</div>
<div v-else-if="scope.row.file_type === 'ppt' || scope.row.file_type === 'pptx'">
<i class="fileIcon icon-ppt" />
</div>
<div v-else-if="scope.row.file_type === 'zip' || scope.row.file_type === 'rar'">
<i class="fileIcon icon-zip" />
</div>
<div v-else-if="scope.row.file_type === 'txt'">
<i class="fileIcon icon-txt" />
</div> </div>
<div v-else> <div v-else>
<svg-icon icon-class="fujian" class-name="svg-style" />
<i class="fileIcon icon-other" />
</div> </div>
</template> </template>
</el-table-column> </el-table-column>

36
src/views/archivesManage/managementLibrary/module/uploadFile/index.vue

@ -21,26 +21,50 @@
> >
<el-table-column v-if="isUploadDetail" type="selection" width="55" align="center" /> <el-table-column v-if="isUploadDetail" type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" /> <el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="file_name" label="文件名称" show-overflow-tooltip min-width="140" align="center" />
<el-table-column prop="file_name" label="文件名称" show-overflow-tooltip min-width="140" />
<el-table-column prop="file_type" label="格式" min-width="60" align="center" /> <el-table-column prop="file_type" label="格式" min-width="60" align="center" />
<el-table-column prop="file_size" label="大小" min-width="85" align="center"> <el-table-column prop="file_size" label="大小" min-width="85" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ (scope.row.file_size / 1024).toFixed(2) + 'kB' }} {{ (scope.row.file_size / 1024).toFixed(2) + 'kB' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="file_dpi" label="分辨率" min-width="85" align="center" />
<el-table-column prop="file_dpi" label="分辨率" min-width="100" align="center">
<template slot-scope="scope">
<div v-if="!scope.row.file_dpi"> - </div>
<div v-else> {{ scope.row.file_dpi }} </div>
</template>
</el-table-column>
<el-table-column prop="file_thumbnail" label="缩览图" min-width="60" align="center"> <el-table-column prop="file_thumbnail" label="缩览图" min-width="60" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.file_type === 'jpg' || scope.row.file_type === 'jpeg' || scope.row.file_type === 'png' || scope.row.file_type === 'bmp'|| scope.row.file_type === 'gif'"> <div v-if="scope.row.file_type === 'jpg' || scope.row.file_type === 'jpeg' || scope.row.file_type === 'png' || scope.row.file_type === 'bmp'|| scope.row.file_type === 'gif'">
<img width="60px" height="32px" class="screenshot" :src="baseApi+ '/downloadFile' +scope.row.file_path" :onerror="defaultImg" @click="showCoverPreview(scope.row)">
<i class="fileIcon icon-image" />
</div>
<div v-else-if="scope.row.file_type === 'xlsx' || scope.row.file_type === 'xls'">
<i class="fileIcon icon-excel" />
</div>
<div v-else-if="scope.row.file_type === 'docx' || scope.row.file_type === 'doc'">
<i class="fileIcon icon-word" />
</div>
<div v-else-if="scope.row.file_type === 'pdf'">
<i class="fileIcon icon-pdf" />
</div>
<div v-else-if="scope.row.file_type === 'ppt' || scope.row.file_type === 'pptx'">
<i class="fileIcon icon-ppt" />
</div>
<div v-else-if="scope.row.file_type === 'zip' || scope.row.file_type === 'rar'">
<i class="fileIcon icon-zip" />
</div>
<div v-else-if="scope.row.file_type === 'txt'">
<i class="fileIcon icon-txt" />
</div> </div>
<div v-else> <div v-else>
<svg-icon icon-class="fujian" class-name="svg-style" />
<i class="fileIcon icon-other" />
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="create_time" label="创建时间" min-width="110" align="center" /> <el-table-column prop="create_time" label="创建时间" min-width="110" align="center" />
<el-table-column v-if="!isUploadDetail && !recycleMain.isRecycle" label="操作" min-width="100" align="center">
<!-- && !recycleMain.isRecycle -->
<el-table-column v-if="!isUploadDetail " label="操作" min-width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button class="file-down iconfont icon-weibiaoti-2" @click="downloadFile(scope.row)">下载</el-button> <el-button class="file-down iconfont icon-weibiaoti-2" @click="downloadFile(scope.row)">下载</el-button>
</template> </template>
@ -101,7 +125,7 @@ export default {
mixins: [ mixins: [
form({}) form({})
], ],
inject: ['recycleMain'],
// inject: ['recycleMain'],
props: { props: {
isUploadDetail: { isUploadDetail: {
type: Boolean, type: Boolean,

4
src/views/collectReorganizi/batchPaper/index.vue

@ -272,7 +272,7 @@ export default {
}) })
}, },
normalizer(node) { normalizer(node) {
if (node.children && !node.children.length) {
if (node.children === null) {
delete node.children delete node.children
} }
return { return {
@ -283,7 +283,7 @@ export default {
} }
}, },
classifyNormalizer(node) { classifyNormalizer(node) {
if (node.childArchivesClass && !node.childArchivesClass.length) {
if (node.childArchivesClass === null) {
delete node.childArchivesClass delete node.childArchivesClass
} }
return { return {

38
src/views/collectReorganizi/collectionLibrary/file/index.vue

@ -239,42 +239,4 @@ export default {
width: 60px; width: 60px;
height: 32px; height: 32px;
} }
.fileIcon{
display: block;
width: 32px;
height: 32px;
margin: 0 auto;
&.icon-image{
background: url("~@/assets/images/fileIcon/image.png") no-repeat;
background-size: 100% 100%;
}
&.icon-excel{
background: url("~@/assets/images/fileIcon/excel.png") no-repeat;
background-size: 100% 100%;
}
&.icon-pdf{
background: url("~@/assets/images/fileIcon/pdf.png") no-repeat;
background-size: 100% 100%;
}
&.icon-ppt{
background: url("~@/assets/images/fileIcon/ppt.png") no-repeat;
background-size: 100% 100%;
}
&.icon-word{
background: url("~@/assets/images/fileIcon/word.png") no-repeat;
background-size: 100% 100%;
}
&.icon-zip{
background: url("~@/assets/images/fileIcon/zip.png") no-repeat;
background-size: 100% 100%;
}
&.icon-txt{
background: url("~@/assets/images/fileIcon/txt.png") no-repeat;
background-size: 100% 100%;
}
&.icon-other{
background: url("~@/assets/images/fileIcon/attachment.png") no-repeat;
background-size: 100% 100%;
}
}
</style> </style>

4
src/views/collectReorganizi/collectionLibrary/module/archivesInfo/index.vue

@ -256,4 +256,8 @@ code.hljs {
width: auto; width: auto;
color: #fff; color: #fff;
} }
.detail-tab .tab-nav{
margin: 10px 0 18px 0;
}
</style> </style>

35
src/views/collectReorganizi/collectionLibrary/module/uploadFile/index.vue

@ -21,27 +21,50 @@
> >
<el-table-column v-if="isUploadDetail" type="selection" width="55" align="center" /> <el-table-column v-if="isUploadDetail" type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" /> <el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="file_name" label="文件名称" show-overflow-tooltip min-width="140" align="center" />
<el-table-column prop="file_name" label="文件名称" show-overflow-tooltip min-width="140" />
<el-table-column prop="file_type" label="格式" min-width="60" align="center" /> <el-table-column prop="file_type" label="格式" min-width="60" align="center" />
<el-table-column prop="file_size" label="大小" min-width="85" align="center"> <el-table-column prop="file_size" label="大小" min-width="85" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ (scope.row.file_size / 1024).toFixed(2) + 'kB' }} {{ (scope.row.file_size / 1024).toFixed(2) + 'kB' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="file_dpi" label="分辨率" min-width="85" align="center" />
<el-table-column prop="file_dpi" label="分辨率" min-width="100" align="center">
<template slot-scope="scope">
<div v-if="!scope.row.file_dpi"> - </div>
<div v-else> {{ scope.row.file_dpi }} </div>
</template>
</el-table-column>
<el-table-column prop="file_thumbnail" label="缩览图" min-width="60" align="center"> <el-table-column prop="file_thumbnail" label="缩览图" min-width="60" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.file_type === 'jpg' || scope.row.file_type === 'jpeg' || scope.row.file_type === 'png' || scope.row.file_type === 'bmp'|| scope.row.file_type === 'gif'"> <div v-if="scope.row.file_type === 'jpg' || scope.row.file_type === 'jpeg' || scope.row.file_type === 'png' || scope.row.file_type === 'bmp'|| scope.row.file_type === 'gif'">
<img width="60px" height="32px" class="screenshot" :src="baseApi+ '/downloadFile' +scope.row.file_path" :onerror="defaultImg" @click="showCoverPreview(scope.row)">
<i class="fileIcon icon-image" />
</div>
<div v-else-if="scope.row.file_type === 'xlsx' || scope.row.file_type === 'xls'">
<i class="fileIcon icon-excel" />
</div>
<div v-else-if="scope.row.file_type === 'docx' || scope.row.file_type === 'doc'">
<i class="fileIcon icon-word" />
</div>
<div v-else-if="scope.row.file_type === 'pdf'">
<i class="fileIcon icon-pdf" />
</div>
<div v-else-if="scope.row.file_type === 'ppt' || scope.row.file_type === 'pptx'">
<i class="fileIcon icon-ppt" />
</div>
<div v-else-if="scope.row.file_type === 'zip' || scope.row.file_type === 'rar'">
<i class="fileIcon icon-zip" />
</div>
<div v-else-if="scope.row.file_type === 'txt'">
<i class="fileIcon icon-txt" />
</div> </div>
<div v-else> <div v-else>
<svg-icon icon-class="fujian" class-name="svg-style" />
<i class="fileIcon icon-other" />
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="create_time" label="创建时间" min-width="110" align="center" />
<el-table-column prop="create_time" label="创建时间" min-width="130" align="center" />
<!-- && !recycleMain.isRecycle --> <!-- && !recycleMain.isRecycle -->
<el-table-column v-if="!isUploadDetail " label="操作" min-width="100" align="center">
<el-table-column v-if="!isUploadDetail " label="操作" min-width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button class="file-down iconfont icon-weibiaoti-2" @click="downloadFile(scope.row)">下载</el-button> <el-button class="file-down iconfont icon-weibiaoti-2" @click="downloadFile(scope.row)">下载</el-button>
</template> </template>

Loading…
Cancel
Save