|
@@ -2,7 +2,7 @@
|
|
<div class="height_100 custom-analyse" v-if="showPage">
|
|
<div class="height_100 custom-analyse" v-if="showPage">
|
|
<el-container>
|
|
<el-container>
|
|
<el-aside width="350px">
|
|
<el-aside width="350px">
|
|
- <TabItem :active-item="activeItem" :treeList="treeList" @edit="handleEdit" @delete="handleDelete" @select="handleSelect" @handleAdd3="handleAdd3"></TabItem>
|
|
|
|
|
|
+ <TabItem :active-item="activeItem" :treeList="treeList" @add="addNewChart" @edit="handleEdit" @delete="handleDelete" @select="handleSelect" @handleAdd3="handleAdd3"></TabItem>
|
|
</el-aside>
|
|
</el-aside>
|
|
<el-main>
|
|
<el-main>
|
|
<el-header style="height:45px !important">
|
|
<el-header style="height:45px !important">
|
|
@@ -13,7 +13,7 @@
|
|
<el-button class="margin-right_10" type="text" size="small" @click="openDrawer(2)"><span class="icon iconfont icon-a-56-4tubiaopeizhi"></span>图形配置</el-button>
|
|
<el-button class="margin-right_10" type="text" size="small" @click="openDrawer(2)"><span class="icon iconfont icon-a-56-4tubiaopeizhi"></span>图形配置</el-button>
|
|
|
|
|
|
<el-button class="margin-right_10" type="text" size="small" @click.native="handleAdd1(0)"><span class="icon iconfont icon-baocun1"></span>保存</el-button>
|
|
<el-button class="margin-right_10" type="text" size="small" @click.native="handleAdd1(0)"><span class="icon iconfont icon-baocun1"></span>保存</el-button>
|
|
- <el-button class="margin-right_10" type="text" size="small" @click.native="handleAdd1(1)"><span class="icon iconfont icon--_lingcunwei"></span>另存为</el-button>
|
|
|
|
|
|
+ <el-button :disabled="!this.id" class="margin-right_10" type="text" size="small" @click.native="handleAdd1(1)"><span class="icon iconfont icon--_lingcunwei"></span>另存为</el-button>
|
|
<el-button class="margin-right_10" type="text" size="small" @click.native="handleExport"><span class="icon iconfont icon-daochushuju"></span>导出数据</el-button>
|
|
<el-button class="margin-right_10" type="text" size="small" @click.native="handleExport"><span class="icon iconfont icon-daochushuju"></span>导出数据</el-button>
|
|
<el-button class="margin-right_10" type="text" size="small" @click.native="handleScreenshot"><span class="icon iconfont icon-jietu"></span>截图</el-button>
|
|
<el-button class="margin-right_10" type="text" size="small" @click.native="handleScreenshot"><span class="icon iconfont icon-jietu"></span>截图</el-button>
|
|
</div>
|
|
</div>
|
|
@@ -99,7 +99,13 @@ export default {
|
|
loadingBtn:false,
|
|
loadingBtn:false,
|
|
id:null,
|
|
id:null,
|
|
loading:false,
|
|
loading:false,
|
|
- patentNum:0
|
|
|
|
|
|
+ patentNum:0,
|
|
|
|
+ ruleForm:{
|
|
|
|
+ parentId:null,
|
|
|
|
+ name:null,
|
|
|
|
+ sort:1,
|
|
|
|
+ permissions:1,
|
|
|
|
+ }
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {},
|
|
watch: {},
|
|
@@ -301,7 +307,36 @@ export default {
|
|
const response = await this.$api.queryAnalyseDetail({id:this.id})
|
|
const response = await this.$api.queryAnalyseDetail({id:this.id})
|
|
data = response.data
|
|
data = response.data
|
|
}else{
|
|
}else{
|
|
-
|
|
|
|
|
|
+ data ={
|
|
|
|
+ ...this.ruleForm
|
|
|
|
+ }
|
|
|
|
+ if(data.parentId){
|
|
|
|
+ this.ruleForm.parentId = null
|
|
|
|
+ var obj = this.treeList.find(item=>{
|
|
|
|
+ return item.id == data.parentId
|
|
|
|
+ })
|
|
|
|
+ if(obj){
|
|
|
|
+ if(obj.children){
|
|
|
|
+ data.sort = obj.children.length+1
|
|
|
|
+ }else{
|
|
|
|
+ data.sort = 1
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ data.parentId = null
|
|
|
|
+ data.sort = 1
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(this.treeList.length>0){
|
|
|
|
+ data.parentId = this.treeList[0].id
|
|
|
|
+ if(this.treeList[0].children){
|
|
|
|
+ data.sort = this.treeList[0].children.length +1
|
|
|
|
+ }else{
|
|
|
|
+ data.sort = 1
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ data.sort = 1
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
var form2 = {
|
|
var form2 = {
|
|
...data,
|
|
...data,
|
|
@@ -414,6 +449,14 @@ export default {
|
|
}
|
|
}
|
|
this.$store.commit('SET_CHART_FORM', form)
|
|
this.$store.commit('SET_CHART_FORM', form)
|
|
},
|
|
},
|
|
|
|
+ addNewChart(value,type){
|
|
|
|
+ this.id = null
|
|
|
|
+ this.ruleForm.parentId = value.id
|
|
|
|
+ this.handleAdd()
|
|
|
|
+ this.showChart = false
|
|
|
|
+ this.saveType = 1
|
|
|
|
+ this.openDrawer(1)
|
|
|
|
+ },
|
|
handleEdit(value,type) {
|
|
handleEdit(value,type) {
|
|
var title = '编辑组'
|
|
var title = '编辑组'
|
|
var form = { ...value }
|
|
var form = { ...value }
|