|
@@ -2,7 +2,7 @@
|
|
|
<fullscreen :fullscreen.sync="fullscreen" class="container">
|
|
|
<div class="container">
|
|
|
<div class="main-box container-box">
|
|
|
- <input type="hidden" id="excelId"/>
|
|
|
+ <input type="hidden" id="excelId" />
|
|
|
<div class="inner-left" style="overflow: hidden">
|
|
|
<!-- <div class="button-list">-->
|
|
|
<!-- <el-button type="primary" @click="showExcel = true" plain>excel</el-button>-->
|
|
@@ -10,27 +10,26 @@
|
|
|
<!-- </div>-->
|
|
|
<div style="margin: 10px 0">
|
|
|
<el-input placeholder="请输入内容" v-model="filterText" class="input-with-select" clearable
|
|
|
- @change="() => {if (!filterText) {searchMenu();}}">
|
|
|
+ @change="() => { if (!filterText) { searchMenu(); } }">
|
|
|
<el-button slot="append" @click="searchMenu" icon="el-icon-search"></el-button>
|
|
|
</el-input>
|
|
|
</div>
|
|
|
<div v-loading="loading" style="height: calc(100% - 100px);overflow-y: scroll;overflow-x: scroll">
|
|
|
<el-tree ref="tree" class="tree-line" :expand-on-click-node="false" :auto-expand-parent="true"
|
|
|
- :default-expand-all="true" :default-checked-keys="checkedMenu" :data="menuList"
|
|
|
- @check="checkChange"
|
|
|
- @node-click="nodeClick" :filter-node-method="filterNode" node-key="functionCode"
|
|
|
- style="width: 300px">
|
|
|
- <span class="custom-tree-node" slot-scope="{ node }">
|
|
|
- <span>
|
|
|
- <span v-if="node.data.type == 4"
|
|
|
- style="color: #009cff" class="iconfont icon-wenjianjia"></span>
|
|
|
- <span v-else style="color: #fdb441" class="iconfont icon-wenjian"></span>
|
|
|
- <span
|
|
|
- :style="node.data.hasOwnProperty('parent')? 'font-size:14px;padding-left:5px':'font-size:12px;padding-left:5px'">{{
|
|
|
- node.data.functionName
|
|
|
- }}</span>
|
|
|
+ :default-expand-all="true" :default-checked-keys="checkedMenu" :data="menuList"
|
|
|
+ @check="checkChange" @node-click="nodeClick" :filter-node-method="filterNode"
|
|
|
+ node-key="functionCode" style="width: 300px">
|
|
|
+ <span class="custom-tree-node" slot-scope="{ node }">
|
|
|
+ <span>
|
|
|
+ <span v-if="node.data.type == 4" style="color: #009cff"
|
|
|
+ class="iconfont icon-wenjianjia"></span>
|
|
|
+ <span v-else style="color: #fdb441" class="iconfont icon-wenjian"></span>
|
|
|
+ <span
|
|
|
+ :style="node.data.hasOwnProperty('parent') ? 'font-size:14px;padding-left:5px' : 'font-size:12px;padding-left:5px'">{{
|
|
|
+ node.data.functionName
|
|
|
+ }}</span>
|
|
|
+ </span>
|
|
|
</span>
|
|
|
- </span>
|
|
|
</el-tree>
|
|
|
</div>
|
|
|
<div class="tree-action"></div>
|
|
@@ -40,19 +39,21 @@
|
|
|
<toolList @iconCli='iconCli' :tooltit='tooltit' style="margin: 10px"></toolList>
|
|
|
<div style="margin-top: 20px;float: left;" class="bigbtns">
|
|
|
<el-button style="margin-left: 20px;" class="btn-check" size="medium" type="primary"
|
|
|
- @click="addNewStatus = true">新建
|
|
|
+ @click="addNewStatus = true">新建
|
|
|
</el-button>
|
|
|
+ <input style="margin-left:30px" id="upload-file" name="file" type="file" @change="handleUpload">
|
|
|
</div>
|
|
|
+
|
|
|
<div style="margin-top: 20px;float: right;margin-right: 20px" class="bigbtns"
|
|
|
- v-if="selectionSize != 0">
|
|
|
+ v-if="selectionSize != 0">
|
|
|
<el-button style="margin-left: 5px;" class="btn-check" size="small" type="primary"
|
|
|
- @click="delExcel()">删除
|
|
|
+ @click="delExcel()">删除
|
|
|
</el-button>
|
|
|
<el-button style="margin-left: 5px;" class="btn-check" size="small" type="primary"
|
|
|
- @click="cancelSelection()">取消
|
|
|
+ @click="cancelSelection()">取消
|
|
|
</el-button>
|
|
|
<el-button style="margin-left: 5px;" class="btn-check" size="small" type="primary"
|
|
|
- @click="moveStatus = true">移动到
|
|
|
+ @click="moveStatus = true">移动到
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -61,8 +62,8 @@
|
|
|
<span v-if="selectionSize != 0">已选{{ selectionSize }}项</span>
|
|
|
</div>
|
|
|
<el-table height="calc(100% - 60px)" class="com-table" ref="multipleTable" :data="tableData"
|
|
|
- tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading"
|
|
|
- @selection-change="handleSelectionChange">
|
|
|
+ tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading"
|
|
|
+ @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="45"></el-table-column>
|
|
|
<el-table-column prop="fileName" label="名称">
|
|
|
</el-table-column>
|
|
@@ -81,38 +82,40 @@
|
|
|
<el-table-column label="操作" width="180px" align="center" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" type="primary" @click="moveToEdit(scope.row)"
|
|
|
- :disabled="scope.row.shareEditStatus==1">编辑
|
|
|
+ :disabled="scope.row.shareEditStatus == 1">编辑
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next"
|
|
|
- background
|
|
|
- :total="total">
|
|
|
+ background :total="total">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
|
|
|
<div class="container" id="container" v-else>
|
|
|
<fullscreen :fullscreen.sync="excelFullScreen" class="container">
|
|
|
<iframe id="excelIframe" height="100%" width="100%"
|
|
|
- src="/marketfront/static/views/onlineShareExcel.html"
|
|
|
- frameborder="0"></iframe>
|
|
|
+ src="/static/views/onlineShareExcel.html" frameborder="0"></iframe>
|
|
|
</fullscreen>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-dialog :title="'新建'" :visible.sync="addNewStatus" width="300px" :destroy-on-close="true"
|
|
|
- :modal-append-to-body="false" :close-on-click-modal="false">
|
|
|
+ <el-dialog :title="'新建'" :visible.sync="addNewStatus" width="450px" :destroy-on-close="true"
|
|
|
+ :modal-append-to-body="false" :close-on-click-modal="false">
|
|
|
<div>
|
|
|
<!-- <el-button type="primary" @click="addExcel()" plain class="iconfont icon-wenjian">在线文档</el-button>-->
|
|
|
<!-- <el-button type="primary" @click="addFolderStatus = true" plain class="iconfont icon-wenjianjia">文件夹</el-button>-->
|
|
|
- <div style="padding-bottom: 30px">
|
|
|
+ <div style="padding-bottom: 30px;display:flex">
|
|
|
<div style="width: 85px;display: inline-block;cursor: pointer" @click="addExcel()">
|
|
|
<span class="iconfont icon-wenjian" style="font-size: 80px;color: dodgerblue"></span>
|
|
|
<p style="margin-left: 20px;margin-top: 10px">在线文档</p>
|
|
|
</div>
|
|
|
+ <div style="width: 85px;display: inline-block;margin-left: 70px;cursor: pointer">
|
|
|
+ <span class="iconfont icon-excel" style="font-size: 80px;color: dodgerblue"></span>
|
|
|
+ <input id="upload-file" name="file" type="file" @change="handleUpload">
|
|
|
+ </div>
|
|
|
<div style="width: 85px;display: inline-block;margin-left: 70px;cursor: pointer"
|
|
|
- @click="addFolderStatus = true">
|
|
|
+ @click="addFolderStatus = true">
|
|
|
<span class="iconfont icon-wenjianjia" style="font-size: 80px;color: dodgerblue"></span>
|
|
|
<p style="margin-left: 20px;margin-top: 10px">文件夹</p>
|
|
|
</div>
|
|
@@ -120,14 +123,14 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<el-dialog :title="'新增文件夹'" :visible.sync="addFolderStatus" width="50%" :destroy-on-close="true"
|
|
|
- :modal-append-to-body="false" :close-on-click-modal="false">
|
|
|
+ :modal-append-to-body="false" :close-on-click-modal="false">
|
|
|
<div v-loading="loading">
|
|
|
<el-form :model="infolist" ref="infolist">
|
|
|
<div class="online">
|
|
|
<el-form-item prop="name">
|
|
|
<span>文件夹名称</span>
|
|
|
<el-input v-model="infolist.name" placeholder="文件夹名称"
|
|
|
- :disabled="disableStatus"></el-input>
|
|
|
+ :disabled="disableStatus"></el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</el-form>
|
|
@@ -138,7 +141,7 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<el-dialog :title="'分享选项'" :visible.sync="shareStatus" width="550px" :destroy-on-close="true"
|
|
|
- :modal-append-to-body="false" :close-on-click-modal="false">
|
|
|
+ :modal-append-to-body="false" :close-on-click-modal="false">
|
|
|
<div style="margin-left: 30px;padding-bottom: 20px" v-loading='shareLoading'>
|
|
|
<el-button type="primary" @click="processExcelShare(1)" plain>仅我可编辑</el-button>
|
|
|
<el-button type="primary" @click="openOADialog(2)" plain>部门内所有人可编辑</el-button>
|
|
@@ -146,16 +149,16 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<el-dialog title="选择填报人" :visible.sync="checkexa" width="50%" :destroy-on-close="true"
|
|
|
- :modal-append-to-body="false" :close-on-click-modal="false" v-loading="shareLoading">
|
|
|
+ :modal-append-to-body="false" :close-on-click-modal="false" v-loading="shareLoading">
|
|
|
<div>
|
|
|
<el-form :model="exaList" ref="addInfoList">
|
|
|
<el-form-item prop="processUserId" class="info-line online">
|
|
|
<span style="width: 80px;margin-right: 20px">审批人员</span>
|
|
|
<deptTreeUserNew class="tree" @treeCheck="treeCheckonly" :defaultList="defaultList"
|
|
|
- :type="depttype" :closeList="closeList"></deptTreeUserNew>
|
|
|
+ :type="depttype" :closeList="closeList"></deptTreeUserNew>
|
|
|
<div class="tree treeUser">
|
|
|
- <p v-for="(item,index) in treeList" :key="index">{{ item.receiveName }}
|
|
|
- <i @click="deletes(item,index)" class="el-icon-error"></i>
|
|
|
+ <p v-for="(item, index) in treeList" :key="index">{{ item.receiveName }}
|
|
|
+ <i @click="deletes(item, index)" class="el-icon-error"></i>
|
|
|
</p>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
@@ -168,19 +171,19 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<el-dialog title="移动到" :visible.sync="moveStatus" width="500px" :destroy-on-close="true"
|
|
|
- :modal-append-to-body="false" :close-on-click-modal="false">
|
|
|
+ :modal-append-to-body="false" :close-on-click-modal="false">
|
|
|
<div>
|
|
|
<el-tree ref="tree" class="tree-line" :expand-on-click-node="false" :auto-expand-parent="true"
|
|
|
- :default-expand-all="true" :default-checked-keys="checkedMenu" :data="moveMenuList"
|
|
|
- @check="checkChange"
|
|
|
- @node-click="folderNodeClick" node-key="functionCode" @expand-on-click-node="false">
|
|
|
+ :default-expand-all="true" :default-checked-keys="checkedMenu" :data="moveMenuList"
|
|
|
+ @check="checkChange" @node-click="folderNodeClick" node-key="functionCode"
|
|
|
+ @expand-on-click-node="false">
|
|
|
<span class="custom-tree-node" slot-scope="{ node }">
|
|
|
<span>
|
|
|
- <span v-if="node.data.type == 4"
|
|
|
- style="color: #009cff" class="iconfont icon-wenjianjia"></span>
|
|
|
+ <span v-if="node.data.type == 4" style="color: #009cff"
|
|
|
+ class="iconfont icon-wenjianjia"></span>
|
|
|
<span v-else style="color: #fdb441" class="iconfont icon-wenjian"></span>
|
|
|
<span
|
|
|
- :style="node.data.hasOwnProperty('parent')? 'font-size:14px;padding-left:5px':'font-size:12px;padding-left:5px'">{{
|
|
|
+ :style="node.data.hasOwnProperty('parent') ? 'font-size:14px;padding-left:5px' : 'font-size:12px;padding-left:5px'">{{
|
|
|
node.data.functionName
|
|
|
}}</span>
|
|
|
</span>
|
|
@@ -195,20 +198,22 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<myMessage :messTit='messTit' @closeMessage="processDel" :centerDialogVisible="delVisible"
|
|
|
- v-if="delVisible"></myMessage>
|
|
|
+ v-if="delVisible"></myMessage>
|
|
|
<myMessageRadio :messTit='oaTitle' @closeMessage="processOa" :centerDialogVisible="oaVisible"
|
|
|
- v-if="oaVisible" yesBtnName="是" noBtnName="否" ok-btn-name="提交"></myMessageRadio>
|
|
|
+ v-if="oaVisible" yesBtnName="是" noBtnName="否" ok-btn-name="提交"></myMessageRadio>
|
|
|
</div>
|
|
|
</fullscreen>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import LuckyExcel from "luckyexcel";
|
|
|
import pForm from "../../../components/p-form";
|
|
|
import toolList from "../../../components/toolList";
|
|
|
import myMessage from "../../../components/myMessage.vue";
|
|
|
import myMessageNew from "../../../components/myMessageNew.vue";
|
|
|
import myMessageRadio from "../../../components/myMessageRadio.vue";
|
|
|
import deptTreeUserNew from "../../../components/deptTreeUserNew.vue"
|
|
|
+import {ajaxJson} from '../../../../public/static/js/util'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
@@ -274,6 +279,71 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ //外部导入
|
|
|
+ addExport(e) {
|
|
|
+ this.$http({
|
|
|
+ url: '/market/cOnlineExcel/addExcel',
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ folderId: '',
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ res.data.desc
|
|
|
+ this.startUpload(e, res.data.desc)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ startUpload(e, res) {
|
|
|
+ let _this = this;
|
|
|
+ let files = e.target.files;
|
|
|
+ if (files == null || files.length == 0) {
|
|
|
+ window.top.$vm.$message({
|
|
|
+ message: '没有文件导入',
|
|
|
+ type: 'info'
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let name = files[0].name;
|
|
|
+ let suffixArr = name.split("."),
|
|
|
+ suffix = suffixArr[suffixArr.length - 1];
|
|
|
+ if (suffix != "xlsx") {
|
|
|
+ window.top.$vm.$message({
|
|
|
+ message: '目前只支持xlsx文件的导入',
|
|
|
+ type: 'info'
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // 解析文件
|
|
|
+ LuckyExcel.transformExcelToLucky(files[0], function (exportJson, luckysheetfile) {
|
|
|
+ if (exportJson.sheets == null || exportJson.sheets.length == 0) {
|
|
|
+ window.top.$vm.$message({
|
|
|
+ message: '无法读取excel文件的内容,当前不支持xls文件',
|
|
|
+ type: 'info'
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let exceljson = JSON.stringify(exportJson)
|
|
|
+ _this.$util.ajaxJson("正在导入中", "http://192.168.2.124:7777/sheet/excel/importFile", { exceldata: exceljson, id: res }, function (res) {
|
|
|
+ // console.log('[ res ] >', res)
|
|
|
+ _this.addNewStatus = false;
|
|
|
+ document.getElementById('excelId').setAttribute("value", res.id);
|
|
|
+ _this.showExcel = true;
|
|
|
+
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
+ console.log(e); //文件
|
|
|
+ console.log(res);//excel id
|
|
|
+
|
|
|
+ },
|
|
|
+ handleUpload(e) {
|
|
|
+ this.addExport(e)
|
|
|
+
|
|
|
+ },
|
|
|
processWoNo() {
|
|
|
console.log(this.woNo);
|
|
|
var _this = this;
|
|
@@ -303,6 +373,7 @@ export default {
|
|
|
//放入id,切换到excel模式
|
|
|
document.getElementById('excelId').setAttribute("value", id);
|
|
|
_this.showExcel = true;
|
|
|
+ console.log(_this.showExcel);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -462,6 +533,7 @@ export default {
|
|
|
},
|
|
|
//打开excel
|
|
|
moveToEdit(row) {
|
|
|
+
|
|
|
//放入id,切换到excel模式
|
|
|
document.getElementById('excelId').setAttribute("value", row.id);
|
|
|
this.showExcel = true;
|
|
@@ -483,6 +555,7 @@ export default {
|
|
|
folderId: folderId,
|
|
|
},
|
|
|
}).then((res) => {
|
|
|
+ console.log(res);
|
|
|
if (res.data.result === 1) {
|
|
|
_this.$message({
|
|
|
message: res.data.desc,
|
|
@@ -806,7 +879,7 @@ export default {
|
|
|
overflow: hidden;
|
|
|
display: flex;
|
|
|
|
|
|
- > div {
|
|
|
+ >div {
|
|
|
background-color: white;
|
|
|
}
|
|
|
|
|
@@ -828,7 +901,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-.el-button + .el-button {
|
|
|
+.el-button+.el-button {
|
|
|
margin-left: 20px;
|
|
|
}
|
|
|
|
|
@@ -899,11 +972,11 @@ export default {
|
|
|
}
|
|
|
|
|
|
// 去掉最顶层的虚线,放最下面样式才不会被上面的覆盖了
|
|
|
- & > .el-tree-node::after {
|
|
|
+ &>.el-tree-node::after {
|
|
|
border-top: none;
|
|
|
}
|
|
|
|
|
|
- & > .el-tree-node::before {
|
|
|
+ &>.el-tree-node::before {
|
|
|
border-left: none;
|
|
|
}
|
|
|
|