|
@@ -326,6 +326,8 @@
|
|
|
/>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <!-- 指标列表 -->
|
|
|
+ <edbTableSection :tableData="tableData"/>
|
|
|
</div>
|
|
|
<!-- 列表 -->
|
|
|
<chartListTableWrap
|
|
@@ -359,6 +361,15 @@
|
|
|
:data="saveOtherChartInfo"
|
|
|
@ensure="getTreeData"
|
|
|
/>
|
|
|
+
|
|
|
+ <!-- 加入我的图库弹窗 -->
|
|
|
+ <addMyClassifyDia
|
|
|
+ :isAddMyDialog="isAddMyChart"
|
|
|
+ :add_id="add_chart_id"
|
|
|
+ :add_ids="add_ids"
|
|
|
+ @cancel="isAddMyChart = false"
|
|
|
+ @addSuccess="addMySuccess"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -373,6 +384,7 @@ import setEnNameDia from '@/views/dataEntry_manage/components/setEnNameDia.vue'
|
|
|
import { chartSetMixin } from '@/views/dataEntry_manage/mixins/chartPublic';
|
|
|
import { copyOtherOptions } from '@/utils/defaultOptions';
|
|
|
import setLangInfoDia from '@/views/dataEntry_manage/components/setLangInfo.vue'
|
|
|
+import edbTableSection from '@/views/chartRelevance_manage/crossVarietyAnalysis/components/edbTableSection.vue';
|
|
|
export default {
|
|
|
components: {
|
|
|
openDialog,
|
|
@@ -380,9 +392,17 @@ export default {
|
|
|
addMyClassifyDia,
|
|
|
SaveChartOther,
|
|
|
setEnNameDia,
|
|
|
- setLangInfoDia
|
|
|
+ setLangInfoDia,
|
|
|
+ edbTableSection
|
|
|
},
|
|
|
mixins: [leftMixin, chartSetMixin],
|
|
|
+ computed:{
|
|
|
+ /* 分享地址 */
|
|
|
+ linkUrl() {
|
|
|
+ const LINK_CHART_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow';
|
|
|
+ return `${LINK_CHART_URL}?code=${this.chartInfo.UniqueCode}&fromType=share?&lang=${this.currentLang}`
|
|
|
+ }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
showData: false,
|
|
@@ -414,6 +434,10 @@ export default {
|
|
|
isShowSaveOther: false,//另存为
|
|
|
saveOtherChartInfo: {},
|
|
|
|
|
|
+ isAddMyChart: false, //加入图库弹窗
|
|
|
+ add_chart_id: 0, //要加入的图表
|
|
|
+ add_ids:[],//加入时已有的分类
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -501,6 +525,7 @@ export default {
|
|
|
this.listFinished = false
|
|
|
this.chart_page = 1
|
|
|
this.chartList = []
|
|
|
+ this.chart_total=0
|
|
|
this.getPublicList()
|
|
|
},
|
|
|
|
|
@@ -576,6 +601,83 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ /* 加入我的图库 */
|
|
|
+ addMychartHandle(item) {
|
|
|
+ this.add_chart_id = item.ChartInfoId;
|
|
|
+ //已有的分类ids
|
|
|
+ this.add_ids = item.MyChartClassifyId
|
|
|
+ ? item.MyChartClassifyId.split(",").map((item) => Number(item))
|
|
|
+ : [];
|
|
|
+ this.isAddMyChart = true;
|
|
|
+ },
|
|
|
+
|
|
|
+ /* 加入我的图库成功 */
|
|
|
+ addMySuccess(params) {
|
|
|
+ this.isAddMyChart = false;
|
|
|
+
|
|
|
+ /* 判断是详情还是图库列表 */
|
|
|
+ if (this.select_id) {
|
|
|
+ this.chartInfo.IsAdd = true;
|
|
|
+ this.chartInfo.MyChartId = params.MyChartInfoId;
|
|
|
+ this.chartInfo.MyChartClassifyId = params.MyChartClassifyId;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ copyChartHandle:_.debounce(function(type){
|
|
|
+ let chartsName = this.currentLang=='zh'?this.chartInfo.ChartName:this.chartInfo.ChartNameEn
|
|
|
+ let { heightNum, widthNum , newTitle , dynamic_copyOptions} = this.dynamicWidthAndHeight(type,this.chartInfo.ChartType,chartsName,1)
|
|
|
+ const chartType = 'seasonLegend';
|
|
|
+ // 英文转SVG设置变动
|
|
|
+ if(this.currentLang == 'en'){
|
|
|
+ // 如果竖轴坐标单位为'英文单位',表示客户没填,转成svg时置为空
|
|
|
+ this.$refs.chartRef.chart.options.yAxis.forEach(it => {
|
|
|
+ if(it.title.text == '英文单位') it.title.text=''
|
|
|
+ });
|
|
|
+ }
|
|
|
+ let svg = this.$refs.chartRef.chart.getSVG({
|
|
|
+ chart:{
|
|
|
+ width:widthNum,
|
|
|
+ height:heightNum,
|
|
|
+ backgroundColor:"rgba(255, 255, 255, 0)",
|
|
|
+ },
|
|
|
+ title: {
|
|
|
+ text: newTitle,
|
|
|
+ margin: 10,
|
|
|
+ style: {
|
|
|
+ fontSize: '18px'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ legend:{
|
|
|
+ ...copyOtherOptions[chartType],
|
|
|
+ ...dynamic_copyOptions[chartType]
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.copyBlobItem(widthNum,heightNum,svg,type);
|
|
|
+ },500),
|
|
|
+
|
|
|
+ copyChartConfirm(type) {
|
|
|
+ type !== "url" && this.copyChartHandle(type);
|
|
|
+
|
|
|
+ type == "url" && this.shareUrl();
|
|
|
+ },
|
|
|
+
|
|
|
+ /* 分享图表 */
|
|
|
+ shareUrl() {
|
|
|
+ var clipboard = new this.Clipboard(".shareLink");
|
|
|
+ clipboard.on("success", (e) => {
|
|
|
+ console.log(e);
|
|
|
+ this.$message.success(/* "复制链接成功" */this.$t('Chart.OptMsg.copy_link_success'));
|
|
|
+ e.clearSelection(); // 释放内存
|
|
|
+ clipboard.destroy();
|
|
|
+ });
|
|
|
+ // // 浏览器不支持
|
|
|
+ clipboard.on("error", (e) => {
|
|
|
+ this.$message.warning(/* "浏览器暂不支持" */this.$t('MsgPrompt.browser_not_support'));
|
|
|
+ // 释放内存
|
|
|
+ clipboard.destroy();
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
|