Browse Source

2024.3.13 细节调整版本 一

guojy 1 year ago
parent
commit
cfdaec3288

+ 4 - 4
src/components/organization/EmployeeTable.vue

@@ -685,10 +685,10 @@ export default {
       });
     },
     ruleConfirm(){
-      if(this.selectItem.length>3){
-        this.$message.warning('关联岗位数量不能超过3个');
-        return false
-      }
+      // if(this.selectItem.length>3){
+      //   this.$message.warning('关联岗位数量不能超过3个');
+      //   return false
+      // }
 
       let post_ids=this.selectItem.map(e=>{
         return e.id

+ 77 - 3
src/components/organization/Post.vue

@@ -26,12 +26,15 @@
             <el-input  style="width: 200px;margin-right: 10px;" size="small" maxlength="100" show-word-limit v-model="name" clearable placeholder="搜索"/>
 
           </div>
-          <el-table :data="list" stripe fit v-loading="table_loading"  @row-click="openDetail" style="cursor: pointer;">
+          <el-table :data="list" stripe fit v-loading="table_loading" style="cursor: pointer;">
             <el-table-column label="岗位名称" prop="name" width="260"></el-table-column>
             <el-table-column label="岗位职责" prop="desc_1" show-overflow-tooltip></el-table-column>
             <el-table-column label="操作" prop="event_time" width="150">
                   <template slot-scope="scope">
-                      <div class="blue" style="cursor: pointer;">编辑</div>
+                      <div class="flex-box-ce">
+                        <div class="blue" style="cursor: pointer;margin-right: 10px;" @click="openPostAdd(scope.row)">人员设置</div>
+                        <div class="blue" style="cursor: pointer;" @click="openDetail(scope.row)">编辑</div>
+                      </div>
                   </template>
             </el-table-column>
             <template slot="empty">
@@ -90,19 +93,44 @@
     		<el-button type="primary" @click="confirm('params')">确 定</el-button>
     	</div>
     </el-dialog>
+    <el-dialog :close-on-click-modal="false" title="添加人员" :visible.sync="add_employee_show" :before-close="add_employee_close" width="700px" top="5%">
+      <el-form :model="add_employee_form" ref="add_employee_form" label-width="80px">
+        <div><EmployeeSelectorTwo :selected="selected" :max="add_employee_max" :can_select_dept="can_select_dept" :visible.sync="add_employee_visible" ref="Employee"></EmployeeSelectorTwo></div>
+        <el-form-item style="text-align: right; margin-bottom: 0;margin-top: 20px;">
+          <el-button :disabled="btn_disabled" @click="add_employee_close()">取消</el-button>
+          <el-button :disabled="btn_disabled" type="primary" @click="sub_add_employee('add_employee_form')">完成</el-button>
+        </el-form-item>
+      </el-form>
+    </el-dialog>
   </div>
   </div>
 </template>
 
 <script>
+import EmployeeSelectorTwo from '@/components/EmployeeSelectorTwo';
 import { Editor, Toolbar, getEditor, removeEditor, createEditor } from '@wangeditor/editor-for-vue';
 import cloneDeep from 'lodash.clonedeep';
 import {_debounce} from '@/utils/auth';
 export default {
   name: 'Post',
-  components: {Editor, Toolbar},
+  components: {Editor, Toolbar,EmployeeSelectorTwo},
   data() {
+    let PerformTheNumber = true; //五秒执行一次变量
     return {
+      add_employee_show:false,
+      add_employee_visible: false,
+      add_employee_form: {
+        post_ids: []
+      },
+      post_id:null,
+      btn_disabled: false,
+      add_employee_max: 2000,
+      selected :{
+        employee:[],
+        dept:[]
+      },
+      can_select_dept:false,
+
       total: 0,
       page: 1,
       page_size: 10,
@@ -194,6 +222,52 @@ export default {
     this.getList(true);
   },
   methods: {
+    getPostPerson(){
+      this.$axiosUser('get', '/api/pro/employee/index', {'post_ids':`[${this.post_id}]`},'v2').then(res => {
+          let list =res.data.data.list
+          let items = []
+          list.forEach((i)=>{
+            let item = {
+              id:i.id,
+              name:i.name,
+              img_url:i.img_url
+            }
+            items.push(item)
+          })
+          this.selected.employee = items
+          this.add_employee_show = true;
+        })
+    },
+    openPostAdd(e){
+      this.post_id = e.id;
+      this.getPostPerson()
+    },
+    add_employee_close() {
+      this.add_employee_show = false;
+    },
+    add_employee_confirm(val) {
+      this.add_employee_form.employee_ids = [];
+      if (val.employee.length !== 0) {
+        val.employee.forEach(element => {
+          this.add_employee_form.employee_ids.push(element.id);
+        });
+      }
+    },
+
+    // 添加人员 提交数据
+    sub_add_employee(form) {
+      this.$refs.Employee.confirm(); //调用组件的confirm();
+      let data = {
+        employee_ids: this.add_employee_form.employee_ids.join(','),
+        post_id: this.post_id,
+      };
+      this.$axiosUser('post', '/api/pro/post/bind_employee', data).then(res => {
+              this.add_employee_show = false;
+              this.$message.success('修改成功');
+              // this.open_right(this.handleCurrent);
+            })
+    },
+
     deleteCate(){
       this.$confirm('确定删除该岗位','提示', {
         confirmButtonText: '确定',

+ 1 - 5
src/examine/views/examineExecute.vue

@@ -184,7 +184,6 @@ export default {
       if(e.type=='sm_reporter'){
         if(e.code==1){
           this.isLoading=true;
-          // this.$socketApi.closewebsocket();
         }else if(e.code==2){
           let result=e.result
           this.list.forEach(item=>{
@@ -210,10 +209,7 @@ export default {
             confirmButtonText: '确定',
             type:'error',
             callback: action => {
-                that.percentage=0;
-                that.isResult= false;
-                that.not_reuse_employee_id=[];//复用结果
-                that.$socketApi.closewebsocket();
+              that.$socketApi.closewebsocket();
             }
           });
       }

+ 136 - 30
src/examine/views/kouFenTj.vue

@@ -6,7 +6,7 @@
       </el-alert>
     </div>
     <div class="manager_statistics_box boxMinHeight">
-      <div class="flex-box-ce flex-d-center">
+      <div class="flex-box flex-d-center">
         <el-form :inline="true">
           <el-form-item label="时间">
             <el-date-picker v-model="time" :clearable='false' type="daterange" value-format="yyyy-MM-dd"
@@ -22,10 +22,19 @@
               style="width: 200px;" clearable></el-input>
           </el-form-item>
         </el-form>
-        <el-button style="margin-bottom: 16px;" type="primary" @click="submitForm()">导出报表</el-button>
+        <!-- <el-button style="margin-bottom: 16px;" type="primary" @click="submitForm()">导出报表</el-button> -->
+        <!-- 导出报表 -->
+        <downloadexcel
+          v-if="list.length>0"
+          :fetch="returnArr"
+           name="责任人分值统计.xls"
+          :fields="json_fields"
+          >
+          <el-button type="primary" plain size="medium" style="margin-right: 10px;">导出报表</el-button>
+        </downloadexcel>
       </div>
 
-      <el-table :data="list" style="width: 100%;cursor: pointer;" v-loading="loading">
+      <el-table :data="list" style="width: 100%;cursor: pointer;" v-loading="loading" @sort-change="sortChange">
         <el-table-column label="责任人" prop="name" width="120" fixed></el-table-column>
         <el-table-column label="所属部门" prop="dept" width="120" fixed>
           <template slot-scope="scope">
@@ -36,44 +45,45 @@
         </el-table-column>
         <el-table-column label="时间" width="120" fixed>
           <template slot-scope="scope">
-             <div class="font-flex-word" style="width: 100px;">
-             {{$moment(time[0]).format('MM-DD')+'~'+$moment(time[1]).format('MM-DD')}}
-             </div>
+             <div class="font-flex-word" style="width: 100px;">{{scope.row.time}}</div>
           </template>
         </el-table-column>
-        <el-table-column label="定期检查" align="center">
-          <el-table-column prop="c_item" label="负责次数" width="120"></el-table-column>
-          <el-table-column prop="total_base_point" label="应得总分" width="120"></el-table-column>
-          <el-table-column prop="total_point" label="实际得分" width="120"></el-table-column>
-          <el-table-column prop="total_reduce_point" label="被扣分" width="120"></el-table-column>
-          <el-table-column prop="c_bug_item" label="不合格(次)" width="120"></el-table-column>
-          <el-table-column prop="c_bug_focus_item" label="重点不合格(次)" width="140"></el-table-column>
+        <el-table-column label="定期检查" align="center" >
+          <el-table-column prop="c_item" label="负责次数" width="120" sortable="custom"></el-table-column>
+          <el-table-column prop="total_base_point" label="应得总分" width="120" sortable="custom"></el-table-column>
+          <el-table-column prop="total_point" label="实际得分" width="120" sortable="custom"></el-table-column>
+          <el-table-column prop="total_reduce_point" label="被扣分" width="120" sortable="custom"></el-table-column>
+          <el-table-column prop="c_bug_item" label="不合格(次)" width="140" sortable="custom"></el-table-column>
+          <el-table-column prop="c_bug_focus_item" label="重点不合格(次)" width="160" sortable="custom"></el-table-column>
         </el-table-column>
         <el-table-column label="临时检查" align="center">
-          <el-table-column prop="sm_point" label="得分(分)" width="120"></el-table-column>
-          <el-table-column prop="sm_reward_point" label="奖分(分)" width="120"></el-table-column>
-          <el-table-column prop="sm_reward_count" label="奖分次数" width="120"></el-table-column>
-          <el-table-column prop="sm_deduce_point" label="扣分(分)" width="120"></el-table-column>
-          <el-table-column prop="sm_deduce_count" label="扣分次数" width="120"></el-table-column>
+          <el-table-column prop="sm_point" label="得分(分)" width="120" sortable="custom"></el-table-column>
+          <el-table-column prop="sm_reward_point" label="奖分(分)" width="120" sortable="custom"></el-table-column>
+          <el-table-column prop="sm_reward_count" label="奖分次数" width="120" sortable="custom"></el-table-column>
+          <el-table-column prop="sm_deduce_point" label="扣分(分)" width="120" sortable="custom"></el-table-column>
+          <el-table-column prop="sm_deduce_count" label="扣分次数" width="120" sortable="custom"></el-table-column>
         </el-table-column>
         <template slot="empty">
           <NoData></NoData>
         </template>
       </el-table>
 
-      <center style="padding: 20px 0;">
+<!--      <center style="padding: 20px 0;">
         <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
           :current-page="page" :page-sizes="[10, 20, 50, 100]" layout="total, sizes, prev, pager, next"
           :page-size="page_size" :total="total"></el-pagination>
-      </center>
+      </center> -->
     </div>
   </div>
 </template>
 <script>
   import { _debounce} from '@/utils/auth';
   import Tooltip from '@/components/Tooltip'; //鼠标悬浮显示文字
+  import downloadexcel from "vue-json-excel";
+
+  var bool = true; // 五秒执行一次变量
   export default {
-    components:{Tooltip},
+    components:{Tooltip,downloadexcel},
     data() {
       return {
         loading: false,
@@ -83,9 +93,30 @@
         page_size: 10,
         dept_id: 0,
         formData: {dept_ids: 0,},
-        time: [this.$moment().startOf('month').format('YYYY-MM-DD'), this.$moment().endOf('month').format('YYYY-MM-DD')],
+        // time: [this.$moment().startOf('month').format('YYYY-MM-DD'), this.$moment().endOf('month').format('YYYY-MM-DD')],
+        time: ['2022-01-12', this.$moment().endOf('month').format('YYYY-MM-DD')],
         list: [],
+        listAll:[],
         keyword: '',
+
+        json_fields:{
+        	'姓名':'name',
+        	'部门':'dept',
+          '时间':'time',
+
+        	'负责次数':'c_item',
+        	'应得总分':'total_base_point',
+        	'实际得分':'total_point',
+        	'被扣分':'total_reduce_point',
+        	'不合格(次)':'c_bug_item',
+        	'重点不合格(次)':'c_bug_focus_item',
+
+        	'得分(分)':'sm_point',
+        	'奖分(分)':'sm_reward_point',
+          '奖分次数':'sm_reward_count',
+          '扣分(分)':'sm_deduce_point',
+          '扣分次数':'sm_deduce_count',
+        },
       };
     },
     watch: {
@@ -112,6 +143,7 @@
           this.formData.dept_ids = 0;
         }
         this.$nextTick(() => {
+          this.$refs.dept.dropDownVisible = false;
           this.get_list();
         });
       },
@@ -122,6 +154,25 @@
       }
     },
     methods: {
+      returnArr(){
+      	return this.list;
+      },
+      sortChange(e){
+       let {order,prop}=e;
+       if(order===null){
+         this.list=this.listAll;
+         return false
+       }
+       let list=JSON.parse(JSON.stringify(this.listAll));
+       list.sort((val1,val2)=>{
+         if(order=='descending'){
+           return val2[prop]-val1[prop]
+         }else{
+           return val1[prop]-val2[prop]
+         }
+       })
+       this.list=list;
+      },
       getDepts(arr,ids){
         if(arr.length>0){
           arr.forEach(item=>{
@@ -130,23 +181,72 @@
           })
         }
       },
+      onmessageWS(e){
+        let that=this;
+        if(e.type=='sm_reporter'){
+          if(e.code==1){
+
+          }else if(e.code==2){
+            let result=e.result
+            // this.list = list;
+            // this.listAll = list;
+            this.loading = false;
+          }else{
+            this.errorage('x',e.msg)
+          }
+        }
+        // 中途断开
+        if(e.type=='break'){
+            this.$alert('网络错误,请稍后再试', '网络错误', {
+              confirmButtonText: '确定',
+              type:'error',
+              callback: action => {
+                  that.not_reuse_employee_id=[];//复用结果
+                  that.$socketApi.closewebsocket();
+              }
+            });
+        }
+      },
+      errorage(key, arr) {
+        //弹窗提示
+        if (bool) {
+          this.$message({
+            message: arr,
+            type: key == '√' ? 'success' : key == '?' ? 'warning' : key == 'x' ? 'error' : ''
+          });
+          bool = false;
+          setTimeout(() => {
+            bool = true;
+          }, 5000);
+        }
+      },
       get_list() {
+        return false
         this.loading = true;
-        let data = {
-          page: this.page,
-          page_size: this.page_size,
+        let data={
+          type:'sm_reporter',
           keyword: this.keyword,
           dept_ids: this.formData.dept_ids.toString(),
           start_date: this.time[0],
           end_date: this.time[1],
-        };
+        }
+        this.$socketApi.sendData(data,this.onmessageWS)
+        return false
+        // let data = {
+        //   page: this.page,
+        //   page_size: this.page_size,
+        //   keyword: this.keyword,
+        //   dept_ids: this.formData.dept_ids.toString(),
+        //   start_date: this.time[0],
+        //   end_date: this.time[1],
+        // };
         this.$axiosUser('get', '/api/pro/sm/statistics/rectify/owners/v2', data).then(res => {
           let list = res.data.data.list;
-          // list.forEach((item, index) => {
-          //   item.userInfo = this.$getEmployeeMapItem(item.employee_id);
-          //   item.rank = (index + 1) + (this.page - 1) * this.page_size
-          // })
+          list.forEach(item=>{
+            item.time=this.$moment(this.time[0]).format('MM-DD')+'~'+this.$moment(this.time[1]).format('MM-DD');
+          })
           this.list = list;
+          this.listAll = list;
           this.total = res.data.data.total;
         }).finally(() => {
           this.loading = false;
@@ -176,6 +276,9 @@
       },
       // 下载排名
       submitForm() {
+        console.log(this.list);
+        return false
+
         let token = this.$getToken();
         let url = `start_date=${this.time[0]}&end_date=${this.time[1]}&keyword=${this.keyword}`
         if (this.formData.dept_ids) {
@@ -191,6 +294,9 @@
         this.dept_tree = this.getTreeData(this.$getCache('dept_tree'));
       }
       this.get_list();
+    },
+    beforeDestroy(){
+      this.$socketApi.closewebsocket();
     }
   };
 </script>

+ 22 - 3
src/okr/components/project/Dhtmlx.vue

@@ -1,6 +1,6 @@
 <template>
   <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 flex-d-center" style="margin-bottom: 20px;">
       <div class="flex-box-ce">
         <el-select class="select" size="small" v-model="taskForm.composite_states" placeholder="状态">
           <el-option :key="0" label="全部" :value="0"></el-option>
@@ -117,6 +117,7 @@ import moment from 'moment' // 时间库
 import '@/assets/js/dhtmlx.js';
 import "@/assets/css/dhtmlxgantt.css";
 import { Upload } from 'element-ui';
+import {_debounce} from '@/utils/auth';
 export default {
   name: 'Dhtmlx',
   components:{TaskDetail},
@@ -173,8 +174,11 @@ export default {
     'taskForm.owner_id'(val){
       this.returnList();
     },
-    'taskForm.keyword'(val){
-      this.returnList();
+    'taskForm.keyword': {
+      deep: true,
+      handler: _debounce(function(val) {
+        this.returnList();
+      })
     },
     'taskForm.type'(val){
       this.ganttChangeDateView(val);
@@ -207,6 +211,11 @@ export default {
       this.$nextTick(()=>{
         this.tasks.data=list;
         gantt.parse(this.tasks);
+        gantt.addMarker({
+            start_date: new Date(),
+            text: '今日',
+            css: "today",
+        });
       })
     },
     deleteM(){},
@@ -244,6 +253,15 @@ export default {
           if(plans.length>0){
             milestones.push({id:'-1',name:'暂无设置里程碑',dateStr:'无',plans:plans})
           }
+          milestones.forEach((item)=>{
+              if(item.plans.length>0){
+                item.plans.sort((a,b)=>{
+                  return a.end_time-b.end_time
+                })
+              }
+          })
+
+
           milestones.forEach(item=>{
             item.statusColor=this.returnStatus(item);
             item.day=this.$moment(item.end_date).diff(this.$moment().format('YYYY-MM-DD'), 'day')
@@ -539,6 +557,7 @@ export default {
           text: '今日',
           css: "today",
       });
+
       // 点击任务列表
       const onTaskDblClick=gantt.attachEvent("onTaskDblClick",this.openDetail)
       //根据任务状态改变颜色

+ 13 - 6
src/okr/components/project/KanMilestone.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <div class="flex-box-ce flex-d-center" style="margin: 20px 0;">
+    <div class="flex-box-ce flex-d-center" style="margin-bottom: 20px;">
         <el-select class="select2" size="small" v-model="taskForm.composite_state" placeholder="状态">
           <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>
@@ -16,11 +16,12 @@
         </el-select>
         <el-input prefix-icon="el-icon-search" class="input" style="width: 200px;" size="small" v-model="taskForm.keyword" clearable placeholder="请输入任务关键字" />
         <div class="flex-1"></div>
+        <el-button style="padding: 6px 10px;margin-right: 15px;" size="small" @click="toogleBoard()">{{ showBoard?'展开':'收起' }}</el-button>
         <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 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" v-if="item.id">{{returnLet(item.plans)}}/{{item.plans.length}}</div>
@@ -33,7 +34,7 @@
                     </el-dropdown>
                   </div>
                   <div class="add-task blue" @click="openShowTaskAdd(item)" v-if="isPstake"><i class="el-icon-plus"></i><span>添加任务</span></div>
-                  <div class="task-items scroll-bar" :ref="item.id">
+                  <div class="task-items scroll-bar" :ref="item.id" :style="{'height':showBoard?'calc(100vh - 424px)':'calc(100vh - 290px)'}">
                     <transition-group name="drag" tag="div">
                       <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;">
@@ -42,7 +43,6 @@
                              <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;">
@@ -97,6 +97,10 @@
         type: Boolean,
         default:true
       },
+      showBoard: {
+        type: Boolean,
+        default:true
+      },
     },
     data() {
       return {
@@ -185,6 +189,9 @@
       },
     },
     methods: {
+      toogleBoard(){
+        this.$emit('updateMaxHeight');
+      },
       isShowTask(item){
         let is=true;
         if(this.taskForm.owner_id&&this.taskForm.owner_id!=item.owner_id){
@@ -521,7 +528,7 @@
     width: 300px;
     margin-right: 14px;
     position: relative;
-    min-height: calc(100vh - 325px);
+    // min-height: calc(100vh - 325px);
     box-sizing: border-box;
     flex-shrink:0;
   }
@@ -534,7 +541,7 @@
     cursor: move;
   }
   .task-items{
-     height: calc(100vh - 410px);
+     height: calc(100vh - 420px);
      overflow-y: auto;
      padding-top: 10px;
   }

+ 12 - 4
src/okr/components/project/Milestone.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <div class="flex-box-ce flex-d-center" style="margin: 20px 0;">
+    <div class="flex-box-ce flex-d-center" style="margin-bottom: 20px;">
         <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,6 +16,7 @@
         </el-select>
         <el-input prefix-icon="el-icon-search" class="input" style="width: 200px;" size="small" v-model="taskForm.keyword" clearable placeholder="请输入任务关键字" />
         <div class="flex-1"></div>
+        <el-button style="padding: 6px 10px;margin-right: 15px;" size="small" @click="toogleBoard()">{{ showBoard?'展开':'收起' }}</el-button>
         <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>
@@ -49,7 +50,7 @@
         <div class="flex-box-ce">
             <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="add-task blue" @click="openShowTaskAdd(item)" v-if="isPstake"><i class="el-icon-plus"></i><span>添加任务</span></div>
-                <div class="task-items scroll-bar" :ref="item.id">
+                <div class="task-items scroll-bar" :ref="item.id" :style="{'height':showBoard?'calc(100vh - 468px)':'calc(100vh - 334px)'}">
                   <transition-group name="drag" tag="div">
                     <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;">
@@ -253,7 +254,11 @@
         default: _=>{
           return {}
         }
-      }
+      },
+      showBoard: {
+        type: Boolean,
+        default:true
+      },
     },
     data() {
       return {
@@ -408,6 +413,9 @@
       },
     },
     methods: {
+      toogleBoard(){
+        this.$emit('updateMaxHeight');
+      },
       isFloor(el) {
         var obj = event.target;
         el = el
@@ -925,7 +933,7 @@
     width: 300px;
     margin-right: 14px;
     position: relative;
-    min-height: calc(100vh - 415px);
+    // min-height: calc(100vh - 415px);
     box-sizing: border-box;
     flex-shrink:0;
   }

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

@@ -1,5 +1,5 @@
 <template>
-  <div class="br-5 scroll-bar" style="height: calc(100vh - 260px);padding-top: 30px;box-sizing: border-box;overflow-y: scroll;">
+  <div class="br-5 scroll-bar" style="height: calc(100vh - 260px);box-sizing: border-box;overflow-y: scroll;">
     <el-row  v-loading="loading">
       <el-col :span="12">
         <div class="circular_item" style="margin-bottom: 10px;">
@@ -58,7 +58,7 @@
           </div>
           <div class="flex-box-ce kr-message-item">
             <div class="label">创建人</div>
-            <div class="flex-box-ce" @click="showSelectorUser()">
+            <div class="flex-box-ce">
                 <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>

+ 1 - 1
src/okr/components/project/ProjectTj.vue

@@ -390,7 +390,7 @@ export default {
   padding: 10px 20px;
 }
 .header {
-  padding:20px 0 10px 0px;
+  padding:0px 0 10px 0px;
 }
 .circular_title_left {
   font-size: 18px;

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

@@ -281,10 +281,10 @@
                               </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="compileContent(item)" v-if="isOperation"> 编辑</div>
+                            <div class="flex-box o-content t-evolve" style="margin-bottom: 5px;display: flex;justify-content: space-between;">
+                              <pre v-if="item.content">{{item.content}}</pre>
+                              <div v-else class="fontColorD">暂无内容</div>
+                              <div style="display: none;flex-direction: column-reverse;" class="fontColorC" @click="compileContent(item)" v-if="isOperation"> 编辑</div>
                             </div>
                           </div>
                         </div>

+ 2 - 2
src/okr/views/planTask/work.vue

@@ -165,8 +165,8 @@
     </template>
     <div class="flex-box-v flex-center-center" style="height: 600px;" v-else>
         <img src="static/images/nodata.png" style="width: 200px;"/>
-        <div style="text-align: center;margin: 30PX 0;line-height: 30px;">请先制定目标,才能进行okr工作法管理<br />
-        如果你不知道如何制定 OKR,请先了解 <span class="blue cursor">什么是 OKR?</span></div>
+<!--        <div style="text-align: center;margin: 30PX 0;line-height: 30px;">请先制定目标,才能进行okr工作法管理<br />
+        如果你不知道如何制定 OKR,请先了解 <span class="blue cursor">什么是 OKR?</span></div> -->
         <el-button type="primary" round style="width: 150px;" @click="$router.push({ path: '/myTargert' })">马上创建目标</el-button>
     </div>
     <!-- 对齐目标 -->

+ 58 - 53
src/okr/views/project/projectDetail.vue

@@ -1,57 +1,58 @@
 <template>
     <div class="br-5 all">
-      <PageHead phName="项目详情"></PageHead>
       <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-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 style="padding: 10px 20px 0 20px;"><PageHead phName="项目详情"></PageHead></div>
+        <header style="transition:all 0.4s;overflow-y: hidden;" :style="{'padding-bottom':showBoard?'20px':'0px','max-height':showBoard?'500px':'0px'}">
+          <div style="padding: 10px 20px 0 20px;">
+            <div class="flex-box-ce">
+              <svg-icon icon-class="#icon-wenjianjia" class="svgIcon blue" style="width: 1.6rem;height: 1.6rem;"></svg-icon>
+              <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)" v-if="isReturnPJ">
-                <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 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="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>
-        </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="flex-box-ce" style="background-color: #fff;box-shadow: 0 10px 10px #F3F5F8;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>
+        </header>
+        <div class="content">
           <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 flex-d-center" style="margin-bottom: 20px;">
                     <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>
@@ -80,12 +81,12 @@
 
             <!-- 里程碑 -->
             <template v-if="tabsIndex==2">
-                <Milestone :isReturnPJ="isReturnPJ" :progressData="progressData" :isPstake="isPstake"></Milestone>
+                <Milestone :isReturnPJ="isReturnPJ" :showBoard="showBoard" :progressData="progressData" :isPstake="isPstake" @updateMaxHeight="updateMaxHeight()"></Milestone>
             </template>
 
             <!-- 看板 -->
             <template v-if="tabsIndex==3">
-                <KanMilestone :isReturnPJ="isReturnPJ" :isPstake="isPstake"></KanMilestone>
+                <KanMilestone :isReturnPJ="isReturnPJ" :showBoard="showBoard" :isPstake="isPstake" @updateMaxHeight="updateMaxHeight()"></KanMilestone>
             </template>
 
             <!-- 甘特图 -->
@@ -100,7 +101,7 @@
 
             <!-- 沟通 -->
             <template v-if="tabsIndex==6">
-                <Interaction ref="Interaction" style="margin-top: 30px;" v-if="tabsIndex==6" :target_id="projectId" :target_type="4"></Interaction>
+                <Interaction ref="Interaction" v-if="tabsIndex==6" :target_id="projectId" :target_type="4"></Interaction>
             </template>
 
             <!-- 预览 -->
@@ -118,13 +119,7 @@
 
       <!-- 删除目标 -->
       <el-dialog title="确认删除此项目吗?" :visible.sync="isShowDeleteProject" :append-to-body="true" width="500px">
-       <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> -->
-        </div>
+       <div>删除当前项目,但不删除项目内的相关任务(请联系相关人员自行清理)</div>
         <div class="flex-box-end" style="margin-top: 50px;">
         	<el-button @click="isShowDeleteProject=false">取消</el-button>
         	<el-button type="danger" plain @click="deleteProject()">删除</el-button>
@@ -190,6 +185,8 @@
         taskShow:false,
         isReturnPJ:false,
         isPstake:false,//是否是相关成员
+
+        showBoard:true,
       }
     },
     watch: {
@@ -227,12 +224,15 @@
         }
     },
     methods:{
+      updateMaxHeight(){
+        this.showBoard=!this.showBoard;
+      },
       updateTaskList(){
          this.getPastTask();
       },
       openProjectQx(index){
         if(index!=2&&!this.isReturnPJ){
-          this.$message.error("暂无权限")
+          // this.$message.error("暂无权限")
           return false
         }
         if(index==1){
@@ -318,7 +318,7 @@
             if(list.length>0){
               this.taskShow=true;
             }
-          },0)
+          },100)
 
 
         }).finally(()=>{
@@ -342,11 +342,16 @@
 <style scoped lang="scss">
   .all {
     background-color: #fff;
-    padding: 20px;
-    padding-top: 10px;
     height: calc(100vh - 80px);
     box-sizing: border-box;
   }
+  .header{
+    padding: 10px 20px 0px 20px;
+  }
+
+  .content{
+    padding:0 20px;
+  }
   .project-name{
       font-size: 18px;
       font-weight: 550;

+ 9 - 3
src/performance/views/assessManagement/staffAssDet.vue

@@ -136,10 +136,16 @@
             </el-table-column>
             <el-table-column prop="name" label="指标名称" min-width="220">
               <template slot-scope="scope">
-                   <template v-if="Number(scope.row.weight) > 0">
+<!--                   <template v-if="Number(scope.row.weight) > 0">
                      <PreBox :value="scope.row.name+'(权重:'+scope.row.weight+'%)'"></PreBox>
-                   </template>
-                   <PreBox v-else :value="scope.row.name"></PreBox>
+                   </template> -->
+                   <PreBox  :value="scope.row.name"></PreBox>
+               </template>
+            </el-table-column>
+            <el-table-column prop="name" label="权重" align="center" width="60">
+              <template slot-scope="scope">
+                  <span v-if="Number(scope.row.weight) > 0">{{scope.row.weight}}%</span>
+                  <span v-else>--</span>
                </template>
             </el-table-column>
             <template v-if="isShowOneselfScore">

+ 1 - 1
src/performance/views/myPerformance/adjustment.vue

@@ -44,7 +44,7 @@
                 <template slot-scope="scope">
                   <span v-if="scope.row.result_type == 'none'">不开启</span>
                   <span v-if="scope.row.result_type == 'self'">被考核人</span>
-                  <span v-if="scope.row.result_type == 'special'">指定员工</span>
+                  <span v-if="scope.row.result_type == 'special'">指定员工 ({{$getEmployeeMapItem(scope.row.result_employee_id).name}}) </span>
                   <span v-if="scope.row.result_type == 'supervisor'">指定管理员</span>
                 </template>
               </el-table-column>

+ 9 - 3
src/performance/views/myPerformance/myPerformance.vue

@@ -131,10 +131,16 @@
             </el-table-column>
             <el-table-column prop="name" label="指标名称" min-width="220">
               <template slot-scope="scope">
-                   <template v-if="Number(scope.row.weight) > 0">
+<!--                   <template v-if="Number(scope.row.weight) > 0">
                      <PreBox :value="scope.row.name+'(权重:'+scope.row.weight+'%)'"></PreBox>
-                   </template>
-                   <PreBox v-else :value="scope.row.name"></PreBox>
+                   </template> -->
+                   <PreBox  :value="scope.row.name"></PreBox>
+               </template>
+            </el-table-column>
+            <el-table-column prop="name" label="权重" align="center" width="60">
+              <template slot-scope="scope">
+                  <span v-if="Number(scope.row.weight) > 0">{{scope.row.weight}}%</span>
+                  <span v-else>--</span>
                </template>
             </el-table-column>
             <template v-if="isShowOneselfScore">

+ 14 - 8
src/point/views/pointHome.vue

@@ -276,11 +276,7 @@
                       {{ prize.point }} B分
                     </span>
                   </p>
-                  <p
-                    style="font-size:13px;line-height:20px;color:rgb(48, 49, 51);overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2; "
-                  >
-                    {{ prize.remark ? prize.remark.customize : '' }}
-                  </p>
+                  <p style="task-remark">{{ prize.remark ? prize.remark.customize : '' }}</p>
                 </div>
               </div>
             </div>
@@ -297,9 +293,7 @@
                     <b style="color:#303133;font-size:16px;">{{ buckle.name }}</b>
                     <span style="color:#FF9600;font-size:16px;">{{ buckle.point }} B分</span>
                   </p>
-                  <p
-                    style="font-size:13px;line-height:20px;color:rgb(48, 49, 51);overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2;padding-bottom:15px; "
-                  >
+                  <p class="task-remark">
                     {{ buckle.remark ? buckle.remark.customize : '' }}
                   </p>
                 </div>
@@ -1404,6 +1398,18 @@ export default {
 </script>
 
 <style scoped>
+  .task-remark{
+    max-height: 40px;
+    word-break: break-all;
+    font-size:13px;
+    line-height:20px;
+    color:rgb(48, 49, 51);
+    overflow:hidden;
+    text-overflow:ellipsis;
+    display:-webkit-box;
+    -webkit-box-orient:vertical;
+    -webkit-line-clamp:2;
+  }
   .group-name{
     width:120px;
     color:#606266;

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

@@ -64,7 +64,7 @@
                   <span class="fl">
                     <userImage :id="scope.row.employee_id" width="50px" height="50px" :user_name="scope.row.employee.name" v-if="scope.row.employee"></userImage>
                   </span>
-                  <span style="margin-left: 10px; line-height: 50px; display: inline-block" v-if="scope.row.employee">{{ scope.row.employee.name }}</span>
+                  <span style="margin-left: 10px; line-height: 50px; display: inline-block" v-if="scope.row.employee">{{ scope.row.employee.name }} <span v-if=" scope.row.employee.status==2">(已离职)</span></span>
                 </template>
               </el-table-column>
               <el-table-column prop="cycle_remark" label="加分周期">

+ 0 - 613
src/views/post.vue

@@ -1,613 +0,0 @@
-<template>
-  <div>
-    <el-alert class="diy-tip" title="温馨提示:"  v-show="tips_show" type="success" description show-icon>
-      <p> 岗位职责关联员工个人信息,利于员工清楚了解所在岗位的工作职责</p>
-    </el-alert>
-    <div class="box br-5 all boxMinHeight">
-      <div class="main flex-box">
-        <div class="main-left" style="padding: 20px;padding-right: 0px;">
-          <div style="text-align: center;margin-bottom: 16px;">
-            <div style="margin-bottom: 10px;"><el-button type="primary" @click="openAdd(1)">新建分类</el-button></div>
-            <div><el-button type="primary"  @click.stop="openV(1)">新增岗位</el-button></div>
-          </div>
-
-          <ul class="ul" v-if="tabs.length > 0" v-loading="item_loading">
-            <li class="flex-box-ce li" v-for="(item, index) in tabs" :key="index" :class="[tabItem.id == item.id ? 'isActiveLi' : '']" @click="activeLi(item, index)">
-              <div class="index-name font-flex-word"><i class="el-icon-s-help" v-if="item.id==-1"></i> {{ item.name }}</div>
-            </li>
-          </ul>
-          <noData v-else content="暂无关系视图" imgW="120px" imgH="80px"></noData>
-        </div>
-        <div class="flex-1 main-right">
-          <div class="right-title flex-box">
-            <h2 style="padding-right: 12px;margin: 0;">{{ tabItem.name }}</h2>
-            <el-button class="el-dropdown-link" v-if="tabItem.id!=-1" size="small" @click.stop="openAdd(2)">编辑</el-button>
-            <div class="flex-1"></div>
-            <el-input  style="width: 200px;margin-right: 10px;" size="small" maxlength="100" show-word-limit v-model="name" clearable placeholder="搜索"/>
-
-          </div>
-          <el-table :data="list" stripe fit v-loading="table_loading"  @row-click="openDetail" style="cursor: pointer;">
-            <el-table-column label="岗位名称" prop="name" width="260"></el-table-column>
-            <el-table-column label="岗位职责" prop="desc_1" show-overflow-tooltip></el-table-column>
-            <el-table-column label="操作" prop="event_time" width="150">
-                  <template slot-scope="scope">
-                      <div class="blue" style="cursor: pointer;">编辑</div>
-                  </template>
-            </el-table-column>
-            <template slot="empty">
-              <NoData isSolt v-if="list.length==0">
-                  <div>暂无岗位,<span class="blue" style="cursor: pointer;" @click.stop="openV(1)">新增岗位</span></div>
-              </NoData>
-              <NoData v-else></NoData>
-            </template>
-          </el-table>
-          <Pagination :page="page" :page_size="page_size" :total="total" @handleSizeChange="handleSizeChange" @handleCurrentChange="handleCurrentChange"></Pagination>
-        </div>
-      </div>
-    </div>
-    <!-- 新建分类,编辑分类 -->
-    <el-dialog :close-on-click-modal="false" width="600px" :title="tabTiele" :visible.sync="importErrorInfoShow">
-      <el-form :model="relationNew" ref="ruleForm" label-width="120px">
-        <el-form-item label="分类名称:" prop="name">
-          <el-input v-model.trim="relationNew.name" style="width: 250px;" placeholder="请输入名称" show-word-limit maxlength="10"></el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer">
-        <div class="flex-box">
-          <el-button v-if="addIndex == 2" @click="closeStatistic" type="danger">删 除</el-button>
-          <div class="flex-1"></div>
-          <el-button @click="importErrorInfoShow = false">取 消</el-button>
-          <el-button type="primary" @click="editRelation">确 定</el-button>
-        </div>
-      </span>
-    </el-dialog>
-    <el-dialog :title="params.id? '编辑岗位':'新增岗位'" :visible.sync="visible_" :close-on-click-modal="false"  append-to-body width="700px" top="5%">
-    	<el-form :model="params" ref="params" label-width="100px" class="form">
-    		<el-form-item label="岗位名称" :rules="[{ required: true, message: '请输入岗位名称'}]" prop="name">
-    			<el-input style="width: 350px;"  v-model.trim="params.name" placeholder="请输入岗位名称" maxlength="15" show-word-limit></el-input>
-    		</el-form-item>
-        <el-form-item label="所属分类" :rules="[{ required: true, message: '请输入岗位名称' }]" prop="cate_id">
-        	<el-select v-model="params.cate_id" placeholder="指标类型"  style="width: 350px;">
-        	  <el-option v-for="item in tabs" :key="item.id" :label="item.name" :value="item.id"></el-option>
-        	</el-select>
-        </el-form-item>
-        <el-form-item label="岗位职责"></el-form-item>
-    		<div style="border: 1px solid #ccc;margin-bottom: 20px;" v-if="visible_">
-    			<!-- 工具栏 -->
-    			<Toolbar style="border-bottom: 1px solid #ccc" :editor="editor" :defaultConfig="toolbarConfig"/>
-    			<!-- 编辑器 -->
-    			<Editor style="height: 300px"
-            :defaultConfig="editorConfig"
-            :defaultContent="getDefaultContent"
-            @onCreated="onCreated"
-          />
-    		</div>
-    	</el-form>
-    	<div  class="flex-box-ce">
-        <el-button v-if="params.id" @click="deleteCate" type="danger">删 除</el-button>
-        <div class="flex-1"></div>
-    		<el-button @click="visible_=false">取 消</el-button>
-    		<el-button type="primary" @click="confirm('params')">确 定</el-button>
-    	</div>
-    </el-dialog>
-  </div>
-  </div>
-</template>
-
-<script>
-import { Editor, Toolbar, getEditor, removeEditor, createEditor } from '@wangeditor/editor-for-vue';
-import cloneDeep from 'lodash.clonedeep';
-import {_debounce} from '@/utils/auth';
-export default {
-  name: 'post',
-  components: {Editor, Toolbar},
-  data() {
-    return {
-      total: 0,
-      page: 1,
-      page_size: 10,
-      tabItem:{ name:'销售'},
-      item_loading:false,
-      tabs:[{name:'全部分类',id:-1}],
-      tips_show:true,
-      relationNew:{
-        id:'',
-        name:'',
-      },
-      addIndex:1,
-      tabTiele:'新建分类',
-      importErrorInfoShow:false,
-      visible_:false,
-      // 富文本
-      editor: null,
-      defaultContent: [], // 编辑器的默认内容,只在初始化时使用
-      latestContent: [], // 用于存储编辑器最新的内容,onChange 时修改
-      toolbarConfig: {
-      	mode: 'simple',
-      	toolbarKeys: [
-      		'headerSelect', // 分割线
-      		'|',
-      		'bold',
-      		'italic',
-      		'underline',
-      		'through',
-      		'color',
-      		'bgColor',
-      		'indent',
-      		'justifyLeft',
-      		'justifyRight',
-      		'justifyCenter',
-      		'justifyJustify',
-      		'bulletedList',
-      		'numberedList',
-      		'clearStyle'
-      	]
-      },
-      editorConfig: {
-      	placeholder: '请输入内容...'
-      },
-      params: {
-        cate_id:-1,
-      	name: '',
-      	desc: '',
-      	desc_1: '',
-        desc_2:'',
-      },
-      list:[],
-      table_loading:false,
-      name:'',
-    };
-  },
-  watch: {
-    name: {
-      deep: true,
-      handler: _debounce(function(val) {
-        this.page = 1;
-        this.getTableData();
-      })
-    },
-    importErrorInfoShow(val){
-      if(!val){
-        this.relationNew={name:'',id:''};
-      }
-    },
-    visible_(val){
-      if(!val){
-        this.params={
-          cate_id:-1,
-          name: '',
-          desc: '',
-          desc_1: '',
-          desc_2:'',
-        };
-        this.defaultContent=[];
-      }
-    },
-  },
-  computed: {
-  	// <!-- 注意,这里使用 computed 的结果 -->
-  	getDefaultContent() {
-  		return cloneDeep(this.defaultContent); // 深拷贝,重要!!!
-  	}
-  },
-  created() {
-    this.getList(true);
-  },
-  methods: {
-    deleteCate(){
-          this.$confirm('确定删除该岗位', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          }).then(() => {
-              this.$axiosUser('POST', '/api/pro/post/delete_post', { id:this.params.id}).then(res => {
-                this.$message.success('删除成功');
-                this.visible_=false;
-                this.getTableData();
-              })
-          }).catch(() => {});
-    },
-    openV(index){
-      this.visible_=true;
-      if(index==1){
-        this.params.cate_id=this.tabItem.id
-      }
-    },
-    activeLi(item, index) {
-      this.tabItem = JSON.parse(JSON.stringify(item));
-      this.page=1;
-      this.page_size=10;
-      this.getTableData();
-    },
-    getList(is) {
-      this.item_loading=true;
-      this.tabs=[{name:'全部分类',id:-1}];
-      this.$axiosUser('get', '/api/pro/post/post_cate_list').then(res => {
-          this.tabs.push(...res.data.data)
-          if(is){
-            this.tabItem = JSON.parse(JSON.stringify(this.tabs[0]));
-            this.getTableData();
-          }
-      }).finally(()=>{
-           this.item_loading=false;
-      });
-    },
-    getTableData() {
-      this.table_loading=true;
-      let data={
-        page:this.page,
-        page_size:this.page_size,
-        cate_id:this.tabItem.id,
-        name:this.name
-      }
-      this.$axiosUser('get', '/api/pro/post/cate_post_list',data).then(res => {
-          this.list=res.data.data.list
-          this.total=res.data.data.total
-      }).finally(()=>{
-           this.table_loading=false;
-      });
-    },
-    openDetail(e){
-      this.$axiosUser('get', '/api/pro/post/post_detail',{id:e.id}).then(res => {
-          let data=res.data.data;
-          data.cate_id=data.cat_id==0? -1:data.cat_id;
-          this.params=data;
-          if(data.desc_2){
-            this.defaultContent=JSON.parse(data.desc_2)
-          }else{
-            this.defaultContent=[];
-          }
-          this.visible_=true;
-      })
-    },
-    onCreated(editor) {
-      this.editor = Object.seal(editor); // 【注意】一定要用 Object.seal() 否则会报错
-    },
-    // 确定
-    confirm(formName) {
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          const editor = this.editor;
-          if (editor == null) return;
-          // console.log(editor.getHtml(),editor.getText()); // 执行 editor API
-          let data={
-            cate_id:this.params.cate_id==-1?0:this.params.cate_id,
-            name: this.params.name,
-          }
-          if(editor.getHtml()!='<p><br></p>'){
-           data.desc= editor.getHtml();
-           data.desc_1=editor.getText();
-           data.desc_2=JSON.stringify(editor.children);
-          }
-          if(this.params.id){
-            data.id=this.params.id;
-          }
-          this.$axiosUser('post', '/api/pro/post/edit_post',data).then(res => {
-              this.$message.success(data.id? '已编辑':'已添加');
-               this.visible_=false;
-              this.getTableData();
-          })
-        }
-      });
-    },
-    openAdd(index) {
-      this.importErrorInfoShow = true;
-      this.addIndex = index;
-      this.tabTiele = '新建分类';
-      if (index == 2) {
-        this.tabTiele = '编辑分类';
-        this.relationNew = JSON.parse(JSON.stringify(this.tabItem));
-      }
-    },
-    editRelation(){
-      if(!this.relationNew.name){
-        this.$message.error('名称不能为空');
-        return false;
-      }
-      if(this.addIndex==1){
-        delete this.relationNew.id
-      }
-
-      this.$axiosUser('post', '/api/pro/post/edit_post_cate',this.relationNew).then(res => {
-          this.tabItem = JSON.parse(JSON.stringify(this.relationNew));
-          this.$message.success('添加成功');
-          this.getList(this.addIndex==1? true:false);
-      }).finally(()=>{
-         this.importErrorInfoShow = false;
-      })
-    },
-    closeStatistic(){
-        this.$confirm('确定删除该分类', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-            this.$axiosUser('POST', '/api/pro/post/delete_post_cate', { id:this.tabItem.id}).then(res => {
-              this.$message.success('删除成功');
-              this.getList(true);
-            }).finally(()=>{
-                 this.importErrorInfoShow = false;
-            })
-        }).catch(() => {});
-    },
-    // 页面变更
-    handleCurrentChange(val) {
-      this.page = val;
-      this.getTableData();
-    },
-    // 页面跳转
-    handleSizeChange(val) {
-      this.page_size = val;
-      this.getTableData();
-    }
-  },
-  beforeDestroys() {
-    const editor = this.editor;
-    if (editor == null) return;
-    editor.destroy(); // 组件销毁时,及时销毁 editor ,重要!!!
-  },
-};
-</script>
-<style src="@wangeditor/editor/dist/css/style.css"></style>
-<style scoped="scoped" lang="scss">
-  .diy-tip {
-    margin-bottom: 10px;
-    border: 1px solid #67c23a;
-    padding: 20px 16px;
-    p {
-      color: #67c23a !important;
-      font-size: 14px;
-      margin: 0 !important;
-      padding: 4px 0;
-    }
-  }
-.widthAtuo {
-  width: auto !important;
-  height: auto !important;
-}
-.inputDc {
-  position: absolute;
-  top: 0;
-  right: 0;
-  left: 0;
-  bottom: 0;
-  z-index: 9;
-  cursor: pointer;
-}
-.date-picker-width {
-  width: 250px !important;
-}
-.righe-box-times {
-  display: inline-block;
-  width: 60px;
-  height: 30px;
-  text-align: center;
-  line-height: 30px;
-  background-color: #f5f7fa;
-  color: #606266;
-  margin-right: 15px;
-  border-radius: 3px;
-  cursor: pointer;
-  transition: all 0.3s;
-}
-.righe-box-time1 {
-  background-color: #ecf5ff;
-  color: #0089ff;
-}
-.all-derawer ::v-deep.el-drawer {
-  height: 90% !important;
-  border-radius: 10px 10px 0 0;
-  min-width: 1100px !important;
-}
-.all-derawer ::v-deep.el-drawer__header {
-  background-color: #f5f7fa;
-  padding: 12px 20px;
-  margin-bottom: 0px;
-  font-size: 16px;
-}
-.tableDataItem {
-  width: 100px;
-  padding: 16px 0;
-  text-align: center;
-  border-bottom: 1px solid #ebeef5;
-}
-.right-box-Chart {
-  margin-top: 30px;
-}
-.right-title {
-  margin: 0 0 20px 0;
-}
-#move {
-  transition: 0.5s all;
-  display: inline-block;
-  margin: 0 auto;
-  text-align: left;
-  width: auto;
-  // height: 1000px;
-}
-.contentBox {
-  overflow: auto;
-  margin-top: 10px;
-  padding: 10px;
-  min-height: 600px;
-  text-align: center;
-  background-color: #f1f1f1;
-  min-height: calc(100vh - 300px);
-}
-.num {
-  background-color: #fff;
-  width: 30px;
-  height: 30px;
-  text-align: center;
-  line-height: 30px;
-  border-radius: 3px;
-  font-size: 18px;
-  cursor: pointer;
-}
-.box {
-  font-size: 14px;
-  box-sizing: border-box;
-  background-color: #fff;
-  position: relative;
-}
-.main {
-  // margin-top: 30px;
-}
-/* bug: 我在flex布局的元素中使用了elementui的table组件,饿了么的table上会被加一个动态的宽度, 当第一次改变flex元素宽度的时候。table的动态宽度会变化,第二次和以后就不会变化了。*/
-
-
-.main-right {
-  min-width: 800px;
-  padding: 30px;
-  padding-left: 10px;
-  // padding-top: 30px;
-  /* overflow-x: hidden; */
-}
-.main-left {
-  width: 240px;
-  border-radius: 3px;
-  box-sizing: border-box;
-}
-.main-left::after {
-  position: absolute;
-  content: '';
-  width: 1px;
-  height: auto;
-  left: 220px;
-  top: 0;
-  bottom: 0;
-  background-color: #f1f1f1;
-}
-::v-deep .has-gutter {
-  // display: none;
-}
-.li {
-  height: 53px;
-  line-height: 53px;
-  padding: 0 20px;
-  border-bottom: 1px solid #f1f1f1;
-  color: #777777;
-  width: 100%;
-}
-.borderBox {
-  -webkit-appearance: none;
-  background-color: #fff;
-  background-image: none;
-  border-radius: 4px;
-  border: 1px solid #dcdfe6;
-  -webkit-box-sizing: border-box;
-  box-sizing: border-box;
-  color: #c0c4cf;
-  font-size: inherit;
-  height: auto;
-  outline: 0;
-  padding: 0 15px;
-  width: 250px;
-  position: relative;
-  cursor: pointer;
-}
-.borderBox .font-flex-word {
-  color: #606266;
-}
-.li:hover {
-  background-color: #f5f7fa;
-}
-.li:hover .el-icon-more {
-  display: block;
-}
-.index-name {
-  width: 170px;
-}
-.ul {
-  max-height: calc(100vh - 230px);
-  overflow: auto;
-  width: 200px;
-}
-.ul::-webkit-scrollbar {
-  width: 6px;
-  height: 6px;
-}
-.ul:hover::-webkit-scrollbar-thumb {
-  background-color: #ccc;
-}
-.ul::-webkit-scrollbar-track {
-  width: 6px;
-  background-color: #f1f1f1;
-  -webkit-border-radius: 2em;
-  -moz-border-radius: 2em;
-  border-radius: 2em;
-}
-.isActiveLi {
-  background-color: #f5f7fa;
-  color: #409EFF !important;
-  position: relative;
-}
-.isActiveLi::after {
-  width: 3px;
-  content: ' ';
-  background-color: #409EFF;
-  left: 0;
-  bottom: 0;
-  top: 0;
-  position: absolute;
-}
-.item {
-  font-size: 14px;
-  cursor: pointer;
-  padding: 8px;
-  border-bottom: 1px solid #e8e8e8;
-}
-.item:hover {
-  background-color: #f5f7fa;
-}
-.content {
-  padding: 0 10px;
-}
-/* 表格 */
-table {
-	border-collapse: collapse;
-}
-table th,
-table td {
-	border: 1px solid #ccc;
-	min-width: 50px;
-	height: 20px;
-	text-align: left;
-}
-table th {
-	background-color: #f1f1f1;
-	text-align: center;
-}
-
-/* 代码块 */
-pre > code {
-	display: block;
-	border: 1px solid hsl(0, 0%, 91%);
-	border-radius: 4px 4px;
-	text-indent: 0;
-	background-color: #fafafa;
-	padding: 10px;
-	font-size: 14px;
-}
-
-/* 引用 */
-blockquote {
-	display: block;
-	border-left: 8px solid #d0e5f2;
-	padding: 10px 10px;
-	margin: 10px 0;
-	background-color: #f1f1f1;
-}
-
-
-
-/* 分割线 */
-hr {
-	display: block;
-	width: 90%;
-	margin: 20px auto;
-	border: 0;
-	height: 1px;
-	background-color: #ccc;
-}
-</style>