فهرست منبع

更新二期最新代码,已上线正式版

manywhy 1 هفته پیش
والد
کامیت
fedb987ca2
100فایلهای تغییر یافته به همراه4190 افزوده شده و 5618 حذف شده
  1. BIN
      src/assets/step/formulaStep/formula1.png
  2. BIN
      src/assets/step/formulaStep/formula2-1.png
  3. BIN
      src/assets/step/formulaStep/formula2-2.png
  4. BIN
      src/assets/step/formulaStep/formula2-3.png
  5. BIN
      src/assets/step/formulaStep/formula3-1.png
  6. BIN
      src/assets/step/formulaStep/formula3-2.png
  7. BIN
      src/assets/step/formulaStep/formula4-1.png
  8. BIN
      src/assets/step/formulaStep/formula4-2.png
  9. BIN
      src/assets/step/formulaStep/formula4-3.png
  10. BIN
      src/assets/step/formulaStep/formula4-4.png
  11. BIN
      src/assets/step/formulaStep/formula4-5.png
  12. BIN
      src/assets/step/result-input-handle1.png
  13. BIN
      src/assets/step/result-input-handle2.png
  14. BIN
      src/assets/step/result-input-handle3.png
  15. BIN
      src/assets/step/result-input-handle4.png
  16. BIN
      src/assets/step/result-input-handle5.png
  17. BIN
      src/assets/step/step.png
  18. BIN
      src/assets/step/target-confirm-handle1.png
  19. BIN
      src/assets/step/target-confirm-handle2.png
  20. BIN
      src/assets/step/target-confirm-handle3.png
  21. BIN
      src/assets/step/target-confirm-handle4.png
  22. BIN
      src/assets/step/target-confirm-handle5.png
  23. BIN
      src/assets/step/templateDetail/resultInput.png
  24. BIN
      src/assets/step/templateDetail/review.png
  25. BIN
      src/assets/step/templateDetail/score.png
  26. BIN
      src/assets/step/templateDetail/scoreEachOther.png
  27. BIN
      src/assets/step/templateDetail/selfScore.png
  28. BIN
      src/assets/step/templateDetail/setting-flow-tips.png
  29. BIN
      src/assets/step/templateDetail/targetConfirm.png
  30. BIN
      src/assets/step/workbench/last-performance.png
  31. BIN
      src/assets/step/workbench/mock-data.png
  32. BIN
      src/assets/step/workbench/more.png
  33. BIN
      src/assets/step/workbench/old-perfermance.png
  34. BIN
      src/assets/step/workbench/performance-detail.png
  35. BIN
      src/assets/step/workbench/result-input.png
  36. BIN
      src/assets/step/workbench/review-details.png
  37. BIN
      src/assets/step/workbench/review-list.png
  38. BIN
      src/assets/step/workbench/review.png
  39. BIN
      src/assets/step/workbench/score.png
  40. BIN
      src/assets/step/workbench/self-score.png
  41. BIN
      src/assets/step/workbench/target-confirm.png
  42. 1 1
      src/components/UserImage.vue
  43. 134 0
      src/components/system/Interface.vue
  44. 3 2
      src/components/system/SystemMessageTwo.vue
  45. 51 32
      src/index.vue
  46. 230 148
      src/newPerformance/components/IndicatorSetting.vue
  47. 17 20
      src/newPerformance/components/IndicatorSetting/PerResultInputSelectorOnly.vue
  48. 97 0
      src/newPerformance/components/IndicatorSetting/PerScoreEachOther.vue
  49. 3 0
      src/newPerformance/components/IndicatorSetting/PerScoreEachOtherOnly.vue
  50. 102 0
      src/newPerformance/components/IndicatorSetting/PerScoreSelf.vue
  51. 3 0
      src/newPerformance/components/IndicatorSetting/PerScoreSelfOnly.vue
  52. 223 84
      src/newPerformance/components/IndicatorSetting/PerScoresSelector.vue
  53. 212 73
      src/newPerformance/components/IndicatorSetting/PerScoresSelectorOnly.vue
  54. 7 2
      src/newPerformance/components/IndicatorSetting/PerTargetConfirmSelectorOnly.vue
  55. 34 21
      src/newPerformance/components/IndicatorSetting/UploadPublish.vue
  56. 35 15
      src/newPerformance/components/IndicatorSetting/UploadPublish2.vue
  57. 156 52
      src/newPerformance/components/MyPerformance.vue
  58. 822 0
      src/newPerformance/components/MyPerformance/AddIndicator copy.vue
  59. 372 55
      src/newPerformance/components/MyPerformance/AddIndicator.vue
  60. 30 9
      src/newPerformance/components/MyPerformance/ExamineLog.vue
  61. 102 0
      src/newPerformance/components/MyPerformance/IndicatorList.vue
  62. 94 63
      src/newPerformance/components/MyPerformance/ResetNode.vue
  63. 1 1
      src/newPerformance/components/MyPerformance/SelectExamine.vue
  64. 3 3
      src/newPerformance/components/OrganizationExamine.vue
  65. 0 347
      src/newPerformance/components/PerCcSelector.vue
  66. 0 362
      src/newPerformance/components/PerCcSelectorOnly.vue
  67. 0 104
      src/newPerformance/components/PerEmployeeSelector.vue
  68. 0 367
      src/newPerformance/components/PerResultInputSelector.vue
  69. 0 382
      src/newPerformance/components/PerResultInputSelectorOnly.vue
  70. 0 424
      src/newPerformance/components/PerReviewsSelector.vue
  71. 0 442
      src/newPerformance/components/PerReviewsSelectorOnly.vue
  72. 0 428
      src/newPerformance/components/PerScoresSelector.vue
  73. 0 446
      src/newPerformance/components/PerScoresSelectorOnly.vue
  74. 0 426
      src/newPerformance/components/PerTargetConfirmSelector.vue
  75. 0 447
      src/newPerformance/components/PerTargetConfirmSelectorOnly.vue
  76. 0 139
      src/newPerformance/components/PerformSetting copy 2.vue
  77. 0 296
      src/newPerformance/components/PerformSetting copy 3.vue
  78. 0 84
      src/newPerformance/components/PerformSetting copy.vue
  79. 143 93
      src/newPerformance/components/ProcessTracking.vue
  80. 16 11
      src/newPerformance/components/PublicComp/AIAssistant.vue
  81. 1 53
      src/newPerformance/components/PublicComp/ShowHanderDialog2.vue
  82. 62 0
      src/newPerformance/components/PublicComp/VerifyDialog copy.vue
  83. 62 0
      src/newPerformance/components/PublicComp/VerifyDialog.vue
  84. 3 3
      src/newPerformance/components/ResultAnalysis.vue
  85. 139 3
      src/newPerformance/components/TemplateDetails/BatchHandleNode.vue
  86. 189 18
      src/newPerformance/components/TemplateDetails/FormulaComp.vue
  87. 105 0
      src/newPerformance/components/TemplateDetails/ReferenceContent.vue
  88. 1 3
      src/newPerformance/components/TemplateDetails/ResultInput.vue
  89. 1 0
      src/newPerformance/components/TemplateDetails/ScoreEachOther.vue
  90. 7 4
      src/newPerformance/components/TemplateDetails/ScoreSelf.vue
  91. 134 2
      src/newPerformance/components/TemplateDetails/Scores.vue
  92. 0 1
      src/newPerformance/components/TemplateDetails/TargetConfirms.vue
  93. 1 1
      src/newPerformance/components/TemplateMixedPublish.vue
  94. 0 2
      src/newPerformance/components/UploadPublish.vue
  95. 231 57
      src/newPerformance/components/Workbench.vue
  96. 62 38
      src/newPerformance/components/Workbench/EditNode.vue
  97. 15 17
      src/newPerformance/components/Workbench/IndicatorList.vue
  98. 7 7
      src/newPerformance/components/Workbench/MoreIndicatorList.vue
  99. 24 0
      src/newPerformance/utils/formulaStep.js
  100. 255 30
      src/newPerformance/utils/indicatorSettingStep.js

BIN
src/assets/step/formulaStep/formula1.png


BIN
src/assets/step/formulaStep/formula2-1.png


BIN
src/assets/step/formulaStep/formula2-2.png


BIN
src/assets/step/formulaStep/formula2-3.png


BIN
src/assets/step/formulaStep/formula3-1.png


BIN
src/assets/step/formulaStep/formula3-2.png


BIN
src/assets/step/formulaStep/formula4-1.png


BIN
src/assets/step/formulaStep/formula4-2.png


BIN
src/assets/step/formulaStep/formula4-3.png


BIN
src/assets/step/formulaStep/formula4-4.png


BIN
src/assets/step/formulaStep/formula4-5.png


BIN
src/assets/step/result-input-handle1.png


BIN
src/assets/step/result-input-handle2.png


BIN
src/assets/step/result-input-handle3.png


BIN
src/assets/step/result-input-handle4.png


BIN
src/assets/step/result-input-handle5.png


BIN
src/assets/step/step.png


BIN
src/assets/step/target-confirm-handle1.png


BIN
src/assets/step/target-confirm-handle2.png


BIN
src/assets/step/target-confirm-handle3.png


BIN
src/assets/step/target-confirm-handle4.png


BIN
src/assets/step/target-confirm-handle5.png


BIN
src/assets/step/templateDetail/resultInput.png


BIN
src/assets/step/templateDetail/review.png


BIN
src/assets/step/templateDetail/score.png


BIN
src/assets/step/templateDetail/scoreEachOther.png


BIN
src/assets/step/templateDetail/selfScore.png


BIN
src/assets/step/templateDetail/setting-flow-tips.png


BIN
src/assets/step/templateDetail/targetConfirm.png


BIN
src/assets/step/workbench/last-performance.png


BIN
src/assets/step/workbench/mock-data.png


BIN
src/assets/step/workbench/more.png


BIN
src/assets/step/workbench/old-perfermance.png


BIN
src/assets/step/workbench/performance-detail.png


BIN
src/assets/step/workbench/result-input.png


BIN
src/assets/step/workbench/review-details.png


BIN
src/assets/step/workbench/review-list.png


BIN
src/assets/step/workbench/review.png


BIN
src/assets/step/workbench/score.png


BIN
src/assets/step/workbench/self-score.png


BIN
src/assets/step/workbench/target-confirm.png


+ 1 - 1
src/components/UserImage.vue

@@ -123,7 +123,7 @@ export default {
   },
   // 组件挂载完成
   mounted() {
-    // this.name_no();
+    this.name_no();
   }
 };
 </script>

+ 134 - 0
src/components/system/Interface.vue

@@ -0,0 +1,134 @@
+<template>
+    <div>
+        <!-- 对外接口 {{ decrypted }} -->
+        <el-button type="primary" @click="updateAk()" style="margin-bottom: 20px;">更新秘钥</el-button>
+        <el-table v-loading="loading" :data="tableData" style="width: 100%" border
+            :header-cell-style="{ background: '#f5f7fa' }">
+            <!-- 解密后的秘钥 -->
+            <el-table-column prop="decryptedKey" label="秘钥" align="center">
+                <template slot-scope="scope">
+                    {{ hideSensitiveInfo(scope.row.decryptedKey) }}
+                </template>
+            </el-table-column>
+            <!-- <el-table-column prop="k" label="解密秘钥" align="center">
+            </el-table-column> -->
+            <el-table-column label="操作" align="center">
+                <el-link type="primary" @click="copy()">复制秘钥</el-link>
+                <el-link type="primary" @click="getDoc()">接口文档</el-link>
+            </el-table-column>
+        </el-table>
+    </div>
+</template>
+
+<script>
+import { mapGetters } from 'vuex';
+import CryptoJS from 'crypto-js';
+export default {
+    data() {
+        return {
+            tableData: [],
+            loading: false,
+        }
+    },
+
+    computed: {
+        ...mapGetters(['site_info', 'user_info']),
+        // decrypted() {
+        //     if (!(this.tableData && this.tableData.length > 0)) return "";
+
+        //     const keyBytes = CryptoJS.enc.Base64.parse(this.tableData[0].k);
+
+        //     const res = CryptoJS.AES.decrypt(this.tableData[0].v, keyBytes, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })
+
+        //     return res.toString(CryptoJS.enc.Utf8);
+        // }
+    },
+
+    filter: {},
+    created() {
+        this.getAk();
+    },
+    methods: {
+        // 获取秘钥
+        getAk() {
+            this.loading = true
+            let url = `/org/ak/${this.user_info.site_id}`
+            this.$axiosUser('get', url).then(res => {
+                this.loading = false
+                if (res.data.code) {
+                    if (res.data.data) {
+                        this.tableData.push(res.data.data)
+                        if (!(this.tableData && this.tableData.length > 0)) return
+                        this.tableData.forEach(item => {
+                            const keyBytes = CryptoJS.enc.Base64.parse(item.k); // 对称解密秘钥
+                            // 用秘钥解密
+                            const res = CryptoJS.AES.decrypt(item.v, keyBytes, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })
+                            item.decryptedKey = res.toString(CryptoJS.enc.Utf8)
+                        })
+                    }
+                } else {
+                    this.$message.error("获取数据失败")
+                }
+            })
+        },
+
+        // 更新秘钥key
+        updateAk() {
+            this.loading = true
+            let url = `/org/ak/${this.user_info.site_id}`
+            this.$axiosUser('post', url).then(res => {
+                this.loading = false
+                this.tableData = [];
+                if (res.data.code) {
+                    if (res.data.data) {
+                        this.tableData.push(res.data.data)
+                        if (!(this.tableData && this.tableData.length > 0)) return
+                        this.tableData.forEach(item => {
+                            const keyBytes = CryptoJS.enc.Base64.parse(item.k); // 对称解密秘钥
+                            // 用秘钥解密
+                            const res = CryptoJS.AES.decrypt(item.v, keyBytes, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })
+                            item.decryptedKey = res.toString(CryptoJS.enc.Utf8)
+                        })
+                    }
+                } else {
+                    this.$message.error("获取数据失败")
+                }
+            })
+        },
+
+        copy() {
+            if (!(this.tableData && this.tableData.length > 0)) return
+            //创建input标签
+            var input = document.createElement('input')
+            //将input的值设置为需要复制的内容
+            input.value = this.tableData[0].decryptedKey;
+            //添加input标签
+            document.body.appendChild(input)
+            //选中input标签
+            input.select()
+            //执行复制
+            document.execCommand('copy')
+            //成功提示信息
+            this.$message.success('已复制')
+            //移除input标签
+            document.body.removeChild(input)
+        },
+
+        getDoc() {
+            window.open('https://new.gdy.g107.com/system/doc');
+        },
+
+        // 显示星号
+        hideSensitiveInfo(value, start = 5, end = 5) {
+            if (!value) return '';
+            const length = value.length;
+            const visibleStart = value.slice(0, start);
+            const visibleEnd = value.slice(length - end);
+            const stars = '*'.repeat(length - start - end);
+            return `${visibleStart}${stars}${visibleEnd}`;
+        }
+    }
+}
+</script>
+
+<style scoped lang="scss"></style>

+ 3 - 2
src/components/system/SystemMessageTwo.vue

@@ -31,12 +31,12 @@
             </div>
         </div>
         <div style="width: 400px;text-align: center;margin-top: 30px;">
-          <el-button type="primary" plain style="width: 40%;" @click="innerVisible=true">联系客服开通/续费</el-button>
+          <el-button type="primary" plain style="width: 40%;" @click="innerVisible = true">联系客服开通/续费</el-button>
         </div>
       </div>
       <el-dialog :close-on-click-modal="false" title="客服" :visible.sync="innerVisible" width="400px" append-to-body class="innerVisible">
         <p style="margin:0;font-size:18px;">微信扫码添加功道云客服进行咨询</p>
-        <img src="static/images/code2.png" style="width:100%" />
+        <img src="static/images/code2.png" style="width: 100%;" />
         <p style="font-size:20px;">电话咨询:400-6877-880</p>
       </el-dialog>
   </div>
@@ -78,6 +78,7 @@ export default {
       this.getSiteInfo()
     }
   },
+
   mounted() {
     this.getSiteInfo()
   },

+ 51 - 32
src/index.vue

@@ -2,24 +2,31 @@
   <div class="box-all" v-loading="loading">
     <el-header>
       <div class="flex-box" style="height: 60px;box-shadow: 0 1px 4px rgba(0,21,41,.08);">
-        <div  @click="homeUrl" class="logo-box flex-box flex-center-center">
-          <img v-if="site_info.logo_url"  :src="site_info.logo_url" class="logo"/>
+        <div @click="homeUrl" class="logo-box flex-box flex-center-center">
+          <img v-if="site_info.logo_url" :src="site_info.logo_url" class="logo" />
           <img v-else src="static/images/logo3.png" class="logo" />
         </div>
+
         <div class="flex-1 flex-box-ce" style="padding: 0 20px;" v-if="site_info.name">
           <el-dropdown @command="handleCommand">
-            <div class="cursor black" style="font-size: 18px;font-weight: 600;">{{ site_info.name }}<i class="el-icon-caret-bottom"></i></div>
+            <div class="cursor black" style="font-size: 18px;font-weight: 600;">{{ site_info.name }}<i
+                class="el-icon-caret-bottom"></i></div>
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item v-for="(group, index) in companyList" v-if="!group.isNoShow" :key="index" :label="group.label" :divided="group.id == 1 || group.id == 2" :class="{ active: site_info.id==group.id }" :command="group">
-                <span v-if="group.id == 2"><i class="el-icon-circle-plus" style="margin-right: 10px;"></i>{{ group.name }}</span>
-                <span v-else-if="group.id == 1"> <i class="el-icon-setting" style="margin-right: 10px;"></i>{{ group.name }}</span>
-                <span v-else>{{ group.name }}<i v-if="group.isSelect" class="el-icon-check" style="margin-left: 10px;"></i></span>
+              <el-dropdown-item v-for="(group, index) in companyList" v-if="!group.isNoShow" :key="index"
+                :label="group.label" :divided="group.id == 1 || group.id == 2"
+                :class="{ active: site_info.id==group.id }" :command="group">
+                <span v-if="group.id == 2"><i class="el-icon-circle-plus" style="margin-right: 10px;"></i>{{ group.name
+                  }}</span>
+                <span v-else-if="group.id == 1"> <i class="el-icon-setting" style="margin-right: 10px;"></i>{{
+                  group.name }}</span>
+                <span v-else>{{ group.name }}<i v-if="group.isSelect" class="el-icon-check"
+                    style="margin-left: 10px;"></i></span>
               </el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
 
           <div style="margin-left: 20px;">
-            <el-popover v-if="isAdministrator" placement="bottom"  width="364"  trigger="hover">
+            <el-popover v-if="isAdministrator" placement="bottom" width="364" trigger="hover">
               <SystemMessage></SystemMessage>
               <div slot="reference" class="count_max">{{ site_info.user_count_max }}用户 </div>
             </el-popover>
@@ -29,27 +36,33 @@
             <div class="flex-box-ce">
               <div v-for="(item, index) in icons" :key="index" class="icon-item" @click="iconActive(item.id)">
                 <div class="flex-box-ce" v-if="item.id!=3">
-                  <svg-icon :icon-class="item.icon" style="font-size: 18px;position: relative;top: 1px;right:2px"></svg-icon>  <span>{{ item.name }}</span>
+                  <svg-icon :icon-class="item.icon"
+                    style="font-size: 18px;position: relative;top: 1px;right:2px"></svg-icon> <span>{{ item.name
+                    }}</span>
                 </div>
-                <el-popover v-else placement="bottom"  width="240"  trigger="hover">
+                <el-popover v-else placement="bottom" width="240" trigger="hover">
                   <div class="flex-box-v flex-center-center">
                     <img src="static/images/code.png" alt="" style="width: 220px;">
                     <div style="margin-top: 10px;" class="fontColorC">扫码下载手机版</div>
                   </div>
-                 <div class="flex-box-ce"  slot="reference">
-                   <svg-icon :icon-class="item.icon" style="font-size: 18px;position:relative;top: 1px;right:2px"></svg-icon>  <span>{{ item.name }}</span>
-                 </div>
+                  <div class="flex-box-ce" slot="reference">
+                    <svg-icon :icon-class="item.icon"
+                      style="font-size: 18px;position:relative;top: 1px;right:2px"></svg-icon> <span>{{ item.name
+                      }}</span>
+                  </div>
                 </el-popover>
               </div>
             </div>
             <!-- 切换公司或退出账号 -->
             <el-dropdown @command="handleCommand2">
               <span class="el-dropdown-link" style="cursor: pointer;">
-                <userImage class="user_img"  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">
-                  <span v-if="group.id == 2" class="red"><i class="el-icon-warning" style="margin-right: 10px;"></i>{{ group.name }}</span>
+                <el-dropdown-item v-for="(group, index) in userConcent" :key="index" :command="group">
+                  <span v-if="group.id == 2" class="red"><i class="el-icon-warning" style="margin-right: 10px;"></i>{{
+                    group.name }}</span>
                 </el-dropdown-item>
               </el-dropdown-menu>
             </el-dropdown>
@@ -62,9 +75,10 @@
       <div class="main-left">
         <div class="flex-box-v flex-center-center">
           <template v-for="(item,index) in menuArr">
-            <div class="flex-box-v menu-item" v-if="item.show" :class="{'menu-active':menuIndex==item.index,[item.class]:item.class}"  @click="openUrl(item)">
-                <svg-icon :icon-class="item.icon" class="svgIcon"></svg-icon>
-                <span style="margin-top: 5px;">{{ item.name }}</span>
+            <div class="flex-box-v menu-item" v-if="item.show"
+              :class="{'menu-active':menuIndex==item.index,[item.class]:item.class}" @click="openUrl(item)">
+              <svg-icon :icon-class="item.icon" class="svgIcon"></svg-icon>
+              <span style="margin-top: 5px;">{{ item.name }}</span>
             </div>
           </template>
         </div>
@@ -72,29 +86,30 @@
       <el-main class="main-content">
         <router-view />
       </el-main>
+      <AIAssistant></AIAssistant>
     </el-container>
 
-    <el-dialog :close-on-click-modal="false" title="客服" :visible.sync="innerVisible" width="400px" append-to-body class="innerVisible">
+    <el-dialog :close-on-click-modal="false" title="客服" :visible.sync="innerVisible" width="400px" append-to-body
+      class="innerVisible">
       <p style="margin:0;font-size:18px;">微信扫码添加功道云客服进行咨询</p>
       <img src="static/images/code2.png" style="width:100%" />
       <p style="font-size:20px;">电话咨询:400-6877-880</p>
     </el-dialog>
 
-    <el-dialog :close-on-click-modal="false" title="创建新企业" :visible.sync="StartAnewBusiness" width="40%" :before-close="handleClose">
+    <el-dialog :close-on-click-modal="false" title="创建新企业" :visible.sync="StartAnewBusiness" width="40%"
+      :before-close="handleClose">
       <el-form :model="rejectForm" ref="rejectForm" label-width="80px" v-loading="rejectLoading">
-        <el-form-item
-          label="企业名称"
-          prop="StartAnewBusinessName"
-          :rules="[
+        <el-form-item label="企业名称" prop="StartAnewBusinessName" :rules="[
             { required: true, message: '请输入企业名称', trigger: 'blur' },
             { min: 3, max: 30,message: '长度在 3 到 30 个字符', trigger: 'blur'}
-          ]"
-        >
-          <el-input type="textarea" placeholder="公司名/组织名称" v-model="rejectForm.StartAnewBusinessName" maxlength="30" show-word-limit></el-input>
+          ]">
+          <el-input type="textarea" placeholder="公司名/组织名称" v-model="rejectForm.StartAnewBusinessName" maxlength="30"
+            show-word-limit></el-input>
         </el-form-item>
         <el-form-item label="企业规模" prop="remark">
           <el-select v-model="rejectForm.StartAnewBusinessVal" placeholder="请选择">
-            <el-option v-for="item in StartAnewBusinessPeople" :key="item.value" :label="item.label" :value="item.value"></el-option>
+            <el-option v-for="item in StartAnewBusinessPeople" :key="item.value" :label="item.label"
+              :value="item.value"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item>
@@ -112,7 +127,8 @@
       <el-dialog title="系统公告" :visible.sync="updateVisible" width="700px" top="10vh">
         <b style="font-size:16px;margin:0 0 10px 0;display: inline-block;">{{ announcement.title }}</b>
         <div class="announDetails" style="padding:0 0 0 0" v-html="announcement.content"></div>
-        <span slot="footer" class="dialog-footer"><el-button @click="openNotice" type="primary" round>查看详情</el-button></span>
+        <span slot="footer" class="dialog-footer"><el-button @click="openNotice" type="primary"
+            round>查看详情</el-button></span>
       </el-dialog>
     </div>
   </div>
@@ -125,8 +141,10 @@ import { setToken, returnJSEncrypt,_debounce } from '@/utils/auth';
 import Suggest from '@/components/Suggest';
 import SystemMessage from '@/components/SystemMessage';
 import axios from 'axios';
+import AIAssistant from '@/newPerformance/components/PublicComp/AIAssistant.vue';
+
 export default {
-  components: { Suggest,SystemMessage },
+  components: { Suggest, SystemMessage, AIAssistant },
   data() {
     return {
       menuArr:[],
@@ -171,8 +189,9 @@ export default {
     };
   },
   computed: {
-    ...mapGetters(['site_info','account_info'])
+    ...mapGetters(['site_info', 'account_info'])
   },
+
   watch: {
     $route(to, from) {
       var str = to.path;

+ 230 - 148
src/newPerformance/components/IndicatorSetting.vue

@@ -3,15 +3,16 @@
         <div class="create-methods flex-box-ce">
 
             <div class="flex-box-ce">
-                <div class="method-item" v-for="(item, index) in methods"
-                    :class="currentIndex === index ? 'active' : ''" :key="item.id"
+                <div class="method-item"  v-for="(item, index) in methods"
+                    :class="[currentIndex === index ? 'active' : '', 'method-item' + index]" :key="item.id"
                     @click="changeMethod(item.id, index)">
                     {{ item.title }}
                 </div>
             </div>
-            <el-tooltip effect="dark" content="教程指引" placement="top">
+            
+            <el-tooltip v-if="method == 1" effect="dark" content="教程指引" placement="top">
                 <div class="icon flex-center-center" @click="initStepData()">
-                    <i class="el-icon-document"></i>
+                    <i v-if="method == 1" class="el-icon-document" id="startTour"></i>
                 </div>
             </el-tooltip>
         </div>
@@ -24,7 +25,7 @@
         <div class="setting-content flex-1" v-if="method == 2">
             <UploadPublish />
         </div>
-        
+
         <el-dialog :visible.sync="dialogVisible" title="已创建的指标库" center width="600px">
             <div class="dialog-content">
                 <template v-if="templateList.length > 0">
@@ -50,6 +51,7 @@
 </template>
 
 <script>
+
 import { mapGetters } from 'vuex';
 import TemplateDetails from './IndicatorSetting/TemplateDetails.vue';
 import PublishComp from './IndicatorSetting/PublishComp.vue';
@@ -59,6 +61,7 @@ import UploadPublish2 from './IndicatorSetting/UploadPublish2.vue';
 import indicatorSettingStep from "@/newPerformance/utils/indicatorSettingStep"
 import introJs from 'intro.js'
 import 'intro.js/introjs.css'
+
 export default {
     components: {
         TemplateDetails,
@@ -100,7 +103,7 @@ export default {
     mounted() {
         this.$nextTick(() => {
             if (!localStorage.getItem("isLearned")) {
-                this.startGuide()
+                this.startGuide();
             }
         })
     },
@@ -125,7 +128,7 @@ export default {
                 showProgress: false, /* 是否显示进度条 */
                 scrollToElement: true, /* 是否滑动到高亮的区域 */
                 overlayOpacity: 0.5, // 遮罩层的透明度 0-1之间
-                positionPrecedence: ['bottom', 'top', 'right', 'left'], /* 当位置选择自动的时候,位置排列的优先级 */
+                // positionPrecedence: ['bottom', 'top', 'right', 'left'], /* 当位置选择自动的时候,位置排列的优先级 */
                 disableInteraction: false, /* 是否禁止与元素的相互关联 */
                 hidePrev: true, /* 是否在第一步隐藏上一步 */
                 hidePrev: false,       // 在第一步中是否隐藏上一个按钮
@@ -135,18 +138,18 @@ export default {
                 disableInteraction: true,   // 是否禁用与突出显示的框内的元素的交互,就是禁止点击
                 showBullets: true,        // 是否显示面板指示点
                 // 配置内容 steps数组,内部一个对象代表一个步骤
-                steps: indicatorSettingStep
+                scrollToElement: true, // 自动滚动到目标元素
+                steps: indicatorSettingStep,
             }).onbeforechange((e) => {
-                console.log(e)
-                // if (e.className.includes("choose-btn")) {
-                //     this.$refs.UploadPublish2.openTemplate()
-                // }
-            }).oncomplete(function () {
+                
+            }).oncomplete((e) => {
                 //点击跳过按钮后执行的事件
                 localStorage.setItem("isLearned", true)
-            }).onexit(function () {
+                this.startGuide2()
+            }).onexit((e) => {
                 //点击结束按钮后, 执行的事件
                 localStorage.setItem("isLearned", true)
+                this.startGuide2()
             }).start()
         },
 
@@ -155,6 +158,33 @@ export default {
             setTimeout(() => {
                 this.startGuide();
             }, 300)
+
+            
+        },
+
+        startGuide2() {
+            introJs().setOptions({
+                steps: [
+                    {
+                        element: '#startTour',
+                        intro: '教程已结束。您可以在点击这里重新开始教程。'
+                    }
+                ],
+                overlayOpacity: 0.5, // 遮罩层的透明度 0-1之间
+                showBullets: false,
+                showProgress: false,
+                showStepNumbers: false,
+                tooltipClass: 'intro-tooltip', /* 引导说明文本框的样式 */
+                highlightClass: 'intro-highlight', /* 说明高亮区域的样式 */
+                exitOnEsc: true, /* 是否使用键盘Esc退出 */
+                exitOnOverlayClick: false, /* 是否允许点击空白处退出 */
+                skipLabel: '知道了',
+                doneLabel: '知道了'
+
+            }).onexit((e) => {
+            }).oncomplete((e) => {
+            }).onbeforechange((e) => {
+            }).start()
         },
 
         changeMethod(id, index) {
@@ -195,6 +225,7 @@ export default {
                 })
             })
         },
+
         cancelDelete() {
             console.log("取消删除");
         },
@@ -247,8 +278,7 @@ export default {
                 ],
                 cateId
             }
-            // let url = `/performance/review/publish/${this.user_info.site_id}`;
-            // console.log(requireParams)
+            
             let url = `/performance/review/publish/templates/${this.user_info.site_id}`;
             this.loading = true
             this.$http.post(url, requireParams).then(res => {
@@ -266,158 +296,210 @@ export default {
                 }
             })
         },
+
         activeStep(index, flag = true) {
             this.activeIndex = index;
             if (flag) this.step = index - 1;
         },
+
         changeStep(step) {
             this.activeIndex = step + 1;
         }
     }
 }
 
+
+
+
 </script>
 
 <style lang="scss">
-        .introjs-helperLayer {
-            box-shadow: rgba(33, 33, 33, 0.8) 0px 0px 1px 0px, rgba(33, 33, 33, 0.5) 0px 0px 0px 5000px !important;
-            border: 3px dashed #409eff;
-        }
 
-        /* 调整 intro.js 弹出框的大小 */
-        .introjs-tooltip {
-            width: auto;
-            /* 自动调整宽度 */
-            max-width: 1600px;
-            /* 最大宽度 */
-            height: auto;
-            /* 自动调整高度 */
-            overflow: hidden;
-            /* 防止内容溢出 */
-        }
-    
-        .new-tips {
-            color: #409eff;
-            line-height: 80px;
-            cursor: pointer;
-        }
-    
-        .introjs-tooltip-title {
-            font-size: 16px;
-            width: 80%;
-            padding-top: 10px;
-        }
-    
-        .warper {
-            width: 200px;
-            height: 100px;
-            line-height: 100px;
-            text-align: center;
-            border: 1px solid saddlebrown;
-        }
-    
-        /* 重置引导组件样式(类似element-ui个人使用) */
-        .intro-tooltip {
-            color: #ffff;
-            background: #2c3e50;
-        }
-    
-        /* 引导提示框的位置 */
-        .introjs-bottom-left-aligned {
-            left: 45% !important;
-        }
-    
-        .introjs-right,
-        .introjs-left {
-            top: 30%;
-        }
-    
-        .intro-highlight {
-            background: rgba(255, 255, 255, 0.5);
-        }
-    
-        .introjs-arrow.left {
-            border-right-color: #2c3e50;
-        }
-    
-        .introjs-arrow.top {
-            border-bottom-color: #2c3e50;
-        }
-    
-        .introjs-arrow.right {
-            border-left-color: #2c3e50;
-        }
-    
-        .introjs-arrow.bottom {
-            border-top-color: #2c3e50;
-        }
-    
-        /* 提示框头部区域 */
-        .introjs-tooltip-header {
-            padding-right: 0 !important;
-            padding-top: 0 !important;
-        }
-    
-        .introjs-skipbutton {
-            color: #409eff !important;
-            font-size: 14px !important;
-            font-weight: normal !important;
-            //   padding: 8px 10px !important ;
-        }
-    
-        .introjs-tooltipbuttons {
-            border: none !important;
-        }
-    
-        .introjs-tooltiptext {
-            font-size: 14px !important;
-            padding: 15px !important;
-        }
-    
-        /* 提示框按钮 */
-        .introjs-tooltipbuttons {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-        }
-    
-        .introjs-button {
-            width: 50px !important;
-            text-align: center;
-            padding: 4px !important;
-            font-size: 12px !important;
-            font-weight: 500 !important;
-            border-radius: 3px !important;
-            border: none !important;
-        }
-    
-        .introjs-button:last-child {
-            margin-left: 10px;
-        }
-    
-        .introjs-prevbutton {
-            color: #606266 !important;
-            background: #fff !important;
-            border: 1px solid #dcdfe6 !important;
-        }
-    
-        .introjs-nextbutton {
-            color: #fff !important;
-            background-color: #409eff !important;
-            border-color: #409eff !important;
-        }
-    
-        .introjs-disabled {
-            color: #9e9e9e !important;
-            border-color: #bdbdbd !important;
-            background-color: #f4f4f4 !important;
-        }
+.introjs-helperLayer {
+    box-shadow: rgba(33, 33, 33, 0.8) 0px 0px 1px 0px, rgba(33, 33, 33, 0.5) 0px 0px 0px 5000px !important;
+    border: 3px dashed #409eff;
+}
+
+/* 调整 intro.js 弹出框的大小 */
+.introjs-tooltip {
+    width: auto;
+    /* 自动调整宽度 */
+    max-width: 1600px;
+    /* 最大宽度 */
+    height: auto;
+    /* 自动调整高度 */
+    overflow: hidden;
+    /* 防止内容溢出 */
+}
+
+.new-tips {
+    color: #409eff;
+    line-height: 80px;
+    cursor: pointer;
+}
+
+.introjs-tooltip-title {
+    font-size: 16px;
+    width: 80%;
+    padding-top: 10px;
+}
+
+.warper {
+    width: 200px;
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+    border: 1px solid saddlebrown;
+}
+
+/* 重置引导组件样式(类似element-ui个人使用) */
+.intro-tooltip {
+    color: #ffff;
+    background: #2c3e50;
+}
+
+/* 引导提示框的位置 */
+.introjs-bottom-left-aligned {
+    left: 45% !important;
+}
+
+.introjs-right,
+.introjs-left {
+    top: 30%;
+}
+
+.intro-highlight {
+    background: rgba(255, 255, 255, 0.5);
+}
+
+.introjs-arrow.left {
+    border-right-color: #2c3e50;
+}
+
+.introjs-arrow.top {
+    border-bottom-color: #2c3e50;
+}
+
+.introjs-arrow.right {
+    border-left-color: #2c3e50;
+}
+
+.introjs-arrow.bottom {
+    border-top-color: #2c3e50;
+}
+
+/* 提示框头部区域 */
+.introjs-tooltip-header {
+    padding-right: 0 !important;
+    padding-top: 0 !important;
+}
+
+.introjs-skipbutton {
+    color: #409eff !important;
+    font-size: 14px !important;
+    font-weight: normal !important;
+    //   padding: 8px 10px !important ;
+}
+
+.introjs-tooltipbuttons {
+    border: none !important;
+}
+
+.introjs-tooltiptext {
+    font-size: 14px !important;
+    padding: 15px !important;
+}
+
+/* 提示框按钮 */
+.introjs-tooltipbuttons {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+
+.introjs-button {
+    width: 50px !important;
+    text-align: center;
+    padding: 4px !important;
+    font-size: 12px !important;
+    font-weight: 500 !important;
+    border-radius: 3px !important;
+    border: none !important;
+}
+
+.introjs-button:last-child {
+    margin-left: 10px;
+}
+
+.introjs-prevbutton {
+    color: #606266 !important;
+    background: #fff !important;
+    border: 1px solid #dcdfe6 !important;
+}
+
+.introjs-nextbutton {
+    color: #fff !important;
+    background-color: #409eff !important;
+    border-color: #409eff !important;
+}
+
+.introjs-disabled {
+    color: #9e9e9e !important;
+    border-color: #bdbdbd !important;
+    background-color: #f4f4f4 !important;
+}
 </style>
 
 
 <style scoped lang="scss">
 
 
+.carousel {
+    position: relative;
+    width: 100%;
+    max-width: 600px;
+    margin: 0 auto;
+    overflow: hidden;
+}
+
+.carousel-inner {
+    display: flex;
+    transition: transform 0.5s ease;
+}
+
+.carousel-item {
+    min-width: 100%;
+    background-size: cover;
+    background-position: center;
+}
+
+.carousel-item img {
+    width: 100%;
+    height: auto;
+}
+
+.prev,
+.next {
+    position: absolute;
+    top: 50%;
+    transform: translateY(-50%);
+    background-color: rgba(0, 0, 0, 0.5);
+    color: white;
+    border: none;
+    padding: 10px;
+    cursor: pointer;
+    z-index: 10;
+}
+
+.prev {
+    left: 10px;
+}
+
+.next {
+    right: 10px;
+}
+
+
 .dialog-content {
     width: 100%;
     height: 500px;

+ 17 - 20
src/newPerformance/components/IndicatorSetting/PerResultInputSelectorOnly.vue

@@ -1,6 +1,6 @@
 <template>
   <el-dialog :visible.sync="innerVisible" @close="handleClose" @open="initData" @closed="dataReset" append-to-body
-    :close-on-click-modal="false" center title="结果录入节点配置" width="600px">
+    :close-on-click-modal="false" center title="结果录入节点配置" width="600px" class="result-input-dialog">
     <el-form v-if="currentNode" label-width="200">
       <el-form-item label="启用">
         <el-switch v-model="currentNode.enable" />
@@ -57,25 +57,22 @@
           </template>
         </el-form-item>
       </div>
-        <el-form-item label="多人时">
-          <el-radio-group v-model="currentNode.multipleType" :disabled="!currentNode.enable">
-            <el-radio-button label="or">任一人确认(或签)</el-radio-button>
-            <el-radio-button label="parallel">按顺序确认(会签)</el-radio-button>
-            <el-radio-button label="sequence">同时确认(会签)</el-radio-button>
-          </el-radio-group>
-          <div class="flex-center-center fontColorC" style="margin-left: 100px;">
-            ( <span style="color: red;"> * </span><span>会签要求所有审批人一致同意</span> )
-          </div>
-          <div class="flex-center-center fontColorC" style="margin-left: 100px;">
-            ( <span style="color: red;"> * </span><span>或签只需任一审批人同意即可</span> )
-          </div>
-        </el-form-item>
+      <el-form-item label="多人时">
+        <el-radio-group v-model="currentNode.multipleType" :disabled="!currentNode.enable">
+          <el-radio-button label="or">任一人确认(或签)</el-radio-button>
+          <el-radio-button label="parallel">按顺序确认(会签)</el-radio-button>
+          <el-radio-button label="sequence">同时确认(会签)</el-radio-button>
+        </el-radio-group>
+        <div class="flex-center-center fontColorC" style="margin-left: 100px;">
+          ( <span style="color: red;"> * </span><span>会签要求所有审批人一致同意</span> )
+        </div>
+        <div class="flex-center-center fontColorC" style="margin-left: 100px;">
+          ( <span style="color: red;"> * </span><span>或签只需任一审批人同意即可</span> )
+        </div>
+      </el-form-item>
 
-        <el-form-item label="允许">
-        <el-checkbox-group
-          v-model="currentNode.allows"
-          :disabled="!currentNode.enable"
-        >
+      <el-form-item label="允许">
+        <el-checkbox-group v-model="currentNode.allows" :disabled="!currentNode.enable">
           <el-checkbox-button label="transfer">转交</el-checkbox-button>
         </el-checkbox-group>
       </el-form-item>
@@ -300,7 +297,7 @@ export default {
       this.deptSelected = v;
     },
     onConfirm(){
-      this.$emit('confirm',this.currentNode);
+      this.$emit('confirm', this.currentNode);
       this.handleClose();
     },
   }

+ 97 - 0
src/newPerformance/components/IndicatorSetting/PerScoreEachOther.vue

@@ -0,0 +1,97 @@
+<template>
+  <el-dialog :visible.sync="innerVisible" @close="handleClose" @open="initData" @closed="dataReset" append-to-body
+    :close-on-click-modal="false" center title="互评节点配置" width="600px">
+    <el-alert class="bounce animated" type="warning" :title="alertTilte" :closable="false" show-icon
+      style="width: 100%; margin-bottom: 10px;"></el-alert>
+    <el-form v-if="currentNode" label-width="200">
+      <el-form-item label="启用">
+        <el-switch v-model="currentNode.enable" />
+      </el-form-item>
+      <el-form-item label="允许">
+        <el-checkbox-group v-model="currentNode.allows" :disabled="!currentNode.enable">
+          <el-checkbox-button label="transfer">转交</el-checkbox-button>
+        </el-checkbox-group>
+      </el-form-item>
+    </el-form>
+    <template #footer>
+      <el-row type="flex" justify="end">
+        <el-col align="end">
+          <el-button type="primary" @click="onConfirm">
+            确认
+          </el-button>
+        </el-col>
+      </el-row>
+    </template>
+  </el-dialog>
+</template>
+
+
+<script>
+
+export default {
+  name: "PerScoreSelfOnly",
+  props: {
+    showVisible: {
+      type: Boolean,
+      default: false
+    },
+
+    indicator: {
+      type: Object,
+      default: () => {
+        return null
+      }
+    }
+    
+  },
+  data(){
+    return {
+      alertTilte: "互评的评分仅仅作为评分的参考,不会影响指标最终的评分",
+      userInfo: this.$userInfo(),
+      currentNode: null,
+      innerVisible: this.showVisible,
+      loading:false,
+    }
+  },
+  
+  watch:{
+    showVisible(val){
+      this.innerVisible = val;
+    },
+  },
+  methods: {
+    dataReset() {
+      this.currentNode = null
+    },
+    idGeneral() {
+      return Date.now() + Math.floor(Math.random() * 10000);
+    },
+    defaultNode() {
+      const node = JSON.parse("{\"id\":\"SEO_1907236768800382977\",\"type\":\"scoreEachOther\",\"enable\":true,\"assigneeType\":\"self\",\"leaderLevel\":1,\"assigneeIds\":[],\"multipleType\":\"or\",\"allows\":[\"transfer\"],\"weight\":0,\"children\":[]}");
+      node.id = "RI_" + this.idGeneral();
+      return node;
+    },
+    
+    initData() {
+      if (this.loading) return;
+      this.dataReset();
+      this.loading = true;
+      this.currentNode = this.indicator.flow.nodes.find(node => node.type === 'scoreEachOther');
+      this.loading = false;
+    },
+    
+    handleClose(){
+      this.$emit('update:showVisible',false);
+    },
+    
+    onConfirm(){
+      this.$emit('confirm',this.currentNode);
+      this.handleClose();
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 3 - 0
src/newPerformance/components/IndicatorSetting/PerScoreEachOtherOnly.vue

@@ -1,6 +1,8 @@
 <template>
   <el-dialog :visible.sync="innerVisible" @close="handleClose" @open="initData" @closed="dataReset" append-to-body
     :close-on-click-modal="false" center title="互评节点配置" width="600px">
+    <el-alert class="bounce animated" type="warning" :title="alertTilte" :closable="false" show-icon
+      style="width: 100%; margin-bottom: 10px;"></el-alert>
     <el-form v-if="currentNode" label-width="200">
       <el-form-item label="启用">
         <el-switch v-model="currentNode.enable" />
@@ -36,6 +38,7 @@ export default {
   },
   data(){
     return {
+      alertTilte: "互评的评分仅仅作为评分的参考,不会影响指标最终的评分",
       userInfo: this.$userInfo(),
       currentNode: null,
       innerVisible: this.showVisible,

+ 102 - 0
src/newPerformance/components/IndicatorSetting/PerScoreSelf.vue

@@ -0,0 +1,102 @@
+<template>
+  <el-dialog :visible.sync="innerVisible" @close="handleClose" @open="initData" @closed="dataReset" append-to-body
+    :close-on-click-modal="false" center title="自评节点配置" width="600px">
+    <el-alert class="bounce animated" type="warning" :title="alertTilte" :closable="false" show-icon
+      style="width: 100%; margin-bottom: 10px;"></el-alert>
+    <el-form v-if="currentNode" label-width="200">
+
+      <el-form-item label="启用">
+        <el-switch v-model="currentNode.enable" />
+      </el-form-item>
+      <el-form-item label="允许">
+        <el-checkbox-group v-model="currentNode.allows" :disabled="!currentNode.enable">
+          <el-checkbox-button label="transfer">转交</el-checkbox-button>
+        </el-checkbox-group>
+      </el-form-item>
+    </el-form>
+    <template #footer>
+      <el-row type="flex" justify="end">
+        <el-col align="end">
+          <el-button type="primary" @click="onConfirm">
+            确认
+          </el-button>
+        </el-col>
+      </el-row>
+    </template>
+  </el-dialog>
+</template>
+
+
+<script>
+
+export default {
+  name: "PerScoreSelfOnly",
+  props: {
+    showVisible: {
+      type: Boolean,
+      default: false
+    },
+
+    indicator: {
+      type: Object,
+      default: () => {
+        return null
+      }
+    }
+
+  },
+  data(){
+    return {
+      alertTilte: "自评的评分仅仅作为评分的参考,不会影响指标最终的评分",
+      userInfo: this.$userInfo(),
+      currentNode: null,
+      innerVisible: this.showVisible,
+      loading:false,
+    }
+  },
+  
+  watch:{
+    showVisible(val){
+      this.innerVisible = val;
+    },
+  },
+  methods: {
+    dataReset() {
+      this.currentNode = null
+    },
+    idGeneral() {
+      return Date.now() + Math.floor(Math.random() * 10000);
+    },
+    defaultNode() {
+      const node = JSON.parse("{\"id\":\"SS_1907236768800382977\",\"type\":\"scoreSelf\",\"enable\":true,\"assigneeType\":\"self\",\"leaderLevel\":1,\"assigneeIds\":[],\"multipleType\":\"or\",\"allows\":[\"transfer\"],\"weight\":0,\"children\":[]}");
+      node.id = "RI_" + this.idGeneral();
+      return node;
+    },
+    
+    initData() {
+      if (this.loading) return;
+      this.dataReset();
+      this.loading = true;
+      this.currentNode = this.indicator.flow.nodes.find(node => node.type === 'scoreSelf');
+      this.loading = false;
+    },
+    
+    handleClose(){
+      this.$emit('update:showVisible',false);
+    },
+    
+           
+   
+    onConfirm() {
+      console.log("this.currentNode")
+      console.log(this.currentNode)
+      this.$emit('confirm', this.currentNode);
+      this.handleClose();
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 3 - 0
src/newPerformance/components/IndicatorSetting/PerScoreSelfOnly.vue

@@ -1,6 +1,8 @@
 <template>
   <el-dialog :visible.sync="innerVisible" @close="handleClose" @open="initData" @closed="dataReset" append-to-body
     :close-on-click-modal="false" center title="自评节点配置" width="600px">
+    <el-alert class="bounce animated" type="warning" :title="alertTilte" :closable="false" show-icon
+      style="width: 100%; margin-bottom: 10px;"></el-alert>
     <el-form v-if="currentNode" label-width="200">
       <el-form-item label="启用">
         <el-switch v-model="currentNode.enable" />
@@ -36,6 +38,7 @@ export default {
   },
   data(){
     return {
+      alertTilte: "自评的评分仅仅作为评分的参考,不会影响指标最终的评分",
       userInfo: this.$userInfo(),
       currentNode: null,
       innerVisible: this.showVisible,

+ 223 - 84
src/newPerformance/components/IndicatorSetting/PerScoresSelector.vue

@@ -1,97 +1,201 @@
 <template>
   <el-dialog :visible.sync="innerVisible" @close="handleClose" @open="initData" @closed="dataReset" append-to-body
     :close-on-click-modal="false" center title="评分节点配置" width="600px">
-    <el-form v-if="currentNode" label-width="200">
-      <el-form-item label="启用">
-        <el-switch v-model="currentNode.enable" disabled />
-      </el-form-item>
+    <div v-if="currentNode" class="dialog-box" style="position: relative;">
+      <el-popover ref="popoverRef" placement="bottom" trigger="hover">
+        <template #reference>
+          <el-link type="primary" class="reference">
+            <i class="el-icon-s-opportunity"></i>
+            评分示例
+          </el-link>
+        </template>
 
-      <el-form-item label="">
-        <div class="handler-list">
-          <el-tag v-for="(item,index) in currentNode.children" :key="`hl_${index}`"
-            :type="childIndex === index ? '' : 'info'" closable @close="removeChild(index)" @click="childSelect(index)">
-            {{assigneeMap[item.assigneeType] || '未知'}}
-          </el-tag>
-          <el-button v-show="currentNode.enable" icon="el-icon-plus" size="mini" style="margin-bottom: 10px;"
-            @click="addChild" />
+        <div>
+          <p>1、评分节点设置多人评分时,在默认的权重100%状态下,各评价人的评价权重自动均分。</p>
+          <p>举例说明:</p>
+          <table class="base-table">
+            <thead>
+              <tr>
+                <th>评分人</th>
+                <th>负责人</th>
+                <th>评分</th>
+                <th>评分权重</th>
+                <th>公式</th>
+              </tr>
+            </thead>
+            <tbody>
+              <tr>
+                <td>管理员</td>
+                <td>一级管理员</td>
+                <td>90</td>
+                <td>100%</td>
+                <td rowspan="3">
+                  (90 + 100 + 80) / 3 = 90
+                </td>
+              </tr>
+              <tr>
+                <td>指定人</td>
+                <td>张三</td>
+                <td>100</td>
+                <td>100%</td>
+              </tr>
+              <tr>
+                <td>指定人</td>
+                <td>李四</td>
+                <td>80</td>
+                <td>100%</td>
+              </tr>
+
+              <tr>
+                <td>指标最终得分</td>
+                <td colspan="4">90</td>
+              </tr>
+            </tbody>
+          </table>
+
+          <p>2、系统支持不同的评价人设置不同的评价权重,最终指标得分=(各评分人分数*评价权重)之和</p>
+          <p>举例说明:</p>
+          <table class="base-table">
+            <thead>
+              <tr>
+                <th>评分人</th>
+                <th>负责人</th>
+                <th>评分</th>
+                <th>评分权重</th>
+                <th>加权得分</th>
+              </tr>
+            </thead>
+            <tbody>
+              <tr>
+                <td>管理员</td>
+                <td>一级管理员</td>
+                <td>90</td>
+                <td>50%</td>
+                <td>45</td>
+              </tr>
+              <tr>
+                <td>指定人</td>
+                <td>张三</td>
+                <td>100</td>
+                <td>30%</td>
+                <td>30</td>
+
+              </tr>
+              <tr>
+                <td>指定人</td>
+                <td>李四</td>
+                <td>80</td>
+                <td>20%</td>
+                <td>16</td>
+              </tr>
+
+              <tr>
+                <td colspan="4">指标最终得分</td>
+                <td>90</td>
+              </tr>
+            </tbody>
+          </table>
+          <p>公式:90×50%+100×30%+80×20%=91分</p>
         </div>
-      </el-form-item>
-      <el-form-item label="评分人">
-        <el-radio-group v-model="currentNode.children[childIndex].assigneeType" :disabled="!currentNode.enable"
-          @change="onAssigneeTypeChange">
-          <el-radio-button label="leader">组织管理员</el-radio-button>
-          <el-radio-button label="user">指定人员</el-radio-button>
-          <el-radio-button label="self">被考核人</el-radio-button>
-          <el-radio-button label="post">岗位</el-radio-button>
-          <el-radio-button label="deptLeader">部门负责人</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
+      </el-popover>
+      <el-form label-width="200">
+        <el-form-item label="启用">
+          <el-switch v-model="currentNode.enable" disabled />
+        </el-form-item>
 
-      <div class="flex-center-center" style="margin-left: 100px;">
         <el-form-item label="">
-          <template v-if="currentNode.children[childIndex].assigneeType === 'leader'">
-            <el-select v-model="currentNode.children[childIndex].leaderLevel" placeholder="请选择管理员"
-              :disabled="!currentNode.enable" filterable style="width: 300px;" key="leader"
-              @change="onOrgManagerChange">
-              <el-option v-for="item in levelOptions" :key="`leader_${item.value}`" :label="item.label"
-                :value="item.value" style="width: 300px;" />
-            </el-select>
-            <br>
-            <div class="fontColorC">(<span style="color: red"> * </span>被考核人所在部门的直接上级或上上级 )</div>
-                    
-          </template>
-          <template v-if="currentNode.children[childIndex].assigneeType === 'user'">
-            <el-select v-model="userSelected" placeholder="请选择指定人员" multiple :disabled="!currentNode.enable" filterable
-              style="width: 300px;" key="user" @change="onUserChange">
-              <el-option v-for="item in employees" :key="`user_${item.id}`" :label="item.name" :value="item.id"
-                style="width: 300px;" />
-            </el-select>
-            <br>
-            <div class="fontColorC">(<span style="color: red"> * </span>直接选择需要的人员 )</div>
-          </template>
-          <template v-if="currentNode.children[childIndex].assigneeType === 'post'">
-            <el-select v-model="postSelected" placeholder="请选择岗位" multiple :disabled="!currentNode.enable" filterable
-              style="width: 300px;" key="post" @change="onPostChange">
-              <el-option v-for="item in postList" :key="`post_${item.id}`" :label="item.name" :value="item.id"
-                style="width: 300px;" />
-            </el-select>
-            <br>
-            <div class="fontColorC">(<span style="color: red"> * </span>组织架构下,所属岗位的成员 )</div>
-          </template>
-          <template v-if="currentNode.children[childIndex].assigneeType === 'deptLeader'">
-            <el-select v-model="deptSelected" placeholder="请选择部门" multiple :disabled="!currentNode.enable" filterable
-              style="width: 300px;" key="deptLeader" @change="onDeptChange">
-              <el-option v-for="item in deptList" :key="`deptLeader_${item.id}`" :label="item.name" :value="item.id"
-                style="width: 300px;" />
-            </el-select>
-            <br>
-            <div class="fontColorC">(<span style="color: red"> * </span>组织架构中,所设置的部门管理员 )</div>
-          </template>
+          <div class="handler-list">
+            <el-tag v-for="(item,index) in currentNode.children" :key="`hl_${index}`"
+              :type="childIndex === index ? '' : 'info'" closable @close="removeChild(index)"
+              @click="childSelect(index)">
+              {{assigneeMap[item.assigneeType] || '未知'}}
+            </el-tag>
+            <el-button v-show="currentNode.enable" icon="el-icon-plus" size="mini" style="margin-bottom: 10px;"
+              @click="addChild" />
+          </div>
         </el-form-item>
-      </div>
-      <el-form-item label="多人时">
-        <el-radio-group v-model="currentNode.children[childIndex].multipleType" :disabled="!currentNode.enable">
-          <el-radio-button label="or">任一人确认(或签)</el-radio-button>
-          <el-radio-button label="parallel">按顺序确认(会签)</el-radio-button>
-          <el-radio-button label="sequence">同时确认(会签)</el-radio-button>
-        </el-radio-group>
-        <div class="flex-center-center fontColorC" style="margin-left: 100px;">
-          ( <span style="color: red;"> * </span><span>会签要求所有审批人一致同意</span> )
-        </div>
-        <div class="flex-center-center fontColorC" style="margin-left: 100px;">
-          ( <span style="color: red;"> * </span><span>或签只需任一审批人同意即可</span> )
+        <el-form-item label="评分人">
+          <el-radio-group v-model="currentNode.children[childIndex].assigneeType" :disabled="!currentNode.enable"
+            @change="onAssigneeTypeChange">
+            <el-radio-button label="leader">组织管理员</el-radio-button>
+            <el-radio-button label="user">指定人员</el-radio-button>
+            <el-radio-button label="self">被考核人</el-radio-button>
+            <el-radio-button label="post">岗位</el-radio-button>
+            <el-radio-button label="deptLeader">部门负责人</el-radio-button>
+          </el-radio-group>
+        </el-form-item>
+
+        <div class="flex-center-center" style="margin-left: 100px;">
+          <el-form-item label="">
+            <template v-if="currentNode.children[childIndex].assigneeType === 'leader'">
+              <el-select v-model="currentNode.children[childIndex].leaderLevel" placeholder="请选择管理员"
+                :disabled="!currentNode.enable" filterable style="width: 300px;" key="leader"
+                @change="onOrgManagerChange">
+                <el-option v-for="item in levelOptions" :key="`leader_${item.value}`" :label="item.label"
+                  :value="item.value" style="width: 300px;" />
+              </el-select>
+              <br>
+              <div class="fontColorC">(<span style="color: red"> * </span>被考核人所在部门的直接上级或上上级 )</div>
+
+            </template>
+            <template v-if="currentNode.children[childIndex].assigneeType === 'user'">
+              <el-select v-model="userSelected" placeholder="请选择指定人员" multiple :disabled="!currentNode.enable"
+                filterable style="width: 300px;" key="user" @change="onUserChange">
+                <el-option v-for="item in employees" :key="`user_${item.id}`" :label="item.name" :value="item.id"
+                  style="width: 300px;" />
+              </el-select>
+              <br>
+              <div class="fontColorC">(<span style="color: red"> * </span>直接选择需要的人员 )</div>
+            </template>
+            <template v-if="currentNode.children[childIndex].assigneeType === 'post'">
+              <el-select v-model="postSelected" placeholder="请选择岗位" multiple :disabled="!currentNode.enable" filterable
+                style="width: 300px;" key="post" @change="onPostChange">
+                <el-option v-for="item in postList" :key="`post_${item.id}`" :label="item.name" :value="item.id"
+                  style="width: 300px;" />
+              </el-select>
+              <br>
+              <div class="fontColorC">(<span style="color: red"> * </span>组织架构下,所属岗位的成员 )</div>
+            </template>
+            <template v-if="currentNode.children[childIndex].assigneeType === 'deptLeader'">
+              <el-select v-model="deptSelected" placeholder="请选择部门" multiple :disabled="!currentNode.enable" filterable
+                style="width: 300px;" key="deptLeader" @change="onDeptChange">
+                <el-option v-for="item in deptList" :key="`deptLeader_${item.id}`" :label="item.name" :value="item.id"
+                  style="width: 300px;" />
+              </el-select>
+              <br>
+              <div class="fontColorC">(<span style="color: red"> * </span>组织架构中,所设置的部门管理员 )</div>
+            </template>
+          </el-form-item>
         </div>
-      </el-form-item>
+        <el-form-item label="多人时">
+          <el-radio-group v-model="currentNode.children[childIndex].multipleType" :disabled="!currentNode.enable">
+            <el-radio-button label="or">任一人确认(或签)</el-radio-button>
+            <el-radio-button label="parallel">按顺序确认(会签)</el-radio-button>
+            <el-radio-button label="sequence">同时确认(会签)</el-radio-button>
+          </el-radio-group>
+          <div class="flex-center-center fontColorC" style="margin-left: 100px;">
+            ( <span style="color: red;"> * </span><span>会签要求所有审批人一致同意</span> )
+          </div>
+          <div class="flex-center-center fontColorC" style="margin-left: 100px;">
+            ( <span style="color: red;"> * </span><span>或签只需任一审批人同意即可</span> )
+          </div>
+        </el-form-item>
+
+        <el-form-item label="权重">
+          <el-input v-model="currentNode.children[childIndex].weight" :disabled="!currentNode.enable"
+            style="width: 200px;">
+            <template slot="append">%</template>
+          </el-input>
+        </el-form-item>
+
+        <el-form-item label="允许">
+          <el-checkbox-group v-model="currentNode.children[childIndex].allows" :disabled="!currentNode.enable">
+            <el-checkbox-button label="transfer">转交</el-checkbox-button>
+          </el-checkbox-group>
+        </el-form-item>
+      </el-form>
 
-      <el-form-item label="允许">
-        <el-checkbox-group
-          v-model="currentNode.children[childIndex].allows"
-          :disabled="!currentNode.enable"
-        >
-          <el-checkbox-button label="transfer">转交</el-checkbox-button>
-        </el-checkbox-group>
-      </el-form-item>
-    </el-form>
+    </div>
   </el-dialog>
 </template>
 
@@ -363,4 +467,39 @@ export default {
   }
 }
 
+.reference {
+  position: absolute;
+  top: -60px;
+  left: 0px;
+}
+
+.base-table {
+  width: 100%;
+  border-collapse: collapse;
+  margin: 10px auto;
+  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+  background-color: #fff;
+}
+
+.base-table th,
+.base-table td {
+  padding: 3px 6px;
+  text-align: center;
+  border-bottom: 1px solid #ddd;
+  box-sizing: border-box;
+}
+
+.base-table th {
+  background-color: #f2f2f2;
+  font-weight: bold;
+}
+
+.base-table td {
+  border-left: 1px solid #ccc;
+}
+
+.base-table tr:hover {
+  background-color: #f5f5f5;
+}
+
 </style>

+ 212 - 73
src/newPerformance/components/IndicatorSetting/PerScoresSelectorOnly.vue

@@ -1,75 +1,173 @@
 <template>
   <el-dialog :visible.sync="innerVisible" @close="handleClose" @open="initData" @closed="dataReset" append-to-body
     :close-on-click-modal="false" center title="评分节点配置" width="600px">
-    <el-form v-if="currentNode" label-width="200">
-      <el-form-item label="启用">
-        <el-switch v-model="currentNode.enable" disabled />
-      </el-form-item>
-
-      <el-form-item label="">
-        <div class="handler-list">
-          <el-tag v-for="(item,index) in currentNode.children" :key="`hl_${index}`"
-            :type="childIndex === index ? '' : 'info'" closable @close="removeChild(index)" @click="childSelect(index)">
-            {{assigneeMap[item.assigneeType] || '未知'}}
-          </el-tag>
-          <el-button v-show="currentNode.enable" icon="el-icon-plus" size="mini" style="margin-bottom: 10px;"
-            @click="addChild" />
+    <div v-if="currentNode" class="dialog-box" style="position: relative;">
+      <el-popover ref="popoverRef" placement="bottom" trigger="hover">
+        <template #reference>
+          <el-link type="primary" class="reference">
+            <i class="el-icon-s-opportunity"></i>
+            评分示例
+          </el-link>
+        </template>
+
+        <div>
+          <p>1、评分节点设置多人评分时,在默认的权重100%状态下,各评价人的评价权重自动均分。</p>
+          <p>举例说明:</p>
+          <table class="base-table">
+            <thead>
+              <tr>
+                <th>评分人</th>
+                <th>负责人</th>
+                <th>评分</th>
+                <th>评分权重</th>
+                <th>公式</th>
+              </tr>
+            </thead>
+            <tbody>
+              <tr>
+                <td>管理员</td>
+                <td>一级管理员</td>
+                <td>90</td>
+                <td>100%</td>
+                <td rowspan="3">
+                  (90 + 100 + 80) / 3 = 90
+                </td>
+              </tr>
+              <tr>
+                <td>指定人</td>
+                <td>张三</td>
+                <td>100</td>
+                <td>100%</td>
+              </tr>
+              <tr>
+                <td>指定人</td>
+                <td>李四</td>
+                <td>80</td>
+                <td>100%</td>
+              </tr>
+
+              <tr>
+                <td>指标最终得分</td>
+                <td colspan="4">90</td>
+              </tr>
+            </tbody>
+          </table>
+
+          <p>2、系统支持不同的评价人设置不同的评价权重,最终指标得分=(各评分人分数*评价权重)之和</p>
+          <p>举例说明:</p>
+          <table class="base-table">
+            <thead>
+              <tr>
+                <th>评分人</th>
+                <th>负责人</th>
+                <th>评分</th>
+                <th>评分权重</th>
+                <th>加权得分</th>
+              </tr>
+            </thead>
+            <tbody>
+              <tr>
+                <td>管理员</td>
+                <td>一级管理员</td>
+                <td>90</td>
+                <td>50%</td>
+                <td>45</td>
+              </tr>
+              <tr>
+                <td>指定人</td>
+                <td>张三</td>
+                <td>100</td>
+                <td>30%</td>
+                <td>30</td>
+
+              </tr>
+              <tr>
+                <td>指定人</td>
+                <td>李四</td>
+                <td>80</td>
+                <td>20%</td>
+                <td>16</td>
+              </tr>
+
+              <tr>
+                <td colspan="4">指标最终得分</td>
+                <td>90</td>
+              </tr>
+            </tbody>
+          </table>
+          <p>公式:90×50%+100×30%+80×20%=91分</p>
         </div>
-      </el-form-item>
-      <el-form-item label="评分人">
-        <el-radio-group v-model="currentNode.children[childIndex].assigneeType" :disabled="!currentNode.enable"
-          @change="onAssigneeTypeChange">
-          <el-radio-button label="leader">组织管理员</el-radio-button>
-          <el-radio-button label="user">指定人员</el-radio-button>
-          <el-radio-button label="self">被考核人</el-radio-button>
-          <el-radio-button label="post">岗位</el-radio-button>
-          <el-radio-button label="deptLeader">部门负责人</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-
-      <div class="flex-center-center" style="margin-left: 100px;">
+      </el-popover>
+      <el-form label-width="200">
+        <el-form-item label="启用">
+          <el-switch v-model="currentNode.enable" disabled />
+        </el-form-item>
 
         <el-form-item label="">
-          <template v-if="currentNode.children[childIndex].assigneeType === 'leader'">
-            <el-select v-model="currentNode.children[childIndex].leaderLevel" placeholder="请选择管理员"
-              :disabled="!currentNode.enable" filterable style="width: 300px;" key="leader"
-              @change="onOrgManagerChange">
-              <el-option v-for="item in levelOptions" :key="`leader_${item.value}`" :label="item.label"
-                :value="item.value" style="width: 300px;" />
-            </el-select>
-            <br>
-            <div class="fontColorC">(<span style="color: red"> * </span>被考核人所在部门的直接上级或上上级 )</div>
-          </template>
-          <template v-if="currentNode.children[childIndex].assigneeType === 'user'">
-            <el-select v-model="userSelected" placeholder="请选择指定人员" multiple :disabled="!currentNode.enable" filterable
-              style="width: 300px;" key="user" @change="onUserChange">
-              <el-option v-for="item in employees" :key="`user_${item.id}`" :label="item.name" :value="item.id"
-                style="width: 300px;" />
-            </el-select>
-            <br>
-            <div class="fontColorC">(<span style="color: red"> * </span>直接选择需要的人员 )</div>
-          </template>
-          <template v-if="currentNode.children[childIndex].assigneeType === 'post'">
-            <el-select v-model="postSelected" placeholder="请选择岗位" multiple :disabled="!currentNode.enable" filterable
-              style="width: 300px;" key="post" @change="onPostChange">
-              <el-option v-for="item in postList" :key="`post_${item.id}`" :label="item.name" :value="item.id"
-                style="width: 300px;" />
-            </el-select>
-            <br>
-            <div class="fontColorC">(<span style="color: red"> * </span>组织架构下,所属岗位的成员 )</div>
-          </template>
-          <template v-if="currentNode.children[childIndex].assigneeType === 'deptLeader'">
-            <el-select v-model="deptSelected" placeholder="请选择部门" multiple :disabled="!currentNode.enable" filterable
-              style="width: 300px;" key="deptLeader" @change="onDeptChange">
-              <el-option v-for="item in deptList" :key="`deptLeader_${item.id}`" :label="item.name" :value="item.id"
-                style="width: 300px;" />
-            </el-select>
-            <br>
-            <div class="fontColorC">(<span style="color: red"> * </span>组织架构中,所设置的部门管理员 )</div>
-          </template>
+          <div class="handler-list">
+            <el-tag v-for="(item,index) in currentNode.children" :key="`hl_${index}`"
+              :type="childIndex === index ? '' : 'info'" closable @close="removeChild(index)"
+              @click="childSelect(index)">
+              {{assigneeMap[item.assigneeType] || '未知'}}
+            </el-tag>
+            <el-button v-show="currentNode.enable" icon="el-icon-plus" size="mini" style="margin-bottom: 10px;"
+              @click="addChild" />
+          </div>
         </el-form-item>
-      </div>
-      
+        <el-form-item label="评分人">
+          <el-radio-group v-model="currentNode.children[childIndex].assigneeType" :disabled="!currentNode.enable"
+            @change="onAssigneeTypeChange">
+            <el-radio-button label="leader">组织管理员</el-radio-button>
+            <el-radio-button label="user">指定人员</el-radio-button>
+            <el-radio-button label="self">被考核人</el-radio-button>
+            <el-radio-button label="post">岗位</el-radio-button>
+            <el-radio-button label="deptLeader">部门负责人</el-radio-button>
+          </el-radio-group>
+        </el-form-item>
+
+        <div class="flex-center-center" style="margin-left: 100px;">
+
+          <el-form-item label="">
+            <template v-if="currentNode.children[childIndex].assigneeType === 'leader'">
+              <el-select v-model="currentNode.children[childIndex].leaderLevel" placeholder="请选择管理员"
+                :disabled="!currentNode.enable" filterable style="width: 300px;" key="leader"
+                @change="onOrgManagerChange">
+                <el-option v-for="item in levelOptions" :key="`leader_${item.value}`" :label="item.label"
+                  :value="item.value" style="width: 300px;" />
+              </el-select>
+              <br>
+              <div class="fontColorC">(<span style="color: red"> * </span>被考核人所在部门的直接上级或上上级 )</div>
+            </template>
+            <template v-if="currentNode.children[childIndex].assigneeType === 'user'">
+              <el-select v-model="userSelected" placeholder="请选择指定人员" multiple :disabled="!currentNode.enable"
+                filterable style="width: 300px;" key="user" @change="onUserChange">
+                <el-option v-for="item in employees" :key="`user_${item.id}`" :label="item.name" :value="item.id"
+                  style="width: 300px;" />
+              </el-select>
+              <br>
+              <div class="fontColorC">(<span style="color: red"> * </span>直接选择需要的人员 )</div>
+            </template>
+            <template v-if="currentNode.children[childIndex].assigneeType === 'post'">
+              <el-select v-model="postSelected" placeholder="请选择岗位" multiple :disabled="!currentNode.enable" filterable
+                style="width: 300px;" key="post" @change="onPostChange">
+                <el-option v-for="item in postList" :key="`post_${item.id}`" :label="item.name" :value="item.id"
+                  style="width: 300px;" />
+              </el-select>
+              <br>
+              <div class="fontColorC">(<span style="color: red"> * </span>组织架构下,所属岗位的成员 )</div>
+            </template>
+            <template v-if="currentNode.children[childIndex].assigneeType === 'deptLeader'">
+              <el-select v-model="deptSelected" placeholder="请选择部门" multiple :disabled="!currentNode.enable" filterable
+                style="width: 300px;" key="deptLeader" @change="onDeptChange">
+                <el-option v-for="item in deptList" :key="`deptLeader_${item.id}`" :label="item.name" :value="item.id"
+                  style="width: 300px;" />
+              </el-select>
+              <br>
+              <div class="fontColorC">(<span style="color: red"> * </span>组织架构中,所设置的部门管理员 )</div>
+            </template>
+          </el-form-item>
+        </div>
+
         <el-form-item label="多人时">
           <el-radio-group v-model="currentNode.children[childIndex].multipleType" :disabled="!currentNode.enable">
             <el-radio-button label="or">任一人确认(或签)</el-radio-button>
@@ -84,15 +182,20 @@
           </div>
         </el-form-item>
 
+        <el-form-item label="权重">
+          <el-input v-model="currentNode.children[childIndex].weight" :disabled="!currentNode.enable"
+            style="width: 200px;">
+            <template slot="append">%</template>
+          </el-input>
+        </el-form-item>
+
         <el-form-item label="允许">
-        <el-checkbox-group
-          v-model="currentNode.children[childIndex].allows"
-          :disabled="!currentNode.enable"
-        >
-          <el-checkbox-button label="transfer">转交</el-checkbox-button>
-        </el-checkbox-group>
-      </el-form-item>
-    </el-form>
+          <el-checkbox-group v-model="currentNode.children[childIndex].allows" :disabled="!currentNode.enable">
+            <el-checkbox-button label="transfer">转交</el-checkbox-button>
+          </el-checkbox-group>
+        </el-form-item>
+      </el-form>
+    </div>
     <template #footer>
       <el-row type="flex" justify="end">
         <el-col align="end">
@@ -379,4 +482,40 @@ export default {
   }
 }
 
+
+.reference {
+  position: absolute;
+  top: -60px;
+  left: 0px;
+}
+
+.base-table {
+  width: 100%;
+  border-collapse: collapse;
+  margin: 10px auto;
+  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+  background-color: #fff;
+}
+
+.base-table th,
+.base-table td {
+  padding: 3px 6px;
+  text-align: center;
+  border-bottom: 1px solid #ddd;
+  box-sizing: border-box;
+}
+
+.base-table th {
+  background-color: #f2f2f2;
+  font-weight: bold;
+}
+
+.base-table td {
+  border-left: 1px solid #ccc;
+}
+
+.base-table tr:hover {
+  background-color: #f5f5f5;
+}
+
 </style>

+ 7 - 2
src/newPerformance/components/IndicatorSetting/PerTargetConfirmSelectorOnly.vue

@@ -1,6 +1,6 @@
 <template>
   <el-dialog :visible.sync="innerVisible" @close="handleClose" @open="initData" @closed="dataReset" append-to-body
-    :close-on-click-modal="false" center title="目标确认节点配置" width="600px">
+    :close-on-click-modal="false" center title="目标确认节点配置" width="600px" class="target-confirm-dialog">
 
     <!-- <el-alert class="diy-tip" title="可配置多位人员来确定考核的指标" type="success" description>
       <p>可以是组织管理员,被考核人自己,指定人员,岗位负责人,部门负责人</p>
@@ -113,6 +113,8 @@
 
 <script>
 import Template from "@/examine/components/Template.vue";
+import introJs from 'intro.js'
+import 'intro.js/introjs.css'
 
 export default {
   name: "PerTargetConfirmSelectorOnly",
@@ -217,6 +219,7 @@ export default {
     handleClose(){
       this.$emit('update:showVisible',false);
     },
+
     dataReset(){
       this.currentNode = null;
       this.childIndex = null;
@@ -224,7 +227,9 @@ export default {
       this.postSelected = [];
       this.deptSelected = [];
     },
-    initData(){
+
+
+    initData() {
       if (this.loading) return;
       this.dataReset();
       this.loading = true;

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 34 - 21
src/newPerformance/components/IndicatorSetting/UploadPublish.vue


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 35 - 15
src/newPerformance/components/IndicatorSetting/UploadPublish2.vue


+ 156 - 52
src/newPerformance/components/MyPerformance.vue

@@ -45,14 +45,14 @@
 
         <div class="btn-box flex-box-ce">
             <div>
-                <el-link type="primary" @click="examineLogDialogVisible = true">考核操作日志</el-link>
-                <el-link v-if="allowAddIndicator" type="primary"  @click="openAddIndicatorDialog()">添加指标</el-link>
-                <el-popconfirm v-if="detailInfo && status == 1" confirm-button-text='确定' cancel-button-text='不用了'
-                    icon="el-icon-info" icon-color="red" title="确定删除这个考核吗?" @confirm="deleteExamine()"
-                    @cancel="handleCancel()">
-                    <el-link slot="reference" type="danger" v-if="allowDeleteExamine">删除考核</el-link>
-                </el-popconfirm>
+                <el-link v-if="detailInfo" type="primary" @click="examineLogDialogVisible = true"
+                    style="margin-right: 10px;">操作日志</el-link>
+                <el-link v-if="detailInfo && allowAddIndicator" type="primary" style="margin-right: 10px;"
+                    @click="openAddIndicatorDialog()">添加指标</el-link>
+                <el-link v-if="allowDeleteExamine" type="danger"
+                    @click="openVerifyDialog({}, 'deleteExamine')">删除考核</el-link>
             </div>
+
             <div class="flex-box-ce">
                 <div v-if="detailInfo && !reviewId" class="flex-box-ce more" @click="dialogVisible = true">
                     查看历史考核记录
@@ -62,10 +62,11 @@
 
         </div>
 
+
         <!-- 考核详情 -->
         <div class="table-box" v-if="detailInfo">
-            <el-table v-loading="loading" :data="tableData" stripe style="width: 100%; height: auto;" border
-                :header-cell-style="{ background: '#f5f7fa' }">
+            <el-table v-loading="loading" ref="dragTable" :data="tableData" row-key="reviewIndicatorId" stripe
+                style=" width: 100%; height: auto;" border :header-cell-style="{ background: '#f5f7fa' }">
                 <el-table-column type="index" label="序号" align="center" width="50"></el-table-column>
                 <el-table-column prop="title" label="指标" align="center" min-width="200">
                 </el-table-column>
@@ -92,7 +93,6 @@
                                     {{ "附件" + (index + 1) }}
                                 </el-link>
                             </div>
-
                         </div>
                     </template>
                 </el-table-column>
@@ -112,7 +112,7 @@
                     </template>
                 </el-table-column>
 
-                <el-table-column prop="formulae" label="计算公式" align="center" min-width="140">
+                <el-table-column prop="expression" label="计算公式" align="center" min-width="140">
                     <template slot-scope="scope">
                         <el-link type="primary"
                             v-if="scope.row.expression && scope.row.expression.formulas && scope.row.expression.formulas.length > 0"
@@ -130,16 +130,17 @@
                     </template>
                 </el-table-column>
 
-                <el-table-column prop="okrs" label="过程管控" align="center">
+                <el-table-column label="审批状态" align="center" min-width="120">
                     <template slot-scope="scope">
-                        <el-link v-if="scope.row.okrs && scope.row.okrs.length > 0" type="primary"
-                            @click="openTargetList(scope.row.okrs)">
-                            过程跟踪
-                        </el-link>
-                        <span v-else class="fontColorC">暂无关联</span>
+                        <el-tag v-if="scope.row.businessStatus !== 'end'" type="primary">
+                            {{ scope.row.businessStatus | filterNodeStatus }}
+                        </el-tag>
+                        <el-tag v-else type="warning">{{ scope.row.businessStatus | filterNodeStatus }}</el-tag>
                     </template>
                 </el-table-column>
 
+
+
                 <el-table-column prop="businessStatus" label="指标考核状态" align="center" min-width="120">
                     <template slot-scope="scope">
                         <div v-if="scope.row.businessStatus == 'end'" class="green-color">已结束</div>
@@ -147,41 +148,36 @@
                     </template>
                 </el-table-column>
 
+                <el-table-column prop="okrs" label="过程管控" align="center">
+                    <template slot-scope="scope">
+                        <el-link v-if="scope.row.okrs && scope.row.okrs.length > 0" type="primary"
+                            @click="openTargetList(scope.row.okrs)">
+                            过程跟踪
+                        </el-link>
+                        <span v-else class="fontColorC">暂无关联</span>
+                    </template>
+                </el-table-column>
 
-                <el-table-column label="操作" align="center" min-width="160">
+                <el-table-column label="操作" align="center" min-width="150">
                     <template slot-scope="scope">
-                        <el-link type="primary"
+                        <el-link type="primary" style="margin-right: 10px;"
                             @click="getProcessTracing({ reviewId: scope.row.reviewId, nodes: scope.row.flow.nodes, reviewIndicatorId: scope.row.reviewIndicatorId })">
-                            指标审批过程
+                            审批过程
                         </el-link>
-                        <el-popover ref="popoverRef"
-                            v-if="scope.row.businessStatus !=='target_confirm'"
-                            placement="bottom" trigger="click">
+                        <el-popover v-if="allowResetIndicator" ref="popoverRef" placement="bottom" trigger="click">
                             <template #reference>
-                                <el-link
-                                    v-if="scope.row.businessStatus !== 'target_confirm'"
-                                    type="primary">更多操作</el-link>
+                                <el-link v-if="allowResetIndicator" slot="reference" type="primary">更多操作</el-link>
                             </template>
                             <div class="dropdown-box">
                                 <el-link
                                     v-if="allowResetIndicator && scope.row.businessStatus !== 'target_confirm' && allowResetIndicator && scope.row.businessStatus !== 'end'"
                                     type="primary" @click="openResetNodeDialog(scope.row)">重置流程</el-link>
 
-                                <el-popconfirm v-if="allowDeleteIndicator && scope.row.businessStatus == 'end'" confirm-button-text='确定'
-                                    cancel-button-text='不用了' icon="el-icon-info" icon-color="red" title="确定重新发起这个考核指标吗?"
-                                    @confirm="handleConfirm(scope.row, 1)" @cancel="handleCancel()">
-                                    <el-link v-if="allowDeleteIndicator && scope.row.businessStatus == 'end'" slot="reference"
-                                        type="primary">重新发起</el-link>
-                                </el-popconfirm>
-
-                                <el-popconfirm v-if="allowDeleteIndicator && scope.row.businessStatus == 'end'" confirm-button-text='确定'
-                                    cancel-button-text='不用了' icon="el-icon-info" icon-color="red" title="确定删除这个考核指标吗?"
-                                    @confirm="handleConfirm(scope.row, 2)" @cancel="handleCancel()">
-                                    <el-link v-if="allowDeleteIndicator && scope.row.businessStatus == 'end'" slot="reference"
-                                        type="danger">删除指标</el-link>
-                                </el-popconfirm>
-
+                                <el-link v-if="allowDeleteIndicator && scope.row.businessStatus == 'end'" type="primary"
+                                    @click="openVerifyDialog(scope.row, 'handleReStart')">重新发起</el-link>
 
+                                <el-link v-if="allowDeleteIndicator" type="danger"
+                                    @click="openVerifyDialog(scope.row, 'handleDeleteIndicator')">删除指标</el-link>
                             </div>
                         </el-popover>
                     </template>
@@ -219,7 +215,12 @@
                     <div class="formulas-list" v-for="(item, index) in formulas" :key="index">
                         <div class="formulas-title">公式({{ index + 1 }})</div>
                         <div class="formulas-condition-title">触发条件</div>
-                        <div class="value-box">
+                        <div class="value-box"
+                            v-if="item.condition[0] === '1' && item.condition[1] === '==' && item.condition[2] === '1'">
+                            <div class="special-value">无触发条件</div>
+                        </div>
+
+                        <div v-else class="value-box">
                             <template v-for="(con, conIndex) in item.condition">
                                 <div class="special-value" v-if="con.includes('result')">结果值</div>
                                 <div class="special-value" v-else-if="con.includes('weight')">权重</div>
@@ -227,6 +228,7 @@
                                 <div class="normal-value" v-else>{{ con }}</div>
                             </template>
                         </div>
+
                         <div class="formulas-condition-title">计算公式</div>
                         <div class="value-box">
                             <template v-for="(expr, exprIndex) in item.expression">
@@ -262,11 +264,14 @@
         </ResetNodeDialog>
 
         <!-- 添加指标 -->
-        <AddIndicatorDialog v-model="addIndicatorDialogVisible" :reviewId="logReviewId"
+        <AddIndicatorDialog v-model="addIndicatorDialogVisible" :reviewId="logReviewId" :indicator-info="tableData"
             @finished="getDetails(logReviewId)">
         </AddIndicatorDialog>
 
+        <!-- 验证弹框 -->
+        <!-- <VerifyDialog v-model="verifyDialogVisible" @success="verifySuccess" @error="verifyError" /> -->
 
+        <Vcode :show="verifyDialogVisible" @success="verifySuccess" @close="verifyError" />
     </div>
 </template>
 
@@ -282,6 +287,9 @@ import TargetListComp from "@/performance/views/assessManagement/TargetListComp.
 import ExamineLogDialog from '@/newPerformance/components/MyPerformance/ExamineLog'; // 考核日志
 import ResetNodeDialog from '@/newPerformance/components/MyPerformance/ResetNode'; // 重置流程
 import AddIndicatorDialog from '@/newPerformance/components/MyPerformance/AddIndicator'; // 添加指标
+import VerifyDialog from '@/newPerformance/components/PublicComp/VerifyDialog'; // 验证码
+import Sortable from 'sortablejs';
+import Vcode from "vue-puzzle-vcode";
 
 export default {
     name: "MyPerformance",
@@ -292,7 +300,9 @@ export default {
         TargetListComp,
         AddIndicatorDialog,
         ExamineLogDialog,
-        ResetNodeDialog
+        ResetNodeDialog,
+        VerifyDialog,
+        Vcode
     },
     props: {
         reviewId: {
@@ -315,6 +325,7 @@ export default {
             dialogVisible: false,
             targetDialogVisible: false,
             examineLogDialogVisible: false,
+            verifyDialogVisible: false,
             loading: false,
             value: [],
             title: "",
@@ -387,9 +398,31 @@ export default {
             resetNodeDialogVisible: false,// 重置流程弹框
             logReviewId: '',
             initRow: null,
+            handleOptions: ''
         };
     },
     filters: {
+        filterNodeStatus(v) {
+            // 指标审批状态 
+            // start - 开始 
+            // target_confirm - 目标确认 
+            // result_input - 录入结果值 
+            // score_self - 自评 
+            // score_each_other - 互评 
+            // score - 评分 
+            // review - 审批 
+            // cc - 抄送 
+            // end - 结束
+            if (v === 'start') return '开始'
+            if (v === 'target_confirm') return '确认目标'
+            if (v === 'result_input') return '录入结果值'
+            if (v === 'score_self') return '自评'
+            if (v === 'score_each_other') return '互评'
+            if (v === 'score') return '评分'
+            if (v === 'review') return '审批'
+            if (v === 'cc') return '抄送'
+            if (v === 'end') return '结束'
+        },
         formatDate(val) {
             if (val) return moment(val).format('YYYY-MM-DD')
             else return "--"
@@ -407,6 +440,7 @@ export default {
             return str
         }
     },
+
     computed: {
         ...mapGetters(['user_info']),
 
@@ -418,7 +452,7 @@ export default {
 
         // 允许添加指标
         allowAddIndicator() {
-            if (this.isCreator && this.detailInfo && this.status == 0 || this.getRole1 && this.detailInfo && this.status == 0) return true
+            if (this.isCreator|| this.getRole1) return true
             else return false
         },
 
@@ -436,7 +470,9 @@ export default {
 
     },
 
-    created() {},
+    created() {
+        // this.verifyDialogVisible = true
+    },
 
     mounted() {
         if (this.sendEmployeeId) {
@@ -447,18 +483,63 @@ export default {
         if (this.reviewId) {
             this.getDetails(this.reviewId)
             this.logReviewId = this.reviewId
-        } else this.getTemplateList();
+        } else {
+            this.getTemplateList();
+        }
+        this.$nextTick(() => {
+            this.initSortTable();
+        })
+        
     },
 
     beforeDestroy() {
         this.$emit('clearReviewId')
     },
 
+    
     methods: {
 
+        initSortTable() {
+            const elTbody = this.$refs.dragTable && this.$refs.dragTable.$el.querySelector('.el-table__body-wrapper tbody');
+            if (!elTbody) return
+            this.sortable = Sortable.create(elTbody, {
+                delay: 0,
+                animation: 300,
+                onEnd: (evt) => {
+                    const currRow = this.tableData.splice(evt.oldIndex, 1)[0];
+                    this.tableData.splice(evt.newIndex, 0, currRow);
+                    this.$nextTick(() => {
+                        this.tableData.forEach((item, index) => {
+                            item.id = index + 1;
+                        });
+                    });
+                }
+            });
+        },
+
+
+        // // 行拖拽
+        // rowDrop() {
+        //     // 要侦听拖拽响应的DOM对象(数据存储在.el-table__body-wrapper > .el-table__row > tbody标签中(el-table的数据部分的“最外层”class名为el-table__body-wrapper))
+        //     const tbody = document.querySelector('.el-table__body-wrapper tbody');
+        //     const that = this;
+        //     if (!tbody) return
+        //     Sortable.create(tbody, {
+        //         // 结束拖拽后的回调函数
+        //         onEnd({ newIndex, oldIndex }) {
+        //             console.log('拖动了行,序号(index)"' + oldIndex + '"拖动到序号(index)"' + newIndex + '"');
+        //             const currentRow = that.tableData.splice(oldIndex, 1)[0]; // 将oldIndex位置的数据删除并取出,oldIndex后面位置的数据会依次前移一位
+        //             that.tableData.splice(newIndex, 0, currentRow); // 将被删除元素插入到新位置(currRow表示上面的被删除数据)
+        //         }
+        //     })
+        // },
+
+
         changePage() {
             this.$bus.$emit("changeCurrentId", { currentId: '7' })
         },
+
+        // 结果值附件预览
         openFile(url) {
             let file = {
                 url
@@ -483,10 +564,9 @@ export default {
 
         // 删除考核
         deleteExamine() {
-            console.log(this.logReviewId);
             let url = `/performance/review/remove/${this.user_info.site_id}/${this.logReviewId}`
             this.$http.post(url).then(res => {
-                console.log(res)
+                this.verifyDialogVisible = false
                 if (res.code == 1) {
                     this.$message.success("操作成功")
                 } else {
@@ -526,6 +606,7 @@ export default {
                     } else {
                         this.$message.success("操作失败")
                     }
+                    this.verifyDialogVisible = false
                 })
             // 重新发起
             } else {
@@ -537,9 +618,9 @@ export default {
                     } else {
                         this.$message.success("操作失败")
                     }
+                    this.verifyDialogVisible = false
                 })
             }
-            this.$refs.popoverRef.doClose();
         },
 
         // 取消操作
@@ -555,15 +636,31 @@ export default {
             this.getDetails(item.reviewId)
         },
 
+        openVerifyDialog(row, options) {
+            this.initRow = row
+            this.handleOptions = options
+            this.verifyDialogVisible = true;
+        },
+
+        verifySuccess(msg) {
+            // console.log("用户通过了验证")
+            if (this.handleOptions === 'handleReStart') this.handleConfirm(this.initRow, 1)
+            if (this.handleOptions === 'handleDeleteIndicator') this.handleConfirm(this.initRow, 2)
+            if (this.handleOptions === 'deleteExamine') this.deleteExamine()
+            
+        },
+
+        verifyError() {
+            this.verifyDialogVisible = false;
+        },
+
 
         getTemplateList() {
             let that = this
             let url = `/performance/statistics/reviews/${that.user_info.site_id}`
             let requestdata;
             if (that.cycleType == '-1') requestdata = { ...that.params }
-            else {
-                requestdata = { ...that.params, cycleType: that.cycleType  }
-            }
+            else requestdata = { ...that.params, cycleType: that.cycleType }
             that.$axiosUser('get', url, requestdata).then(res => {
                 let { data: { data: { list, total }, code } } = res;
                 if (code == 1) {
@@ -692,6 +789,12 @@ export default {
 </style>
 
 <style scoped="scoped" lang="scss">
+
+.vue-puzzle-vcode {
+    z-index: 99999;
+}
+
+
 .green-color {
     color: #67C23A;
 }
@@ -751,6 +854,7 @@ export default {
     }
 }
 
+
 .formulas-list-box {
     width: 100%;
     padding: 10px;

+ 822 - 0
src/newPerformance/components/MyPerformance/AddIndicator copy.vue

@@ -0,0 +1,822 @@
+<template>
+    <el-dialog title="添加指标" :visible.sync="addIndicatorDialogVisible" width="700px" :before-close="dialogBeforeClose"
+        append-to-body @open="initNodes()">
+        <div>
+
+            <div v-loading="loading" class="scroll-bar" style="max-height: 500px; overflow-y: auto;">
+                <el-form ref="form" :model="form" label-width="80px">
+
+                    <el-form-item label="指标名称" prop="title">
+                        <el-input v-model="form.title" placeholder="指标名称" clearable></el-input>
+                    </el-form-item>
+
+                    <el-form-item label="指标规则">
+                        <el-link type="primary" @click="showEditContent = true">
+                            {{ form.content ? form.content : '点击设置指标规则' }}
+                        </el-link>
+                    </el-form-item>
+
+                    <el-form-item label="过程跟踪">
+                        <template v-if="form.okrs && form.okrs.length > 0">
+                            <div class="okr-list-box">
+                                <div class="edit-box">
+                                    <el-link type="primary" @click="showIndicatorTargetSearch = true">
+                                        <i class="el-icon-edit"></i>
+                                    </el-link>
+                                </div>
+                                <div class="okr-list-title">
+                                    <el-link type="primary">
+                                        共 {{ form.okrs.length }} 个目标
+                                    </el-link>
+                                </div>
+                                <div class="okr-list">
+                                    <div v-for="item in indicatorOkrs" :key="item.id">
+                                        {{ item.name }}
+                                    </div>
+                                </div>
+
+                            </div>
+
+                        </template>
+                        <el-link v-else type="primary" @click="showIndicatorTargetSearch = true">
+                            {{ '点击设置关联OKR' }}
+                        </el-link>
+                    </el-form-item>
+
+                    <el-form-item label="目标值" prop="target">
+                        <el-input v-model="form.target" placeholder="目标值" clearable></el-input>
+                    </el-form-item>
+
+                    <el-form-item label="单位" prop="unit">
+                        <el-input v-model="form.unit" placeholder="单位" clearable></el-input>
+                    </el-form-item>
+
+                    <el-form-item label="权重(%)" prop="weight">
+                        <el-input v-model="form.weight" placeholder="权重(%)" clearable></el-input>
+                    </el-form-item>
+
+                    <el-form-item label="计算公式">
+
+                        <template v-if="form.expression.formulas && form.expression.formulas.length > 0">
+                            <div class="formulas-list-box">
+                                <div class="edit-box">
+                                    <el-link type="primary" @click="showFormula = true">
+                                        <i class="el-icon-edit"></i>
+                                    </el-link>
+                                </div>
+                                <div class="formulas-list" v-for="(item, index) in form.expression.formulas"
+                                    :key="index">
+                                    <div class="formulas-title">公式({{ index + 1 }})</div>
+                                    <div class="formulas-condition-title">触发条件</div>
+                                    <div class="value-box">
+                                        <template v-for="(con, conIndex) in item.condition">
+                                            <div class="special-value" v-if="con === '#result'">结果值</div>
+                                            <div class="special-value" v-else-if="con === '#weight'">权重</div>
+                                            <div class="special-value" v-else-if="con === '#target'">目标值</div>
+                                            <div class="normal-value" v-else>{{ con }}</div>
+                                        </template>
+                                    </div>
+                                    <div class="formulas-condition-title">计算公式</div>
+                                    <div class="value-box">
+                                        <template v-for="(expr, exprIndex) in item.expression">
+                                            <div class="special-value" v-if="expr === '#result'">结果值</div>
+                                            <div class="special-value" v-else-if="expr === '#weight'">权重</div>
+                                            <div class="special-value" v-else-if="expr === '#target'">目标值</div>
+                                            <div class="normal-value" v-else>{{ expr }}</div>
+                                        </template>
+                                    </div>
+                                </div>
+                            </div>
+                        </template>
+
+                        <el-link v-else type="primary" @click="showFormula = true">点击设置计算公式</el-link>
+                    </el-form-item>
+
+                    <el-form-item label="确认目标">
+                        <el-switch v-if="!form.flow.nodes[0].enable" :value="form.flow.nodes[0].enable"
+                            @input="handleStatusChange(-1, form, 'targetConfirms')"></el-switch>
+                        <ShowDataComp v-else :show-data="form.flow.nodes[0]" :select-nodes="form"
+                            @btnClick="handleBtnClick" :compStyle="compStyle" />
+                    </el-form-item>
+
+                    <el-form-item label="录入结果">
+                        <el-switch v-if="!form.flow.nodes[1].enable" :value="form.flow.nodes[1].enable"
+                            @input="handleStatusChange(-1, form, 'resultInput')"></el-switch>
+                        <ShowDataComp v-else :show-data="form.flow.nodes[1]" :select-nodes="form"
+                            @btnClick="handleBtnClick" :compStyle="compStyle" />
+                    </el-form-item>
+
+                    <el-form-item label="自评">
+                        <el-switch v-if="!form.flow.nodes[2].enable" :value="form.flow.nodes[2].enable"
+                            @input="handleStatusChange(-1, form, 'scoreSelf')"></el-switch>
+                        <div v-else class="flex-box-ce">
+                            <el-switch v-if="form.flow.nodes[2].enable" :value="form.flow.nodes[2].enable"
+                                @input="handleStatusChange(-1, form, 'scoreSelf')"></el-switch>
+                        </div>
+                    </el-form-item>
+
+                    <el-form-item label="互评">
+                        <el-switch v-if="!form.flow.nodes[3].enable" :value="form.flow.nodes[3].enable"
+                            @input="handleStatusChange(-1, form, 'scoreEachOther')"></el-switch>
+                        <div v-else class="flex-box-ce">
+                            <el-switch v-if="form.flow.nodes[3].enable" :value="form.flow.nodes[3].enable"
+                                @input="handleStatusChange(-1, form, 'scoreEachOther')"></el-switch>
+                        </div>
+                    </el-form-item>
+
+                    <el-form-item label="评分">
+                        <el-switch v-if="!form.flow.nodes[4].enable" :value="form.flow.nodes[4].enable"
+                            @input="handleStatusChange(-1, form, 'scores')"></el-switch>
+                        <ShowDataComp v-else :show-data="form.flow.nodes[4]" :select-nodes="form"
+                            @btnClick="handleBtnClick" :compStyle="compStyle" />
+                    </el-form-item>
+
+                    <el-form-item label="审批">
+                        <el-switch v-if="!form.flow.nodes[5].enable" :value="form.flow.nodes[5].enable"
+                            @input="handleStatusChange(-1, form, 'reviews')"></el-switch>
+                        <ShowDataComp v-else :show-data="form.flow.nodes[5]" :select-nodes="form"
+                            @btnClick="handleBtnClick" :compStyle="compStyle" />
+                    </el-form-item>
+
+                </el-form>
+            </div>
+
+            <div slot="footer" class="flex-box-ce" style="justify-content: center;">
+                <el-button type="primary" @click="confirm()">确 定</el-button>
+                <el-button @click="cancel()">取 消</el-button>
+            </div>
+        </div>
+        
+        <!-- 编辑计算公式 -->
+        <FormulaComp v-if="showFormula" v-model="showFormula"
+            :fixed-props="[{ key: 'target', name: '目标' }, { key: 'weight', name: '权重' }, { key: 'result', name: '结果值' }]"
+            :expressions-props="form.expression.formulas || []" @onConfirm="onFormulaConfirm" />
+
+
+        <!-- 编辑规则 -->
+        <EditContentComp v-if="showEditContent" v-model="showEditContent" :content="form.content"
+            @finishEdit="finishEditContent" no-request />
+
+        <!-- 编辑确认目标节点 -->
+        <TargetConfirms v-if="targetConfirms" v-model="targetConfirms" :form-label="formLabel"
+            :dialog-title="dialogTitle" :node-type="nodeType" :select-nodes="selectNodes" @closeDialog="closeNodeDialog"
+            :tag-index="tagIndex" @onConfirm="finishHandle" />
+
+        <!-- 编辑录入结果节点 -->
+        <ResultInput v-if="resultInput" v-model="resultInput" :form-label="formLabel" :dialog-title="dialogTitle"
+            :node-type="nodeType" :select-nodes="selectNodes" @closeDialog="closeNodeDialog" :tag-index="tagIndex"
+            @onConfirm="finishHandle" />
+
+        <!-- 编辑自评节点 -->
+        <ScoreSelf v-if="scoreSelf" v-model="scoreSelf" :form-label="formLabel" :dialog-title="dialogTitle"
+            :node-type="nodeType" :select-nodes="selectNodes" @closeDialog="closeNodeDialog" :tag-index="tagIndex"
+            @onConfirm="finishHandle" />
+
+        <!-- 编辑互评节点 -->
+        <ScoreEachOther v-if="scoreEachOther" v-model="scoreEachOther" :form-label="formLabel"
+            :dialog-title="dialogTitle" :node-type="nodeType" :select-nodes="selectNodes" @closeDialog="closeNodeDialog"
+            :tag-index="tagIndex" @onConfirm="finishHandle" />
+
+        <!-- 编辑评分节点 -->
+        <Scores v-if="scores" v-model="scores" :form-label="formLabel" :dialog-title="dialogTitle" :node-type="nodeType"
+            :select-nodes="selectNodes" @closeDialog="closeNodeDialog" :tag-index="tagIndex"
+            @onConfirm="finishHandle" />
+
+        <!-- 编辑审批节点 -->
+        <Reviews v-if="reviews" v-model="reviews" :form-label="formLabel" :dialog-title="dialogTitle"
+            :node-type="nodeType" :select-nodes="selectNodes" @closeDialog="closeNodeDialog" :tag-index="tagIndex"
+            @onConfirm="finishHandle" />
+
+        <!-- 编辑审批节点 -->
+        <CC v-if="cc" v-model="cc" :form-label="formLabel" :dialog-title="dialogTitle" :node-type="nodeType"
+            :select-nodes="selectNodes" @closeDialog="closeNodeDialog" :tag-index="tagIndex"
+            @onConfirm="finishHandle" />
+
+        <!-- 指标okr选择 -->
+        <TargetSearch :visible.sync="showIndicatorTargetSearch" :selectedCheckList="indicatorOkrs"
+            :showSelectedData="indicatorOkrs" :key="`indicatorTarget`" @confirm="onIndicatorOkrSelected" />
+    </el-dialog>
+
+</template>
+
+
+
+<script>
+import { mapGetters } from 'vuex';
+import TargetSearch from "@/performance/views/assessManagement/TargetSearch"; // 选择OKR
+import FormulaComp from '@/newPerformance/components/TemplateDetails/FormulaComp'; // 计算公式弹框
+import HandleNode from '@/newPerformance/components/TemplateDetails/HandleNode'; //单独设置流程节点弹框
+import ShowDataComp from '@/newPerformance/components/PublicComp/ShowData'; // 显示节点数据组件
+import EditContentComp from '@/newPerformance/components/TemplateDetails/EditContent'; // 编辑规则组件
+import BatchHandleNode from '@/newPerformance/components/TemplateDetails/BatchHandleNode'; // 批量设置流程节点
+import TargetConfirms from '@/newPerformance/components/TemplateDetails/TargetConfirms'; // 确认目标流程节点
+import ResultInput from '@/newPerformance/components/TemplateDetails/ResultInput'; // 结果录入流程节点
+import ScoreSelf from '@/newPerformance/components/TemplateDetails/ScoreSelf'; // 自评流程节点
+import ScoreEachOther from '@/newPerformance/components/TemplateDetails/ScoreEachOther'; // 互评流程节点
+import Scores from '@/newPerformance/components/TemplateDetails/Scores'; // 评分流程节点
+import Reviews from '@/newPerformance/components/TemplateDetails/Reviews'; // 审批流程节点
+import CC from '@/newPerformance/components/TemplateDetails/CC'; // 审批流程节点
+
+export default {
+    components: {
+        HandleNode,
+        ShowDataComp,
+        EditContentComp,
+        TargetSearch,
+        FormulaComp,
+        BatchHandleNode,
+        TargetConfirms,
+        ResultInput,
+        ScoreSelf,
+        ScoreEachOther,
+        Scores,
+        Reviews,
+        CC
+    },
+
+    model: {
+        prop: 'addIndicatorDialogVisible',
+        event: 'close-dialog'
+    },
+
+    props: {
+        addIndicatorDialogVisible: {
+            type: Boolean,
+            default: false
+        },
+
+        reviewId: {
+            type: String | Number,
+            default: () => {}
+        }
+    },
+
+    computed: {
+        ...mapGetters(['user_info'])
+    },
+
+    data() {
+        return {
+            loading: false,
+            templateId: '',
+            selectIndicatorId: '',
+            selectNodes: '',
+            dialogTitle: '',
+            nodeType: '',
+            formLabel: '',
+            showFormula: false, // 编辑计算公式弹框显示
+            showEditContent: false, // 编辑指标内容弹框
+            showIndicatorTargetSearch: false, // 选择OKRS
+            targetConfirms: false,
+            resultInput: false,
+            scoreSelf: false,
+            scoreEachOther: false,
+            scores: false,
+            reviews: false,
+            cc: false,
+            compStyle: {
+                flexDirection: 'row',
+                alignItems: 'center',
+                justifyContent: 'flex-start'
+            },
+            indicatorOkrs: [],
+
+            tagIndex: 0,
+            form: {
+                title: "",
+                content: "",
+                target: "",
+                unit: "",
+                weight: "",
+                expression: {
+                    formulas: []
+                },
+                expandData: [],
+                flow:
+                {
+                    nodes: [
+                        {
+                            id: "",
+                            type: "targetConfirms",
+                            enable: false,
+                            assigneeType: "self",
+                            leaderLevel: 1,
+                            assigneeIds: [],
+                            multipleType: "or",
+                            allows: [],
+                            weight: 0,
+                            children: [
+                                {
+                                    id: "",
+                                    type: "targetConfirm",
+                                    enable: true,
+                                    assigneeType: "self",
+                                    leaderLevel: 1,
+                                    assigneeIds: [],
+                                    multipleType: "or",
+                                    allows: [],
+                                    weight: 0,
+                                    children: []
+                                }
+                            ]
+                        },
+                        {
+                            id: "",
+                            type: "resultInput",
+                            enable: false,
+                            assigneeType: "self",
+                            leaderLevel: 1,
+                            assigneeIds: [],
+                            multipleType: "or",
+                            allows: [
+                                "transfer"
+                            ],
+                            weight: 0,
+                            children: []
+                        },
+                        {
+                            id: "",
+                            type: "scoreSelf",
+                            enable: false,
+                            assigneeType: "self",
+                            leaderLevel: 1,
+                            assigneeIds: [],
+                            multipleType: "or",
+                            allows: [
+                                "transfer"
+                            ],
+                            weight: 0,
+                            children: []
+                        },
+                        {
+                            id: "",
+                            type: "scoreEachOther",
+                            enable: false,
+                            assigneeType: "self",
+                            leaderLevel: 1,
+                            assigneeIds: [],
+                            multipleType: "parallel",
+                            allows: [],
+                            weight: 0,
+                            children: []
+                        },
+                        {
+                            id: "",
+                            type: "scores",
+                            enable: true,
+                            assigneeType: "leader",
+                            leaderLevel: 1,
+                            assigneeIds: [],
+                            multipleType: "or",
+                            allows: [
+                                "transfer"
+                            ],
+                            weight: 0,
+                            children: [
+                                {
+                                    id: "",
+                                    type: "score",
+                                    enable: true,
+                                    assigneeType: "leader",
+                                    leaderLevel: 1,
+                                    assigneeIds: [],
+                                    multipleType: "or",
+                                    allows: [
+                                        "transfer"
+                                    ],
+                                    weight: 100,
+                                    children: []
+                                }
+                            ]
+                        },
+                        {
+                            id: "",
+                            type: "reviews",
+                            enable: false,
+                            assigneeType: "leader",
+                            leaderLevel: 1,
+                            assigneeIds: [],
+                            multipleType: "or",
+                            allows: [
+                                "transfer"
+                            ],
+                            weight: 0,
+                            children: [
+                                {
+                                    id: "",
+                                    type: "review",
+                                    enable: true,
+                                    assigneeType: "leader",
+                                    leaderLevel: 1,
+                                    assigneeIds: [],
+                                    multipleType: "or",
+                                    allows: [
+                                        "transfer"
+                                    ],
+                                    weight: 0,
+                                    children: []
+                                }
+                            ]
+                        },
+                        {
+                            id: "",
+                            type: "cc",
+                            enable: false,
+                            assigneeType: "user",
+                            leaderLevel: 1,
+                            assigneeIds: [],
+                            multipleType: "or",
+                            allows: [],
+                            weight: 0,
+                            children: []
+                        }
+                    ]
+                },
+                employeeId: 0,
+                okrs: []
+            }
+        }
+    },
+
+    methods: {
+
+        initNodes() {
+            this.form.flow.nodes.forEach((item, index) => {
+                if (index == 0) {
+                    item.id = "TCS_" + Date.now() + Math.floor(Math.random() * 10000)
+                    item.children[0].id = "TC_" + Date.now() + Math.floor(Math.random() * 10000)
+                } 
+                if (index == 1) item.id = "RI_" + Date.now() + Math.floor(Math.random() * 10000)
+                if (index == 2) item.id = "SELF_" + Date.now() + Math.floor(Math.random() * 10000)
+                if (index == 3) item.id = "EO_" + Date.now() + Math.floor(Math.random() * 10000)
+                if (index == 4) {
+                    item.id = "SS_" + Date.now() + Math.floor(Math.random() * 10000)
+                    item.children[0].id = "S_" + Date.now() + Math.floor(Math.random() * 10000)
+                }
+                if (index == 5) {
+                    item.id = "RS_" + Date.now() + Math.floor(Math.random() * 10000)
+                    item.children[0].id = "R_" + Date.now() + Math.floor(Math.random() * 10000)
+                }
+                if (index == 6) item.id = "CC_" + Date.now() + Math.floor(Math.random() * 10000)
+            })
+
+            console.log(this.form)
+        },
+
+        clearFormData() {
+            this.indicatorOkrs = [];
+            this.loading = false
+            this.tagIndex = 0;
+            this.form = {
+                title: "",
+                content: "",
+                target: "",
+                unit: "",
+                weight: "",
+                expression: {
+                    formulas: []
+                },
+                expandData: [],
+                    flow:
+                    {
+                        nodes: [
+                            {
+                                id: "",
+                                type: "targetConfirms",
+                                enable: false,
+                                assigneeType: "self",
+                                leaderLevel: 1,
+                                assigneeIds: [],
+                                multipleType: "or",
+                                allows: [],
+                                weight: 0,
+                                children: [
+                                    {
+                                        id: "",
+                                        type: "targetConfirm",
+                                        enable: true,
+                                        assigneeType: "self",
+                                        leaderLevel: 1,
+                                        assigneeIds: [],
+                                        multipleType: "or",
+                                        allows: [],
+                                        weight: 0,
+                                        children: []
+                                    }
+                                ]
+                            },
+                        {
+                            id: "",
+                            type: "resultInput",
+                            enable: false,
+                            assigneeType: "self",
+                            leaderLevel: 1,
+                            assigneeIds: [],
+                            multipleType: "or",
+                            allows: [
+                                "transfer"
+                            ],
+                            weight: 0,
+                            children: []
+                        },
+                        {
+                            id: "",
+                            type: "scoreSelf",
+                            enable: false,
+                            assigneeType: "self",
+                            leaderLevel: 1,
+                            assigneeIds: [],
+                            multipleType: "or",
+                            allows: [
+                                "transfer"
+                            ],
+                            weight: 0,
+                            children: []
+                        },
+                        {
+                            id: "",
+                            type: "scoreEachOther",
+                            enable: false,
+                            assigneeType: "self",
+                            leaderLevel: 1,
+                            assigneeIds: [],
+                            multipleType: "parallel",
+                            allows: [],
+                            weight: 0,
+                            children: []
+                        },
+                        {
+                            id: "",
+                            type: "scores",
+                            enable: true,
+                            assigneeType: "leader",
+                            leaderLevel: 1,
+                            assigneeIds: [],
+                            multipleType: "or",
+                            allows: [
+                                "transfer"
+                            ],
+                            weight: 0,
+                            children: [
+                                {
+                                    id: "",
+                                    type: "score",
+                                    enable: true,
+                                    assigneeType: "leader",
+                                    leaderLevel: 1,
+                                    assigneeIds: [],
+                                    multipleType: "or",
+                                    allows: [
+                                        "transfer"
+                                    ],
+                                    weight: 100,
+                                    children: []
+                                }
+                            ]
+                        },
+                        {
+                            id: "",
+                            type: "reviews",
+                            enable: false,
+                            assigneeType: "leader",
+                            leaderLevel: 1,
+                            assigneeIds: [],
+                            multipleType: "or",
+                            allows: [
+                                "transfer"
+                            ],
+                            weight: 0,
+                            children: [
+                                {
+                                    id: "",
+                                    type: "review",
+                                    enable: true,
+                                    assigneeType: "leader",
+                                    leaderLevel: 1,
+                                    assigneeIds: [],
+                                    multipleType: "or",
+                                    allows: [
+                                        "transfer"
+                                    ],
+                                    weight: 0,
+                                    children: []
+                                }
+                            ]
+                        },
+                        {
+                            id: "",
+                            type: "cc",
+                            enable: false,
+                            assigneeType: "user",
+                            leaderLevel: 1,
+                            assigneeIds: [],
+                            multipleType: "or",
+                            allows: [],
+                            weight: 0,
+                            children: []
+                        }
+                    ]
+                },
+                employeeId: 0,
+                okrs: []
+            }
+        },
+
+        dialogBeforeClose() {
+            this.$emit('close-dialog', false)
+        },
+
+        // 编辑计算公式的回调
+        onFormulaConfirm(formulas) {
+            console.log("公式")
+            console.log(formulas)
+            this.form.expression.formulas = formulas
+            console.log(this.form.expression.formulas)
+        },
+
+
+        // 编辑指标规则
+        finishEditContent(content) {
+            console.log(content)
+            this.form.content = content
+        },
+
+
+        handleBtnClick(index, node, row) {
+            this.handleStatusChange(index, row, node.type)
+        },
+
+        handleStatusChange(index, row, nodeType) {
+            if (index !== -1) this.tagIndex = index // 子节点索引
+            this.selectNodes = row.flow.nodes; // 所有节点
+            this.nodeType = nodeType; // 节点类型
+            if (this.nodeType === 'targetConfirms') {
+                this.dialogTitle = "确认目标"
+                this.formLabel = "确认人"
+                this.targetConfirms = true;
+            }
+            if (nodeType == 'resultInput') {
+                this.dialogTitle = "录入结果"
+                this.formLabel = "录入人"
+                this.resultInput = true;
+            }
+            if (nodeType == 'scoreSelf') {
+                this.dialogTitle = "自评"
+                this.formLabel = "自评"
+                this.scoreSelf = true;
+            }
+            if (nodeType == 'scoreEachOther') {
+                this.dialogTitle = "互评"
+                this.formLabel = "互评人"
+                this.scoreEachOther = true
+            }
+            if (nodeType == 'scores') {
+                this.dialogTitle = "评分"
+                this.formLabel = "评分人"
+                this.scores = true
+
+            }
+            if (nodeType == 'reviews') {
+                this.dialogTitle = "审批"
+                this.formLabel = "审批人"
+                this.reviews = true
+            }
+            if (nodeType == 'cc') {
+                this.dialogTitle = "抄送"
+                this.formLabel = "抄送人"
+                this.cc = true
+            }
+        },
+
+        // 自评节点单独操作
+        handleScoreSelf(row) {
+            let { flow: { nodes } } = row
+            console.log(nodes)
+        },
+
+        closeNodeDialog() { },
+
+        // 编辑节点回调事件
+        finishHandle(data) {
+            let { nodes } = data
+            this.form.flow.nodes = nodes
+            console.log(nodes)
+        },
+
+
+        onIndicatorOkrSelected(okrs, data) {
+            console.log(okrs, data)
+            this.form.okrs = okrs;
+            this.indicatorOkrs = data;
+            this.showIndicatorTargetSearch = false;
+        },
+
+        confirm() {
+            if (this.loading) return
+            this.loading = true
+            if (!this.form.title) return this.$message.error("请输入指标标题")
+            let url = `/performance/review/indicator/post/${this.user_info.site_id}/${this.reviewId}`
+            this.$http.post(url, JSON.stringify(this.form)).then(res => {
+                if (res.code == 1) {
+                    this.clearFormData();
+                    this.dialogBeforeClose();
+                    this.$message.success("操作成功")
+                    this.$emit('finished');
+                } else {
+                    this.$message.error(res.message || "操作失败")
+                }
+                this.loading = false
+            })
+        },
+
+
+        cancel() {
+            this.$emit('close-dialog', false)
+        }
+    }
+}
+
+
+
+
+</script>
+
+<style scoped lang="scss">
+
+.okr-list-box {
+    width: 100%;
+    padding: 10px;
+    box-sizing: border-box;
+    background-color: #f7f7f7;
+    border-radius: 4px;
+    box-sizing: border-box;
+    position: relative;
+
+    .edit-box {
+        position: absolute;
+        top: 0px;
+        right: 20px;
+    }
+
+}
+
+
+.formulas-list-box {
+    width: 100%;
+    padding: 10px;
+    box-sizing: border-box;
+    background-color: #f7f7f7;
+    border-radius: 4px;
+    box-sizing: border-box;
+    position: relative;
+    .edit-box {
+        position: absolute;
+        top: 0px;
+        right: 20px;
+    }
+    .formulas-list {
+        margin-bottom: 10px;
+
+        .formulas-title {
+            font-size: 14px;
+            font-weight: 500;
+            color: #409eff;
+            box-sizing: border-box;
+        }
+
+        .formulas-condition-title {
+            font-size: 14px;
+            font-weight: 400;
+            margin-bottom: 5px;
+        }
+
+        .value-box {
+            display: flex;
+            align-items: center;
+            div {
+                margin-left: 3px;
+            }
+        }
+
+
+        .special-value {
+            display: inline-block;
+            width: 60px;
+            height: 30px;
+            text-align: center;
+            line-height: 30px;
+            border: 1px solid #409eff;
+            color: #409eff;
+            border-radius: 4px;
+            box-sizing: border-box;
+        }
+
+        .normal-value {
+            font-size: 14px;
+            letter-spacing: 2px;
+            margin: 0 3px;
+        }
+    }
+}
+    
+</style>

+ 372 - 55
src/newPerformance/components/MyPerformance/AddIndicator.vue

@@ -1,17 +1,31 @@
 <template>
-    <el-dialog title="添加指标" :visible.sync="addIndicatorDialogVisible" width="700px" :before-close="dialogBeforeClose"
+    <el-dialog title="添加指标" :visible.sync="addIndicatorDialogVisible" width="600px" :before-close="dialogBeforeClose"
         append-to-body @open="initNodes()">
         <div>
 
             <div v-loading="loading" class="scroll-bar" style="max-height: 500px; overflow-y: auto;">
                 <el-form ref="form" :model="form" label-width="80px">
 
+                    <el-form-item label="复制指标">
+                        <el-link type="primary" @click="selectIndicatorDialogVisible = true">
+                            选择复制
+                        </el-link>
+                    </el-form-item>
+
                     <el-form-item label="指标名称" prop="title">
                         <el-input v-model="form.title" placeholder="指标名称" clearable></el-input>
                     </el-form-item>
 
                     <el-form-item label="指标规则">
-                        <el-link type="primary" @click="showEditContent = true">
+                        <div v-if="form.content" class="content-box">
+                            <div class="edit-box">
+                                <el-link type="primary" @click="showEditContent = true">
+                                    <i class="el-icon-edit"></i>
+                                </el-link>
+                            </div>
+                            <div v-html="form.content" style="white-space: pre-wrap;"></div>
+                        </div>
+                        <el-link v-else type="primary" @click="showEditContent = true">
                             {{ form.content ? form.content : '点击设置指标规则' }}
                         </el-link>
                     </el-form-item>
@@ -68,7 +82,11 @@
                                     :key="index">
                                     <div class="formulas-title">公式({{ index + 1 }})</div>
                                     <div class="formulas-condition-title">触发条件</div>
-                                    <div class="value-box">
+                                    <div class="value-box"
+                                        v-if="item.condition[0] === '1' && item.condition[1] === '==' && item.condition[2] === '1'">
+                                        <div class="special-value">无触发条件</div>
+                                    </div>
+                                    <div v-else class="value-box">
                                         <template v-for="(con, conIndex) in item.condition">
                                             <div class="special-value" v-if="con === '#result'">结果值</div>
                                             <div class="special-value" v-else-if="con === '#weight'">权重</div>
@@ -92,53 +110,182 @@
                         <el-link v-else type="primary" @click="showFormula = true">点击设置计算公式</el-link>
                     </el-form-item>
 
-                    <el-form-item label="确认目标">
-                        <el-switch v-if="!form.flow.nodes[0].enable" :value="form.flow.nodes[0].enable"
-                            @input="handleStatusChange(-1, form, 'targetConfirms')"></el-switch>
-                        <ShowDataComp v-else :show-data="form.flow.nodes[0]" :select-nodes="form"
-                            @btnClick="handleBtnClick" :compStyle="compStyle" />
-                    </el-form-item>
 
-                    <el-form-item label="录入结果">
-                        <el-switch v-if="!form.flow.nodes[1].enable" :value="form.flow.nodes[1].enable"
-                            @input="handleStatusChange(-1, form, 'resultInput')"></el-switch>
-                        <ShowDataComp v-else :show-data="form.flow.nodes[1]" :select-nodes="form"
-                            @btnClick="handleBtnClick" :compStyle="compStyle" />
-                    </el-form-item>
+                    <div class="node-settings flex-box-ce">
+                        <div class="node-item">
+                            <div class="node-title">确认目标</div>
+                            <div class="flex-box-ce" style="flex-direction: column; margin-top: 10px;">
+                                <el-switch :value="form.flow.nodes[0].enable"
+                                    @input="handleStatusChange(-1, form, 'targetConfirms')"></el-switch>
+                                <div v-if="form.flow.nodes[0].enable" class="flex-box-ce"
+                                    style="justify-content: center; margin-top: 10px;">
+                                    <div v-if="form.flow.nodes[0].children[0].assigneeType === 'self'"
+                                        class="child-node-title">
+                                        被考核人
+                                    </div>
+                                    <div v-if="form.flow.nodes[0].children[0].assigneeType === 'user'"
+                                        class="child-node-title">
+                                        指定人员
+                                    </div>
+
+                                    <div v-if="form.flow.nodes[0].children[0].assigneeType === 'leader'"
+                                        class="child-node-title">
+                                        <span v-if="form.flow.nodes[0].children[0].leaderLevel == 1">直接管理员</span>
+                                        <span v-if="form.flow.nodes[0].children[0].leaderLevel == 2">二级管理员</span>
+                                        <span v-if="form.flow.nodes[0].children[0].leaderLevel == 3">三级管理员</span>
+                                        <span v-if="form.flow.nodes[0].children[0].leaderLevel == 4">四级管理员</span>
+                                        <span v-if="form.flow.nodes[0].children[0].leaderLevel == 5">五级管理员</span>
+                                        <span v-if="form.flow.nodes[0].children[0].leaderLevel == 6">六级管理员</span>
+                                    </div>
 
-                    <el-form-item label="自评">
-                        <el-switch v-if="!form.flow.nodes[2].enable" :value="form.flow.nodes[2].enable"
-                            @input="handleStatusChange(-1, form, 'scoreSelf')"></el-switch>
-                        <div v-else class="flex-box-ce">
-                            <el-switch v-if="form.flow.nodes[2].enable" :value="form.flow.nodes[2].enable"
-                                @input="handleStatusChange(-1, form, 'scoreSelf')"></el-switch>
+                                    <div v-if="form.flow.nodes[0].children[0].assigneeType === 'post'"
+                                        class="child-node-title">
+                                        岗位
+                                    </div>
+
+                                    <div v-if="form.flow.nodes[0].children[0].assigneeType === 'deptLeader'"
+                                        class="child-node-title">
+                                        部门管理者
+                                    </div>
+                                </div>
+                            </div>
                         </div>
-                    </el-form-item>
 
-                    <el-form-item label="互评">
-                        <el-switch v-if="!form.flow.nodes[3].enable" :value="form.flow.nodes[3].enable"
-                            @input="handleStatusChange(-1, form, 'scoreEachOther')"></el-switch>
-                        <div v-else class="flex-box-ce">
-                            <el-switch v-if="form.flow.nodes[3].enable" :value="form.flow.nodes[3].enable"
-                                @input="handleStatusChange(-1, form, 'scoreEachOther')"></el-switch>
+                        <div class="node-item">
+                            <div class="node-title">录入结果</div>
+                            <div class="flex-box-ce" style="flex-direction: column; margin-top: 10px;">
+                                <el-switch :value="form.flow.nodes[1].enable"
+                                    @input="handleStatusChange(-1, form, 'resultInput')"></el-switch>
+                                <div v-if="form.flow.nodes[1].enable" class="flex-box-ce"
+                                    style="justify-content: center; margin-top: 10px;">
+                                    <div v-if="form.flow.nodes[1].assigneeType === 'self'" class="child-node-title">
+                                        被考核人
+                                    </div>
+                                    <div v-if="form.flow.nodes[1].assigneeType === 'user'" class="child-node-title">
+                                        指定人员
+                                    </div>
+
+                                    <div v-if="form.flow.nodes[1].assigneeType === 'leader'" class="child-node-title">
+                                        <span v-if="form.flow.nodes[1].leaderLevel == 1">直接管理员</span>
+                                        <span v-if="form.flow.nodes[1].leaderLevel == 2">二级管理员</span>
+                                        <span v-if="form.flow.nodes[1].leaderLevel == 3">三级管理员</span>
+                                        <span v-if="form.flow.nodes[1].leaderLevel == 4">四级管理员</span>
+                                        <span v-if="form.flow.nodes[1].leaderLevel == 5">五级管理员</span>
+                                        <span v-if="form.flow.nodes[1].leaderLevel == 6">六级管理员</span>
+                                    </div>
+
+                                    <div v-if="form.flow.nodes[1].assigneeType === 'post'" class="child-node-title">
+                                        岗位
+                                    </div>
+
+                                    <div v-if="form.flow.nodes[1].assigneeType === 'deptLeader'"
+                                        class="child-node-title">
+                                        部门管理者
+                                    </div>
+                                </div>
+                            </div>
                         </div>
-                    </el-form-item>
 
-                    <el-form-item label="评分">
-                        <el-switch v-if="!form.flow.nodes[4].enable" :value="form.flow.nodes[4].enable"
-                            @input="handleStatusChange(-1, form, 'scores')"></el-switch>
-                        <ShowDataComp v-else :show-data="form.flow.nodes[4]" :select-nodes="form"
-                            @btnClick="handleBtnClick" :compStyle="compStyle" />
-                    </el-form-item>
+                        <div class="node-item">
+                            <div class="node-title">自评</div>
+                            <div class="flex-box-ce" style="flex-direction: column; margin-top: 10px;">
+                                <el-switch :value="form.flow.nodes[2].enable"
+                                    @input="handleStatusChange(-1, form, 'scoreSelf')"></el-switch>
+                                <div style="margin-top: 10px;"></div>
+                            </div>
+                        </div>
 
-                    <el-form-item label="审批">
-                        <el-switch v-if="!form.flow.nodes[5].enable" :value="form.flow.nodes[5].enable"
-                            @input="handleStatusChange(-1, form, 'reviews')"></el-switch>
-                        <ShowDataComp v-else :show-data="form.flow.nodes[5]" :select-nodes="form"
-                            @btnClick="handleBtnClick" :compStyle="compStyle" />
-                    </el-form-item>
+                        <div class="node-item">
+                            <div class="node-title">互评</div>
+                            <div class="flex-box-ce" style="flex-direction: column; margin-top: 10px;">
+                                <el-switch :value="form.flow.nodes[3].enable"
+                                    @input="handleStatusChange(-1, form, 'scoreEachOther')"></el-switch>
+                                <div style="margin-top: 10px;"></div>
+                            </div>
+                        </div>
+
+                        <div class="node-item">
+                            <div class="node-title">评分</div>
+                            <div class="flex-box-ce" style="flex-direction: column; margin-top: 10px;">
+                                <el-switch :value="form.flow.nodes[4].enable"
+                                    @input="handleStatusChange(-1, form, 'scores')"></el-switch>
+                                <div v-if="form.flow.nodes[4].enable" class="flex-box-ce"
+                                    style="justify-content: center; margin-top: 10px;">
+                                    <div v-if="form.flow.nodes[4].children[0].assigneeType === 'self'"
+                                        class="child-node-title">
+                                        被考核人
+                                    </div>
+                                    <div v-if="form.flow.nodes[4].children[0].assigneeType === 'user'"
+                                        class="child-node-title">
+                                        指定人员
+                                    </div>
+
+                                    <div v-if="form.flow.nodes[4].children[0].assigneeType === 'leader'"
+                                        class="child-node-title">
+                                        <span v-if="form.flow.nodes[4].children[0].leaderLevel == 1">直接管理员</span>
+                                        <span v-if="form.flow.nodes[4].children[0].leaderLevel == 2">二级管理员</span>
+                                        <span v-if="form.flow.nodes[4].children[0].leaderLevel == 3">三级管理员</span>
+                                        <span v-if="form.flow.nodes[4].children[0].leaderLevel == 4">四级管理员</span>
+                                        <span v-if="form.flow.nodes[4].children[0].leaderLevel == 5">五级管理员</span>
+                                        <span v-if="form.flow.nodes[4].children[0].leaderLevel == 6">六级管理员</span>
+                                    </div>
+
+                                    <div v-if="form.flow.nodes[4].children[0].assigneeType === 'post'"
+                                        class="child-node-title">
+                                        岗位
+                                    </div>
+
+                                    <div v-if="form.flow.nodes[4].children[0].assigneeType === 'deptLeader'"
+                                        class="child-node-title">
+                                        部门管理者
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+
+                        <div class="node-item">
+                            <div class="node-title">审批</div>
+                            <div class="flex-box-ce" style="flex-direction: column; margin-top: 10px;">
+                                <el-switch :value="form.flow.nodes[5].enable"
+                                    @input="handleStatusChange(-1, form, 'reviews')"></el-switch>
+                                <div v-if="form.flow.nodes[5].enable" class="flex-box-ce"
+                                    style="justify-content: center; margin-top: 10px;">
+                                    <div v-if="form.flow.nodes[5].children[0].assigneeType === 'self'"
+                                        class="child-node-title">
+                                        被考核人
+                                    </div>
+                                    <div v-if="form.flow.nodes[5].children[0].assigneeType === 'user'"
+                                        class="child-node-title">
+                                        指定人员
+                                    </div>
+
+                                    <div v-if="form.flow.nodes[5].children[0].assigneeType === 'leader'"
+                                        class="child-node-title">
+                                        <span v-if="form.flow.nodes[5].children[0].leaderLevel == 1">直接管理员</span>
+                                        <span v-if="form.flow.nodes[5].children[0].leaderLevel == 2">二级管理员</span>
+                                        <span v-if="form.flow.nodes[5].children[0].leaderLevel == 3">三级管理员</span>
+                                        <span v-if="form.flow.nodes[5].children[0].leaderLevel == 4">四级管理员</span>
+                                        <span v-if="form.flow.nodes[5].children[0].leaderLevel == 5">五级管理员</span>
+                                        <span v-if="form.flow.nodes[5].children[0].leaderLevel == 6">六级管理员</span>
+                                    </div>
+
+                                    <div v-if="form.flow.nodes[5].children[0].assigneeType === 'post'"
+                                        class="child-node-title">
+                                        岗位
+                                    </div>
+
+                                    <div v-if="form.flow.nodes[5].children[0].assigneeType === 'deptLeader'"
+                                        class="child-node-title">
+                                        部门管理者
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
 
                 </el-form>
+                <div style="height: 50px;"></div>
+
             </div>
 
             <div slot="footer" class="flex-box-ce" style="justify-content: center;">
@@ -148,7 +295,6 @@
         </div>
 
 
-
         <!-- 编辑计算公式 -->
         <FormulaComp v-if="showFormula" v-model="showFormula"
             :fixed-props="[{ key: 'target', name: '目标' }, { key: 'weight', name: '权重' }, { key: 'result', name: '结果值' }]"
@@ -197,6 +343,12 @@
         <!-- 指标okr选择 -->
         <TargetSearch :visible.sync="showIndicatorTargetSearch" :selectedCheckList="indicatorOkrs"
             :showSelectedData="indicatorOkrs" :key="`indicatorTarget`" @confirm="onIndicatorOkrSelected" />
+
+        <!--选择指标进行复制-->
+        <IndicatorList v-if="selectIndicatorDialogVisible" v-model="selectIndicatorDialogVisible"
+            :indicatorInfo="indicatorInfo" @confirm="onIndicatorSelected" />
+
+
     </el-dialog>
 
 </template>
@@ -218,7 +370,7 @@ import ScoreEachOther from '@/newPerformance/components/TemplateDetails/ScoreEac
 import Scores from '@/newPerformance/components/TemplateDetails/Scores'; // 评分流程节点
 import Reviews from '@/newPerformance/components/TemplateDetails/Reviews'; // 审批流程节点
 import CC from '@/newPerformance/components/TemplateDetails/CC'; // 审批流程节点
-
+import IndicatorList from './IndicatorList.vue'; // 复制指标,选择指标复制
 export default {
     components: {
         HandleNode,
@@ -233,7 +385,8 @@ export default {
         ScoreEachOther,
         Scores,
         Reviews,
-        CC
+        CC,
+        IndicatorList
     },
 
     model: {
@@ -242,6 +395,10 @@ export default {
     },
 
     props: {
+        indicatorInfo: {
+            type: Array,
+            default: () => []
+        },
         addIndicatorDialogVisible: {
             type: Boolean,
             default: false
@@ -269,6 +426,7 @@ export default {
             showFormula: false, // 编辑计算公式弹框显示
             showEditContent: false, // 编辑指标内容弹框
             showIndicatorTargetSearch: false, // 选择OKRS
+            selectIndicatorDialogVisible: false, // 选择指标进行复制
             targetConfirms: false,
             resultInput: false,
             scoreSelf: false,
@@ -282,7 +440,10 @@ export default {
                 justifyContent: 'flex-start'
             },
             indicatorOkrs: [],
-
+            employeeMap: this.$getEmployeeMap(), // 员工列表
+            postList: JSON.parse(localStorage.getItem("postList")), // 岗位列表
+            deptList: JSON.parse(localStorage.getItem("deptList")), // 部门列表 - 树形结构
+            dept_list: JSON.parse(localStorage.getItem("dept_list")), // 部门列表
             tagIndex: 0,
             form: {
                 title: "",
@@ -442,6 +603,37 @@ export default {
 
     methods: {
 
+        // 获取部门
+        get_dept_list() {
+            return this.$axiosUser('get', '/api/pro/department/tree', '', 'v2')
+        },
+
+        // 岗位列表
+        get_post_list() {
+            let data = {
+                page: 1,
+                page_size: 999,
+                cate_id: -1,
+                name: ''
+            }
+            return this.$axiosUser('get', '/api/pro/post/cate_post_list', data)
+        },
+
+        // 处理部门树状结构数据
+        getTreeData(data) {
+            for (var i = 0; i < data.length; i++) {
+                data[i].checked = false;
+                if (data[i].children.length < 1) {
+                    // children若为空数组,则将children设为undefined
+                    data[i].children = undefined;
+                } else {
+                    // children若不为空数组,则继续 递归调用 本方法
+                    this.getTreeData(data[i].children);
+                }
+            }
+            return data;
+        },
+
         initNodes() {
             this.form.flow.nodes.forEach((item, index) => {
                 if (index == 0) {
@@ -463,8 +655,23 @@ export default {
             })
 
             console.log(this.form)
+
+
+            // 请求岗位列表,部门列表
+            Promise.all([this.get_dept_list(), this.get_post_list()]).then(([deptRes, postRes]) => {
+                if (deptRes.data.code !== 1) return this.$message.error(deptRes.data.msg || "请求部门列表数据出错")
+                if (postRes.data.code !== 1) return this.$message.error(postRes.data.msg || "请求岗位列表数据出错")
+                this.dept_list = deptRes.data.data.list;
+                this.deptList = this.getTreeData(this.dept_list); // 处理成树状结构
+                this.postList = postRes.data.data.list
+                localStorage.setItem("dept_list", JSON.stringify(this.dept_list))
+                localStorage.setItem("deptList", JSON.stringify(this.deptList))
+                localStorage.setItem("postList", JSON.stringify(this.postList))
+                this.isDataShow = true
+            })
         },
 
+        // 清空数据
         clearFormData() {
             this.indicatorOkrs = [];
             this.loading = false
@@ -624,6 +831,50 @@ export default {
             }
         },
 
+
+        filterEmployeeNames(assigneeIds) {
+            let employeeNames = []
+            if (assigneeIds && assigneeIds.length > 0) {
+                Object.keys(this.employeeMap).forEach(key => {
+                    assigneeIds.forEach(assigneeId => {
+                        if (key == assigneeId) employeeNames.push(this.employeeMap[key].name)
+                    })
+                })
+            }
+            return employeeNames
+        },
+
+        filterPostNames(assigneeIds) {
+            let select_post_name = []
+            if (assigneeIds && assigneeIds.length > 0) {
+                if (this.postList && this.postList.length > 0) {
+                    this.postList.forEach(post => {
+                        assigneeIds.forEach(assignee => {
+                            if (post.id == assignee) select_post_name.push(post.name)
+                        })
+                    })
+                }
+
+            }
+            return select_post_name
+        },
+
+        filterDeptNames(assigneeIds) {
+            let select_dept_name = []
+            if (assigneeIds && assigneeIds.length > 0) {
+                if (this.dept_list && this.dept_list.length > 0) {
+                    this.dept_list.forEach(dept => {
+                        assigneeIds.forEach(assignee => {
+                            if (dept.id == assignee) {
+                                select_dept_name.push(dept.name)
+                            }
+                        })
+                    })
+                }
+            }
+            return select_dept_name
+        },
+
         dialogBeforeClose() {
             this.$emit('close-dialog', false)
         },
@@ -690,13 +941,8 @@ export default {
             }
         },
 
-        // 自评节点单独操作
-        handleScoreSelf(row) {
-            let { flow: { nodes } } = row
-            console.log(nodes)
-        },
 
-        closeNodeDialog() { },
+        closeNodeDialog() {},
 
         // 编辑节点回调事件
         finishHandle(data) {
@@ -705,6 +951,14 @@ export default {
             console.log(nodes)
         },
 
+        onIndicatorSelected(indicator) {
+            console.log(indicator)
+            this.form = {
+                ...indicator,
+                employeeId: 0
+            }
+        },
+
 
         onIndicatorOkrSelected(okrs, data) {
             console.log(okrs, data)
@@ -714,9 +968,9 @@ export default {
         },
 
         confirm() {
+            if (!this.form.title) return this.$message.error("请输入指标标题")
             if (this.loading) return
             this.loading = true
-            if (!this.form.title) return this.$message.error("请输入指标标题")
             let url = `/performance/review/indicator/post/${this.user_info.site_id}/${this.reviewId}`
             this.$http.post(url, JSON.stringify(this.form)).then(res => {
                 if (res.code == 1) {
@@ -733,15 +987,31 @@ export default {
 
 
         cancel() {
-            this.$emit('close-dialog', false)
+            this.clearFormData();
+            this.$emit('close-dialog', false);
         }
     }
 }
+</script>
 
+<style lang="scss">
+.node-settings {
+    .el-switch__core {
+        width: 30px !important;
+        height: 16px;
+    }
 
+    .el-switch__core::after {
+        width: 14px;
+        height: 14px;
+        margin-top: -1px;
+    }
 
-
-</script>
+    .el-switch.is-checked .el-switch__core::after {
+        margin-left: -15px;
+    }
+}
+</style>
 
 <style scoped lang="scss">
 
@@ -820,5 +1090,52 @@ export default {
         }
     }
 }
+
+.content-box {
+    width: 100%;
+    padding: 10px;
+    box-sizing: border-box;
+    background-color: #f7f7f7;
+    border-radius: 4px;
+    box-sizing: border-box;
+    position: relative;
+
+    .edit-box {
+        position: absolute;
+        top: 0px;
+        right: 20px;
+    }
+}
+
+
+.node-settings {
+   width: 100%;
+   height: 100px;
+   background-color: #f6f6f6;
+   .node-item {
+        width: 100px;
+        height: 100px;
+        border-right: 1px solid #fff;
+        flex-direction: column;
+        display: flex;
+        align-items: center;
+        justify-content: flex-start;
+        .node-title {
+            margin-top: 10px;
+        }
+   }
+}
+
+.child-node-title {
+    width: 80px;
+    height: 24px;
+    margin: 0 auto;
+    text-align: center;
+    line-height: 24px;
+    box-sizing: border-box;
+    border-radius: 6px;
+    border: 1px solid #409eff;
+    color: #409eff;
+}
     
 </style>

+ 30 - 9
src/newPerformance/components/MyPerformance/ExamineLog.vue

@@ -4,17 +4,22 @@
         <div class="all">
 
             <div class="table-box">
-
+                
                 <el-table v-loading="loading" :data="tableData" :header-cell-style="{ background: '#f5f7fa' }"
                     style="width: 100%; height: auto;" size="mini">
                     <el-table-column prop="name" label="员工" width="150">
                         <template slot-scope="scope">
                             <div class="flex-box-ce" v-if="scope.row.employeeId !== 0">
                                 <userImage :id="scope.row.employeeId" :img_url="scope.row.imgUrl"
-                                    :user_name="scope.row.name" width="30px" height="30px"></userImage>
-                                {{ scope.row.name }}
+                                    :user_name="scope.row.name" width="40px" height="40px"></userImage>
+                                <div style="margin-left: 10px;">
+                                    {{ scope.row.name }}
+                                </div>
                             </div>
                             <div class="flex-box-ce" v-else>
+                                <div class="circle-box">
+                                    <i class="el-icon-s-platform"></i>
+                                </div>
                                 系统操作
                             </div>
 
@@ -63,7 +68,6 @@ export default {
     watch: {
         examineLogDialogVisible(v) {
             if (v) {
-                this.params.reviewIndicatorId = this.reviewIndicatorId
                 this.getTableData()
             }
         }
@@ -75,7 +79,6 @@ export default {
             tableData: [],
             total: 0,
             params: {
-                reviewIndicatorId: '',
                 page: 1,
                 pageSize: 10,
             },
@@ -88,7 +91,7 @@ export default {
     },
 
         
-    created() {
+    mounted() {
         this.getTableData()
     },
 
@@ -96,8 +99,13 @@ export default {
         getTableData() {
             this.loading = true
             let url = `/performance/statistics/logs/${this.user_info.site_id}/${this.reviewId}`
-            if (!this.params.reviewIndicatorId) delete this.params.reviewIndicatorId
-            this.$axiosUser("get", url, this.params).then(res => {
+            let requestParams = {}
+            
+            if (this.reviewIndicatorId)
+                requestParams = { ...this.params, reviewIndicatorId: this.reviewIndicatorId }
+            else 
+                requestParams = { ...this.params }
+            this.$axiosUser("get", url, requestParams).then(res => {
                 this.tableData = res.data.data.list;
                 this.total = res.data.data.total
                 this.loading = false;
@@ -125,7 +133,7 @@ export default {
 <style scoped lang="scss">
 .all {
     width: 100%;
-    min-height: 500px;
+    min-height: 400px;
     overflow-y: auto;
     background-color: #fff;
     font-size: 14px;
@@ -175,5 +183,18 @@ export default {
             background: #ededed;
         }
     }
+
+    .circle-box {
+        width: 40px;
+        height: 40px;
+        border-radius: 50%;
+        background: #409ef5;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        color: white;
+        font-size: 20px;
+        margin-right: 10px;
+    }
 }
 </style>

+ 102 - 0
src/newPerformance/components/MyPerformance/IndicatorList.vue

@@ -0,0 +1,102 @@
+<template>
+    <el-dialog title="请选择指标" :visible.sync="selectIndicatorDialogVisible" width="600px"
+        :before-close="dialogBeforeClose" append-to-body>
+        <div class="flex-box-ce">
+            <div class="indicator-item" :class="currentIndex == index ? 'active' : ''"
+                v-for="(item, index) in indicatorInfo" :key="item.reviewIndicatorId" @click="chooseIndicator(index)">
+                {{ item.title }}
+            </div>
+        </div>
+
+        <div slot="footer" class="flex-box-ce" style="justify-content: center;">
+            <el-button type="primary" @click="confirm()">确 定</el-button>
+            <el-button @click="cancel()">取 消</el-button>
+        </div>
+
+    </el-dialog>
+</template>
+
+
+<script>
+
+export default {
+    model: {
+        prop: 'selectIndicatorDialogVisible',
+        event: 'close-dialog'
+    },
+    props: {
+        selectIndicatorDialogVisible: {
+            type: Boolean,
+            default: false
+        },
+
+        indicatorInfo: {
+            type: Array,
+            default: () => []
+        },
+    },
+
+
+    computed: {
+    },
+
+    data() {
+        return {
+            currentIndex: 0
+        }
+    },
+
+    methods: {
+
+        chooseIndicator(index) {
+            this.currentIndex = index
+        },
+
+        dialogBeforeClose() {
+            this.$emit('close-dialog', false)
+        },
+
+        confirm() {
+            if (!this.indicatorInfo[this.currentIndex]) return
+            let { title, unit, content, target, weight, okrs, expression, flow } = this.indicatorInfo[this.currentIndex]
+            console.log(this.indicatorInfo[this.currentIndex]);
+            this.$emit('confirm', { title, unit, content, target, weight, okrs, expression, flow });
+            this.cancel();
+        },
+
+        cancel() {
+            this.$emit('close-dialog', false)
+        },
+
+
+
+
+    }
+}
+</script>
+
+
+<style scoped lang="scss">
+.indicator-item {
+    width: 140px;
+    padding: 6px 10px;
+    text-align: center;
+    border-radius: 25px;
+    margin-right: 10px;
+    color: #89919f;
+    background-color: #f5f8fa;
+    cursor: pointer;
+    position: relative;
+    box-sizing: border-box;
+    margin-bottom: 10px;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    &.active {
+        border: none;
+        background-color: #409EFF;
+        font-weight: 600;
+        color: #fff;
+    }
+}
+</style>

+ 94 - 63
src/newPerformance/components/MyPerformance/ResetNode.vue

@@ -16,36 +16,36 @@
                 请在下方选择需要重置的目标节点
             </div>
 
-            <div style="width: 100%; background-color: #f9f9f9; padding: 20px; box-sizing: border-box;"> 
-                <template v-for=" (item) in handleRow.flow.nodes">
-                <div class="node-item" v-if="optionalNodes.includes(item.type)"
-                    :class="[!item.enable ? 'disabled' : '', targetNodeId === item.id ? 'active' : '']" :key="item.id"
-                    @click="chooseNode(item)">
-                    <template v-if="item.type === 'targetConfirms'">
-                        确认目标 {{ !item.enable ? '(已禁用)' : '' }}
-                    </template>
-
-                    <template v-if="item.type === 'resultInput'">
-                        录入结果 {{ !item.enable ? '(已禁用)' : '' }}
-                    </template>
-
-                    <template v-if="item.type === 'scoreSelf'">
-                        自评 {{ !item.enable ? '(已禁用)' : '' }}
-                    </template>
-
-                    <template v-if="item.type === 'scoreEachOther'">
-                        互评 {{ !item.enable ? '(已禁用)' : '' }}
-                    </template>
-
-                    <template v-if="item.type === 'scores'">
-                        评分 {{ !item.enable ? '(已禁用)' : '' }}
-                    </template>
-
-                    <template v-if="item.type === 'reviews'">
-                        审批 {{ !item.enable ? '(已禁用)' : '' }}
-                    </template>
-                </div>
-</template>
+            <div style="width: 100%; background-color: #f9f9f9; padding: 20px; box-sizing: border-box;">
+                <template v-for="(item) in handleRow.flow.nodes">
+                    <div class="node-item" v-if="optionalNodes.includes(item.type)"
+                        :class="[!item.enable ? 'disabled' : '', targetNodeId === item.id ? 'active' : '']"
+                        :key="item.id" @click="chooseNode(item)">
+                        <template v-if="item.type === 'targetConfirms'">
+                            确认目标 {{ !item.enable ? '(已禁用)' : '' }}
+                        </template>
+
+                        <template v-if="item.type === 'resultInput'">
+                            录入结果 {{ !item.enable ? '(已禁用)' : '' }}
+                        </template>
+
+                        <template v-if="item.type === 'scoreSelf'">
+                            自评 {{ !item.enable ? '(已禁用)' : '' }}
+                        </template>
+
+                        <template v-if="item.type === 'scoreEachOther'">
+                            互评 {{ !item.enable ? '(已禁用)' : '' }}
+                        </template>
+
+                        <template v-if="item.type === 'scores'">
+                            评分 {{ !item.enable ? '(已禁用)' : '' }}
+                        </template>
+
+                        <template v-if="item.type === 'reviews'">
+                            审批 {{ !item.enable ? '(已禁用)' : '' }}
+                        </template>
+                    </div>
+                </template>
             </div>
 
         </div>
@@ -54,13 +54,23 @@
             <el-button type="primary" @click="confirm()">确 定</el-button>
             <el-button @click="cancel()">取 消</el-button>
         </div>
+
+        <Vcode :show="verifyDialogVisible" @success="verifySuccess" @close="verifyError" />
+        <!-- <VerifyDialog v-model="verifyDialogVisible" @success="verifySuccess" @error="verifyError" /> -->
     </el-dialog>
 </template>
 
 
 <script>
 import { mapGetters } from 'vuex';
+// import VerifyDialog from '@/newPerformance/components/PublicComp/VerifyDialog'; // 验证码
+import Vcode from "vue-puzzle-vcode";
+
 export default {
+    components: {
+        Vcode
+        // VerifyDialog
+    },
     model: {
         prop: 'resetNodeDialogVisible',
         event: 'close-dialog'
@@ -73,7 +83,7 @@ export default {
 
         handleRow: {
             type: Object,
-            default: () => {}
+            default: () => { }
         }
     },
 
@@ -90,9 +100,10 @@ export default {
     data() {
         return {
             targetNodeId: "",
+            verifyDialogVisible: false,
             selectNodes: ['targetConfirms', 'resultInput', 'scoreSelf', 'scoreEachOther', 'scores', 'reviews'],
             allStatus: ['target_confirm', 'result_input', 'score_self', 'score_each_other', 'score', 'review']
-         }
+        }
     },
 
     methods: {
@@ -111,8 +122,7 @@ export default {
             this.$emit('close-dialog', false)
         },
 
-        confirm() {
-            if (!this.targetNodeId) return this.$message.error("请选择目标节点")
+        resetNodeApi() {
             let url = `/performance/review/flow/reset/${this.user_info.site_id}`
             let data = {
                 reviewIndicatorId: this.handleRow.reviewIndicatorId,
@@ -129,44 +139,65 @@ export default {
             })
         },
 
+        confirm() {
+            if (!this.targetNodeId) return this.$message.error("请选择目标节点")
+            this.verifyDialogVisible = true
+        },
+
         cancel() {
             this.$emit('close-dialog', false)
-        }
+        },
+
+        verifySuccess() {
+            this.resetNodeApi()
+        },
+
+        verifyError() {},
+
+
+        
     }
 }
 </script>
 
 
 <style scoped lang="scss">
-    .currentNode {
-        margin-bottom: 10px;
-        font-size: 16px;
-        span {
-            color: #409EFF;
-            font-weight: 600;
-        }
+
+.vue-puzzle-vcode {
+    z-index: 99999;
+}
+.currentNode {
+    margin-bottom: 10px;
+    font-size: 16px;
+
+    span {
+        color: #409EFF;
+        font-weight: 600;
     }
-    .node-item {
-        width: 140px;
-        padding: 6px 10px;
-        text-align: center;
-        border-radius: 25px;
-        color: #89919f;
-        background-color: #f5f8fa;
-        border: 1px solid #89919f;
-        cursor: pointer;
-        position: relative;
-        box-sizing: border-box;
-        margin-bottom: 10px;
-        &.disabled {
-            opacity: 0.6;
-        }
-        &.active {
-            border: none;
-            background-color: #409EFF;
-            font-weight: 600;
-            color: #fff;
-        }
+}
+
+.node-item {
+    width: 140px;
+    padding: 6px 10px;
+    text-align: center;
+    border-radius: 25px;
+    color: #89919f;
+    background-color: #f5f8fa;
+    border: 1px solid #89919f;
+    cursor: pointer;
+    position: relative;
+    box-sizing: border-box;
+    margin-bottom: 10px;
+
+    &.disabled {
+        opacity: 0.6;
     }
 
+    &.active {
+        border: none;
+        background-color: #409EFF;
+        font-weight: 600;
+        color: #fff;
+    }
+}
 </style>

+ 1 - 1
src/newPerformance/components/MyPerformance/SelectExamine.vue

@@ -246,7 +246,7 @@ export default {
 
         changeCircle(v) {
             this.params.page = 1;
-            this.params.cycleType = v;
+            this.cycleType = v;
         },
 
         handleSizeChange(v) {

+ 3 - 3
src/newPerformance/components/OrganizationExamine.vue

@@ -165,11 +165,11 @@ export default {
             tableIndex: -1,
             selected: { employee: [], dept: [] },//已经选择人员
             choosePerson: false,
-            // 周期类型 0-定义 1-年度 2-半年度 3-季度 4-月度
+            // 周期类型 0-定义 1-年度 2-半年度 3-季度 4-月度
             cycleType: '-1',
             cycleOptions: [
                 { label: "全部", value: '-1' },
-                { label: "定义", value: '0' },
+                { label: "定义", value: '0' },
                 { label: "年度", value: '1' },
                 { label: "半年度", value: '2' },
                 { label: "季度", value: '3' },
@@ -204,7 +204,7 @@ export default {
             else return "--"
         },
         formatCycleType(val) {
-            if (val == 0) return '定义'
+            if (val == 0) return '定义'
             if (val == 1) return '年度'
             if (val == 2) return '半年'
             if (val == 3) return '季度'

+ 0 - 347
src/newPerformance/components/PerCcSelector.vue

@@ -1,347 +0,0 @@
-<template>
-  <el-dialog
-    :visible.sync="innerVisible"
-    @close="handleClose"
-    @open="initData"
-    @closed="dataReset"
-    append-to-body
-    :close-on-click-modal="false"
-    center
-    title="结果录入节点配置"
-    width="600px"
-  >
-    <el-form v-if="currentNode" label-width="200">
-      <el-form-item label="启用">
-        <el-switch
-          v-model="currentNode.enable"
-        />
-      </el-form-item>
-
-      <el-form-item label="抄送人">
-        <el-radio-group
-          v-model="currentNode.assigneeType"
-          :disabled="!currentNode.enable"
-          @change="onAssigneeTypeChange"
-        >
-          <el-radio-button label="leader">组织管理员</el-radio-button>
-          <el-radio-button label="user">指定人员</el-radio-button>
-          <el-radio-button label="self">被考核人</el-radio-button>
-          <el-radio-button label="post">岗位</el-radio-button>
-          <el-radio-button label="deptLeader">部门负责人</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-
-      <el-form-item label="">
-        <template v-if="currentNode.assigneeType === 'leader'">
-          <el-select
-            v-model="currentNode.leaderLevel"
-            placeholder="请选择管理员"
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="leader"
-            @change="onOrgManagerChange"
-          >
-            <el-option
-              v-for="item in levelOptions"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.assigneeType === 'user'">
-          <el-select
-            v-model="userSelected"
-            placeholder="请选择指定人员"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="user"
-            @change="onUserChange"
-          >
-            <el-option
-              v-for="item in employees"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.assigneeType === 'post'">
-          <el-select
-            v-model="postSelected"
-            placeholder="请选择岗位"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="post"
-            @change="onPostChange"
-          >
-            <el-option
-              v-for="item in postList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.assigneeType === 'deptLeader'">
-          <el-select
-            v-model="deptSelected"
-            placeholder="请选择部门"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="deptLeader"
-            @change="onDeptChange"
-          >
-            <el-option
-              v-for="item in deptList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-      </el-form-item>
-    </el-form>
-  </el-dialog>
-</template>
-
-
-<script>
-import Template from "../../examine/components/Template.vue";
-
-export default {
-  name: "PerCcSelector",
-  components: {Template},
-  props: {
-    showVisible: {
-      type: Boolean,
-      default: false
-    },
-    indicator:{
-      type: Object,
-      default: () =>{
-        return null
-      }
-    }
-  },
-  data(){
-    return {
-      userInfo: this.$userInfo(),
-      currentNode: null,
-      innerVisible: this.showVisible,
-      loading:false,
-      employees:[],
-      postList:[],
-      deptList:[],
-      userSelected:[],
-      postSelected:[],
-      deptSelected:[],
-      assigneeMap:{
-        leader:'组织管理员',
-        user:'指定人员',
-        self:'被考核人',
-        post:'岗位',
-        deptLeader:'部门负责人',
-      },
-      levelOptions: [
-        {
-          value: 1,
-          label: '直接管理员'
-        },
-        {
-          value: 2,
-          label: '二级管理员'
-        },
-        {
-          value: 3,
-          label: '三级管理员'
-        },
-        {
-          value: 4,
-          label: '四级管理员'
-        },
-        {
-          value: 5,
-          label: '五级管理员'
-        },
-        {
-          value: 6,
-          label: '六级管理员'
-        }
-      ]
-    }
-  },
-  computed:{
-    employeeMap(){
-      const map = {};
-      this.employees.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    postMap(){
-      const map = {};
-      this.postList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    deptMap(){
-      const map = {};
-      this.deptList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-  },
-  watch:{
-    showVisible(val){
-      this.innerVisible = val;
-    },
-  },
-  methods: {
-    matchErrMsg(err){
-      return err.toString().replace(/[(Error: )]/g,'');
-    },
-    handleClose(){
-      this.$emit('update:showVisible',false);
-    },
-    dataReset(){
-      this.currentNode = null;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    initData(){
-      if (this.loading || !this.indicator) return;
-      this.dataReset();
-      this.loading = true;
-
-      let result = true;
-      Promise.all([
-        this.$axiosUser('get', '/api/pro/employee/index', {page:0,page_size:10,status:1}, 'v2'),
-        this.$axiosUser('get','/org/post'),
-        this.$axiosUser('get', `/org/departments/${this.userInfo.site_id}`)
-      ])
-        .then(([employeeRes,postRes,deptRes]) => {
-          if (employeeRes.data.code !== 1) throw new Error(employeeRes.data.msg);
-          if (postRes.data.code !== 1) throw new Error(postRes.data.message);
-          if (deptRes.data.code !== 1) throw new Error(deptRes.data.message);
-
-          this.employees = employeeRes.data.data.list
-            .filter(e => e.account_id && e.account_id > 0)
-            .map(e => {
-              return {
-                id:e.id,
-                name:e.name,
-              }
-            });
-
-          this.postList = postRes.data.data.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.deptList = deptRes.data.data.list.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.currentNode = this.indicator.flow.nodes.find(node => node.type === 'cc');
-
-          switch (this.currentNode.assigneeType){
-            case 'user':
-              this.userSelected = this.currentNode.assigneeIds;
-              break;
-            case 'post':
-              this.postSelected = this.currentNode.assigneeIds;
-              break;
-            case 'deptLeader':
-              this.deptSelected = this.currentNode.assigneeIds;
-              break;
-          }
-        })
-        .catch(err => {
-          this.$message.error(this.matchErrMsg(err));
-          result = false;
-        })
-        .finally(() => {
-          this.loading = false;
-          if (!result) this.handleClose();
-        })
-    },
-    generalId(){
-      return Date.now() + Math.floor(Math.random() * 10000);
-    },
-    onAssigneeTypeChange(v){
-      this.currentNode.assigneeIds = [];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onOrgManagerChange(v){
-      this.currentNode.assigneeIds = [];
-      this.currentNode.leaderLevel = v;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onUserChange(v){
-      this.currentNode.assigneeIds = [...v];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = v;
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onPostChange(v){
-      this.currentNode.assigneeIds = [...v];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = v;
-      this.deptSelected = [];
-    },
-    onDeptChange(v){
-      this.currentNode.assigneeIds = [...v];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = v;
-    },
-  }
-}
-</script>
-
-<style scoped lang="scss">
-.handler-list {
-  width: 500px;
-  margin: 0 auto 16px auto;
-  border-radius: 6px;
-  border: 1px solid #d7dae2;
-  padding: 10px 0 0 10px;
-  box-sizing: border-box;
-  display: flex;
-  flex-wrap: wrap;
-
-  .el-tag {
-    margin: 0 10px 10px 0;
-    cursor: pointer;
-  }
-}
-
-</style>

+ 0 - 362
src/newPerformance/components/PerCcSelectorOnly.vue

@@ -1,362 +0,0 @@
-<template>
-  <el-dialog
-    :visible.sync="innerVisible"
-    @close="handleClose"
-    @open="initData"
-    @closed="dataReset"
-    append-to-body
-    :close-on-click-modal="false"
-    center
-    title="结果录入节点配置"
-    width="600px"
-  >
-    <el-form v-if="currentNode" label-width="200">
-      <el-form-item label="启用">
-        <el-switch
-          v-model="currentNode.enable"
-        />
-      </el-form-item>
-
-      <el-form-item label="抄送人">
-        <el-radio-group
-          v-model="currentNode.assigneeType"
-          :disabled="!currentNode.enable"
-          @change="onAssigneeTypeChange"
-        >
-          <el-radio-button label="leader">组织管理员</el-radio-button>
-          <el-radio-button label="user">指定人员</el-radio-button>
-          <el-radio-button label="self">被考核人</el-radio-button>
-          <el-radio-button label="post">岗位</el-radio-button>
-          <el-radio-button label="deptLeader">部门负责人</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-
-      <el-form-item label="">
-        <template v-if="currentNode.assigneeType === 'leader'">
-          <el-select
-            v-model="currentNode.leaderLevel"
-            placeholder="请选择管理员"
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="leader"
-            @change="onOrgManagerChange"
-          >
-            <el-option
-              v-for="item in levelOptions"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.assigneeType === 'user'">
-          <el-select
-            v-model="userSelected"
-            placeholder="请选择指定人员"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="user"
-            @change="onUserChange"
-          >
-            <el-option
-              v-for="item in employees"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.assigneeType === 'post'">
-          <el-select
-            v-model="postSelected"
-            placeholder="请选择岗位"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="post"
-            @change="onPostChange"
-          >
-            <el-option
-              v-for="item in postList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.assigneeType === 'deptLeader'">
-          <el-select
-            v-model="deptSelected"
-            placeholder="请选择部门"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="deptLeader"
-            @change="onDeptChange"
-          >
-            <el-option
-              v-for="item in deptList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-      </el-form-item>
-    </el-form>
-    <template v-if="currentNode" #footer>
-      <el-row type="flex" justify="end">
-        <el-col align="end">
-          <el-button
-            type="primary"
-            @click="onConfirm"
-          >
-            确认
-          </el-button>
-        </el-col>
-      </el-row>
-    </template>
-  </el-dialog>
-</template>
-
-
-<script>
-import Template from "../../examine/components/Template.vue";
-
-export default {
-  name: "PerCcSelectorOnly",
-  components: {Template},
-  props: {
-    showVisible: {
-      type: Boolean,
-      default: false
-    },
-  },
-  data(){
-    return {
-      userInfo: this.$userInfo(),
-      currentNode: null,
-      innerVisible: this.showVisible,
-      loading:false,
-      employees:[],
-      postList:[],
-      deptList:[],
-      userSelected:[],
-      postSelected:[],
-      deptSelected:[],
-      assigneeMap:{
-        leader:'组织管理员',
-        user:'指定人员',
-        self:'被考核人',
-        post:'岗位',
-        deptLeader:'部门负责人',
-      },
-      levelOptions: [
-        {
-          value: 1,
-          label: '直接管理员'
-        },
-        {
-          value: 2,
-          label: '二级管理员'
-        },
-        {
-          value: 3,
-          label: '三级管理员'
-        },
-        {
-          value: 4,
-          label: '四级管理员'
-        },
-        {
-          value: 5,
-          label: '五级管理员'
-        },
-        {
-          value: 6,
-          label: '六级管理员'
-        }
-      ]
-    }
-  },
-  computed:{
-    employeeMap(){
-      const map = {};
-      this.employees.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    postMap(){
-      const map = {};
-      this.postList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    deptMap(){
-      const map = {};
-      this.deptList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-  },
-  watch:{
-    showVisible(val){
-      this.innerVisible = val;
-    },
-  },
-  methods: {
-    defaultNode(){
-      const node = JSON.parse("{\"id\":\"CC_1907236768800382984\",\"type\":\"cc\",\"enable\":false,\"assigneeType\":\"user\",\"leaderLevel\":1,\"assigneeIds\":[],\"multipleType\":\"or\",\"allows\":[],\"weight\":0,\"children\":[]}");
-      node.id = "CC_" + this.generalId();
-      return node;
-    },
-    matchErrMsg(err){
-      return err.toString().replace(/[(Error: )]/g,'');
-    },
-    handleClose(){
-      this.$emit('update:showVisible',false);
-    },
-    dataReset(){
-      this.currentNode = null;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    initData(){
-      if (this.loading) return;
-      this.dataReset();
-      this.loading = true;
-
-      let result = true;
-      Promise.all([
-        this.$axiosUser('get', '/api/pro/employee/index', {page:0,page_size:10,status:1}, 'v2'),
-        this.$axiosUser('get','/org/post'),
-        this.$axiosUser('get', `/org/departments/${this.userInfo.site_id}`)
-      ])
-        .then(([employeeRes,postRes,deptRes]) => {
-          if (employeeRes.data.code !== 1) throw new Error(employeeRes.data.msg);
-          if (postRes.data.code !== 1) throw new Error(postRes.data.message);
-          if (deptRes.data.code !== 1) throw new Error(deptRes.data.message);
-
-          this.employees = employeeRes.data.data.list
-            .filter(e => e.account_id && e.account_id > 0)
-            .map(e => {
-              return {
-                id:e.id,
-                name:e.name,
-              }
-            });
-
-          this.postList = postRes.data.data.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.deptList = deptRes.data.data.list.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.currentNode = this.defaultNode();
-
-          switch (this.currentNode.assigneeType){
-            case 'user':
-              this.userSelected = this.currentNode.assigneeIds;
-              break;
-            case 'post':
-              this.postSelected = this.currentNode.assigneeIds;
-              break;
-            case 'deptLeader':
-              this.deptSelected = this.currentNode.assigneeIds;
-              break;
-          }
-        })
-        .catch(err => {
-          this.$message.error(this.matchErrMsg(err));
-          result = false;
-        })
-        .finally(() => {
-          this.loading = false;
-          if (!result) this.handleClose();
-        })
-    },
-    generalId(){
-      return Date.now() + Math.floor(Math.random() * 10000);
-    },
-    onAssigneeTypeChange(v){
-      this.currentNode.assigneeIds = [];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onOrgManagerChange(v){
-      this.currentNode.assigneeIds = [];
-      this.currentNode.leaderLevel = v;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onUserChange(v){
-      this.currentNode.assigneeIds = [...v];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = v;
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onPostChange(v){
-      this.currentNode.assigneeIds = [...v];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = v;
-      this.deptSelected = [];
-    },
-    onDeptChange(v){
-      this.currentNode.assigneeIds = [...v];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = v;
-    },
-    onConfirm(){
-      this.$emit('confirm',this.currentNode);
-      this.handleClose();
-    },
-  }
-}
-</script>
-
-<style scoped lang="scss">
-.handler-list {
-  width: 500px;
-  margin: 0 auto 16px auto;
-  border-radius: 6px;
-  border: 1px solid #d7dae2;
-  padding: 10px 0 0 10px;
-  box-sizing: border-box;
-  display: flex;
-  flex-wrap: wrap;
-
-  .el-tag {
-    margin: 0 10px 10px 0;
-    cursor: pointer;
-  }
-}
-
-</style>

+ 0 - 104
src/newPerformance/components/PerEmployeeSelector.vue

@@ -1,104 +0,0 @@
-<template>
-  <el-dialog
-    :visible="innerVisible"
-    @close="handleClose"
-    @open="initData"
-    append-to-body
-    width="650px"
-    center
-    title="选择用户"
-  >
-    <el-transfer
-      v-model="selectedValues"
-      :data="employees"
-      :titles="['未选用户', '已选用户']"
-      style="margin-bottom: 20px;"
-      @change="onChange"
-    ></el-transfer>
-    <el-row type="flex" justify="end">
-      <el-col :span="4">
-        <el-button type="primary" @click="onConfirm">确定</el-button>
-      </el-col>
-    </el-row>
-  </el-dialog>
-</template>
-
-<script>
-export default {
-  name: 'PerEmployeeSelector',
-  props:{
-    showVisible: {
-      type: Boolean,
-      default: false
-    },
-    selectedEmployees:{
-      type: Array,
-      default: () => []
-    },
-    employeeStatus:{
-      type: Number,
-      default: null
-    },
-    multiple:{
-      type: Boolean,
-      default: true
-    }
-  },
-  data() {
-    return {
-      userInfo: this.$userInfo(),
-      innerVisible: this.showVisible,
-      employeeList: this.$getEmployeeMap(this.employeeStatus),
-      selectedValues:this.selectedTemplate,
-    }
-  },
-  watch: {
-    showVisible(val) {
-      this.innerVisible = val;
-    },
-  },
-  computed:{
-    employees(){
-      return this.employeeList.map(e => {
-        return {
-          key:Number.parseInt(e.id),
-          label:e.name
-        }
-      })
-    },
-    employeeMap(){
-      const map = {};
-      this.employeeList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e;
-      });
-      return map;
-    }
-  },
-  methods: {
-    handleClose(){
-      this.$emit('update:showVisible',false)
-    },
-    initData(){
-      this.selectedValues = this.selectedEmployees.filter(id => Number.isFinite(id)).map(id => Number.parseInt(id));
-    },
-    onConfirm(){
-      let res = this.selectedValues.filter(id => !!this.employeeMap[id]).map(id => {
-        return {
-          employeeId:Number.parseInt(this.employeeMap[id].id),
-          name:this.employeeMap[id].name,
-          imgUrl:this.employeeMap[id].img_url,
-        }
-      });
-      this.$emit('confirm',res);
-      this.handleClose();
-    },
-    onChange(values){
-      if(!this.multiple && values && values.length > 0) this.selectedValues = [values[values.length - 1]];
-    }
-  }
-}
-</script>
-
-<style scoped lang="scss">
-
-</style>

+ 0 - 367
src/newPerformance/components/PerResultInputSelector.vue

@@ -1,367 +0,0 @@
-<template>
-  <el-dialog
-    :visible.sync="innerVisible"
-    @close="handleClose"
-    @open="initData"
-    @closed="dataReset"
-    append-to-body
-    :close-on-click-modal="false"
-    center
-    title="结果录入节点配置"
-    width="600px"
-  >
-    <el-form v-if="currentNode" label-width="200">
-      <el-form-item label="启用">
-        <el-switch
-          v-model="currentNode.enable"
-        />
-      </el-form-item>
-
-      <el-form-item label="录入人">
-        <el-radio-group
-          v-model="currentNode.assigneeType"
-          :disabled="!currentNode.enable"
-          @change="onAssigneeTypeChange"
-        >
-          <el-radio-button label="leader">组织管理员</el-radio-button>
-          <el-radio-button label="user">指定人员</el-radio-button>
-          <el-radio-button label="self">被考核人</el-radio-button>
-          <el-radio-button label="post">岗位</el-radio-button>
-          <el-radio-button label="deptLeader">部门负责人</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-
-      <el-form-item label="">
-        <template v-if="currentNode.assigneeType === 'leader'">
-          <el-select
-            v-model="currentNode.leaderLevel"
-            placeholder="请选择管理员"
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="leader"
-            @change="onOrgManagerChange"
-          >
-            <el-option
-              v-for="item in levelOptions"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.assigneeType === 'user'">
-          <el-select
-            v-model="userSelected"
-            placeholder="请选择指定人员"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="user"
-            @change="onUserChange"
-          >
-            <el-option
-              v-for="item in employees"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.assigneeType === 'post'">
-          <el-select
-            v-model="postSelected"
-            placeholder="请选择岗位"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="post"
-            @change="onPostChange"
-          >
-            <el-option
-              v-for="item in postList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.assigneeType === 'deptLeader'">
-          <el-select
-            v-model="deptSelected"
-            placeholder="请选择部门"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="deptLeader"
-            @change="onDeptChange"
-          >
-            <el-option
-              v-for="item in deptList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-      </el-form-item>
-
-      <el-form-item label="多人时">
-        <el-radio-group
-          v-model="currentNode.multipleType"
-          :disabled="!currentNode.enable"
-        >
-          <el-radio-button label="or">任一人确认(或签)</el-radio-button>
-          <el-radio-button label="parallel">按顺序确认(会签)</el-radio-button>
-          <el-radio-button label="sequence">同时确认(会签)</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-
-      <el-form-item label="允许">
-        <el-checkbox-group
-          v-model="currentNode.allows"
-          :disabled="!currentNode.enable"
-        >
-          <el-checkbox-button label="transfer">转交</el-checkbox-button>
-        </el-checkbox-group>
-      </el-form-item>
-    </el-form>
-  </el-dialog>
-</template>
-
-
-<script>
-import Template from "../../examine/components/Template.vue";
-
-export default {
-  name: "PerResultInputSelector",
-  components: {Template},
-  props: {
-    showVisible: {
-      type: Boolean,
-      default: false
-    },
-    indicator:{
-      type: Object,
-      default: () =>{
-        return null
-      }
-    }
-  },
-  data(){
-    return {
-      userInfo: this.$userInfo(),
-      currentNode: null,
-      innerVisible: this.showVisible,
-      loading:false,
-      employees:[],
-      postList:[],
-      deptList:[],
-      userSelected:[],
-      postSelected:[],
-      deptSelected:[],
-      assigneeMap:{
-        leader:'组织管理员',
-        user:'指定人员',
-        self:'被考核人',
-        post:'岗位',
-        deptLeader:'部门负责人',
-      },
-      levelOptions: [
-        {
-          value: 1,
-          label: '直接管理员'
-        },
-        {
-          value: 2,
-          label: '二级管理员'
-        },
-        {
-          value: 3,
-          label: '三级管理员'
-        },
-        {
-          value: 4,
-          label: '四级管理员'
-        },
-        {
-          value: 5,
-          label: '五级管理员'
-        },
-        {
-          value: 6,
-          label: '六级管理员'
-        }
-      ]
-    }
-  },
-  computed:{
-    employeeMap(){
-      const map = {};
-      this.employees.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    postMap(){
-      const map = {};
-      this.postList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    deptMap(){
-      const map = {};
-      this.deptList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-  },
-  watch:{
-    showVisible(val){
-      this.innerVisible = val;
-    },
-  },
-  methods: {
-    matchErrMsg(err){
-      return err.toString().replace(/[(Error: )]/g,'');
-    },
-    handleClose(){
-      this.$emit('update:showVisible',false);
-    },
-    dataReset(){
-      this.currentNode = null;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    initData(){
-      if (this.loading || !this.indicator) return;
-      this.dataReset();
-      this.loading = true;
-
-      let result = true;
-      Promise.all([
-        this.$axiosUser('get', '/api/pro/employee/index', {page:0,page_size:10,status:1}, 'v2'),
-        this.$axiosUser('get','/org/post'),
-        this.$axiosUser('get', `/org/departments/${this.userInfo.site_id}`)
-      ])
-        .then(([employeeRes,postRes,deptRes]) => {
-          if (employeeRes.data.code !== 1) throw new Error(employeeRes.data.msg);
-          if (postRes.data.code !== 1) throw new Error(postRes.data.message);
-          if (deptRes.data.code !== 1) throw new Error(deptRes.data.message);
-
-          this.employees = employeeRes.data.data.list
-            .filter(e => e.account_id && e.account_id > 0)
-            .map(e => {
-              return {
-                id:e.id,
-                name:e.name,
-              }
-            });
-
-          this.postList = postRes.data.data.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.deptList = deptRes.data.data.list.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.currentNode = this.indicator.flow.nodes.find(node => node.type === 'resultInput');
-
-          switch (this.currentNode.assigneeType){
-            case 'user':
-              this.userSelected = this.currentNode.assigneeIds;
-              break;
-            case 'post':
-              this.postSelected = this.currentNode.assigneeIds;
-              break;
-            case 'deptLeader':
-              this.deptSelected = this.currentNode.assigneeIds;
-              break;
-          }
-        })
-        .catch(err => {
-          this.$message.error(this.matchErrMsg(err));
-          result = false;
-        })
-        .finally(() => {
-          this.loading = false;
-          if (!result) this.handleClose();
-        })
-    },
-    generalId(){
-      return Date.now() + Math.floor(Math.random() * 10000);
-    },
-    onAssigneeTypeChange(v){
-      this.currentNode.assigneeIds = [];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onOrgManagerChange(v){
-      this.currentNode.assigneeIds = [];
-      this.currentNode.leaderLevel = v;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onUserChange(v){
-      this.currentNode.assigneeIds = [...v];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = v;
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onPostChange(v){
-      this.currentNode.assigneeIds = [...v];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = v;
-      this.deptSelected = [];
-    },
-    onDeptChange(v){
-      this.currentNode.assigneeIds = [...v];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = v;
-    },
-  }
-}
-</script>
-
-<style scoped lang="scss">
-.handler-list {
-  width: 500px;
-  margin: 0 auto 16px auto;
-  border-radius: 6px;
-  border: 1px solid #d7dae2;
-  padding: 10px 0 0 10px;
-  box-sizing: border-box;
-  display: flex;
-  flex-wrap: wrap;
-
-  .el-tag {
-    margin: 0 10px 10px 0;
-    cursor: pointer;
-  }
-}
-
-</style>

+ 0 - 382
src/newPerformance/components/PerResultInputSelectorOnly.vue

@@ -1,382 +0,0 @@
-<template>
-  <el-dialog
-    :visible.sync="innerVisible"
-    @close="handleClose"
-    @open="initData"
-    @closed="dataReset"
-    append-to-body
-    :close-on-click-modal="false"
-    center
-    title="结果录入节点配置"
-    width="600px"
-  >
-    <el-form v-if="currentNode" label-width="200">
-      <el-form-item label="启用">
-        <el-switch
-          v-model="currentNode.enable"
-        />
-      </el-form-item>
-
-      <el-form-item label="录入人">
-        <el-radio-group
-          v-model="currentNode.assigneeType"
-          :disabled="!currentNode.enable"
-          @change="onAssigneeTypeChange"
-        >
-          <el-radio-button label="leader">组织管理员</el-radio-button>
-          <el-radio-button label="user">指定人员</el-radio-button>
-          <el-radio-button label="self">被考核人</el-radio-button>
-          <el-radio-button label="post">岗位</el-radio-button>
-          <el-radio-button label="deptLeader">部门负责人</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-
-      <el-form-item label="">
-        <template v-if="currentNode.assigneeType === 'leader'">
-          <el-select
-            v-model="currentNode.leaderLevel"
-            placeholder="请选择管理员"
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="leader"
-            @change="onOrgManagerChange"
-          >
-            <el-option
-              v-for="item in levelOptions"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.assigneeType === 'user'">
-          <el-select
-            v-model="userSelected"
-            placeholder="请选择指定人员"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="user"
-            @change="onUserChange"
-          >
-            <el-option
-              v-for="item in employees"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.assigneeType === 'post'">
-          <el-select
-            v-model="postSelected"
-            placeholder="请选择岗位"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="post"
-            @change="onPostChange"
-          >
-            <el-option
-              v-for="item in postList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.assigneeType === 'deptLeader'">
-          <el-select
-            v-model="deptSelected"
-            placeholder="请选择部门"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="deptLeader"
-            @change="onDeptChange"
-          >
-            <el-option
-              v-for="item in deptList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-      </el-form-item>
-
-      <el-form-item label="多人时">
-        <el-radio-group
-          v-model="currentNode.multipleType"
-          :disabled="!currentNode.enable"
-        >
-          <el-radio-button label="or">任一人确认(或签)</el-radio-button>
-          <el-radio-button label="parallel">按顺序确认(会签)</el-radio-button>
-          <el-radio-button label="sequence">同时确认(会签)</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-
-      <el-form-item label="允许">
-        <el-checkbox-group
-          v-model="currentNode.allows"
-          :disabled="!currentNode.enable"
-        >
-          <el-checkbox-button label="transfer">转交</el-checkbox-button>
-        </el-checkbox-group>
-      </el-form-item>
-    </el-form>
-    <template #footer>
-      <el-row type="flex" justify="end">
-        <el-col align="end">
-          <el-button
-            type="primary"
-            @click="onConfirm"
-          >
-            确认
-          </el-button>
-        </el-col>
-      </el-row>
-    </template>
-  </el-dialog>
-</template>
-
-
-<script>
-import Template from "../../examine/components/Template.vue";
-
-export default {
-  name: "PerResultInputSelectorOnly",
-  components: {Template},
-  props: {
-    showVisible: {
-      type: Boolean,
-      default: false
-    },
-  },
-  data(){
-    return {
-      userInfo: this.$userInfo(),
-      currentNode: null,
-      innerVisible: this.showVisible,
-      loading:false,
-      employees:[],
-      postList:[],
-      deptList:[],
-      userSelected:[],
-      postSelected:[],
-      deptSelected:[],
-      assigneeMap:{
-        leader:'组织管理员',
-        user:'指定人员',
-        self:'被考核人',
-        post:'岗位',
-        deptLeader:'部门负责人',
-      },
-      levelOptions: [
-        {
-          value: 1,
-          label: '直接管理员'
-        },
-        {
-          value: 2,
-          label: '二级管理员'
-        },
-        {
-          value: 3,
-          label: '三级管理员'
-        },
-        {
-          value: 4,
-          label: '四级管理员'
-        },
-        {
-          value: 5,
-          label: '五级管理员'
-        },
-        {
-          value: 6,
-          label: '六级管理员'
-        }
-      ]
-    }
-  },
-  computed:{
-    employeeMap(){
-      const map = {};
-      this.employees.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    postMap(){
-      const map = {};
-      this.postList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    deptMap(){
-      const map = {};
-      this.deptList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-  },
-  watch:{
-    showVisible(val){
-      this.innerVisible = val;
-    },
-  },
-  methods: {
-    idGeneral(){
-      return Date.now() + Math.floor(Math.random() * 10000);
-    },
-    defaultNode(){
-      const node = JSON.parse("{\"id\":\"RI_1907236768800382977\",\"type\":\"resultInput\",\"enable\":true,\"assigneeType\":\"self\",\"leaderLevel\":1,\"assigneeIds\":[],\"multipleType\":\"or\",\"allows\":[\"transfer\"],\"weight\":0,\"children\":[]}");
-      node.id = "RI_" + this.idGeneral();
-      return node;
-    },
-    matchErrMsg(err){
-      return err.toString().replace(/[(Error: )]/g,'');
-    },
-    handleClose(){
-      this.$emit('update:showVisible',false);
-    },
-    dataReset(){
-      this.currentNode = null;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    initData(){
-      if (this.loading) return;
-      this.dataReset();
-      this.loading = true;
-
-      let result = true;
-      Promise.all([
-        this.$axiosUser('get', '/api/pro/employee/index', {page:0,page_size:10,status:1}, 'v2'),
-        this.$axiosUser('get','/org/post'),
-        this.$axiosUser('get', `/org/departments/${this.userInfo.site_id}`)
-      ])
-        .then(([employeeRes,postRes,deptRes]) => {
-          if (employeeRes.data.code !== 1) throw new Error(employeeRes.data.msg);
-          if (postRes.data.code !== 1) throw new Error(postRes.data.message);
-          if (deptRes.data.code !== 1) throw new Error(deptRes.data.message);
-
-          this.employees = employeeRes.data.data.list
-            .filter(e => e.account_id && e.account_id > 0)
-            .map(e => {
-              return {
-                id:e.id,
-                name:e.name,
-              }
-            });
-
-          this.postList = postRes.data.data.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.deptList = deptRes.data.data.list.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.currentNode = this.defaultNode();
-
-          switch (this.currentNode.assigneeType){
-            case 'user':
-              this.userSelected = this.currentNode.assigneeIds;
-              break;
-            case 'post':
-              this.postSelected = this.currentNode.assigneeIds;
-              break;
-            case 'deptLeader':
-              this.deptSelected = this.currentNode.assigneeIds;
-              break;
-          }
-        })
-        .catch(err => {
-          this.$message.error(this.matchErrMsg(err));
-          result = false;
-        })
-        .finally(() => {
-          this.loading = false;
-          if (!result) this.handleClose();
-        })
-    },
-    onAssigneeTypeChange(v){
-      this.currentNode.assigneeIds = [];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onOrgManagerChange(v){
-      this.currentNode.assigneeIds = [];
-      this.currentNode.leaderLevel = v;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onUserChange(v){
-      this.currentNode.assigneeIds = [...v];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = v;
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onPostChange(v){
-      this.currentNode.assigneeIds = [...v];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = v;
-      this.deptSelected = [];
-    },
-    onDeptChange(v){
-      this.currentNode.assigneeIds = [...v];
-      this.currentNode.leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = v;
-    },
-    onConfirm(){
-      this.$emit('confirm',this.currentNode);
-      this.handleClose();
-    },
-  }
-}
-</script>
-
-<style scoped lang="scss">
-.handler-list {
-  width: 500px;
-  margin: 0 auto 16px auto;
-  border-radius: 6px;
-  border: 1px solid #d7dae2;
-  padding: 10px 0 0 10px;
-  box-sizing: border-box;
-  display: flex;
-  flex-wrap: wrap;
-
-  .el-tag {
-    margin: 0 10px 10px 0;
-    cursor: pointer;
-  }
-}
-
-</style>

+ 0 - 424
src/newPerformance/components/PerReviewsSelector.vue

@@ -1,424 +0,0 @@
-<template>
-  <el-dialog
-    :visible.sync="innerVisible"
-    @close="handleClose"
-    @open="initData"
-    @closed="dataReset"
-    append-to-body
-    :close-on-click-modal="false"
-    center
-    title="审批节点配置"
-    width="600px"
-  >
-    <el-form v-if="currentNode" label-width="200">
-      <el-form-item label="启用">
-        <el-switch
-          v-model="currentNode.enable"
-          disabled
-        />
-      </el-form-item>
-      <el-form-item label="">
-        <div class="handler-list">
-          <el-tag
-            v-for="(item,index) in currentNode.children"
-            :key="`hl_${index}`"
-            :type="childIndex === index ? '' : 'info'"
-            closable
-            @close="removeChild(index)"
-            @click="childSelect(index)"
-          >
-            {{assigneeMap[item.assigneeType] || '未知'}}
-          </el-tag>
-          <el-button
-            v-show="currentNode.enable"
-            icon="el-icon-plus"
-            size="mini"
-            style="margin-bottom: 10px;"
-            @click="addChild"
-          />
-        </div>
-      </el-form-item>
-      <el-form-item label="审批人">
-        <el-radio-group
-          v-model="currentNode.children[childIndex].assigneeType"
-          :disabled="!currentNode.enable"
-          @change="onAssigneeTypeChange"
-        >
-          <el-radio-button label="leader">组织管理员</el-radio-button>
-          <el-radio-button label="user">指定人员</el-radio-button>
-          <el-radio-button label="self">被考核人</el-radio-button>
-          <el-radio-button label="post">岗位</el-radio-button>
-          <el-radio-button label="deptLeader">部门负责人</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="">
-        <template v-if="currentNode.children[childIndex].assigneeType === 'leader'">
-          <el-select
-            v-model="currentNode.children[childIndex].leaderLevel"
-            placeholder="请选择管理员"
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="leader"
-            @change="onOrgManagerChange"
-          >
-            <el-option
-              v-for="item in levelOptions"
-              :key="`leader_${item.value}`"
-              :label="item.label"
-              :value="item.value"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'user'">
-          <el-select
-            v-model="userSelected"
-            placeholder="请选择指定人员"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="user"
-            @change="onUserChange"
-          >
-            <el-option
-              v-for="item in employees"
-              :key="`user_${item.id}`"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'post'">
-          <el-select
-            v-model="postSelected"
-            placeholder="请选择岗位"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="post"
-            @change="onPostChange"
-          >
-            <el-option
-              v-for="item in postList"
-              :key="`post_${item.id}`"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'deptLeader'">
-          <el-select
-            v-model="deptSelected"
-            placeholder="请选择部门"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="deptLeader"
-            @change="onDeptChange"
-          >
-            <el-option
-              v-for="item in deptList"
-              :key="`deptLeader_${item.id}`"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-      </el-form-item>
-      <el-form-item label="多人时">
-        <el-radio-group
-          v-model="currentNode.children[childIndex].multipleType"
-          :disabled="!currentNode.enable"
-        >
-          <el-radio-button label="or">任一人确认(或签)</el-radio-button>
-          <el-radio-button label="parallel">按顺序确认(会签)</el-radio-button>
-          <el-radio-button label="sequence">同时确认(会签)</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="允许">
-        <el-checkbox-group
-          v-model="currentNode.children[childIndex].allows"
-          :disabled="!currentNode.enable"
-        >
-          <el-checkbox-button label="transfer">转交</el-checkbox-button>
-        </el-checkbox-group>
-      </el-form-item>
-    </el-form>
-  </el-dialog>
-</template>
-
-
-<script>
-import Template from "../../examine/components/Template.vue";
-
-export default {
-  name: "PerReviewsSelector",
-  components: {Template},
-  props: {
-    showVisible: {
-      type: Boolean,
-      default: false
-    },
-    indicator:{
-      type: Object,
-      default: () =>{
-        return null
-      }
-    }
-  },
-  data(){
-    return {
-      userInfo: this.$userInfo(),
-      currentNode: null,
-      childIndex: null,
-      innerVisible: this.showVisible,
-      loading:false,
-      employees:[],
-      postList:[],
-      deptList:[],
-      userSelected:[],
-      postSelected:[],
-      deptSelected:[],
-      assigneeMap:{
-        leader:'组织管理员',
-        user:'指定人员',
-        self:'被考核人',
-        post:'岗位',
-        deptLeader:'部门负责人',
-      },
-      levelOptions: [
-        {
-          value: 1,
-          label: '直接管理员'
-        },
-        {
-          value: 2,
-          label: '二级管理员'
-        },
-        {
-          value: 3,
-          label: '三级管理员'
-        },
-        {
-          value: 4,
-          label: '四级管理员'
-        },
-        {
-          value: 5,
-          label: '五级管理员'
-        },
-        {
-          value: 6,
-          label: '六级管理员'
-        }
-      ]
-    }
-  },
-  computed:{
-    employeeMap(){
-      const map = {};
-      this.employees.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    postMap(){
-      const map = {};
-      this.postList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    deptMap(){
-      const map = {};
-      this.deptList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-  },
-  watch:{
-    showVisible(val){
-      this.innerVisible = val;
-    },
-  },
-  methods: {
-    matchErrMsg(err){
-      return err.toString().replace(/[(Error: )]/g,'');
-    },
-    handleClose(){
-      this.$emit('update:showVisible',false);
-    },
-    dataReset(){
-      this.currentNode = null;
-      this.childIndex = null;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    initData(){
-      if (this.loading || !this.indicator) return;
-      this.dataReset();
-      this.loading = true;
-
-      let result = true;
-      Promise.all([
-        this.$axiosUser('get', '/api/pro/employee/index', {page:0,page_size:10,status:1}, 'v2'),
-        this.$axiosUser('get','/org/post'),
-        this.$axiosUser('get', `/org/departments/${this.userInfo.site_id}`)
-      ])
-        .then(([employeeRes,postRes,deptRes]) => {
-          if (employeeRes.data.code !== 1) throw new Error(employeeRes.data.msg);
-          if (postRes.data.code !== 1) throw new Error(postRes.data.message);
-          if (deptRes.data.code !== 1) throw new Error(deptRes.data.message);
-
-          this.employees = employeeRes.data.data.list
-            .filter(e => e.account_id && e.account_id > 0)
-            .map(e => {
-              return {
-                id:e.id,
-                name:e.name,
-              }
-            });
-
-          this.postList = postRes.data.data.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.deptList = deptRes.data.data.list.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.currentNode = this.indicator.flow.nodes.find(node => node.type === 'reviews');
-
-          this.childIndex = this.currentNode.children && this.currentNode.children.length > 0 ? 0 : null;
-
-          if (this.childIndex !== null && !!this.currentNode.children[this.childIndex]){
-            switch (this.currentNode.children[this.childIndex].assigneeType){
-              case 'user':
-                this.userSelected = [...this.currentNode.children[this.childIndex].assigneeIds];
-                break;
-              case 'post':
-                this.postSelected = [...this.currentNode.children[this.childIndex].assigneeIds];
-                break;
-              case 'deptLeader':
-                this.deptSelected = [...this.currentNode.children[this.childIndex].assigneeIds];
-                break;
-            }
-          }
-        })
-        .catch(err => {
-          this.$message.error(this.matchErrMsg(err));
-          result = false;
-        })
-        .finally(() => {
-          this.loading = false;
-          if (!result) this.handleClose();
-        })
-    },
-    generalId(){
-      return Date.now() + Math.floor(Math.random() * 10000);
-    },
-    addChild(){
-      let id = "R_" + this.generalId();
-      this.currentNode.children.push({
-        id:id,
-        type:'review',
-        enable:true,
-        assigneeType:'leader',
-        leaderLevel:1,
-        assigneeIds:[],
-        multipleType:'or',
-        allows:['transfer'],
-        weight:0,
-        children:[],
-      });
-    },
-    removeChild(index){
-      if (this.currentNode.children.length <= 1 || !this.currentNode.children[index]) return;
-      let selectChildId = this.currentNode.children[index].id;
-      this.childIndex = 0;
-      this.currentNode.children = this.currentNode.children.filter((_,i) => i !== index);
-      if (selectChildId){
-        this.currentNode.children.forEach((child,i) => {
-          if (child.id === selectChildId) this.childIndex = i;
-        })
-      }
-    },
-    onAssigneeTypeChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onOrgManagerChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [];
-      this.currentNode.children[this.childIndex].leaderLevel = v;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onUserChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = v;
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onPostChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = v;
-      this.deptSelected = [];
-    },
-    onDeptChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = v;
-    },
-    childSelect(index){
-      if (!this.currentNode.children[index]) return;
-      this.childIndex = index;
-      this.userSelected = this.currentNode.children[this.childIndex].assigneeType === 'user' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-      this.postSelected = this.currentNode.children[this.childIndex].assigneeType === 'post' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-      this.deptSelected = this.currentNode.children[this.childIndex].assigneeType === 'deptLeader' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-    }
-  }
-}
-</script>
-
-<style scoped lang="scss">
-.handler-list {
-  width: 500px;
-  margin: 0 auto 16px auto;
-  border-radius: 6px;
-  border: 1px solid #d7dae2;
-  padding: 10px 0 0 10px;
-  box-sizing: border-box;
-  display: flex;
-  flex-wrap: wrap;
-
-  .el-tag {
-    margin: 0 10px 10px 0;
-    cursor: pointer;
-  }
-}
-
-</style>

+ 0 - 442
src/newPerformance/components/PerReviewsSelectorOnly.vue

@@ -1,442 +0,0 @@
-<template>
-  <el-dialog
-    :visible.sync="innerVisible"
-    @close="handleClose"
-    @open="initData"
-    @closed="dataReset"
-    append-to-body
-    :close-on-click-modal="false"
-    center
-    title="审批节点配置"
-    width="600px"
-  >
-    <el-form v-if="currentNode" label-width="200">
-      <el-form-item label="启用">
-        <el-switch
-          v-model="currentNode.enable"
-          disabled
-        />
-      </el-form-item>
-      <el-form-item label="">
-        <div class="handler-list">
-          <el-tag
-            v-for="(item,index) in currentNode.children"
-            :key="`hl_${index}`"
-            :type="childIndex === index ? '' : 'info'"
-            closable
-            @close="removeChild(index)"
-            @click="childSelect(index)"
-          >
-            {{assigneeMap[item.assigneeType] || '未知'}}
-          </el-tag>
-          <el-button
-            v-show="currentNode.enable"
-            icon="el-icon-plus"
-            size="mini"
-            style="margin-bottom: 10px;"
-            @click="addChild"
-          />
-        </div>
-      </el-form-item>
-      <el-form-item label="审批人">
-        <el-radio-group
-          v-model="currentNode.children[childIndex].assigneeType"
-          :disabled="!currentNode.enable"
-          @change="onAssigneeTypeChange"
-        >
-          <el-radio-button label="leader">组织管理员</el-radio-button>
-          <el-radio-button label="user">指定人员</el-radio-button>
-          <el-radio-button label="self">被考核人</el-radio-button>
-          <el-radio-button label="post">岗位</el-radio-button>
-          <el-radio-button label="deptLeader">部门负责人</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="">
-        <template v-if="currentNode.children[childIndex].assigneeType === 'leader'">
-          <el-select
-            v-model="currentNode.children[childIndex].leaderLevel"
-            placeholder="请选择管理员"
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="leader"
-            @change="onOrgManagerChange"
-          >
-            <el-option
-              v-for="item in levelOptions"
-              :key="`leader_${item.value}`"
-              :label="item.label"
-              :value="item.value"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'user'">
-          <el-select
-            v-model="userSelected"
-            placeholder="请选择指定人员"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="user"
-            @change="onUserChange"
-          >
-            <el-option
-              v-for="item in employees"
-              :key="`user_${item.id}`"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'post'">
-          <el-select
-            v-model="postSelected"
-            placeholder="请选择岗位"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="post"
-            @change="onPostChange"
-          >
-            <el-option
-              v-for="item in postList"
-              :key="`post_${item.id}`"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'deptLeader'">
-          <el-select
-            v-model="deptSelected"
-            placeholder="请选择部门"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="deptLeader"
-            @change="onDeptChange"
-          >
-            <el-option
-              v-for="item in deptList"
-              :key="`deptLeader_${item.id}`"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-      </el-form-item>
-      <el-form-item label="多人时">
-        <el-radio-group
-          v-model="currentNode.children[childIndex].multipleType"
-          :disabled="!currentNode.enable"
-        >
-          <el-radio-button label="or">任一人确认(或签)</el-radio-button>
-          <el-radio-button label="parallel">按顺序确认(会签)</el-radio-button>
-          <el-radio-button label="sequence">同时确认(会签)</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="允许">
-        <el-checkbox-group
-          v-model="currentNode.children[childIndex].allows"
-          :disabled="!currentNode.enable"
-        >
-          <el-checkbox-button label="transfer">转交</el-checkbox-button>
-        </el-checkbox-group>
-      </el-form-item>
-    </el-form>
-    <template #footer>
-      <el-row type="flex" justify="end">
-        <el-col align="end">
-          <el-button
-            type="primary"
-            @click="onConfirm"
-          >
-            确认
-          </el-button>
-        </el-col>
-      </el-row>
-    </template>
-  </el-dialog>
-</template>
-
-
-<script>
-import Template from "../../examine/components/Template.vue";
-
-export default {
-  name: "PerReviewsSelectorOnly",
-  components: {Template},
-  props: {
-    showVisible: {
-      type: Boolean,
-      default: false
-    },
-  },
-  data(){
-    return {
-      userInfo: this.$userInfo(),
-      currentNode: null,
-      childIndex: null,
-      innerVisible: this.showVisible,
-      loading:false,
-      employees:[],
-      postList:[],
-      deptList:[],
-      userSelected:[],
-      postSelected:[],
-      deptSelected:[],
-      assigneeMap:{
-        leader:'组织管理员',
-        user:'指定人员',
-        self:'被考核人',
-        post:'岗位',
-        deptLeader:'部门负责人',
-      },
-      levelOptions: [
-        {
-          value: 1,
-          label: '直接管理员'
-        },
-        {
-          value: 2,
-          label: '二级管理员'
-        },
-        {
-          value: 3,
-          label: '三级管理员'
-        },
-        {
-          value: 4,
-          label: '四级管理员'
-        },
-        {
-          value: 5,
-          label: '五级管理员'
-        },
-        {
-          value: 6,
-          label: '六级管理员'
-        }
-      ]
-    }
-  },
-  computed:{
-    employeeMap(){
-      const map = {};
-      this.employees.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    postMap(){
-      const map = {};
-      this.postList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    deptMap(){
-      const map = {};
-      this.deptList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-  },
-  watch:{
-    showVisible(val){
-      this.innerVisible = val;
-    },
-  },
-  methods: {
-    defaultNode(){
-      const node = JSON.parse("{\"id\":\"RS_1907236768800382982\",\"type\":\"reviews\",\"enable\":true,\"assigneeType\":\"leader\",\"leaderLevel\":1,\"assigneeIds\":[],\"multipleType\":\"or\",\"allows\":[\"transfer\"],\"weight\":0,\"children\":[{\"id\":\"R_1907236768800382983\",\"type\":\"review\",\"enable\":true,\"assigneeType\":\"leader\",\"leaderLevel\":1,\"assigneeIds\":[],\"multipleType\":\"or\",\"allows\":[\"transfer\"],\"weight\":0,\"children\":[]}]}");
-      node.id = "RS_" + this.generalId();
-      node.children.forEach((_,i) => {
-        node.children[i].id = "R_" + this.generalId();
-      });
-      return node;
-    },
-    matchErrMsg(err){
-      return err.toString().replace(/[(Error: )]/g,'');
-    },
-    handleClose(){
-      this.$emit('update:showVisible',false);
-    },
-    dataReset(){
-      this.currentNode = null;
-      this.childIndex = null;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    initData(){
-      if (this.loading) return;
-      this.dataReset();
-      this.loading = true;
-
-      let result = true;
-      Promise.all([
-        this.$axiosUser('get', '/api/pro/employee/index', {page:0,page_size:10,status:1}, 'v2'),
-        this.$axiosUser('get','/org/post'),
-        this.$axiosUser('get', `/org/departments/${this.userInfo.site_id}`)
-      ])
-        .then(([employeeRes,postRes,deptRes]) => {
-          if (employeeRes.data.code !== 1) throw new Error(employeeRes.data.msg);
-          if (postRes.data.code !== 1) throw new Error(postRes.data.message);
-          if (deptRes.data.code !== 1) throw new Error(deptRes.data.message);
-
-          this.employees = employeeRes.data.data.list
-            .filter(e => e.account_id && e.account_id > 0)
-            .map(e => {
-              return {
-                id:e.id,
-                name:e.name,
-              }
-            });
-
-          this.postList = postRes.data.data.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.deptList = deptRes.data.data.list.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.currentNode = this.defaultNode();
-
-          this.childIndex = this.currentNode.children && this.currentNode.children.length > 0 ? 0 : null;
-
-          if (this.childIndex !== null && !!this.currentNode.children[this.childIndex]){
-            switch (this.currentNode.children[this.childIndex].assigneeType){
-              case 'user':
-                this.userSelected = [...this.currentNode.children[this.childIndex].assigneeIds];
-                break;
-              case 'post':
-                this.postSelected = [...this.currentNode.children[this.childIndex].assigneeIds];
-                break;
-              case 'deptLeader':
-                this.deptSelected = [...this.currentNode.children[this.childIndex].assigneeIds];
-                break;
-            }
-          }
-        })
-        .catch(err => {
-          this.$message.error(this.matchErrMsg(err));
-          result = false;
-        })
-        .finally(() => {
-          this.loading = false;
-          if (!result) this.handleClose();
-        })
-    },
-    generalId(){
-      return Date.now() + Math.floor(Math.random() * 10000);
-    },
-    addChild(){
-      let id = "R_" + this.generalId();
-      this.currentNode.children.push({
-        id:id,
-        type:'review',
-        enable:true,
-        assigneeType:'leader',
-        leaderLevel:1,
-        assigneeIds:[],
-        multipleType:'or',
-        allows:['transfer'],
-        weight:0,
-        children:[],
-      });
-    },
-    removeChild(index){
-      if (this.currentNode.children.length <= 1 || !this.currentNode.children[index]) return;
-      let selectChildId = this.currentNode.children[index].id;
-      this.childIndex = 0;
-      this.currentNode.children = this.currentNode.children.filter((_,i) => i !== index);
-      if (selectChildId){
-        this.currentNode.children.forEach((child,i) => {
-          if (child.id === selectChildId) this.childIndex = i;
-        })
-      }
-    },
-    onAssigneeTypeChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onOrgManagerChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [];
-      this.currentNode.children[this.childIndex].leaderLevel = v;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onUserChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = v;
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onPostChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = v;
-      this.deptSelected = [];
-    },
-    onDeptChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = v;
-    },
-    childSelect(index){
-      if (!this.currentNode.children[index]) return;
-      this.childIndex = index;
-      this.userSelected = this.currentNode.children[this.childIndex].assigneeType === 'user' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-      this.postSelected = this.currentNode.children[this.childIndex].assigneeType === 'post' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-      this.deptSelected = this.currentNode.children[this.childIndex].assigneeType === 'deptLeader' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-    },
-    onConfirm(){
-      this.$emit('confirm',this.currentNode);
-      this.handleClose();
-    },
-  }
-}
-</script>
-
-<style scoped lang="scss">
-.handler-list {
-  width: 500px;
-  margin: 0 auto 16px auto;
-  border-radius: 6px;
-  border: 1px solid #d7dae2;
-  padding: 10px 0 0 10px;
-  box-sizing: border-box;
-  display: flex;
-  flex-wrap: wrap;
-
-  .el-tag {
-    margin: 0 10px 10px 0;
-    cursor: pointer;
-  }
-}
-
-</style>

+ 0 - 428
src/newPerformance/components/PerScoresSelector.vue

@@ -1,428 +0,0 @@
-<template>
-  <el-dialog
-    :visible.sync="innerVisible"
-    @close="handleClose"
-    @open="initData"
-    @closed="dataReset"
-    append-to-body
-    :close-on-click-modal="false"
-    center
-    title="评分节点配置"
-    width="600px"
-  >
-    <el-form v-if="currentNode" label-width="200">
-      <el-form-item label="启用">
-        <el-switch
-          v-model="currentNode.enable"
-          disabled
-        />
-      </el-form-item>
-
-      <el-form-item label="">
-        <div class="handler-list">
-          <el-tag
-            v-for="(item,index) in currentNode.children"
-            :key="`hl_${index}`"
-            :type="childIndex === index ? '' : 'info'"
-            closable
-            @close="removeChild(index)"
-            @click="childSelect(index)"
-          >
-            {{assigneeMap[item.assigneeType] || '未知'}}
-          </el-tag>
-          <el-button
-            v-show="currentNode.enable"
-            icon="el-icon-plus"
-            size="mini"
-            style="margin-bottom: 10px;"
-            @click="addChild"
-          />
-        </div>
-      </el-form-item>
-      <el-form-item label="评分人">
-        <el-radio-group
-          v-model="currentNode.children[childIndex].assigneeType"
-          :disabled="!currentNode.enable"
-          @change="onAssigneeTypeChange"
-        >
-          <el-radio-button label="leader">组织管理员</el-radio-button>
-          <el-radio-button label="user">指定人员</el-radio-button>
-          <el-radio-button label="self">被考核人</el-radio-button>
-          <el-radio-button label="post">岗位</el-radio-button>
-          <el-radio-button label="deptLeader">部门负责人</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-
-      <el-form-item label="">
-        <template v-if="currentNode.children[childIndex].assigneeType === 'leader'">
-          <el-select
-            v-model="currentNode.children[childIndex].leaderLevel"
-            placeholder="请选择管理员"
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="leader"
-            @change="onOrgManagerChange"
-          >
-            <el-option
-              v-for="item in levelOptions"
-              :key="`leader_${item.value}`"
-              :label="item.label"
-              :value="item.value"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'user'">
-          <el-select
-            v-model="userSelected"
-            placeholder="请选择指定人员"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="user"
-            @change="onUserChange"
-          >
-            <el-option
-              v-for="item in employees"
-              :key="`user_${item.id}`"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'post'">
-          <el-select
-            v-model="postSelected"
-            placeholder="请选择岗位"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="post"
-            @change="onPostChange"
-          >
-            <el-option
-              v-for="item in postList"
-              :key="`post_${item.id}`"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'deptLeader'">
-          <el-select
-            v-model="deptSelected"
-            placeholder="请选择部门"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="deptLeader"
-            @change="onDeptChange"
-          >
-            <el-option
-              v-for="item in deptList"
-              :key="`deptLeader_${item.id}`"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-      </el-form-item>
-
-      <el-form-item label="多人时">
-        <el-radio-group
-          v-model="currentNode.children[childIndex].multipleType"
-          :disabled="!currentNode.enable"
-        >
-          <el-radio-button label="or">任一人确认(或签)</el-radio-button>
-          <el-radio-button label="parallel">按顺序确认(会签)</el-radio-button>
-          <el-radio-button label="sequence">同时确认(会签)</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-
-      <el-form-item label="允许">
-        <el-checkbox-group
-          v-model="currentNode.children[childIndex].allows"
-          :disabled="!currentNode.enable"
-        >
-          <el-checkbox-button label="transfer">转交</el-checkbox-button>
-        </el-checkbox-group>
-      </el-form-item>
-    </el-form>
-  </el-dialog>
-</template>
-
-
-<script>
-import Template from "../../examine/components/Template.vue";
-
-export default {
-  name: "PerScoresSelector",
-  components: {Template},
-  props: {
-    showVisible: {
-      type: Boolean,
-      default: false
-    },
-    indicator:{
-      type: Object,
-      default: () =>{
-        return null
-      }
-    }
-  },
-  data(){
-    return {
-      userInfo: this.$userInfo(),
-      currentNode: null,
-      childIndex: null,
-      innerVisible: this.showVisible,
-      loading:false,
-      employees:[],
-      postList:[],
-      deptList:[],
-      userSelected:[],
-      postSelected:[],
-      deptSelected:[],
-      assigneeMap:{
-        leader:'组织管理员',
-        user:'指定人员',
-        self:'被考核人',
-        post:'岗位',
-        deptLeader:'部门负责人',
-      },
-      levelOptions: [
-        {
-          value: 1,
-          label: '直接管理员'
-        },
-        {
-          value: 2,
-          label: '二级管理员'
-        },
-        {
-          value: 3,
-          label: '三级管理员'
-        },
-        {
-          value: 4,
-          label: '四级管理员'
-        },
-        {
-          value: 5,
-          label: '五级管理员'
-        },
-        {
-          value: 6,
-          label: '六级管理员'
-        }
-      ]
-    }
-  },
-  computed:{
-    employeeMap(){
-      const map = {};
-      this.employees.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    postMap(){
-      const map = {};
-      this.postList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    deptMap(){
-      const map = {};
-      this.deptList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-  },
-  watch:{
-    showVisible(val){
-      this.innerVisible = val;
-    },
-  },
-  methods: {
-    matchErrMsg(err){
-      return err.toString().replace(/[(Error: )]/g,'');
-    },
-    handleClose(){
-      this.$emit('update:showVisible',false);
-    },
-    dataReset(){
-      this.currentNode = null;
-      this.childIndex = null;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    initData(){
-      if (this.loading || !this.indicator) return;
-      this.dataReset();
-      this.loading = true;
-
-      let result = true;
-      Promise.all([
-        this.$axiosUser('get', '/api/pro/employee/index', {page:0,page_size:10,status:1}, 'v2'),
-        this.$axiosUser('get','/org/post'),
-        this.$axiosUser('get', `/org/departments/${this.userInfo.site_id}`)
-      ])
-        .then(([employeeRes,postRes,deptRes]) => {
-          if (employeeRes.data.code !== 1) throw new Error(employeeRes.data.msg);
-          if (postRes.data.code !== 1) throw new Error(postRes.data.message);
-          if (deptRes.data.code !== 1) throw new Error(deptRes.data.message);
-
-          this.employees = employeeRes.data.data.list
-            .filter(e => e.account_id && e.account_id > 0)
-            .map(e => {
-              return {
-                id:e.id,
-                name:e.name,
-              }
-            });
-
-          this.postList = postRes.data.data.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.deptList = deptRes.data.data.list.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.currentNode = this.indicator.flow.nodes.find(node => node.type === 'scores');
-
-          this.childIndex = this.currentNode.children && this.currentNode.children.length > 0 ? 0 : null;
-
-          if (this.childIndex !== null && !!this.currentNode.children[this.childIndex]){
-            switch (this.currentNode.children[this.childIndex].assigneeType){
-              case 'user':
-                this.userSelected = [...this.currentNode.children[this.childIndex].assigneeIds];
-                break;
-              case 'post':
-                this.postSelected = [...this.currentNode.children[this.childIndex].assigneeIds];
-                break;
-              case 'deptLeader':
-                this.deptSelected = [...this.currentNode.children[this.childIndex].assigneeIds];
-                break;
-            }
-          }
-        })
-        .catch(err => {
-          this.$message.error(this.matchErrMsg(err));
-          result = false;
-        })
-        .finally(() => {
-          this.loading = false;
-          if (!result) this.handleClose();
-        })
-    },
-    generalId(){
-      return Date.now() + Math.floor(Math.random() * 10000);
-    },
-    addChild(){
-      let id = "S_" + this.generalId();
-      this.currentNode.children.push({
-        id:id,
-        type:'score',
-        enable:true,
-        assigneeType:'leader',
-        leaderLevel:1,
-        assigneeIds:[],
-        multipleType:'or',
-        allows:['transfer'],
-        weight:100,
-        children:[],
-      });
-    },
-    removeChild(index){
-      if (this.currentNode.children.length <= 1 || !this.currentNode.children[index]) return;
-      let selectChildId = this.currentNode.children[index].id;
-      this.childIndex = 0;
-      this.currentNode.children = this.currentNode.children.filter((_,i) => i !== index);
-      if (selectChildId){
-        this.currentNode.children.forEach((child,i) => {
-          if (child.id === selectChildId) this.childIndex = i;
-        })
-      }
-    },
-    onAssigneeTypeChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onOrgManagerChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [];
-      this.currentNode.children[this.childIndex].leaderLevel = v;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onUserChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = v;
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onPostChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = v;
-      this.deptSelected = [];
-    },
-    onDeptChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = v;
-    },
-    childSelect(index){
-      if (!this.currentNode.children[index]) return;
-      this.childIndex = index;
-      this.userSelected = this.currentNode.children[this.childIndex].assigneeType === 'user' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-      this.postSelected = this.currentNode.children[this.childIndex].assigneeType === 'post' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-      this.deptSelected = this.currentNode.children[this.childIndex].assigneeType === 'deptLeader' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-    }
-  }
-}
-</script>
-
-<style scoped lang="scss">
-.handler-list {
-  width: 500px;
-  margin: 0 auto 16px auto;
-  border-radius: 6px;
-  border: 1px solid #d7dae2;
-  padding: 10px 0 0 10px;
-  box-sizing: border-box;
-  display: flex;
-  flex-wrap: wrap;
-
-  .el-tag {
-    margin: 0 10px 10px 0;
-    cursor: pointer;
-  }
-}
-
-</style>

+ 0 - 446
src/newPerformance/components/PerScoresSelectorOnly.vue

@@ -1,446 +0,0 @@
-<template>
-  <el-dialog
-    :visible.sync="innerVisible"
-    @close="handleClose"
-    @open="initData"
-    @closed="dataReset"
-    append-to-body
-    :close-on-click-modal="false"
-    center
-    title="评分节点配置"
-    width="600px"
-  >
-    <el-form v-if="currentNode" label-width="200">
-      <el-form-item label="启用">
-        <el-switch
-          v-model="currentNode.enable"
-          disabled
-        />
-      </el-form-item>
-
-      <el-form-item label="">
-        <div class="handler-list">
-          <el-tag
-            v-for="(item,index) in currentNode.children"
-            :key="`hl_${index}`"
-            :type="childIndex === index ? '' : 'info'"
-            closable
-            @close="removeChild(index)"
-            @click="childSelect(index)"
-          >
-            {{assigneeMap[item.assigneeType] || '未知'}}
-          </el-tag>
-          <el-button
-            v-show="currentNode.enable"
-            icon="el-icon-plus"
-            size="mini"
-            style="margin-bottom: 10px;"
-            @click="addChild"
-          />
-        </div>
-      </el-form-item>
-      <el-form-item label="评分人">
-        <el-radio-group
-          v-model="currentNode.children[childIndex].assigneeType"
-          :disabled="!currentNode.enable"
-          @change="onAssigneeTypeChange"
-        >
-          <el-radio-button label="leader">组织管理员</el-radio-button>
-          <el-radio-button label="user">指定人员</el-radio-button>
-          <el-radio-button label="self">被考核人</el-radio-button>
-          <el-radio-button label="post">岗位</el-radio-button>
-          <el-radio-button label="deptLeader">部门负责人</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-
-      <el-form-item label="">
-        <template v-if="currentNode.children[childIndex].assigneeType === 'leader'">
-          <el-select
-            v-model="currentNode.children[childIndex].leaderLevel"
-            placeholder="请选择管理员"
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="leader"
-            @change="onOrgManagerChange"
-          >
-            <el-option
-              v-for="item in levelOptions"
-              :key="`leader_${item.value}`"
-              :label="item.label"
-              :value="item.value"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'user'">
-          <el-select
-            v-model="userSelected"
-            placeholder="请选择指定人员"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="user"
-            @change="onUserChange"
-          >
-            <el-option
-              v-for="item in employees"
-              :key="`user_${item.id}`"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'post'">
-          <el-select
-            v-model="postSelected"
-            placeholder="请选择岗位"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="post"
-            @change="onPostChange"
-          >
-            <el-option
-              v-for="item in postList"
-              :key="`post_${item.id}`"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'deptLeader'">
-          <el-select
-            v-model="deptSelected"
-            placeholder="请选择部门"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="deptLeader"
-            @change="onDeptChange"
-          >
-            <el-option
-              v-for="item in deptList"
-              :key="`deptLeader_${item.id}`"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-      </el-form-item>
-
-      <el-form-item label="多人时">
-        <el-radio-group
-          v-model="currentNode.children[childIndex].multipleType"
-          :disabled="!currentNode.enable"
-        >
-          <el-radio-button label="or">任一人确认(或签)</el-radio-button>
-          <el-radio-button label="parallel">按顺序确认(会签)</el-radio-button>
-          <el-radio-button label="sequence">同时确认(会签)</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-
-      <el-form-item label="允许">
-        <el-checkbox-group
-          v-model="currentNode.children[childIndex].allows"
-          :disabled="!currentNode.enable"
-        >
-          <el-checkbox-button label="transfer">转交</el-checkbox-button>
-        </el-checkbox-group>
-      </el-form-item>
-    </el-form>
-    <template #footer>
-      <el-row type="flex" justify="end">
-        <el-col align="end">
-          <el-button
-            type="primary"
-            @click="onConfirm"
-          >
-            确认
-          </el-button>
-        </el-col>
-      </el-row>
-    </template>
-  </el-dialog>
-</template>
-
-
-<script>
-import Template from "../../examine/components/Template.vue";
-
-export default {
-  name: "PerScoresSelectorOnly",
-  components: {Template},
-  props: {
-    showVisible: {
-      type: Boolean,
-      default: false
-    },
-  },
-  data(){
-    return {
-      userInfo: this.$userInfo(),
-      currentNode: null,
-      childIndex: null,
-      innerVisible: this.showVisible,
-      loading:false,
-      employees:[],
-      postList:[],
-      deptList:[],
-      userSelected:[],
-      postSelected:[],
-      deptSelected:[],
-      assigneeMap:{
-        leader:'组织管理员',
-        user:'指定人员',
-        self:'被考核人',
-        post:'岗位',
-        deptLeader:'部门负责人',
-      },
-      levelOptions: [
-        {
-          value: 1,
-          label: '直接管理员'
-        },
-        {
-          value: 2,
-          label: '二级管理员'
-        },
-        {
-          value: 3,
-          label: '三级管理员'
-        },
-        {
-          value: 4,
-          label: '四级管理员'
-        },
-        {
-          value: 5,
-          label: '五级管理员'
-        },
-        {
-          value: 6,
-          label: '六级管理员'
-        }
-      ]
-    }
-  },
-  computed:{
-    employeeMap(){
-      const map = {};
-      this.employees.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    postMap(){
-      const map = {};
-      this.postList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    deptMap(){
-      const map = {};
-      this.deptList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-  },
-  watch:{
-    showVisible(val){
-      this.innerVisible = val;
-    },
-  },
-  methods: {
-    defaultNode(){
-      const node = JSON.parse("{\"id\":\"SS_1907236768800382980\",\"type\":\"scores\",\"enable\":true,\"assigneeType\":\"leader\",\"leaderLevel\":1,\"assigneeIds\":[],\"multipleType\":\"or\",\"allows\":[\"transfer\"],\"weight\":0,\"children\":[{\"id\":\"S_1907236768800382981\",\"type\":\"score\",\"enable\":true,\"assigneeType\":\"leader\",\"leaderLevel\":1,\"assigneeIds\":[],\"multipleType\":\"or\",\"allows\":[\"transfer\"],\"weight\":100,\"children\":[]}]}");
-      node.id = "SS_" + this.generalId();
-      node.children.forEach((_,i) => {
-        node.children[i].id = "S_" + this.generalId();
-      });
-      return node;
-    },
-    matchErrMsg(err){
-      return err.toString().replace(/[(Error: )]/g,'');
-    },
-    handleClose(){
-      this.$emit('update:showVisible',false);
-    },
-    dataReset(){
-      this.currentNode = null;
-      this.childIndex = null;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    initData(){
-      if (this.loading) return;
-      this.dataReset();
-      this.loading = true;
-
-      let result = true;
-      Promise.all([
-        this.$axiosUser('get', '/api/pro/employee/index', {page:0,page_size:10,status:1}, 'v2'),
-        this.$axiosUser('get','/org/post'),
-        this.$axiosUser('get', `/org/departments/${this.userInfo.site_id}`)
-      ])
-        .then(([employeeRes,postRes,deptRes]) => {
-          if (employeeRes.data.code !== 1) throw new Error(employeeRes.data.msg);
-          if (postRes.data.code !== 1) throw new Error(postRes.data.message);
-          if (deptRes.data.code !== 1) throw new Error(deptRes.data.message);
-
-          this.employees = employeeRes.data.data.list
-            .filter(e => e.account_id && e.account_id > 0)
-            .map(e => {
-              return {
-                id:e.id,
-                name:e.name,
-              }
-            });
-
-          this.postList = postRes.data.data.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.deptList = deptRes.data.data.list.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.currentNode = this.defaultNode();
-
-          this.childIndex = this.currentNode.children && this.currentNode.children.length > 0 ? 0 : null;
-
-          if (this.childIndex !== null && !!this.currentNode.children[this.childIndex]){
-            switch (this.currentNode.children[this.childIndex].assigneeType){
-              case 'user':
-                this.userSelected = [...this.currentNode.children[this.childIndex].assigneeIds];
-                break;
-              case 'post':
-                this.postSelected = [...this.currentNode.children[this.childIndex].assigneeIds];
-                break;
-              case 'deptLeader':
-                this.deptSelected = [...this.currentNode.children[this.childIndex].assigneeIds];
-                break;
-            }
-          }
-        })
-        .catch(err => {
-          this.$message.error(this.matchErrMsg(err));
-          result = false;
-        })
-        .finally(() => {
-          this.loading = false;
-          if (!result) this.handleClose();
-        })
-    },
-    generalId(){
-      return Date.now() + Math.floor(Math.random() * 10000);
-    },
-    addChild(){
-      let id = "S_" + this.generalId();
-      this.currentNode.children.push({
-        id:id,
-        type:'score',
-        enable:true,
-        assigneeType:'leader',
-        leaderLevel:1,
-        assigneeIds:[],
-        multipleType:'or',
-        allows:['transfer'],
-        weight:100,
-        children:[],
-      });
-    },
-    removeChild(index){
-      if (this.currentNode.children.length <= 1 || !this.currentNode.children[index]) return;
-      let selectChildId = this.currentNode.children[index].id;
-      this.childIndex = 0;
-      this.currentNode.children = this.currentNode.children.filter((_,i) => i !== index);
-      if (selectChildId){
-        this.currentNode.children.forEach((child,i) => {
-          if (child.id === selectChildId) this.childIndex = i;
-        })
-      }
-    },
-    onAssigneeTypeChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onOrgManagerChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [];
-      this.currentNode.children[this.childIndex].leaderLevel = v;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onUserChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = v;
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onPostChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = v;
-      this.deptSelected = [];
-    },
-    onDeptChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = v;
-    },
-    childSelect(index){
-      if (!this.currentNode.children[index]) return;
-      this.childIndex = index;
-      this.userSelected = this.currentNode.children[this.childIndex].assigneeType === 'user' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-      this.postSelected = this.currentNode.children[this.childIndex].assigneeType === 'post' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-      this.deptSelected = this.currentNode.children[this.childIndex].assigneeType === 'deptLeader' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-    },
-    onConfirm(){
-      this.$emit('confirm',this.currentNode);
-      this.handleClose();
-    },
-  }
-}
-</script>
-
-<style scoped lang="scss">
-.handler-list {
-  width: 500px;
-  margin: 0 auto 16px auto;
-  border-radius: 6px;
-  border: 1px solid #d7dae2;
-  padding: 10px 0 0 10px;
-  box-sizing: border-box;
-  display: flex;
-  flex-wrap: wrap;
-
-  .el-tag {
-    margin: 0 10px 10px 0;
-    cursor: pointer;
-  }
-}
-
-</style>

+ 0 - 426
src/newPerformance/components/PerTargetConfirmSelector.vue

@@ -1,426 +0,0 @@
-<template>
-  <el-dialog
-    :visible.sync="innerVisible"
-    @close="handleClose"
-    @open="initData"
-    @closed="dataReset"
-    append-to-body
-    :close-on-click-modal="false"
-    center
-    title="目标确认节点配置"
-    width="600px"
-  >
-    <el-form v-if="currentNode" label-width="200">
-      <el-form-item label="启用">
-        <el-switch
-          v-model="currentNode.enable"
-        />
-      </el-form-item>
-
-      <el-form-item label="">
-        <div class="handler-list">
-          <el-tag
-            v-for="(item,index) in currentNode.children"
-            :key="index"
-            :type="childIndex === index ? '' : 'info'"
-            closable
-            @close="removeChild(index)"
-            @click="childSelect(index)"
-          >
-            {{assigneeMap[item.assigneeType] || '未知'}}
-          </el-tag>
-          <el-button
-            v-show="currentNode.enable"
-            icon="el-icon-plus"
-            size="mini"
-            style="margin-bottom: 10px;"
-            @click="addChild"
-          />
-        </div>
-      </el-form-item>
-      <el-form-item label="确认人">
-        <el-radio-group
-          v-model="currentNode.children[childIndex].assigneeType"
-          :disabled="!currentNode.enable"
-          @change="onAssigneeTypeChange"
-        >
-          <el-radio-button label="leader">组织管理员</el-radio-button>
-          <el-radio-button label="user">指定人员</el-radio-button>
-          <el-radio-button label="self">被考核人</el-radio-button>
-          <el-radio-button label="post">岗位</el-radio-button>
-          <el-radio-button label="deptLeader">部门负责人</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-
-      <el-form-item label="">
-        <template v-if="currentNode.children[childIndex].assigneeType === 'leader'">
-          <el-select
-            v-model="currentNode.children[childIndex].leaderLevel"
-            placeholder="请选择管理员"
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="leader"
-            @change="onOrgManagerChange"
-          >
-            <el-option
-              v-for="item in levelOptions"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'user'">
-          <el-select
-            v-model="userSelected"
-            placeholder="请选择指定人员"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="user"
-            @change="onUserChange"
-          >
-            <el-option
-              v-for="item in employees"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'post'">
-          <el-select
-            v-model="postSelected"
-            placeholder="请选择岗位"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="post"
-            @change="onPostChange"
-          >
-            <el-option
-              v-for="item in postList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'deptLeader'">
-          <el-select
-            v-model="deptSelected"
-            placeholder="请选择部门"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="deptLeader"
-            @change="onDeptChange"
-          >
-            <el-option
-              v-for="item in deptList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-      </el-form-item>
-
-      <el-form-item label="多人时">
-        <el-radio-group
-          v-model="currentNode.children[childIndex].multipleType"
-          :disabled="!currentNode.enable"
-        >
-          <el-radio-button label="or">任一人确认(或签)</el-radio-button>
-          <el-radio-button label="parallel">按顺序确认(会签)</el-radio-button>
-          <el-radio-button label="sequence">同时确认(会签)</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-
-      <el-form-item label="允许">
-        <el-checkbox-group v-model="currentNode.children[childIndex].allows"
-                           :disabled="!currentNode.enable">
-          <el-checkbox-button label="edit">修改指标</el-checkbox-button>
-          <el-checkbox-button label="transfer">转交</el-checkbox-button>
-        </el-checkbox-group>
-      </el-form-item>
-    </el-form>
-  </el-dialog>
-</template>
-
-
-<script>
-import Template from "../../examine/components/Template.vue";
-
-export default {
-  name: "PerTargetConfirmSelector",
-  components: {Template},
-  props: {
-    showVisible: {
-      type: Boolean,
-      default: false
-    },
-    indicator:{
-      type: Object,
-      default: () =>{
-        return null
-      }
-    }
-  },
-  data(){
-    return {
-      userInfo: this.$userInfo(),
-      currentNode: null,
-      childIndex: null,
-      innerVisible: this.showVisible,
-      loading:false,
-      employees:[],
-      postList:[],
-      deptList:[],
-      userSelected:[],
-      postSelected:[],
-      deptSelected:[],
-      assigneeMap:{
-        leader:'组织管理员',
-        user:'指定人员',
-        self:'被考核人',
-        post:'岗位',
-        deptLeader:'部门负责人',
-      },
-      levelOptions: [
-        {
-          value: 1,
-          label: '直接管理员'
-        },
-        {
-          value: 2,
-          label: '二级管理员'
-        },
-        {
-          value: 3,
-          label: '三级管理员'
-        },
-        {
-          value: 4,
-          label: '四级管理员'
-        },
-        {
-          value: 5,
-          label: '五级管理员'
-        },
-        {
-          value: 6,
-          label: '六级管理员'
-        }
-      ]
-    }
-  },
-  computed:{
-    employeeMap(){
-      const map = {};
-      this.employees.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    postMap(){
-      const map = {};
-      this.postList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    deptMap(){
-      const map = {};
-      this.deptList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-  },
-  watch:{
-    showVisible(val){
-      this.innerVisible = val;
-    },
-  },
-  methods: {
-    matchErrMsg(err){
-      return err.toString().replace(/[(Error: )]/g,'');
-    },
-    handleClose(){
-      this.$emit('update:showVisible',false);
-    },
-    dataReset(){
-      this.currentNode = null;
-      this.childIndex = null;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    initData(){
-      if (this.loading || !this.indicator) return;
-      this.dataReset();
-      this.loading = true;
-
-      let result = true;
-      Promise.all([
-        this.$axiosUser('get', '/api/pro/employee/index', {page:0,page_size:10,status:1}, 'v2'),
-        this.$axiosUser('get','/org/post'),
-        this.$axiosUser('get', `/org/departments/${this.userInfo.site_id}`)
-      ])
-        .then(([employeeRes,postRes,deptRes]) => {
-          if (employeeRes.data.code !== 1) throw new Error(employeeRes.data.msg);
-          if (postRes.data.code !== 1) throw new Error(postRes.data.message);
-          if (deptRes.data.code !== 1) throw new Error(deptRes.data.message);
-
-          this.employees = employeeRes.data.data.list
-            .filter(e => e.account_id && e.account_id > 0)
-            .map(e => {
-              return {
-                id:e.id,
-                name:e.name,
-              }
-            });
-
-          this.postList = postRes.data.data.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.deptList = deptRes.data.data.list.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.currentNode = this.indicator.flow.nodes.find(node => node.type === 'targetConfirms');
-
-          this.childIndex = this.currentNode.children && this.currentNode.children.length > 0 ? 0 : null;
-
-          if (this.childIndex !== null && !!this.currentNode.children[this.childIndex]){
-            switch (this.currentNode.children[this.childIndex].assigneeType){
-              case 'user':
-                this.userSelected = this.currentNode.children[this.childIndex].assigneeIds;
-                break;
-              case 'post':
-                this.postSelected = this.currentNode.children[this.childIndex].assigneeIds;
-                break;
-              case 'deptLeader':
-                this.deptSelected = this.currentNode.children[this.childIndex].assigneeIds;
-                break;
-            }
-          }
-        })
-        .catch(err => {
-          this.$message.error(this.matchErrMsg(err));
-          result = false;
-        })
-        .finally(() => {
-          this.loading = false;
-          if (!result) this.handleClose();
-        })
-    },
-    generalId(){
-      return Date.now() + Math.floor(Math.random() * 10000);
-    },
-    addChild(){
-      let id = "TC_" + this.generalId();
-      this.currentNode.children.push({
-        id:id,
-        type:'targetConfirm',
-        enable:true,
-        assigneeType:'self',
-        leaderLevel:1,
-        assigneeIds:[],
-        multipleType:'or',
-        allows:[],
-        weight:0,
-        children:[],
-      });
-    },
-    removeChild(index){
-      if (this.currentNode.children.length <= 1 || !this.currentNode.children[index]) return;
-      let selectChildId = this.currentNode.children[index].id;
-      this.childIndex = 0;
-      this.currentNode.children = this.currentNode.children.filter((_,i) => i !== index);
-      if (selectChildId){
-        this.currentNode.children.forEach((child,i) => {
-          if (child.id === selectChildId) this.childIndex = i;
-        })
-      }
-    },
-    onAssigneeTypeChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onOrgManagerChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [];
-      this.currentNode.children[this.childIndex].leaderLevel = v;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onUserChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = v;
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onPostChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = v;
-      this.deptSelected = [];
-    },
-    onDeptChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = v;
-    },
-    childSelect(index){
-      if (!this.currentNode.children[index]) return;
-      this.childIndex = index;
-      this.userSelected = this.currentNode.children[this.childIndex].assigneeType === 'user' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-      this.postSelected = this.currentNode.children[this.childIndex].assigneeType === 'post' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-      this.deptSelected = this.currentNode.children[this.childIndex].assigneeType === 'deptLeader' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-    }
-  }
-}
-</script>
-
-<style scoped lang="scss">
-.handler-list {
-  width: 500px;
-  margin: 0 auto 16px auto;
-  border-radius: 6px;
-  border: 1px solid #d7dae2;
-  padding: 10px 0 0 10px;
-  box-sizing: border-box;
-  display: flex;
-  flex-wrap: wrap;
-
-  .el-tag {
-    margin: 0 10px 10px 0;
-    cursor: pointer;
-  }
-}
-
-</style>

+ 0 - 447
src/newPerformance/components/PerTargetConfirmSelectorOnly.vue

@@ -1,447 +0,0 @@
-<template>
-  <el-dialog
-    :visible.sync="innerVisible"
-    @close="handleClose"
-    @open="initData"
-    @closed="dataReset"
-    append-to-body
-    :close-on-click-modal="false"
-    center
-    title="目标确认节点配置"
-    width="600px"
-  >
-    <el-form v-if="currentNode" label-width="200">
-      <el-form-item label="启用">
-        <el-switch
-          v-model="currentNode.enable"
-        />
-      </el-form-item>
-
-      <el-form-item label="">
-        <div class="handler-list">
-          <el-tag
-            v-for="(item,index) in currentNode.children"
-            :key="index"
-            :type="childIndex === index ? '' : 'info'"
-            closable
-            @close="removeChild(index)"
-            @click="childSelect(index)"
-          >
-            {{assigneeMap[item.assigneeType] || '未知'}}
-          </el-tag>
-          <el-button
-            v-show="currentNode.enable"
-            icon="el-icon-plus"
-            size="mini"
-            style="margin-bottom: 10px;"
-            @click="addChild"
-          />
-        </div>
-      </el-form-item>
-      <el-form-item label="确认人">
-        <el-radio-group
-          v-model="currentNode.children[childIndex].assigneeType"
-          :disabled="!currentNode.enable"
-          @change="onAssigneeTypeChange"
-        >
-          <el-radio-button label="leader">组织管理员</el-radio-button>
-          <el-radio-button label="user">指定人员</el-radio-button>
-          <el-radio-button label="self">被考核人</el-radio-button>
-          <el-radio-button label="post">岗位</el-radio-button>
-          <el-radio-button label="deptLeader">部门负责人</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-
-      <el-form-item label="">
-        <template v-if="currentNode.children[childIndex].assigneeType === 'leader'">
-          <el-select
-            v-model="currentNode.children[childIndex].leaderLevel"
-            placeholder="请选择管理员"
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="leader"
-            @change="onOrgManagerChange"
-          >
-            <el-option
-              v-for="item in levelOptions"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'user'">
-          <el-select
-            v-model="userSelected"
-            placeholder="请选择指定人员"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="user"
-            @change="onUserChange"
-          >
-            <el-option
-              v-for="item in employees"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'post'">
-          <el-select
-            v-model="postSelected"
-            placeholder="请选择岗位"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="post"
-            @change="onPostChange"
-          >
-            <el-option
-              v-for="item in postList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-        <template v-if="currentNode.children[childIndex].assigneeType === 'deptLeader'">
-          <el-select
-            v-model="deptSelected"
-            placeholder="请选择部门"
-            multiple
-            :disabled="!currentNode.enable"
-            filterable
-            style="width: 300px;"
-            key="deptLeader"
-            @change="onDeptChange"
-          >
-            <el-option
-              v-for="item in deptList"
-              :key="item.id"
-              :label="item.name"
-              :value="item.id"
-              style="width: 300px;"
-            />
-          </el-select>
-        </template>
-      </el-form-item>
-
-      <el-form-item label="多人时">
-        <el-radio-group
-          v-model="currentNode.children[childIndex].multipleType"
-          :disabled="!currentNode.enable"
-        >
-          <el-radio-button label="or">任一人确认(或签)</el-radio-button>
-          <el-radio-button label="parallel">按顺序确认(会签)</el-radio-button>
-          <el-radio-button label="sequence">同时确认(会签)</el-radio-button>
-        </el-radio-group>
-      </el-form-item>
-
-      <el-form-item label="允许">
-        <el-checkbox-group v-model="currentNode.children[childIndex].allows"
-                           :disabled="!currentNode.enable">
-          <el-checkbox-button label="edit">修改指标</el-checkbox-button>
-          <el-checkbox-button label="transfer">转交</el-checkbox-button>
-        </el-checkbox-group>
-      </el-form-item>
-    </el-form>
-    <template #footer>
-      <el-row type="flex" justify="end">
-        <el-col align="end">
-          <el-button
-            type="primary"
-            @click="onConfirm"
-          >
-            确认
-          </el-button>
-        </el-col>
-      </el-row>
-    </template>
-  </el-dialog>
-</template>
-
-
-<script>
-import Template from "../../examine/components/Template.vue";
-
-export default {
-  name: "PerTargetConfirmSelectorOnly",
-  components: {Template},
-  props: {
-    showVisible: {
-      type: Boolean,
-      default: false
-    },
-  },
-  data(){
-    return {
-      userInfo: this.$userInfo(),
-      currentNode: null,
-      childIndex: null,
-      innerVisible: this.showVisible,
-      loading:false,
-      employees:[],
-      postList:[],
-      deptList:[],
-      userSelected:[],
-      postSelected:[],
-      deptSelected:[],
-      assigneeMap:{
-        leader:'组织管理员',
-        user:'指定人员',
-        self:'被考核人',
-        post:'岗位',
-        deptLeader:'部门负责人',
-      },
-      levelOptions: [
-        {
-          value: 1,
-          label: '直接管理员'
-        },
-        {
-          value: 2,
-          label: '二级管理员'
-        },
-        {
-          value: 3,
-          label: '三级管理员'
-        },
-        {
-          value: 4,
-          label: '四级管理员'
-        },
-        {
-          value: 5,
-          label: '五级管理员'
-        },
-        {
-          value: 6,
-          label: '六级管理员'
-        }
-      ]
-    }
-  },
-  computed:{
-    employeeMap(){
-      const map = {};
-      this.employees.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    postMap(){
-      const map = {};
-      this.postList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-    deptMap(){
-      const map = {};
-      this.deptList.forEach(e => {
-        if (!map[e.id]) map[e.id] = e.name;
-      });
-      return map;
-    },
-  },
-  watch:{
-    showVisible(val){
-      this.innerVisible = val;
-    },
-  },
-  methods: {
-    idGeneral(){
-      return Date.now() + Math.floor(Math.random() * 10000);
-    },
-    defaultNode(){
-      const node = JSON.parse("{\"id\":\"TCS_1906993155344510977\",\"type\":\"targetConfirms\",\"enable\":true,\"assigneeType\":\"self\",\"leaderLevel\":1,\"assigneeIds\":[],\"multipleType\":\"or\",\"allows\":[],\"weight\":0,\"children\":[{\"id\":\"TC_1906993155344510978\",\"type\":\"targetConfirm\",\"enable\":true,\"assigneeType\":\"self\",\"leaderLevel\":1,\"assigneeIds\":[],\"multipleType\":\"or\",\"allows\":[],\"weight\":0,\"children\":[]}]}");
-      node.id = "TCS_" + this.idGeneral();
-      node.children.forEach((_,i) => {
-        node.children[i].id = "TC_" + this.idGeneral();
-      });
-      return node;
-    },
-    matchErrMsg(err){
-      return err.toString().replace(/[(Error: )]/g,'');
-    },
-    handleClose(){
-      this.$emit('update:showVisible',false);
-    },
-    dataReset(){
-      this.currentNode = null;
-      this.childIndex = null;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    initData(){
-      if (this.loading) return;
-      this.dataReset();
-      this.loading = true;
-
-      let result = true;
-      Promise.all([
-        this.$axiosUser('get', '/api/pro/employee/index', {page:0,page_size:10,status:1}, 'v2'),
-        this.$axiosUser('get','/org/post'),
-        this.$axiosUser('get', `/org/departments/${this.userInfo.site_id}`)
-      ])
-        .then(([employeeRes,postRes,deptRes]) => {
-          if (employeeRes.data.code !== 1) throw new Error(employeeRes.data.msg);
-          if (postRes.data.code !== 1) throw new Error(postRes.data.message);
-          if (deptRes.data.code !== 1) throw new Error(deptRes.data.message);
-
-          this.employees = employeeRes.data.data.list
-            .filter(e => e.account_id && e.account_id > 0)
-            .map(e => {
-              return {
-                id:e.id,
-                name:e.name,
-              }
-            });
-
-          this.postList = postRes.data.data.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.deptList = deptRes.data.data.list.map(item => {
-            return {
-              id: item.id,
-              name: item.name,
-            }
-          });
-
-          this.currentNode = this.defaultNode();
-
-          this.childIndex = this.currentNode.children && this.currentNode.children.length > 0 ? 0 : null;
-
-          if (this.childIndex !== null && !!this.currentNode.children[this.childIndex]){
-            switch (this.currentNode.children[this.childIndex].assigneeType){
-              case 'user':
-                this.userSelected = this.currentNode.children[this.childIndex].assigneeIds;
-                break;
-              case 'post':
-                this.postSelected = this.currentNode.children[this.childIndex].assigneeIds;
-                break;
-              case 'deptLeader':
-                this.deptSelected = this.currentNode.children[this.childIndex].assigneeIds;
-                break;
-            }
-          }
-        })
-        .catch(err => {
-          this.$message.error(this.matchErrMsg(err));
-          result = false;
-        })
-        .finally(() => {
-          this.loading = false;
-          if (!result) this.handleClose();
-        })
-    },
-    generalId(){
-      return Date.now() + Math.floor(Math.random() * 10000);
-    },
-    addChild(){
-      let id = "TC_" + this.generalId();
-      this.currentNode.children.push({
-        id:id,
-        type:'targetConfirm',
-        enable:true,
-        assigneeType:'self',
-        leaderLevel:1,
-        assigneeIds:[],
-        multipleType:'or',
-        allows:[],
-        weight:0,
-        children:[],
-      });
-    },
-    removeChild(index){
-      if (this.currentNode.children.length <= 1 || !this.currentNode.children[index]) return;
-      let selectChildId = this.currentNode.children[index].id;
-      this.childIndex = 0;
-      this.currentNode.children = this.currentNode.children.filter((_,i) => i !== index);
-      if (selectChildId){
-        this.currentNode.children.forEach((child,i) => {
-          if (child.id === selectChildId) this.childIndex = i;
-        })
-      }
-    },
-    onAssigneeTypeChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onOrgManagerChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [];
-      this.currentNode.children[this.childIndex].leaderLevel = v;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onUserChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = v;
-      this.postSelected = [];
-      this.deptSelected = [];
-    },
-    onPostChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = v;
-      this.deptSelected = [];
-    },
-    onDeptChange(v){
-      this.currentNode.children[this.childIndex].assigneeIds = [...v];
-      this.currentNode.children[this.childIndex].leaderLevel = 1;
-      this.userSelected = [];
-      this.postSelected = [];
-      this.deptSelected = v;
-    },
-    childSelect(index){
-      if (!this.currentNode.children[index]) return;
-      this.childIndex = index;
-      this.userSelected = this.currentNode.children[this.childIndex].assigneeType === 'user' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-      this.postSelected = this.currentNode.children[this.childIndex].assigneeType === 'post' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-      this.deptSelected = this.currentNode.children[this.childIndex].assigneeType === 'deptLeader' ? this.currentNode.children[this.childIndex].assigneeIds : [];
-    },
-    onConfirm(){
-      this.$emit('confirm',this.currentNode);
-      this.handleClose();
-    },
-  }
-}
-</script>
-
-<style scoped lang="scss">
-.handler-list {
-  width: 500px;
-  margin: 0 auto 16px auto;
-  border-radius: 6px;
-  border: 1px solid #d7dae2;
-  padding: 10px 0 0 10px;
-  box-sizing: border-box;
-  display: flex;
-  flex-wrap: wrap;
-
-  .el-tag {
-    margin: 0 10px 10px 0;
-    cursor: pointer;
-  }
-}
-
-</style>

+ 0 - 139
src/newPerformance/components/PerformSetting copy 2.vue

@@ -1,139 +0,0 @@
-<template>
-    <div class="all">
-        <div class="flex-box-ce header">
-            考核操作日志
-        </div>
-
-        <div style="height: 1px; background-color: #f1f1f1; margin: 10px 0;"></div>
-
-        <div class="table-box">
-
-            <el-table v-loading="loading" :data="templateList.slice((page - 1) * pageSize, page * pageSize)"
-                :header-cell-style="{ background: '#f5f7fa' }" style="width: 100%; height: auto;">
-                <el-table-column prop="name" label="员工" width="150">
-                    <template slot-scope="scope">
-                        <div class="flex-box-ce">
-                            <userImage :id="scope.row.employeeId" :img_url="scope.row.imgUrl"
-                                :user_name="scope.row.name" width="30px" height="30px"></userImage>
-                            {{ scope.row.name }}
-                        </div>
-
-                    </template>
-                </el-table-column>
-                <el-table-column prop="content" label="具体操作" ></el-table-column>
-                <el-table-column prop="createTime" label="操作时间" width="150"></el-table-column>
-            </el-table>
-            <div style="height: 50px;"></div>
-
-        </div>
-
-        <div class="flex-box-ce" style="width: 100%; justify-content: center; height: 50px;">
-            <el-pagination @current-change="handleCurrentChange" :current-page.sync="page" :page-size="pageSize"
-                :page-sizes="[10, 20, 30, 40]" layout="total, prev, pager, next" :total="total">
-            </el-pagination>
-        </div>
-    </div>
-</template>
-
-<script>
-import { mapGetters } from 'vuex';
-export default {
-    data() {
-        return {
-            loading: false,
-            templateId: "",
-            templateList: [],
-            total: 0,
-            page: 1,
-            pageSize: 10,
-        }
-    },
-
-    computed: {
-        ...mapGetters(['user_info'])
-    },
-
-    created() {
-        this.getTableData()
-    },
-
-    methods: {
-        getTableData() {
-            this.loading = true
-            let url = `/performance/statistics/logs/${this.user_info.site_id}/33`
-            let params = {
-                page: 1,
-                pageSize: 10,
-            }
-            this.$axiosUser("get", url, params).then(res => {
-                this.templateList = res.data.data.list;
-                this.total = res.data.data.total
-                this.loading = false;
-            })
-        },
-        handleSizeChange(val) {
-            this.pageSize = val
-        },
-        handleCurrentChange(val) {
-            this.page = val
-        }
-    }
-        
-}
-
-</script>
-
-<style scoped lang="scss">
-.all {
-    width: 100%;
-    height: 100%;
-    background-color: #fff;
-    font-size: 14px;
-    border-radius: 4px;
-    padding: 10px;
-    box-sizing: border-box;
-    display: flex;
-    flex-direction: column;
-
-    .header {
-        font-size: 16px;
-        font-weight: 600;
-        height: 30px;
-        line-height: 30px;
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-    }
-
-    .table-box {
-        flex: 1;
-        width: 100%;
-        overflow-y: auto;
-
-        /* 设置滚动条的宽度和背景色 */
-        &::-webkit-scrollbar {
-            width: 6px;
-            height: 6px;
-            background-color: #f9f9f9;
-        }
-
-        /* 设置滚动条滑块的样式 */
-        &::-webkit-scrollbar-thumb {
-            border-radius: 6px;
-            background-color: #c1c1c1;
-        }
-
-        /* 设置滚动条滑块hover样式 */
-        &::-webkit-scrollbar-thumb:hover {
-            background-color: #a8a8a8;
-        }
-
-        /* 设置滚动条轨道的样式 */
-        &::-webkit-scrollbar-track {
-            box-shadow: inset 0 0 5px rgba(87, 175, 187, 0.1);
-            border-radius: 6px;
-            background: #ededed;
-        }
-    }
-}
-</style>

+ 0 - 296
src/newPerformance/components/PerformSetting copy 3.vue

@@ -1,296 +0,0 @@
-<template>
-    <div>
-        <!-- 悬浮按钮 -->
-        <button @click="toggleChat" class="chat-button">客服</button>
-
-        <!-- 聊天弹窗 -->
-        <transition name="fade">
-            <div v-if="isChatOpen" class="chat-popup">
-                <div class="chat-header">
-                    <h3>客服聊天</h3>
-                    <button @click="toggleChat" class="close-button">关闭</button>
-                </div>
-                <div class="chat-body">
-                    <div v-for="(message, index) in messages" :key="index" class="message">
-                        <!-- 客服消息 -->
-                        <div  class="message-item customer-message">
-                            <img src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png"
-                                class="avatar customer-avatar" alt="客服头像" />
-                            <div class="message-bubble">
-                                <div class="triangle"></div>
-                                <p>{{ message.sourceContent }}</p>
-                            </div>
-                        </div>
-                        <!-- 用户消息 -->
-                        <div class="message-item user-message">
-                            <img src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png"
-                                class="avatar user-avatar" alt="用户头像" />
-                            <div class="message-bubble">
-                                <div class="triangle"></div>
-                                <p>{{ message.question }}</p>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-                <div class="chat-footer">
-                    <input v-model="text" @keyup.enter="send" placeholder="输入消息..." />
-                    <button @click="send">发送</button>
-                </div>
-            </div>
-        </transition>
-    </div>
-</template>
-
-
-<script>
-export default {
-    data() {
-        return {
-            es: null,
-            loading: false,
-            text: "",
-            isChatOpen: false,
-            messages: [
-                { type: "customer", text: "123"}
-            ],
-            newMessage: ""
-        };
-    },
-
-    mounted() {
-        // const eventSource = new EventSource(`http://192.168.0.55:8080/ai/common/customer/service?prompt=${this.text}`);
-        // eventSource.onmessage = (event) => {
-        //     this.message = event.data;
-        // };
-        // eventSource.onerror = (event) => {
-        //     console.error('EventSource error:', event);
-        // };
-        if (this.es) this.es.close();
-        this.es = null;
-    },
-
-    unmounted() {
-        if (this.es) this.es.close();
-    },
-
-    methods: {
-        send() {
-            console.log("发送信息")
-            if (this.loading || !this.text) return;
-            if (this.es) this.es.close();
-            this.loading = true;
-
-            this.es = new EventSource(`https://new.gdy.g107.com/ai/common/customer/service?prompt=${this.text}`);
-
-            this.es.onmessage = (event) => {
-                if (!event.data) return;
-                let d = event.data.substring(5).trim();
-                if (d.startsWith("[DONE]")) {
-                    this.es.close();
-                    this.es = null;
-                    this.loading = false;
-                    this.value = "";
-                    console.log(this.messages);
-                    return;
-                }
-                let res = JSON.parse(d);
-                if (!res) return;
-                let data = res.choices[0].delta;
-                if (!data) return;
-                let msgData = this.messages.find(m => m.id === res.id);
-                if (!msgData) {
-                    msgData = {
-                        id: res.id,
-                        sourceContent: data.content || '',
-                        sourceReasoningContent: data.reasoning_content || '',
-                        content: '',
-                        reasoningContent: '',
-                        question: this.text
-                    }
-
-                    // msgData.content = contentConvert(msgData.sourceContent);
-                    // msgData.reasoningContent = contentConvert(msgData.sourceReasoningContent);
-                    // msgData.content = DOMPurify.sanitize(marked(msgData.sourceContent));
-                    // msgData.reasoningContent = DOMPurify.sanitize(marked(msgData.sourceReasoningContent));
-                    this.messages.push(msgData)
-                } else {
-                    msgData.sourceContent += data.content || '';
-                    msgData.sourceReasoningContent += data.reasoning_content || '';
-                    // msgData.content = contentConvert(msgData.sourceContent);
-                    // msgData.reasoningContent = contentConvert(msgData.sourceReasoningContent);
-                    // msgData.content = DOMPurify.sanitize(marked(msgData.sourceContent));
-                    // msgData.reasoningContent = DOMPurify.sanitize(marked(msgData.sourceReasoningContent));
-                }
-            };
-
-            this.es.onerror = (event) => {
-                console.error(event)
-                this.es.close();
-            }
-        },
-        toggleChat() {
-            this.isChatOpen = !this.isChatOpen;
-        },
-        sendMessage() {
-            if (this.newMessage.trim() !== "") {
-                this.messages.push({
-                    text: this.newMessage,
-                    type: "user"
-                });
-                this.newMessage = "";
-            }
-        }
-    }
-};
-</script>
-
-
-<style scoped lang="scss">
-/* 淡入淡出动画 */
-.fade-enter-active,
-.fade-leave-active {
-    transition: opacity 0.5s;
-}
-
-.fade-enter,
-.fade-leave-to {
-    opacity: 0;
-}
-
-/* 悬浮按钮样式 */
-.chat-button {
-    position: fixed;
-    bottom: 20px;
-    right: 20px;
-    padding: 10px 20px;
-    background-color: #007bff;
-    color: white;
-    border: none;
-    border-radius: 5px;
-    cursor: pointer;
-    font-size: 16px;
-}
-
-/* 聊天弹窗样式 */
-.chat-popup {
-    position: fixed;
-    bottom: 0;
-    right: 0;
-    width: 300px;
-    height: 400px;
-    background-color: white;
-    border: 1px solid #ccc;
-    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
-    z-index: 1000;
-    border-radius: 10px;
-}
-
-.chat-header {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    padding: 10px;
-    border-bottom: 1px solid #eee;
-}
-
-.close-button {
-    background-color: #ff4d4f;
-    color: white;
-    border: none;
-    border-radius: 5px;
-    padding: 5px 10px;
-    cursor: pointer;
-}
-
-.chat-body {
-    height: 300px;
-    overflow-y: auto;
-    padding: 10px;
-    border-bottom: 1px solid #eee;
-}
-
-.message-item {
-    display: flex;
-    margin-bottom: 10px;
-}
-
-.avatar {
-    width: 40px;
-    height: 40px;
-    border-radius: 50%;
-    margin-right: 20px;
-}
-
-.customer-avatar {
-    align-self: flex-start;
-}
-
-.user-avatar {
-    align-self: flex-start;
-}
-
-.message-bubble {
-    position: relative;
-    padding: 5px 10px;
-    background-color: #f1f1f1;
-    border-radius: 5px;
-    max-width: 70%;
-    box-sizing: border-box;
-}
-
-.message-bubble p {
-    width: 100%;
-    display: flex;
-    flex-wrap: wrap;
-}
-
-
-
-.user-message .message-bubble {
-    background-color: #007bff;
-    display: flex;
-    align-items: center;
-    color: white;
-}
-
-.triangle {
-    position: absolute;
-    width: 0;
-    height: 0;
-    border: 10px solid transparent;
-}
-
-.customer-message .triangle {
-    top: 10px;
-    left: -20px;
-    border-right-color: #f1f1f1;
-}
-
-.user-message .triangle {
-    top: 10px;
-    left: -20px;
-    border-right-color: #007bff;
-}
-
-.chat-footer {
-    display: flex;
-    padding: 10px;
-}
-
-.chat-footer input {
-    flex: 1;
-    padding: 5px;
-    border: 1px solid #ccc;
-    border-radius: 5px;
-    margin-right: 10px;
-}
-
-.chat-footer button {
-    padding: 5px 10px;
-    background-color: #007bff;
-    color: white;
-    border: none;
-    border-radius: 5px;
-    cursor: pointer;
-}
-</style>

+ 0 - 84
src/newPerformance/components/PerformSetting copy.vue

@@ -1,84 +0,0 @@
-<template>
-    <div class="all">
-        <div class="tabs">
-            <div class="tab-item" v-for="(item, index) in tabs" :key="item.id"
-                :class="currentIdnex == index ? 'active' : ''" @click="changeTab(index)">
-                {{ item.title }}
-            </div>
-        </div>
-
-        <div class="flex-1">
-            <LevelSetting v-if="currentIdnex == 0" />
-            <NormalDistribution v-if="currentIdnex == 1" />
-        </div>
-
-    </div>
-</template>
-
-<script>
-import LevelSetting from './LevelSetting.vue';
-import NormalDistribution from './NormalDistribution.vue';
-export default {
-    components: {
-        LevelSetting,
-        NormalDistribution
-    },
-    data() {
-        return {
-            currentIdnex: 0,
-            tabs: [
-                { id: 1, title: "等级设置" },
-                { id: 2, title: "正态分布" },
-            ]
-        }
-    },
-    methods: {
-        changeTab(index) {
-            this.currentIdnex = index
-        }
-    }
-        
-}
-
-</script>
-
-
-<style scoped="scoped" lang="scss">
-.all {
-    width: 100%;
-    height: 100%;
-    position: relative;
-    padding: 20px 10px;
-    box-sizing: border-box;
-    background-color: #fff;
-    display: flex;
-    flex-direction: column;
-    .tabs {
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        .tab-item {
-            width: 120px;
-            height: 40px;
-            border: 1px solid #409EFF;
-            border-radius: 6px;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            color: #409EFF;
-            &:hover {
-                cursor: pointer;
-            }
-            &:first-child {
-                margin-right: 10px;
-            }
-
-            
-        }
-        .active {
-            background-color: #409EFF;
-            color: white;
-        }
-    }
-}
-</style>

+ 143 - 93
src/newPerformance/components/ProcessTracking.vue

@@ -10,25 +10,26 @@
                         </el-option>
                     </el-select>
 
-                    <el-date-picker class="cursor" style="width: 150px; margin-left: 10px;" v-model="params.year"
-                        type="year" placeholder="选择年" value-format="yyyy" @change="changeYear">
+                    <el-date-picker v-show="params.cycleType !== '0'" class="cursor"
+                        style="width: 150px; margin-left: 10px;" v-model="currentYear" type="year" placeholder="选择年"
+                        format="yyyy" value-format="yyyy" @change="changeYear">
                     </el-date-picker>
 
-                    <el-date-picker class="cursor" v-if="params.cycleType == '0'"
+                    <el-date-picker class="cursor" v-show="params.cycleType == '0'"
                         style="width: 300px; margin-left: 10px;" v-model="dateRange" type="daterange"
-                        range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd"
-                        value-format="yyyy-MM-dd" @change="changeDate"></el-date-picker>
+                        range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"
+                        format="yyyy-MM-dd" @change="changeDate"></el-date-picker>
 
-                    <el-select class="cursor" v-if="params.cycleType == '2'" style="width: 150px; margin-left: 10px;"
-                        v-model="cycleValue" placeholder="请选择半年度" @change="changeCycleValue">
+                    <el-select class="cursor" v-show="params.cycleType == '2'" style="width: 150px; margin-left: 10px;"
+                        v-model="halfYear" placeholder="请选择半年度" @change="changeHalfYear">
                         <el-option label="上半年" value="1">
                         </el-option>
                         <el-option label="下半年" value="2">
                         </el-option>
                     </el-select>
 
-                    <el-select class="cursor" v-if="params.cycleType == '3'" style="width: 150px; margin-left: 10px;"
-                        v-model="cycleValue" placeholder="请选择季度" @change="changeCycleValue">
+                    <el-select class="cursor" v-show="params.cycleType == '3'" style="width: 150px; margin-left: 10px;"
+                        v-model="quarter" placeholder="请选择季度" @change="changeQuarter">
                         <el-option label="第一季度" value="1">
                         </el-option>
                         <el-option label="第二季度" value="2">
@@ -39,8 +40,8 @@
                         </el-option>
                     </el-select>
 
-                    <el-select class="cursor" v-if="params.cycleType == '4'" style="width: 150px; margin-left: 10px;"
-                        v-model="cycleValue" placeholder="请选择月度" @change="changeCycleValue">
+                    <el-select class="cursor" v-show="params.cycleType == '4'" style="width: 150px; margin-left: 10px;"
+                        v-model="month" placeholder="请选择月度" @change="changeMonth">
                         <el-option label="一月" value="1">
                         </el-option>
                         <el-option label="二月" value="2">
@@ -67,25 +68,34 @@
                         </el-option>
                     </el-select>
 
-                    <div class="dept_wdiv flex-box-ce" style="margin: 0 0 0 10px;">
+                    <!-- <div class="dept_wdiv flex-box-ce" style="margin: 0 0 0 10px;">
                         <div class="dept_inp" @click="show_dept_selector = true">
                             <span v-if="deptVisibleName != ''">{{ deptVisibleName }}</span>
                             <span v-else style="color: #b9b9b9;">选择部门</span>
                         </div>
                         <i class="el-icon-arrow-down"></i>
-                    </div>
+                    </div> -->
 
+                    <el-select v-model="selectedDeptIds" clearable multiple placeholder="请选择部门"
+                        style="width: 300px; margin-left: 10px;" @change="changeDeptName">
+                        <el-option v-for="(item, index) in deptList" :key="index" :label="item.name"
+                            :value="item.id"></el-option>
+                    </el-select>
 
-                    <el-select class="cursor" style="width: 260px; margin-left: 10px;" v-model="selectEmployeeId"
+                    <el-select class="cursor" style="width: 260px; margin: 0 10px;" v-model="selectEmployeeId"
                         filterable clearable multiple placeholder="员工姓名搜索" @change="changeEmployeeIds">
-                        <el-option v-for="item in employees" :key="item.id" :label="item.name"
+                        <el-option v-for="(item, index) in employees" :key="index" :label="item.name"
                             :value="item.id"></el-option>
                     </el-select>
 
+                    <el-button type="primary" size="small" @click="doSearch()">搜 索</el-button>
+
                 </div>
 
-                <el-button type="primary" @click="exportToExcel('过程分析', '#myTable')" size="small"
-                    :loading="downloadLoading">导出明细</el-button>
+                <div class="flex-box-ce">
+                    <el-button type="primary" @click="exportToExcel('过程分析', '#myTable')" size="small"
+                        :loading="downloadLoading">导出明细</el-button>
+                </div>
             </div>
             <!-- 水平线 -->
             <div class="line"></div>
@@ -172,12 +182,12 @@
         <el-dialog title="员工绩效详情" :visible.sync="detailDialogVisible" @close="handleClose" :close-on-click-modal="false"
             :close-on-press-escape="true" center fullscreen :show-close="false">
             <div style=" width: 100%; height: 100%; position: relative;">
-            <el-button round style="position: absolute; top: -65px; left: 0px; z-index: 99;"
-                @click="detailDialogVisible = false">返回</el-button>
-            <!-- 我的考核 -->
-            <MyPerformance v-if="detailDialogVisible" :reviewId="reviewId" :sendEmployeeId='sendEmployeeId' />
-    </div>
-    </el-dialog>
+                <el-button round style="position: absolute; top: -65px; left: 0px; z-index: 99;"
+                    @click="detailDialogVisible = false">返回</el-button>
+                <!-- 我的考核 -->
+                <MyPerformance v-if="detailDialogVisible" :reviewId="reviewId" :sendEmployeeId='sendEmployeeId' />
+            </div>
+        </el-dialog>
     </div>
 
 </template>
@@ -200,7 +210,7 @@ export default {
     },
     data() {
         return {
-            employees: this.$getEmployeeMap(), // 员工列表
+            employees: [], // 员工列表
             isLeftShow: true,
             isRightShow: false,
             employeeName: '',
@@ -212,6 +222,7 @@ export default {
             cycleValue: '1',
             downloadLoading: false,
             show_dept_selector: false,
+            selectedDeptIds: [],
             deptVisibleName: '',
             dept_selected: { dept: [], employee: [] },
             cycleOptions: [
@@ -219,7 +230,7 @@ export default {
                 { name: "季度", id: '3' },
                 { name: "半年度", id: '2' },
                 { name: "年度", id: '1' },
-                { name: "定义", id: '0' },
+                { name: "定义", id: '0' },
             ],
             options: [
                 {
@@ -235,6 +246,9 @@ export default {
                     label: '已完成'
                 }
             ],
+            halfYear: "1",
+            quarter: "1",
+            month: "1",
             reviewId: "",
             sendEmployeeId: "",
             reviewPackageId: 0,
@@ -270,13 +284,13 @@ export default {
             tableData: [],
             filteredData: [],
             selectEmployeeId: [],
-            // 周期类型 0-定义 1-年度 2-半年度 3-季度 4-月度
+            // 周期类型 0-定义 1-年度 2-半年度 3-季度 4-月度
             params: {
                 cycleType: "4",
                 startDate: '',
                 endDate: '',
                 deptIds: '',
-                year: ''
+                cycleValue: ''
             },
             status: '',
             level: '',
@@ -288,13 +302,14 @@ export default {
                 { label: "已结束", value: "1" },
                 { label: "面谈", value: "2" }
             ],
+            currentYear: '',
             userInfo: null,
             isContentLeft: true,
             isContentRight: true,
             chooseUserIds: [],
             employeeName: '', 
             isFold: false,
-            dateRange: this.getMonthFirstAndLastDay(), // 设置默认值
+            dateRange: [], 
             detailDialogVisible: false,
             pickerOptions: {
                 shortcuts: [{
@@ -326,16 +341,10 @@ export default {
         }
     },
 
-    watch: {
-        dateRange(v) {
-            console.log(v);
-        }
-    },
-
     async created() {
         that = this;
         await this.getAllSet();
-        this.getDefaultTime();
+        this.initDefaultParams();
     },
 
     // 
@@ -372,9 +381,26 @@ export default {
     },
 
     methods: {
-        getMonthFirstAndLastDay() {
+
+        initDefaultParams() {
+            const year = new Date().getFullYear();
+            this.currentYear = year + ''
+            const currMonth = new Date().getMonth() + 1;
+            // 获取当前月度:
+            this.month = currMonth + '';
+            // 获取当前季度:
+            this.quarter = Math.floor((currMonth % 3 == 0 ? (currMonth / 3) : (currMonth / 3 + 1))) + '';
+            // 获取当前上半年,下半年
+            if (currMonth >= 1 && currMonth <= 6) {
+                this.halfYear = '1'; // 上半年
+            } else if (currMonth >= 7 && currMonth <= 12) {
+                this.halfYear = '2'; // 下半年
+            }
+
+            
+            this.params.cycleValue = this.month
+
             const today = new Date();
-            const year = today.getFullYear();
             const month = today.getMonth(); // 月份从 0 开始,需要加 1
 
             // 获取当月第一天
@@ -384,11 +410,12 @@ export default {
             // 获取当月最后一天
             const lastDay = new Date(year, month + 1, 0); // 下个月的第 0 天是当前月的最后一天
             const lastDayStr = this.formatDate(lastDay);
-            // console.log(firstDayStr)
-            // console.log(lastDayStr)
-            
-            return [firstDayStr, lastDayStr];
 
+            this.dateRange = [firstDayStr, lastDayStr]
+
+            this.params.startDate = firstDayStr
+            this.params.endDate = lastDayStr
+            this.getRecords()
         },
 
         formatDate(date) {
@@ -400,34 +427,25 @@ export default {
 
         // 周期筛选
         changeCycleType(v) {
-            // 定义
+            // 定义
             if (v == '0') { 
-                console.log("未定义")
-                this.params.startDate = ''
-                this.params.endDate = ''
+                this.params.startDate = this.dateRange[0]
+                this.params.endDate = this.dateRange[1]
             // 年度
             } else if (v == '1') {
-                console.log("年度")
-                this.params.year = this.currentYear
-                this.cycleValue = ''
+                this.params.cycleValue = ''
                 if ('cycleValue' in this.params) delete this.params.cycleValue
             // 半年度
             } else if (v == '2') {
-                console.log("半年度")
-                this.params.year = this.currentYear
-                this.params = { ...this.params, cycleValue: this.cycleValue }
+                this.params.cycleValue = this.halfYear
             // 季度
             } else if (v == '3') {
-                console.log("季度")
-                this.params.year = this.currentYear
-                this.params = { ...this.params, cycleValue: this.cycleValue }
+                this.params.cycleValue = this.quarter
             // 月度
             } else if (v == '4') {
-                console.log("月度")
-                this.params.year = this.currentYear
-                this.params = { ...this.params, cycleValue: this.cycleValue }
+                this.params.cycleValue = this.month
             }
-            this.getRecords();
+            
         },
 
         // 日期控件筛选
@@ -437,24 +455,32 @@ export default {
                 this.dateRange[1] = v[1]
                 this.params.startDate = v[0]
                 this.params.endDate = v[1]
-                this.cycleValue = ''
+                this.params.cycleValue = ''
                 if ('cycleValue' in this.params) delete this.params.cycleValue
-                this.getRecords();
             }
         },
 
         // 年份筛选
         changeYear(v) {
             this.params.year = v;
-            this.params.startDate = ''
-            this.params.endDate = ''
-            this.getRecords();
+        },
+
+        // 上/下半年选择
+        changeHalfYear(v) {
+            this.halfYear = v;
+            this.params.cycleValue = v;
+        }, 
+
+        // 季度选择
+        changeQuarter(v) {
+            this.quarter = v;
+            this.params.cycleValue = v;
         },
 
         // 月份筛选
-        changeCycleValue(v) {
-            this.params = { ...this.params, cycleValue: this.cycleValue }
-            this.getRecords();
+        changeMonth(v) {
+            this.month = v;
+            this.params.cycleValue = v;
         },
 
         //部门选择
@@ -476,8 +502,14 @@ export default {
             this.getRecords();
         },
 
+        changeDeptName(v) {
+            this.params.deptIds = this.selectedDeptIds.toString();
+            this.getRecords();
+        },
+
         // 员工筛选
         changeEmployeeIds(v) {
+            console.log(v)
             this.selectEmployeeId = v
             this.applyFilters();
         },
@@ -517,26 +549,18 @@ export default {
             else return "--"
         },
 
-        // 隐藏部门菜单
-        toggle() {
-            this.isFold = !this.isFold
-        },
 
-        // 还原部门菜单
-        back() {
-            this.isLeftShow = true;
-            this.isRightShow = false;
+        doSearch() {
+            this.getRecords();
         },
 
-
-
         filterNode(value, data) {
             if (!value) return true;
             return data.label.indexOf(value) !== -1;
         },
+
         handleNodeClick(node) {
             this.dept_select_id = node.id
-            
         },
         
 
@@ -562,28 +586,37 @@ export default {
             // console.log(endOfMonth); // 输出当前月的结束时间
             this.params.startDate = startOfMonth
             this.params.endDate = endOfMonth
-            this.params.year = this.currentYear + ''
-            this.cycleValue = this.currentMonth + ''
-            // console.log("当前月" + this.cycleValue);
-            this.params = { ...this.params, cycleValue: this.cycleValue }
+            // this.params.year = this.currentYear + ''
+            this.params.cycleValue = this.currentMonth + ''
+            this.month = this.currentMonth + ''
             this.getRecords();
         },
-
-        
         
         // 获取表格数据
         getRecords() {
-            this.loading = true
-            this.filteredData = []
-            this.tableData = []
-            let url = `/performance/statistics/reviews/${this.user_info.site_id}`
-            this.$axiosUser("get", url, this.params).then(res => {
+            this.loading = true;
+            this.filteredData = [];
+            this.tableData = [];
+            this.deptList = [];
+            this.employees = [];
+            let url = `/performance/statistics/reviews/${this.user_info.site_id}`;
+            let requestParams;
+            if (this.params.cycleType !== '0') { 
+                this.params.startDate = '';
+                this.params.endDate = '';
+                requestParams = { ...this.params, year: this.currentYear };
+            // 周期类型为自定义不用传年份
+            } else if (this.params.cycleType == '0') {
+                delete this.params.cycleValue
+                requestParams = { ...this.params };
+            }
+            this.$axiosUser("get", url, requestParams).then(res => {
                 this.tableData = res.data.data.list;
-                this.filteredData = this.tableData
+                this.filteredData = this.tableData;
                 this.filteredData.forEach(item => {
                     item.date = this.formatDate(item.startTime) + "至" + this.formatDate(item.endTime)
                 })
-
+  
                 let deptMap = JSON.parse(localStorage.getItem("SET_EMPLOYEE_MAP"));
                 if (Object.keys(deptMap) && Object.keys(deptMap).length > 0) {
                     this.filteredData.forEach(item => {
@@ -599,6 +632,23 @@ export default {
                 this.generalizeList[2].val = this.tableData.filter(item => item.status == 0).length // 进行中人数
                 this.generalizeList[3].val = this.tableData.filter(item => item.status == 2).length // 面谈中人数
                 this.applyFilters();
+                this.filteredData.forEach(item => {
+                    this.employees.push({ id: item.employeeId, name: item.employeeName })
+                    if (item.department && item.department.length > 0) {
+                        item.department.forEach(dep => {
+                            this.deptList.push(
+                                {
+                                    id: dep.dept_id,
+                                    name: dep.dept_name
+                                }
+                            )
+                        })
+                       
+                    }
+                })
+
+                // 数组去重
+                this.deptList = Array.from(new Set(this.deptList.map(JSON.stringify))).map(JSON.parse);
                 this.loading = false;
             })
         },
@@ -747,7 +797,9 @@ export default {
         },
 
         // 关闭绩效弹框回调事件
-        handleClose() {}
+        handleClose() {
+            this.getRecords();
+        }
     }
 };
 </script>
@@ -768,7 +820,6 @@ export default {
     height: 100%;
     border-radius: 5px;
 
-
     .main-content {
         width: 100%;
         height: 100%;
@@ -860,6 +911,5 @@ export default {
         }
     }
 
-
 }
 </style>

+ 16 - 11
src/newPerformance/components/PublicComp/AIAssistant.vue

@@ -25,7 +25,7 @@
                                 <div class="triangle"></div>
                                 <p class="question">{{ message.question }}</p>
                             </div>
-                            <img :src="userInfo.img_url" class="avatar user-avatar" alt="用户头像" />
+                            <img :src="userInfo.img_url || 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'" class="avatar user-avatar" alt="用户头像" />
                         </div>
 
 
@@ -41,12 +41,11 @@
                     </div>
                 </div>
                 <div class="chat-footer">
-                    <el-textarea></el-textarea>
-                    <el-input type="textarea" resize="none" :rows="3" v-model="text" @keyup.enter.native="send"
-                        placeholder="输入您的问题..."></el-input>
+                    <el-input type="textarea" resize="none" :rows="3" v-model="text" 
+                        :placeholder="placeholderTxt" :disabled="loading"></el-input>
 
-                    <el-button style="margin-top: 10px;" :loading="loading" type="primary" icon="el-icon-position" @click="send"
-                            size="mini">发送</el-button>
+                    <el-button style="margin-top: 10px;" :loading="loading" type="primary" icon="el-icon-position"
+                        @click="send" size="mini">发送</el-button>
                 </div>
             </div>
         </transition>
@@ -87,7 +86,8 @@ export default {
             text: "",
             isChatOpen: false,
             messages: [],
-            newMessage: ""
+            newMessage: "",
+            placeholderTxt: "请输入您的问题..."
         };
     },
 
@@ -105,8 +105,11 @@ export default {
             if (this.loading || !this.text) return;
             if (this.es) this.es.close();
             this.loading = true;
-
-            this.es = new EventSource(`https://new.gdy.g107.com/ai/common/customer/service?prompt=${this.text}`);
+            this.placeholderTxt = "请稍等,正在搜索答案..."
+            let url = process.env.BASE_API + `/ai/common/customer/service?prompt=${this.text}`
+            this.es = new EventSource(url, {
+                heartbeatTimeout: 5000, // 设置超时时间为2分钟
+            });
 
             this.es.onmessage = (event) => {
                 if (!event.data) return;
@@ -115,7 +118,7 @@ export default {
                     this.es.close();
                     this.es = null;
                     this.loading = false;
-                    this.value = "";
+                    this.placeholderTxt = "请输入您的问题..."
                     // console.log(this.messages);
                     return;
                 }
@@ -148,6 +151,7 @@ export default {
                 }
 
                 this.text = ''
+                
                 this.$nextTick(() => {
                     this.scrollToBottom();
                 });
@@ -156,6 +160,7 @@ export default {
 
             this.es.onerror = (event) => {
                 console.error(event)
+                this.loading = false;
                 this.messages.push({
                     id: 'no_answer',
                     sourceContent:  '',
@@ -164,7 +169,7 @@ export default {
                     reasoningContent: '',
                     question: this.text
                 })
-
+                this.text = '';
                 this.es.close();
             }
         },

+ 1 - 53
src/newPerformance/components/PublicComp/ShowHanderDialog2.vue

@@ -369,58 +369,6 @@
 
                     </template>
 
-                    <!-- <template v-if="node.type === 'cc'">
-                        <template v-if="node.enable">
-                            <li class="title" :class="showData.businessStatus === 'cc' ? 'active' : ''">
-                                7.抄送{{ showData.businessStatus === 'cc' ? '(进行中)' : '' }}
-                            </li>
-                            <li class="info-box">
-                                <div class="line"></div>
-                                <div class="content" v-if="node.tasks && node.tasks.length > 0">
-                                    <div class="content-info">
-                                        <div class="user-type">
-                                            {{ node.assigneeType | filterType }}
-                                        </div>
-                                        <div class="task-info" v-for="task in node.tasks" :key="task.taskId">
-                                            <div class="info">
-                                                <div class="info-left">
-                                                    <span
-                                                        :class="task.state === 'created' ? 'orange-color' : 'green-color'">
-                                                        {{ task.state === 'created' ? '进行中' : '已完成' }},
-                                                    </span>
-                                                    {{ task.assigneeName }}
-                                                </div>
-                                                <div class="info-right" v-if="task.comment">
-                                                    <el-tooltip effect="dark" placement="right">
-                                                        <div v-html="task.comment" slot="content"
-                                                            style="max-width: 300px">
-                                                        </div>
-                                                        <div class="oneLine">意见:{{ task.comment || '暂无意见' }}</div>
-                                                    </el-tooltip>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                                <div class="content" v-else>
-                                    未开始
-                                </div>
-                            </li>
-                        </template>
-                        <template v-if="!node.enable">
-                            <li class="title">7.抄送</li>
-                            <li class="info-box">
-                                <div class="line"></div>
-                                <div class="content">
-                                    未启用
-                                </div>
-                            </li>
-                        </template>
-
-
-                    </template> -->
-
-
                 </template>
 
 
@@ -637,7 +585,7 @@ export default {
                         align-items: center;
                         justify-content: space-between;
                         .info-right {
-                            width: 120px;
+                            width: 200px;
                         }
                     }
                 }

+ 62 - 0
src/newPerformance/components/PublicComp/VerifyDialog copy.vue

@@ -0,0 +1,62 @@
+<template>
+    <el-dialog title="请完成验证" :visible.sync="verifyDialogVisible" width="600px" :before-close="dialogBeforeClose"
+        append-to-body @open="refreshVerify()" :close-on-press-escape="false" :close-on-click-modal="false">
+        <div class="dialog-box flex-center-center">
+            <Verify ref="verify" @success="onVerifySuccess" @error="onVerifyError" :type="3"></Verify>
+        </div>
+
+    </el-dialog>
+</template>
+
+<script>
+import Verify from 'vue2-verify'
+export default {
+    components: {
+        Verify
+    },
+    model: {
+        prop: 'verifyDialogVisible',
+        event: 'close-dialog'
+    },
+    props: {
+        verifyDialogVisible: {
+            type: Boolean,
+            default: false
+        },
+    },
+    methods: {
+        onVerifySuccess(obj) {
+            // 你可以在这里添加成功后的逻辑
+            console.log('验证成功')
+            this.$emit('close-dialog', false)
+            setTimeout(() => {
+                this.$emit('success')
+            }, 500)
+            
+            
+        },
+        onVerifyError(obj) {
+            // 你可以在这里添加失败后的逻辑
+            console.log('验证失败')
+            this.$emit('error')
+            obj.refresh() // 刷新验证码
+        },
+
+        refreshVerify() {
+            this.$refs.verify && this.$refs.verify.refresh(); // 调用第三方库的刷新方法
+        },
+
+        dialogBeforeClose() {
+            this.$emit('close-dialog', false)
+        },
+    }
+}
+</script>
+
+<style scoped lang="scss">
+    .dialog-box {
+        width: 100%;
+        height: 120px;
+    }
+</style>
+

+ 62 - 0
src/newPerformance/components/PublicComp/VerifyDialog.vue

@@ -0,0 +1,62 @@
+<template>
+    <el-dialog title="请完成验证" :visible.sync="verifyDialogVisible" width="600px" :before-close="dialogBeforeClose"
+        append-to-body @open="refreshVerify()" :close-on-press-escape="false" :close-on-click-modal="false">
+        <div class="dialog-box flex-center-center">
+            <Verify ref="verify" @success="onVerifySuccess" @error="onVerifyError" :type="3"></Verify>
+        </div>
+
+    </el-dialog>
+</template>
+
+<script>
+import Verify from 'vue2-verify'
+export default {
+    components: {
+        Verify
+    },
+    model: {
+        prop: 'verifyDialogVisible',
+        event: 'close-dialog'
+    },
+    props: {
+        verifyDialogVisible: {
+            type: Boolean,
+            default: false
+        },
+    },
+    methods: {
+        onVerifySuccess(obj) {
+            // 你可以在这里添加成功后的逻辑
+            console.log('验证成功')
+            this.$emit('close-dialog', false)
+            setTimeout(() => {
+                this.$emit('success')
+            }, 500)
+            
+            
+        },
+        onVerifyError(obj) {
+            // 你可以在这里添加失败后的逻辑
+            console.log('验证失败')
+            this.$emit('error')
+            obj.refresh() // 刷新验证码
+        },
+
+        refreshVerify() {
+            this.$refs.verify && this.$refs.verify.refresh(); // 调用第三方库的刷新方法
+        },
+
+        dialogBeforeClose() {
+            this.$emit('close-dialog', false)
+        },
+    }
+}
+</script>
+
+<style scoped lang="scss">
+    .dialog-box {
+        width: 100%;
+        height: 120px;
+    }
+</style>
+

+ 3 - 3
src/newPerformance/components/ResultAnalysis.vue

@@ -332,7 +332,7 @@ export default {
                 { value: '3', label: '季度', leaf: false, children: [] },
                 { value: '2', label: '半年度', leaf: false, children: [] },
                 { value: '1', label: '年度', leaf: false, children: [] },
-                { value: '0', label: '定义', leaf: false, children: [] },
+                { value: '0', label: '定义', leaf: false, children: [] },
             ], //
             props: {
                 value: 'value',
@@ -398,7 +398,7 @@ export default {
                 let obj = this.chooseChildren.find(child => child.value == this.headValue[1])
                 if (obj) {
                     let value = ''
-                    if (this.headValue[0] && this.headValue[0] == '0') value = "定义 / "
+                    if (this.headValue[0] && this.headValue[0] == '0') value = "定义 / "
                     if (this.headValue[0] && this.headValue[0] == '1') value = "年度 / "
                     if (this.headValue[0] && this.headValue[0] == '2') value = "半年度 / "
                     if (this.headValue[0] && this.headValue[0] == '3') value = "季度 / "
@@ -526,7 +526,7 @@ export default {
                 return
             }
             this.loading = true
-            // 周期种类 0-定义 1-年度 2-半年度 3-季度 4-月度
+            // 周期种类 0-定义 1-年度 2-半年度 3-季度 4-月度
             let url = `/performance/statistics/cycle/info/${this.user_info.site_id}/${cycle}`
             this.$axiosUser("get", url, {}).then(res => {
                 this.loading = false;

+ 139 - 3
src/newPerformance/components/TemplateDetails/BatchHandleNode.vue

@@ -2,7 +2,104 @@
     <div>
         <el-dialog :title="dialogTitle" center :visible.sync="batchHandleDialog" width="600px"
             :before-close="handleCloseDialog">
-            <div v-if="currentNode">
+            <div v-if="currentNode" style="position: relative;">
+
+                <el-popover v-if="dialogTitle == '评分'" ref="popoverRef" placement="bottom" trigger="hover">
+                    <template #reference>
+                        <el-link v-if="dialogTitle == '评分'" type="primary" class="reference">
+                            <i class="el-icon-s-opportunity"></i>
+                            评分示例
+                        </el-link>
+                    </template>
+
+                    <div>
+                        <p>1、评分节点设置多人评分时,在默认的权重100%状态下,各评价人的评价权重自动均分。</p>
+                        <p>举例说明:</p>
+                        <table class="base-table">
+                            <thead>
+                                <tr>
+                                    <th>评分人</th>
+                                    <th>负责人</th>
+                                    <th>评分</th>
+                                    <th>评分权重</th>
+                                    <th>公式</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <tr>
+                                    <td>管理员</td>
+                                    <td>一级管理员</td>
+                                    <td>90</td>
+                                    <td>100%</td>
+                                    <td rowspan="3">
+                                        (90 + 100 + 80) / 3 = 90
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>指定人</td>
+                                    <td>张三</td>
+                                    <td>100</td>
+                                    <td>100%</td>
+                                </tr>
+                                <tr>
+                                    <td>指定人</td>
+                                    <td>李四</td>
+                                    <td>80</td>
+                                    <td>100%</td>
+                                </tr>
+
+                                <tr>
+                                    <td>指标最终得分</td>
+                                    <td colspan="4">90</td>
+                                </tr>
+                            </tbody>
+                        </table>
+
+                        <p>2、系统支持不同的评价人设置不同的评价权重,最终指标得分=(各评分人分数*评价权重)之和</p>
+                        <p>举例说明:</p>
+                        <table class="base-table">
+                            <thead>
+                                <tr>
+                                    <th>评分人</th>
+                                    <th>负责人</th>
+                                    <th>评分</th>
+                                    <th>评分权重</th>
+                                    <th>加权得分</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <tr>
+                                    <td>管理员</td>
+                                    <td>一级管理员</td>
+                                    <td>90</td>
+                                    <td>50%</td>
+                                    <td>45</td>
+                                </tr>
+                                <tr>
+                                    <td>指定人</td>
+                                    <td>张三</td>
+                                    <td>100</td>
+                                    <td>30%</td>
+                                    <td>30</td>
+
+                                </tr>
+                                <tr>
+                                    <td>指定人</td>
+                                    <td>李四</td>
+                                    <td>80</td>
+                                    <td>20%</td>
+                                    <td>16</td>
+                                </tr>
+
+                                <tr>
+                                    <td colspan="4">指标最终得分</td>
+                                    <td>90</td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <p>公式:90×50%+100×30%+80×20%=91分</p>
+                    </div>
+                </el-popover>
                 <el-alert class="bounce animated" type="warning" :title="alertTilte" :closable="false" show-icon
                     style="width: 100%; margin-top: 10px;"></el-alert>
                 <el-form ref="form" label-width="80px" size="small">
@@ -180,7 +277,8 @@
                     <el-form-item v-if="['确认目标', '评分', '审批'].includes(dialogTitle)" label="允许">
                         <el-checkbox-group v-model="currentNode.children[childIndex].allows"
                             :disabled="!currentNode.enable">
-                            <el-checkbox-button v-if="['确认目标'].includes(dialogTitle)" label="edit">修改指标</el-checkbox-button>
+                            <el-checkbox-button v-if="['确认目标'].includes(dialogTitle)"
+                                label="edit">修改指标</el-checkbox-button>
                             <el-checkbox-button label="transfer"
                                 v-if="['确认目标', '评分', '审批'].includes(dialogTitle)">转交</el-checkbox-button>
                         </el-checkbox-group>
@@ -255,7 +353,7 @@ export default {
     },
     data() {
         return {
-            alertTilte: "批量设置,所有指标都会共用同一个流程节点",
+            alertTilte: "批量设置,所有指标都会共用同一个流程节点(自评,互评的评分仅仅作为评分的参考,不会影响指标最终的评分)",
             currentNode: null,
             cascaderProps: {
                 multiple: true, // 启用多选
@@ -572,4 +670,42 @@ export default {
         margin: 0 10px 10px 0;
     }
 }
+
+
+.reference {
+    position: absolute;
+    top: -60px;
+    left: 0px;
+}
+
+.base-table {
+    width: 100%;
+    border-collapse: collapse;
+    margin: 10px auto;
+    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+    background-color: #fff;
+}
+
+.base-table th,
+.base-table td {
+    padding: 3px 6px;
+    text-align: center;
+    border-bottom: 1px solid #ddd;
+    box-sizing: border-box;
+}
+
+.base-table th {
+    background-color: #f2f2f2;
+    font-weight: bold;
+}
+
+.base-table td {
+    border-left: 1px solid #ccc;
+}
+
+.base-table tr:hover {
+    background-color: #f5f5f5;
+}
+
+
 </style>

+ 189 - 18
src/newPerformance/components/TemplateDetails/FormulaComp.vue

@@ -1,28 +1,52 @@
 <template>
     <div>
-        <el-dialog v-if="showFormula" title="计算公式" center :visible.sync="showFormula" width="60%" append-to-body :before-close="handleCloseDialog">
-            <div>
+        <el-dialog v-if="showFormula" title="计算公式" center :visible.sync="showFormula" width="60%" append-to-body
+            :before-close="handleCloseDialog">
+            <div class="dialog-box" style="position: relative;">
+
+
+                <!-- <el-link type="primary" class="reference" @click="startGuide()">
+                    <i class="el-icon-s-opportunity"></i>
+                    评分计算公式示例
+                </el-link> -->
+
+                <el-popover ref="popoverRef" placement="bottom" trigger="hover">
+                    <template #reference>
+                        <el-link type="primary" class="reference">
+                            <i class="el-icon-s-opportunity"></i>
+                            评分计算公式示例
+                        </el-link>
+                    </template>
+                    <ReferenceContent />
+                </el-popover>
+
+                <el-alert class="bounce animated" type="warning" :title="alertTilte" :closable="false" show-icon
+                    style="width: 100%; margin-bottom: 10px;"></el-alert>
+
                 <!-- 公式列表 -->
                 <div v-if="tagList && tagList.length > 0" class="handler-list" style="height: 50px;">
-                    <el-tag class="tags" v-for="(item, index) in tagList" :type="currentIndex === index ? '' : 'info'" :key="index" :closable="isEdit"
+                    <el-tag class="tags" :class="'tag-' + index" v-for="(item, index) in tagList"
+                        :type="currentIndex === index ? '' : 'info'" :key="index" :closable="isEdit"
                         @close="handleTagDelete(index)" @click="handleTagClick(index)">
                         {{ '公式' + (index + 1) }}
                     </el-tag>
-                    <el-button icon="el-icon-plus" size="mini" style="margin-bottom: 10px;"
-                        @click="addTagList()" v-if="isEdit"></el-button>
+                    <el-button v-if="isEdit" icon="el-icon-plus" size="mini" style="margin-bottom: 10px;"
+                        @click="addTagList()"></el-button>
                 </div>
 
                 <!-- 编辑公式 -->
                 <el-row :gutter="10">
                     <el-col :span="12">
-                        <el-card style="height: 460px;">
+                        <el-card style="height: 400px;">
                             <div class="container">
                                 <div class="title">
-                                    触发条件
+                                    触发条件<el-link type="primary" style="margin-left: 10px;"
+                                        @click="noCondition()">无触发条件</el-link>
                                 </div>
                                 <div class="content" @click="type = '触发条件'"
                                     :class="type === '触发条件' ? 'black-border' : 'gray-border' ">
-                                    {{ tagList[currentIndex].conditionRemark }}
+                                    {{ tagList[currentIndex].conditionRemark.includes('1 == 1') ? '无 触 发 条 件' :
+                                    tagList[currentIndex].conditionRemark }}
                                 </div>
                             </div>
                             <div class="container">
@@ -36,7 +60,7 @@
                             </div>
                         </el-card>
                     </el-col>
-                    <el-col :span="12" style="height: 460px; display: flex; flex-direction: column;">
+                    <el-col :span="12" style="height: 400px; display: flex; flex-direction: column;">
                         <el-card>
                             <div>
                                 <el-radio-group v-model="type" @change="changeType">
@@ -45,14 +69,20 @@
                                 </el-radio-group>
                             </div>
                             <div class="btn-container">
-                                <el-button v-for="item in fixedProps" @click="isEdit && inputText(item.key)" :key="item.key"
-                                    type="primary">{{ item.name }}</el-button>
+                                <el-button v-for="item in fixedProps" @click="isEdit && inputText(item.key)"
+                                    :key="item.key" type="primary">{{ item.name }}</el-button>
+                            </div>
+
+                            <div v-if="dynamicProps && dynamicProps.length > 0" class="btn-container">
+                                <el-button v-for="item in dynamicProps" @click="isEdit && inputText(item.key)"
+                                    :key="item.key" type="primary">{{ item.name }}</el-button>
                             </div>
 
                             <div class="keyboard">
                                 <div class="keyboard-left">
                                     <div class="item" v-for="item in leftList" :key="item.id"
-                                        :style="{width: item.id == 0 ? '50%' : '25%'}" @click="isEdit && inputText(item.text)">
+                                        :style="{width: item.id == 0 ? '50%' : '25%'}"
+                                        @click="isEdit && inputText(item.text)">
                                         <div :style="{ width: item.id == 0 ? '90%' : '50px' }">
                                             {{ item.text }}
                                         </div>
@@ -88,12 +118,21 @@
 </template>
 
 <script>
+
+import formulaStep from "@/newPerformance/utils/formulaStep"
+import introJs from 'intro.js'
+import 'intro.js/introjs.css'
+import ReferenceContent from "./ReferenceContent.vue";
+
 // id生成器
 function idGenerator() {
     return Date.now() + Math.floor(Math.random() * 10000);
 }
 
 export default {
+    components: {
+        ReferenceContent
+    },
     model: {
         prop: 'showFormula',
         event: 'close-dialog'
@@ -111,6 +150,7 @@ export default {
             type: Array,
             default: () => []
         },
+        
         dynamicProps: {
             type: Array,
             default: () => [],
@@ -122,6 +162,7 @@ export default {
     },
     data() {
         return {
+            alertTilte: "特殊符号介绍: '||'代表或,'&&'代表且,'=='代表等于",
             type: "触发条件", // 单选
             currentIndex: 0,
             tagList: [
@@ -178,9 +219,79 @@ export default {
         }
     },
     mounted() {
+        // this.initStepData()
         this.initData();
     },
     methods: {
+
+        initStepData() {
+            this.tagList = [
+                {
+                    id: idGenerator(),
+                    condition: ['无', '触', '发', '条', '件'],
+                    expression: ['#result', '/', '#target', '*', '#weight'],
+                    conditionRemark: '无 触 发 条 件',
+                    expressionRemark: '结果值 / 目标 * 权重'
+                },
+            ]
+        },
+
+        startGuide() {
+            introJs().setOptions({
+                nextLabel: '下一个',  // 下一个按钮文字
+                prevLabel: '上一个',  // 上一个按钮文字
+                skipLabel: '跳过',    // 跳过按钮文字
+                doneLabel: '立即体验',// 完成按钮文字
+                tooltipClass: 'intro-tooltip', /* 引导说明文本框的样式 */
+                highlightClass: 'intro-highlight', /* 说明高亮区域的样式 */
+                exitOnEsc: true, /* 是否使用键盘Esc退出 */
+                exitOnOverlayClick: false, /* 是否允许点击空白处退出 */
+                keyboardNavigation: true, /* 是否允许键盘来操作 */
+                showBullets: false, /* 是否使用点显示进度 */
+                showProgress: false, /* 是否显示进度条 */
+                scrollToElement: true, /* 是否滑动到高亮的区域 */
+                overlayOpacity: 0.5, // 遮罩层的透明度 0-1之间
+                // positionPrecedence: ['bottom', 'top', 'right', 'left'], /* 当位置选择自动的时候,位置排列的优先级 */
+                disableInteraction: false, /* 是否禁止与元素的相互关联 */
+                hidePrev: true, /* 是否在第一步隐藏上一步 */
+                hidePrev: false,       // 在第一步中是否隐藏上一个按钮
+                hideNext: false,       // 在最后一步中是否隐藏下一个按钮
+                exitOnOverlayClick: false,  // 点击叠加层时是否退出介绍
+                showStepNumbers: false,     // 是否显示红色圆圈的步骤编号
+                disableInteraction: true,   // 是否禁用与突出显示的框内的元素的交互,就是禁止点击
+                showBullets: true,        // 是否显示面板指示点
+                showStepNumbers: true,
+                scrollToElement: true,
+                // 配置内容 steps数组,内部一个对象代表一个步骤
+                steps: formulaStep,
+            }).onexit((e) => {
+                console.log("退出")
+                // this.isDetailBtnShow = false
+            }).oncomplete((e) => {
+                console.log("完成")
+                // this.isDetailBtnShow = false
+            }).onchange(function (targetElement) {
+                // 当切换到新的步骤时触发
+                const currentStep = introJs()._currentStep;
+                // const totalSteps = introJs().steps.length;
+
+                console.log("当前步骤的元素是:", targetElement);
+                console.log("当前步骤的索引是:", currentStep);
+
+                // 判断是点击了“下一步”还是“上一步”
+                if (currentStep > introJs()._previousStep) {
+                    console.log("用户点击了下一步");
+                    // 在这里可以添加点击下一步时的逻辑
+                } else if (currentStep < introJs()._previousStep) {
+                    console.log("用户点击了上一步");
+                    // 在这里可以添加点击上一步时的逻辑
+                }
+
+                // 更新上一个步骤的索引
+                introJs()._previousStep = currentStep;
+            }).start()
+        },
+
         initData() {
             let index = [];
             // 固定属性 目标,权重,结果值
@@ -208,21 +319,36 @@ export default {
                     expressionRemark: this.expRemark(prop.expression || []),
                 };
             });
-            if (this.tagList.length === 0) this.tagList.push({ id: idGenerator(), condition: [], expression: [], conditionRemark: '', expressionRemark: '' });
+            if (this.tagList.length === 0) this.tagList.push({
+                id: idGenerator(),
+                condition: [],
+                expression: [],
+                conditionRemark: '',
+                expressionRemark: ''
+            });
             this.currentIndex = 0;
         },
 
+
         // 单选改变事件
         changeType(v) {
             // console.log(v)
         },
+        // 无条件触发
+        noCondition() {
+            this.tagList[this.currentIndex].condition = ['无', '触', '发', '条', '件']
+            this.tagList[this.currentIndex].conditionRemark = "无 触 发 条 件"
+        },
         // 键盘键入内容
         inputText(content) {
             if (!['delete', 'clear'].includes(content)) {
                 switch (this.type) {
                     case '触发条件':
-                        this.tagList[this.currentIndex].condition.push(this.keyMap[`#${content}`] ? `#${content}` : content);
-                        this.tagList[this.currentIndex].conditionRemark = this.expRemark(this.tagList[this.currentIndex].condition);
+                        if (!this.tagList[this.currentIndex].conditionRemark.includes("无 触 发 条 件")) {
+                            this.tagList[this.currentIndex].condition.push(this.keyMap[`#${content}`] ? `#${content}` : content);
+                            this.tagList[this.currentIndex].conditionRemark = this.expRemark(this.tagList[this.currentIndex].condition);
+                        }
+                        
                         break;
                     case '计算公式':
                         this.tagList[this.currentIndex].expression.push(this.keyMap[`#${content}`] ? `#${content}` : content);
@@ -297,6 +423,14 @@ export default {
 
         // 确定按钮
         submitForm() {
+            if (this.tagList && this.tagList.length > 0) {
+                this.tagList.forEach(item => {
+                    if (item.conditionRemark.includes("无 触 发 条 件")) {
+                        item.condition = ['1', '==', '1']
+                        item.conditionRemark = '1 == 1';
+                    }
+                })
+            }
             this.$emit('onConfirm', this.tagList);
             this.handleCloseDialog();
         }
@@ -305,6 +439,43 @@ export default {
 </script>
 
 <style scoped="scoped" lang="scss">
+
+.base-table {
+    width: 100%;
+    border-collapse: collapse;
+    margin: 20px auto;
+    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+    background-color: #fff;
+}
+
+.base-table th,
+.base-table td {
+    padding: 3px 6px;
+    text-align: center;
+    border-bottom: 1px solid #ddd;
+    box-sizing: border-box;
+}
+
+.base-table th {
+    background-color: #f2f2f2;
+    font-weight: bold;
+}
+
+.base-table tr:hover {
+    background-color: #f5f5f5;
+}
+
+.reference {
+    position: absolute;
+    top: -60px;
+    left: 0px;
+}
+
+.reference-box {
+    width: 600px;
+    height: 600px;
+}
+
 .no-bg {
     background-color: transparent;
     &:hover {
@@ -356,7 +527,7 @@ export default {
     }
     .content {
         width: 100%;
-        height: 170px;
+        height: 130px;
         overflow-y: auto;
         padding: 10px;
         font-size: 18px;
@@ -384,12 +555,12 @@ export default {
 }
 .btn-container {
     display: flex;
-    margin: 40px 0;
+    margin: 16px 0;
 }
 
 .keyboard {
     width: 100%;
-    height: 325px;
+    height: 300px;
     // padding: 10px;
     box-sizing: box-sizing;
     display: flex;

+ 105 - 0
src/newPerformance/components/TemplateDetails/ReferenceContent.vue

@@ -0,0 +1,105 @@
+<template>
+    <div class="reference-box">
+        <strong>如何设置指标自动计算公式?</strong>
+        <el-tabs v-model="activeName" @tab-click="handleClick">
+            <el-tab-pane label="示例一" name="1">
+                <strong>示例一:按【完成率】计分</strong>
+                <p>
+                    业绩指标,权重为20%,目标值是100万,评分规则为实际得分=目标完成比率×权重分(目标完成比率=结果值÷目标值)
+                </p>
+                <img src="@/assets/step/formulaStep/formula1.png" alt="" style="width: 600px; height: 400px;">
+            </el-tab-pane>
+            <el-tab-pane label="示例二" name="2">
+                <strong>示例二:按【超目标递增】或【低于目标递减】计分时</strong>
+                <p>
+                    如:业绩指标,权重为20%,目标值是100万,评分规则为:<br />
+                    1)当结果值等于目标值时,得满分(即权重分);<br />
+                    2)当结果值超过目标,每增加1%,在标准权重分基础上加2分;<br />
+                    3)当目标未达成,每低于目标的1%,在标准权重分基础上扣2分;<br />
+                </p>
+
+                <el-carousel :key="idGenerator()" height="400px" indicator-position="outside" :pause-on-hover="true">
+                    <el-carousel-item>
+                        <img src="@/assets/step/formulaStep/formula2-1.png" alt="" style="width: 600px; height: 400px;">
+                    </el-carousel-item>
+                    <el-carousel-item>
+                        <img src="@/assets/step/formulaStep/formula2-2.png" alt="" style="width: 600px; height: 400px;">
+                    </el-carousel-item>
+                    <el-carousel-item>
+                        <img src="@/assets/step/formulaStep/formula2-3.png" alt="" style="width: 600px; height: 400px;">
+                    </el-carousel-item>
+                </el-carousel>
+            </el-tab-pane>
+            
+            
+            <el-tab-pane label="示例三" name="3">
+                <strong>示例三:按【否定】计分时</strong>
+                <p>
+                    如:安全事故指标,权重为20%,目标为0起。评分规则为:<br />
+                    无出现安全事故,得权重基础分20分,<br />
+                    出现安全事故,此项为0分。
+                </p>
+
+                <el-carousel :key="idGenerator()" height="400px" :pause-on-hover="true" indicator-position="outside">
+                    <el-carousel-item>
+                        <img src="@/assets/step/formulaStep/formula3-1.png" alt="" style="width: 600px; height: 400px;">
+                    </el-carousel-item>
+                    <el-carousel-item>
+                        <img src="@/assets/step/formulaStep/formula3-2.png" alt="" style="width: 600px; height: 400px;">
+                    </el-carousel-item>
+                </el-carousel>
+            </el-tab-pane>
+
+            <el-tab-pane label="示例四" name="4">
+                <strong>示例四:按【区间】计分时</strong>
+                <p>
+                    如客户满意度指标,权重为20%,目标为90%。
+                    完成90%以上得20分,80%~89%得15分,70%~79%得10分,60%~69%以上得5分,60%以下得0分。
+                </p>
+
+                <el-carousel :key="idGenerator()" height="400px" :pause-on-hover="true" indicator-position="outside">
+                    <el-carousel-item>
+                        <img src="@/assets/step/formulaStep/formula4-1.png" alt="" style="width: 600px; height: 400px;">
+                    </el-carousel-item>
+                    <el-carousel-item>
+                        <img src="@/assets/step/formulaStep/formula4-2.png" alt="" style="width: 600px; height: 400px;">
+                    </el-carousel-item>
+                    <el-carousel-item>
+                        <img src="@/assets/step/formulaStep/formula4-3.png" alt="" style="width: 600px; height: 400px;">
+                    </el-carousel-item>
+                    <el-carousel-item>
+                        <img src="@/assets/step/formulaStep/formula4-4.png" alt="" style="width: 600px; height: 400px;">
+                    </el-carousel-item>
+                    <el-carousel-item>
+                        <img src="@/assets/step/formulaStep/formula4-5.png" alt="" style="width: 600px; height: 400px;">
+                    </el-carousel-item>
+                </el-carousel>
+            </el-tab-pane>
+        </el-tabs>
+    </div>
+</template>
+
+
+<script>
+
+
+export default {
+    data() {
+        return {
+            activeName: "1",
+        }
+    },
+    methods: {
+        // id生成器
+
+        idGenerator() {
+            return Date.now() + Math.floor(Math.random() * 10000);
+        },
+
+        handleClick(tab, event) {
+            // console.log(tab, event);
+        },
+    }
+    
+}
+</script>

+ 1 - 3
src/newPerformance/components/TemplateDetails/ResultInput.vue

@@ -223,9 +223,7 @@ export default {
                 // 正在操作的节点
                 if (select.type == this.nodeType) this.currentNode = _.cloneDeep(select)
             })
-            console.log("操作节点")
-            console.log(this.currentNode)
-            this.currentNode.enable = false // 默认禁用
+            
             this.selected_manager_ids = 1;
             this.selected_employee_ids = [];
             this.selected_post_ids = [];

+ 1 - 0
src/newPerformance/components/TemplateDetails/ScoreEachOther.vue

@@ -78,6 +78,7 @@ export default {
     },
     data() {
         return {
+            alertTilte: "互评的评分仅仅作为评分的参考,不会影响指标最终的评分",
             currentNode: null
         }
     },

+ 7 - 4
src/newPerformance/components/TemplateDetails/ScoreSelf.vue

@@ -3,17 +3,19 @@
         <el-dialog :title="dialogTitle" center :visible.sync="scoreEachOther" width="600px"
             :before-close="handleCloseDialog" append-to-body>
             <div v-if="currentNode">
+                <el-alert class="bounce animated" type="warning" :title="alertTilte" :closable="false" show-icon
+                    style="width: 100%; margin-bottom: 10px;"></el-alert>
                 <el-form ref="form" label-width="80px" size="small">
                     <el-form-item label="启用">
                         <el-switch v-model="currentNode.enable"></el-switch>
                     </el-form-item>
-                                      
+
                     <el-form-item label="允许">
                         <el-checkbox-group v-model="currentNode.allows" :disabled="!currentNode.enable">
-                            <el-checkbox-button label="transfer" >转交</el-checkbox-button>
+                            <el-checkbox-button label="transfer">转交</el-checkbox-button>
                         </el-checkbox-group>
-                    </el-form-item> 
-                   
+                    </el-form-item>
+
                 </el-form>
             </div>
             <div slot="footer">
@@ -73,6 +75,7 @@ export default {
     },
     data() {
         return {
+            alertTilte: "自评的评分仅仅作为评分的参考,不会影响指标最终的评分",
             currentNode: null
         }
     },

+ 134 - 2
src/newPerformance/components/TemplateDetails/Scores.vue

@@ -1,7 +1,104 @@
 <template>
     <div>
-        <el-dialog :title="dialogTitle" center :visible.sync="scores" width="600px" :before-close="handleCloseDialog" append-to-body>
-            <div v-if="currentNode">
+        <el-dialog :title="dialogTitle" center :visible.sync="scores" width="600px" :before-close="handleCloseDialog"
+            append-to-body>
+            <div v-if="currentNode" class="dialog-box" style="position: relative;">
+                <el-popover ref="popoverRef" placement="bottom" trigger="hover">
+                    <template #reference>
+                        <el-link type="primary" class="reference">
+                            <i class="el-icon-s-opportunity"></i>
+                            评分示例
+                        </el-link>
+                    </template>
+
+                    <div>
+                        <p>1、评分节点设置多人评分时,在默认的权重100%状态下,各评价人的评价权重自动均分。</p>
+                        <p>举例说明:</p>
+                        <table class="base-table">
+                            <thead>
+                                <tr>
+                                    <th>评分人</th>
+                                    <th>负责人</th>
+                                    <th>评分</th>
+                                    <th>评分权重</th>
+                                    <th>公式</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <tr>
+                                    <td>管理员</td>
+                                    <td>一级管理员</td>
+                                    <td>90</td>
+                                    <td>100%</td>
+                                    <td rowspan="3">
+                                        (90 + 100 + 80) / 3 = 90
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>指定人</td>
+                                    <td>张三</td>
+                                    <td>100</td>
+                                    <td>100%</td>
+                                </tr>
+                                <tr>
+                                    <td>指定人</td>
+                                    <td>李四</td>
+                                    <td>80</td>
+                                    <td>100%</td>
+                                </tr>
+
+                                <tr>
+                                    <td>指标最终得分</td>
+                                    <td colspan="4">90</td>
+                                </tr>
+                            </tbody>
+                        </table>
+
+                        <p>2、系统支持不同的评价人设置不同的评价权重,最终指标得分=(各评分人分数*评价权重)之和</p>
+                        <p>举例说明:</p>
+                        <table class="base-table">
+                            <thead>
+                                <tr>
+                                    <th>评分人</th>
+                                    <th>负责人</th>
+                                    <th>评分</th>
+                                    <th>评分权重</th>
+                                    <th>加权得分</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <tr>
+                                    <td>管理员</td>
+                                    <td>一级管理员</td>
+                                    <td>90</td>
+                                    <td>50%</td>
+                                    <td>45</td>
+                                </tr>
+                                <tr>
+                                    <td>指定人</td>
+                                    <td>张三</td>
+                                    <td>100</td>
+                                    <td>30%</td>
+                                    <td>30</td>
+
+                                </tr>
+                                <tr>
+                                    <td>指定人</td>
+                                    <td>李四</td>
+                                    <td>80</td>
+                                    <td>20%</td>
+                                    <td>16</td>
+                                </tr>
+
+                                <tr>
+                                    <td colspan="4">指标最终得分</td>
+                                    <td>90</td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <p>公式:90×50%+100×30%+80×20%=91分</p>
+                    </div>
+                </el-popover>
                 <el-form ref="form" label-width="80px" size="small">
                     <el-form-item label="启用">
                         <el-switch v-model="currentNode.enable"
@@ -458,4 +555,39 @@ export default {
         margin: 0 10px 10px 0;
     }
 }
+
+.reference {
+    position: absolute;
+    top: -60px;
+    left: 0px;
+}
+
+.base-table {
+    width: 100%;
+    border-collapse: collapse;
+    margin: 10px auto;
+    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+    background-color: #fff;
+}
+
+.base-table th,
+.base-table td {
+    padding: 3px 6px;
+    text-align: center;
+    border-bottom: 1px solid #ddd;
+    box-sizing: border-box;
+}
+
+.base-table th {
+    background-color: #f2f2f2;
+    font-weight: bold;
+}
+
+.base-table td {
+    border-left: 1px solid #ccc;
+}
+
+.base-table tr:hover {
+    background-color: #f5f5f5;
+}
 </style>

+ 0 - 1
src/newPerformance/components/TemplateDetails/TargetConfirms.vue

@@ -247,7 +247,6 @@ export default {
             this.childIndex = this.tagIndex;
             console.log("操作节点")
             console.log(this.currentNode)
-            this.currentNode.enable = false // 默认禁用
             this.currentNode.children.forEach(child => {
                 this.selected_employee_ids = child.assigneeType === 'user' ? child.assigneeIds : [];
                 this.selected_post_ids = child.assigneeType === 'post' ? child.assigneeIds : [];

+ 1 - 1
src/newPerformance/components/TemplateMixedPublish.vue

@@ -374,7 +374,7 @@ export default {
     return {
       userInfo: this.$userInfo(),
       innerVisible:this.showVisible,
-      showTargetSearch:false,
+      showTargetSearch: false,
       okrs:[],
       selectedOkrs:[],
       showTemplateSearch:false,

+ 0 - 2
src/newPerformance/components/UploadPublish.vue

@@ -1100,8 +1100,6 @@ export default {
             this.reviewEmployees.push(employeeItem);
           }
         })
-        console.log("表格数据")
-        console.log(this.reviewEmployees);
         this.closeUpload();
       }
 

+ 231 - 57
src/newPerformance/components/Workbench.vue

@@ -122,7 +122,6 @@
                                         </div>
                                     </div>
 
-
                                 </template>
                                 <noData v-else content="暂无内容" imgW="120px" imgH="80px"></noData>
                             </template>
@@ -131,7 +130,19 @@
                         <div v-if="agencyList && agencyList.length > 0 || plcList && plcList.length > 0"
                             class="fontColorC flex-box-ce more" @click="more()"
                             style="width: 100%; margin: 0px 0; justify-content: flex-end;">
-                            查看更多</div>
+                            <el-popover ref="popoverRef" effect="dark" placement="left" trigger="hover">
+                                <template #reference>
+                                    <el-link type="primary" class="reference">
+                                        查看更多
+                                    </el-link>
+                                </template>
+
+                                <div>
+                                    <strong>查看更多</strong>
+                                    <p style="margin: 5px 0;">每个节点可以点击查看更多,去批量操作</p>
+                                </div>
+                            </el-popover>
+                        </div>
                         <div v-else style="width: 100%; margin: 20px 0;"></div>
 
                         <div v-if="activeName !== 10" class="flex-box-ce" style="justify-content: center; ">
@@ -158,7 +169,7 @@
                             type="text" @click="getTemplateDetails(performInfo.reviewId)">查看考核明细</el-button>
                         <el-tooltip effect="dark" content="教程指引" placement="top">
                             <div class="icon flex-center-center" @click="initStepData()">
-                                <i class="el-icon-document"></i>
+                                <i class="el-icon-document" id="startTour"></i>
                             </div>
                         </el-tooltip>
                     </div>
@@ -178,26 +189,23 @@
                     <div v-if="performInfo" class="flex-box-ce" style=" margin-top: 10px; ">
                         <div class="flex-box-ce"
                             style="width: 100px; height: 80px; margin: 0 auto; justify-content: space-around; flex-direction: column; border-radius: 5px;">
-                            <div class="green-color" style="font-size: 22px; font-weight: 600;">
+                            <div v-if="performInfo.levelName" class="green-color"
+                                style="font-size: 22px; font-weight: 600;">
                                 {{ performInfo.levelName }}
                             </div>
-                            <div class="green-color" style="font-size: 18px; font-weight: 500; ">
+                            <div v-else class="fontColorC" style="font-size: 16px;">
+                                {{ '暂无评级' }}
+                            </div>
+                            <div v-if="performInfo.score" class="green-color"
+                                style="font-size: 18px; font-weight: 500; ">
                                 {{ performInfo.score }}
                             </div>
-                        </div>
-                    </div>
-
-                    <div v-else class="flex-box-ce" style=" margin-top: 10px; ">
-                        <div class="flex-box-ce"
-                            style=" height: 80px; margin: 0 auto; justify-content: space-around; flex-direction: column; border-radius: 5px;">
-                            <div class="fontColorC" style="font-size: 20px; font-weight: 500;">
-                                暂无考核信息
+                            <div v-else class="fontColorC" style="font-size: 16px;">
+                                {{ '暂无评分' }}
                             </div>
-
                         </div>
                     </div>
 
-
                 </div>
 
             </div>
@@ -212,7 +220,7 @@
         <!-- 编辑流程节点 -->
         <EditNodeDialog v-if="dialogData" v-model="dialogVisible" :activeName="activeName" :dialogTitle="dialogTitle"
             :dialogData="dialogData" :node-type="nodeType" @handleSuccess="getNewList"
-            @handleEditSuccess="changeDialogData" />
+            @handleEditSuccess="changeDialogData" @refresh-data="refreshData" />
 
         <!-- 面谈流程节点 -->
         <InterviewNodeDialog v-if="interviewNodeVisible" v-model="interviewNodeVisible" :activeName="activeName"
@@ -238,12 +246,13 @@ import moment from 'moment';
 import { mapGetters } from 'vuex';
 import EditNodeDialog from './Workbench/EditNode';
 import InterviewNodeDialog from './Workbench/InterviewNode';
-import IndicatorList from './Workbench/IndicatorList';
+import IndicatorList from './Workbench/IndicatorList'; // 指标审批列表
 import MyPerformance from './MyPerformance'; // 我的考核
 import workbenchSettingStep from "@/newPerformance/utils/workbenchSettingStep"
+import newWorkbenchSettingStep from "@/newPerformance/utils/new-workbenchSettingStep"
 import introJs from 'intro.js'
 import 'intro.js/introjs.css'
-import { Notification } from 'element-ui';
+
 export default {
     name: 'Workbench',
     components: {
@@ -258,15 +267,15 @@ export default {
             isDetailBtnShow: false,
             day: moment().format('YYYY-MM-DD'),
             editableTabs: [
-                { title: '目标制定', name: '0', num: 0 },
-                { title: '确认目标', name: '1', num: 0 },
-                { title: '录入结果', name: '2', num: 0 },
-                { title: '自评', name: '3', num: 0 },
-                { title: '互评', name: '4', num: 0 },
-                { title: '评分', name: '5', num: 0 },
-                { title: '审批', name: '6', num: 0 },
-                // { title: '面谈', name: '7', num: 0 },
-                { title: '绩效确认', name: '10', num: 0 }
+                // { title: '目标制定', name: '0', num: 0 },
+                // { title: '确认目标', name: '1', num: 0 },
+                // { title: '录入结果', name: '2', num: 0 },
+                // { title: '自评', name: '3', num: 0 },
+                // { title: '互评', name: '4', num: 0 },
+                // { title: '评分', name: '5', num: 0 },
+                // { title: '审批', name: '6', num: 0 },
+                // // { title: '面谈', name: '7', num: 0 },
+                // { title: '绩效确认', name: '10', num: 0 }
             ],
             userInfo: this.$userInfo(),
             total: 0,
@@ -290,7 +299,6 @@ export default {
             name: '', //搜索Name
             pendingList: [], //提供给考核详情上下切换人员列表
             plcList: [],
-            site_info: null,
             detailDialogVisible: false,
             reviewId: '',
             sendEmployeeId: "",
@@ -328,20 +336,85 @@ export default {
     },
 
     computed: {
-        ...mapGetters(['user_info'])
+        ...mapGetters(['site_info', 'user_info']),
+        isNewCompany() {
+            // 新绩效系统上线时间:2025年7月15日
+            const year = 2025;
+            const month = 7; // 注意:月份是从0开始的,7表示8月
+            const day = 5;
+
+            // 创建 Date 对象
+            const date = new Date(year, month - 1, day); // 月份需要减1
+
+            // 获取时间戳(毫秒)
+            const timestamp = date.getTime();
+
+            // 公司创建时间和新系统上线时间对比
+            return this.site_info.create_time * 1000 > timestamp
+        },
+        
     },
+
     activated() {
+        // 新用户
+        if (this.isNewCompany) {
+            this.editableTabs = [
+                { title: '确认目标', name: '1', num: 0 },
+                { title: '录入结果', name: '2', num: 0 },
+                { title: '自评', name: '3', num: 0 },
+                { title: '互评', name: '4', num: 0 },
+                { title: '评分', name: '5', num: 0 },
+                { title: '审批', name: '6', num: 0 },
+            ]
+        } else {
+            this.editableTabs = [
+                { title: '目标制定', name: '0', num: 0 },
+                { title: '确认目标', name: '1', num: 0 },
+                { title: '录入结果', name: '2', num: 0 },
+                { title: '自评', name: '3', num: 0 },
+                { title: '互评', name: '4', num: 0 },
+                { title: '评分', name: '5', num: 0 },
+                { title: '审批', name: '6', num: 0 },
+                // { title: '面谈', name: '7', num: 0 },
+                { title: '绩效确认', name: '10', num: 0 }
+            ]
+        }
         this.getAgencyNum(); // 获取旧系统的待办列表 角标数量
+        this.getNewAgencyNum(); // 获取新系统的待办列表 角标数量
         this.getAgency(); // 获取旧系统的待办列表
         this.getPlc();
     },
     created() {
+        // 新用户
+        if (this.isNewCompany) {
+            this.editableTabs = [
+                { title: '确认目标', name: '1', num: 0 },
+                { title: '录入结果', name: '2', num: 0 },
+                { title: '自评', name: '3', num: 0 },
+                { title: '互评', name: '4', num: 0 },
+                { title: '评分', name: '5', num: 0 },
+                { title: '审批', name: '6', num: 0 },
+            ]
+        } else {
+            this.editableTabs = [
+                { title: '目标制定', name: '0', num: 0 },
+                { title: '确认目标', name: '1', num: 0 },
+                { title: '录入结果', name: '2', num: 0 },
+                { title: '自评', name: '3', num: 0 },
+                { title: '互评', name: '4', num: 0 },
+                { title: '评分', name: '5', num: 0 },
+                { title: '审批', name: '6', num: 0 },
+                // { title: '面谈', name: '7', num: 0 },
+                { title: '绩效确认', name: '10', num: 0 }
+            ]
+        }
         this.getAgencyNum(); // 获取旧系统的待办列表 角标数量
         this.getNewAgencyNum(); // 获取新系统的待办列表 角标数量
         this.getAgency(); // 获取旧系统的待办列表
         this.getMyTemplateList();
-        this.getUserMain()
+        this.getUserMain();
 
+        
     },
     // mounted() {
     //     this.$nextTick(() => {
@@ -380,11 +453,20 @@ export default {
     methods: {
         // 开启教程指引
         initStepData() {
-            setTimeout(() => {
-                this.isDetailBtnShow = true
-                this.startGuide();
-            }, 300)
+            if (this.isNewCompany) {
+                setTimeout(() => {
+                    this.isDetailBtnShow = true
+                    this.startNewGuide();
+                }, 300)
+            } else {
+                setTimeout(() => {
+                    this.isDetailBtnShow = true
+                    this.startGuide();
+                }, 300)
+            }
+            
         },
+
         startGuide() {
             introJs().setOptions({
                 nextLabel: '下一个',  // 下一个按钮文字
@@ -400,7 +482,45 @@ export default {
                 showProgress: false, /* 是否显示进度条 */
                 scrollToElement: true, /* 是否滑动到高亮的区域 */
                 overlayOpacity: 0.5, // 遮罩层的透明度 0-1之间
-                positionPrecedence: ['bottom', 'top', 'right', 'left'], /* 当位置选择自动的时候,位置排列的优先级 */
+                // positionPrecedence: ['bottom', 'top', 'right', 'left'], /* 当位置选择自动的时候,位置排列的优先级 */
+                disableInteraction: false, /* 是否禁止与元素的相互关联 */
+                hidePrev: true, /* 是否在第一步隐藏上一步 */
+                hidePrev: false,       // 在第一步中是否隐藏上一个按钮
+                hideNext: false,       // 在最后一步中是否隐藏下一个按钮
+                exitOnOverlayClick: false,  // 点击叠加层时是否退出介绍
+                showStepNumbers: false,     // 是否显示红色圆圈的步骤编号
+                disableInteraction: true,   // 是否禁用与突出显示的框内的元素的交互,就是禁止点击
+                showBullets: true,        // 是否显示面板指示点
+                // 配置内容 steps数组,内部一个对象代表一个步骤
+                steps: workbenchSettingStep,
+                scrollToElement: true, // 自动滚动到目标元素
+            }).onexit((e) => {
+                this.isDetailBtnShow = false
+                this.startGuide2()
+            }).oncomplete((e) => {
+                this.isDetailBtnShow = false
+                this.startGuide2()
+            }).onbeforechange((e) => {
+            }).start()
+        },
+
+
+        startNewGuide() {
+            introJs().setOptions({
+                nextLabel: '下一个',  // 下一个按钮文字
+                prevLabel: '上一个',  // 上一个按钮文字
+                skipLabel: '跳过',    // 跳过按钮文字
+                doneLabel: '立即体验',// 完成按钮文字
+                tooltipClass: 'intro-tooltip', /* 引导说明文本框的样式 */
+                highlightClass: 'intro-highlight', /* 说明高亮区域的样式 */
+                exitOnEsc: true, /* 是否使用键盘Esc退出 */
+                exitOnOverlayClick: false, /* 是否允许点击空白处退出 */
+                keyboardNavigation: true, /* 是否允许键盘来操作 */
+                showBullets: false, /* 是否使用点显示进度 */
+                showProgress: false, /* 是否显示进度条 */
+                scrollToElement: true, /* 是否滑动到高亮的区域 */
+                overlayOpacity: 0.5, // 遮罩层的透明度 0-1之间
+                // positionPrecedence: ['bottom', 'top', 'right', 'left'], /* 当位置选择自动的时候,位置排列的优先级 */
                 disableInteraction: false, /* 是否禁止与元素的相互关联 */
                 hidePrev: true, /* 是否在第一步隐藏上一步 */
                 hidePrev: false,       // 在第一步中是否隐藏上一个按钮
@@ -410,17 +530,46 @@ export default {
                 disableInteraction: true,   // 是否禁用与突出显示的框内的元素的交互,就是禁止点击
                 showBullets: true,        // 是否显示面板指示点
                 // 配置内容 steps数组,内部一个对象代表一个步骤
-                steps: workbenchSettingStep
+                steps: newWorkbenchSettingStep,
+                scrollToElement: true, // 自动滚动到目标元素
             }).onexit((e) => {
-                console.log("退出")
                 this.isDetailBtnShow = false
+                this.startGuide2()
             }).oncomplete((e) => {
-                console.log("完成")
                 this.isDetailBtnShow = false
+                this.startGuide2()
             }).onbeforechange((e) => {
             }).start()
         },
 
+
+        startGuide2() {
+            introJs().setOptions({
+                steps: [
+                    {
+                        element: '#startTour',
+                        intro: '教程已结束。您可以在点击这里重新开始教程。'
+                    }
+                ],
+                overlayOpacity: 0.5, // 遮罩层的透明度 0-1之间
+                showBullets: false,
+                showProgress: false,
+                showStepNumbers: false,
+                tooltipClass: 'intro-tooltip', /* 引导说明文本框的样式 */
+                highlightClass: 'intro-highlight', /* 说明高亮区域的样式 */
+                exitOnEsc: true, /* 是否使用键盘Esc退出 */
+                exitOnOverlayClick: false, /* 是否允许点击空白处退出 */
+                scrollToElement: true, // 自动滚动到目标元素
+                skipLabel: '知道了',
+                doneLabel: '知道了'
+                
+            }).onexit((e) => {
+            }).oncomplete((e) => {
+            }).onbeforechange((e) => {
+            }).start()
+        },
+
+
         idGeneral() {
             var s = [];
             var hexDigits = "0123456789abcdef";
@@ -495,12 +644,14 @@ export default {
                 let { data: { data: { list, total }, code } } = res;
                 if (code == 1) {
                     if (list && list.length > 0) {
-                        that.performInfo = list.filter(item => item.score > 0)[0] || null;
+                        that.performInfo = list.filter(item => item.status == 1)[0] || null; // 已结束的考核
                         if (that.performInfo && that.performInfo.startTime)
                             that.performInfo.startTime = that.formatDate(that.performInfo.startTime)
                         if (that.performInfo && that.performInfo.endTime)
                             that.performInfo.endTime = that.formatDate(that.performInfo.endTime)
+
                         let deptMap = JSON.parse(localStorage.getItem("SET_EMPLOYEE_MAP"));
+
                         if (Object.keys(deptMap) && Object.keys(deptMap).length > 0) {
                             if (that.performInfo) {
                                 const employeeDetails = deptMap[that.performInfo.employeeId];
@@ -519,9 +670,9 @@ export default {
         more() {
             if (this.activeName == 0 || this.activeName == 10) {
                 if (this.activeName == 0)
-                    this.$router.push({ path: "/backlog?activeName=" + Number(this.activeName + 1) })
+                    this.$router.push({ path: "/backlog?activeName=" + Number(this.activeName + 1), query: { from: "new_system" } })
                 else
-                    this.$router.push({ path: "/backlog?activeName" + Number(this.activeName) })
+                    this.$router.push({ path: "/backlog?activeName" + Number(this.activeName), query: { from: "new_system" } })
             } else {
                 this.$router.push({ path: "/moreNode/" + this.activeName })
             }
@@ -531,6 +682,7 @@ export default {
         handleCateDetailsClose() {
             this.cateDetailsDialog = false
         },
+
         getNewList() {
             this.getAgencyNum(); // 获取旧系统的待办列表 角标数量
             this.getNewAgencyNum(); // 获取新系统的待办列表 角标数量
@@ -543,6 +695,7 @@ export default {
             this.sendEmployeeId = this.user_info.id
             this.detailDialogVisible = true
         },
+        
         closeDialog() {
             this.dialogVisible = false
         },
@@ -557,6 +710,7 @@ export default {
         openUploadPublish() {
             this.showUploadPublish = true;
         },
+
         // 确认删除模板
         confirmDelete(templateId) {
             this.$axiosUser('post', `/performance/template/remove/${this.user_info.site_id}/${templateId}`).then(res => {
@@ -583,7 +737,6 @@ export default {
         },
 
         openAffirm(item) {
-
             this.$router.push({ path: '/affirm', query: { pl_id: item.id, level_name: item.level_name, package_id: item.package_id, from: "new_system" } });
         },
 
@@ -597,7 +750,7 @@ export default {
 
 
         // 关闭绩效弹框回调事件
-        handleClose() { },
+        handleClose() {},
 
 
         openDetail(item) {
@@ -708,37 +861,57 @@ export default {
                             }
                         });
                     }
-
                 }
             }
-
         },
 
+        // 接收子组件操作数据成功的回调,刷新数据
         changeDialogData(data) {
             this.dialogData = data;
         },
+
+        refreshData() {
+            this.getAgencyNum();
+            this.getNewAgencyNum();
+            this.getNewAgency();
+        },
+
         //待办数量
         getAgencyNum() {
             this.$axiosUser('get', '/api/pro/per/package/msg/agency_num', { status: 0 }, 'v2').then(res => {
                 let data = res.data.data;
-                this.editableTabs[0].num = data.target; // 目标制定
-                this.editableTabs[7].num = data.level_confirm; // 绩效确认
-                // this.editableTabs[8].num = data.level_confirm; // 绩效确认
+                if (!this.isNewCompany) {
+                    this.editableTabs[0].num = data.target; // 目标制定
+                    this.editableTabs[7].num = data.level_confirm; // 绩效确认
+                }
+                
             });
         },
 
         getNewAgencyNum() {
             this.$axiosUser('get', `/performance/statistics/job/${this.user_info.site_id}`).then(res => {
                 let data = res.data.data;
-                this.editableTabs[1].num = data.targetConfirm; // 确认目标
-                this.editableTabs[2].num = data.resultInput; // 录入结果
-                this.editableTabs[3].num = data.scoreSelf; // 自评
-                this.editableTabs[4].num = data.scoreEachOther; // 互评
-                this.editableTabs[5].num = data.scores; // 评分
-                this.editableTabs[6].num = data.reviews; // 审批
-                // this.editableTabs[7].num = data.interviews; // 面谈
+                if (this.isNewCompany) {
+                    this.editableTabs[0].num = data.targetConfirm; // 确认目标
+                    this.editableTabs[1].num = data.resultInput; // 录入结果
+                    this.editableTabs[2].num = data.scoreSelf; // 自评
+                    this.editableTabs[3].num = data.scoreEachOther; // 互评
+                    this.editableTabs[4].num = data.scores; // 评分
+                    this.editableTabs[5].num = data.reviews; // 审批
+                    // this.editableTabs[7].num = data.interviews; // 面谈
+                } else {
+                    this.editableTabs[1].num = data.targetConfirm; // 确认目标
+                    this.editableTabs[2].num = data.resultInput; // 录入结果
+                    this.editableTabs[3].num = data.scoreSelf; // 自评
+                    this.editableTabs[4].num = data.scoreEachOther; // 互评
+                    this.editableTabs[5].num = data.scores; // 评分
+                    this.editableTabs[6].num = data.reviews; // 审批
+                    // this.editableTabs[7].num = data.interviews; // 面谈
+                }
+                
             });
         },
+
         //待办
         getNewAgency() {
             this.loading = true;
@@ -755,6 +928,7 @@ export default {
 
         handleSizeChange(val) {
         },
+
         handleCurrentChange(val) {
             this.getAgency();
         },
@@ -818,12 +992,13 @@ export default {
 </script>
 
 
+
+
 <style scoped="scoped" lang="scss">
 .green-color {
     color: #67C23A;
 }
 
-
 .orange-color {
     color: #e6a23c;
 }
@@ -918,7 +1093,6 @@ export default {
         margin-left: 10px;
         padding: 10px;
         box-sizing: border-box;
-
         .title-box {
             display: flex;
             align-items: center;

+ 62 - 38
src/newPerformance/components/Workbench/EditNode.vue

@@ -1,9 +1,10 @@
 <template>
     <div>
         <el-dialog :title="dialogTitle" center :visible.sync="dialogVisible" width="800px"
-            :before-close="dialogBeforeClose">
+            :before-close="dialogBeforeClose" >
             <div class="status-btn-box fadeInDown animated">
-                <el-link type="primary" @click="detailsDialogVisible = true">查看处理详情</el-link>
+                <el-link type="primary" @click="detailsDialogVisible = true">处理详情</el-link>
+                <el-link type="primary" @click="examineLogDialogVisible = true">操作日志</el-link>
             </div>
 
             <div class="dialog-content" v-loading="loading">
@@ -272,8 +273,10 @@
             </div>
 
             <div slot="footer">
-                <el-button v-if="isCreator || getRole1 || isTransfer" @click="showEmployeeSelector = true">转 交</el-button>
-                <el-button v-if="activeName == 6" type="danger" @click="reset" :disabled="isInputFocused">驳 回</el-button>
+                <el-button v-if="isCreator || getRole1 || isTransfer" @click="showEmployeeSelector = true"
+                    :disabled="isInputFocused">转 交</el-button>
+                <el-button v-if="activeName == 6" type="danger" @click="reset" :disabled="isInputFocused">驳
+                    回</el-button>
                 <el-button type="primary" @click="confirmCommentDialog(2)" :disabled="isInputFocused">提 交</el-button>
             </div>
 
@@ -306,9 +309,17 @@
         </el-dialog>
         <!-- 图片查看 -->
 
+        <!-- 操作日志 -->
+        <ExamineLogDialog v-if="examineLogDialogVisible" v-model="examineLogDialogVisible"
+            :reviewId="dialogData.reviewId" :reviewIndicatorId="dialogData.reviewIndicatorId"></ExamineLogDialog>
+
         <!-- 员工选择组件 -->
         <EmployeeSelector :multi="false" :is_filtration_creator="false" :selected="employeeSelectedObj"
-            :isChecKedAll="false" :visible.sync="showEmployeeSelector" @confirm="onEmployeeSelected" />
+            :isChecKedAll="false" :include_self="false" :visible.sync="showEmployeeSelector"
+            @confirm="onEmployeeSelected" />
+
+        <Vcode :show="verifyDialogVisible" @success="verifySuccess" @close="verifyError" />
+
     </div>
 
 </template>
@@ -321,13 +332,17 @@ import cloneDeep from 'lodash.clonedeep';
 import DetailsDialog from "./EditNodeDialog.vue"
 import uploadOss from '@/components/upload';
 import { _debounce } from '@/utils/auth';
-import EmployeeSelector from '@/components/EmployeeSelector';
+import EmployeeSelector from '@/components/EmployeeSelector'; // 员工选择组件
+import ExamineLogDialog from '@/newPerformance/components/MyPerformance/ExamineLog'; // 考核日志
+import Vcode from "vue-puzzle-vcode";
 
 export default {
     components: {
         DetailsDialog,
         uploadOss,
-        EmployeeSelector
+        EmployeeSelector,
+        ExamineLogDialog,
+        Vcode
     },
     model: {
         prop: 'dialogVisible',
@@ -382,6 +397,8 @@ export default {
     },
     data() {
         return {
+            examineLogDialogVisible: false,
+            verifyDialogVisible: false,
             isCreator: this.$supremeAuthority('creator'), // 创始人,总经理
             getRole1: this.$getRole(1), // 绩效主管理员,子管理员
             loading: false,
@@ -536,6 +553,39 @@ export default {
 
     methods: {
 
+        verifySuccess(msg) {
+            // console.log("用户通过了验证")
+            // 用户通过了验证,发起转交请求
+            let url = `/performance/review/job/forward/${this.user_info.site_id}/${this.dialogData.reviewIndicatorId}`
+            let { taskId } = this.dialogData.task
+            let data = {
+                taskId,
+                employeeId: this.employeeSelectedObj.employee[0].id
+            }
+
+            this.loading = true;
+            this.$http.post(url, data).then(res => {
+                let { data, code, message } = res
+
+                if (code == 1) {
+                    this.verifyDialogVisible = false;
+                    this.dialogBeforeClose();
+                    this.closeEmployeeSelector();
+                    this.$message.success('操作成功,已将当前任务转交给《' + this.employeeSelectedObj.employee[0].name + '》');
+                    // this.$emit('handleEditSuccess', data)
+                    this.$emit("refresh-data") // 父组件刷新数据
+                }
+                else this.$message.error(message || '操作失败');
+
+                this.loading = false;
+            })
+        },
+
+        verifyError() {
+            this.verifyDialogVisible = false;
+        },
+
+
         closeEmployeeSelector() {
             this.showEmployeeSelector = false;
         },
@@ -543,35 +593,7 @@ export default {
         onEmployeeSelected(params) {
             console.log(params);
             this.employeeSelectedObj = params;
-            this.$confirm('确定将当前任务转交给《' + params.employee[0].name + '》吗?', {
-                confirmButtonText: '确定',
-                cancelButtonText: '取消',
-                type: 'warning'
-            }).then(() => {
-                let url = `/performance/review/job/forward/${this.user_info.site_id}/${this.dialogData.reviewIndicatorId}`
-                let { taskId } = this.dialogData.task
-                let data = {
-                    taskId,
-                    employeeId: params.employee[0].id
-                }
-
-                this.loading = true;
-                this.$http.post(url, data).then(res => {
-                    let { data, code, message } = res
-
-                    if (code == 1) {
-                        this.$message.success('操作成功,已将当前任务转交给《' + params.employee[0].name + '》');
-                        this.$emit('handleEditSuccess', data)
-                        this.closeEmployeeSelector();
-                    }
-                    else this.$message.error(message || '操作失败');
-
-                    this.loading = false;
-                })
-
-                
-            }).catch(() => { });
-            
+            this.verifyDialogVisible = true;
         },
 
         handleInputTarget(value) {
@@ -614,6 +636,7 @@ export default {
             this.imgUrl = "";
             this.isShowImg = false;
             this.comment = '';
+            // this.$emit("refresh-data")
             this.$emit('close-dialog', false)
         },
 
@@ -633,14 +656,12 @@ export default {
             // 检查触发事件的元素是否是 input
             if (event.target.tagName.toLowerCase() === 'input') {
                 this.isInputFocused = true;
-                console.log('全局:有 input 获得焦点');
             }
         },
         handleGlobalBlur(event) {
             // 检查触发事件的元素是否是 input
             if (event.target.tagName.toLowerCase() === 'input') {
                 this.isInputFocused = false;
-                console.log('全局:input 失去焦点');
             }
         },
 
@@ -896,6 +917,9 @@ export default {
 
 
 <style scoped="scoped" lang="scss">
+.vue-puzzle-vcode {
+    z-index: 99999;
+}
 .status-box {
     padding: 2px;
     display: inline-block;

+ 15 - 17
src/newPerformance/components/Workbench/IndicatorList.vue

@@ -48,14 +48,13 @@
                         >
                         <template v-for="(item, tableIndex) in tableColumn">
 
-                            <el-table-column v-if="item.isShow && item.label === '指标审批状态'" :key="tableIndex"
+                            <el-table-column v-if="item.isShow && item.label === '审批状态'" :key="tableIndex"
                                 :prop="item.prop" :label="item.label" align="center" :min-width="item.width">
                                 <template slot-scope="scope">
-                                    <el-tag v-if="scope.row[item.prop] !== 'end'" type="primary">{{
-                                        scope.row[item.prop] |
-                                        filterNodeStatus }}</el-tag>
-                                    <el-tag v-else type="warning">{{ scope.row[item.prop] |
-                                        filterNodeStatus }}</el-tag>
+                                    <el-tag v-if="scope.row[item.prop] !== 'end'" type="primary">
+                                        {{  scope.row[item.prop] | filterNodeStatus }}
+                                    </el-tag>
+                                    <el-tag v-else type="warning">{{ scope.row[item.prop] | filterNodeStatus }}</el-tag>
                                 </template>
                             </el-table-column>
 
@@ -63,19 +62,19 @@
                                 :prop="item.prop" :label="item.label" align="center" :min-width="item.width">
                                 <template slot-scope="scope">
                                     <el-tag type="info" v-if="!scope.row.result">--</el-tag>
-                                    <el-tag type="success"
-                                        v-if="scope.row.result && Number(scope.row.result - scope.row.target) >= 0">{{
-                                            scope.row.result }}</el-tag>
-                                    <el-tag type="danger"
-                                        v-if="scope.row.result && Number(scope.row.result - scope.row.target) < 0">{{
-                                            scope.row.result }}</el-tag>
+                                    <el-tag type="success" v-if="scope.row.result && Number(scope.row.result - scope.row.target) >= 0">
+                                        {{ scope.row.result }}
+                                    </el-tag>
+                                    <el-tag type="danger" v-if="scope.row.result && Number(scope.row.result - scope.row.target) < 0">
+                                        {{ scope.row.result }}
+                                    </el-tag>
                                 </template>
                             </el-table-column>
 
                             <el-table-column v-else-if="item.isShow && item.label == '周期类型'" :key="tableIndex"
                                 :prop="item.prop" :label="item.label" align="center" :min-width="item.width">
                                 <template slot-scope="scope">
-                                    <el-tag type="info" v-if="scope.row.cycleType == 0">定义</el-tag>
+                                    <el-tag type="info" v-if="scope.row.cycleType == 0">定义</el-tag>
                                     <el-tag type="info" v-if="scope.row.cycleType == 1">年度</el-tag>
                                     <el-tag type="info" v-if="scope.row.cycleType == 2">半年度</el-tag>
                                     <el-tag type="info" v-if="scope.row.cycleType == 3">季度</el-tag>
@@ -83,7 +82,7 @@
                                 </template>
                             </el-table-column>
 
-                            <el-table-column v-else-if="item.isShow && item.label !== '指标审批状态'" :key="tableIndex"
+                            <el-table-column v-else-if="item.isShow && item.label !== '审批状态'" :key="tableIndex"
                                 :prop="item.prop" :label="item.label" align="center" :min-width="item.width">
                                 <template slot-scope="scope">
                                     <el-tooltip class="item" effect="dark" placement="top">
@@ -92,7 +91,6 @@
                                         <div v-if="!flowColumn.includes(item.label)" class="oneLine">
                                             {{ scope.row[item.prop] || '--' }}
                                         </div>
-
                                     </el-tooltip>
                                 </template>
                             </el-table-column>
@@ -114,7 +112,7 @@
                         <el-table-column label="操作" align="center" min-width="120">
                             <template slot-scope="scope">
                                 <el-link id="get-details-btn" type="primary"
-                                    @click="getDetails({ businessStatus: scope.row.businessStatus, reviewId: scope.row.reviewId, nodes: scope.row.flow.nodes, reviewIndicatorId: scope.row.reviewIndicatorId })">指标审批过程</el-link>
+                                    @click="getDetails({ businessStatus: scope.row.businessStatus, reviewId: scope.row.reviewId, nodes: scope.row.flow.nodes, reviewIndicatorId: scope.row.reviewIndicatorId })">审批过程</el-link>
                             </template>
                         </el-table-column>
                     </el-table>
@@ -165,7 +163,7 @@ export default {
                 { label: "周期类型", prop: "cycleType", isShow: true, width: 100 },
                 { label: "目标", prop: "target", isShow: true, width: 100 },
                 { label: "结果值", prop: "result", isShow: true, width: 100 },
-                { label: "指标审批状态", prop: "businessStatus", isShow: true, width: 120 },
+                { label: "审批状态", prop: "businessStatus", isShow: true, width: 120 },
                 { label: "最终评分", prop: "score", isShow: true, width: 100 },
                 { label: "确认目标", prop: "", isShow: false, width: 120 },
                 { label: "录入结果", prop: "", isShow: false, width: 120 },

+ 7 - 7
src/newPerformance/components/Workbench/MoreIndicatorList.vue

@@ -45,7 +45,7 @@
                 <el-table ref="fmeaTableRef" :data="glDataList" v-loading="glLoading"
                     :header-cell-style="{ background: '#f5f7fa' }" border>
                     <template v-for="(item, tableIndex) in tableColumn">
-                        <el-table-column v-if="item.isShow && item.label === '指标审批状态'" :prop="item.prop"
+                        <el-table-column v-if="item.isShow && item.label === '审批状态'" :prop="item.prop"
                             :label="item.label" align="center" :min-width="item.width">
                             <template slot-scope="scope">
                                 <el-tag v-if="scope.row[item.prop] !== 'end'" type="primary">{{ scope.row[item.prop] |
@@ -68,16 +68,16 @@
 
                         <el-table-column v-else-if="item.isShow && item.label == '周期类型'" :prop="item.prop"
                             :label="item.label" align="center" :min-width="item.width">
-                            <!-- 0-定义 1-年度 2-半年度 3-季度 4-月度 -->
+                            <!-- 0-定义 1-年度 2-半年度 3-季度 4-月度 -->
                             <template slot-scope="scope">
-                                <el-tag type="info" v-if="scope.row.cycleType == 0">定义</el-tag>
+                                <el-tag type="info" v-if="scope.row.cycleType == 0">定义</el-tag>
                                 <el-tag type="info" v-if="scope.row.cycleType == 1">年度</el-tag>
                                 <el-tag type="info" v-if="scope.row.cycleType == 2">半年度</el-tag>
                                 <el-tag type="info" v-if="scope.row.cycleType == 3">季度</el-tag>
                                 <el-tag type="info" v-if="scope.row.cycleType == 4">月度</el-tag>
                             </template>
                         </el-table-column>
-                        <el-table-column v-if="item.isShow && item.label !== '指标审批状态'" :prop="item.prop"
+                        <el-table-column v-if="item.isShow && item.label !== '审批状态'" :prop="item.prop"
                             :label="item.label" align="center" :min-width="item.width">
                             <template slot-scope="scope">
 
@@ -91,7 +91,7 @@
                     </template>
 
 
-                    <el-table-column prop="okrs" label="指标过程管控" min-width="100" align="center">
+                    <el-table-column prop="okrs" label="过程管控" min-width="100" align="center">
                         <template slot-scope="scope">
                             <el-link v-if="scope.row.okrs && scope.row.okrs.length > 0" type="primary"
                                 @click="openTargetList(scope.row.okrs)">
@@ -105,7 +105,7 @@
                     <el-table-column label="操作" align="center" min-width="120">
                         <template slot-scope="scope">
                             <el-link type="primary"
-                                @click="getDetails({ reviewId: scope.row.reviewId, nodes: scope.row.flow.nodes, reviewIndicatorId: scope.row.reviewIndicatorId })">指标审批过程</el-link>
+                                @click="getDetails({ reviewId: scope.row.reviewId, nodes: scope.row.flow.nodes, reviewIndicatorId: scope.row.reviewIndicatorId })">审批过程</el-link>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -167,7 +167,7 @@ export default {
                 { label: "周期类型", prop: "cycleType", isShow: true, width: 100},
                 { label: "目标", prop: "target", isShow: true, width: 100},
                 { label: "实际值", prop: "result", isShow: true, width: 100 },
-                { label: "指标审批状态", prop: "businessStatus", isShow: true, width: 150 },
+                { label: "审批状态", prop: "businessStatus", isShow: true, width: 150 },
                 { label: "最终评分", prop: "score", isShow: true, width: 150},
                 { label: "确认目标", prop: "", isShow: false, width: 120},
                 { label: "录入结果", prop: "", isShow: false, width: 120},

+ 24 - 0
src/newPerformance/utils/formulaStep.js

@@ -0,0 +1,24 @@
+
+const formula1 = require("@/assets/step/formulaStep/formula1.png")
+// const formula2 = require("@/assets/step/formulaStep/formula2.png")
+
+export default [
+    
+    {
+        element: '.dialog-box', // 元素
+        title: "示例一: 按【完成率】计分时",
+        intro: `<div class=\'title\'>业绩指标,权重为20%,目标值是100万,评分规则为实际得分=目标完成比率×权重分(目标完成比率=结果值÷目标值)</div>
+        <div style="display: flex; margin-top: 10px;">
+            <img src="` + formula1 + `" alt="" style="width: 1000px; height: 400px;"/>
+        </div>`, // 内容
+    },
+
+    {
+        element: '.dialog-box', // 元素
+        title: "示例一: 按【完成率】计分时",
+        intro: `<div class=\'title\'>业绩指标,权重为20%,目标值是100万,评分规则为实际得分=目标完成比率×权重分(目标完成比率=结果值÷目标值)</div>
+        <div style="display: flex; margin-top: 10px;">
+            <img src="` + formula1 + `" alt="" style="width: 1000px; height: 400px;"/>
+        </div>`, // 内容
+    },
+]

+ 255 - 30
src/newPerformance/utils/indicatorSettingStep.js

@@ -4,23 +4,56 @@ const chooseEmployeeTips = require("@/assets/step/choose-employee-tips.png")
 const publishBtnTipsImg = require("@/assets/step/publish-btn-tips.png")
 const choostIndicatorTipsImg = require("@/assets/step/choose-indicator-tips.png")
 const editDataTipsImg = require("@/assets/step/edit-data-tips.png")
-// choose-employee-tips
+
+
+const targetConfirmTips = require("@/assets/step/templateDetail/targetConfirm.png")
+const resultInputTips = require("@/assets/step/templateDetail/resultInput.png")
+const selfScoreTips = require("@/assets/step/templateDetail/selfScore.png")
+const scoreEachOtherTips = require("@/assets/step/templateDetail/scoreEachOther.png")
+const scoreTips = require("@/assets/step/templateDetail/score.png")
+const reviewTips = require("@/assets/step/templateDetail/review.png")
+const targetConfirmHandleTips1 = require("@/assets/step/target-confirm-handle1.png")
+const targetConfirmHandleTips2 = require("@/assets/step/target-confirm-handle2.png")
+const targetConfirmHandleTips3 = require("@/assets/step/target-confirm-handle3.png")
+const targetConfirmHandleTips4 = require("@/assets/step/target-confirm-handle4.png")
+const targetConfirmHandleTips5 = require("@/assets/step/target-confirm-handle5.png")
+const resultInputHandleTips1 = require("@/assets/step/result-input-handle1.png")
+const resultInputHandleTips2 = require("@/assets/step/result-input-handle2.png")
+const resultInputHandleTips3 = require("@/assets/step/result-input-handle3.png")
+const resultInputHandleTips4 = require("@/assets/step/result-input-handle4.png")
+const resultInputHandleTips5 = require("@/assets/step/result-input-handle5.png")
+
+
+const ccTips = require("@/assets/step/templateDetail/cc.png")
+const calcMethodsTips = require("@/assets/step/templateDetail/calcMethods.png")
+
+
+
 export default [{
     element: '.menu-10-1', // 元素
     title: "先发起考核",
     intro: '<div class=\'title\'>添加被考核人,为每个被考核人添加考核指标,设置指标考核流程,发起考核</div>', // 内容
 }, {
-
-    element: '.method-item', // 元素
+    element: '.method-item0', // 元素
     title: "选择创建方式",
-    intro: '<div class=\'title\'>方式1,快速创建</div>', // 内容
-}, {
+    intro: `<div class=\'title\'>方式1,快速创建</div>
+        <div>可以直接添加指标,编辑指标信息,设置考核人,</div>
+        <div>也可以从指标库中选择已保存的考核信息,考核人员,一键发布</div>`, // 内容
+    }, {
+        element: '.method-item1', // 元素
+        title: "选择创建方式",
+        intro: `<div class=\'title\'>方式2,上传excel文件实现发布考核</div>
+        <div>一次性导入大量绩效考核信息,节省时间和精力。</div>
+        <div>无需依赖系统中的指标库,数据存储在本地独立管理。</div>
+        <div>无需手动添加考核指标信息,考核人员,提升办公效率。</div>
+        <div>美中不足的是,excel中不能配置流程节点信息,解析文件成功后需要手动配置流程节点信息</div>`, // 内容
+    }, {
     element: '.setting-content',
-    title: "具体操作",
-    intro: '<div class=\'title\'>操作方式1:新建指标,手动添加被考核人,添加指标</div><div class=\'content\'>操作方式2:选择指标,从指标库中选择已创建的考核模板导入数据,快速发起</div><div class=\'content\'>以上两种操作方式,任选其一</div>',
+    title: "具体操作 - 方式1:快速创建",
+    intro: '<div class=\'title\'>操作方式1:添加人员,手动添加考核人员,为考核人员添加指标信息</div><div class=\'content\'>操作方式2:选择指标,从指标库中选择已创建的考核模板导入数据,快速发起</div><div class=\'content\'>以上两种操作方式,任选其一</div>',
 }, {
     element: '.add-btn',
-    title: "操作方式1:新建指标",
+    title: "操作方式1:添加人员",
     intro: '<div class=\'title\'>1.选择被考核人</div><div class=\'content\'>2.设置指标信息,设置指标考核流程</div>',
 },
 {
@@ -45,40 +78,232 @@ export default [{
 {
     element: '.choose-process',
     title: "设置指标考核流程",
-    intro: `<div >点击设置考核流程开关</div><div style="display: flex; margin-top: 10px;"><img src="` + chooseProcessTips + `" alt="" style="width: 1200px; height: 200px;"/></div>`,
+    intro: `<div >点击设置考核流程开关</div><div style="display: flex; margin-top: 10px;">
+            <img src="` + chooseProcessTips + `" alt="" style="width: 1200px; height: 200px;"/>
+        </div>`,
     // intro: `<div >点击设置考核流程开关</div><div></div>`,
 },
-{
-    element: '.publish-btn',
-    title: "发起考核",
-    // intro: `<div >点击设置考核流程开关</div><div><img src="` + this.chooseProcessTipsImg + `" alt="" style="width: 1200px; height: 600px;"/></div>`,
-    intro: `<div >设置考核基本信息</div><div>选择考核周期,考核时间</div><div style="display: flex; margin-top: 10px;"><img src="` + publishBtnTipsImg + `" alt="" style="width: 500px; height: 500px;"/></div>`,
+    // {
+    //     element: '.target-node',
+    //     title: "设置指标-目标确认-负责人",
+    //     intro: `<div id="carousel-container" class="carousel">
+    //             <div class="carousel-inner">
+    //                 <div class="carousel-item active">
+    //                     <img src="` + targetConfirmTips + `" style="width: 400px; height: 350px;">
+    //                 </div>
+    //                 <div class="carousel-item">
+    //                     <img src="` + resultInputTips + `" style="width: 400px; height: 350px;">
+    //                 </div>
+    //                 <div class="carousel-item">
+    //                     <img src="` + scoreTips + `" style="width: 400px; height: 350px;">
+    //                 </div>
+    //             </div>
+    //             <button class="prev">Previous</button>
+    //             <button class="next">Next</button>
+    //     </div>`,
+    //     position: 'bottom'
+    // },
+
+    {
+        element: '.target-node',
+        title: "设置指标-目标确认-负责人(主节点)",
+        intro: `<div class=\'title\'>目标设定与计划制定, 管理者与员工共同设定明确的绩效目标,并制定详细的行动计划。</div>
+            <div style="display: flex; margin-top: 10px;">
+                <img src="` + targetConfirmTips + `" alt="" style="width: 350px; height: 300px;"/>
+            </div>`, // 内容
+        position: 'bottom'
+    },
+
+    {
+        element: '.target-node',
+        title: "设置指标-目标确认-负责人(主节点)",
+        intro: `<div class=\'title\'>如果想要多人参与目标确认,目标的数据修改,可添加多个子节点,每个子节点下可以添加多个负责人,子节点按照管理者,指定人员,被考核人,岗位,部门负责人,多种角色区分,设置更灵活</div>
+            <div style="display: flex; margin-top: 10px;">
+                <img src="` + targetConfirmHandleTips1 + `" alt="" style="width: 350px; height: 300px;"/>
+            </div>`, // 内容
+        position: 'bottom'
     },
+
+
+    // {   
+    //     element: '.target-confirm-dialog',
+    //     title: "设置指标-目标确认-负责人(主节点)",
+    //     intro: `<div class=\'title\'>组织管理者(子节点),可设置直接管理员,上级或上上级管理员</div>
+    //     <div style="display: flex; margin-top: 10px;">
+    //             <img src="` + targetConfirmHandleTips1 + `" alt="" style="width: 500px; height: 600px;"/>
+    //         </div>`, // 内容
+    // },
+
+    // {
+    //     element: '.target-confirm-dialog',
+    //     title: "设置指标-目标确认-负责人(主节点)",
+    //     intro: `<div class=\'title\'>指定人员(子节点),直接在员工列表中自由选择,支持姓名搜索</div>
+    //     <div style="display: flex; margin-top: 10px;">
+    //             <img src="` + targetConfirmHandleTips2 + `" alt="" style="width: 500px; height: 600px;"/>
+    //         </div>`, // 内容
+    // },
+
+    // {
+    //     element: '.target-confirm-dialog',
+    //     title: "设置指标-目标确认-负责人(主节点)",
+    //     intro: `<div class=\'title\'>被考核人(子节点),当前登录用户</div>
+    //     <div style="display: flex; margin-top: 10px;">
+    //             <img src="` + targetConfirmHandleTips3 + `" alt="" style="width: 500px; height: 600px;"/>
+    //         </div>`, // 内容
+    // },
+
+    // {
+    //     element: '.target-confirm-dialog',
+    //     title: "设置指标-目标确认-负责人(主节点)",
+    //     intro: `<div class=\'title\'>岗位(子节点),在组织架构中绑定当前岗位的所有人</div>
+    //     <div style="display: flex; margin-top: 10px;">
+    //             <img src="` + targetConfirmHandleTips4 + `" alt="" style="width: 500px; height: 600px;"/>
+    //         </div>`, // 内容
+    // },
+
+    // {
+    //     element: '.target-confirm-dialog',
+    //     title: "设置指标-目标确认-负责人(主节点)",
+    //     intro: `<div class=\'title\'>部门(子节点),在组织架构中,当前部门的负责人</div>
+    //     <div style="display: flex; margin-top: 10px;">
+    //             <img src="` + targetConfirmHandleTips5 + `" alt="" style="width: 500px; height: 600px;"/>
+    //         </div>`, // 内容
+    // },
+    
+    {
+        element: '.resultInput-node',
+        title: "设置指标-录入结果-流程(主节点)",
+        intro: `<div class=\'title\'>录入结果,对员工的绩效进行评估,提供全面、客观的反馈,填写意见指出改进方向。</div>
+            <div style="display: flex; margin-top: 10px;">
+            <img src="` + resultInputTips + `" alt="" style="width: 350px; height: 300px;"/>
+            </div>`, // 内容
+        position: 'bottom'
+    },
+
     {
-        element: '.choose-btn',
-        title: "操作方式2:选择指标",
-        intro: `<div>可以从指标库中选择已有指标,选择被考核人直接发起考核</div><div style="display: flex; margin-top: 10px;"><img src="` + choostIndicatorTipsImg + `" alt="" style="width: 500px; height: 500px;"/></div>`,
+        element: '.resultInput-node',
+        title: "设置指标-录入结果-流程(主节点)",
+        intro: `<div class=\'title\'>录入人可按照管理者,指定人员,被考核人,岗位,部门负责人去设置,只能选择其中的一种,不能自由添加子节点</div>
+            <div style="display: flex; margin-top: 10px;">
+            <img src="` + resultInputHandleTips1 + `" alt="" style="width: 350px; height: 300px;"/>
+            </div>`, // 内容
+        position: 'left'
+
     },
+
+    // {    
+    //     element: '.result-input-dialog',
+    //     title: "设置指标-录入结果-流程(主节点)",
+    //     intro: `<div class=\'title\'>组织管理者(主节点),可设置直接管理员,上级或上上级管理员</div>
+    //         <div style="display: flex; margin-top: 10px;">
+    //         <img src="` + resultInputHandleTips1 + `" alt="" style="width: 500px; height: 600px;"/>
+    //     </div>`, // 内容
+    // },
+
+    // {
+    //     element: '.result-input-dialog',
+    //     title: "设置指标-录入结果-流程(主节点)",
+    //     intro: `<div class=\'title\'>指定人员(主节点),直接在员工列表中自由选择,支持姓名搜索</div>
+    //         <div style="display: flex; margin-top: 10px;">
+    //         <img src="` + resultInputHandleTips2 + `" alt="" style="width: 500px; height: 600px;"/>
+    //     </div>`, // 内容
+    // },
+
+
     // {
-    //     element: '.choose-btn',
-    //     title: "选择指标",
-    //     intro: `<div >也可以从指标库中选择考核模板,直接发起考核</div><div style="display: flex; margin-top: 10px;"><img src="` + choostIndicatorTipsImg + `" alt="" style="width: 500px; height: 500px;"/></div>`,
+    //     element: '.result-input-dialog',
+    //     title: "设置指标-录入结果-流程(主节点)",
+    //     intro: `<div class=\'title\'>被考核人(主节点),当前登录用户</div>
+    //         <div style="display: flex; margin-top: 10px;">
+    //         <img src="` + resultInputHandleTips3 + `" alt="" style="width: 500px; height: 600px;"/>
+    //     </div>`, // 内容
     // },
 
     // {
-    //     element: '.choose-template',
-    //     title: "选择指标库",
-    //     intro: `<div>选择指标库,可选择多个</div><div style="display: flex; margin-top: 10px;"><img src="` + choostIndicatorTipsImg + `" alt="" style="width: 500px; height: 500px;"/></div>`,
+    //     element: '.result-input-dialog',
+    //     title: "设置指标-录入结果-流程(主节点)",
+    //     intro: `<div class=\'title\'>岗位(主节点),在组织架构中绑定当前岗位的所有人</div>
+    //         <div style="display: flex; margin-top: 10px;">
+    //         <img src="` + resultInputHandleTips4 + `" alt="" style="width: 500px; height: 600px;"/>
+    //     </div>`, // 内容
     // },
+
+    // {
+    //     element: '.result-input-dialog',
+    //     title: "设置指标-录入结果-流程(主节点)",
+    //     intro: `<div class=\'title\'>部门负责人(主节点),在组织架构中,当前部门的负责人</div>
+    //         <div style="display: flex; margin-top: 10px;">
+    //         <img src="` + resultInputHandleTips5 + `" alt="" style="width: 500px; height: 600px;"/>
+    //     </div>`, // 内容
+    // },
+
     {
-        element: '.setting-content',
-        title: "数据编辑",
-        intro: `<div class=\'title\'>可手动新建指标,编辑指标信息,可替换被考核考核人</div><div style="display: flex; margin-top: 10px;"><img src="` + editDataTipsImg + `" alt="" style="width: 1200px; height: 500px;"/></div>`,
+        element: '.scoreSelf-node',
+        title: "设置指标-自评-流程",
+        intro: `<div class=\'title\'>启用即开启被考核人自我评分,评价流程。</div><div>评分仅供参考,不会影响考核结果</div><div style="display: flex; margin-top: 10px;"><img src="` + selfScoreTips + `" alt="" style="width: 400px;"/></div>`, // 内容
     },
+
     {
-        element: '.publish-btn',
-        title: "发起考核",
-        // intro: `<div >点击设置考核流程开关</div><div><img src="` + this.chooseProcessTipsImg + `" alt="" style="width: 1200px; height: 600px;"/></div>`,
-        intro: `<div >设置考核基本信息</div><div>选择考核周期,考核时间</div><div style="display: flex; margin-top: 10px;"><img src="` + publishBtnTipsImg + `" alt="" style="width: 500px; height: 500px;"/></div>`,
+        element: '.scoreEachOther-node',
+        title: "设置指标-互评-负责人",
+        intro: `<div class=\'title\'>启用,发起这个考核时,这个考核中的被考核人相互评价,评分。</div><div>评分仅供参考,不会影响考核结果</div><div style="display: flex; margin-top: 10px;"><img src="` + scoreEachOtherTips + `" alt="" style="width: 400px;"/></div>`, // 内容
     },
+
+    {
+        element: '.scores-node',
+        title: "设置指标-评分-流程",
+        intro: `<div class=\'title\'>评分结果为员工提供了明确的绩效反馈,帮助他们了解自己的表现和改进方向</div>
+            <div>评分人和目标确认流程一样,可自由添加子节点,可设置多人,管理者,指定人员,被考核人,岗位负责人,部门负责人,多种方式设置更灵活</div>
+            <div style="display: flex; margin-top: 10px;">
+            <img src="` + scoreTips + `" alt="" style="width: 350px; height: 300px;"/>
+        </div>`, // 内容
+    },
+
+    {
+        element: '.reviews-node',
+        title: "设置指标-审批-流程",
+        intro: `<div class=\'title\'>在最终审批阶段,可以对绩效结果进行综合评估,提供更全面的反馈,确保绩效评估结果的公正性和合理性。</div>
+        <div>审批人和目标确认流程一样,可自由添加子节点,可设置多人,管理者,指定人员,被考核人,岗位负责人,部门负责人,多种方式设置更灵活</div>
+        <div style="display: flex; margin-top: 10px;">
+            <img src="` + reviewTips + `" alt="" style="width: 350px; height: 300px;"/>
+        </div>`, // 内容
+    },
+
+    
+
+{
+    element: '.publish-btn',
+    title: "发起考核",
+    // intro: `<div >点击设置考核流程开关</div><div><img src="` + this.chooseProcessTipsImg + `" alt="" style="width: 1200px; height: 600px;"/></div>`,
+    intro: `<div >设置考核基本信息</div><div>选择考核周期,考核时间</div><div style="display: flex; margin-top: 10px;"><img src="` + publishBtnTipsImg + `" alt="" style="width: 500px; height: 500px;"/></div>`,
+},
+
+{
+    element: '.choose-btn',
+    title: "操作方式2:选择指标",
+    intro: `<div>可以从指标库中选择已有指标,选择被考核人直接发起考核</div><div style="display: flex; margin-top: 10px;"><img src="` + choostIndicatorTipsImg + `" alt="" style="width: 500px; height: 500px;"/></div>`,
+},
+
+// {
+//     element: '.choose-btn',
+//     title: "选择指标",
+//     intro: `<div >也可以从指标库中选择考核模板,直接发起考核</div><div style="display: flex; margin-top: 10px;"><img src="` + choostIndicatorTipsImg + `" alt="" style="width: 500px; height: 500px;"/></div>`,
+// },
+
+// {
+//     element: '.choose-template',
+//     title: "选择指标库",
+//     intro: `<div>选择指标库,可选择多个</div><div style="display: flex; margin-top: 10px;"><img src="` + choostIndicatorTipsImg + `" alt="" style="width: 500px; height: 500px;"/></div>`,
+// },
+{
+    element: '.setting-content',
+    title: "数据编辑",
+    intro: `<div class=\'title\'>可手动新建指标,编辑指标信息,可替换被考核考核人</div><div style="display: flex; margin-top: 10px;"><img src="` + editDataTipsImg + `" alt="" style="width: 1200px; height: 500px;"/></div>`,
+},
+{
+    element: '.publish-btn',
+    title: "发起考核",
+    // intro: `<div >点击设置考核流程开关</div><div><img src="` + this.chooseProcessTipsImg + `" alt="" style="width: 1200px; height: 600px;"/></div>`,
+    intro: `<div >设置考核基本信息</div><div>选择考核周期,考核时间</div><div style="display: flex; margin-top: 10px;"><img src="` + publishBtnTipsImg + `" alt="" style="width: 500px; height: 500px;"/></div>`,
+},
 ]

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است