|
@@ -3,186 +3,100 @@
|
|
|
<!-- 文件区域 左边-->
|
|
|
<div class="tablesfile">
|
|
|
<div class="jichu">文件</div>
|
|
|
- <!-- <table style="color: white" class="lefttable">
|
|
|
- <tr class="child">
|
|
|
- <td class="tdfirst">1</td>
|
|
|
- <td class="tdsecound"> -->
|
|
|
- <!-- 文件名称 fileName -->
|
|
|
- <!-- <div>文件名称</div> -->
|
|
|
- <!-- 上传人 createUser -->
|
|
|
- <!-- 页数 theNumberPages-->
|
|
|
- <!-- 时间 createTime -->
|
|
|
- <!-- 阅读量 readVolume -->
|
|
|
- <!-- <span
|
|
|
- style="
|
|
|
- font-size: 14px;
|
|
|
- color: rgba(204, 204, 204, 1);
|
|
|
- margin-right: 30px;
|
|
|
- "
|
|
|
- >上传人:用户</span
|
|
|
- >
|
|
|
- <span
|
|
|
- style="
|
|
|
- font-size: 14px;
|
|
|
- color: rgba(204, 204, 204, 1);
|
|
|
- margin-right: 30px;
|
|
|
- "
|
|
|
- >页数:11页</span
|
|
|
- >
|
|
|
- <span
|
|
|
- style="
|
|
|
- font-size: 14px;
|
|
|
- color: rgba(204, 204, 204, 1);
|
|
|
- margin-right: 30px;
|
|
|
- "
|
|
|
- >时间:2022-03-05</span
|
|
|
- >
|
|
|
- <span
|
|
|
- style="
|
|
|
- font-size: 14px;
|
|
|
- color: rgba(204, 204, 204, 1);
|
|
|
- margin-right: 30px;
|
|
|
- "
|
|
|
- >阅读量:145</span
|
|
|
- >
|
|
|
- </td>
|
|
|
- <td class="tdthird">
|
|
|
- <div class="read">阅读</div>
|
|
|
- </td>
|
|
|
- <td class="tdfourth">
|
|
|
- <a href="" download class="downloadfile">
|
|
|
- <img src="../../../images/uploads.png" alt="" />
|
|
|
- 下载
|
|
|
- </a>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr class="child">
|
|
|
- <td class="tdfirst">1</td>
|
|
|
- <td class="tdsecound"> -->
|
|
|
- <!-- 文件名称 fileName -->
|
|
|
- <!-- <div>文件名称</div> -->
|
|
|
- <!-- 上传人 createUser -->
|
|
|
- <!-- 页数 theNumberPages-->
|
|
|
- <!-- 时间 createTime -->
|
|
|
- <!-- 阅读量 readVolume -->
|
|
|
- <!-- <span
|
|
|
- style="
|
|
|
- font-size: 14px;
|
|
|
- color: rgba(204, 204, 204, 1);
|
|
|
- margin-right: 30px;
|
|
|
- "
|
|
|
- >上传人:用户</span
|
|
|
- >
|
|
|
- <span
|
|
|
- style="
|
|
|
- font-size: 14px;
|
|
|
- color: rgba(204, 204, 204, 1);
|
|
|
- margin-right: 30px;
|
|
|
- "
|
|
|
- >页数:11页</span
|
|
|
- >
|
|
|
- <span
|
|
|
- style="
|
|
|
- font-size: 14px;
|
|
|
- color: rgba(204, 204, 204, 1);
|
|
|
- margin-right: 30px;
|
|
|
- "
|
|
|
- >时间:2022-03-05</span
|
|
|
- >
|
|
|
- <span
|
|
|
- style="
|
|
|
- font-size: 14px;
|
|
|
- color: rgba(204, 204, 204, 1);
|
|
|
- margin-right: 30px;
|
|
|
- "
|
|
|
- >阅读量:145</span
|
|
|
- >
|
|
|
- </td>
|
|
|
- <td class="tdthird">
|
|
|
- <div class="read">阅读</div>
|
|
|
- </td>
|
|
|
- <td class="tdfourth">
|
|
|
- <a href="" download class="downloadfile">
|
|
|
- <img src="../../../images/uploads.png" alt="" />
|
|
|
- 下载
|
|
|
- </a>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table> -->
|
|
|
<el-table
|
|
|
- v-loading="loading1"
|
|
|
- :data="list"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- :header-cell-style="{ background: '#003C69', color: 'white' }"
|
|
|
+ v-loading="loading1"
|
|
|
+ :data="fileinfoList"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ :header-cell-style="{ background: '#003C69', color: 'white' }"
|
|
|
+ >
|
|
|
+ <el-table-column label="序号" type="index" width="50">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="文件"
|
|
|
+ align="center"
|
|
|
+ width="600"
|
|
|
+ prop="directory"
|
|
|
+ class="fileNAME"
|
|
|
>
|
|
|
- <el-table-column label="序号" type="index" width="50">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="文件" align="center" width="700" prop="directory" class="fileNAME" >
|
|
|
- <template slot-scope="scope">
|
|
|
+ <template slot-scope="scope">
|
|
|
<div>
|
|
|
- <!-- 文件名称 fileName -->
|
|
|
- <div style="text-align:start;text-indent:4em">文件名称{{scope.row.name}}</div>
|
|
|
- <!-- 上传人 createUser -->
|
|
|
- <!-- 页数 theNumberPages-->
|
|
|
- <!-- 时间 createTime -->
|
|
|
- <!-- 阅读量 readVolume -->
|
|
|
- <span
|
|
|
- style="
|
|
|
- font-size: 14px;
|
|
|
- color: rgba(204, 204, 204, 1);
|
|
|
- margin-right: 30px;
|
|
|
- margin-left:-105px
|
|
|
- "
|
|
|
- >上传人:用户{{scope.row.createUser}}</span
|
|
|
- >
|
|
|
- <span
|
|
|
- style="
|
|
|
- font-size: 14px;
|
|
|
- color: rgba(204, 204, 204, 1);
|
|
|
- margin-right: 30px;
|
|
|
- "
|
|
|
- >页数:11页{{scope.row.theNumberPages}}</span
|
|
|
- >
|
|
|
- <span
|
|
|
- style="
|
|
|
- font-size: 14px;
|
|
|
- color: rgba(204, 204, 204, 1);
|
|
|
- margin-right: 30px;
|
|
|
- "
|
|
|
- >时间:2022-03-05{{scope.row.createTime}}</span
|
|
|
- >
|
|
|
- <span
|
|
|
- style="
|
|
|
- font-size: 14px;
|
|
|
- color: rgba(204, 204, 204, 1);
|
|
|
- margin-right: 30px;
|
|
|
- "
|
|
|
- >阅读量:145{{scope.row.readVolume}}</span
|
|
|
- ></div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="操作"
|
|
|
- align="center"
|
|
|
- class-name="small-padding fixed-width"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- size="read"
|
|
|
- type="text"
|
|
|
- @click="ViewRead(scope.row)"
|
|
|
+ <!-- 文件名称 fileName -->
|
|
|
+ <div style="text-align: start; text-indent: 4em">
|
|
|
+ {{ scope.row.fileName }}
|
|
|
+ </div>
|
|
|
+ <!-- 上传人 createUser -->
|
|
|
+ <!-- 页数 theNumberPages-->
|
|
|
+ <!-- 时间 createTime -->
|
|
|
+ <!-- 阅读量 readVolume -->
|
|
|
+ <span
|
|
|
+ style="
|
|
|
+ font-size: 14px;
|
|
|
+ color: rgba(204, 204, 204, 1);
|
|
|
+ margin-right: 30px;
|
|
|
+ margin-left: -105px;
|
|
|
+ "
|
|
|
+ >上传人:{{ scope.row.createUser }}</span
|
|
|
>
|
|
|
- <span>阅读</span>
|
|
|
- </el-button>
|
|
|
- <el-button size="reads" type="text" @click="handleupLoad(scope.row)">
|
|
|
- <span class="chakan">
|
|
|
- <!-- <img src="../../../images/uploads.png" alt=""> -->
|
|
|
- <a :href="scope.row.file" download>下载</a>
|
|
|
+ <span
|
|
|
+ style="
|
|
|
+ font-size: 14px;
|
|
|
+ color: rgba(204, 204, 204, 1);
|
|
|
+ margin-right: 30px;
|
|
|
+ "
|
|
|
+ >页数:{{ scope.row.theNumberPages }}</span
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ style="
|
|
|
+ font-size: 14px;
|
|
|
+ color: rgba(204, 204, 204, 1);
|
|
|
+ margin-right: 30px;
|
|
|
+ "
|
|
|
+ >时间:2022-03-05{{ scope.row.createTime }}</span
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ style="
|
|
|
+ font-size: 14px;
|
|
|
+ color: rgba(204, 204, 204, 1);
|
|
|
+ margin-right: 30px;
|
|
|
+ "
|
|
|
+ >阅读量:145{{ scope.row.readVolume }}</span
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="read" type="text" @click="ViewRead(scope.row)">
|
|
|
+ <span>
|
|
|
+ <!-- <iframe :src="'http://192.168.5.177:8080'+scope.row.parentDirName" target="_blank">阅读</iframe> -->
|
|
|
+ <a :href="'http://192.168.5.177:8080'+scope.row.parentDirName" target="_blank">阅读</a>
|
|
|
</span>
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="reads"
|
|
|
+ type="text"
|
|
|
+ @click="handleupLoad(scope.row)"
|
|
|
+ >
|
|
|
+ <span class="chakan">
|
|
|
+ <a :href="scope.row.parentDirName" download>下载</a>
|
|
|
+ </span>
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="dels"
|
|
|
+ type="text"
|
|
|
+ @click="handledels(scope.row)"
|
|
|
+ >
|
|
|
+ <span>
|
|
|
+ 删除
|
|
|
+ </span>
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
<pagination
|
|
|
v-show="total > 0"
|
|
|
:total="total"
|
|
@@ -192,14 +106,14 @@
|
|
|
/>
|
|
|
</div>
|
|
|
<!-- 右边 -->
|
|
|
- <div style="rights">
|
|
|
+ <div class="rights">
|
|
|
<!-- 目录 -->
|
|
|
<div class="catalog">
|
|
|
<div class="jichu">
|
|
|
目录
|
|
|
- <el-button size="turnback" @click="turnback">返回</el-button>
|
|
|
- <span class="uploadfilesbtn" @click="upload">上传文件</span
|
|
|
- ><span class="manage" @click="mange">目录管理</span>
|
|
|
+ <el-button class="turnback" @click="turnback">返回</el-button>
|
|
|
+ <el-button class="uploadfilesbtn" @click="upload">上传文件</el-button
|
|
|
+ ><el-button class="manage" @click="mange">目录管理</el-button>
|
|
|
</div>
|
|
|
<el-table
|
|
|
v-loading="loading"
|
|
@@ -209,9 +123,14 @@
|
|
|
>
|
|
|
<el-table-column label="序号" type="index" width="50">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="目录" align="center" prop="directory" >
|
|
|
+ <el-table-column label="目录" align="center" prop="directory">
|
|
|
<template slot-scope="scope">
|
|
|
- <div @click="mulus(scope.row)" :class="scope.row.subclassification==0? '' :'undeline'">{{scope.row.directory}}</div>
|
|
|
+ <div
|
|
|
+ @click="mulus(scope.row)"
|
|
|
+ :class="scope.row.subclassification == 0 ? '' : 'undeline'"
|
|
|
+ >
|
|
|
+ {{ scope.row.directory }}
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -228,26 +147,30 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
- size="btu"
|
|
|
+ size="add"
|
|
|
type="text"
|
|
|
@click="ViewProgress(scope.row)"
|
|
|
>
|
|
|
<span>添加</span>
|
|
|
</el-button>
|
|
|
- <el-button size="btd" type="text" @click="handleDelete(scope.row)">
|
|
|
+ <el-button
|
|
|
+ size="del"
|
|
|
+ type="text"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ >
|
|
|
<span class="chakan">删除</span>
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<pagination
|
|
|
- class="pagination"
|
|
|
- v-show="total1 > 0"
|
|
|
- :total="total1"
|
|
|
- :page.sync="queryParams.pageNum"
|
|
|
- :limit.sync="queryParams.pageSize"
|
|
|
- @pagination="ListDirectoryinfo"
|
|
|
- />
|
|
|
+ class="pagination"
|
|
|
+ v-show="total1 > 0"
|
|
|
+ :total="total1"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="ListDirectoryinfo"
|
|
|
+ />
|
|
|
</div>
|
|
|
<!-- 排行 -->
|
|
|
<div class="Ranking">
|
|
@@ -301,7 +224,7 @@
|
|
|
class="choose"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in directory"
|
|
|
+ v-for="item in directory"
|
|
|
:key="item.id"
|
|
|
:label="item.directory"
|
|
|
:value="item.directory"
|
|
@@ -321,17 +244,31 @@
|
|
|
clearable
|
|
|
size="small"
|
|
|
>
|
|
|
- <el-option
|
|
|
- v-for="item in subclassification"
|
|
|
+ <el-option
|
|
|
+ v-for="item in subclassification"
|
|
|
:key="item.id"
|
|
|
:label="item.directory"
|
|
|
:value="item.directory"
|
|
|
@click.native="soncategory(item.id)"
|
|
|
- ></el-option>
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item style="margin-left: 30px; margin-top: 30px">
|
|
|
- <span class="uploadfilesbtn" @click="uoloadfiles">上传文件</span>
|
|
|
+ <FileUpload v-model="form.file" @names="namess(name)" />
|
|
|
+ <!-- <div>
|
|
|
+ <label for="fileInput">
|
|
|
+ <i aria-hidden="true" class="cursor">上传文件</i>
|
|
|
+ </label>
|
|
|
+ <input
|
|
|
+ v-show="false"
|
|
|
+ type="file"
|
|
|
+ id="fileInput"
|
|
|
+ @change="handleFileChange"
|
|
|
+ name="file"
|
|
|
+ ref="file"
|
|
|
+ />
|
|
|
+ </div> -->
|
|
|
+ <!-- <input type="file" id="people-export" ref="inputer" @change="fileUpload"/> -->
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -340,52 +277,6 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
- <!-- 上传文件 -->
|
|
|
- <!-- 用户导入对话框 -->
|
|
|
- <el-dialog
|
|
|
- :title="upload1.title"
|
|
|
- :visible.sync="upload1.open"
|
|
|
- width="400px"
|
|
|
- append-to-body
|
|
|
- >
|
|
|
- <el-upload
|
|
|
- ref="upload1"
|
|
|
- :limit="1"
|
|
|
- accept=".xlsx, .xls"
|
|
|
- :headers="upload1.headers"
|
|
|
- :action="upload1.url + '?updateSupport=' + upload1.updateSupport"
|
|
|
- :disabled="upload1.isUploading"
|
|
|
- :on-progress="handleFileUploadProgress"
|
|
|
- :on-success="handleFileSuccess"
|
|
|
- :auto-upload="false"
|
|
|
- drag
|
|
|
- >
|
|
|
- <i class="el-icon-upload"></i>
|
|
|
- <div class="el-upload__text">
|
|
|
- 将文件拖到此处,或
|
|
|
- <em>点击上传</em>
|
|
|
- </div>
|
|
|
- <div class="el-upload__tip text-center" slot="tip">
|
|
|
- <div class="el-upload__tip" slot="tip">
|
|
|
- <!-- <el-checkbox
|
|
|
- v-model="upload1.updateSupport"
|
|
|
- /> -->
|
|
|
- </div>
|
|
|
- <span class="imports">仅允许导入xls、xlsx格式文件。</span>
|
|
|
- <!-- <el-link
|
|
|
- type="primary"
|
|
|
- :underline="false"
|
|
|
- style="font-size: 12px; vertical-align: baseline"
|
|
|
- @click="importTemplate"
|
|
|
- >下载模板</el-link
|
|
|
- > -->
|
|
|
- </div>
|
|
|
- </el-upload>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitFileForm">确 定</el-button>
|
|
|
- <el-button @click="open4 = false">取 消</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
<!-- 新建分类弹框 -->
|
|
|
<el-dialog
|
|
|
style="color: pink"
|
|
@@ -460,6 +351,7 @@ import {
|
|
|
updateFileinfo,
|
|
|
exportFileinfo,
|
|
|
} from "@/api/regulations/fileinfo";
|
|
|
+import FileUpload from "../../../components/FileUpload/index.vue"
|
|
|
import {
|
|
|
listDirectoryinfo,
|
|
|
addDirectoryinfo,
|
|
@@ -470,6 +362,7 @@ export default {
|
|
|
name: "Fileinfo",
|
|
|
data() {
|
|
|
return {
|
|
|
+ props:["name"],
|
|
|
list: [
|
|
|
{
|
|
|
id: 1,
|
|
@@ -501,7 +394,7 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
total: 10,
|
|
|
- total1:"",
|
|
|
+ total1: "",
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 5,
|
|
@@ -537,124 +430,91 @@ export default {
|
|
|
// 目录
|
|
|
directory: [],
|
|
|
// 父节点id
|
|
|
- parentId:"",
|
|
|
+ parentId: "",
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 导出遮罩层
|
|
|
exportLoading: false,
|
|
|
// 子分类
|
|
|
- subclassification:[],
|
|
|
+ subclassification: [],
|
|
|
// 刷新
|
|
|
- loading1:false,
|
|
|
- // 用户导入参数
|
|
|
- upload1: {
|
|
|
- // 是否显示弹出层(用户导入)
|
|
|
- open: false,
|
|
|
- // 弹出层标题(用户导入)
|
|
|
- title: "",
|
|
|
- // 是否禁用上传
|
|
|
- isUploading: false,
|
|
|
- // 是否更新已经存在的用户数据
|
|
|
- updateSupport: 0,
|
|
|
- // 设置上传的请求头部
|
|
|
- headers: { Authorization: "Bearer " + getToken() },
|
|
|
- // 上传的地址
|
|
|
- url: process.env.VUE_APP_BASE_API + "/regulations/fileinfo/importData"
|
|
|
- },
|
|
|
+ loading1: false,
|
|
|
+ // 文件
|
|
|
+ file: {},
|
|
|
};
|
|
|
},
|
|
|
+ components:{
|
|
|
+ FileUpload
|
|
|
+ },
|
|
|
created() {
|
|
|
this.getList();
|
|
|
// 获取目录接口
|
|
|
- this.ListDirectoryinfo()
|
|
|
+ this.ListDirectoryinfo();
|
|
|
},
|
|
|
methods: {
|
|
|
- soncategory(id){
|
|
|
- this.form.directoryId=id
|
|
|
- console.log(id)
|
|
|
+ handledels(row){
|
|
|
+ console.log(row.id)
|
|
|
+ },
|
|
|
+ namess(name){
|
|
|
+ console.log(name)
|
|
|
+ },
|
|
|
+ // 子分类id
|
|
|
+ soncategory(id) {
|
|
|
+ this.form.directoryId = id;
|
|
|
+ console.log(id);
|
|
|
},
|
|
|
- ListDirectoryinfo(){
|
|
|
+ // 获取目录列表
|
|
|
+ ListDirectoryinfo() {
|
|
|
this.loading = true;
|
|
|
- this.queryParams.common="1"
|
|
|
- listDirectoryinfo(this.queryParams).then(res=>{
|
|
|
+ this.queryParams.common = "1";
|
|
|
+ listDirectoryinfo(this.queryParams).then((res) => {
|
|
|
this.directory = res.rows;
|
|
|
- this.total1=res.rows.length
|
|
|
+ this.total1 = res.rows.length;
|
|
|
this.loading = false;
|
|
|
console.log(this.directory);
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
- // ListDirectoryinfo1(){
|
|
|
- // this.loading = true;
|
|
|
- // listDirectoryinfo(this.queryParams).then(res=>{
|
|
|
- // this.directory = res.rows;
|
|
|
- // this.total1=res.rows.length
|
|
|
- // this.loading = false;
|
|
|
- // console.log(this.directory);
|
|
|
- // })
|
|
|
- // },
|
|
|
// 点击目录
|
|
|
- mulus(row){
|
|
|
- console.log(row.id)
|
|
|
- this.parentId=row.id
|
|
|
- listDirectoryinfo({parentId:this.parentId}).then(res=>{
|
|
|
- console.log(res)
|
|
|
- if(res.rows[0].subclassification==0){
|
|
|
- this.directory=res.rows
|
|
|
- }else{
|
|
|
- return
|
|
|
- }
|
|
|
- })
|
|
|
+ mulus(row) {
|
|
|
+ console.log(row.id);
|
|
|
+ this.parentId = row.id;
|
|
|
+ listDirectoryinfo({ parentId: this.parentId }).then((res) => {
|
|
|
+ console.log(res.rows);
|
|
|
+ res.rows.forEach((item)=>{
|
|
|
+ if(item.subclassification==0){
|
|
|
+ this.directory=res.rows
|
|
|
+ }else{
|
|
|
+ return
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // if (res.rows[0].subclassification == 0) {
|
|
|
+ // this.directory = res.rows;
|
|
|
+ // } else {
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ });
|
|
|
// 绑定的数据 directory
|
|
|
},
|
|
|
- // 上传文件
|
|
|
- uoloadfiles(){
|
|
|
- this.upload1.title="上传文件"
|
|
|
- this.upload1.open=true
|
|
|
- },
|
|
|
- // /** 下载模板操作 */
|
|
|
- // importTemplate() {
|
|
|
- // importTemplate().then(response => {
|
|
|
- // this.$download.name(response.msg);
|
|
|
- // });
|
|
|
- // },
|
|
|
- // 文件上传中处理
|
|
|
- handleFileUploadProgress(event, file, fileList) {
|
|
|
- this.upload1.isUploading = true;
|
|
|
- },
|
|
|
- // 文件上传成功处理
|
|
|
- handleFileSuccess(response, file, fileList) {
|
|
|
- this.upload1.open = false;
|
|
|
- this.upload1.isUploading = false;
|
|
|
- this.$refs.upload1.clearFiles();
|
|
|
- console.log(this.$refs.upload1)
|
|
|
- this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
|
|
|
- // this.getList();
|
|
|
- },
|
|
|
- // 提交上传文件
|
|
|
- submitFileForm() {
|
|
|
- this.$refs.upload1.submit()
|
|
|
- },
|
|
|
// 返回目录
|
|
|
- turnback(){
|
|
|
- this.ListDirectoryinfo()
|
|
|
+ turnback() {
|
|
|
+ this.ListDirectoryinfo();
|
|
|
},
|
|
|
// 选中父目录之后
|
|
|
- chooseDirect(id){
|
|
|
+ chooseDirect(id) {
|
|
|
// this.form.subclassification=""
|
|
|
- this.subclassification=[]
|
|
|
- this.parentId=id
|
|
|
+ this.subclassification = [];
|
|
|
+ this.parentId = id;
|
|
|
// 获取到父目录id了
|
|
|
- listDirectoryinfo({parentId:this.parentId}).then(res=>{
|
|
|
- this.subclassification=res.rows
|
|
|
- })
|
|
|
+ listDirectoryinfo({ parentId: this.parentId }).then((res) => {
|
|
|
+ this.subclassification = res.rows;
|
|
|
+ });
|
|
|
},
|
|
|
/** 查询规章制度文件记录列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
listFileinfo(this.queryParams).then((response) => {
|
|
|
this.fileinfoList = response.rows;
|
|
|
- // this.form=response.rows
|
|
|
- // console.log(this.fileinfoList)
|
|
|
+ console.log(this.fileinfoList)
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
});
|
|
@@ -718,27 +578,16 @@ export default {
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
console.log(this.form);
|
|
|
- // this.directory.forEach((item)=>{
|
|
|
- // if(item.directory==this.form.directory){
|
|
|
- // // 目录id
|
|
|
- // this.form.parentId=item.id
|
|
|
- if (valid) {
|
|
|
- addFileinfo(this.form).then((response) => {
|
|
|
- this.$modal.msgSuccess("上传成功");
|
|
|
- this.open = false;
|
|
|
- this.listDirectoryinfo();
|
|
|
- });
|
|
|
- }
|
|
|
- // // console.log(this.form)
|
|
|
- // }
|
|
|
- // })
|
|
|
- // if (valid) {
|
|
|
- // addFileinfo(this.form).then((response) => {
|
|
|
- // this.$modal.msgSuccess("上传成功");
|
|
|
- // this.open = false;
|
|
|
- // this.listDirectoryinfo();
|
|
|
- // });
|
|
|
- // }
|
|
|
+ if (valid) {
|
|
|
+ this.form.fileName=this.form.file[0].name
|
|
|
+ this.form.parentDirName=this.form.file[0].url
|
|
|
+ addFileinfo(this.form, this.file).then((response) => {
|
|
|
+ this.$modal.msgSuccess("上传成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList()
|
|
|
+ // this.listDirectoryinfo();
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
// 新建分类
|
|
@@ -749,9 +598,9 @@ export default {
|
|
|
if (valid) {
|
|
|
addDirectoryinfo(this.form1).then((response) => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
- this.ListDirectoryinfo();
|
|
|
- this.open1 = false;
|
|
|
- this.form1={}
|
|
|
+ this.ListDirectoryinfo();
|
|
|
+ this.open1 = false;
|
|
|
+ this.form1 = {};
|
|
|
// this.reset()
|
|
|
});
|
|
|
}
|
|
@@ -765,7 +614,7 @@ export default {
|
|
|
addDirectoryinfo(this.form2).then((response) => {
|
|
|
this.$modal.msgSuccess("上传子分类成功");
|
|
|
this.open2 = false;
|
|
|
- this.form2={}
|
|
|
+ this.form2 = {};
|
|
|
this.ListDirectoryinfo();
|
|
|
});
|
|
|
}
|
|
@@ -773,10 +622,10 @@ export default {
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- const ids = row.id
|
|
|
- console.log(ids)
|
|
|
+ const ids = row.id;
|
|
|
+ console.log(ids);
|
|
|
this.$modal
|
|
|
- .confirm('是否确认删除?')
|
|
|
+ .confirm("是否确认删除?")
|
|
|
.then(function () {
|
|
|
return delDirectoryinfo(ids);
|
|
|
})
|
|
@@ -806,7 +655,7 @@ export default {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
this.title = "上传文件";
|
|
|
- this.ListDirectoryinfo()
|
|
|
+ this.ListDirectoryinfo();
|
|
|
},
|
|
|
// 目录管理
|
|
|
mange() {
|
|
@@ -830,36 +679,17 @@ export default {
|
|
|
this.comstatus = 0;
|
|
|
this.reset();
|
|
|
},
|
|
|
- // // 阅读获取id
|
|
|
- // readread() {
|
|
|
- // var child = document.getElementsByClassName("child");
|
|
|
- // console.log(child)
|
|
|
- // for (var i = 0; i < child.length; i++) {
|
|
|
- // var a = child[i];
|
|
|
- // a.index = i; //给每个className为child的元素添加index属性;
|
|
|
- // a.onclick = function () {
|
|
|
- // console.log(1)
|
|
|
- // // alert(this.index)
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
// 阅读按钮操作
|
|
|
- ViewRead(){
|
|
|
-
|
|
|
+ ViewRead() {
|
|
|
+ // window.open("www.baidu.com","_self");
|
|
|
},
|
|
|
// 下载按钮操作
|
|
|
- handleupLoad(){
|
|
|
-
|
|
|
- }
|
|
|
+ handleupLoad() {},
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
+
|
|
|
<style scoped>
|
|
|
-.flexlayout {
|
|
|
- width: 100vw;
|
|
|
- height: 100vh;
|
|
|
- /* background-color: pink; */
|
|
|
-}
|
|
|
.jichu {
|
|
|
color: white;
|
|
|
width: 100%;
|
|
@@ -870,47 +700,49 @@ export default {
|
|
|
}
|
|
|
/* 文件表格 */
|
|
|
.tablesfile {
|
|
|
- width: 1090px;
|
|
|
- height: 840px;
|
|
|
+ width: 50%;
|
|
|
+ height: 100vh;
|
|
|
background: #00365f;
|
|
|
- margin-left: 10px;
|
|
|
- /* height: auto; */
|
|
|
+ margin-left: 30px;
|
|
|
}
|
|
|
/* 弹性布局 */
|
|
|
.flexlayout {
|
|
|
display: flex;
|
|
|
justify-content: space-around;
|
|
|
align-items: flex-start;
|
|
|
- width: 100%;
|
|
|
height: 100%;
|
|
|
+ width: 100vw;
|
|
|
+ position: fixed;
|
|
|
}
|
|
|
/* 目录 */
|
|
|
.catalog {
|
|
|
- width: 700px;
|
|
|
- height: 410px;
|
|
|
+ width: 43vw;
|
|
|
+ height: 45vh;
|
|
|
position: relative;
|
|
|
- /* height: auto; */
|
|
|
- /* display: flex; */
|
|
|
- margin-left: 10px;
|
|
|
background-color: #00365f;
|
|
|
}
|
|
|
-.pagination{
|
|
|
+.dialog-footer .el-button{
|
|
|
+ width: 60px;
|
|
|
+ height: 30px;
|
|
|
+}
|
|
|
+.pagination {
|
|
|
position: absolute;
|
|
|
bottom: 20px;
|
|
|
right: 10px;
|
|
|
}
|
|
|
/* 排行 */
|
|
|
.Ranking {
|
|
|
- width: 700px;
|
|
|
- height: 410px;
|
|
|
- margin-left: 10px;
|
|
|
+ width: 43vw;
|
|
|
+ height: 45vh;
|
|
|
+ right: 12%;
|
|
|
+ top: 45%;
|
|
|
background-color: #00365f;
|
|
|
- margin-top: 20px;
|
|
|
+ margin-top: 10px;
|
|
|
}
|
|
|
/* 下载按钮 */
|
|
|
/* .downloadfile { */
|
|
|
- /* background-image: url("../../../images/uploads.png"); */
|
|
|
- /* background: rgba(29, 150, 255, 1);
|
|
|
+/* background-image: url("../../../images/uploads.png"); */
|
|
|
+/* background: rgba(29, 150, 255, 1);
|
|
|
display: inline-block;
|
|
|
width: 67px;
|
|
|
height: 30px;
|
|
@@ -922,21 +754,22 @@ export default {
|
|
|
/* margin-r */
|
|
|
/* } */
|
|
|
.rights {
|
|
|
- margin-left: 20px;
|
|
|
+ width: 50%;
|
|
|
+ height: 100vh;
|
|
|
+ margin-left: 30px;
|
|
|
}
|
|
|
/* 阅读 */
|
|
|
-.el-button--read {
|
|
|
+.el-button--read {
|
|
|
color: #ffffff;
|
|
|
width: 50px;
|
|
|
height: 30px;
|
|
|
background-color: #1d96ff;
|
|
|
border-radius: 4px;
|
|
|
font-size: 14px;
|
|
|
- /* text-align: center; */
|
|
|
line-height: 5px;
|
|
|
margin-right: 10px;
|
|
|
}
|
|
|
-.el-button--reads{
|
|
|
+.el-button--reads {
|
|
|
color: #ffffff;
|
|
|
width: 67px;
|
|
|
height: 30px;
|
|
@@ -950,7 +783,20 @@ export default {
|
|
|
line-height: 5px;
|
|
|
margin-right: 10px;
|
|
|
}
|
|
|
-.el-button--reads .chakan{
|
|
|
+.el-button--dels {
|
|
|
+ color: #ffffff;
|
|
|
+ width: 60px;
|
|
|
+ height: 30px;
|
|
|
+ background-color: #ff4949;
|
|
|
+ border-radius: 4px;
|
|
|
+ font-size: 14px;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-position: 8px 6px;
|
|
|
+ /* text-align: center; */
|
|
|
+ line-height: 5px;
|
|
|
+ margin-right: 10px;
|
|
|
+}
|
|
|
+.el-button--reads .chakan {
|
|
|
margin-left: 7px;
|
|
|
}
|
|
|
/* 表格 */
|
|
@@ -1007,6 +853,7 @@ tr {
|
|
|
}
|
|
|
table {
|
|
|
border-collapse: collapse;
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
/* 左边表格 */
|
|
|
.lefttable tr {
|
|
@@ -1016,25 +863,24 @@ table {
|
|
|
}
|
|
|
/* 上传文件 */
|
|
|
.uploadfilesbtn {
|
|
|
- display: inline-block;
|
|
|
- width: 86px;
|
|
|
- height: 36px;
|
|
|
- line-height: 36px;
|
|
|
+ width: 80px;
|
|
|
+ height: 33px;
|
|
|
+ line-height: 33px;
|
|
|
background-color: #1d96ff;
|
|
|
color: white;
|
|
|
border-radius: 4px;
|
|
|
font-size: 14px;
|
|
|
text-align: center;
|
|
|
- margin-left: 360px;
|
|
|
- padding-right: 10px;
|
|
|
+ margin-left: 480px;
|
|
|
}
|
|
|
/* 目录管理 */
|
|
|
.manage {
|
|
|
- display: inline-block;
|
|
|
- width: 86px;
|
|
|
- height: 36px;
|
|
|
- line-height: 36px;
|
|
|
+ /* display: inline-block; */
|
|
|
+ width: 80px;
|
|
|
+ height: 33px;
|
|
|
+ line-height: 33px;
|
|
|
background-color: #1d96ff;
|
|
|
+ color: white;
|
|
|
font-size: 14px;
|
|
|
border-radius: 4px;
|
|
|
margin-left: 10px;
|
|
@@ -1099,39 +945,81 @@ table {
|
|
|
::v-deep .el-select-dropdown__wrap .el-scrollbar__view {
|
|
|
background-color: white !important;
|
|
|
}
|
|
|
-::v-deep .pagination-container{
|
|
|
+::v-deep .pagination-container {
|
|
|
display: block !important;
|
|
|
}
|
|
|
/* 返回目录按钮 */
|
|
|
-.el-button--turnback{
|
|
|
+.turnback {
|
|
|
color: #ffffff;
|
|
|
- width: 60px;
|
|
|
- height: 34px;
|
|
|
+ width: 50px;
|
|
|
+ height: 30px;
|
|
|
background-color: #1d96ff;
|
|
|
border-radius: 4px;
|
|
|
font-size: 14px;
|
|
|
- line-height: 5px;
|
|
|
+ line-height: 30px;
|
|
|
margin-left: 30px;
|
|
|
- padding-left: 14px;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+/* 添加按钮 */
|
|
|
+.el-button--add {
|
|
|
+ width: 46px !important;
|
|
|
+ border: 1px solid transparent;
|
|
|
+ padding: 3px 8px;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 1.5;
|
|
|
+ border-radius: 3px;
|
|
|
+ color: #fff;
|
|
|
+ background-color: #13ce66;
|
|
|
}
|
|
|
-.undeline{
|
|
|
+/* 删除按钮 */
|
|
|
+.el-button--del {
|
|
|
+ width: 46px !important;
|
|
|
+ border: 1px solid transparent;
|
|
|
+ padding: 3px 8px;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 1.5;
|
|
|
+ border-radius: 3px;
|
|
|
+ color: #fff;
|
|
|
+ background-color: #ff4949;
|
|
|
+}
|
|
|
+/* 下划线 */
|
|
|
+.undeline {
|
|
|
text-decoration: underline;
|
|
|
color: #1d96ff;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
/* 序号居中 */
|
|
|
-::v-deep .el-table_1_column_1{
|
|
|
+::v-deep .el-table_1_column_1 {
|
|
|
text-align: center;
|
|
|
}
|
|
|
-::v-deep .el-table_2_column_4{
|
|
|
+::v-deep .el-table_2_column_4 {
|
|
|
text-align: center;
|
|
|
}
|
|
|
/* 导入按钮 */
|
|
|
-.imports{
|
|
|
- color: skyblue;
|
|
|
- display: inline-block;
|
|
|
- margin-top: 30px;
|
|
|
- margin-right: 150px;
|
|
|
- /* padding-top: 10px; */
|
|
|
+.imports {
|
|
|
+ color: skyblue;
|
|
|
+ display: inline-block;
|
|
|
+ margin-top: 30px;
|
|
|
+ margin-right: 150px;
|
|
|
+ /* padding-top: 10px; */
|
|
|
+}
|
|
|
+.is-ready li {
|
|
|
+ width: 300px !important;
|
|
|
+}
|
|
|
+.cursor {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #409eff;
|
|
|
+ font-size: 16px;
|
|
|
+}
|
|
|
+* {
|
|
|
+ padding: 0;
|
|
|
+ margin: 0;
|
|
|
+}
|
|
|
+html,
|
|
|
+body,
|
|
|
+#app {
|
|
|
+ height: 100%;
|
|
|
+ margin: 0;
|
|
|
+ padding: 0;
|
|
|
}
|
|
|
</style>
|