Explorar o código

Merge branch 'feature-private' into 'dev-online'

Feature private

See merge request crowd-2019/crowd-test-service-front!182
郭超 %!s(int64=4) %!d(string=hai) anos
pai
achega
70febcd30f

+ 2 - 2
src/components/commons/Header2.0.vue

@@ -63,8 +63,8 @@
 <!--              </router-link>-->
 <!--            </li>-->
 
-            <span v-if="isLogin&&rolesPermissions.isSystemAdministrator">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>
-            <li v-if="isLogin&&rolesPermissions.isSystemAdministrator">
+            <span v-if="isLogin&&(rolesPermissions.isSystemAdministrator || rolesPermissions.isRegionManager)">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>
+            <li v-if="isLogin&&(rolesPermissions.isSystemAdministrator || rolesPermissions.isRegionManager)">
               <a :href="manage_url" v-if="manage_url">后台管理</a>
             </li>
           </ul>

+ 5 - 23
src/components/task/Task.vue

@@ -63,7 +63,7 @@
                     <el-radio
                       :label="item"
                       name="type"
-                      v-for="item,index in institutionArray"
+                      v-for="(item,index) in institutionArray"
                       :key="index"
                     >{{item.evaluationAgencyName}}
                     </el-radio>
@@ -300,8 +300,7 @@ export default {
       showBD: true,
       rolesPermissions: {},
       loading: false,
-      isModifyMode: false,
-      institutionArray: [],
+      isModifyMode: false,      institutionArray: [],
       tabPosition: 'top',
       resourceType: ResourceType,
       serviceType: [],
@@ -427,24 +426,6 @@ export default {
     serviceType(val) {
       this.serviceType = val
     },
-    // 'task.institution' () {
-    //   if (this.task.institution) {
-    //     //this.$refs.addFormProvince.resetProviceCity()
-    //     this.task.location = {provinceCode: '', cityCode: ''}
-    //   }
-    // },
-    // 'task.location' () {
-    //   if (this.task.location.provinceCode || this.task.location.cityCode) {
-    //     this.task.institution = ''
-    //   }
-    // },
-    // 'task.resource' () {
-    //   if (this.task.resource == '广场') {
-    //     this.$refs.addFormProvince.resetProviceCity()
-    //     this.task.institution = ''
-    //     this.task.location = {provinceCode: '', cityCode: ''}
-    //   }
-    // },
     deep: true
   },
   mounted() {
@@ -701,7 +682,7 @@ export default {
       this.task.title = res.crowdTaskVO.title
       this.task.description = res.crowdTaskVO.description
       this.task.serviceType = res.crowdTaskVO.serviceType
-      this.task.resource = res.crowdTaskVO.resource
+      this.task.resource = res.crowdTaskVO.resource.toString()
       this.task.location = res.crowdTaskVO.location == null ? {
         provinceCode: 3200,
         cityCode: 3201
@@ -722,7 +703,8 @@ export default {
       this.crowdReportUrl = res.crowdTaskVO.writeReportUrl;
       this.acceptedUserList = res.acceptedUserList
       this.handleTestTypeChange(res.crowdTaskVO.serviceType);
-      this.serviceName = this.getServiceByCode(res.crowdTaskVO.serviceType);
+      this.serviceName = this.getServiceByCode(res.crowdTaskVO.serviceType)
+      this.getWordCloud()
       this.hideLoading()
       notify('success', '修改成功')
     },

+ 19 - 12
src/components/task/TaskCloud.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id='taskWordCloud' style="height: 457px;width: 100%" ></div>
+  <div id='taskWordCloud' style="height: 457px;width: 100%"></div>
 </template>
 
 <script>
@@ -14,9 +14,16 @@ export default {
   props: ['info'],
   data() {
     return {
-      chart: null
+      chart: null,
+      words: this.info,
     };
   },
+  watch: {
+    info(nv){
+      this.words = nv;
+      this.initChart();
+    }
+  },
   mounted() {
     this.initChart();
   },
@@ -29,7 +36,7 @@ export default {
   },
   methods: {
     initChart() {
-      this.chart = echarts.init(document.getElementById('taskWordCloud'),{width:'auto',height:'500px'});
+      this.chart = echarts.init(document.getElementById('taskWordCloud'), {width: 'auto', height: '500px'});
       const option = {
         backgroundColor: "#fff",
         // tooltip: {
@@ -53,7 +60,7 @@ export default {
             // maskImage: maskImage,
             textStyle: {
               normal: {
-                color: function() {
+                color: function () {
                   return (
                     "rgb(" +
                     Math.round(Math.random() * 255) +
@@ -66,13 +73,13 @@ export default {
                 }
               }
             },
-            grid:{
-              x:10,
-              y:10,
-              x2:10,
-              y2:10,
-              height:"500px",
-              width:"100%"
+            grid: {
+              x: 10,
+              y: 10,
+              x2: 10,
+              y2: 10,
+              height: "500px",
+              width: "100%"
             },
             //位置相关设置
             // Folllowing left/top/width/height/right/bottom are used for positioning the word cloud
@@ -84,7 +91,7 @@ export default {
             width: "100%",
             height: "100%",
             //数据
-            data: this.info
+            data: this.words
           }
         ]
       };

+ 1 - 1
src/pages/Homepage/BrandCard.vue

@@ -3,7 +3,7 @@
     <div slot="header" class="clearfix test-card-header">
       <span>入驻品牌机构</span>
       <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMoreAgency()">
-        more>>
+        >>
       </el-button>
     </div>
     <div>

+ 1 - 1
src/pages/Homepage/HotAgency.vue

@@ -3,7 +3,7 @@
     <div slot="header" class="popular-header">
       <img src="../../assets/img/agency.png" alt="hot-crowd" class="popular-header-img"/>
       <span class="popular-header-title">测评机构排行榜</span>
-      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMoreAgency()">more>></el-button>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMoreAgency()">>></el-button>
     </div>
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in agencyRank" :key="item.id">

+ 1 - 1
src/pages/Homepage/HotContest.vue

@@ -3,7 +3,7 @@
     <div slot="header" class="popular-header">
       <img src="../../assets/img/crowd-contest.png" alt="hot-crowd" class="popular-header-img"/>
       <span class="popular-header-title">众测大赛</span>
-      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">>></el-button>
     </div>
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in competitionList" :key="item.id">

+ 1 - 1
src/pages/Homepage/HotCrowd.vue

@@ -3,7 +3,7 @@
     <div slot="header" class="popular-header">
       <img src="../../assets/img/HotCrowd.png" alt="hot-crowd" class="popular-header-img"/>
       <span class="popular-header-title">热门众测</span>
-      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">>></el-button>
     </div>
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in applicationTypeRank" :key="item.id" @click.native="goToDetail(item.code)">

+ 1 - 1
src/pages/Homepage/HotUser.vue

@@ -3,7 +3,7 @@
     <div slot="header" class="popular-header">
       <img src="../../assets/img/userRank.png" alt="hot-crowd" class="popular-header-img"/>
       <span class="popular-header-title">众测人员排行榜</span>
-      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">>></el-button>
     </div>
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in userRank" :key="item.id">

+ 1 - 1
src/pages/Homepage/ResourceAndTool.vue

@@ -2,7 +2,7 @@
   <el-card class="test-card">
     <div slot="header" class="clearfix test-card-header">
       <span>众测工具</span>
-      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">>></el-button>
     </div>
     <div>
       <el-row>

+ 1 - 1
src/pages/Homepage/TestCard.vue

@@ -8,7 +8,7 @@
               <span>{{ item && item.name }}</span>
             </el-col>
             <el-col :span="6">
-              <el-button style="float: right;line-height: 25px;padding:0" type="text"  @click="getMore()">more>></el-button>
+              <el-button style="float: right;line-height: 25px;padding:0" type="text"  @click="getMore()">>></el-button>
             </el-col>
           </el-row>
         </div>

+ 1 - 1
src/pages/Square/PopularProject.vue

@@ -4,7 +4,7 @@
     <div slot="header" class="popular-header">
       <img src="../../assets/img/popular-project.png" alt="popular-project" class="popular-header-img"/>
       <span class="popular-header-title">热门项目</span>
-      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMore()">more>></el-button>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMore()">>></el-button>
     </div>
     <div v-if="!hotCrowdTestProjectVOs.length" style="text-align: center;padding: 5px 0"><span>暂无项目</span></div>
     <div class="popular-list" v-else>

+ 1 - 1
src/pages/Square/PopularTask.vue

@@ -3,7 +3,7 @@
     <div slot="header" class="popular-header">
       <img src="../../assets/img/popularTask.png" alt="popular-project" class="popular-header-img"/>
       <span class="popular-header-title">热门任务</span>
-      <el-button style="float: right; padding: 3px 0" type="text" class="pull-right"  @click="goToMore()">more>></el-button>
+      <el-button style="float: right; padding: 3px 0" type="text" class="pull-right"  @click="goToMore()">>></el-button>
     </div>
     <div v-if="!hotCrowdTaskVOs.length" style="text-align: center;padding: 5px 0"><span>暂无任务</span></div>
     <div class="popular-list" v-else>

+ 1 - 1
src/pages/Technology/HotActicle.vue

@@ -4,7 +4,7 @@
       <div slot="header" class="popular-header">
         <img src="../../assets/img/hot-article.jpg" alt="hot-crowd" class="popular-header-img"/>
         <span class="popular-header-title">热门文章</span>
-        <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMore()">more>></el-button>
+        <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMore()">>></el-button>
       </div>
       <div class="popular-list">
         <el-row class="popular-list-item" v-for="(item,index) in articleArr" :key="item.id" v-if="index<7">

+ 1 - 1
src/style/main.scss

@@ -33,7 +33,7 @@ body {
 }
 
 html, body {
-  height: 100%;
+  min-height: 100%;
   margin: 0;
   padding: 0;
 }