|
@@ -656,6 +656,31 @@
|
|
|
>
|
|
|
<i class="el-icon-delete" style="color: #ff4040" /> <!-- 删除 -->{{$t('Chart.chart_del_btn')}}
|
|
|
</li>
|
|
|
+ <li
|
|
|
+ v-if="chartInfo.ForumChartInfoId==0"
|
|
|
+ v-permission="permissionBtn.chartLibPermission.chartLib_uploadToForum"
|
|
|
+ class="span-item copy"
|
|
|
+ @click="showUploadToForum=true;uploadToForumIntro=''"
|
|
|
+ >
|
|
|
+ <img style="width: 16px;vertical-align: middle" :src="$icons.upload_to_forum" /> <!-- 上传至社区 -->{{$t('Chart.upload_to_forum')}}
|
|
|
+ </li>
|
|
|
+ <template v-else>
|
|
|
+ <li
|
|
|
+ v-permission="permissionBtn.chartLibPermission.chartLib_updateToForum"
|
|
|
+ class="span-item copy"
|
|
|
+ @click="handleForumOpt('update')"
|
|
|
+ >
|
|
|
+ <img style="width: 16px;vertical-align: middle" :src="$icons.update_to_forum" /> <!-- 同步至社区 -->{{$t('Chart.update_to_forum')}}
|
|
|
+ </li>
|
|
|
+ <li
|
|
|
+ v-permission="permissionBtn.chartLibPermission.chartLib_withdrawfromForum"
|
|
|
+ class="span-item copy"
|
|
|
+ @click="handleForumOpt('withdraw')"
|
|
|
+ >
|
|
|
+ <img style="width: 16px;vertical-align: middle" :src="$icons.withdraw_from_forum" /> <!-- 从社区撤回 -->{{$t('Chart.withdraw_from_forum')}}
|
|
|
+ </li>
|
|
|
+ </template>
|
|
|
+
|
|
|
</ul>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -824,6 +849,42 @@
|
|
|
@cancel="isLangInfoDia=false"
|
|
|
@updateLang="updateLang"
|
|
|
/>
|
|
|
+ <!-- 上传图表至社区 -->
|
|
|
+ <el-dialog
|
|
|
+ :title="$t('Chart.upload_to_forum_title')"
|
|
|
+ :visible.sync="showUploadToForum"
|
|
|
+ :modal-append-to-body="false"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :center="true"
|
|
|
+ v-dialogDrag
|
|
|
+ custom-class="dialogclass"
|
|
|
+ width="510px"
|
|
|
+ >
|
|
|
+ <el-form label-position="left" label-width="90px">
|
|
|
+ <el-form-item :label="$t('Chart.upload_to_forum_tip')">
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ :rows="6"
|
|
|
+ :placeholder="$t('Chart.upload_to_forum_placeholder')"
|
|
|
+ v-model="uploadToForumIntro">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" style="text-align: center">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ size="medium"
|
|
|
+ @click="showUploadToForum=false"
|
|
|
+ >{{$t('Dialog.cancel_btn')}}</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="medium"
|
|
|
+ @click="handleForumOpt('upload')"
|
|
|
+ >{{ $t('Dialog.confirm_btn')}}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -949,6 +1010,9 @@ export default {
|
|
|
labelList:[],//标签列表
|
|
|
|
|
|
CanOpClassify: false,//添加分类按钮控制
|
|
|
+
|
|
|
+ showUploadToForum:false,//显示上传至社区弹窗
|
|
|
+ uploadToForumIntro:'',//上传至社区简述
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -2488,6 +2552,40 @@ export default {
|
|
|
this.dynamicNode = _node;
|
|
|
this.dynamicNode&&this.resetNodeStyle(this.dynamicNode)
|
|
|
})
|
|
|
+ },
|
|
|
+
|
|
|
+ // 图表到社区的操作
|
|
|
+ async handleForumOpt(type){
|
|
|
+ if(type==='upload'){
|
|
|
+ const res=await dataBaseInterface.chartUploadToForum({
|
|
|
+ ChartInfoId:this.chartInfo.ChartInfoId,
|
|
|
+ Description:this.uploadToForumIntro
|
|
|
+ })
|
|
|
+ if(res.Ret===200){
|
|
|
+ this.$message.success(this.$t('MsgPrompt.upload_success_msg'))
|
|
|
+ this.showUploadToForum=false
|
|
|
+ this.getChartDetail()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(type==='update'){
|
|
|
+ const res=await dataBaseInterface.chartUpdateToForum({
|
|
|
+ ChartInfoId:this.chartInfo.ChartInfoId
|
|
|
+ })
|
|
|
+ if(res.Ret===200){
|
|
|
+ this.$message.success(this.$t('MsgPrompt.operate_success_msg'))
|
|
|
+ this.getChartDetail()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(type==='withdraw'){
|
|
|
+ const res=await dataBaseInterface.chartWithdrawFromForum({
|
|
|
+ ChartInfoId:this.chartInfo.ChartInfoId
|
|
|
+ })
|
|
|
+ if(res.Ret===200){
|
|
|
+ this.$message.success(this.$t('MsgPrompt.operate_success_msg'))
|
|
|
+ this.getChartDetail()
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
},
|