Forráskód Böngészése

ETA社区上线合并

jwyu 6 hónapja
szülő
commit
156e0248c9

+ 1 - 0
config/dev.env.js

@@ -15,4 +15,5 @@ module.exports = merge(prodEnv, {
   VUE_APP_ETA_DOCS:'"http://8.136.199.33:8622/update/index"',
 	VUE_APP_ETA_HELP_DOCS:'"http://8.136.199.33:8622/help/index"',
     VUE_APP_ETA_VIDEO:'"http://8.136.199.33:8622/video/list"',
+    VUE_APP_ETA_FORUM:'"http://8.136.199.33:8901/"',
 });

+ 1 - 0
config/prod.env.js

@@ -12,5 +12,6 @@ module.exports = {
 	VUE_APP_ETA_DOCS:'"https://etadocs.hzinsights.com/update/index"',
 	VUE_APP_ETA_HELP_DOCS:'"https://etadocs.hzinsights.com/help/index"',
 	VUE_APP_ETA_VIDEO:'"https://etadocs.hzinsights.com/video/list"',
+	VUE_APP_ETA_FORUM:'"http://8.136.199.33:8901/"',
 		
 }

+ 1 - 0
config/prod.test.env.js

@@ -12,4 +12,5 @@ module.exports = {
 	VUE_APP_ETA_DOCS:'"http://8.136.199.33:8622/update/index"',
 	VUE_APP_ETA_HELP_DOCS:'"http://8.136.199.33:8622/help/index"',
 	VUE_APP_ETA_VIDEO:'"http://8.136.199.33:8622/video/list"',
+	VUE_APP_ETA_FORUM:'"http://8.136.199.33:8901/"',
 }

+ 13 - 0
src/api/modules/chartApi.js

@@ -993,6 +993,19 @@ const dataBaseInterface = {
 		 */
 	getChangeEdbData:params=>{
 		return http.get('/datamanage/chart_info/convert/detail',params)
+	},
+
+	//上传至社区
+	chartUploadToForum:params=>{
+		return http.post('/datamanage/chart_info/forum/upload',params)
+	},
+	//同步至社区
+	chartUpdateToForum:params=>{
+		return http.post('/datamanage/chart_info/forum/update',params)
+	},
+	//从社区撤回
+	chartWithdrawFromForum:params=>{
+		return http.post('/datamanage/chart_info/forum/delete',params)
 	}
 	
 }

BIN
src/assets/icons/menu/eta_forum.png


BIN
src/assets/img/icons/update_to_forum.png


BIN
src/assets/img/icons/upload_to_forum.png


BIN
src/assets/img/icons/withdraw_form_forum.png


+ 24 - 0
src/lang/modules/EtaChart/commonLang.js

@@ -152,6 +152,30 @@ export default {
     zh:'固定日期',
     en:'Fixed Date'
   },
+  upload_to_forum:{
+    zh:'上传至社区',
+    en:'Upload to Forum'
+  },
+  update_to_forum:{
+    zh:'同步至社区',
+    en:'Update to Forum'
+  },
+  withdraw_from_forum:{
+    zh:'从社区撤回',
+    en:'Withdraw from Forum'
+  },
+  upload_to_forum_title:{
+    zh:'上传图表至社区',
+    en:'Chart upload to Forum'
+  },
+  upload_to_forum_tip:{
+    zh:'逻辑简述',
+    en:'Introduction'
+  },
+  upload_to_forum_placeholder:{
+    zh:'请简述图表逻辑',
+    en:'Please Enter Introduction'
+  },
 
   //操作提示文案
   OptMsg:{

+ 4 - 0
src/utils/buttonConfig.js

@@ -360,6 +360,10 @@ export const chartLibPermission = {
     chartLib_isOnlyMine:'chartLib:isOnlyMine',//只看我的
     chartLib_classifyOpt_add:'chartLib:classifyOpt:add',//新增/编辑分类
 	chartLib_classifyOpt_delete:'chartLib:classifyOpt:delete',//删除分类
+
+    chartLib_uploadToForum:'chartLib:uploadToForum',//上传至社区
+    chartLib_updateToForum:'chartLib:updateToForum',//同步至社区
+    chartLib_withdrawfromForum:'chartLib:withdrawfromForum',//从社区撤回
 }
 
 /*

+ 7 - 1
src/utils/icon.js

@@ -70,5 +70,11 @@ export default {
 	/* 数据无权限icon */
 	lock_ico2: require('@/assets/img/icons/lock_black.png'),
 	/* 无权限缺省大icon */
-	lock_big: require('@/assets/img/icons/lock_big.png')
+	lock_big: require('@/assets/img/icons/lock_big.png'),
+	/* 上传至社区icon */
+	upload_to_forum: require('@/assets/img/icons/upload_to_forum.png'),
+	/* 同步至社区icon */
+	update_to_forum: require('@/assets/img/icons/update_to_forum.png'),
+	/* 从社区撤回icon */
+	withdraw_from_forum: require('@/assets/img/icons/withdraw_form_forum.png'),
 }

+ 29 - 2
src/views/Home.vue

@@ -38,12 +38,33 @@
               <template v-for="(item, index) in navlists">
                 <el-menu-item
                   :path="item.level_path"
-                  :index="item.level_path"
+                  :index="item.level_path==='etaForum'?null:item.level_path"
                   :key="item.level_path"
                   :style="!isCollapse ? 'text-align:left' : ''"
                   v-if="item.IsLevel === 1&&!item.hidden"
                 >
+                  <span class="el-level-path" v-if="item.path==='etaForum'" @click.prevent="handleGoETAForum">
+                    <img
+                      :src="getMenuIcon(item)"
+                      alt=""
+                      style="width: 24px; height: 24px"
+                    />
+                    <span class="titleLetter" v-show="isCollapse">{{
+                      isCollapse ? MenuLetterMap[item.name] || "" : ""
+                    }}</span>
+                    <span
+                      style="
+                        display: inline-block;
+                        width: 96px;
+                        text-align: left;
+                        font-size: 15px;
+                        margin-left: 20px;
+                      "
+                      >{{ $i18nt.locale==='zh'?item.name:item.name_en }}</span
+                    >
+                  </span>
                   <a
+                    v-else
                     :href="`/${item.level_path}`"
                     class="el-level-path"
                     :style="`display: block;color:${
@@ -479,6 +500,7 @@ export default {
   methods: {
     getMenuIcon(item){
       const iconMap=new Map([
+        ['ETA社区',require('@/assets/icons/menu/eta_forum.png')],
         ['外部链接',require('@/assets/icons/menu/out_link.png')],
         ['研报管理',require('@/assets/icons/menu/yb_manager.png')],
         ['智能ppt',require('@/assets/icons/menu/ppt.png')],
@@ -783,7 +805,7 @@ export default {
           let shouldVerificationRoute=["Sysdatauth"]
           shouldVerificationRoute.map(sMenu =>{
             this.navlists.forEach(item =>{
-              if(item.children.some(menu => menu.path === sMenu || '/'+menu.path === sMenu)){
+              if(item.children&&item.children.some(menu => menu.path === sMenu || '/'+menu.path === sMenu)){
                 // 添加有权限的路由
                 this.$store.commit("ADD_PERMISSION_ROUTE", sMenu);
                 return
@@ -920,6 +942,11 @@ export default {
           )
         }
       })
+    },
+
+    handleGoETAForum(item,e){
+      const href = `${process.env.VUE_APP_ETA_FORUM}`
+      window.open(href, '_blank')
     }
   },
 };

+ 1 - 1
src/views/Login.vue

@@ -412,7 +412,7 @@ export default {
                             break;
                         }
                     }
-                    return resolvePath || "/" + menuList[0].children[0].path;
+                    return resolvePath || "/" + (menuList[0].children?menuList[0].children[0].path:menuList[1].children[0].path);
                 }
                 return "/" + pathVal;
             });

+ 98 - 0
src/views/dataEntry_manage/chartSetting.vue

@@ -656,6 +656,31 @@
                       >
                         <i class="el-icon-delete" style="color: #ff4040" />&nbsp;<!-- 删除 -->{{$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" />&nbsp;<!-- 上传至社区 -->{{$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" />&nbsp;<!-- 同步至社区 -->{{$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" />&nbsp;<!-- 从社区撤回 -->{{$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()
+        }
+      }
     }
 
   },