|
@@ -19,8 +19,8 @@
|
|
v-if="permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_analysis_upload)"
|
|
v-if="permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_analysis_upload)"
|
|
>{{$t('CustomAnalysisPage.up_file_btn')}}</el-button>
|
|
>{{$t('CustomAnalysisPage.up_file_btn')}}</el-button>
|
|
<input type="file" @change="fileSelected" id="file" style="display: none;">
|
|
<input type="file" @change="fileSelected" id="file" style="display: none;">
|
|
-
|
|
|
|
- <el-checkbox v-model="isShowMe" @change="() => { getTreeData();getPublicList() }">{{$t('Chart.only_see_mine')}}</el-checkbox>
|
|
|
|
|
|
+ <!-- 只看我的 -->
|
|
|
|
+ <!-- <el-checkbox v-model="isShowMe" @change="() => { getTreeData();getPublicList() }">{{$t('Chart.only_see_mine')}}</el-checkbox> -->
|
|
</div>
|
|
</div>
|
|
<div class="search-cont">
|
|
<div class="search-cont">
|
|
<el-select
|
|
<el-select
|
|
@@ -54,6 +54,16 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
|
|
+ <ul class="left-tab">
|
|
|
|
+ <li
|
|
|
|
+ :class="['tab', { act: classify_tab === index }]"
|
|
|
|
+ v-for="(tab, index) in [$t('CustomAnalysisPage.table_my'), $t('CustomAnalysisPage.table_share')]"
|
|
|
|
+ :key="tab"
|
|
|
|
+ @click="changeTab(index)"
|
|
|
|
+ >
|
|
|
|
+ {{ tab }}
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
<div class="tree-cont">
|
|
<div class="tree-cont">
|
|
<el-tree
|
|
<el-tree
|
|
ref="treeRef"
|
|
ref="treeRef"
|
|
@@ -65,7 +75,7 @@
|
|
:allow-drop="canDropHandle"
|
|
:allow-drop="canDropHandle"
|
|
:current-node-key="select_node"
|
|
:current-node-key="select_node"
|
|
:default-expanded-keys="defaultShowNodes"
|
|
:default-expanded-keys="defaultShowNodes"
|
|
- draggable
|
|
|
|
|
|
+ :draggable="classify_tab!==1"
|
|
:expand-on-click-node="false"
|
|
:expand-on-click-node="false"
|
|
check-strictly
|
|
check-strictly
|
|
:empty-text="$t('Common.no_classify_msg')"
|
|
:empty-text="$t('Common.no_classify_msg')"
|
|
@@ -84,7 +94,7 @@
|
|
:placeholder="$t('OnlineExcelPage.please_value_ipt')"
|
|
:placeholder="$t('OnlineExcelPage.please_value_ipt')"
|
|
class="label-input"
|
|
class="label-input"
|
|
v-model="new_label"
|
|
v-model="new_label"
|
|
- v-if="data.isEdit&&isSheetBtnShow('classifyOpt_edit')"
|
|
|
|
|
|
+ v-if="data.isEdit&&isSheetBtnShow('classifyOpt_edit')&&classify_tab!==1"
|
|
@blur="changeValue(data)"
|
|
@blur="changeValue(data)"
|
|
/>
|
|
/>
|
|
<span
|
|
<span
|
|
@@ -112,21 +122,22 @@
|
|
src="~@/assets/img/data_m/move_ico.png"
|
|
src="~@/assets/img/data_m/move_ico.png"
|
|
alt=""
|
|
alt=""
|
|
style="width: 14px; height: 14px; margin-right: 8px"
|
|
style="width: 14px; height: 14px; margin-right: 8px"
|
|
|
|
+ v-if="classify_tab!==1"
|
|
|
|
+ />
|
|
|
|
+ <!-- 目录操作:添加/编辑/删除 -->
|
|
|
|
+ <img
|
|
|
|
+ src="~@/assets/img/set_m/add.png"
|
|
|
|
+ alt=""
|
|
|
|
+ style="width: 14px; height: 14px; margin-right: 8px"
|
|
|
|
+ @click.stop="addNode(node,data)"
|
|
|
|
+ v-if="!data.ExcelInfoId&&isSheetBtnShow('classifyOpt_edit')&&node.level<3&&classify_tab!==1"
|
|
/>
|
|
/>
|
|
- <!-- 添加子 -->
|
|
|
|
- <img
|
|
|
|
- src="~@/assets/img/set_m/add.png"
|
|
|
|
- alt=""
|
|
|
|
- style="width: 14px; height: 14px; margin-right: 8px"
|
|
|
|
- @click.stop="addNode(node,data)"
|
|
|
|
- v-if="!data.ExcelInfoId&&isSheetBtnShow('classifyOpt_edit')&&node.level<3"
|
|
|
|
- />
|
|
|
|
<img
|
|
<img
|
|
src="~@/assets/img/set_m/edit.png"
|
|
src="~@/assets/img/set_m/edit.png"
|
|
alt=""
|
|
alt=""
|
|
style="width: 15px; height: 14px; margin-right: 8px"
|
|
style="width: 15px; height: 14px; margin-right: 8px"
|
|
@click.stop="editNode(node, data)"
|
|
@click.stop="editNode(node, data)"
|
|
- v-if="!data.ExcelInfoId&&isSheetBtnShow('classifyOpt_edit')"
|
|
|
|
|
|
+ v-if="!data.ExcelInfoId&&isSheetBtnShow('classifyOpt_edit')&&classify_tab!==1"
|
|
/>
|
|
/>
|
|
<img
|
|
<img
|
|
slot="reference"
|
|
slot="reference"
|
|
@@ -134,8 +145,30 @@
|
|
alt=""
|
|
alt=""
|
|
style="width: 14px; height: 14px"
|
|
style="width: 14px; height: 14px"
|
|
@click.stop="removeNode(node, data)"
|
|
@click.stop="removeNode(node, data)"
|
|
- v-if="!data.ExcelInfoId&&isSheetBtnShow('classifyOpt_delete')"
|
|
|
|
|
|
+ v-if="!data.ExcelInfoId&&isSheetBtnShow('classifyOpt_delete')&&classify_tab!==1"
|
|
/>
|
|
/>
|
|
|
|
+ <!-- 表格操作:共享/取消共享 -->
|
|
|
|
+ <span v-if="data.ExcelInfoId&&data.ShowShareBtn&&isSheetBtnShow('share')">
|
|
|
|
+ <el-dropdown @command="handleShareCommand">
|
|
|
|
+ <i class="el-icon-share" style="color:#5cb6ff;"></i>
|
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
|
+ <!-- 表格为已共享,有取消共享按钮 -->
|
|
|
|
+ <el-dropdown-item v-if="(classify_tab===1||data.HasShare)"
|
|
|
|
+ :command="{key:'cancel',item:data}"
|
|
|
|
+ class="treenode-dropdown-item"
|
|
|
|
+ :class="data.isShare===0?'treenode-dropdown-item-act':''"
|
|
|
|
+ >
|
|
|
|
+ {{$t('CustomAnalysisPage.cancel_share_btn')}}
|
|
|
|
+ </el-dropdown-item>
|
|
|
|
+ <el-dropdown-item :command="{key:'share',item:data}"
|
|
|
|
+ class="treenode-dropdown-item"
|
|
|
|
+ :class="data.isShare===1?'treenode-dropdown-item-act':''"
|
|
|
|
+ >
|
|
|
|
+ {{classify_tab?$t('CustomAnalysisPage.share_user_btn'):$t('CustomAnalysisPage.share_btn')}}
|
|
|
|
+ </el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </el-dropdown>
|
|
|
|
+ </span>
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</span>
|
|
</el-tree>
|
|
</el-tree>
|
|
@@ -180,61 +213,63 @@
|
|
@blur="changeValue(sheetDetailInfo, 'edit-tit')"
|
|
@blur="changeValue(sheetDetailInfo, 'edit-tit')"
|
|
/>
|
|
/>
|
|
<div class="sheet-name"
|
|
<div class="sheet-name"
|
|
- @click="editNodeLabel(sheetDetailInfo, 'edit-tit')"
|
|
|
|
|
|
+ @click="()=>{sheetDetailInfo.Button.OpButton&&editNodeLabel(sheetDetailInfo, 'edit-tit')}"
|
|
v-else>
|
|
v-else>
|
|
{{ sheetDetailInfo.ExcelName }}
|
|
{{ sheetDetailInfo.ExcelName }}
|
|
- <i class="el-icon-edit"/>
|
|
|
|
|
|
+ <i class="el-icon-edit" v-if="sheetDetailInfo.Button.OpButton"/>
|
|
</div>
|
|
</div>
|
|
<div class="sheet-anothor-info">
|
|
<div class="sheet-anothor-info">
|
|
<span class="author">{{$t('OnlineExcelPage.author_info')}}{{ sheetDetailInfo.SysUserRealName }}</span>
|
|
<span class="author">{{$t('OnlineExcelPage.author_info')}}{{ sheetDetailInfo.SysUserRealName }}</span>
|
|
<ul class="action-ul" v-if="sheetDetailInfo.Button">
|
|
<ul class="action-ul" v-if="sheetDetailInfo.Button">
|
|
<li style="color:#999999 ;">{{$t('OnlineExcelPage.recent_save_time_info')}}{{ saveTime }}</li>
|
|
<li style="color:#999999 ;">{{$t('OnlineExcelPage.recent_save_time_info')}}{{ saveTime }}</li>
|
|
- <el-tooltip effect="dark" :content="$t('CustomAnalysisPage.up_save_tooltip')" placement="top-start">
|
|
|
|
- <li class="editsty" @click="HandleToPath" v-if="isSheetBtnShow('createedb')&&sheetDetailInfo.Button.OpEdbButton">
|
|
|
|
- <img src="~@/assets/img/icons/choose_bluebg_new.png"/>
|
|
|
|
- <span>{{$t('CustomAnalysisPage.generate_indicators_btn')}}</span>
|
|
|
|
- </li>
|
|
|
|
- </el-tooltip>
|
|
|
|
-
|
|
|
|
- <el-tooltip effect="dark" :content="$t('CustomAnalysisPage.up_save_tooltip')" placement="top-start">
|
|
|
|
- <li class="editsty" @click="refreshSheet" v-if="isSheetBtnShow('refresh')&&sheetDetailInfo.Button.RefreshEdbButton">
|
|
|
|
- <img src="~@/assets/img/icons/refresh_blue_new.png"/>
|
|
|
|
- <span>{{ isEdbReFreshLoading? $t('CustomAnalysisPage.refreshing_loading'):$t('CustomAnalysisPage.refresh_loading')}}</span>
|
|
|
|
- </li>
|
|
|
|
- </el-tooltip>
|
|
|
|
- <li class="editsty" @click="saveHandle" v-if="isSheetBtnShow('save')&&sheetDetailInfo.Button.OpButton">
|
|
|
|
- <img src="~@/assets/img/icons/save_blue_new.png"/>
|
|
|
|
- <span>{{$t('ETable.Btn.save_btn')}}</span>
|
|
|
|
- </li>
|
|
|
|
- <!-- <li
|
|
|
|
- class="editsty"
|
|
|
|
- @click="goEdit"
|
|
|
|
- v-if="(sheetDetailInfo.Button && sheetDetailInfo.Button.OpButton&&isSheetBtnShow('edit'))"
|
|
|
|
- >
|
|
|
|
- <img src="~@/assets/img/icons/edit_blue_new.png" v-if="!editButtonText"/>
|
|
|
|
- <span>{{ editButtonText?editButtonText:'编辑' }}</span>
|
|
|
|
- </li> -->
|
|
|
|
- <li
|
|
|
|
- class="editsty"
|
|
|
|
- @click="saveOtherHandle"
|
|
|
|
- v-if="isSheetBtnShow('otherSave')&&sheetDetailInfo.Button.CopyButton"
|
|
|
|
- >
|
|
|
|
- <img src="~@/assets/img/icons/save_as_blue_new.png"/>
|
|
|
|
- <span>{{$t('ETable.Btn.save_as')}}</span>
|
|
|
|
- </li>
|
|
|
|
- <li class="editsty" @click="downloadExcel
|
|
|
|
- (sheetDetailInfo)" v-if="isSheetBtnShow('download')&&sheetDetailInfo.Button.DownloadButton">
|
|
|
|
- <img src="~@/assets/img/icons/download_blue.png"/>
|
|
|
|
- <span>{{$t('ETable.Btn.download_btn')}}</span>
|
|
|
|
- </li>
|
|
|
|
- <li
|
|
|
|
- class="deletesty"
|
|
|
|
- v-if="(isSheetBtnShow('del')&&sheetDetailInfo.Button&&sheetDetailInfo.Button.DeleteButton)"
|
|
|
|
- @click="delSheetHandle({cell:sheetDetailInfo, type:'del'})"
|
|
|
|
- >
|
|
|
|
- <img src="~@/assets/img/icons/delete-red.png"/>
|
|
|
|
- <span>{{$t('ETable.Btn.delete_btn')}}</span>
|
|
|
|
- </li>
|
|
|
|
|
|
+ <template v-if="!editButtonText">
|
|
|
|
+ <el-tooltip effect="dark" :content="$t('CustomAnalysisPage.up_save_tooltip')" placement="top-start">
|
|
|
|
+ <li class="editsty" @click="HandleToPath" v-if="isSheetBtnShow('createedb')&&sheetDetailInfo.Button.OpEdbButton">
|
|
|
|
+ <img src="~@/assets/img/icons/choose_bluebg_new.png"/>
|
|
|
|
+ <span>{{$t('CustomAnalysisPage.generate_indicators_btn')}}</span>
|
|
|
|
+ </li>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ <el-tooltip effect="dark" :content="$t('CustomAnalysisPage.up_save_tooltip')" placement="top-start">
|
|
|
|
+ <li class="editsty" @click="refreshSheet" v-if="isSheetBtnShow('refresh')&&sheetDetailInfo.Button.RefreshEdbButton">
|
|
|
|
+ <img src="~@/assets/img/icons/refresh_blue_new.png"/>
|
|
|
|
+ <span>{{ isEdbReFreshLoading? $t('CustomAnalysisPage.refreshing_loading'):$t('CustomAnalysisPage.refresh_loading')}}</span>
|
|
|
|
+ </li>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ <li class="editsty" @click="saveHandle" v-if="isSheetBtnShow('save')&&sheetDetailInfo.Button.OpButton">
|
|
|
|
+ <img src="~@/assets/img/icons/save_blue_new.png"/>
|
|
|
|
+ <span>{{$t('ETable.Btn.save_btn')}}</span>
|
|
|
|
+ </li>
|
|
|
|
+ <!-- <li
|
|
|
|
+ class="editsty"
|
|
|
|
+ @click="goEdit"
|
|
|
|
+ v-if="(sheetDetailInfo.Button && sheetDetailInfo.Button.OpButton&&isSheetBtnShow('edit'))"
|
|
|
|
+ >
|
|
|
|
+ <img src="~@/assets/img/icons/edit_blue_new.png" v-if="!editButtonText"/>
|
|
|
|
+ <span>{{ editButtonText?editButtonText:'编辑' }}</span>
|
|
|
|
+ </li> -->
|
|
|
|
+ <li
|
|
|
|
+ class="editsty"
|
|
|
|
+ @click="saveOtherHandle(null)"
|
|
|
|
+ v-if="isSheetBtnShow('otherSave')&&sheetDetailInfo.Button.CopyButton"
|
|
|
|
+ >
|
|
|
|
+ <img src="~@/assets/img/icons/save_as_blue_new.png"/>
|
|
|
|
+ <span>{{$t('ETable.Btn.save_as')}}</span>
|
|
|
|
+ </li>
|
|
|
|
+ <li class="editsty" @click="downloadExcel
|
|
|
|
+ (sheetDetailInfo)" v-if="isSheetBtnShow('download')&&sheetDetailInfo.Button.DownloadButton">
|
|
|
|
+ <img src="~@/assets/img/icons/download_blue.png"/>
|
|
|
|
+ <span>{{$t('ETable.Btn.download_btn')}}</span>
|
|
|
|
+ </li>
|
|
|
|
+ <li
|
|
|
|
+ class="deletesty"
|
|
|
|
+ v-if="(isSheetBtnShow('del')&&sheetDetailInfo.Button&&sheetDetailInfo.Button.DeleteButton)"
|
|
|
|
+ @click="delSheetHandle({cell:sheetDetailInfo, type:'del'})"
|
|
|
|
+ >
|
|
|
|
+ <img src="~@/assets/img/icons/delete-red.png"/>
|
|
|
|
+ <span>{{$t('ETable.Btn.delete_btn')}}</span>
|
|
|
|
+ </li>
|
|
|
|
+ </template>
|
|
|
|
+ <li v-else>{{ editButtonText }}</li>
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -245,6 +280,7 @@
|
|
ref="sheetRef"
|
|
ref="sheetRef"
|
|
v-if="sheetConfigOpt.data"
|
|
v-if="sheetConfigOpt.data"
|
|
:option="sheetConfigOpt"
|
|
:option="sheetConfigOpt"
|
|
|
|
+ :limit="limit"
|
|
@updated="hasChange=true"
|
|
@updated="hasChange=true"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
@@ -262,6 +298,7 @@
|
|
@detailShowHandle="detailShowHandle"
|
|
@detailShowHandle="detailShowHandle"
|
|
@delSheetHandle="delSheetHandle"
|
|
@delSheetHandle="delSheetHandle"
|
|
@downloadExcel="downloadExcel"
|
|
@downloadExcel="downloadExcel"
|
|
|
|
+ @saveOther="saveOtherHandle"
|
|
ref="sheetListWrap"
|
|
ref="sheetListWrap"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
@@ -309,6 +346,7 @@
|
|
value: 'ExcelClassifyId',
|
|
value: 'ExcelClassifyId',
|
|
children: 'Children',
|
|
children: 'Children',
|
|
emitPath: false,
|
|
emitPath: false,
|
|
|
|
+ checkStrictly:true
|
|
}"
|
|
}"
|
|
style="width: 80%"
|
|
style="width: 80%"
|
|
:placeholder="$t('OnlineExcelPage.select_appropriate_category_lable')"
|
|
:placeholder="$t('OnlineExcelPage.select_appropriate_category_lable')"
|
|
@@ -329,6 +367,13 @@
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
</m-dialog>
|
|
</m-dialog>
|
|
|
|
+ <!-- 设置共享弹窗 -->
|
|
|
|
+ <shareTableDia
|
|
|
|
+ :isOpenDialog="isShowShareDia"
|
|
|
|
+ :tableInfo="currentTable"
|
|
|
|
+ @close="isShowShareDia=false"
|
|
|
|
+ @setShare="isShowShareDia=false;getTreeData();"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -337,13 +382,20 @@ import * as sheetInterface from "@/api/modules/sheetApi.js";
|
|
import leftMixin from "../mixins/classifyMixin";
|
|
import leftMixin from "../mixins/classifyMixin";
|
|
import mDialog from "@/components/mDialog.vue";
|
|
import mDialog from "@/components/mDialog.vue";
|
|
import classifyDia from "../components/sheetClassifyDia.vue";
|
|
import classifyDia from "../components/sheetClassifyDia.vue";
|
|
|
|
+import shareTableDia from "./components/shareTableDia"
|
|
import Sheet from "../components/SheetExcel.vue";
|
|
import Sheet from "../components/SheetExcel.vue";
|
|
import { getSheetImage } from "../common/option";
|
|
import { getSheetImage } from "../common/option";
|
|
import sheetListWrap from "../components/sheetListWrap.vue"
|
|
import sheetListWrap from "../components/sheetListWrap.vue"
|
|
export default {
|
|
export default {
|
|
name: "",
|
|
name: "",
|
|
- components: { mDialog, classifyDia, Sheet, sheetListWrap },
|
|
|
|
|
|
+ components: { mDialog, classifyDia, Sheet, sheetListWrap, shareTableDia },
|
|
mixins: [leftMixin],
|
|
mixins: [leftMixin],
|
|
|
|
+ beforeRouteLeave(to,from,next){
|
|
|
|
+ if(from.path=='/sheetAnalysisList'){
|
|
|
|
+ this.markFinishStatus(this.select_id)
|
|
|
|
+ }
|
|
|
|
+ next()
|
|
|
|
+ },
|
|
computed: {
|
|
computed: {
|
|
downExcelFileUrl() {
|
|
downExcelFileUrl() {
|
|
let url = `${
|
|
let url = `${
|
|
@@ -351,14 +403,6 @@ export default {
|
|
}/datamanage/excel_info/table/download?${localStorage.getItem("auth")}`;
|
|
}/datamanage/excel_info/table/download?${localStorage.getItem("auth")}`;
|
|
return url;
|
|
return url;
|
|
},
|
|
},
|
|
- classifyOptions() {
|
|
|
|
- let options = this.treeData.map((_) => ({
|
|
|
|
- ExcelClassifyId: _.ExcelClassifyId,
|
|
|
|
- ExcelClassifyName: _.ExcelClassifyName,
|
|
|
|
- }));
|
|
|
|
-
|
|
|
|
- return options;
|
|
|
|
- },
|
|
|
|
saveOtherFormRule(){
|
|
saveOtherFormRule(){
|
|
return {
|
|
return {
|
|
name: [
|
|
name: [
|
|
@@ -430,6 +474,15 @@ export default {
|
|
isEdbReFreshLoading: false,//指标刷新
|
|
isEdbReFreshLoading: false,//指标刷新
|
|
// 内容是否更新
|
|
// 内容是否更新
|
|
hasChange:false,
|
|
hasChange:false,
|
|
|
|
+
|
|
|
|
+ classify_tab:0,//tab栏选中的项
|
|
|
|
+ isShowShareDia:false,
|
|
|
|
+ limit:{
|
|
|
|
+ disabled:true
|
|
|
|
+ },
|
|
|
|
+ editButtonText:"",
|
|
|
|
+ currentTable:{},
|
|
|
|
+ classifyOptions:[]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -441,13 +494,14 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
/* 表格id */
|
|
/* 表格id */
|
|
- select_id(newval) {
|
|
|
|
|
|
+ select_id(newval,oldval) {
|
|
this.sheetDataPage = 2,
|
|
this.sheetDataPage = 2,
|
|
this.sheetAllcellData = [],//全部单元格数据 分页push
|
|
this.sheetAllcellData = [],//全部单元格数据 分页push
|
|
this.dataToalPage = 0;
|
|
this.dataToalPage = 0;
|
|
this.sheetConfigOpt.data = null;
|
|
this.sheetConfigOpt.data = null;
|
|
this.hasChange=false
|
|
this.hasChange=false
|
|
newval && this.getDetailHandle();
|
|
newval && this.getDetailHandle();
|
|
|
|
+ this.markFinishStatus(oldval)
|
|
},
|
|
},
|
|
|
|
|
|
select_classify(newval) {
|
|
select_classify(newval) {
|
|
@@ -478,15 +532,96 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
-
|
|
|
|
|
|
+ formatTreeData(tree){
|
|
|
|
+ function dfs(node){
|
|
|
|
+ if (Array.isArray(node.Children)) {
|
|
|
|
+ node.Children = node.Children.filter(dfs)
|
|
|
|
+ if(node.Children.length===0) delete node.Children
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(node.ExcelInfoId) {
|
|
|
|
+ return null
|
|
|
|
+ }
|
|
|
|
+ return node
|
|
|
|
+ }
|
|
|
|
+ return tree.filter(dfs)
|
|
|
|
+ },
|
|
|
|
+ unloadMark(){
|
|
|
|
+ if(!this.select_id)return
|
|
|
|
+
|
|
|
|
+ let url = process.env.VUE_APP_API_ROOT + "/datamanage/excel_info/mark"
|
|
|
|
+ let params={ExcelInfoId: this.select_id,Status:2}
|
|
|
|
+ const uuid = localStorage.getItem("uuid") || "";
|
|
|
|
+ fetch(url, {
|
|
|
|
+ method: 'POST',
|
|
|
|
+ headers:{
|
|
|
|
+ Authorization:localStorage.getItem("auth"),
|
|
|
|
+ Uuid:uuid,
|
|
|
|
+ AccessToken:uuid + "--zheshiyigename"
|
|
|
|
+ },
|
|
|
|
+ body:JSON.stringify(params),
|
|
|
|
+ // 保持连接 让请求不会因为页面关闭而中断
|
|
|
|
+ keepalive: true
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //取消标记表格的编辑状态
|
|
|
|
+ markFinishStatus(sheet_id){
|
|
|
|
+ if(!sheet_id)return
|
|
|
|
+ sheetInterface.markSheetEditStatus({ExcelInfoId: sheet_id,Status:2}).then(res=>{
|
|
|
|
+ if(res.Ret!==200) return
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //标记表格的编辑状态
|
|
|
|
+ goEditHandle(){
|
|
|
|
+ sheetInterface.markSheetEditStatus({ExcelInfoId: this.select_id,Status:1}).then(res=>{
|
|
|
|
+ if(res.Ret!==200) return
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //切换表格tab
|
|
|
|
+ changeTab(index){
|
|
|
|
+ this.classify_tab = index
|
|
|
|
+ this.search_txt = ''
|
|
|
|
+ this.select_classify = 0
|
|
|
|
+ this.select_id = 0
|
|
|
|
+ this.sheetList = []
|
|
|
|
+ this.getTreeData()
|
|
|
|
+ this.getPublicList()
|
|
|
|
+ },
|
|
|
|
+ //表格 设置共享/取消共享
|
|
|
|
+ handleShareCommand(command){
|
|
|
|
+ if(command.key==='share'){
|
|
|
|
+ this.currentTable = command.item
|
|
|
|
+ this.isShowShareDia = true
|
|
|
|
+ }else{
|
|
|
|
+ //取消共享就是 两个权限列表都为空 但是要二次确认
|
|
|
|
+ this.$confirm(/* "是否确认取消共享?" */this.$t('CustomAnalysisPage.cancel_share_hint'), this.$t('Dialog.warn_tit'), {
|
|
|
|
+ type: "warning",
|
|
|
|
+ }).then(() => {
|
|
|
|
+ sheetInterface.sheetAnalysisInterface.setSheetShare({
|
|
|
|
+ ExcelInfoId:command.item.ExcelInfoId,
|
|
|
|
+ ViewUserIds:[],
|
|
|
|
+ EditUserIds:[]
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ if(res.Ret!==200) return
|
|
|
|
+ this.$message.success(this.$t('CustomAnalysisPage.cancel_share_success_msg'))
|
|
|
|
+ this.getTreeData()
|
|
|
|
+ this.getPublicList()
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {});
|
|
|
|
+ }
|
|
|
|
+ },
|
|
/* 获取表格分类 */
|
|
/* 获取表格分类 */
|
|
getTreeData(params = null) {
|
|
getTreeData(params = null) {
|
|
- sheetInterface.classifyList({Source: this.sourceMap[this.$route.path],IsShowMe: this.isShowMe}).then((res) => {
|
|
|
|
|
|
+ sheetInterface.sheetAnalysisInterface.getSheetTreeList({IsShare:Boolean(this.classify_tab)}).then((res) => {
|
|
const { Ret, Data } = res;
|
|
const { Ret, Data } = res;
|
|
if (Ret !== 200) return;
|
|
if (Ret !== 200) return;
|
|
|
|
|
|
this.showData = true;
|
|
this.showData = true;
|
|
this.treeData = Data.AllNodes || [];
|
|
this.treeData = Data.AllNodes || [];
|
|
|
|
+ if(!this.classify_tab){
|
|
|
|
+ this.classifyOptions = this.formatTreeData(_.cloneDeep(this.treeData))
|
|
|
|
+ }
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
/* 新增完成后 处理树展开和选中 */
|
|
/* 新增完成后 处理树展开和选中 */
|
|
params && this.selectCurrentNode(params);
|
|
params && this.selectCurrentNode(params);
|
|
@@ -498,12 +633,12 @@ export default {
|
|
searchHandle(query) {
|
|
searchHandle(query) {
|
|
if (query) {
|
|
if (query) {
|
|
/* 查找列表 */
|
|
/* 查找列表 */
|
|
- sheetInterface
|
|
|
|
- .sheetList({
|
|
|
|
|
|
+ sheetInterface.sheetAnalysisInterface
|
|
|
|
+ .getSheetList({
|
|
Keyword: query,
|
|
Keyword: query,
|
|
CurrentIndex: 1,
|
|
CurrentIndex: 1,
|
|
PageSize: 10000,
|
|
PageSize: 10000,
|
|
- Source: this.sourceMap[this.$route.path]
|
|
|
|
|
|
+ IsShare:Boolean(this.classify_tab)
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
if (res.Ret !== 200) return;
|
|
if (res.Ret !== 200) return;
|
|
@@ -723,13 +858,12 @@ export default {
|
|
},
|
|
},
|
|
/* 获取表格列表 */
|
|
/* 获取表格列表 */
|
|
getPublicList() {
|
|
getPublicList() {
|
|
- sheetInterface
|
|
|
|
- .sheetList({
|
|
|
|
|
|
+ sheetInterface.sheetAnalysisInterface
|
|
|
|
+ .getSheetList({
|
|
CurrentIndex: this.sheet_page,
|
|
CurrentIndex: this.sheet_page,
|
|
PageSize: this.sheet_pages_size,
|
|
PageSize: this.sheet_pages_size,
|
|
ExcelClassifyId: this.select_classify || 0,
|
|
ExcelClassifyId: this.select_classify || 0,
|
|
- Source: this.sourceMap[this.$route.path],
|
|
|
|
- IsShowMe: this.isShowMe
|
|
|
|
|
|
+ IsShare:Boolean(this.classify_tab)
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
if (res.Ret !== 200) return;
|
|
if (res.Ret !== 200) return;
|
|
@@ -774,6 +908,11 @@ export default {
|
|
this.sheetAllcellData = res.Data.SheetList.map(_ => _.Data ? JSON.parse(_.Data.Data) : []);
|
|
this.sheetAllcellData = res.Data.SheetList.map(_ => _.Data ? JSON.parse(_.Data.Data) : []);
|
|
|
|
|
|
this.getCellData(res.Data.SheetList)
|
|
this.getCellData(res.Data.SheetList)
|
|
|
|
+ //判断表格权限
|
|
|
|
+ //有编辑权限且无人编辑,标记编辑
|
|
|
|
+ this.limit.disabled = !this.sheetDetailInfo.Button.OpButton
|
|
|
|
+ this.sheetDetailInfo.Button.OpButton&&!this.sheetDetailInfo.Editor&&this.goEditHandle()
|
|
|
|
+ this.editButtonText = this.sheetDetailInfo.CanEdit?'':`${this.sheetDetailInfo.Editor}${this.$t('OnlineExcelPage.editing_msg')}...`
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
@@ -831,7 +970,8 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
/* 表格另存为 */
|
|
/* 表格另存为 */
|
|
- saveOtherHandle() {
|
|
|
|
|
|
+ saveOtherHandle(cell) {
|
|
|
|
+ cell&&(this.sheetDetailInfo = cell)
|
|
this.saveOtherForm.name = this.sheetDetailInfo.ExcelName + "(1)";
|
|
this.saveOtherForm.name = this.sheetDetailInfo.ExcelName + "(1)";
|
|
this.isSaveOther = true;
|
|
this.isSaveOther = true;
|
|
},
|
|
},
|
|
@@ -952,13 +1092,14 @@ export default {
|
|
this.getTreeData();
|
|
this.getTreeData();
|
|
this.getPublicList();
|
|
this.getPublicList();
|
|
}
|
|
}
|
|
-
|
|
|
|
window.addEventListener("resize", this.reloadRightWid);
|
|
window.addEventListener("resize", this.reloadRightWid);
|
|
document.addEventListener("click", this.closeHint);
|
|
document.addEventListener("click", this.closeHint);
|
|
|
|
+ window.addEventListener('beforeunload',this.unloadMark)
|
|
},
|
|
},
|
|
destroyed() {
|
|
destroyed() {
|
|
window.removeEventListener("resize", this.reloadRightWid);
|
|
window.removeEventListener("resize", this.reloadRightWid);
|
|
document.removeEventListener("click", this.closeHint);
|
|
document.removeEventListener("click", this.closeHint);
|
|
|
|
+ window.removeEventListener('beforeunload',this.unloadMark)
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -1016,7 +1157,25 @@ $normal-font: 14px;
|
|
.search-cont {
|
|
.search-cont {
|
|
padding: 0 20px;
|
|
padding: 0 20px;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ .left-tab {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ padding: 20px 20px 0;
|
|
|
|
+ .tab {
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ border-bottom: 2px solid transparent;
|
|
|
|
+ margin-right: 40px;
|
|
|
|
+ padding-bottom: 5px;
|
|
|
|
+ &.act {
|
|
|
|
+ color: #409eff;
|
|
|
|
+ border-color: #409eff;
|
|
|
|
+ }
|
|
|
|
+ &:hover {
|
|
|
|
+ color: #409eff;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.tree-cont {
|
|
.tree-cont {
|
|
padding: 30px 20px;
|
|
padding: 30px 20px;
|
|
max-height: calc(100vh - 280px);
|
|
max-height: calc(100vh - 280px);
|