guojy 1 rok pred
rodič
commit
ef4459dffa
46 zmenil súbory, kde vykonal 1130 pridanie a 507 odobranie
  1. 2 1
      src/assets/css/dhtmlxgantt.css
  2. 3 1
      src/components/EmployeeSelector.vue
  3. 135 0
      src/components/UserImage - 副本.vue
  4. 42 23
      src/components/UserImage.vue
  5. 1 0
      src/components/organization/EmployeeTable.vue
  6. 0 1
      src/components/system/User.vue
  7. 1 1
      src/index.vue
  8. 3 3
      src/main.js
  9. 1 5
      src/okr/components/TargetDetail/Interaction.vue
  10. 1 1
      src/okr/components/planTask/PlanTaskItem.vue
  11. 25 7
      src/okr/components/project/AddProject.vue
  12. 101 28
      src/okr/components/project/Dhtmlx.vue
  13. 30 15
      src/okr/components/project/KanMilestone.vue
  14. 141 32
      src/okr/components/project/Milestone.vue
  15. 119 49
      src/okr/components/project/ProjectPreview.vue
  16. 2 2
      src/okr/components/project/ProjectSchedule.vue
  17. 30 17
      src/okr/components/project/ProjectTj.vue
  18. 11 4
      src/okr/components/project/SelectProjectGj.vue
  19. 2 2
      src/okr/components/public/AddTask.vue
  20. 1 1
      src/okr/components/public/Progress.vue
  21. 1 1
      src/okr/components/public/Schedule.vue
  22. 5 5
      src/okr/components/public/TargetDetail.vue
  23. 21 8
      src/okr/components/public/TargetSearch.vue
  24. 33 13
      src/okr/components/public/TaskDetail.vue
  25. 129 117
      src/okr/components/public/TaskItem.vue
  26. 8 1
      src/okr/views/okrIndex.vue
  27. 51 13
      src/okr/views/planTask/work.vue
  28. 10 6
      src/okr/views/project/myProject.vue
  29. 121 109
      src/okr/views/project/projectDetail.vue
  30. 1 1
      src/okr/views/targetAnalyse/taskTj.vue
  31. 4 3
      src/okr/views/targetMt/myTargert.vue
  32. 1 1
      src/okr/views/targetMt/okrInform.vue
  33. 1 1
      src/okr/views/targetMt/replay.vue
  34. 13 0
      src/performance/components/equation/LogicEnum.vue
  35. 22 0
      src/performance/components/equation/LogicPercent.vue
  36. 21 0
      src/performance/components/equation/LogicSection.vue
  37. 4 2
      src/performance/views/statement/statistics.vue
  38. 1 1
      src/point/views/setting/fixed_integral.vue
  39. 1 1
      src/point/views/setting/set_basics.vue
  40. 1 1
      src/point/views/statistics/balanceA.vue
  41. 1 1
      src/point/views/statistics/dept_rank.vue
  42. 1 1
      src/point/views/statistics/total_rank.vue
  43. 3 3
      src/point/views/workbench/task/my_issue.vue
  44. 6 6
      src/router/index.js
  45. 18 18
      src/router/okrRouter.js
  46. 1 1
      src/utils/axios.js

+ 2 - 1
src/assets/css/dhtmlxgantt.css

@@ -1106,7 +1106,8 @@ div.dhx_modal_cover {
 
 .gantt_task_line.gantt_milestone {
   visibility: hidden;
-  top: 12px !important;
+  /* top: 12px !important; */
+  margin-top: 6px;
   /* background-color: #409EFF; */
   /* border: 0 solid #61164f; */
 /*  height: 10px !important;

+ 3 - 1
src/components/EmployeeSelector.vue

@@ -412,7 +412,7 @@ export default {
     //清除选择的部门
     dept_cancel(item, is) {
       item.checked = false;
-      if (item.children) {
+      if (item.children&&this.dept_children) {
         //左边
         item.children.forEach(childrens => {
           this.dept_cancel(childrens);
@@ -435,6 +435,8 @@ export default {
       var obj = this.getDeptz(item.dept_id, dept_list); //递归找到所属部门
       this.dept_cancel(obj);
     },
+
+
     // 递归获取指定ID部门
     getDeptz(id, arr) {
       var obj = {};

+ 135 - 0
src/components/UserImage - 副本.vue

@@ -0,0 +1,135 @@
+<template>
+  <div style="text-align: center;">
+    <el-image v-if="info.img_url" :src="info.img_url" :style="{ width: width, height: height }" style="border-radius: 50%;margin: 0 auto;" fit="fill">
+      <div slot="error" class="image-slot"><i class="el-icon-picture"></i></div>
+    </el-image>
+    <span class="img_round" v-else>
+      <div class="user_name_div" :style="{ width: width, height: height, lineHeight: height, fontSize: fontSize + 'px' }">{{ name }}</div>
+      <div class="user_img_bg" :style="{ width: width, height: height }"></div>
+    </span>
+  </div>
+</template>
+<script>
+export default {
+  name: 'userImage',
+  props: {
+    width: {
+      type: String,
+      default: '40px'
+    },
+    height: {
+      type: String,
+      default: '40px'
+    },
+    id: {
+      type: Number,
+      default: 0
+    },
+    img_url: {
+      type: String,
+      default: ''
+    },
+    user_name: {
+      type: String,
+      default: '未知'
+    },
+    fontSize: {
+      type: String,
+      default: '16'
+    }
+  },
+  watch: {
+    id: function(val) {
+      // this.set_info();
+      this.name_no();
+    },
+    img_url: function(val) {
+      // this.set_info();
+      this.name_no();
+    },
+    user_name: function(val) {
+      // this.set_info();
+      this.name_no();
+    }
+  },
+  // 数据
+  data() {
+    // let info = this.$getEmployeeMapItem(this.id) || { name: '', img_url: '', id: 0 };
+    // if (this.img_url != '') {
+    //   info.img_url = this.img_url;
+    // }
+    // if(this.user_name&&this.user_name!='未知'){
+    //   info.name = this.user_name;
+    // }
+    return {
+      info: info,
+      name: '',
+
+
+    };
+  },
+  computed: {},
+  // 方法
+  methods: {
+    set_info() {
+      let info = this.$getEmployeeMapItem(this.id) || { name: '', img_url: '', id: 0 };
+      if (this.img_url != '') {
+        info.img_url = this.img_url;
+      }
+      console.log(info)
+      this.info = info;
+    },
+    // 加载
+    name_no() {
+      if (!this.info.img_url) {
+        let pattern = new RegExp('^[\u4E00-\u9FA5]+');
+        if (this.info.name.length > 2) {
+          if (pattern.test(this.info.name)) {
+            this.name = this.info.name.substring(this.info.name.length - 2, this.info.name.length);
+          } else {
+            this.name = this.info.name.substring(0, 2);
+          }
+        } else {
+          this.name = this.info.name||this.user_name;
+        }
+      }
+    }
+  },
+  // 组件挂载完成
+  mounted() {
+    this.name_no();
+  }
+};
+</script>
+<style scoped>
+.img_round {
+  position: relative;
+  display: inline-block;
+  vertical-align: top;
+}
+.img_round .user_img_bg {
+  border-radius: 50%;
+  background: #409EFF;
+}
+.user_name_div {
+  position: absolute;
+  z-index: 1;
+  text-align: center;
+  color: #fff;
+}
+.logo_img {
+  border-radius: 50%;
+}
+/deep/ .image-slot {
+  font-size: 30px;
+  line-height: 50px;
+  text-align: center;
+  background: #f1f1f1;
+}
+/deep/ .van-image {
+  vertical-align: top;
+}
+/deep/ .el-image{
+  display: block
+}
+</style>

+ 42 - 23
src/components/UserImage.vue

@@ -1,6 +1,6 @@
 <template>
   <div style="text-align: center;">
-    <el-image v-if="info.img_url" :src="info.img_url" :style="{ width: width, height: height }" style="border-radius: 50%;margin: 0 auto;" fit="fill">
+    <el-image v-if="img_url" :src="img_url" :style="{ width: width, height: height }" style="border-radius: 50%;margin: 0 auto;" fit="fill">
       <div slot="error" class="image-slot"><i class="el-icon-picture"></i></div>
     </el-image>
     <span class="img_round" v-else>
@@ -40,59 +40,78 @@ export default {
   },
   watch: {
     id: function(val) {
-      this.set_info();
+      // this.set_info();
       this.name_no();
     },
     img_url: function(val) {
-      this.set_info();
+      // this.set_info();
       this.name_no();
     },
     user_name: function(val) {
-      this.set_info();
+      // this.set_info();
       this.name_no();
     }
   },
   // 数据
   data() {
-    let info = this.$store.getters.employee_map_all[this.id] || { name: '', img_url: '', id: 0 };
-    if (this.img_url != '') {
-      info.img_url = this.img_url;
-    }
-    if (this.user_name != '') {
-      info.name = this.user_name;
-    }
+    // let info = this.$getEmployeeMapItem(this.id) || { name: '', img_url: '', id: 0 };
+    // if (this.img_url != '') {
+    //   info.img_url = this.img_url;
+    // }
+    // if(this.user_name&&this.user_name!='未知'){
+    //   info.name = this.user_name;
+    // }
     return {
-      info: info,
-      name: ''
+      // info: info,
+      name: '',
+      imgUrl:'',
     };
   },
   computed: {},
   // 方法
   methods: {
     set_info() {
-      let info = this.$store.getters.employee_map_all[this.id] || { name: '', img_url: '', id: 0 };
+      let info = this.$getEmployeeMapItem(this.id) || { name: '', img_url: '', id: 0 };
       if (this.img_url != '') {
         info.img_url = this.img_url;
       }
-      if (this.user_name != '') {
-        info.name = this.user_name;
-      }
       this.info = info;
     },
     // 加载
     name_no() {
-      if (!this.info.img_url) {
+      if(this.id){
+        let info = this.$getEmployeeMapItem(this.id) || { name: '', img_url: '', id: 0 };
+        if(info.id){
+          let pattern = new RegExp('^[\u4E00-\u9FA5]+');
+          this.imgUrl=info.img_url;
+          if (info.name.length > 2) {
+            if (pattern.test(info.name)) {
+              this.name = info.name.substring(info.name.length - 2,info.name.length);
+            } else {
+              this.name = info.name.substring(0, 2);
+            }
+          } else {
+            this.name =info.name;
+          }
+        }else{
+          this.imgUrl=this.img_url;
+          this.name =this.user_name;
+        }
+      }else if(this.img_url){
+        this.imgUrl=this.img_url;
+      }else if(this.user_name&&this.user_name!='未知'){
         let pattern = new RegExp('^[\u4E00-\u9FA5]+');
-        if (this.info.name.length > 2) {
-          if (pattern.test(this.info.name)) {
-            this.name = this.info.name.substring(this.info.name.length - 2, this.info.name.length);
+        if (this.user_name.length > 2) {
+          if (pattern.test(this.user_name)) {
+            this.name = this.user_name.substring(this.user_name.length - 2, this.user_name.length);
           } else {
-            this.name = this.info.name.substring(0, 2);
+            this.name =this.user_name.substring(0, 2);
           }
         } else {
-          this.name = this.info.name;
+          this.name =this.user_name;
         }
       }
+
     }
   },
   // 组件挂载完成

+ 1 - 0
src/components/organization/EmployeeTable.vue

@@ -298,6 +298,7 @@
       :deptId="filter.dept_id"
       :isChecKedAll="false"
       :child="false"
+      :is_filtration_creator="false"
       title="设置管理员"
       :visible.sync="show_employee_selector"
       @confirm="move_employee_confirm"

+ 0 - 1
src/components/system/User.vue

@@ -5,7 +5,6 @@
         <div @click="imagecropperShow = true" style="display:block;">
           <userImage
             class="person_imghead"
-            :id="employee_info.id"
             width="68px"
             height="68px"
             :img_url="employee_info.img_url"

+ 1 - 1
src/index.vue

@@ -46,7 +46,7 @@
             <!-- 切换公司或退出账号 -->
             <el-dropdown @command="handleCommand2">
               <span class="el-dropdown-link" style="cursor: pointer;">
-                <userImage class="user_img" :id="account_info.id" width="40px" height="40px" fontSize="14" :user_name="account_info.name" :img_url="account_info.img_url"></userImage>
+                <userImage class="user_img"  width="40px" height="40px" fontSize="14" :user_name="account_info.name" :img_url="account_info.img_url"></userImage>
               </span>
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item  v-for="(group, index) in userConcent" :key="index"  :command="group">

+ 3 - 3
src/main.js

@@ -10,8 +10,8 @@ import store from './store'
 import {getDept,openUrl, getToken, getTyps, getTypsName, supremeAuthority, getUserData, getEmployeeMap,getEmployeeMapAll,getEmployeeMapItem,getIsIdentity,getCache,setCache,removeCache,returnDeptName,getIsAdministrator} from '@/utils/auth'
 import './performanceSet' // 绩效系统相关配置
 import {onFilePreView } from '@/okr/utils/auth';
-import { VueOkrTree } from "vue-okr-tree";
-import "vue-okr-tree/dist/vue-okr-tree.css";
+// import { VueOkrTree } from "vue-okr-tree";
+// import "vue-okr-tree/dist/vue-okr-tree.css";
 import 'shepherd.js/dist/css/shepherd.css';
 
 import './icons'
@@ -33,7 +33,7 @@ Vue.component('userImage', UserImage)
 Vue.component('NoData', noData)
 Vue.component('BrawerBox', BrawerBox)
 Vue.component('TaskItem', TaskItem)
-Vue.component('VueOkrTree', VueOkrTree)
+// Vue.component('VueOkrTree', VueOkrTree)
 Vue.use(Element, {
   size: 'medium',
 })

+ 1 - 5
src/okr/components/TargetDetail/Interaction.vue

@@ -13,7 +13,7 @@
         <div class="flex-box-ce">
             <el-checkbox v-model="checked">仅看有附件的</el-checkbox>
             <el-input  class="input" maxlength="20" prefix-icon="el-icon-search" style="width: 206px;margin: 0 10px;" size="small" v-model="keyword" clearable placeholder="按沟通内容搜索" />
-            <el-button @click="huiFu({},true)"  class="primaryBtn"  size="small" v-if="isOperation"><i class="el-icon-edit"></i>立即沟通</el-button>
+            <el-button @click="huiFu({},true)"  class="primaryBtn"  size="small"><i class="el-icon-edit"></i>立即沟通</el-button>
         </div>
       </div>
       <div class="record" v-if="feedbackList.length > 0" style="margin: 20px 0;">
@@ -72,10 +72,6 @@ export default {
       type: Number,
       default: 0,
     },
-    isOperation: { //是否可以操作
-      type: Boolean,
-      default: true
-    },
 
   },
   data() {

+ 1 - 1
src/okr/components/planTask/PlanTaskItem.vue

@@ -128,7 +128,7 @@ export default {
 <style scoped="scoped" lang="scss">
 .task-name {
   padding-right: 30px;
-  max-width: 400px;
+  max-width: 350px;
   color: #303133;
   cursor: pointer;
 }

+ 25 - 7
src/okr/components/project/AddProject.vue

@@ -1,7 +1,7 @@
 <template>
   <el-dialog :title="title" :visible.sync="visible_" :close-on-click-modal="false" :before-close="close_before" top="5%" append-to-body  width="600px">
     <div style="max-height: 600px;overflow-y: scroll;" class="scroll-bar">
-      <el-form label-width="80px" :model="form">
+      <el-form label-width="90px" :model="form">
 
         <div class="add-task-title">基本信息</div>
         <el-form-item label="项目名称" class="is-required">
@@ -35,11 +35,19 @@
               <div v-else style="color: #C0C4CF;">请选择参与人员</div>
             </div>
         </el-form-item>
-
         <el-form-item label="可见范围">
+          <template slot="label">
+            <el-tooltip placement="top">
+               <div slot="content" style="width: 500px;">
+                公开全员可见:项目内容完全公开,公司全员均可查看<br/>
+                仅项目成员可见:项目内容仅允许项目相关成员查看(相关成员包括:项目创建人、项目负责人、项目参与人、项目负责人的直属部门上级、项目里程碑负责人)
+               </div>
+               <span>可见范围<i class="el-icon-question"></i></span>
+             </el-tooltip>
+          </template>
           <el-select class="w270" v-model="form.scope_type" placeholder="请选择">
+            <el-option label="公开全员可见" :value="2"></el-option>
             <el-option label="仅项目成员可见" :value="1"></el-option>
-            <el-option label="全员公开可见" :value="2"></el-option>
           </el-select>
         </el-form-item>
 
@@ -61,7 +69,17 @@
     <TargetSearch :visible.sync="isShowDateSearch" title="所属KR" :showType="2" @confirm="confirmTarget"></TargetSearch>
 
     <!-- 选择部门 -->
-    <EmployeeSelector title="选择部门" :isChecKedAll="false" :can_select_employee="false" :can_select_dept="true" :multi="true" :selected="dept_selected" :visible.sync="show_dept_selector"@confirm="dept_confirm"/>
+    <EmployeeSelector
+    title="选择部门"
+    :dept_children="false"
+    :isChecKedAll="false"
+    :max="3"
+    :can_select_employee="false"
+    :can_select_dept="true"
+    :multi="true"
+    :selected="dept_selected"
+    :visible.sync="show_dept_selector"
+    @confirm="dept_confirm"/>
 
     <!-- 选择负责人 -->
     <EmployeeSelector :is_filtration_creator="false" title="选择人员" :isChecKedAll="false" :isRequired="selectUserIndex==1" :multi="false" :selected="employee_selected" :visible.sync="show_employee_selector" @confirm="employee_confirm"/>
@@ -130,7 +148,7 @@ export default {
           end_date:	`${this.$moment().format('YYYY-MM-DD')} `,//是	string	计划结束日期 格式:2022-01-01
           dept_ids:	'',//	否	string	部门id列表,以逗号分割,只有可见范围种类为指定部门可见才需要上传这个字段,没有的时候不要上传这个字段,空字符也不行
           joiner_ids:	'',//	否	string	参与者id列表,以逗号分割,没有的时候不要上传这个字段,空字符也不行
-          scope_type:	1,//	可见范围 1-相关人员可见 2-全员可见
+          scope_type:	2,//	可见范围 1-相关人员可见 2-全员可见
           kr_id:0,
       },
 
@@ -237,7 +255,7 @@ export default {
           end_date:	`${this.$moment().format('YYYY-MM-DD')} `,//是	string	计划结束日期 格式:2022-01-01
           dept_ids:	'',//	否	string	部门id列表,以逗号分割,只有可见范围种类为指定部门可见才需要上传这个字段,没有的时候不要上传这个字段,空字符也不行
           joiner_ids:	'',//	否	string	参与者id列表,以逗号分割,没有的时候不要上传这个字段,空字符也不行
-          scope_type:	1,//	可见范围 1-相关人员可见 2-全员可见
+          scope_type:	2,//	可见范围 1-相关人员可见 2-全员可见
           kr_id:0,
       };
       if(this.initDate.length>0){
@@ -303,7 +321,7 @@ export default {
     // 确定
     confirm() {
       if(!this.form.name){
-        this.$message.error('请输入任务名称');
+        this.$message.error('请输入项目名称');
         return false;
       }
       let params={

+ 101 - 28
src/okr/components/project/Dhtmlx.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="br-5 scroll-bar" style="height: calc(100vh - 260px);box-sizing: border-box;">
+  <div class="br-5 scroll-bar" style="height: calc(100vh - 260px);box-sizing: border-box;overflow-y: scroll;">
     <div class="flex-box-ce flex-d-center" style="margin: 20px 0;">
       <div class="flex-box-ce">
         <el-select class="select" size="small" v-model="taskForm.composite_states" placeholder="状态">
@@ -25,11 +25,24 @@
       </div>
       <div class="flex-box-ce">
         <div class="tab-item" @click="changeToday">回到今天</div>
-        <div class="fontColorB"><i class="el-icon-warning"></i> 图例说明</div>
+        <div class="tab-item" @click="changeFull">全屏</div>
+        <div class="tab-item" @click="taskForm.type=0,getMilestoneList()"><i class="el-icon-refresh"></i> 刷新</div>
+        <el-tooltip placement="top">
+           <div slot="content" style="width: 500px;">
+              蓝:未开始、进行中、已达标、审批中的任务<br/>
+              绿:已完成的任务<br/>
+              红:已逾期的任务<br/>
+              灰:已暂停、已取消的任务
+           </div>
+           <div class="fontColorB"><i class="el-icon-question"></i> 图例说明</div>
+         </el-tooltip>
+
       </div>
     </div>
+    <div><span class="orange" style="margin-bottom: 5px;">“双击里程碑/任务可查看详情”</span></div>
+    <div class="rightGatt" style="min-height:calc(78vh - 120px);width: 100%;overflow: hidden;" ref="gantt">
 
-    <div class="rightGatt" style="min-height:calc(78vh - 120px);width: 100%;overflow: hidden;" ref="gantt"></div>
+    </div>
 
     <TaskDetail :visible.sync="isShowTaskDetail" :taskId="taskId" @confirm="closeDetail"></TaskDetail>
 
@@ -90,6 +103,7 @@
           </div>
           <div class="dotted-line" v-if="projectProcessList.length==0"><div>事务有新的进展?马上记录吧</div></div>
         </div>
+        <div  style="width: 20%;background-color: #f1f1f1;"></div>
       </div>
     </el-drawer>
   </div>
@@ -102,6 +116,7 @@ import moment from 'moment' // 时间库
 // 引入 组件库
 import '@/assets/js/dhtmlx.js';
 import "@/assets/css/dhtmlxgantt.css";
+import { Upload } from 'element-ui';
 export default {
   name: 'Dhtmlx',
   components:{TaskDetail},
@@ -227,7 +242,7 @@ export default {
           let plans=res.data.data.plans;
           let taskList=[];
           if(plans.length>0){
-            milestones.push({id:'-1',name:'暂无设置里程碑',plans:plans})
+            milestones.push({id:'-1',name:'暂无设置里程碑',dateStr:'无',plans:plans})
           }
           milestones.forEach(item=>{
             item.statusColor=this.returnStatus(item);
@@ -239,6 +254,7 @@ export default {
                  text:item.name,//必填
                  type: "milestone",// 项目类型 task任务 project项目  milestone里程碑  
                  open: true,//是否展开显示
+                 dateStr:'-'
               })
               if(item.plans.length>0){
                 item.plans.forEach((a)=>{
@@ -272,8 +288,12 @@ export default {
           this.tasks.data=taskList;
           this.taskList=JSON.parse(JSON.stringify(taskList));
           this.milestones=milestones;
-          // console.log(taskList)
           this.initGantt();
+          if(Upload){
+            this.$nextTick(()=>{
+              this.changeToday();
+            })
+          }
       }).finally(()=>{
         this.loading=false;
       })
@@ -318,49 +338,57 @@ export default {
           name: '未开始',
           value: 1,
           icon: 'el-icon-video-play',
-          color:'#409EFF',
+          color:'#93BBFD',
+          colorBack:'#409EFF',
         },
         {
           name: '进行中',
           value: 2,
           icon: 'el-icon-time',
-          color:'#409EFF',
+          color:'#93BBFD',
+          colorBack:'#409EFF',
         },
         {
           name: '已逾期',
           value: 3,
           icon: 'el-icon-warning-outline',
-          color:'#f56c6c',
+          color:'#F5AA9C',
+          colorBack:'#f56c6c',
         },
         {
           name: '暂停中',
           value: 4,
           icon: 'el-icon-video-pause',
           color:'#89919F',
+          colorBack:'#616670',
         },
         {
           name: '审批中',
           value: 5,
           icon: 'el-icon-edit-outline',
-          color:'#409EFF',
+          color:'#93BBFD',
+          colorBack:'#409EFF',
         },
         {
           name: '已完成',
           value: 6,
           icon: 'el-icon-circle-check',
           color:'#67c23a',
+          colorBack:'#27B148',
         },
         {
           name: '已取消',
           value: 7,
           icon: 'el-icon-circle-close',
           color:'#89919F',
+          colorBack:'#616670',
         },
         {
           name: '已达标',
           value: 8,
           icon: 'el-icon-document-checked',
-          color:'#409EFF',
+          color:'#93BBFD',
+          colorBack:'#409EFF',
         },
       ]
       let obj={}
@@ -418,6 +446,9 @@ export default {
         gantt.scrollTo(ganTT[0].offsetLeft - 300, null);
       })
     },
+    changeFull() {
+       gantt.ext.fullscreen.toggle();
+    },
     getProjectProcessList(fun=function(){}){
       this.$axiosUser('get','/api/pro/okr/process/list',{target_type:5,target_id:this.detailData.id,page:1,page_size:100}).then(res => {
           let list=res.data.data.list
@@ -461,7 +492,7 @@ export default {
             if(obj.type=='task'){
               return `<div class='taskProgress'><i class="el-icon-s-flag fontColorC"></i> ${obj.name}</div>`;
             }else{
-              return `<div style="font-weight: 600;"><i class="el-icon-bangzhu fontColorC"></i> ${obj.name}</div>`;
+              return `<div style="font-weight: 600;"><i class="el-icon-location-outline fontColorC"></i> ${obj.name}</div>`;
             }
 
           }
@@ -487,7 +518,7 @@ export default {
         {
           name: "dateStr",
           label: "起止日期",
-
+          min_width: 100,
           resize: true,
           align: "center",
           template: function (obj) {
@@ -499,6 +530,7 @@ export default {
         drag_timeline: true, // 拖动图
         marker: true, // 时间标记
         tooltip: true, // 鼠标经过时信息
+        fullscreen: true,
       })
 
 
@@ -513,18 +545,41 @@ export default {
       gantt.templates.task_text = function (start, end,item) {
           let html="";
           if(item.stateInfo){
-            html=`<div class="clamp task-item" style="background:${item.stateInfo.color}";><i class="${item.stateInfo.icon}"></i> ${item.text}</div>`;
+            html=`<div class="clamp task-item" style="background:${item.stateInfo.color}">
+                    <div class="task-item-active" style="width: ${item.taskProgress};background:${item.stateInfo.colorBack}"></div>
+                    <span><i class="${item.stateInfo.icon}"></i> ${item.text}</span>
+                  </div>`;
+          }
+          return html
+      };
+      //根据任务状态改变颜色
+      gantt.templates.milestone_text = function (start, end,item) {
+          let html="";
+          if(item.stateInfo){
+            html=`<div class="clamp task-item" style="background:${item.stateInfo.color}">
+                    <div class="task-item-active" style="width: ${item.taskProgress};background:${item.stateInfo.colorBack}"></div>
+                    <span><i class="${item.stateInfo.icon}"></i> ${item.text}</span>
+                  </div>`;
           }
           return html
       };
 
       // 鼠标经过时信息
       gantt.templates.tooltip_text = function(start,end,task){
-          let str=`
-              <div class="tooltip_text">
-                  <b>${task.type=='task'? '任务':'里程碑'}:${task.name}</b><br/>
-                  <b>时间:${task.dateStr}</b><br/>
-              </div>`
+          let str='';
+            if(task.type=='task'){
+              str=`<div class="tooltip_text">
+                      <b>${task.type=='task'? '任务':'里程碑'}:${task.name}</b><br/>
+                      <b>时间:${task.dateStr}</b><br/>
+                      <b>完成度:${task.taskProgress}</b>
+                  </div>`
+            }else{
+              str=`<div class="tooltip_text">
+                      <b>${task.type=='task'? '任务':'里程碑'}:${task.name}</b><br/>
+                      <b>时间:${task.dateStr}</b><br/>
+                  </div>`
+            }
+
            return str
       };
       gantt.init(this.$refs.gantt);
@@ -533,7 +588,6 @@ export default {
       this.events.push(onTaskDblClick)
     },
     openDetail(id,e){
-      console.log(id);
       if(id==='-1'){return false}
       if(id.split('_').length>1){
           if(!this.showDrawerTow){
@@ -559,25 +613,44 @@ export default {
   created() {
       if(this.$route.query.id){
         this.projectId=Number(this.$route.query.id);
-        this.getMilestoneList();
+        this.getMilestoneList(true);
       }
   },
-  mounted() {
-    this.initGantt();
+  beforeDestroy() {
+    this.events.forEach(ele => {
+      gantt.detachEvent(ele)
+    })
+    gantt.clearAll();
   },
-   beforeDestroy() {
-      this.events.forEach(ele => {
-        gantt.detachEvent(ele)
-      })
-    },
 };
 </script>
 
 <style scoped lang="scss">
+  .blue-text:hover{
+    color: #409EFF;
+  }
   ::v-deep .task-item{
-    padding: 0 10px;
+    // padding: 0 10px;
+    border-radius: 25px;
+    position: relative;
+    height: 30px;
+  }
+  ::v-deep .task-item span{
+    position: absolute;
+    left: 10px;
+    right: 10px;
+    bottom: 0;
+    z-index: 2;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  ::v-deep .task-item .task-item-active{
     border-radius: 25px;
+    position: relative;
+    height: 30px;
   }
+
   ::v-deep .weekend{
       background: #F3F6FB;
   }

+ 30 - 15
src/okr/components/project/KanMilestone.vue

@@ -1,9 +1,8 @@
 <template>
   <div>
     <div class="flex-box-ce flex-d-center" style="margin: 20px 0;">
-      <div class="flex-box-ce">
         <el-select class="select2" size="small" v-model="taskForm.composite_state" placeholder="状态">
-          <el-option :key="0" label="全部" :value="0"></el-option>
+          <el-option label="全部" :value="0"></el-option>
           <el-option v-for="item in taskStatus" :key="item.value" :label="item.name" :value="item.value"></el-option>
         </el-select>
         <el-select class="select2" size="small" v-model="taskForm.sort" placeholder="排序">
@@ -16,18 +15,19 @@
           <el-option v-for="item in employeeMap" :key="item.id" :label="item.name" :value="item.id"></el-option>
         </el-select>
         <el-input prefix-icon="el-icon-search" class="input" style="width: 200px;" size="small" v-model="taskForm.keyword" clearable placeholder="请输入任务关键字" />
-      </div>
+        <div class="flex-1"></div>
+        <div v-if="isReturnPJ&&milestonesArr.length<10" class="add-task2" @click="showAdd(1)">+ 创建看板</div>
     </div>
     <div style="overflow-x: auto;" class="scroll-bar">
         <div class="flex-box">
             <div v-for="(item,index) in milestoneList" :key="index" class="task-box" :class="{'background-blue':selectM_id===item.id}" :data-id="item.id" :draggable="false" @dragend.stop="dragend($event,item,index)"  @dragover.stop="dragover($event,item,index)"  @dragenter.stop="dragenter($event,item,index)" @drop.stop="drop($event,item,index)">
                   <div class="flex-box-ce flex-d-center" style="margin-bottom:10px">
                     <div style="font-size:16px;font-weight:600;width:220px" class="clamp">{{item.name}}</div>
-                    <div style="margin:0 10px">{{returnLet(item.plans)}}/{{item.plans.length}}</div>
-                    <el-dropdown @command="handleCommand($event,item)" trigger="click" class="hoverBlue">
-                      <i class="el-icon-more" v-if="isReturnPJ"></i>
+                    <div style="margin:0 10px" v-if="item.id">{{returnLet(item.plans)}}/{{item.plans.length}}</div>
+                    <el-dropdown @command="handleCommand($event,item)" trigger="click" class="hoverBlue" v-if="isReturnPJ&&item.id">
+                      <i class="el-icon-more"></i>
                       <el-dropdown-menu slot="dropdown">
-                        <el-dropdown-item :command="1">编辑</el-dropdown-item>
+                        <el-dropdown-item :command="1">修改名称</el-dropdown-item>
                         <el-dropdown-item :command="2">删除</el-dropdown-item>
                       </el-dropdown-menu>
                     </el-dropdown>
@@ -38,23 +38,27 @@
                       <div v-for="(item2,index2) in  item.plans" :key="item2.id" class="task-item" v-if="isShowTask(item2)" draggable @dragstart.stop="dragstart($event,item2,index2,item,index)">
                        <div class="flex-box-ce flex-d-center" style="font-size: 16px;padding-bottom: 10px;">
                           <div class="blue"><i :class="taskStatusFun(item2.composite_state).icon" style="margin-right: 6px;"></i>{{taskStatusFun(item2.composite_state).name}}</div>
-                          <userImage :id="item2.owner_id" width="30px" height="30px" fontSize="12"></userImage>
+                          <div style="font-size: 12px;" class="flex-box-ce">
+                             <userImage :id="item2.owner_id" width="26px" height="26px" fontSize="12"></userImage>
+                             <span style="padding-left: 5px;">{{$getEmployeeMapItem(item2.owner_id).name}}</span>
+                          </div>
+                          <!-- <userImage :id="item2.owner_id" width="30px" height="30px" fontSize="12"></userImage> -->
                         </div>
                         <div class="clamp2 task-name" @click="openShowTask(item2.id)">{{item2.name}}</div>
                         <div class="flex-box-ce flex-d-center fontColorC" style="padding-top: 10px;">
                           <div><i class="el-icon-date"></i> <span>{{item2.end_date}}截止</span></div>
-                          <div v-if="item2.statistics"><i class="el-icon-folder-checked"></i> <span>{{item2.statistics.plan_finish}}/{{item2.statistics.plan_total}}</span></div>
+                          <div v-if="item2.statistics&&item2.statistics.plan_total"><i class="el-icon-folder-checked"></i> <span>{{item2.statistics.plan_finish}}/{{item2.statistics.plan_total}}</span></div>
                         </div>
                       </div>
                     </transition-group>
                   </div>
             </div>
-            <div style="padding:10px;border-radius: 5px;background-color: #F0F4FA;text-align: center;width: 300px;height: 40px;color:#89919F;" class="cursor blue-text" @click="showAdd(1)"><i class="el-icon-plus"></i> 创建新看板</div>
+            <div v-if="isReturnPJ" style="padding:10px;border-radius: 5px;background-color: #F0F4FA;text-align: center;width: 300px;height: 40px;color:#89919F;    flex-shrink:0;" class="cursor blue-text" @click="showAdd(1)"><i class="el-icon-plus"></i> 创建新看板</div>
         </div>
     </div>
 
-    <!-- 添加里程碑 -->
-    <el-dialog title="里程碑" :visible.sync="isShowAdd" :append-to-body="true" width="500px">
+    <!-- 添加看板 -->
+    <el-dialog title="看板" :visible.sync="isShowAdd" :append-to-body="true" width="500px">
       <el-form :model="formData" :rules="rules" ref="formData" label-width="120px">
         <el-form-item label="看板名称" prop="name">
           <el-input maxlength="30" v-model="formData.name" placeholder="请输入看板名称" clearable></el-input>
@@ -150,7 +154,7 @@
           target_type:5,
         },
         selectItem_p:{},
-
+        milestonesArr:[],
       };
     },
     computed: {
@@ -206,9 +210,9 @@
         this.initDate=[];
         this.isShowAddTask=true;
       },
-      ActiveAddTask(id){
+      ActiveAddTask(item){
         if(this.tab_id){
-         this.$axiosUser('post','/api/pro/okr/tag/bind',{plan_id:id,tag_id:this.tab_id}).then(res => {
+         this.$axiosUser('post','/api/pro/okr/tag/bind',{plan_id:item.id,tag_id:this.tab_id}).then(res => {
            this.getMilestoneList()
          })
         }else{
@@ -225,6 +229,7 @@
             type: 'warning'
           }).then(() => {
             this.$axiosUser('post','/api/pro/okr/tag/d',{tag_id:item.id}).then(res => {
+              this.$message.success('已删除');
               this.getMilestoneList()
             })
           }).catch(() => {});
@@ -258,6 +263,7 @@
         }
         this.$axiosUser('get', '/api/pro/okr/tag/list',data).then(res => {
             let milestones=res.data.data.tags;
+            this.milestonesArr=JSON.parse(JSON.stringify(res.data.data.tags));
             let plans=res.data.data.plans;
             milestones.forEach(item=>{
               item.day=this.$moment(item.end_date).diff(this.$moment().format('YYYY-MM-DD'), 'day')
@@ -466,6 +472,15 @@
     border-radius: 25px;
   }
 
+  .add-task2 {
+    width: 100px;
+    text-align: center;
+    color: #fff;
+    background-color: #409EFF;
+    padding: 4px 0;
+    border-radius: 3px;
+    cursor: pointer;
+  }
   .input ::v-deep .el-input__inner {
     border: none;
     border-bottom: 1px solid #f1f1f1;

+ 141 - 32
src/okr/components/project/Milestone.vue

@@ -1,7 +1,6 @@
 <template>
   <div>
     <div class="flex-box-ce flex-d-center" style="margin: 20px 0;">
-      <div class="flex-box-ce">
         <el-select class="select2" size="small" v-model="taskForm.composite_states" placeholder="状态">
           <el-option :key="0" label="全部" :value="0"></el-option>
           <el-option v-for="item in taskStatus" :key="item.value" :label="item.name" :value="item.value"></el-option>
@@ -16,7 +15,11 @@
           <el-option v-for="item in employeeMap" :key="item.id" :label="item.name" :value="item.id"></el-option>
         </el-select>
         <el-input prefix-icon="el-icon-search" class="input" style="width: 200px;" size="small" v-model="taskForm.keyword" clearable placeholder="请输入任务关键字" />
-      </div>
+        <div class="flex-1"></div>
+        <div v-if="isReturnPJ&&milestonesArr.length<10" class="add-task2" @click="showAdd(1)">+ 创建里程碑</div>
+        <el-popover v-if="progressData.enable_automatic&&progressData.automatic_from_milestone&&isReturnPJ" placement="top"  width="200" trigger="manual" content="此处可设置各个里程碑权重配比" v-model="visible">
+          <el-button style="margin-left: 30px;" slot="reference" class="primaryBtn" size="mini" @click="isShowWeight=true" round>里程碑权重设置</el-button>
+        </el-popover>
     </div>
     <div style="overflow-x: auto;" class="scroll-bar">
         <div class="flex-box-ce" style="margin-bottom: 14px;">
@@ -36,8 +39,7 @@
                <i class="el-icon-arrow-right" style="position: absolute;right: -12px;top: 23px;font-size: 14px;"></i>
             </div>
           </template>
-
-          <div class="milestone-item" v-if="isReturnPJ">
+          <div class="milestone-item" v-if="isReturnPJ&&milestonesArr.length<10">
             <div class="cursor add-milestone" style="margin: 0 auto;padding-top: 10px;text-align: center;" @click="showAdd(1)">
               <i class="el-icon-plus"></i>
               <span> 创建里程碑</span>
@@ -52,12 +54,15 @@
                     <div v-for="(item2,index2) in item.plans" :key="item2.id" class="task-item" v-if="isShowTask(item2)" draggable @dragstart.stop="dragstart($event,item2,index2,index)">
                      <div class="flex-box-ce flex-d-center" style="font-size: 16px;padding-bottom: 10px;">
                         <div class="blue"><i :class="taskStatusFun(item2.composite_state).icon" style="margin-right: 6px;"></i>{{taskStatusFun(item2.composite_state).name}}</div>
-                        <userImage :id="item2.owner_id" width="30px" height="30px" fontSize="12"></userImage>
+                        <div style="font-size: 12px;" class="flex-box-ce">
+                           <userImage :id="item2.owner_id" width="26px" height="26px" fontSize="12"></userImage>
+                           <span style="padding-left: 5px;">{{$getEmployeeMapItem(item2.owner_id).name}}</span>
+                        </div>
                       </div>
                       <div class="clamp2 task-name" @click="openShowTask(item2.id)">{{item2.name}}</div>
                       <div class="flex-box-ce flex-d-center fontColorC" style="padding-top: 10px;">
                         <div><i class="el-icon-date"></i> <span>{{item2.end_date}}截止</span></div>
-                        <div v-if="item2.statistics"><i class="el-icon-folder-checked"></i> <span>{{item2.statistics.plan_finish}}/{{item2.statistics.plan_total}}</span></div>
+                        <div v-if="item2.statistics&&item2.statistics.plan_total"><i class="el-icon-folder-checked"></i> <span>{{item2.statistics.plan_finish}}/{{item2.statistics.plan_total}}</span></div>
                       </div>
                     </div>
                   </transition-group>
@@ -65,6 +70,7 @@
             </div>
         </div>
     </div>
+
     <el-drawer :visible.sync="showDrawerTow" :append-to-body="true" :before-close="handleClose" :with-header="false">
       <header class="drawer-header flex-box-ce">
         <div class="flex-1">里程碑</div>
@@ -86,10 +92,12 @@
                 </span>
                 <span class="flex-box-ce fontColorC" style="margin-left: 30px;">
                   <i class="el-icon-date"></i>
-                  <span>{{detailData.end_date}}
-                    <span v-if="detailData.day>0">(剩余<span class="green">{{detailData.day}}</span>天)</span>
-                    <span v-if="detailData.day==0">(剩余<span class="green">1</span>天)</span>
-                    <span v-if="detailData.day<0">(逾期<span class="red">{{Math.abs(detailData.day)}}</span>天)</span>
+                  <span>{{detailData.end_date}} 截止
+                    <template v-if="detailData.process<100">
+                      <span v-if="detailData.day>0">(剩余<span class="green">{{detailData.day}}</span>天)</span>
+                      <span v-if="detailData.day==0"><span class="yellow">&nbsp;今天到期</span></span>
+                      <span v-if="detailData.day<0">(逾期<span class="red">{{Math.abs(detailData.day)}}</span>天)</span>
+                    </template>
                   </span>
                 </span>
             </div>
@@ -122,8 +130,6 @@
           </div>
           <div class="dotted-line" v-if="projectProcessList.length==0"><div>事务有新的进展?马上记录吧</div></div>
         </div>
-
-
       </div>
     </el-drawer>
 
@@ -142,7 +148,7 @@
                <span style="margin-left: 10px;font-size: 14px;color: #3F4755;">{{ owner_userInfo.name }}</span>
            </div>
           </el-form-item>
-          <el-form-item label="截" style="margin-right: 20px;">
+          <el-form-item label="截止日期" style="margin-right: 20px;">
               <el-date-picker v-model="formData.end_date" :clearable="false" type="date"  value-format="yyyy-MM-dd"></el-date-picker>
           </el-form-item>
       </el-form>
@@ -156,6 +162,7 @@
     <EmployeeSelector :is_filtration_creator="false" title="选择人员" :isChecKedAll="false" isRequired :multi="false" :selected="employee_selected" :visible.sync="show_employee_selector" @confirm="employee_confirm"/>
 
     <!--添加任务 -->
+
     <AddTask :visible.sync="isShowAddTask" @confirm="ActiveAddTask" :id="target_id" :target_type="target_type" :initDate="initDate"></AddTask>
 
     <TaskDetail  :visible.sync="isShowTaskDetail" :taskId="taskId" @confirm="closeDetail"></TaskDetail>
@@ -194,6 +201,31 @@
       </div>
     </el-dialog>
 
+    <!-- 设置权重 -->
+    <el-dialog title="里程碑权重设置" :visible.sync="isShowWeight" :append-to-body="true" width="660px">
+      <div style="padding:0 10px;max-height: 400px;overflow: auto;height: 200px;" class="scroll-bar">
+        <div class="flex-box-ce " v-for="(item, index) in milestonesArr2" :key="index" style="margin-bottom: 10px;">
+          <span class="blue" style="width: 40px;">{{ index + 1 }}</span>
+          <div class="flex-1">
+            <Tooltip :preHtml="item.name">
+              <div class="font-flex-word" style="width:400px;">{{item.name}}</div>
+            </Tooltip>
+          </div>
+          <span>权重</span>
+          <el-input@input="item.weight = item.weight.replace(/[^\d]/g, '');" class="input" style="width: 80px;" size="small" v-model="item.weight" clearable/>
+          <span>%</span>
+        </div>
+        <div class="flex-box-ce flex-box-end" style="margin-top: 20px;">
+            <div class="fontColorC" style="font-size: 12px;margin-right: 20px;">总权重:{{getKrWeight}}%</div>
+            <!-- <el-button round type="primary" size="mini" @click="pingJun">平均权重</el-button> -->
+        </div>
+      </div>
+      <div class="flex-box-end" style="margin-top: 30px;">
+        <el-button @click="isShowWeight=false">取消</el-button>
+        <el-button type="primary" @click="updateWeight()">确定</el-button>
+      </div>
+    </el-dialog>
+
   </div>
 </template>
 
@@ -201,11 +233,12 @@
   import EmployeeSelector from '@/components/EmployeeSelector';
   import AddTask from '@/okr/components/public/AddTask'; //添加任务
   import TaskDetail from '@/okr/components/public/TaskDetail'; //任务详情
+  import Tooltip from '@/components/Tooltip'; //鼠标悬浮显示文字
   import { getYearArr,taskStatus} from '@/okr/utils/auth';
   import {_debounce} from '@/utils/auth';
   export default {
     name: 'Milestone',
-    components:{EmployeeSelector,AddTask,TaskDetail},
+    components:{EmployeeSelector,AddTask,TaskDetail,Tooltip},
     props: {
       isReturnPJ: { //是否是项目管理者
         type: Boolean,
@@ -215,6 +248,12 @@
         type: Boolean,
         default:true
       },
+      progressData:{
+        type: Object,
+        default: _=>{
+          return {}
+        }
+      }
     },
     data() {
       return {
@@ -321,11 +360,31 @@
           content:'',
           processTime:[this.$moment().format('YYYY-MM-DD'),this.$moment().format('YYYY-MM-DD')],
           target_type:5,
-        }
+        },
 
+        isShowWeight:false,
+        sumWeight:0,
+        milestonesArr:[],
+        milestonesArr2:[],
+        visible:false,
       };
     },
+    computed:{
+      getKrWeight(){
+        let sumWeight=0;
+        this.milestonesArr2.forEach(item=>{
+          sumWeight+=Number(item.weight)
+        })
+        this.sumWeight= Math.round(sumWeight)
+        return this.sumWeight
+      }
+    },
     watch:{
+      isShowWeight(val){
+        if(val){
+          this.milestonesArr2=JSON.parse(JSON.stringify(this.milestonesArr))
+        }
+      },
       'taskForm.sort'(val){
         this.milestoneList.forEach((item)=>{
             let plans=[];
@@ -349,9 +408,49 @@
       },
     },
     methods: {
+      isFloor(el) {
+        var obj = event.target;
+        el = el
+          .replace('.', '$#$') //把第一个字符'.'替换成'$#$'
+          .replace(/\./g, '') //把其余的字符'.'替换为空
+          .replace('$#$', '.') //把字符'$#$'替换回原来的'.'
+          .replace(/[^\d.]/g, '') //只能输入数字和'.'
+          .replace(/^\./g, '') //不能以'.'开头
+          .replace(/([0-9]+\.[0-9]{2})[0-9]*/, '$1'); //只保留2位小数
+        if(el=='01'||el=='02'||el=='03'||el=='04'||el=='05'||el=='06'||el=='07'||el=='08'||el=='09'){
+          el=el[1]
+        }
+        return el || null;
+      },
+      pingJun(){
+        let weight=Math.floor((100/(this.milestoneList.length)) * 100) / 100
+        this.milestonesArr2.forEach(item=>{
+           item.weight=weight
+        })
+      },
+      updateWeight(){
+        let krs=[]
+        let isError=false;
+        this.milestonesArr2.forEach(item=>{
+            if(item.weight==0||!item.weight){
+              isError=true
+            }
+            krs.push({id:item.id,weight:item.weight})
+        })
+        if(isError){
+          this.$message.error('里程碑的权重不能为空或者0')
+          return true
+        }
+        this.$axiosUser('post', '/api/pro/okr/project/milestone/weight',{project_id:this.projectId,items:JSON.stringify(krs)}).then(res => {
+          this.$message.success('已设置');
+          this.getMilestoneList()
+          this.isShowWeight=false
+        })
+      },
       deleteM(){
-        this.$axiosUser('post','/api/pro/okr/feedback/delete',{fb_id:item.id}).then(res => {
-          this.getLog()
+        this.$axiosUser('post','/api/pro/okr/project/milestone/d',{milestone_id:this.detailData.id}).then(res => {
+          this.showDrawerTow=false;
+          this.getMilestoneList()
         })
       },
       confirmProcessm(formName) {
@@ -520,10 +619,12 @@
         this.loading=true;
         this.$axiosUser('get', '/api/pro/okr/project/milestones',{project_id:this.projectId}).then(res => {
             let milestones=res.data.data.milestones;
+            this.milestonesArr=JSON.parse(JSON.stringify(res.data.data.milestones));
             let plans=res.data.data.plans;
             milestones.forEach(item=>{
               item.statusColor=this.returnStatus(item);
               item.day=this.$moment(item.end_date).diff(this.$moment().format('YYYY-MM-DD'), 'day')
+              item.process=Math.floor(Number(item.process))
               if(item.plans.length>0&&item.id){
                 item.plans.forEach((a)=>{
                     a.pName=item.name
@@ -652,21 +753,20 @@
         e.preventDefault(); //阻止默认行为
         let moving = this.selectItem; //获取之前记录的元素
         if(item.plans&&item.id!=moving.pId&&this.isTd){
-          if(moving.composite_state==5||moving.composite_state==6){//完成或者审批中
-            this.$message.error(`任务${moving.composite_state==5? '审批中':'已完成'}且与里程碑时间冲突,移动失败`);
-            return false
-          }else{
-            if(this.$moment(moving.end_date).format('YYYY-MM-DD')>item.end_date){
-              this.selectM_data=item;
-              this.selectM_data.index=index;
-
-              this.time=[moving.start_date,moving.end_date];
-              this.isShowUpdataTime=true;
-              return false
-            }else{
-              this.selectM_data={};
-            }
-          }
+          // if(moving.composite_state==5||moving.composite_state==6){//完成或者审批中
+          //   this.$message.error(`任务${moving.composite_state==5? '审批中':'已完成'}且与里程碑时间冲突,移动失败`);
+          //   return false
+          // }else{
+            // if(this.$moment(moving.end_date).format('YYYY-MM-DD')>item.end_date){
+            //   this.selectM_data=item;
+            //   this.selectM_data.index=index;
+            //   this.time=[moving.start_date,moving.end_date];
+            //   this.isShowUpdataTime=true;
+            //   return false
+            // }else{
+            //   this.selectM_data={};
+            // }
+          // }
           moving.pId=item.id;
           this.milestoneList[this.p_index].plans.splice(this.dragIndex,1); //删除列表的记录元素
           this.milestoneList[index].plans.unshift(moving);//插入元素
@@ -724,6 +824,15 @@
 </script>
 
 <style scoped="scoped" lang="scss">
+  .add-task2 {
+    width: 100px;
+    text-align: center;
+    color: #fff;
+    background-color: #409EFF;
+    padding: 4px 0;
+    border-radius: 3px;
+    cursor: pointer;
+  }
   .background-blue{
      border: 1px solid #409EFF !important;
      box-shadow: 0 0 3px #409EFF;

+ 119 - 49
src/okr/components/project/ProjectPreview.vue

@@ -7,7 +7,7 @@
               <div class="title">项目完成度</div>
               <div class="flex-1"></div>
               <div class="blue cursor" v-if="isReturnPJ" @click="isShowSchedule=true"><i class="el-icon-refresh" ></i>更新进度</div>
-              <div style="margin-left: 20px;" v-if="detailData.process>0" class="fontColorC cursor" @click="showDrawerTow=true"><i class="el-icon-s-order" ></i>进度记录</div>
+              <div style="margin-left: 20px;" v-if="detailData.process>0" class="fontColorC cursor" @click="showDrawerTow=true"><i class="el-icon-s-order" ></i>全部记录</div>
             </div>
             <div style="text-align: center;margin-top: 50px;position: relative;" v-if="detailData.process>0">
                 <el-progress :color="customColor" :width="150" :stroke-width="18" type="circle" :show-text="false" :percentage="Number(detailData.process)"></el-progress>
@@ -19,20 +19,21 @@
                 <el-button type="primary" size="small" round style="width: 100px;" @click="isShowSchedule=true" v-if="isReturnPJ"><i class="el-icon-refresh"></i> 更新进度</el-button>
             </div>
             <template v-if="projectProcessList[0]">
-              <div v-for="(item, index) in [projectProcessList[0]]" :key="index" class="record-list" style="background-color: #F8FCFF;margin-bottom: 10px;margin-top: 20px;">
-                <div class="flex-box-ce record-date fontColorB">
-                  <userImage :user_name="item.userInfo.name||'系统'" :img_url="item.userInfo.img_url" fontSize="12" width="32px" height="32px"></userImage>
-                  <div class="record-name">{{ item.userInfo.name||'系统' }}</div>
-                  <span class="fontColorC flex-1">{{ item.create_time }} 添加了进展</span>
-                  <span class="blue cursor" style="padding-right: 10px;display: none;" v-if="$userInfo().id==item.userInfo.id" @click="openMp(item)">编辑</span>
-                </div>
-                <div class="record-content">
-                  <pre class="pre fontColorA" style="font-size: 15px;" v-if="item.content">{{ item.content }}</pre>
-                  <div v-else class="fontColorD">无内容</div>
+              <div v-for="(item, index) in [projectProcessList[0]]" :key="index">
+                <div class="flex-box-ce" style="padding: 10px;">
+                  <span class="biaos"></span>
+                  <div class="black flex-1" style="font-weight: 700;font-size: 16px;">{{item.process}}%
+                      <template v-if="item.process!=item.process_last">
+                        <span v-if="item.isUpdatePro>0" class="green" style="font-size: 12px;"><i class="el-icon-top"></i>{{item.updatePro}}%</span>
+                        <span v-else class="red" style="font-size: 12px;"><i class="el-icon-bottom"></i>{{item.updatePro}}%</span>
+                      </template>
+                  </div>
+                  <span class="fontColorC">{{item.create_time}}</span>
                 </div>
-                <div class="flex-box-ce flex-d-center fontColorC" style="padding-left: 40px;font-size: 13px;margin-top: 14px;">
-                  <div>进度为{{item.process}}%</div>
-                  <div>进展日期:{{$moment(item.start_time).format('YYYY/MM/DD')}}~{{$moment(item.end_time).format('YYYY/MM/DD')}}</div>
+                <div class="flex-box o-content" style="margin-bottom: 5px;">
+                  <div v-if="item.content" class="flex-1 fontColorB">{{item.content}}</div>
+                  <div v-else class="flex-1 fontColorD">暂无内容</div>
+                  <div style="display: none;" class="fontColorC" @click="openMp(item)"  v-if="isReturnPJ"> 编辑</div>
                 </div>
               </div>
             </template>
@@ -52,9 +53,16 @@
             <ProjectInputBox class="flex-1" :project_id="projectId" :value="detailData.name" inputSize @confirm="getProjectDateil()"></ProjectInputBox>
           </div>
           <div class="flex-box kr-message-item">
-            <div class="label" style="padding-top: 8px;">项目描述</div>
+            <div class="label">项目描述</div>
             <ProjectInputBox class="flex-1" :project_id="projectId" :value="detailData.desc" :upType='2' inputSize maxlength="200" placeholder="请输入项目描述" @confirm="getProjectDateil()"></ProjectInputBox>
           </div>
+          <div class="flex-box-ce kr-message-item">
+            <div class="label">创建人</div>
+            <div class="flex-box-ce" @click="showSelectorUser()">
+                <userImage :id="detailData.publisher_id" width="36px" height="36px" fontSize="14"></userImage>
+                <span style="font-weight: 600;padding-left: 10px;" class="fontColorB">{{$getEmployeeMapItem(detailData.publisher_id).name}}</span>
+            </div>
+          </div>
           <div class="flex-box-ce kr-message-item">
             <div class="label">负责人</div>
             <div class="flex-box-ce input-box cursor" @click="showSelectorUser()">
@@ -66,9 +74,16 @@
             <div class="label">起止时间</div>
             <div class="hover-border" style="margin-right: 10px;" @click="showTime">{{detailData.start_date}}~{{detailData.end_date}}</div>
             <template>
-              <span v-if="detailData.day>0">剩余<span class="green">{{detailData.day}}</span>天</span>
-              <span v-if="detailData.day==0">剩余<span class="green">1</span>天</span>
-              <span v-if="detailData.day<0">逾期<span class="red">{{Math.abs(detailData.day)}}</span>天</span>
+              <template v-if="detailData.composite_state==3">
+                <span v-if="detailData.day<0">&nbsp;(逾期<span class="red">{{Math.abs(detailData.day)}}</span>天)</span>
+              </template>
+              <template v-else>
+                <span v-if="detailData.day==0"><span class="yellow">&nbsp;今日到期</span></span>
+                <span v-else-if="detailData.day>0&&detailData.day<=30">&nbsp;(剩余<span class="green">{{detailData.day}}</span>天)</span>
+              </template>
+<!--              <span v-if="detailData.day>0">剩余<span class="green">{{detailData.day}}</span>天</span>
+              <span v-if="detailData.day==0"><span class="yellow">&nbsp;今日到期</span></span>
+              <span v-if="detailData.day<0">逾期<span class="red">{{Math.abs(detailData.day)}}</span>天</span> -->
             </template>
           </div>
           <div class="flex-box-ce kr-message-item">
@@ -90,21 +105,28 @@
             </div>
           </div>
           <div class="flex-box-ce kr-message-item">
-            <div class="label">可见范围</div>
+            <div class="label">
+              <el-tooltip placement="top">
+                 <div slot="content" style="width: 500px;">
+                  公开全员可见:项目内容完全公开,公司全员均可查看<br/>
+                  仅项目成员可见:项目内容仅允许项目相关成员查看(相关成员包括:项目创建人、项目负责人、项目参与人、项目负责人的直属部门上级、项目里程碑负责人)
+                 </div>
+                 <span>可见范围<i class="el-icon-question"></i></span>
+               </el-tooltip>
+            </div>
             <el-popover placement="right" trigger="manual" v-model="isShowFw">
               <div class="searchBox">
                 <el-select class="w270" v-model="scope_type" placeholder="请选择">
+                  <el-option label="公开全员可见" :value="2"></el-option>
                   <el-option label="仅项目成员可见" :value="1"></el-option>
-                  <el-option label="全员公开可见" :value="2"></el-option>
                 </el-select>
                 <div class="flex-box-end" style="margin-top: 20px;">
                   <el-button size="small" plain round @click="isShowFw = false">取 消</el-button>
                   <el-button size="small" type="primary" plain round @click="confirmFw">确 定</el-button>
                 </div>
               </div>
-              <!-- 内容 -->
               <template slot="reference">
-                <div @click="showFw" class="hover-border">{{detailData.scope_type==1? '仅项目成员可见':'全员公开可见'}} <i class="el-icon-caret-bottom fontColorC"></i></div>
+                <div @click="showFw" class="hover-border">{{detailData.scope_type==1? '仅项目成员可见':'公开全员可见'}} <i class="el-icon-caret-bottom fontColorC"></i></div>
               </template>
             </el-popover>
           </div>
@@ -132,25 +154,26 @@
     </el-row>
 
     <el-drawer :visible.sync="showDrawerTow" :append-to-body="true" :before-close="handleClose" :with-header="false">
-       <header class="drawer-header flex-box-ce"><div class="flex-1">项目进展列表</div></header>
+       <header class="drawer-header flex-box-ce"><div class="flex-1">全部记录</div></header>
        <div class="drawer-main">
          <div class="record-box">
-           <div v-for="(item, index) in projectProcessList" :key="index" class="record-list" style="background-color: #F8FCFF;margin-bottom: 14px;">
-             <div class="flex-box-ce record-date fontColorB">
-               <userImage :user_name="item.userInfo.name||'系统'" :img_url="item.userInfo.img_url" fontSize="12" width="32px" height="32px"></userImage>
-               <div class="record-name">{{ item.userInfo.name||'系统' }}</div>
-               <span class="fontColorC flex-1">{{ item.create_time }} 添加了进展</span>
-               <span class="blue cursor" style="padding-right: 10px;display: none;" v-if="$userInfo().id==item.userInfo.id" @click="openMp(item)">编辑</span>
-             </div>
-             <div class="record-content">
-               <pre class="pre fontColorA" style="font-size: 15px;" v-if="item.content">{{ item.content }}</pre>
-               <div v-else class="fontColorD">无内容</div>
-             </div>
-             <div class="flex-box-ce flex-d-center fontColorC" style="padding-left: 40px;font-size: 13px;margin-top: 14px;">
-               <div>进度为{{item.process}}%</div>
-               <div>进展日期:{{$moment(item.start_time).format('YYYY/MM/DD')}}~{{$moment(item.end_time).format('YYYY/MM/DD')}}</div>
-             </div>
-           </div>
+            <div v-for="(item, index) in projectProcessList" :key="index">
+              <div class="flex-box-ce" style="padding: 10px;">
+                <span class="biaos"></span>
+                <div class="black flex-1" style="font-weight: 700;font-size: 16px;">{{item.process}}%
+                    <template v-if="item.process!=item.process_last">
+                      <span v-if="item.isUpdatePro>0" class="green" style="font-size: 12px;"><i class="el-icon-top"></i>{{item.updatePro}}%</span>
+                      <span v-else class="red" style="font-size: 12px;"><i class="el-icon-bottom"></i>{{item.updatePro}}%</span>
+                    </template>
+                </div>
+                <span class="fontColorC">{{item.create_time}}</span>
+              </div>
+              <div class="flex-box o-content" style="margin-bottom: 5px;">
+                <div v-if="item.content" class="flex-1 fontColorB">{{item.content}}</div>
+                <div v-else class="flex-1 fontColorD">暂无内容</div>
+                <div style="display: none;" class="fontColorC" @click="openMp(item)"  v-if="isReturnPJ"> 编辑</div>
+              </div>
+            </div>
            <div class="dotted-line" v-if="projectProcessList.length==0"><div>事务有新的进展?马上记录吧</div></div>
          </div>
        </div>
@@ -163,9 +186,6 @@
            <el-form-item label="进展内容" prop="content" :rules="[{ required: true, message: '请输入进展'}]">
               <el-input type="textarea" v-model="processFormData.content" rows="4" placeholder="请输入进展" maxlength="500" show-word-limit></el-input>
            </el-form-item>
-           <el-form-item label="起止时间">
-              <el-date-picker :clearable="false" size="small" v-model="processFormData.processTime" type="daterange" value-format="yyyy-MM-dd" range-separator="~" start-placeholder="开始日期"end-placeholder="结束日期"></el-date-picker>
-           </el-form-item>
         </el-form>
       </div>
       <div class="flex-box-end" style="margin-top: 30px;">
@@ -190,7 +210,16 @@
     </el-dialog>
 
     <!-- 选择部门 -->
-    <EmployeeSelector title="选择部门" :dept_children="false" :isChecKedAll="false" :max="3" :can_select_employee="false" :can_select_dept="true" :multi="true" :selected="dept_selected" :visible.sync="show_dept_selector"@confirm="dept_confirm"/>
+    <EmployeeSelector
+    title="选择部门"
+    :dept_children="false"
+    :isChecKedAll="false"
+    :max="3"
+    :can_select_employee="false"
+    :can_select_dept="true"
+    :multi="true"
+    :selected="dept_selected"
+    :visible.sync="show_dept_selector"@confirm="dept_confirm"/>
 
     <!-- 对齐目标 -->
     <TargetSearch :visible.sync="isShowDateSearch" title="所属KR" :showType="2" @confirm="confirmTarget"></TargetSearch>
@@ -246,7 +275,7 @@ export default {
       isShowDateSearch:false,
       kr_id:0,
       isShowFw:false,
-      scope_type:1,
+      scope_type:2,
       progressData:{},
       isShowSchedule:false,
       customColor:'#409EFF',
@@ -284,7 +313,9 @@ export default {
         target_type:4,
         target_id:this.projectId,
         start_date:this.detailData.start_date,
-        end_date:this.detailData.end_date,
+        // end_date:this.detailData.end_date,
+        end_date:this.$moment().format('YYYY-MM-DD'),
+
       }
       this.$axiosUser('get', '/api/pro/okr/process/trend',data).then(res=>{
         this.trend=res.data.data.trend;
@@ -299,8 +330,6 @@ export default {
             let data={
               process:this.detailData.process,
               content:this.processFormData.content,
-              start_date:this.processFormData.processTime[0],
-              end_date:this.processFormData.processTime[1],
               p_id:this.processFormData.p_id
             }
             this.$axiosUser('post', '/api/pro/okr/process/content',data).then(res=>{
@@ -330,6 +359,8 @@ export default {
           let list=res.data.data.list
           list.forEach(item=>{
             item.userInfo=this.$getEmployeeMapItem(item.publisher_id);
+            item.updatePro=Math.abs(item.process-item.process_last).toFixed(2);
+            item.isUpdatePro=item.process-item.process_last
           })
           this.projectProcessList=list
       });
@@ -339,6 +370,10 @@ export default {
       this.isShowFw=true;
     },
     confirmFw(){
+      if(this.scope_type==this.detailData.scope_type){
+        this.isShowFw=false;
+        return false
+      }
       this.$axiosUser('post', 'api/pro/okr/project/scope',{scope_type:this.scope_type,project_id:this.projectId}).then(res => {
         this.getProjectDateil();
         this.isShowFw=false;
@@ -350,7 +385,7 @@ export default {
       })
     },
     showTime(){
-      this.time=[this.detailData.start_date,this.detailData.start_date];
+      this.time=[this.detailData.start_date,this.detailData.end_date];
       this.isShowDqMyTarget=true;
     },
     confirmTime(){
@@ -398,7 +433,7 @@ export default {
       }
       let obj={
         project_id:this.projectId,
-        dept_ids:JSON.stringify(dept_ids),
+        dept_ids:dept_ids.toString(),
       }
       this.$axiosUser('post', '/api/pro/okr/project/dept',obj).then(res => {
           this.getProjectDateil();
@@ -453,6 +488,16 @@ export default {
         color: ["#FF9600", "#67c23a", "#4cabce", "#e5323e"],
         tooltip: {
           trigger: 'axis',
+          formatter: function (params) {
+            console.log(params)
+              var result =`
+              <div>
+                  <div>${params[0].axisValue}</div>
+                  <div><span style="display:inline-block;margin-right:2px;border-radius:50px;width:10px;height:10px;background-color:#FF9600"></span> 项目进度:${params[0].value}%</div>
+              </div>
+              `
+              return result
+          }
         },
         xAxis: {
           type: 'category',
@@ -466,6 +511,9 @@ export default {
           },
           axisTick: {
             show: false
+          },
+          axisLabel: {
+            formatter: '{value} %'
           }
         },
         series: [
@@ -501,6 +549,28 @@ export default {
 </script>
 
 <style scoped lang="scss">
+  .biaos {
+    width: 10px;
+    height: 10px;
+    background-color: #409EFF;
+    border: 1px solid #fff;
+    border-radius: 100%;
+    box-shadow: 0 0 10px #409EFF;
+    display: inline-block;
+    margin-right: 10px;
+  }
+  .o-content{
+    border-radius: 5px;
+    padding: 5px;
+    margin-left: 20px;
+  }
+  .o-content:hover{
+    background-color: #F7F8FA;
+  }
+  .o-content:hover .fontColorC{
+    display: block!important;
+    cursor: pointer;
+  }
   .krIcon{
       position: relative;
       width: 22px;

+ 2 - 2
src/okr/components/project/ProjectSchedule.vue

@@ -22,7 +22,7 @@
         <el-radio :label="2" style="width: 220px;">
           根据里程碑完成度自动更新
           <Tooltip preHtml="选择后,项目完成度不可编辑,由系统根据里程碑完成度自动计算"><i class="el-icon-question fontColorC" style="padding-left: 5px;"></i></Tooltip>
-          <span class="blue cursor" v-if="value==2" @click.stop="getMilestoneList">权重设置</span>
+          <!-- <span class="blue cursor" v-if="value==2" @click.stop="getMilestoneList">权重设置</span> -->
         </el-radio>
       </el-radio-group>
     </div>
@@ -77,7 +77,7 @@ export default {
   name: 'ProjectSchedule',
   data() {
     return {
-      title:'更项目完成度',
+      title:'更项目完成度',
       value:1,
       isOpen:false,
       form:{

+ 30 - 17
src/okr/components/project/ProjectTj.vue

@@ -1,8 +1,14 @@
 <template>
   <div class="br-5 scroll-bar" style="height: calc(100vh - 258px);overflow-y: scroll;">
-    <div class="flex-box-ce header">
-        <div class="tab-item" :class="{'active':0==milestone_id}" @click="milestone_id=0">项目总览</div>
-        <div class="tab-item" :class="{'active':item.id==milestone_id}" v-for="(item, index) in milestoneList" :key="index" @click="milestone_id=item.id">{{item.name}}</div>
+    <div style="overflow-x: auto;" class="scroll-bar">
+      <div class="flex-box-ce header">
+          <div class="tab-item clamp" :class="{'active':0==milestone_id}" @click="milestone_id=0">项目总览</div>
+          <div class="tab-item clamp" :class="{'active':item.id==milestone_id}" v-for="(item, index) in milestoneList" :key="index" @click="milestone_id=item.id">
+             <Tooltip :preHtml="item.name">
+             <span>{{item.name}}</span>
+             </Tooltip>
+          </div>
+      </div>
     </div>
     <div class="flex-box-ce" style="margin-bottom: 10px;" v-loading="loading">
       <div class="circular_item flex-2" style="margin-right: 10px;height: auto;">
@@ -27,7 +33,7 @@
     </div>
     <div class="main">
       <div class="flex-box-ce" style="margin: 20px 0;">
-        <div class="flex-1" style="font-size: 16px;font-weight: 600;">任务明细</div>
+        <div class="flex-1" style="font-size: 16px;font-weight: 600;">人员任务统计</div>
         <el-button type="primary" size="small" @click="exportExcel()">导出全部</el-button>
       </div>
       <el-table :data="tableData" style="width: 100%" :loading="loading2">
@@ -53,44 +59,47 @@
 
 
     <!-- 里程碑进度 -->
-    <el-dialog title="任务明细" :visible.sync="isShowMp" :append-to-body="true" width="760px">
+    <el-dialog title="任务明细" :visible.sync="isShowMp" :append-to-body="true" width="860px">
       <div>
           <div class="flex-box-end">
               <el-select class="select" size="small" v-model="composite_state" placeholder="状态">
                 <el-option :key="0" label="全部" :value="0"></el-option>
                 <el-option v-for="item in taskStatus" :key="item.value" :label="item.name" :value="item.value"></el-option>
               </el-select>
-              <el-input class="select" size="small" prefix-icon="el-icon-search" placeholder="请输入名字搜索" v-model="keyword" clearable style="width: 200px;"></el-input>
+              <el-input class="select" size="small" prefix-icon="el-icon-search" placeholder="任务名称搜索" v-model="keyword" clearable style="width: 200px;"></el-input>
           </div>
           <el-table :data="taskList" style="width: 100%" :loading="loading2">
-            <el-table-column prop="name" label="任务名称" min-width="300">
+            <el-table-column prop="name" label="任务名称" show-overflow-tooltip min-width="300">
               <template slot-scope="scope">
                   <span class="hoverBlue" @click="openTaskDetail(scope.row.id)">{{ scope.row.name}}</span>
               </template>
             </el-table-column>
-            <el-table-column prop="dept" label="负责人">
+
+            <el-table-column prop="dept" label="负责人" show-overflow-tooltip>
                 <template slot-scope="scope">
-                    <span>{{ scope.row.owner_userInfo.name}}</span>
+                  <span>{{ scope.row.owner_userInfo.name}}</span>
                 </template>
             </el-table-column>
-            <el-table-column label="进度">
+
+            <el-table-column label="进度" min-width="150">
               <template slot-scope="scope">
-                <Progress  :value="Number(scope.row.process)"></Progress>
+                <Progress :value="Number(scope.row.process)" isShowLeftVal></Progress>
               </template>
             </el-table-column>
+
             <el-table-column prop="end_time" label="截止时间"></el-table-column>
+
             <el-table-column prop="o_process_avg" label="状态">
               <template slot-scope="scope">
                   <span>{{ scope.row.stateInfo.name}}</span>
               </template>
             </el-table-column>
           </el-table>
-          <NoData v-if="taskList.length==0"></NoData>
+          <!-- <NoData v-if="taskList.length==0"></NoData> -->
           <el-pagination style="text-align: center;margin-top: 20px;"  :current-page.sync="page2" layout="total,prev,pager,next" :total="total2" @size-change="handleSizeChange2"  @current-change="handleCurrentChange2" :page-size="page_size2"></el-pagination>
       </div>
       <div class="flex-box-end" style="margin-top: 30px;">
-        <el-button @click="isShowMp=false">取消</el-button>
-        <el-button type="primary" @click="confirmProcessm('form')">确定</el-button>
+        <el-button @click="isShowMp=false">关闭</el-button>
       </div>
     </el-dialog>
     <TaskDetail  :visible.sync="isShowTaskDetail" :taskId="taskId" @confirm="closeDetail"></TaskDetail>
@@ -101,10 +110,11 @@
 import {getBelongType,getYearArr,getDateStr,taskStatus} from '@/okr/utils/auth';
 import Progress from '@/okr/components/public/Progress'; //进度条
 import TaskDetail from '@/okr/components/public/TaskDetail'; //任务详情
+import Tooltip from '@/components/Tooltip'; //鼠标悬浮显示文字文字
 import {_debounce} from '@/utils/auth';
 export default {
   name: 'ProjectTj',
-  components: {Progress,TaskDetail},
+  components: {Progress,TaskDetail,Tooltip},
   data() {
     return {
       getBelongType:getBelongType(false,true),
@@ -227,7 +237,7 @@ export default {
         ];
         if(data.total&&data.finish){
           let du=data.finish/data.total*100;
-          this.percentage=(parseInt(du * 100 ) / 100 ).toFixed(2)
+          this.percentage=parseInt((du * 100 ) / 100 )
         }else{
           this.percentage=0;
         }
@@ -294,11 +304,14 @@ export default {
 <style scoped lang="scss">
   .tab-item{
     padding: 7px 20px;
-    text-align: center;
+    // text-align: center;
     background-color: #F7F8FA;
     margin-right: 10px;
     border-radius: 20px;
     cursor: pointer;
+    box-sizing: border-box;
+    max-width: 300px;
+    flex-shrink: 0;
   }
   .active{
      background-color: #E1EBFB;

+ 11 - 4
src/okr/components/project/SelectProjectGj.vue

@@ -4,26 +4,26 @@
       <div style="border-bottom: 1px solid #f1f1f1;font-size: 16px;font-weight: 700;padding: 0 10px;padding-bottom: 10px;">高级筛选</div>
       <div style="padding: 10px;" v-if="idText!='owner_id'">
           <div style="margin-bottom: 15px;">项目负责人</div>
-          <el-select class="select" filterable size="small" style="width: 120px;" v-model="owner_id" clearable placeholder="负责人">
+          <el-select class="select" filterable size="small" style="width: 120px;" v-model="owner_id" clearable placeholder="项目负责人">
             <el-option v-for="item in employeeOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
           </el-select>
       </div>
       <div style="padding: 10px;" v-if="idText!='joiner_id'">
           <div style="margin-bottom: 15px;">参与人</div>
-          <el-select class="select" filterable size="small"  style="width: 120px;" v-model="joiner_id" clearable placeholder="负责人">
+          <el-select class="select" filterable size="small"  style="width: 120px;" v-model="joiner_id" clearable placeholder="参与人">
             <el-option v-for="item in employeeOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
           </el-select>
       </div>
       <div style="padding: 10px;">
           <div style="margin-bottom: 15px;">所属部门</div>
-          <el-cascader class="select" size="small" v-model="dept_id" :options="dept_tree" clearable filterable change-on-select placeholder="所属部门"></el-cascader>
+          <el-cascader ref="dept" class="select" size="small" v-model="dept_id" :options="dept_tree" clearable filterable change-on-select placeholder="所属部门"></el-cascader>
       </div>
       <div style="padding: 10px;">
           <div style="margin-bottom: 15px;">日期</div>
           <el-date-picker class="select" style="width: 280px;" size="small" v-model="dateTime" type="daterange" value-format="yyyy-MM-dd" range-separator="~" start-placeholder="开始日期"end-placeholder="结束日期"></el-date-picker>
       </div>
       <div style="padding: 10px;">
-        <div style="margin-bottom: 15px;">目排序</div>
+        <div style="margin-bottom: 15px;">目排序</div>
         <el-radio-group v-model="sort">
           <div class="flex-box-ce flex-d-wrap">
             <el-radio style="margin-bottom: 15px;" v-for="(item, index) in sortArr" :key="index" :label="item.code">{{ item.name }}</el-radio>
@@ -81,6 +81,13 @@ export default {
       dept_tree: [],
     };
   },
+  watch:{
+    dept_id(){
+      this.$nextTick(() => {
+        this.$refs.dept.dropDownVisible = false;
+      });
+    }
+  },
   created() {
     if (this.$getCache('dept_tree')) {
       this.dept_tree = this.getTreeData(this.$getCache('dept_tree'));

+ 2 - 2
src/okr/components/public/AddTask.vue

@@ -32,7 +32,7 @@
           <el-form-item label="所属KR/项目">
             <div class="cursor" style="border-radius: 4px;border: 1px solid #dcdfe6;line-height: 34px;width: 400px;padding: 0 15px;">
               <Tooltip preHtml="更改所属KR/项目:请先取消关联母任务" v-if="target_plan_id">
-                  <span class="fontColorC">{{krName||'更改所属KR:请先取消关联母任务'}}</span>
+                  <span class="fontColorC">{{krName||'更改所属KR/项目:请先取消关联母任务'}}</span>
               </Tooltip>
               <template v-else>
                 <div class="fontColorC" v-if="!target_id" @click="isShowDateSearch=true">请选择所属KR/项目</div>
@@ -637,7 +637,7 @@ export default {
       this.wait=true;
       this.$axiosUser('post', 'api/pro/okr/plan/create', params).then(res => {
           this.$message.success('已添加');
-          this.$emit('confirm', {});
+          this.$emit('confirm',{id:res.data.data.id});
           this.close();
       }).finally(_=>{
         this.wait=false;

+ 1 - 1
src/okr/components/public/Progress.vue

@@ -7,7 +7,7 @@
         </template>
       </div>
     </div>
-    <div v-if="isShowLeftVal" style="padding-left: 5px;color: #409EFF;font-size: 12px;" :class="{orange:status==2,red:status==3,}">{{ value }}%</div>
+    <div v-if="isShowLeftVal" style="padding-left: 5px;color: #409EFF;font-size: 12px;flex-shrink: 0;" :class="{orange:status==2,red:status==3,}">{{ value }}%</div>
   </div>
 </template>
 

+ 1 - 1
src/okr/components/public/Schedule.vue

@@ -30,7 +30,7 @@
                 根据关键成果KR完成度自动更新<Tooltip preHtml="选择后,目标完成度不可编辑,由系统根据关键成果KR完成度自动计算"><i class="el-icon-question fontColorC" style="padding-left: 5px;"></i></Tooltip>
               </template>
               <template v-else>
-               根据任务完成度自动更新<Tooltip preHtml="选择后,KR完成度不可编辑,由系统根据KR下任务完成度自动计算"><i class="el-icon-question fontColorC" style="padding-left: 5px;"></i></Tooltip>
+               根据任务/项目完成度自动更新<Tooltip preHtml="选择后,KR完成度不可编辑,由系统根据KR下任务/项目完成度自动计算"><i class="el-icon-question fontColorC" style="padding-left: 5px;"></i></Tooltip>
               </template>
 
           </el-radio>

+ 5 - 5
src/okr/components/public/TargetDetail.vue

@@ -232,7 +232,7 @@
                     <div class="fontColorC" v-for="(item, index) in krsListAll" :key="index">
                       <div class="flex-box-ce kr-item">
                         <div style="width: 30px;height: 30px;">
-                          <i class="caret" :class="item.isShow ? 'el-icon-caret-bottom' : 'el-icon-caret-right'" @click="showTask(item)" v-if="item.plans.length>0"></i>
+                          <i class="caret" :class="item.isShow ? 'el-icon-caret-bottom' : 'el-icon-caret-right'" @click="showTask(item)" v-if="item.plans.length>0||item.projects.length>0"></i>
                         </div>
                         <span class="okr-index">KR{{ index + 1 }}</span>
                         <div class="flex-1 clamp2 fontColorC cursor" style="padding-right: 30px;" @click="initData(2,item)">{{item.name}}</div>
@@ -253,7 +253,7 @@
                           </el-dropdown>
                         </template>
                       </div>
-                      <template v-if="item.plans.length>0">
+                      <template v-if="item.plans.length>0||item.projects.length>0">
                         <TaskItem :isShow="item.isShow" :isParent="isParent" :list="item.plans" :krId="item.id" :isShowBinding="true" style="margin-left: 26px;" class="fontColorB" @confirm="getkrTaskList()"></TaskItem>
                       </template>
                       <div class="orange" v-else style="margin-bottom: 8px;font-size: 13px;padding-left: 50px;">用“任务”推动目标达成,合理规划安排工作</div>
@@ -613,6 +613,7 @@
                   </div>
                 </div>
                 <div style="position: relative;padding: 15px 0;">
+                  <!-- krsListAll2 -->
                   <div class="fontColorC" v-for="(item, index) in krsListAll2" :key="index">
                     <div class="flex-box-ce kr-item2">
                       <div class="flex-1"></div>
@@ -631,11 +632,9 @@
                             <el-dropdown-item command="d">关联项目</el-dropdown-item>
                           </el-dropdown-menu>
                         </el-dropdown>
-<!--                        <el-button size="mini" type="primary" @click="handleCommandTask('a', item)" plain round>添加任务</el-button>
-                        <el-button size="mini" type="success" @click="handleCommandTask('b', item)" plain round>关联任务</el-button> -->
                       </template>
                     </div>
-                    <template v-if="item.plans.length>0">
+                    <template v-if="item.plans.length>0||item.projects.length>0">
                       <TaskItem :isShow="item.isShow" :isParent="isParent" :list="item.plans" :krId="item.id" :isShowBinding="true"  class="fontColorB" @confirm="updateFun"></TaskItem>
                     </template>
                     <div class="orange" v-else style="margin-bottom: 8px;font-size: 13px;padding-left: 50px;">用“任务”推动目标达成,合理规划安排工作</div>
@@ -1281,6 +1280,7 @@ export default {
             item.isShow=false;
           })
           this.krsListAll=JSON.parse(JSON.stringify(list));
+          console.log(this.krsListAll)
           this.$nextTick(()=>{
             this.krsListAll.forEach(item=>{
               item.isShow=true;

+ 21 - 8
src/okr/components/public/TargetSearch.vue

@@ -52,10 +52,14 @@
           <el-select class="select" size="small" v-model="projectData.composite_state" placeholder="状态" style="width: 100px;">
             <el-option v-for="item in statusArr" :key="item.value" :label="item.label"  :value="item.value"></el-option>
           </el-select>
-           <el-cascader class="select"  style="width: 200px;" size="small" v-model="projectData.dept_id" :options="dept_tree" clearable filterable change-on-select placeholder="所属部门"></el-cascader>
-           <el-select class="select"  filterable size="small" v-model="projectData.owner_id" clearable placeholder="负责人">
-             <el-option  v-for="item in employeeMap" :key="item.id" :label="item.name" :value="item.id"></el-option>
+           <el-cascader class="select"  style="width: 200px;" size="small" v-model="projectData.dept_id" :options="dept_tree" ref="dept" clearable filterable change-on-select placeholder="所属部门"></el-cascader>
+           <el-select class="select" size="small" v-model="userType" placeholder="状态" style="width: 100px;">
+             <el-option label="我负责的"  :value="0"></el-option>
+             <el-option label="我创建的"  :value="1"></el-option>
            </el-select>
+<!--           <el-select class="select"  filterable size="small" v-model="projectData.owner_id" clearable placeholder="负责人">
+             <el-option  v-for="item in employeeMap" :key="item.id" :label="item.name" :value="item.id"></el-option>
+           </el-select> -->
            <div class="flex-1"></div>
            <el-input class="input" style="width: 200px;" maxlength="20" show-word-limit size="small" v-model="projectData.keyword" clearable placeholder="请输入项目名称关键字"/>
          </div>
@@ -77,7 +81,7 @@
                <div v-loading="loading" v-if="showSelectType!=2">
                    <div class="flex-box-ce taskItem" style="padding-left: 40px;" v-for="(item2,index2) in item.tasks" :key="index2">
                      <div class="radio" style="margin-right: 10px;" :class="{'radio-active':(selectId==item2.id&&type==item2.type)}" @click.stop="activeId(item2,5)"></div>
-                     <div class="flex-1">KR{{index2+1}}:{{item2.name}}</div>
+                     <div class="flex-1">{{item2.name}}</div>
                    </div>
                    <div v-if="item.statistics&&item.statistics.milestone_total==0" class="fontColorC" style="padding: 10px 0;text-align: center;">暂无里程碑</div>
                </div>
@@ -189,7 +193,7 @@ export default {
       activeName:'okr',
 
       projectData:{
-        owner_id:'',
+        owner_id:this.$userInfo().id,
         composite_state:0,
         dept_id:0,
         keyword:'',
@@ -206,6 +210,7 @@ export default {
         {value: 4,label: '已完成'},
       ],
       projectList:[],
+      userType:0,
     };
   },
   watch: {
@@ -216,6 +221,9 @@ export default {
         this.getTargetList();
       })
     },
+    userType(val){
+      this.getProjectList();
+    },
     dataId(val){
       this.getTargetList();
     },
@@ -253,6 +261,9 @@ export default {
     },
     'projectData.dept_id'(val){
       this.getProjectList();
+      this.$nextTick(() => {
+        this.$refs.dept.dropDownVisible = false;
+      });
     },
 
   },
@@ -303,15 +314,17 @@ export default {
       let data={
         page:is? this.page2:1,
         page_size:this.page_size2,
-        scope_type:1,//	否	string	可见范围 1-相关人员可见 2-全员可见 默认为0不区分
+        scope_type:0,//	否	string	可见范围 1-相关人员可见 2-全员可见 默认为0不区分
         composite_state:this.projectData.composite_state,//	否	strin g	综合状态 1-未开始 2-进行中 3-逾期 4-达标 默认为0不区分
         dept_id:this.projectData.dept_id? this.projectData.dept_id[this.projectData.dept_id.length-1]:0,//	否	string	部门id,默认为0
         // sort:this.projectData.sort,//	否	string	排序 ct_asc-创建时间正序 ct_desc-创建时间倒序 up_asc-更新时间正序 up_desc-更新时间倒序 默认为ct_desc
         keyword:this.projectData.keyword,//	否	string	关键字
         visible:1,
       }
-      if(this.projectData.owner_id){
-        data.owner_id=this.projectData.owner_id
+      if(this.userType===0){
+        data.owner_id=this.$userInfo().id
+      }else{
+        data.publisher_id=this.$userInfo().id
       }
       this.loading = true;
       this.$axiosUser('get','api/pro/okr/project/list',data).then(res => {

+ 33 - 13
src/okr/components/public/TaskDetail.vue

@@ -318,18 +318,28 @@
                 <div class="flex-box-ce kr-message-item">
                   <div class="label"><svg-icon icon-class="#icon-biaoqian_guanlizhongxin" class="svgIcon"></svg-icon>&nbsp;所属KR/项目
                       <el-tooltip placement="top">
-                        <div slot="content">所属KR:<br/>· 在KR下添加任务时,默认属于当前KR <br/>· 所属KR开启按任务自动更新进度后,仅最顶级的母任务影响所属KR的进度</div>
+                        <div slot="content">
+                          所属KR/项目:<br/>
+                          · 在KR或项目下添加任务时,默认属于当前KR或项目<br/>
+                          · 任务的所属KR或项目只能存在一个
+                        </div>
                         <i class="el-icon-question fontColorD"></i>
                       </el-tooltip>
                   </div>
                   <div>
+
                     <span v-if="taskDetail.main.kr_id" class="showUpdate flex-box-ce">
-                      <div style="max-width: 400px;" class="flex-box-ce font-flex-word">
+                      <div style="max-width: 200px;" class="flex-box-ce font-flex-word">
+                          <span class="krIcon">O</span>
+                          <span class="clamp cursor" style="max-width: 300px;" @click="openDetail(taskDetail.main.o_id,1)">{{taskDetail.main.o_name}}</span>
+                      </div>
+                      <div style="padding:0 10px">-</div>
+                      <div style="max-width: 200px;" class="flex-box-ce font-flex-word">
                           <span class="krIcon">KR</span>
-                          <span class="cursor" @click="openDetail(taskDetail.main.kr_id,2)">{{taskDetail.main.kr_name}}</span>
+                          <span class="clamp cursor" style="max-width: 300px;" @click="openDetail(taskDetail.main.kr_id,2)">{{taskDetail.main.kr_name}}</span>
                       </div>
                       <template v-if="taskDetail.can_edit_normal">
-                        <Tooltip preHtml="更改所属KR:请先更改母任务的所属KR或取消关联母任务" v-if="taskDetail.pid">
+                        <Tooltip preHtml="更改所属KR/项目:请先更改母任务的所属KR/项目或取消关联母任务" v-if="taskDetail.pid">
                             <i class="el-icon-edit" style="display: none;">编辑</i>
                         </Tooltip>
                         <template v-else>
@@ -340,13 +350,19 @@
                         </template>
                       </template>
                     </span>
+
                     <span v-else-if="taskDetail.main.milestone_id" class="showUpdate flex-box-ce">
+                      <div style="max-width: 200px;" class="flex-box-ce font-flex-word">
+                          <span class="krIcon">项目</span>
+                          <span class="clamp" style="max-width: 300px;">{{taskDetail.main.project_name}}</span>
+                      </div>
+                      <div style="padding:0 10px">-</div>
                       <div style="max-width: 400px;" class="flex-box-ce font-flex-word">
                           <span class="krIcon">里程碑</span>
-                          <span>{{taskDetail.main.milestone_name}}</span>
+                          <span class="clamp" style="max-width: 300px;">{{taskDetail.main.milestone_name}}</span>
                       </div>
                       <template v-if="taskDetail.can_edit_normal">
-                        <Tooltip preHtml="更改所属KR:请先更改母任务的所属KR或取消关联母任务" v-if="taskDetail.pid">
+                        <Tooltip preHtml="更改所属KR/项目:请先更改母任务的所属KR/项目或取消关联母任务" v-if="taskDetail.pid">
                             <i class="el-icon-edit" style="display: none;">编辑</i>
                         </Tooltip>
                         <template v-else>
@@ -357,13 +373,14 @@
                         </template>
                       </template>
                     </span>
+
                     <span v-else-if="taskDetail.main.project_id" class="showUpdate flex-box-ce">
                       <div style="max-width: 400px;" class="flex-box-ce font-flex-word">
                           <span class="krIcon">项目</span>
-                          <span>{{taskDetail.main.project_name}}</span>
+                          <span class="clamp" style="max-width: 300px;">{{taskDetail.main.project_name}}</span>
                       </div>
                       <template v-if="taskDetail.can_edit_normal">
-                        <Tooltip preHtml="更改所属KR:请先更改母任务的所属KR或取消关联母任务" v-if="taskDetail.pid">
+                        <Tooltip preHtml="更改所属KR/项目:请先更改母任务的所属KR/项目或取消关联母任务" v-if="taskDetail.pid">
                             <i class="el-icon-edit" style="display: none;">编辑</i>
                         </Tooltip>
                         <template v-else>
@@ -374,8 +391,9 @@
                         </template>
                       </template>
                     </span>
+
                     <span v-else class="showUpdate flex-box-ce">暂无
-                        <Tooltip preHtml="更改所属KR:请先取消关联母任务" v-if="taskDetail.pid">
+                        <Tooltip preHtml="更改所属KR/项目:请先取消关联母任务" v-if="taskDetail.pid">
                             <i class="el-icon-edit" style="display: none;">编辑</i>
                         </Tooltip>
                         <Tooltip preHtml="编辑" v-else>
@@ -1285,7 +1303,8 @@ export default {
     //删除任务
     deleteFeedback(){
       this.$axiosUser('POST', 'api/pro/okr/plan/d', {plan_id:this.id}).then(res => {
-           this.close_before();
+          this.$message.success("已删除")
+          this.close_before();
       })
     },
     //开启审批
@@ -1309,7 +1328,7 @@ export default {
       }else if(e==4){//重置任务
         url="api/pro/okr/plan/state/reset";
       }else if(e==5){//删除任务
-        this.$confirm('该事项将被删除不可恢复!请谨慎操作','提示', {
+        this.$confirm('该任务将被删除不可恢复!请谨慎操作','提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
@@ -1631,9 +1650,10 @@ export default {
         background-color: #f4f6f9;
      }
     .time{
-      background-color: #F5B333;
+      // background-color: #F5B333;
+      border: 1px solid #409EFF;
       font-weight: 600;
-      color: #fff;
+      color: #409EFF;
       border-radius: 3px;
       padding: 1px 6px;
       margin-right: 30px;

+ 129 - 117
src/okr/components/public/TaskItem.vue

@@ -3,123 +3,125 @@
       <CollapseTransition>
         <div v-show="isShow">
           <div class="taskBox" v-if="projects.length>0">
-            <div v-for="(item,index) in projects" :key="index" class="flex-box-ce isSimpleShow">
+            <div v-for="(item,index) in projects" :key="index" class="flex-box-ce isSimpleShow" @click.prevent.stop="openDetail2(item)">
                 <div class="flex-1 clamp2" style="padding-right: 30px;">
-
                   <i class="el-icon-s-finance" style="margin-right: 10px;"></i>
-                  <!-- @click.prevent.stop="openDetail(item)" -->
-                  <Tooltip :preHtml="item.name"><span>{{item.name}}</span></Tooltip>
-                </div>
-                <div class="hover-border2"> <svg-icon icon-class="#icon-biaoqian_wode" class="svgIcon"></svg-icon><span>{{$getEmployeeMapItem(item.owner_id).name}}</span></div>
-                <div class="hover-border2" style="margin: 0 30px;text-align: center;width: 52px;">
-                  <span>{{$moment(item.end_date).format('MM/DD')}}</span>
-                </div>
-                <div class="flex-box-ce" v-if="item.process">
-                  <el-progress :stroke-width="3" v-if="item.process>100" color="#2879ff" :show-text="false" :width="20" type="circle" :percentage="100"></el-progress>
-                  <el-progress :stroke-width="3" v-else :show-text="false" color="#2879ff" :width="20" type="circle" :percentage="Number(item.process)"></el-progress>
-                  <span style="padding-left: 5px;">{{item.process}}%</span>
+                  <Tooltip :preHtml="item.name" class="hoverBlue"><span>{{item.name}}</span></Tooltip>
                 </div>
-                <div v-if="item.can_edit" style="width: 20px;height: 20px;margin-left: 30px;cursor: pointer;" @click="qxGl(item)">
-                   <Tooltip preHtml="取消关联"><i class="el-icon-link"></i></Tooltip>
-                </div>
-                <div v-else style="width: 20px;height: 20px;margin-left: 30px;"></div>
+                <template v-if="isParent">
+                  <div class="hover-border2"> <svg-icon icon-class="#icon-biaoqian_wode" class="svgIcon"></svg-icon><span>{{$getEmployeeMapItem(item.owner_id).name}}</span></div>
+                  <div class="hover-border2" style="margin: 0 30px;text-align: center;width: 52px;">
+                    <span>{{$moment(item.end_date).format('MM/DD')}}</span>
+                  </div>
+                  <div class="flex-box-ce" v-if="item.process">
+                    <el-progress :stroke-width="3" v-if="item.process>100" color="#2879ff" :show-text="false" :width="20" type="circle" :percentage="100"></el-progress>
+                    <el-progress :stroke-width="3" v-else :show-text="false" color="#2879ff" :width="20" type="circle" :percentage="Number(item.process)"></el-progress>
+                    <span style="padding-left: 5px;">{{item.process}}%</span>
+                  </div>
+                  <div v-if="item.can_edit" style="width: 20px;height: 20px;margin-left: 30px;cursor: pointer;" @click.prevent.stop="qxGl(item)">
+                     <Tooltip preHtml="取消关联"><i class="el-icon-link"></i></Tooltip>
+                  </div>
+                  <div v-else style="width: 20px;height: 20px;margin-left: 30px;"></div>
+                </template>
             </div>
-
           </div>
           <div class="taskBox">
-                    <template v-if="parentList.length>0">
-                      <div v-for="(item,index) in parentList" :key="index">
-                        <div class="flex-box-ce isSimpleShow">
-                          <template v-if="isParent">
-                            <i class="caret" v-if="item.statistics.plan_total>0" :class="item.isShow? 'el-icon-caret-bottom':'el-icon-caret-right'" @click="showTask(item)"></i>
-                          </template>
-                          <template v-else>
-                            <i class="caret" v-if="item.child&&item.child.length>0" :class="item.isShow? 'el-icon-caret-bottom':'el-icon-caret-right'" @click="showTask(item)"></i>
-                          </template>
-                          <Tooltip :preHtml="item.stateInfo.name"><i :class="item.stateInfo.icon" style="margin-right: 10px;"></i></Tooltip>
-                          <!-- 可操作 -->
-                          <template v-if="isSimpleShow==1">
-                            <div class="flex-1 clamp2" style="padding-right: 30px;">
-                              <Tooltip :preHtml="item.name"><span class="hoverBlue" @click.prevent.stop="openDetail(item)">{{item.name}}</span></Tooltip>
-                            </div>
-                            <div class="hover-border" @click="openSelectTime(item,2)"> <svg-icon icon-class="#icon-biaoqian_wode" class="svgIcon"></svg-icon><span>{{item.userInfo.name}}</span></div>
-                            <div class="hover-border" style="margin: 0 30px;text-align: center;width: 52px;" @click="openSelectTime(item,1)">
-                              <span>{{$moment(item.end_date).format('MM/DD')}}</span>
-                            </div>
-                            <div class="flex-box-ce" v-if="item.process">
-                             <el-progress :stroke-width="3" v-if="item.process>100" :color="customColorMethod(item.level)" :show-text="false" :width="20" type="circle" :percentage="100"></el-progress>
-                             <el-progress :stroke-width="3" v-else :show-text="false" :color="customColorMethod(item.level)" :width="20" type="circle" :percentage="Number(item.process)"></el-progress>
-                              <span style="padding-left: 5px;">{{item.process}}%</span>
-                            </div>
-                            <template v-if="item.can_stop==1||item.can_cancel==1||item.can_finish==1||item.can_reset==1||isShowBinding">
-                              <el-dropdown @command="handleCommand($event,item)" trigger="click" class="hoverBlue">
-                               <i class="el-icon-more"></i>
-                               <el-dropdown-menu slot="dropdown">
-                                  <el-dropdown-item :command="1" v-if="item.can_stop==1">暂停任务</el-dropdown-item>
-                                  <el-dropdown-item :command="2" v-if="item.can_cancel==1">取消任务</el-dropdown-item>
-                                  <el-dropdown-item :command="3" v-if="item.can_finish==1">完成任务</el-dropdown-item>
-                                  <el-dropdown-item :command="4" v-if="item.can_reset==1">重置任务</el-dropdown-item>
-                                  <el-dropdown-item :command="5" v-if="isShowBinding&&item.can_edit_normal==1">取消关联</el-dropdown-item>
-                                </el-dropdown-menu>
-                              </el-dropdown>
-                            </template>
-                            <div v-else style="width: 20px;height: 20px;margin-left: 30px;"></div>
-                          </template>
-                          <!-- 不可操作 -->
-                          <template v-if="isSimpleShow==2">
-                            <div class="flex-1 clamp2" style="padding-right: 30px;">
-                              <Tooltip :preHtml="item.name"><span class="hoverBlue" @click.prevent.stop="openDetail(item)">{{item.name}}</span></Tooltip>
-                            </div>
-                            <div class="hover-border2"> <svg-icon icon-class="#icon-biaoqian_wode" class="svgIcon"></svg-icon><span>{{item.userInfo.name}}</span></div>
-                            <div class="hover-border2" style="margin: 0 30px;text-align: center;width: 52px;">
-                              <span>{{$moment(item.end_date).format('MM/DD')}}</span>
-                            </div>
-                            <div class="flex-box-ce" v-if="item.process">
-                              <el-progress :stroke-width="3" v-if="item.process>100" :color="customColorMethod(item.level)" :show-text="false" :width="20" type="circle" :percentage="100"></el-progress>
-                              <el-progress :stroke-width="3" v-else :show-text="false" :color="customColorMethod(item.level)" :width="20" type="circle" :percentage="Number(item.process)"></el-progress>
-                              <span style="padding-left: 5px;">{{item.process}}%</span>
-                            </div>
-          <!--                  <template v-if="item.can_stop==1||item.can_cancel==1||item.can_finish==1||item.can_reset==1||isShowBinding">
-                              <el-dropdown @command="handleCommand($event,item)" trigger="click" class="hoverBlue">
-                               <i class="el-icon-more"></i>
-                               <el-dropdown-menu slot="dropdown">
-                                  <el-dropdown-item :command="1" v-if="item.can_stop==1">暂停任务</el-dropdown-item>
-                                  <el-dropdown-item :command="2" v-if="item.can_cancel==1">取消任务</el-dropdown-item>
-                                  <el-dropdown-item :command="3" v-if="item.can_finish==1">完成任务</el-dropdown-item>
-                                  <el-dropdown-item :command="4" v-if="item.can_reset==1">重置任务</el-dropdown-item>
-                                  <el-dropdown-item :command="5" v-if="isShowBinding&&item.can_edit_normal==1">取消关联</el-dropdown-item>
-                                </el-dropdown-menu>
-                              </el-dropdown>
-                            </template> -->
-                            <div  style="width: 20px;height: 20px;margin-left: 30px;"></div>
-                          </template>
-                          <!-- 已结束 -->
-                          <template v-if="isSimpleShow==3">
-                              <div class="flex-1 clamp2 hoverBlue" @click.prevent.stop="openDetail(item)">
-                                <Tooltip :preHtml="item.name"><span>{{item.name}}</span></Tooltip>
-                              </div>
-                              <div class="hover-border2" v-if="item.composite_state==2||item.composite_state==3">
-                                <span v-if="item.day>0">剩余<span class="green">{{item.day}}</span>天</span>
-                                <span v-if="item.day<0">过期<span class="red">{{Math.abs(item.day)}}</span>天</span>
-                              </div>
-                          </template>
-                        </div>
-                       <template v-if="isParent">
-                          <TaskItem v-if="item.statistics.plan_total>0" :isShowBinding="false" :isShow="item.isShow" :isParent="isParent" :taskId="item.id"  :isSimpleShow="isSimpleShow"  @confirm="openDetail"></TaskItem>
-                        </template>
-                        <template v-else>
-                          <TaskItem v-if="item.child&&item.child.length>0" :isShowBinding="false" :isShow="item.isShow" :list="item.child" :isSimpleShow="isSimpleShow"  @confirm="openDetail"></TaskItem>
-                        </template>
-                      </div>
+              <template v-if="parentList.length>0">
+                <div v-for="(item,index) in parentList" :key="index">
+                  <div class="flex-box-ce isSimpleShow">
+                    <template v-if="isParent">
+                      <i class="caret" v-if="item.statistics.plan_total>0" :class="item.isShow? 'el-icon-caret-bottom':'el-icon-caret-right'" @click="showTask(item)"></i>
+                    </template>
+                    <template v-else>
+                      <i class="caret" v-if="item.child&&item.child.length>0" :class="item.isShow? 'el-icon-caret-bottom':'el-icon-caret-right'" @click="showTask(item)"></i>
                     </template>
-                    <div v-else>
-                      <template v-if="isParent">
-                        <div class="zhu"></div>
-                        <div class="zhu"></div>
+                    <Tooltip :preHtml="item.stateInfo.name"><i :class="item.stateInfo.icon" style="margin-right: 10px;"></i></Tooltip>
+                    <!-- 可操作 -->
+                    <template v-if="isSimpleShow==1">
+                      <div class="flex-1 clamp2" style="padding-right: 30px;">
+                        <Tooltip :preHtml="item.name"><span class="hoverBlue" @click.prevent.stop="openDetail(item)">{{item.name}}</span></Tooltip>
+                      </div>
+                      <div class="hover-border" @click="openSelectTime(item,2)"> <svg-icon icon-class="#icon-biaoqian_wode" class="svgIcon"></svg-icon><span>{{item.userInfo.name}}</span></div>
+                      <div class="hover-border" style="margin: 0 30px;text-align: center;width: 52px;" @click="openSelectTime(item,1)">
+                        <span>{{$moment(item.end_date).format('MM/DD')}}</span>
+                      </div>
+                      <div class="flex-box-ce" v-if="item.process">
+                       <el-progress :stroke-width="3" v-if="item.process>100" :color="customColorMethod(item.level)" :show-text="false" :width="20" type="circle" :percentage="100"></el-progress>
+                       <el-progress :stroke-width="3" v-else :show-text="false" :color="customColorMethod(item.level)" :width="20" type="circle" :percentage="Number(item.process)"></el-progress>
+                        <span style="padding-left: 5px;">{{item.process}}%</span>
+                      </div>
+                      <template v-if="item.can_stop==1||item.can_cancel==1||item.can_finish==1||item.can_reset==1||isShowBinding">
+                        <el-dropdown @command="handleCommand($event,item)" trigger="click" class="hoverBlue">
+                         <i class="el-icon-more"></i>
+                         <el-dropdown-menu slot="dropdown">
+                            <el-dropdown-item :command="1" v-if="item.can_stop==1">暂停任务</el-dropdown-item>
+                            <el-dropdown-item :command="2" v-if="item.can_cancel==1">取消任务</el-dropdown-item>
+                            <el-dropdown-item :command="3" v-if="item.can_finish==1">完成任务</el-dropdown-item>
+                            <el-dropdown-item :command="4" v-if="item.can_reset==1">重置任务</el-dropdown-item>
+                            <el-dropdown-item :command="5" v-if="isShowBinding&&item.can_edit_normal==1">取消关联</el-dropdown-item>
+                          </el-dropdown-menu>
+                        </el-dropdown>
                       </template>
-                      <div class="orange" v-else style="margin-bottom: 8px;font-size: 13px;">用“任务”推动目标达成,合理规划安排工作</div>
-                    </div>
+                      <div v-else style="width: 20px;height: 20px;margin-left: 30px;"></div>
+                    </template>
+                    <!-- 不可操作 -->
+                    <template v-if="isSimpleShow==2">
+                      <div class="flex-1 clamp2" style="padding-right: 30px;">
+                        <Tooltip :preHtml="item.name"><span class="hoverBlue" @click.prevent.stop="openDetail(item)">{{item.name}}</span></Tooltip>
+                      </div>
+                      <div class="hover-border2"> <svg-icon icon-class="#icon-biaoqian_wode" class="svgIcon"></svg-icon><span>{{item.userInfo.name}}</span></div>
+                      <div class="hover-border2" style="margin: 0 30px;text-align: center;width: 52px;">
+                        <span>{{$moment(item.end_date).format('MM/DD')}}</span>
+                      </div>
+                      <div class="flex-box-ce" v-if="item.process">
+                        <el-progress :stroke-width="3" v-if="item.process>100" :color="customColorMethod(item.level)" :show-text="false" :width="20" type="circle" :percentage="100"></el-progress>
+                        <el-progress :stroke-width="3" v-else :show-text="false" :color="customColorMethod(item.level)" :width="20" type="circle" :percentage="Number(item.process)"></el-progress>
+                        <span style="padding-left: 5px;">{{item.process}}%</span>
+                      </div>
+<!--                      <template v-if="item.can_stop==1||item.can_cancel==1||item.can_finish==1||item.can_reset==1||isShowBinding">
+                        <el-dropdown @command="handleCommand($event,item)" trigger="click" class="hoverBlue">
+                         <i class="el-icon-more"></i>
+                         <el-dropdown-menu slot="dropdown">
+                            <el-dropdown-item :command="1" v-if="item.can_stop==1">暂停任务</el-dropdown-item>
+                            <el-dropdown-item :command="2" v-if="item.can_cancel==1">取消任务</el-dropdown-item>
+                            <el-dropdown-item :command="3" v-if="item.can_finish==1">完成任务</el-dropdown-item>
+                            <el-dropdown-item :command="4" v-if="item.can_reset==1">重置任务</el-dropdown-item>
+                            <el-dropdown-item :command="5" v-if="isShowBinding&&item.can_edit_normal==1">取消关联</el-dropdown-item>
+                          </el-dropdown-menu>
+                        </el-dropdown>
+                      </template> -->
+                      <div  style="width: 20px;height: 20px;margin-left: 30px;"></div>
+                    </template>
+                    <!-- 已结束 -->
+                    <template v-if="isSimpleShow==3">
+                        <div class="flex-1 clamp2 hoverBlue" @click.prevent.stop="openDetail(item)">
+                          <Tooltip :preHtml="item.name"><span>{{item.name}}</span></Tooltip>
+                        </div>
+                        <div class="hover-border2" v-if="item.composite_state==2||item.composite_state==3">
+                          <span v-if="item.day>0">剩余<span class="green">{{item.day}}</span>天</span>
+                          <span v-if="item.day<0">过期<span class="red">{{Math.abs(item.day)}}</span>天</span>
+                        </div>
+                    </template>
                   </div>
+                 <template v-if="isParent">
+                    <TaskItem v-if="item.statistics.plan_total>0" :isShowBinding="false" :isShow="item.isShow" :isParent="isParent" :taskId="item.id"  :isSimpleShow="isSimpleShow"  @confirm="openDetail"></TaskItem>
+                  </template>
+                  <template v-else>
+                    <TaskItem v-if="item.child&&item.child.length>0" :isShowBinding="false" :isShow="item.isShow" :list="item.child" :isSimpleShow="isSimpleShow"  @confirm="openDetail"></TaskItem>
+                  </template>
+                </div>
+              </template>
+              <div v-else>
+                <template v-if="isParent&&projects.length==0">
+                  <div class="zhu"></div>
+                  <div class="zhu"></div>
+                </template>
+                <template v-else>
+                  <div class="orange" v-if="projects.length==0&&parentList.length==0" style="margin-bottom: 8px;font-size: 13px;">用“项目/任务”推动目标达成,合理规划安排工作</div>
+                </template>
+
+              </div>
+            </div>
         </div>
       </CollapseTransition>
 
@@ -187,11 +189,17 @@ export default {
         default: function(){
           return []
         }
-     },
-     isShowChild:{ //项目的详情任务有用到
+      },
+      projectsList:{
+        type:Array,
+        default: function(){
+          return []
+        }
+      },
+      isShowChild:{ //项目的详情任务有用到
        type: Boolean,
        default: false,
-     }
+      }
   },
   data() {
     return {
@@ -283,6 +291,7 @@ export default {
             item.isShow=false;
           })
           this.parentList=list;
+          this.projects=this.projectsList
         }
       }
     },
@@ -294,13 +303,13 @@ export default {
   },
   methods: {
     customColorMethod(index) {
-      if (index ==1) {
+      // if (index ==1) {
         return '#2879ff';
-      } else if (index ==2) {
-        return '#FF9600';
-      } else {
-        return '#F16060';
-      }
+      // } else if (index ==2) {
+      //   return '#FF9600';
+      // } else {
+      //   return '#F16060';
+      // }
     },
     closeDetail(){
       this.$emit('confirm',{});
@@ -410,6 +419,9 @@ export default {
           }
       })
     },
+    openDetail2(item){
+       this.$router.push({path:'/projectDetail',query:{id:item.id}})
+    },
     openDetail(item){
       if(!item.id){
         return false

+ 8 - 1
src/okr/views/okrIndex.vue

@@ -129,11 +129,18 @@ export default {
          { label: '项目管理', children: this.returnRoutersArr('project'), icon: '#icon-xiangmu',isShow:true },
       ];
       routers[1].children.forEach(item=>{
-        if(item.label=='我的上级'||item.label=='我的部门'){
+        if(item.label=='我的上级'){
           if(is_okr_manager){
             item.meta.isHide=true;
           }
         }
+        if(item.label=='我的部门'){
+          if(is_okr_manager||this.userInfo.employee_detail.dept_list.length==0){
+            item.meta.isHide=true;
+          }
+        }
+
+
         if(item.label=='我的下级'){
           if(!is_okr_manager&&!dept_manager){
             item.meta.isHide=true;

+ 51 - 13
src/okr/views/planTask/work.vue

@@ -27,9 +27,16 @@
                     <div class="flex-1 fontColorC" style="padding-right: 30px;">
                       <span class="clamp2"  @click.stop="openDetail(item,2)">{{item.name}}</span>
                     </div>
-                    <div class="blue cursor" v-if="item.can_edit" @click.stop="ActiveAddTask(item,1)" style="font-size: 12px;">+ 新建</div>
+                     <!-- @click.stop="ActiveAddTask(item,1)" -->
+                    <el-dropdown @command="handleCommandTask($event,item,1)">
+                      <div class="blue cursor" v-if="item.can_edit" style="font-size: 12px;">+ 添加</div>
+                      <el-dropdown-menu slot="dropdown">
+                        <el-dropdown-item command="a">添加任务</el-dropdown-item>
+                        <el-dropdown-item command="b">添加项目</el-dropdown-item>
+                      </el-dropdown-menu>
+                    </el-dropdown>
                   </div>
-                  <TaskItem :isShow="item.isShow" :list="item.plans"  style="padding-left: 20px;" :isSimpleShow="3" @confirm="updatePage"></TaskItem>
+                  <TaskItem :isShow="item.isShow" :list="item.plans" :projectsList="item.projects" style="padding-left: 20px;" :isSimpleShow="3" @confirm="updatePage"></TaskItem>
               </div>
             </div>
 
@@ -94,9 +101,16 @@
                     <div class="flex-1 fontColorC" style="padding-right: 30px;">
                       <span class="clamp2" @click.stop="openDetail(item,2)">{{item.name}}</span>
                     </div>
-                    <div class="blue cursor" v-if="item.can_edit" @click.stop="ActiveAddTask(item,2)"  style="font-size: 12px;">+ 新建</div>
+                    <el-dropdown @command="handleCommandTask($event,item,2)">
+                      <div class="blue cursor" v-if="item.can_edit" style="font-size: 12px;">+ 添加</div>
+                      <el-dropdown-menu slot="dropdown">
+                        <el-dropdown-item command="a">添加任务</el-dropdown-item>
+                        <el-dropdown-item command="b">添加项目</el-dropdown-item>
+                      </el-dropdown-menu>
+                    </el-dropdown>
+                    <!-- <div class="blue cursor" v-if="item.can_edit" @click.stop="ActiveAddTask(item,2)"  style="font-size: 12px;">+ 新建</div> -->
                   </div>
-                  <TaskItem :isShow="item.isShow" :list="item.plans"  style="padding-left: 20px;" :isSimpleShow="3" @confirm="updatePage"></TaskItem>
+                  <TaskItem :isShow="item.isShow" :list="item.plans" :projectsList="item.projects"  style="padding-left: 20px;" :isSimpleShow="3" @confirm="updatePage"></TaskItem>
               </div>
             </div>
           </div>
@@ -163,6 +177,9 @@
 
       <!-- 目标详情 -->
     <TargetDetail :type="showDetailType" :id="showDetailId" v-if="isShowTargetDetail" :showDrawer.sync="isShowTargetDetail" @confirm="updatePage"></TargetDetail>
+
+    <!-- 添加项目 -->
+    <AddProject :visible.sync="isShowProjectAdd" :kr_id="selectKrItem.id" @confirm="updateTask"></AddProject>
   </div>
 </template>
 
@@ -172,10 +189,11 @@ import AddTask from '@/okr/components/public/AddTask'; //添加任务
 import TargetSearch from '@/okr/components/public/TargetSearch'; //添加任务
 import TargetDetail from '@/okr/components/public/TargetDetail'; //目标详情
 import Tooltip from '@/components/Tooltip'; //鼠标悬浮显示文字
+import AddProject from '@/okr/components/project/AddProject'; //
 import {getOperation} from '@/okr/utils/auth';
 export default {
   name: 'work',
-  components: {TaskItem,AddTask,TargetDetail,TargetSearch,Tooltip},
+  components: {TaskItem,AddTask,TargetDetail,TargetSearch,Tooltip,AddProject},
   data() {
     return {
       o_detail:{userInfo:{},krs:[],process:0},
@@ -193,6 +211,9 @@ export default {
       processList:[],
       process:[],
       initDate:[],
+
+      // 项目
+      isShowProjectAdd:false,
     };
   },
   watch:{
@@ -209,14 +230,22 @@ export default {
     }
   },
   methods: {
-    openDetail(item,type){
-      this.showDetailType=type;//打开详情的类型
-      this.o_id=type==2?item.o_id:item.id;
-      this.showDetailId=item.id;//打开详情的ID
-      this.isShowTargetDetail=true;
-    },
-    updateTask(){
-      this.addTaskIndex==1? this.getKrList():this.getKrList2()
+    handleCommandTask(name,item,index){
+      this.addTaskIndex=index;
+      this.selectKrItem=item;
+      switch(name){
+        case 'a'://添加任务
+            if(index==1){
+              this.initDate=this.week_time;
+            }else{
+              this.initDate=this.week_time2;
+            }
+            this.isShowAddTask=true;
+            break
+        case 'b'://添加项目
+            this.isShowProjectAdd=true;
+            break
+      }
     },
     ActiveAddTask(item,index){
       this.addTaskIndex=index;
@@ -228,6 +257,15 @@ export default {
       this.selectKrItem=item;
       this.isShowAddTask=true;
     },
+    openDetail(item,type){
+      this.showDetailType=type;//打开详情的类型
+      this.o_id=type==2?item.o_id:item.id;
+      this.showDetailId=item.id;//打开详情的ID
+      this.isShowTargetDetail=true;
+    },
+    updateTask(){
+      this.addTaskIndex==1? this.getKrList():this.getKrList2()
+    },
     updatePage(){
       this.getProcess();
       this.getKrList();

+ 10 - 6
src/okr/views/project/myProject.vue

@@ -47,11 +47,12 @@
               <div class="flex-box-ce span-item" style="margin-left: 20px;">
                 <span :class="idText=='owner_id'? 'spanActive':''" @click="idText='owner_id'">Ta负责的</span>
                 <span :class="idText=='joiner_id'? 'spanActive':''" @click="idText='joiner_id'">Ta参与的</span>
+                <span :class="idText=='publisher_id'? 'spanActive':''" @click="idText='publisher_id'">Ta创建的</span>
               </div>
             </template>
           </div>
           <div class="flex-box-ce">
-            <el-button type="primary" size="small" round style="margin-right: 10px;" @click="isShowAdd=true" v-if="myTargertType==1">创建目</el-button>
+            <el-button type="primary" size="small" round style="margin-right: 10px;" @click="isShowAdd=true" v-if="myTargertType==1">创建目</el-button>
             <el-input @input="keyinput" class="input" maxlength="20" prefix-icon="el-icon-search" style="width: 206px;" size="small" v-model="formData.keyword" clearable placeholder="请输入关键字" />
             <el-select class="select" size="small" v-model="formData.composite_state" placeholder="类型" style="width: 100px;">
               <el-option v-for="item in statusArr" :key="item.value" :label="item.label"  :value="item.value"></el-option>
@@ -83,7 +84,7 @@
                           <span v-if="item.day==0" class="green">剩余1天</span>
                           <span v-if="item.day<0" class="red">逾期{{Math.abs(item.day)}}天</span>
                         </template>
-                        <Progress :inputStyle="{ height: '14px', width: '140px', lineHeight: '14px' }" :status="item.composite_state==3? 3:2" :value="Number(item.process)" style="margin-left: 10px;"></Progress>
+                        <Progress :inputStyle="{ height: '14px', width: '140px', lineHeight: '14px' }" :status="item.composite_state==3? 3:1" :value="Number(item.process)" style="margin-left: 10px;"></Progress>
                       </div>
                     </div>
               </div>
@@ -180,7 +181,7 @@
     },
     methods: {
       get_employee_list() {
-        this.$axiosUser('get', '/api/pro/employee/list', { dept_id: this.dept_id }, 'v2').then(res => {
+        this.$axiosUser('get', '/api/pro/employee/list', { dept_id: this.dept_id,page:1,page_size:1000,include_sub:0},'v2').then(res => {
           this.employeeOptions = res.data.data.list;
           if(this.employeeOptions.length>0){
             this.ownerUserInfo=this.employeeOptions[0];
@@ -234,6 +235,9 @@
           if(this.idText=='joiner_id'){
             data.joiner_id=this.ownerUserInfo.id;
           }
+          if(this.idText=='publisher_id'){
+            data.publisher_id=this.ownerUserInfo.id;
+          }
         }
 
 
@@ -296,10 +300,10 @@
       }
     },
     mounted() {
-      this.getProjectList();
+      if(this.myTargertType==1){
+        this.getProjectList();
+      }
     },
-
-
   };
 </script>
 <style scoped lang="scss">

+ 121 - 109
src/okr/views/project/projectDetail.vue

@@ -1,126 +1,129 @@
 <template>
     <div class="br-5 all">
       <PageHead phName="项目详情"></PageHead>
-      <header>
-        <div class="flex-box-ce">
-          <svg-icon icon-class="#icon-wenjianjia" class="svgIcon blue" style="width: 1.6rem;height: 1.6rem;"></svg-icon>
-          <!-- <ProjectInputBox :value="detailData.name" :project_id="projectId" @confirm="getProjectDateil()"></ProjectInputBox> -->
-          <div style="border-radius: 5px;font-size: 18px;font-weight: 550;padding: 0 10px;color: #141c28 !important;}">{{detailData.name}}</div>
-          <div class="flex-box-ce cursor progress-box" :class="detailData.composite_state!=3?'blue-text':'red-text'" @click="openProjectQx(1)">
-              <el-progress :color="customColor" type="circle" :percentage="Number(detailData.process)" :show-text="false" :width="16" :stroke-width="3"></el-progress>
-              <span style="padding-left: 3px;">{{detailData.process}}%</span>
-          </div>
-          <div class="flex-1"></div>
-          <div class="flex-box-ce" style="flex-shrink: 0;width: 126px;margin-left:20px">
-            <div class="flex-box-ce icon-box cursor" style="margin-right: 30px;" @click="openProjectQx(2)">
-              <svg-icon icon-class="#icon-liaotian" class="svgIcon" style="width: 1.3rem;height: 1.3rem;"></svg-icon>
-              <span>沟通</span>
+      <template v-if="detailData.visible">
+        <header>
+          <div class="flex-box-ce">
+            <svg-icon icon-class="#icon-wenjianjia" class="svgIcon blue" style="width: 1.6rem;height: 1.6rem;"></svg-icon>
+            <!-- <ProjectInputBox :value="detailData.name" :project_id="projectId" @confirm="getProjectDateil()"></ProjectInputBox> -->
+            <div style="border-radius: 5px;font-size: 18px;font-weight: 550;padding: 0 10px;color: #141c28 !important;}">{{detailData.name}}</div>
+            <div class="flex-box-ce cursor progress-box" :class="detailData.composite_state!=3?'blue-text':'red-text'" @click="openProjectQx(1)">
+                <el-progress :color="customColor" type="circle" :percentage="Number(detailData.process)" :show-text="false" :width="16" :stroke-width="3"></el-progress>
+                <span style="padding-left: 3px;">{{detailData.process}}%</span>
             </div>
-            <div class="flex-box-ce icon-box2 cursor" @click="openProjectQx(3)">
-              <i class="el-icon-delete" style="font-size: 1.1rem;"></i>
-              <span>删除</span>
+            <div class="flex-1"></div>
+            <div class="flex-box-ce" style="flex-shrink: 0;width: 126px;margin-left:20px">
+              <div class="flex-box-ce icon-box cursor" style="margin-right: 30px;" @click="openProjectQx(2)">
+                <svg-icon icon-class="#icon-liaotian" class="svgIcon" style="width: 1.3rem;height: 1.3rem;"></svg-icon>
+                <span>沟通</span>
+              </div>
+              <div class="flex-box-ce icon-box2 cursor" @click="openProjectQx(3)" v-if="isReturnPJ">
+                <i class="el-icon-delete" style="font-size: 1.1rem;"></i>
+                <span>删除</span>
+              </div>
             </div>
           </div>
-        </div>
-        <div class="flex-box-ce" style="margin-top: 10px;">
-            <span class="flex-box-ce fontColorC">
-              <svg-icon icon-class="#icon-biaoqian_wode" class="svgIcon" style="width: 1rem;height: 1rem;"></svg-icon>
-              <span>&nbsp;{{$getEmployeeMapItem(detailData.owner_id).name}}</span>
-            </span>
-            <span class="flex-box-ce fontColorC" style="margin-left: 30px;">
-              <i class="el-icon-date"></i>
-              <span>{{detailData.start_date}}~{{detailData.end_date}}</span>
-              <span v-if="detailData.day>0">(剩余<span class="green">{{detailData.day}}</span>天)</span>
-              <span v-if="detailData.day==0">(剩余<span class="green">1</span>天)</span>
-              <span v-if="detailData.day<0">(逾期<span class="red">{{Math.abs(detailData.day)}}</span>天)</span>
-            </span>
-        </div>
-      </header>
-      <div class="content">
-        <div class="flex-box-ce" style="background-color: #fff;box-shadow: 0 10px 10px #F3F5F8;margin: 0 -20px;padding: 0 10px;margin-top: 10px;">
-          <div class="tabs-item" :class="tabsIndex == item.code ? 'tabs-item-active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabAction(item)">
-            {{ item.name }}
+          <div class="flex-box-ce" style="margin-top: 10px;">
+              <span class="flex-box-ce fontColorC">
+                <svg-icon icon-class="#icon-biaoqian_wode" class="svgIcon" style="width: 1rem;height: 1rem;"></svg-icon>
+                <span>&nbsp;{{$getEmployeeMapItem(detailData.owner_id).name}}</span>
+              </span>
+              <span class="flex-box-ce fontColorC" style="margin-left: 30px;">
+                <i class="el-icon-date"></i>
+                <span>{{detailData.start_date}}~{{detailData.end_date}}</span>
+                <template v-if="detailData.composite_state==3">
+                  <span v-if="detailData.day<0">&nbsp;(逾期<span class="red">{{Math.abs(detailData.day)}}</span>天)</span>
+                </template>
+                <template v-else>
+                  <span v-if="detailData.day==0"><span class="yellow">&nbsp;今日到期</span></span>
+                  <span v-else-if="detailData.day>0&&detailData.day<=30">&nbsp;(剩余<span class="green">{{detailData.day}}</span>天)</span>
+                </template>
+              </span>
           </div>
-        </div>
-        <div class="main-main">
-          <!-- 任务 -->
-          <template v-if="tabsIndex==1">
-              <div v-loading="loading">
-                <div class="flex-box-ce flex-d-center" style="margin: 20px 0;">
-                  <div class="flex-box-ce">
-                    <el-select class="select2" size="small" v-model="taskForm.composite_states" placeholder="状态">
-                      <el-option :key="0" label="全部" :value="0"></el-option>
-                      <el-option v-for="item in taskStatus" :key="item.value" :label="item.name" :value="item.value"></el-option>
-                    </el-select>
-                    <el-select class="select2" size="small" v-model="taskForm.sort" placeholder="排序">
-                      <el-option :key="0" label="默认排序" :value="0"></el-option>
-                      <el-option :key="1" label="创建时间" :value="1"></el-option>
-                      <el-option :key="2" label="开始时间" :value="2"></el-option>
-                      <el-option :key="3" label="结束时间" :value="3"></el-option>
-                    </el-select>
-                    <el-select class="select2"  collapse-tags filterable size="small" v-model="taskForm.owner_ids" clearable placeholder="人员">
-                      <el-option  v-for="item in employeeMap" :key="item.id" :label="item.name" :value="item.id"></el-option>
-                    </el-select>
-                    <el-input prefix-icon="el-icon-search" class="input"  style="width: 200px;" size="small" v-model="keyword" clearable placeholder="请输入任务关键字" />
+        </header>
+        <div class="content">
+          <div class="flex-box-ce" style="background-color: #fff;box-shadow: 0 10px 10px #F3F5F8;margin: 0 -20px;padding: 0 10px;margin-top: 10px;">
+            <div class="tabs-item" :class="tabsIndex == item.code ? 'tabs-item-active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabAction(item)">
+              {{ item.name }}
+            </div>
+          </div>
+          <div class="main-main">
+            <!-- 任务 -->
+            <template v-if="tabsIndex==1">
+                <div v-loading="loading" class="scroll-bar" style="height: calc(100vh - 260px);box-sizing: border-box;overflow-y: scroll;">
+                  <div class="flex-box-ce flex-d-center" style="margin: 20px 0;">
+                    <div class="flex-box-ce">
+                      <el-select class="select2" size="small" v-model="taskForm.composite_states" placeholder="状态">
+                        <el-option :key="0" label="全部" :value="0"></el-option>
+                        <el-option v-for="item in taskStatus" :key="item.value" :label="item.name" :value="item.value"></el-option>
+                      </el-select>
+                      <el-select class="select2" size="small" v-model="taskForm.sort" placeholder="排序">
+                        <el-option :key="0" label="默认排序" :value="0"></el-option>
+                        <el-option :key="1" label="创建时间" :value="1"></el-option>
+                        <el-option :key="2" label="开始时间" :value="2"></el-option>
+                        <el-option :key="3" label="结束时间" :value="3"></el-option>
+                      </el-select>
+                      <el-select class="select2"  collapse-tags filterable size="small" v-model="taskForm.owner_ids" clearable placeholder="人员">
+                        <el-option  v-for="item in employeeMap" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                      </el-select>
+                      <el-input prefix-icon="el-icon-search" class="input"  style="width: 200px;" size="small" v-model="keyword" clearable placeholder="请输入任务关键字" />
+                    </div>
+                    <div class="add-task" @click="isShowAddTask=true" v-if="isPstake">+ 添加任务</div>
                   </div>
-                  <div class="add-task" @click="isShowAddTask=true" v-if="isPstake">+ 添加任务</div>
-                </div>
-
-                <template v-if="taskList.length>0">
-                <!-- @confirm="getPastTask" -->
-                  <TaskItem isParent isShowChild :isShow="taskShow" :list="taskList" :isSimpleShow="2" ></TaskItem>
-                </template>
-                <!-- <PlanTaskItem :list="taskList" :isShowTarget="true" style="padding-left: 0;" @confirm="getPastTask(true)"></PlanTaskItem> -->
-
-                <div class="dotted-line" v-if="taskList.length==0">
-                   <div>暂无数据</div>
+                  <div v-if="taskList.length>0" class="scroll-bar">
+                    <TaskItem isParent isShowChild :isShow="taskShow" :list="taskList" :isSimpleShow="2" @confirm="updateTaskList"></TaskItem>
+                  </div>
+                  <div class="dotted-line" v-if="taskList.length==0"><div>暂无数据</div></div>
+                  <el-pagination style="text-align: center;margin-top: 20px;" :current-page.sync="page"  layout="total,prev,pager,next" :total="total" @size-change="handleSizeChange"  @current-change="handleCurrentChange" :page-size="page_size"></el-pagination>
                 </div>
-                <el-pagination style="text-align: center;margin-top: 20px;" :current-page.sync="page" :page-sizes="[10, 20, 50, 100]"  layout="total,prev,pager,next,sizes" :total="total" @size-change="handleSizeChange"  @current-change="handleCurrentChange" :page-size="page_size"></el-pagination>
-              </div>
-          </template>
+            </template>
 
-          <!-- 里程碑 -->
-          <template v-if="tabsIndex==2">
-              <Milestone :isReturnPJ="isReturnPJ" :isPstake="isPstake"></Milestone>
-          </template>
+            <!-- 里程碑 -->
+            <template v-if="tabsIndex==2">
+                <Milestone :isReturnPJ="isReturnPJ" :progressData="progressData" :isPstake="isPstake"></Milestone>
+            </template>
 
-          <!-- 看板 -->
-          <template v-if="tabsIndex==3">
-              <KanMilestone :isReturnPJ="isReturnPJ" :isPstake="isPstake"></KanMilestone>
-          </template>
+            <!-- 看板 -->
+            <template v-if="tabsIndex==3">
+                <KanMilestone :isReturnPJ="isReturnPJ" :isPstake="isPstake"></KanMilestone>
+            </template>
 
-          <!-- 甘特图 -->
-          <template v-if="tabsIndex==4">
-              <Dhtmlx :isReturnPJ="isReturnPJ" :isPstake="isPstake"></Dhtmlx>
-          </template>
+            <!-- 甘特图 -->
+            <template v-if="tabsIndex==4">
+                <Dhtmlx :isReturnPJ="isReturnPJ" :isPstake="isPstake"></Dhtmlx>
+            </template>
 
-          <!-- 统计 -->
-          <template v-if="tabsIndex==5">
-              <ProjectTj :isReturnPJ="isReturnPJ" :isPstake="isPstake"></ProjectTj>
-          </template>
+            <!-- 统计 -->
+            <template v-if="tabsIndex==5">
+                <ProjectTj :isReturnPJ="isReturnPJ" :isPstake="isPstake"></ProjectTj>
+            </template>
 
-          <!-- 沟通 -->
-          <template v-if="tabsIndex==6">
-              <Interaction ref="Interaction" style="margin-top: 30px;" v-if="tabsIndex==6" :isOperation="isPstake" :target_id="projectId" :target_type="4"></Interaction>
-          </template>
+            <!-- 沟通 -->
+            <template v-if="tabsIndex==6">
+                <Interaction ref="Interaction" style="margin-top: 30px;" v-if="tabsIndex==6" :target_id="projectId" :target_type="4"></Interaction>
+            </template>
 
-          <!-- 预览 -->
-          <template v-if="tabsIndex==7">
-              <ProjectPreview></ProjectPreview>
-          </template>
+            <!-- 预览 -->
+            <template v-if="tabsIndex==7">
+                <ProjectPreview></ProjectPreview>
+            </template>
+          </div>
         </div>
-      </div>
-
+      </template>
+      <template v-else>
+        <div style="text-align:center;font-size:16px;height: 400px;padding-top:200px;" class="fontColorC">暂无查看权限</div>
+      </template>
       <!--添加任务 -->
       <AddTask  :visible.sync="isShowAddTask" :target_type="4" :id="projectId" :initDate="initDateVal" @confirm="getPastTask()"></AddTask>
 
       <!-- 删除目标 -->
       <el-dialog title="确认删除此项目吗?" :visible.sync="isShowDeleteProject" :append-to-body="true" width="500px">
-        <div style="padding: 10px;">
-           <el-radio-group v-model="radio">
+       <div>
+         删除当前项目,但不删除项目内的相关任务(请联系相关人员自行清理)
+<!--           <el-radio-group v-model="radio">
              <div style="margin-bottom: 16px;"><el-radio :label="1">不删除项目下的任务</el-radio></div>
              <div><el-radio :label="2">同时删除项目下的所有任务</el-radio></div>
-          </el-radio-group>
+          </el-radio-group> -->
         </div>
         <div class="flex-box-end" style="margin-top: 50px;">
         	<el-button @click="isShowDeleteProject=false">取消</el-button>
@@ -164,7 +167,7 @@
           { name: '甘特图', code: 4 },
           { name: '统计', code: 5 },
           { name: '沟通', code: 6 },
-          { name: '览', code: 7 }
+          { name: '览', code: 7 }
         ],
         taskForm:{composite_states:0,sort:3,owner_ids:''},
         taskStatus:taskStatus(),
@@ -216,7 +219,6 @@
     },
     created() {
         if(this.$route.query.id){
-
           this.projectId=Number(this.$route.query.id);
           this.getProjectDateil();
           this.$nextTick(()=>{
@@ -225,8 +227,11 @@
         }
     },
     methods:{
+      updateTaskList(){
+         this.getPastTask();
+      },
       openProjectQx(index){
-        if(!this.isReturnPJ){
+        if(index!=2&&!this.isReturnPJ){
           this.$message.error("暂无权限")
           return false
         }
@@ -241,7 +246,10 @@
       openGt(){
         this.tabsIndex=6;
         this.$nextTick(()=>{
-          this.$refs.Interaction.isShowCommunication=true;
+          setTimeout(()=>{
+            this.$refs.Interaction.isShowCommunication=true;
+          },500)
+
         })
       },
       getProjectDateil(){
@@ -253,7 +261,7 @@
               // 进度
               data.process_conf.process=data.process;
               data.process_conf.id=this.projectId;
-              this.initDateVal=[data.start_date,data.end_date];
+              // this.initDateVal=[data.start_date,data.end_date];
               this.progressData=data.process_conf;
               this.detailData=data;
               this.isReturnPJ=isReturnPJ(data);
@@ -306,9 +314,13 @@
              item.day=this.$moment(item.end_date).diff(this.$moment().format('YYYY-MM-DD'), 'day')
           })
           this.taskList=list;
-          this.$nextTick(()=>{
-            this.taskShow=true;
-          })
+          setTimeout(()=>{
+            if(list.length>0){
+              this.taskShow=true;
+            }
+          },0)
+
+
         }).finally(()=>{
            this.loading = false;
         })
@@ -407,7 +419,7 @@
     border-radius: 0px;
   }
   .add-task {
-    width: 120px;
+    width: 100px;
     text-align: center;
     color: #fff;
     background-color: #409EFF;

+ 1 - 1
src/okr/views/targetAnalyse/taskTj.vue

@@ -68,7 +68,7 @@
           <el-option :key="0" label="全部状态" :value="0"></el-option>
           <el-option v-for="item in taskStatus" :key="item.value" :label="item.name" :value="item.value"></el-option>
         </el-select>
-        <el-input class="input" prefix-icon="el-icon-search" style="width: 206px;" size="small" v-model="plan_name" clearable placeholder="任务内容检索" />
+        <el-input class="input" prefix-icon="el-icon-search" style="width: 206px;" size="small" v-model="plan_name" clearable placeholder="任务名称搜索" />
         <el-button type="primary" size="small" @click="exportExcel()">导出全部</el-button>
       </div>
       <div style="margin: 20px 0;">

+ 4 - 3
src/okr/views/targetMt/myTargert.vue

@@ -201,7 +201,7 @@
                           <div v-show="item.isShow" style="padding-left: 30px;position: relative;left: -30px;width: calc(100% + 30px);">
                             <div class="fontColorC" v-for="(krItem,index2) in item.krs" :key="krItem.id">
                                 <div class="flex-box-ce kr-item">
-                                  <i v-if="krItem.statistics.plan_total>0" class="caret" :class="krItem.isShow? 'el-icon-caret-bottom':'el-icon-caret-right'" @click="showTask(krItem)"></i>
+                                  <i v-if="krItem.statistics.plan_total>0||krItem.statistics.project_total>0" class="caret" :class="krItem.isShow? 'el-icon-caret-bottom':'el-icon-caret-right'" @click="showTask(krItem)"></i>
                                   <span class="okr-index cursor" @click="openDetail(krItem,2)">KR{{index2+1}}</span>
                                   <div class="flex-1" style="padding-right: 30px;" >
                                     <InputBox :can_edit="krItem.can_edit" @confirm="getTargetDateil(item.id)" :parameter='{id:krItem.id,type:2}' :value="krItem.name"><span class="clamp2 hoverBlue" @click="openDetail(krItem,2)">{{krItem.name}}</span></InputBox>
@@ -383,7 +383,7 @@
             </template>
             <template v-if="myTargertType==1||myTargertType==3||myTargertType==4">
               <div style="text-align: center;margin: 30PX 0;line-height: 30px;">未找到相关的目标<br/></div>
-              <el-button type="primary" round style="width: 150px;" v-if="idText!='myAttention'" @click="isShowAdd=true">创建目标</el-button>
+              <el-button type="primary" round style="width: 150px;" v-if="idText=='owner_id'" @click="isShowAdd=true">创建目标</el-button>
             </template>
             <template v-if="myTargertType==5||myTargertType==6||myTargertType==7">
               <template v-if="userList.length==0">
@@ -923,7 +923,8 @@ export default {
     // 关联项目
     confirmProject(item){
         this.$axiosUser('post', '/api/pro/okr/project/bind',{project_id:item.item.id,kr_id:this.selectKrItem.id}).then(res => {
-             this.getTargetDateil(this.selectKrItem.o_id,true);
+          this.$message.success("已关联")
+          this.getTargetDateil(this.selectKrItem.o_id,true);
         });
     },
     //添加项目

+ 1 - 1
src/okr/views/targetMt/okrInform.vue

@@ -21,7 +21,7 @@
         <div v-if="messageList.length > 0" v-loading="loading">
           <div class="flex-box-ce item" v-for="(item, index) in messageList" :key="index" @click="openDetail(item)">
             <div class="flex-1 font-flex-word content" v-if="selectIndex == 0">{{ item.content }}</div>
-            <div class="flex-1 font-flex-word content" v-else>{{ item.target_type == 1 ? '目标' : item.target_type == 2 ? 'KR' : '任务' }}“{{ item.title }}”,有人提到了你</div>
+            <div class="flex-1 font-flex-word content" v-else>{{ item.target_type == 1 ? '目标' : item.target_type == 2 ? 'KR' : item.target_type == 3 ? '任务':  item.target_type == 4 ? '项目':'里程碑' }}“{{ item.title }}”,有人提到了你</div>
 
             <div class="fontColorB">
               {{ item.update_time }}

+ 1 - 1
src/okr/views/targetMt/replay.vue

@@ -227,7 +227,7 @@ export default {
     },
     confirmAdd(val) {
       if(!this.form.target_id){
-        this.$message.error('请选择指定O/Kr');
+        this.$message.error('请选择指定O/KR');
         return false
       }
       if(!this.form.summary){

+ 13 - 0
src/performance/components/equation/LogicEnum.vue

@@ -99,6 +99,19 @@ export default {
     dataArr(val) {
       if (val.length > 0) {
         this.logic_enum = val;
+      }else{
+        this.logic_enum=[
+          {
+            referStr: '',
+            selectRefer: 0,
+            point: [] //得分
+          },
+          {
+            referStr: '',
+            selectRefer: 0,
+            point: [] //得分
+          }
+        ];
       }
     }
   },

+ 22 - 0
src/performance/components/equation/LogicPercent.vue

@@ -99,6 +99,28 @@ export default {
     dataArr(val){
       if(val.length>0){
         this.logic_percent=val;
+      }else{
+        this.logic_percent=[
+          {
+            plusNum: '',
+            point: [] ,//得分
+            selectVal:'1',
+            numVal:'',
+            maxNum:'',
+          },
+          {
+            plusNum: '',
+            point: [] ,//得分
+            selectVal:'2',
+            numVal:'',
+            maxNum:'',
+          },
+          {
+            plusNum: '',
+            selectVal:'1',
+          }
+        ];
+
       }
     }
   },

+ 21 - 0
src/performance/components/equation/LogicSection.vue

@@ -109,6 +109,27 @@ export default {
     dataArr(val){
       if(val.length>0){
         this.logic_section=val;
+      }else{
+        this.logic_section=[
+            {
+              refer: '', //参照值
+              symbol: '', //符号
+              symbolArr: [{ value: '>', label: '>=' }, { value: '≥', label: '>' }], //
+              referStr: '',
+              slectSymbol:'',
+              selectRefer:0,
+              point: [] //得分
+            },
+            {
+              refer: '', //参照值
+              symbol: '', //符号
+              symbolArr: [{ value: '>', label: '>=' }, { value: '≥', label: '>' }], //
+              referStr: '',
+              slectSymbol:'',
+              selectRefer:0,
+              point: [] //得分
+            }
+        ];
       }
     }
   },

+ 4 - 2
src/performance/views/statement/statistics.vue

@@ -28,9 +28,11 @@
           <el-option v-for="item in employees" :key="item.id" :label="item.name" :value="item.id"></el-option>
         </el-select>
       </div>
-      <el-button icon="el-icon-s-promotion" type="primary" @click="downloadTemplate">导出报表</el-button>
     </header>
-     <div class="orange">仅支持月度考核的对比</div>
+    <div class="flex-box-ce">
+      <el-button icon="el-icon-s-promotion" type="primary" @click="downloadTemplate">导出报表</el-button>
+      <div class="orange" style="margin-left: 20px;">仅支持月度考核的对比</div>
+    </div>
     <aside v-loading="tableDataLoad">
       <el-table :data="tableData" style="width: 100%">
         <el-table-column prop="employee_name" label="姓名">

+ 1 - 1
src/point/views/setting/fixed_integral.vue

@@ -2,7 +2,7 @@
   <div>
     <el-row>
       <el-col :span="24">
-        <el-alert class="diy-tip" title="什么是固定积分?" type="success" description show-icon>
+        <el-alert class="diy-tip" title="什么是自动积分?" type="success" description show-icon>
           <p>系统按照设定的时间(每月/每周/每日) 自动给员工添加的积分,比如某员工有一个工程师证,得到公司的认可,公司就会每月给他加分<span class="blue cursor" style="padding-left: 20px;" @click="$openUrl(2)">如何设置自动积分?</span></p>
           <p>每个周期开始自动加分,超过加分时间点将顺延到下一个周期加分,请提前设置加分项。如每月1号自动加分,10号才设置加分项,需等到次月1号才会自动加分</p>
         </el-alert>

+ 1 - 1
src/point/views/setting/set_basics.vue

@@ -52,7 +52,7 @@
               <template slot="label">
                 <span>积分审批</span>
                 <el-tooltip placement="top">
-                  <div slot="content" style="width: 300px">勾选后开启。开启后,管理者奖扣积分、审批积分时只要按照公司已有的积分规则制度去打分,一律不受权限分的限制</div>
+                  <div slot="content" style="width: 300px">勾选开启后,根据积分规则制度的奖扣积分、审批积分,均不受权限分限制,可直接提交通过</div>
                   <span class="tips">?</span>
                 </el-tooltip>
               </template>

+ 1 - 1
src/point/views/statistics/balanceA.vue

@@ -4,7 +4,7 @@
       <p>A分余额在线下兑换/使用过后,由管理员手动结算清零;</p>
       <p>清零操作为全员批量清除,请谨慎操作!</p>
       <p>每次清零将清空指定月份之前的余额(不含指定月份),不可清空未结束月份的余额:</p>
-      <p>例如当前是2020年7月8号,指定选择2020年7月份,可清空2020年7月1号之前所有余额,不清除7月1-8号的余额。</p>
+      <p>例如今日是2020年7月8号,指定选择2020年7月份,可清空2020年7月1号之前所有余额,不清除7月1-8号的余额。</p>
     </el-alert>
 
     <div class="box boxMinHeight">

+ 1 - 1
src/point/views/statistics/dept_rank.vue

@@ -5,7 +5,7 @@
         <p><b>阶段排名可通过月、季、年 3个时间段,利用不同的部门范围和积分筛选条件,从各个维度作积分对比和评优</b></p>
         <li class="headLi">阶段排名包含申请、奖扣、任务、审批、考勤、管理者奖扣目标、自动积分等来源的积分</li>
         <li class="headLi">阶段排名不包含基础分和工龄分</li>
-        <li class="headLi">导出时,额外支持自定义时间段排名、自动积分排名的导出(考勤相关排名请到【考勤】-【考勤分排名】导出)</li>
+        <li class="headLi">导出时,额外支持自定义时间段排名、自动积分排名的导出(考勤相关排名请到【考勤管理】-【考勤统计】-【考勤分排名】导出)</li>
       </el-alert>
     </div>
     <div class="manager_statistics_box boxMinHeight">

+ 1 - 1
src/point/views/statistics/total_rank.vue

@@ -10,7 +10,7 @@
 
     <div class="manager_statistics_box boxMinHeight">
       <div style="margin-bottom: 20px;">
-        <span style="font-size: 18px;font-weight: 700;">累计排名</span>
+        <span style="font-size: 18px;font-weight: 700;">累计B分排名</span>
         <span class="blue cursor" @click="isShowText=true">奖励说明</span>
       </div>
       <el-form :inline="true">

+ 3 - 3
src/point/views/workbench/task/my_issue.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-alert class="diy-tip" title="管理者角色均可发布任务,系统有2种任务:" type="success" description show-icon>
-      <p>临时任务:指派给某个人执行,完成后可审批打分,支持设置自动重复发布<br/>
+      <p>指派任务:指派给某个人执行,完成后可审批打分,支持设置自动重复发布<br/>
       悬赏任务:公开悬赏任务到某个部门或全公司,员工抢当任务负责人,完成可审批打分,也支持设置自动重复发布<br/>
       重复任务:每天、周、月自动帮你发布任务,分配日常固定事务更加省心省力
       </p>
@@ -17,7 +17,7 @@
               发布任务<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item command="1">+ 临时任务</el-dropdown-item>
+              <el-dropdown-item command="1">+ 指派任务</el-dropdown-item>
               <el-dropdown-item command="2">+ 悬赏任务</el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
@@ -212,7 +212,7 @@
 
     </div>
     <!-- 临时任务 -->
-    <temporaryTask :dialogVisible.sync="dialogVisible" :showTitle="'临时任务'"></temporaryTask>
+    <temporaryTask :dialogVisible.sync="dialogVisible" :showTitle="'指派任务'"></temporaryTask>
     <!-- 临时任务-修改 -->
     <temporaryTaskAmend :dialogVisible.sync="dialogVisibleAmend" :showTitle="'任务编辑'" :modifyData="modifyData"></temporaryTaskAmend>
 

+ 6 - 6
src/router/index.js

@@ -327,17 +327,17 @@ const constantRouterMap = [
             }
           },
           {
-            path: '/custom_rank',
-            name: '自定义B分排名',
-            component: () => import('@/point/views/statistics/custom_rank'),
+            path: '/total_rank',
+            name: '累计B分排名',
+            component: () => import('@/point/views/statistics/total_rank'),
             meta: {
               groupCode: 'statistics'
             }
           },
           {
-            path: '/total_rank',
-            name: '累计B分排名',
-            component: () => import('@/point/views/statistics/total_rank'),
+            path: '/custom_rank',
+            name: '自定义B分排名',
+            component: () => import('@/point/views/statistics/custom_rank'),
             meta: {
               groupCode: 'statistics'
             }

+ 18 - 18
src/router/okrRouter.js

@@ -14,24 +14,24 @@ const routes = [{
         groupCode: 'targertAdministration',
       }
     },
-    {
-      path: '/mySuperior',
-      name: 'mySuperior',
-      label: '我的上级',
-      component: () => import('@/okr/views/targetMt/mySuperior'),
-      meta: {
-        groupCode: 'targertAdministration',
-      }
-    },
-    {
-      path: '/mySubordinate',
-      name: 'mySubordinate',
-      label: '我的下级',
-      component: () => import('@/okr/views/targetMt/mySubordinate'),
-      meta: {
-        groupCode: 'targertAdministration',
-      }
-    },
+    // {
+    //   path: '/mySuperior',
+    //   name: 'mySuperior',
+    //   label: '我的上级',
+    //   component: () => import('@/okr/views/targetMt/mySuperior'),
+    //   meta: {
+    //     groupCode: 'targertAdministration',
+    //   }
+    // },
+    // {
+    //   path: '/mySubordinate',
+    //   name: 'mySubordinate',
+    //   label: '我的下级',
+    //   component: () => import('@/okr/views/targetMt/mySubordinate'),
+    //   meta: {
+    //     groupCode: 'targertAdministration',
+    //   }
+    // },
     {
       path: '/deptTargert',
       name: 'deptTargert',

+ 1 - 1
src/utils/axios.js

@@ -99,7 +99,7 @@ service.interceptors.response.use(
       bool = false
       setTimeout(() => {
         bool = true
-      }, 5000)
+      }, 10000)
     } else {
       console.log('不执行')
     }