@@ -0,0 +1,382 @@
|
||||
<link rel="stylesheet" href="__CDN__/assets/element-ui-2.15.14/css/index.css">
|
||||
<link rel="stylesheet" href="__CDN__/assets/css/vvv.css">
|
||||
<style>
|
||||
input[type="file"] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/*定义滚动条高宽及背景
|
||||
高宽分别对应横竖滚动条的尺寸*/
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background-color: rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
/*定义滚动条轨道
|
||||
内阴影+圆角*/
|
||||
::-webkit-scrollbar-track {
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
|
||||
border-radius: 10px;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
/*定义滑块
|
||||
内阴影+圆角*/
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
|
||||
background-color: #ababab;
|
||||
}
|
||||
|
||||
#vue {
|
||||
display: flex;
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.el-tree .el-tree-node__content {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.el-tree .el-tree-node__label {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.tree-box {
|
||||
width: 240px;
|
||||
/*height: 100vh;*/
|
||||
border-radius: 6px;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
border: 1px solid #f3f3f3;
|
||||
}
|
||||
|
||||
.tree-box .header {
|
||||
padding: 10px 0 10px 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tree-box .header img {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.tree-box .header .name {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.main {
|
||||
width: 100%;
|
||||
margin-left: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.main .header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.main .header .left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.main .header .left .select-all {
|
||||
margin-left: 20px;
|
||||
position: relative;
|
||||
top: 3px;
|
||||
}
|
||||
|
||||
.main .header .right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.main .file {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.main .file .title {
|
||||
font-size: 14px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.main .file-box {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
|
||||
grid-gap: 20px 0;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.main .file-box .file-list {
|
||||
width: 130px;
|
||||
height: 150px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.main .file-box .file-list .file-item {
|
||||
border-radius: 12px;
|
||||
text-align: center;
|
||||
padding: 21px;
|
||||
}
|
||||
|
||||
.main .file-box .file-list .file-img-item {
|
||||
height: 120px;
|
||||
width: 120px;
|
||||
border-radius: 12px;
|
||||
position: relative;
|
||||
background-size: contain;
|
||||
text-align: center;
|
||||
background-color: #f7f8fa;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
}
|
||||
|
||||
.main .file-box .file-list .file-item-bg {
|
||||
background-color: #f7f8fa;
|
||||
}
|
||||
|
||||
.main .file-box .file-list .tools {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
/*padding: 10px 8px 0 10px;*/
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.main .file-box .file-list .tools .top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.main .file-box .file-list .tools .top .v-checked img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.main .file-box .file-list .tools .top .v-checked-left {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.main .file-box .file-list .tools .bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-image: linear-gradient(180deg, transparent, rgba(0, 0, 0, .5));
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.main .file-box .file-list .tools .bottom .v-icon {
|
||||
|
||||
}
|
||||
|
||||
.main .file-box .file-list .tools .bottom .v-icon img {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.main .file-box .file-list .file-name {
|
||||
margin-top: 10px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.main .file-box .file-list .file-item .file-img {
|
||||
cursor: pointer;
|
||||
height: 78px;
|
||||
width: 78px;
|
||||
}
|
||||
|
||||
.main .file-box .file-list .file-img-item .file-image {
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
max-width: 120px;
|
||||
max-height: 120px;
|
||||
-o-object-fit: contain;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.input-with-select {
|
||||
width: 270px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.empty {
|
||||
text-align: center;
|
||||
margin-top: 200px;
|
||||
font-weight: bold;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.layout-pagination {
|
||||
margin-top: 70px;
|
||||
}
|
||||
</style>
|
||||
<div id="vue" v-cloak>
|
||||
<div class="tree-box">
|
||||
<div class="header">
|
||||
<div class="name">文件目录</div>
|
||||
<!-- <img src="/assets/img/add-add.png" alt="添加文件"> -->
|
||||
</div>
|
||||
<el-tree :data="navList" @node-click="handleClickNode"></el-tree>
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="header">
|
||||
<div class="left">
|
||||
<el-button size="mini" @click="refreshPage" icon="el-icon-refresh" circle type="primary"></el-button>
|
||||
<div class="select-all">
|
||||
<el-checkbox @change="checkAllChange" v-model="checkAll">全选</el-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<el-button size="mini" @click="handleOpenNav" type="primary" plain icon="el-icon-folder">文件目录管理
|
||||
</el-button>
|
||||
{if ($multiple == 'true')}
|
||||
<el-button size="mini" style="margin-left: 10px;" @click="onSelectFile([], 'multiple')" type="primary" plain icon="el-icon-check">选择
|
||||
</el-button>
|
||||
{/if}
|
||||
<el-upload
|
||||
style="margin-left: 10px;"
|
||||
class="upload-img"
|
||||
:data="{nav: search.nav}"
|
||||
:multiple="true"
|
||||
:show-file-list="false"
|
||||
:before-upload="beforeFileUpload"
|
||||
:on-success="uploadFileSuccess"
|
||||
accept=".jpg,.jpeg,.gif,.png,.svg"
|
||||
action="{:url('ajax/upload')}"
|
||||
>
|
||||
<el-button size="mini" type="success" plain icon="el-icon-upload">上传文件
|
||||
</el-button>
|
||||
</el-upload>
|
||||
<el-button size="mini" style="margin-left: 10px;" @click="handleNavDialog" type="warning" plain icon="el-icon-right">归类
|
||||
</el-button>
|
||||
<el-button size="mini" style="margin-left: 10px;" @click="del" type="danger" plain icon="el-icon-document-delete">删除
|
||||
</el-button>
|
||||
<el-button size="mini" style="margin-left: 10px;" type="danger" @click="handleOpenRecycle" plain icon="el-icon-delete-solid">回收站
|
||||
</el-button>
|
||||
<el-select style="width: 120px;margin-left: 10px;" @change="handleOrderChange" size="mini" filterable v-model="search.order" placeholder="排序方式">
|
||||
<el-option
|
||||
v-for="item of sortList"
|
||||
:key="item.id"
|
||||
:label="item.value"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-input size="mini" v-model="search.keyword" clearable @clear="handleInpClear" placeholder="您可以输入相关内容搜索图片" class="input-with-select">
|
||||
<el-button slot="append" @click="searchData" icon="el-icon-search"></el-button>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="file">
|
||||
<div class="title">
|
||||
<el-breadcrumb separator-class="el-icon-arrow-right">
|
||||
<el-breadcrumb-item v-for="(item, index) of breadcrumb">
|
||||
<a href="javascript:void(0);" @click="handleOpenDir(item.id)">{{item.name}}</a>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div v-if="dirList.length || fileList.length">
|
||||
<div class="file-box">
|
||||
<div v-if="currentPage == 1 && item.value > 0" v-for="(item, index) of dirList" @dblclick="handleOpenDir(item.value)" :key="item.id" class="file-list">
|
||||
<div class="file-item">
|
||||
<img class="file-img" src="/assets/img/directory.png" alt="">
|
||||
</div>
|
||||
<div class="file-name">{{item.label}}</div>
|
||||
</div>
|
||||
<div @click="handleSelectFile(index)" v-for="(item, index) of fileList" :key="item.id" class="file-list" @mouseenter="enterFileItem($event, index)" @mouseleave="leaveFileItem($event, index)">
|
||||
<div class="file-img-item">
|
||||
<img class="file-image" :src="item.mimetype.indexOf('image') >= 0 ? item.url : `/s.php/ajax/icon?suffix=${item.imagetype}`" alt="">
|
||||
</div>
|
||||
<div v-if="item.checked || item.showTools" class="tools">
|
||||
<div class="top">
|
||||
<div class="v-position"></div>
|
||||
<div v-if="item.checked" class="v-checked v-checked-left">
|
||||
<img src="/assets/img/okok.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
{if ($select)}
|
||||
<div @click.stop="onSelectFile(item, 'one')" style="margin-left: 12px;" class="v-icon">
|
||||
<img src="/assets/img/check-check.png" alt="">
|
||||
</div>
|
||||
{/if}
|
||||
<div @click.stop="handleOpenFile(item.url)" style="margin: 0 12px;" class="v-icon">
|
||||
<img src="/assets/img/see-see.png?id=1" alt="">
|
||||
</div>
|
||||
<div @click.stop="dell(item.id)" class="v-icon">
|
||||
<img src="/assets/img/del-del.png?id=2" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="file-name">{{item.filename}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layout-pagination">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="currentPage"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="totalCount">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="empty">
|
||||
暂无图片
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 归类 -->
|
||||
<div class="nav-dialog">
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
title="归类"
|
||||
:visible.sync="navDialog"
|
||||
width="40%"
|
||||
>
|
||||
<div class="form">
|
||||
<el-form ref="form" :model="formData" label-width="90px">
|
||||
<el-form-item label="所属分类:" prop="pid">
|
||||
<el-cascader
|
||||
style="width: 330px;"
|
||||
:options="navList"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
placeholder="选择所属分类"
|
||||
filterable
|
||||
v-model="formData.nav"
|
||||
>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="navDialog = false" size="small" icon="el-icon-switch-button">取 消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitNav" icon="el-icon-position">提 交</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="__CDN__/assets/element-ui-2.15.14/js/vue.js"></script>
|
||||
<script src="__CDN__/assets/element-ui-2.15.14/js/index.js"></script>
|
||||
<script src="__CDN__/assets/js/jquery-2.1.1.min.js"></script>
|
||||
@@ -0,0 +1,166 @@
|
||||
<link rel="stylesheet" href="__CDN__/assets/element-ui-2.15.14/css/index.css">
|
||||
<link rel="stylesheet" href="__CDN__/assets/css/vvv.css">
|
||||
<style>
|
||||
.el-form-item__label {
|
||||
width: 120px !important;
|
||||
}
|
||||
|
||||
.el-tag + .el-tag {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.button-new-tag {
|
||||
margin-left: 10px;
|
||||
height: 32px;
|
||||
line-height: 30px;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.input-new-tag {
|
||||
width: 90px;
|
||||
margin-left: 10px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
input[type="file"] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.el-form-item__error {
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.search-select .el-select .el-input__inner {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.key .el-input__inner {
|
||||
/*width: 240px !important;*/
|
||||
}
|
||||
|
||||
.vue-table {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<div id="vue" v-cloak>
|
||||
<div class="screen-container">
|
||||
<div class="screen-container-show">
|
||||
<div class="screen-container-left display-flex">
|
||||
<el-button size="small" @click="refreshPage" icon="el-icon-refresh" circle type="primary"></el-button>
|
||||
<div class="datetime">
|
||||
<el-date-picker
|
||||
v-model="search.startTime"
|
||||
type="datetime"
|
||||
placeholder="选择起始时间">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="datetime">
|
||||
<el-date-picker
|
||||
v-model="search.endTime"
|
||||
type="datetime"
|
||||
placeholder="选择结束时间">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-select screen-container-right display-flex keyword">
|
||||
<el-select v-model="search.typeIndex" @clear="handleClearSelect('typeIndex')" clearable placeholder="文件类型">
|
||||
<el-option
|
||||
v-for="item in typeList"
|
||||
:key="item.index"
|
||||
:label="item.name"
|
||||
:value="item.index">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="search-select screen-container-right display-flex keyword key">
|
||||
<el-input @clear="handleClearSearchInp" clearable v-model="search.keyword" placeholder="请输入您要搜索的内容">
|
||||
<el-select v-model="search.type" filterable clearable slot="prepend" placeholder="请选择">
|
||||
<el-option v-for="(item, index) in searchOpt" :label="item.value"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button slot="append" @click="searchData" icon="el-icon-search"></el-button>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="screen-container-right display-flex keyword">
|
||||
<el-button size="small" @click="restoreMany" type="success" plain icon="el-icon-check">恢复
|
||||
</el-button>
|
||||
<el-button size="small" @click="del" type="danger" plain icon="el-icon-delete">删除
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vue-table background-white color-666">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
highlight-current-row v-loading="listLoading"
|
||||
element-loading-text="拼命加载中..."
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="handleTableFieldSort"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="selection" width="60" align="center"></el-table-column>
|
||||
<el-table-column prop="id" width="80" label="ID" show-overflow-tooltip
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="category" width="200" label="所属分类" show-overflow-tooltip
|
||||
align="center">
|
||||
<template scope="scope">
|
||||
<span>{{scope.row.navName}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="image" label="图片" width="100" align="center">
|
||||
<template scope="scope">
|
||||
<a v-if="scope.row.mimetype.indexOf('image') >= 0" style="cursor: pointer;" :href="scope.row.url" target="_blank">
|
||||
<img :src="scope.row.url" style="border-radius: 10px;width: 50px;height: 50px;padding: 5px">
|
||||
</a>
|
||||
<a v-else style="cursor: pointer;" :href="`/s.php/ajax/icon?suffix=${scope.row.imagetype}`" target="_blank">
|
||||
<img :src="`/s.php/ajax/icon?suffix=${scope.row.imagetype}`" style="border-radius: 10px;width: 50px;height: 50px;padding: 5px">
|
||||
</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="filename" sortable="custom" width="220" label="文件名" show-overflow-tooltip
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="imagewidth" width="100" label="宽" show-overflow-tooltip
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="imageheight" width="100" label="高" show-overflow-tooltip
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="mimetype" width="110" label="文件类型" show-overflow-tooltip
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="imagetype" width="110" label="图片类型" show-overflow-tooltip
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="storage" width="110" label="存储类型" show-overflow-tooltip
|
||||
align="center"></el-table-column>
|
||||
<el-table-column prop="createtime" sortable="custom" width="160" :formatter="dateFormat" label="创建日期" show-overflow-tooltip
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" width="200" fixed="right" label="操作">
|
||||
<template scope="scope">
|
||||
<button @click="restore(scope.row.id)" type="button"
|
||||
class="el-button el-button--success el-button--small"><i
|
||||
class="el-icon-check"></i><span>恢复</span></button>
|
||||
<button @click="dell(scope.row.id)" type="button"
|
||||
class="el-button el-button--danger el-button--small"><i
|
||||
class="el-icon-delete"></i><span>删除</span></button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="layout-pagination">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="currentPage"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="totalCount">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="__CDN__/assets/element-ui-2.15.14/js/vue.js"></script>
|
||||
<script src="__CDN__/assets/element-ui-2.15.14/js/index.js"></script>
|
||||
<script src="__CDN__/assets/tool/libs/moment.js"></script>
|
||||
<script src="__CDN__/assets/js/jquery-2.1.1.min.js"></script>
|
||||
在新工单中引用
屏蔽一个用户