|
@@ -1,67 +1,65 @@
|
|
|
<template>
|
|
|
<div class="container">
|
|
|
- <fullscreen :fullscreen.sync="fullscreen" class="container-box">
|
|
|
-
|
|
|
- <div class="main-box">
|
|
|
- <div class="inner-left" style="overflow: hidden">
|
|
|
- <div class="button-list">
|
|
|
- <el-button size="mini" type="" @click="addMenu('root')" :disabled="!authData" >
|
|
|
- 添加根目录</el-button
|
|
|
- >
|
|
|
- <el-button size="mini" type="" @click="addMenu('detail')" :disabled="!authData">
|
|
|
- 添加清单目录</el-button
|
|
|
- >
|
|
|
- <el-button size="medium" type="" @click="delMenu" :disabled="!authData"> 删除 </el-button>
|
|
|
- </div>
|
|
|
- <el-alert type="warning" :closable="false">
|
|
|
- <template slot="title">
|
|
|
- {{
|
|
|
- checkedNode && checkedNode.length > 0
|
|
|
- ? "当前选择节点名称:" + checkedNode[0].name
|
|
|
- : "当前无选择节点"
|
|
|
- }}
|
|
|
- </template>
|
|
|
- </el-alert>
|
|
|
- <div style="margin: 10px 0">
|
|
|
- <el-input
|
|
|
- size="medium"
|
|
|
- placeholder="请输入内容"
|
|
|
- v-model="filterText"
|
|
|
- class="input-with-select"
|
|
|
- clearable
|
|
|
- @change="
|
|
|
+ <div class="main-box" :key="simpleSheetKey">
|
|
|
+ <div class="inner-left" style="overflow: hidden">
|
|
|
+ <div class="button-list">
|
|
|
+ <el-button size="mini" type="" @click="addMenu('root')" :disabled="!authData" >
|
|
|
+ 添加根目录</el-button
|
|
|
+ >
|
|
|
+ <el-button size="mini" type="" @click="addMenu('detail')" :disabled="!authData">
|
|
|
+ 添加清单目录</el-button
|
|
|
+ >
|
|
|
+ <el-button size="medium" type="" @click="delMenu" :disabled="!authData"> 删除 </el-button>
|
|
|
+ </div>
|
|
|
+ <el-alert type="warning" :closable="false">
|
|
|
+ <template slot="title">
|
|
|
+ {{
|
|
|
+ checkedNode && checkedNode.length > 0
|
|
|
+ ? "当前选择节点名称:" + checkedNode[0].name
|
|
|
+ : "当前无选择节点"
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-alert>
|
|
|
+ <div style="margin: 10px 0">
|
|
|
+ <el-input
|
|
|
+ size="medium"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="filterText"
|
|
|
+ class="input-with-select"
|
|
|
+ clearable
|
|
|
+ @change="
|
|
|
() => {
|
|
|
if (!filterText) {
|
|
|
searchMenu();
|
|
|
}
|
|
|
}
|
|
|
"
|
|
|
- >
|
|
|
- <el-button
|
|
|
- slot="append"
|
|
|
- @click="searchMenu"
|
|
|
- icon="el-icon-search"
|
|
|
- ></el-button>
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
- <div
|
|
|
- style="
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ slot="append"
|
|
|
+ @click="searchMenu"
|
|
|
+ icon="el-icon-search"
|
|
|
+ ></el-button>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ style="
|
|
|
height: calc(100% - 160px);
|
|
|
overflow-y: auto;
|
|
|
margin-top: 20px;
|
|
|
"
|
|
|
+ >
|
|
|
+ <el-tree
|
|
|
+ ref="catalogTree"
|
|
|
+ :expand-on-click-node="true"
|
|
|
+ :auto-expand-parent="true"
|
|
|
+ :default-expand-all="true"
|
|
|
+ :props="defaultProps"
|
|
|
+ @node-click="nodeClick"
|
|
|
+ :filter-node-method="filterNode"
|
|
|
+ :data="menuList"
|
|
|
+ node-key="id"
|
|
|
>
|
|
|
- <el-tree
|
|
|
- ref="catalogTree"
|
|
|
- :expand-on-click-node="true"
|
|
|
- :auto-expand-parent="true"
|
|
|
- :default-expand-all="true"
|
|
|
- :props="defaultProps"
|
|
|
- @node-click="nodeClick"
|
|
|
- :filter-node-method="filterNode"
|
|
|
- :data="menuList"
|
|
|
- node-key="id"
|
|
|
- >
|
|
|
<span class="custom-tree-node" slot-scope="{ node }">
|
|
|
<span>
|
|
|
<span style="color: #009cff" class=""></span>
|
|
@@ -74,120 +72,141 @@
|
|
|
>{{ node.data.name }}</span>
|
|
|
</span>
|
|
|
</span>
|
|
|
- </el-tree>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="inner-right" v-if="addOnlineWordFlag" fullscreen>
|
|
|
- <simple-sheet :type="type" @save="handleSave()" :id="tmpId" :mkdirId="params.mkdirId" :isCreater="isCreater"/>
|
|
|
+ </el-tree>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
+ <div class="inner-right" v-if="addOnlineWordFlag">
|
|
|
+ <simple-dialog
|
|
|
+ v-if="fullscreen"
|
|
|
+ :fullscreen="fullscreen"
|
|
|
+ :visible="addOnlineWordFlag"
|
|
|
+ width="1200px"
|
|
|
+ >
|
|
|
+ <simple-sheet ref="simpleSheet" :type="type"
|
|
|
+ :fullscreen="fullscreen"
|
|
|
+ @saveData="handleSaveData"
|
|
|
+ @handleFullscreen="handleFullscreen"
|
|
|
+ @save="handleSave"
|
|
|
+ :workName="workName"
|
|
|
+ :work-data="workData"
|
|
|
+ :id="tmpId" :mkdirId="params.mkdirId" :isCreater="isCreater"/>
|
|
|
+ </simple-dialog>
|
|
|
+ <simple-sheet v-else :type="type"
|
|
|
+ :fullscreen="fullscreen"
|
|
|
+ @saveData="handleSaveData"
|
|
|
+ @handleFullscreen="handleFullscreen"
|
|
|
+ :workName="workName"
|
|
|
+ :work-data="workData"
|
|
|
+ @save="handleSave"
|
|
|
+ :id="tmpId" :mkdirId="params.mkdirId" :isCreater="isCreater"/>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="inner-right" v-show="workListFlag">
|
|
|
- <div class="search">
|
|
|
- <span>{{ catalogueName }}</span>
|
|
|
- </div>
|
|
|
- <div style="margin-bottom: 10px;margin-top: 10px;">
|
|
|
- <el-button
|
|
|
- v-if="checkedNode && checkedNode.length === 2"
|
|
|
- type="primary"
|
|
|
- size="mini"
|
|
|
- @click="addFile('add',{delFlag:'1'})"
|
|
|
- style="width: 80px"
|
|
|
+ <div class="inner-right" v-if="workListFlag">
|
|
|
+ <div class="search">
|
|
|
+ <span>{{ catalogueName }}</span>
|
|
|
+ </div>
|
|
|
+ <div style="margin-bottom: 10px;margin-top: 10px;">
|
|
|
+ <el-button
|
|
|
+ v-if="checkedNode && checkedNode.length === 2"
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ @click="addFile('add',{delFlag:'1'})"
|
|
|
+ style="width: 80px"
|
|
|
+ >
|
|
|
+ 新建
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <div class="tabBoxClass">
|
|
|
+ <el-table
|
|
|
+ height="calc(100% )"
|
|
|
+ class="com-table"
|
|
|
+ ref="multipleTable"
|
|
|
+ :data="tableData"
|
|
|
+ tooltip-effect="dark"
|
|
|
+ border
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ v-loading="loading"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ prop="templateName"
|
|
|
+ show-overflow-tooltip
|
|
|
+ label="名称"
|
|
|
+ align="center"
|
|
|
>
|
|
|
- 新建
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- <div class="tabBoxClass">
|
|
|
- <el-table
|
|
|
- height="calc(100% )"
|
|
|
- class="com-table"
|
|
|
- ref="multipleTable"
|
|
|
- :data="tableData"
|
|
|
- tooltip-effect="dark"
|
|
|
- border
|
|
|
- size="small"
|
|
|
- style="width: 100%"
|
|
|
- v-loading="loading"
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="createTime"
|
|
|
+ show-overflow-tooltip
|
|
|
+ label="创建时间"
|
|
|
+ width="150"
|
|
|
+ align="center"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="createCity"
|
|
|
+ show-overflow-tooltip
|
|
|
+ label="创建科室"
|
|
|
+ align="center"
|
|
|
>
|
|
|
- <el-table-column
|
|
|
- prop="templateName"
|
|
|
- show-overflow-tooltip
|
|
|
- label="名称"
|
|
|
- align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="createTime"
|
|
|
- show-overflow-tooltip
|
|
|
- label="创建时间"
|
|
|
- width="150"
|
|
|
- align="center"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- prop="createCity"
|
|
|
- show-overflow-tooltip
|
|
|
- label="创建科室"
|
|
|
- align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="createBy"
|
|
|
- show-overflow-tooltip
|
|
|
- label="创建人"
|
|
|
- width="150"
|
|
|
- align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="stateNm"
|
|
|
- show-overflow-tooltip
|
|
|
- label="状态"
|
|
|
- width="150"
|
|
|
- align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作" align="center" width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- :disabled="scope.row.editFlag=='1'?false:true"
|
|
|
- class="font-btn"
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- plain
|
|
|
- @click="addFile('edit',scope.row)"
|
|
|
- >编辑
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- class="font-btn"
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- plain
|
|
|
- @click="addFile('view',scope.row)"
|
|
|
- >查看
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- v-show="scope.row.delFlag=='1'?true:false"
|
|
|
- class="font-btn"
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- plain
|
|
|
- @click="deleteOne(scope.row)"
|
|
|
- >删除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
-<!-- <el-pagination-->
|
|
|
-<!-- class="pageBox"-->
|
|
|
-<!-- @current-change="currchange"-->
|
|
|
-<!-- layout="prev, pager, next"-->
|
|
|
-<!-- background-->
|
|
|
-<!-- :total="total"-->
|
|
|
-<!-- >-->
|
|
|
-<!-- </el-pagination>-->
|
|
|
- </div>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="createBy"
|
|
|
+ show-overflow-tooltip
|
|
|
+ label="创建人"
|
|
|
+ width="150"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="stateNm"
|
|
|
+ show-overflow-tooltip
|
|
|
+ label="状态"
|
|
|
+ width="150"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ :disabled="scope.row.editFlag=='1'?false:true"
|
|
|
+ class="font-btn"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ plain
|
|
|
+ @click="addFile('edit',scope.row)"
|
|
|
+ >编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ class="font-btn"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ plain
|
|
|
+ @click="addFile('view',scope.row)"
|
|
|
+ >查看
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-show="scope.row.delFlag=='1'?true:false"
|
|
|
+ class="font-btn"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ plain
|
|
|
+ @click="deleteOne(scope.row)"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <!-- <el-pagination-->
|
|
|
+ <!-- class="pageBox"-->
|
|
|
+ <!-- @current-change="currchange"-->
|
|
|
+ <!-- layout="prev, pager, next"-->
|
|
|
+ <!-- background-->
|
|
|
+ <!-- :total="total"-->
|
|
|
+ <!-- >-->
|
|
|
+ <!-- </el-pagination>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
- </fullscreen>
|
|
|
+ </div>
|
|
|
<el-dialog
|
|
|
class="p-new-box"
|
|
|
size="50%"
|
|
@@ -245,10 +264,13 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import Vue from 'vue';
|
|
|
import simpleSheet from "./sheet.vue";
|
|
|
+import simpleDialog from "./dialog.vue";
|
|
|
export default {
|
|
|
components: {
|
|
|
- simpleSheet
|
|
|
+ simpleSheet,
|
|
|
+ simpleDialog
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -351,9 +373,34 @@ export default {
|
|
|
titname: "新增",
|
|
|
dialogStatus: false,
|
|
|
attList: [],
|
|
|
+ simpleSheetKey:0,
|
|
|
+ workName:'',
|
|
|
+ workData:null,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleSaveData(workName, workData){
|
|
|
+ this.workName = workName;
|
|
|
+ this.workData = workData;
|
|
|
+ },
|
|
|
+ handleFullscreen(fullscreen){
|
|
|
+ if (fullscreen){
|
|
|
+ Vue.set(this, 'fullscreen', fullscreen)
|
|
|
+ /*this.$nextTick(()=>{
|
|
|
+ this.$refs.simpleSheet.handleFullscreenOption()
|
|
|
+ })*/
|
|
|
+ }else {
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.$refs.simpleSheet.handleFullscreenOption()
|
|
|
+ })
|
|
|
+ Vue.set(this, 'fullscreen', fullscreen)
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ saveData(workName, workData){
|
|
|
+ this.workName = workName;
|
|
|
+ this.workData = workData;
|
|
|
+ },
|
|
|
// 搜索按钮事件
|
|
|
searchMenu() {
|
|
|
this.$refs.catalogTree.filter(this.filterText);
|
|
@@ -534,6 +581,8 @@ export default {
|
|
|
// 新增在线文档
|
|
|
addFile(type,data) {
|
|
|
// this.titname = "新增";
|
|
|
+ this.workName = ""
|
|
|
+ this.workData = null
|
|
|
this.workListFlag = false;
|
|
|
this.addOnlineWordFlag = true;
|
|
|
this.type=type;
|
|
@@ -742,7 +791,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.inner-left {
|
|
|
- width: 20%;
|
|
|
+ width: 22%;
|
|
|
padding: 0 20px;
|
|
|
border: 1px solid #ddd;
|
|
|
border-radius: 5px;
|
|
@@ -756,7 +805,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.inner-right {
|
|
|
- width: 80%;
|
|
|
+ width: 76%;
|
|
|
margin-left: 2%;
|
|
|
overflow-y: auto;
|
|
|
// border-left: 1px solid #ddd;
|