|
@@ -10,20 +10,11 @@
|
|
|
<div class="data-sheet-main" id="box">
|
|
|
<div class="main-left left" id="left" v-show="!isSlideLeft">
|
|
|
<div class="datasheet_top">
|
|
|
- <el-button v-permission="permissionBtn.etaTablePermission.etaTable_excel"
|
|
|
- type="primary" style="margin-right:20px" @click="goAddSheetHandle(1)"
|
|
|
+ <el-button v-if="permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_excel)&&sourceMap[$route.path]===1" type="primary" style="margin-right:20px" @click="goAddSheetHandle"
|
|
|
>添加Excel表格</el-button >
|
|
|
+ <el-button v-if="sourceMap[$route.path]===2" type="primary" style="margin-right:20px" @click="goAddSheetHandle">添加时间序列表格</el-button >
|
|
|
+ <el-button v-if="sourceMap[$route.path]===3" type="primary" @click="goAddSheetHandle">添加混合表格</el-button >
|
|
|
|
|
|
- <el-dropdown v-permission="permissionBtn.etaTablePermission.etaTable_customize"
|
|
|
- @command="goAddSheetHandle">
|
|
|
- <el-button type="primary">
|
|
|
- 自定义表格<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
- </el-button>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item :command="2">数据表格</el-dropdown-item>
|
|
|
- <el-dropdown-item :command="3">混合表格</el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
</div>
|
|
|
<div class="search-cont">
|
|
|
<el-select
|
|
@@ -407,6 +398,12 @@ export default {
|
|
|
{ required: true, message: "表格分类不能为空", trigger: "blur" },
|
|
|
],
|
|
|
},
|
|
|
+
|
|
|
+ sourceMap: {
|
|
|
+ '/sheetList': 1,
|
|
|
+ '/sheetTimeList': 2,
|
|
|
+ '/sheetMixedList': 3,
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -451,9 +448,10 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
/* 添加表格 */
|
|
|
- goAddSheetHandle(type) {
|
|
|
- if (!this.treeData.length)
|
|
|
- return this.$message.warning("请先添加表格分类");
|
|
|
+ goAddSheetHandle() {
|
|
|
+ if (!this.treeData.length) return this.$message.warning("请先添加表格分类");
|
|
|
+ let type = this.sourceMap[this.$route.path];
|
|
|
+
|
|
|
let path = {
|
|
|
1: "/addsheet",
|
|
|
2: "/addCustomSheet",
|
|
@@ -470,7 +468,7 @@ export default {
|
|
|
|
|
|
/* 获取表格分类 */
|
|
|
getTreeData(params = null) {
|
|
|
- sheetInterface.classifyList().then((res) => {
|
|
|
+ sheetInterface.classifyList({Source: this.sourceMap[this.$route.path]}).then((res) => {
|
|
|
const { Ret, Data } = res;
|
|
|
if (Ret !== 200) return;
|
|
|
|
|
@@ -491,6 +489,7 @@ export default {
|
|
|
Keyword: query,
|
|
|
CurrentIndex: 1,
|
|
|
PageSize: 10000,
|
|
|
+ Source: this.sourceMap[this.$route.path]
|
|
|
}).then((res) => {
|
|
|
if (res.Ret !== 200) return;
|
|
|
this.searchOptions = res.Data.List || [];
|
|
@@ -565,6 +564,7 @@ export default {
|
|
|
.classifyDel({
|
|
|
ExcelClassifyId,
|
|
|
ExcelInfoId,
|
|
|
+ Source: this.sourceMap[this.$route.path]
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.Ret !== 200) return;
|
|
@@ -693,6 +693,7 @@ export default {
|
|
|
CurrentIndex: this.sheet_page,
|
|
|
PageSize: this.sheet_pages_size,
|
|
|
ExcelClassifyId: this.select_classify || 0,
|
|
|
+ Source: this.sourceMap[this.$route.path]
|
|
|
}).then((res) => {
|
|
|
if (res.Ret !== 200) return;
|
|
|
|