Browse Source

二期需求完善,待测试

manywhy 3 weeks ago
parent
commit
fa04af344b
57 changed files with 3325 additions and 6918 deletions
  1. 3 0
      package.json
  2. BIN
      src/assets/robot.png
  3. 0 1
      src/components/UserImage.vue
  4. 0 546
      src/newPerformance/components/ExamineContrast copy 2.vue
  5. 0 549
      src/newPerformance/components/ExamineContrast copy 3.vue
  6. 0 537
      src/newPerformance/components/ExamineContrast copy.vue
  7. 2 2
      src/newPerformance/components/IndicatorSetting/PerResultInputSelector.vue
  8. 2 2
      src/newPerformance/components/IndicatorSetting/PerResultInputSelectorOnly.vue
  9. 2 2
      src/newPerformance/components/IndicatorSetting/PerReviewsSelector.vue
  10. 2 2
      src/newPerformance/components/IndicatorSetting/PerReviewsSelectorOnly.vue
  11. 9 18
      src/newPerformance/components/IndicatorSetting/PerScoreEachOtherOnly.vue
  12. 9 18
      src/newPerformance/components/IndicatorSetting/PerScoreSelfOnly.vue
  13. 2 2
      src/newPerformance/components/IndicatorSetting/PerScoresSelector.vue
  14. 2 2
      src/newPerformance/components/IndicatorSetting/PerScoresSelectorOnly.vue
  15. 1 1
      src/newPerformance/components/IndicatorSetting/PerTargetConfirmSelector.vue
  16. 1 1
      src/newPerformance/components/IndicatorSetting/PerTargetConfirmSelectorOnly.vue
  17. 0 1015
      src/newPerformance/components/IndicatorSetting/UploadPublish2 copy.vue
  18. 13 39
      src/newPerformance/components/IndicatorSetting/UploadPublish2.vue
  19. 5 1
      src/newPerformance/components/IndicatorStore.vue
  20. 0 263
      src/newPerformance/components/LevelSetting copy.vue
  21. 2 0
      src/newPerformance/components/LevelSetting.vue
  22. 177 26
      src/newPerformance/components/MyPerformance.vue
  23. 824 0
      src/newPerformance/components/MyPerformance/AddIndicator.vue
  24. 179 0
      src/newPerformance/components/MyPerformance/ExamineLog.vue
  25. 172 0
      src/newPerformance/components/MyPerformance/ResetNode.vue
  26. 1 1
      src/newPerformance/components/OrganizationExamine.vue
  27. 139 0
      src/newPerformance/components/PerformSetting copy 2.vue
  28. 296 0
      src/newPerformance/components/PerformSetting copy 3.vue
  29. 84 0
      src/newPerformance/components/PerformSetting copy.vue
  30. 7 2
      src/newPerformance/components/PerformSetting.vue
  31. 0 164
      src/newPerformance/components/PerformanceInterview copy.vue
  32. 27 17
      src/newPerformance/components/ProcessTracking.vue
  33. 433 0
      src/newPerformance/components/PublicComp/AIAssistant.vue
  34. 10 9
      src/newPerformance/components/PublicComp/ShowData.vue
  35. 0 623
      src/newPerformance/components/PublicComp/ShowHanderDialog2 copy.vue
  36. 31 4
      src/newPerformance/components/PublicComp/ShowHanderDialog2.vue
  37. 6 6
      src/newPerformance/components/TemplateDetails/BatchHandleNode.vue
  38. 23 12
      src/newPerformance/components/TemplateDetails/EditContent.vue
  39. 3 4
      src/newPerformance/components/TemplateDetails/ResultInput.vue
  40. 4 3
      src/newPerformance/components/TemplateDetails/Reviews.vue
  41. 8 51
      src/newPerformance/components/TemplateDetails/ScoreEachOther.vue
  42. 130 0
      src/newPerformance/components/TemplateDetails/ScoreSelf.vue
  43. 3 3
      src/newPerformance/components/TemplateDetails/Scores.vue
  44. 2 2
      src/newPerformance/components/TemplateDetails/TargetConfirms.vue
  45. 43 11
      src/newPerformance/components/Workbench.vue
  46. 0 1007
      src/newPerformance/components/Workbench/EditNode copy.vue
  47. 115 5
      src/newPerformance/components/Workbench/EditNode.vue
  48. 0 486
      src/newPerformance/components/Workbench/IndicatorList copy.vue
  49. 4 4
      src/newPerformance/components/Workbench/IndicatorList.vue
  50. 1 1
      src/newPerformance/components/Workbench/MoreIndicatorList.vue
  51. 0 259
      src/newPerformance/views/Index copy.vue
  52. 9 3
      src/newPerformance/views/Index.vue
  53. 0 1170
      src/newPerformance/views/TemplateDetails copy.vue
  54. 55 41
      src/newPerformance/views/TemplateDetails.vue
  55. 4 2
      src/okr/views/okrIndex.vue
  56. 8 1
      src/performance/views/performanceIndex.vue
  57. 472 0
      src/performance/views/performanceIndex11.vue

+ 3 - 0
package.json

@@ -47,13 +47,16 @@
     "connect": "^3.7.0",
     "date-fns": "^4.1.0",
     "dhtmlx-gantt": "^8.0.6",
+    "dompurify": "^3.2.6",
     "driver.js": "^0.9.8",
     "echarts": "^4.9.0",
     "element-ui": "^2.14.1",
+    "highlight.js": "^11.11.1",
     "i": "^0.3.7",
     "intro.js": "^7.2.0",
     "js-cookie": "^3.0.5",
     "jsencrypt": "^3.2.2",
+    "marked": "^0.8.0",
     "moment": "^2.29.4",
     "node-sass": "^4.14.1",
     "normalize.css": "^8.0.1",

BIN
src/assets/robot.png


+ 0 - 1
src/components/UserImage.vue

@@ -87,7 +87,6 @@ export default {
     // 加载
     name_no() {
       if (this.id) {
-        console.log(this.id)
         let info = this.id && this.$getEmployeeMapItem(Number(this.id)) || { name: '', img_url: '', id: 0 };
         if(info.id){
           let pattern = new RegExp('^[\u4E00-\u9FA5]+');

+ 0 - 546
src/newPerformance/components/ExamineContrast copy 2.vue

@@ -1,546 +0,0 @@
-<template>
-    <div class="contrast-container scroll-bar" style="padding-top: 10px;">
-
-        <div class="flex-box-ce title-box" style="" v-if="selectExamineList && selectExamineList.length > 0">
-            <div class="title">已选择的考核列表:</div>
-            <el-button size="mini" @click="dialogVisible = true">查看更多</el-button>
-        </div>
-
-
-        <div v-if="selectExamineList && selectExamineList.length > 0" class="template-list"
-            style="background: #f7f7f7; padding: 10px 10px 0 0; margin: 0 20px; border-radius: 4px;">
-            <template size="small" v-for="(item, index) in selectExamineList">
-                <el-tag :key="item.reviewPackageId" style="margin: 0 0 10px 10px;" closable
-                    @close="handleTagDelete(index)">
-                    {{ item.title }}
-                </el-tag>
-            </template>
-        </div>
-
-        <div v-else class="flex-box-ce" style="padding: 0 20px;">
-            <el-button size="mini" @click="dialogVisible = true" style="margin-left: auto;">查看更多</el-button>
-        </div>
-
-        <el-tabs v-model="activeName" @tab-click="handleClick"
-            style="width: 100%; padding: 0 20px; box-sizing: border-box;">
-            <el-tab-pane label="表格" name="0">
-                <el-table v-if="userList && userList.length > 0" ref="tableRef" custom-class="openAnimAbcd" id="mytable"
-                    :data="userList" style="width: 100%; " border stripe :header-cell-style="{ background: '#f5f7fa' }"
-                    v-loading="loading">
-                    <el-table-column prop="employeeName" label="姓名" align="center">
-                    </el-table-column>
-                    <el-table-column :label="item.title" v-for="(item, index) in selectExamineList"
-                        :key="item.reviewPackageId" align="center">
-                        <template slot-scope="scope">
-                            <div v-for="user in item.users">
-                                <span v-if="user.employeeId == scope.row.employeeId">{{ user.score }}</span>
-                            </div>
-                        </template>
-                    </el-table-column>
-                </el-table>
-            </el-tab-pane>
-            <el-tab-pane label="地图" name="1" style="width: 100%;">
-                <div v-if="treeData && JSON.stringify(treeData) !== '{}'" class="flex-box-ce scroll-bar"
-                    style="width: 100%; justify-content: center; overflow-x: auto;">
-                    <vue2-org-tree :data="treeData" style="width: 100%;" />
-                </div>
-            </el-tab-pane>
-        </el-tabs>
-
-        <el-dialog title="请选择需要对比的考核列表" center :visible.sync="dialogVisible" width="600px"
-            :before-close="dialogBeforeClose">
-            <div>
-                <div class="search-box">
-                    <el-select v-model="cycleType" placeholder="请选择周期类型" @change="changeCircle" style="width: 100px;"
-                        size="mini">
-                        <el-option v-for="item in cycleOptions" :key="item.value" :label="item.label"
-                            :value="item.value">
-                        </el-option>
-                    </el-select>
-
-                    <el-date-picker v-model="date" type="daterange" align="right" unlink-panels range-separator="至"
-                        start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"
-                        :picker-options="pickerOptions" @change="changeDate" style="width: 300px; margin: 0 10px;"
-                        size="mini">
-                    </el-date-picker>
-
-                    <el-select v-model="status" placeholder="请选择" style="width: 100px;" @change="changeStatus"
-                        size="mini">
-                        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
-                        </el-option>
-                    </el-select>
-
-                    <el-button plain round size="mini" style="margin-left: 10px;" @click="reset">重 置</el-button>
-                </div>
-                <div class="package-list">
-                    <div class="template-list scroll-bar">
-                        <template v-if="examineList && examineList.length > 0">
-                            <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll"
-                                @change="handleCheckAllChange" style="margin-bottom: 10px;">全选</el-checkbox>
-                            <el-checkbox-group v-model="selectExamineIds" size="small" @change="changeSelectExamineIds">
-                                <template v-for="item in examineList">
-                                    <el-checkbox :key="item.reviewPackageId" :label="item.reviewPackageId" border>
-                                        {{ item.title }}
-                                    </el-checkbox>
-                                </template>
-                            </el-checkbox-group>
-                        </template>
-                        <template v-else>
-                            <div class="flex-box-ce" style="justify-content: center;">
-                                <noData content="暂无数据" imgW="120px" imgH="80px"></noData>
-                            </div>
-                        </template>
-                    </div>
-                    <div class="choose-template scroll-bar">
-                        <el-button plain round size="mini" @click="clear">清 空</el-button>
-                        <div class="line"></div>
-                        <template v-for="(item, index) in chooseExamineList">
-                            <div class="flex-box-ce choose-template-item" style="justify-content: space-between;">
-                                <div>{{ item.title }}</div>
-                                <i class="el-icon-close" @click="deleteItem(index)"></i>
-                            </div>
-                        </template>
-                        <div ref="placeholder" style="height: 50px;"></div>
-                    </div>
-                </div>
-
-            </div>
-            <div slot="footer">
-                <el-button @click="dialogVisible = false">取 消</el-button>
-                <el-button type="primary" @click="confirm">确 定</el-button>
-            </div>
-        </el-dialog>
-
-        <div style="height: 50px;"></div>
-    </div>
-</template>
-
-<script>
-import { mapGetters } from 'vuex';
-import moment from 'moment';
-
-export default {
-    data() {
-        return {
-            checkAll: false,
-            isIndeterminate: true,
-            dialogVisible: false,
-            activeName: "0",
-            loading: false,
-            treeData: {},
-            // 周期类型 0-未定义 1-年度 2-半年度 3-季度 4-月度
-            cycleType: '-1',
-            cycleOptions: [
-                { label: "全部", value: '-1' },
-                { label: "未定义", value: '0' },
-                { label: "年度", value: '1' },
-                { label: "半年度", value: '2' },
-                { label: "季度", value: '3' },
-                { label: "月度", value: '4' },
-            ],
-            status: -1,
-            options: [{
-                value: -1,
-                label: '全部'
-            }, {
-                value: '0',
-                label: '未完成'
-            }, {
-                value: '1',
-                label: '已完成'
-            }],
-            params: {
-                startDate: '',
-                endDate: '',
-                status: -1, // 不传默认返回全部 0-未完成 1-已完成
-            },
-
-            pickerOptions: {
-                shortcuts: [{
-                    text: '最近一周',
-                    onClick(picker) {
-                        const end = new Date();
-                        const start = new Date();
-                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-                        picker.$emit('pick', [start, end]);
-                    }
-                }, {
-                    text: '最近一个月',
-                    onClick(picker) {
-                        const end = new Date();
-                        const start = new Date();
-                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-                        picker.$emit('pick', [start, end]);
-                    }
-                }, {
-                    text: '最近三个月',
-                    onClick(picker) {
-                        const end = new Date();
-                        const start = new Date();
-                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-                        picker.$emit('pick', [start, end]);
-                    }
-                }]
-            },
-            date: [],
-            examineList: [], // 考核表列表
-            tableHeader: [],
-            tableData: [],
-            userList: [],
-            selectExamineIds: [],
-            selectExamineList: [],
-            chooseExamineList: []
-        }
-    },
-    // watch: {
-    //     chooseExamineList(v) {
-    //         this.selectExamineList = this.chooseExamineList
-    //     }
-    // },
-    filters: {
-        formatDate(val) {
-            if (val) return moment(val).format('YYYY-MM-DD')
-            else return "--"
-        }
-    },
-    computed: {
-        ...mapGetters(['user_info']),
-        // selectExamineList() {
-        //     return this.examineList.filter(item => this.selectExamineIds.includes(item.reviewPackageId))
-        // }
-    },
-    created() {
-        this.getRecords();
-        this.dialogVisible = true;
-    },
-    methods: {
-        deleteItem(index) {
-            let chooseIndex = this.selectExamineIds.findIndex(select => select == this.chooseExamineList[index].reviewPackageId)
-            this.selectExamineIds.splice(chooseIndex, 1)
-            this.chooseExamineList.splice(index, 1)
-        },
-
-        changeSelectExamineIds(v) {
-            console.log(this.selectExamineIds)
-            if (v && v.length > 0) {
-                this.examineList.forEach(examine => {
-                    this.selectExamineIds.forEach(val => {
-                        if (val == examine.reviewPackageId) this.chooseExamineList.push(examine)
-                    })
-                })
-                this.chooseExamineList = Array.from(new Set(this.chooseExamineList.map(JSON.stringify))).map(JSON.parse);
-            } else {
-                // this.selectExamineIds = []
-            }
-            
-        },
-        handleCheckAllChange(v) {
-
-            if (v) {
-                this.examineList.forEach(examine => {
-                    this.selectExamineIds.push(examine.reviewPackageId)
-                })
-                this.examineList.forEach(examine => {
-                    this.selectExamineIds.forEach(val => {
-                        if (val == examine.reviewPackageId) this.chooseExamineList.push(examine)
-                    })
-                })
-                this.isIndeterminate = true;
-                this.checkAll = true;
-                this.$nextTick(() => {
-                    if (this.$refs.placeholder) this.$refs.placeholder.scrollIntoView(false);
-                })
-            } else {
-                this.selectExamineIds = [];
-                this.isIndeterminate = false;
-                this.checkAll = false;
-                if (this.examineList && this.examineList.length > 0) {
-                    let examineIds = this.examineList.map(item => item.reviewPackageId)
-                    this.chooseExamineList = this.chooseExamineList.filter(choose => !examineIds.includes(choose.reviewPackageId))
-                }
-
-            }
-        },
-
-        chooseExamine(item) {
-            if (this.selectExamineIds.includes(item.reviewPackageId)) {
-                let index = this.selectExamineIds.findIndex(item => item.reviewPackageId);
-                this.selectExamineIds.splice(index, 1)
-            } else {
-                this.selectExamineIds.push(item.reviewPackageId);
-            }
-            if (this.selectExamineIds.length === this.examineList.length) {
-                this.isIndeterminate = true;
-                this.checkAll = true;
-            } else {
-                this.isIndeterminate = false;
-                this.checkAll = false;
-            }
-            if (this.activeName == '0') this.initTableData()
-            if (this.activeName == '1') this.initTreeData()
-        },
-
-        handleTagDelete(index) {
-            // 最后一个不能删除
-            if (this.selectExamineList && this.selectExamineList.length > 1)
-                this.selectExamineList.splice(index, 1)
-        },
-        getRecords() {
-            this.loading = true;
-
-            if (this.status === '-1') this.params.status = '' // 不传默认返回全部
-            else this.params.status = this.status
-            if (this.cycleType == '-1') this.params = { ...this.params }
-            else {
-                this.params = { ...this.params, cycleType: this.cycleType }
-            }
-            this.$axiosUser("get", `/performance/statistics/packages/${this.user_info.site_id}`, this.params).then(res => {
-                this.loading = false;
-                let { data: { data: { list, total }, code } } = res;
-                this.examineList = list;
-                if (this.examineList && this.examineList.length > 0) {
-                    this.examineList.map(item => {
-                        this.chooseExamineList.forEach(choose => {
-                            if (item.reviewPackageId == choose.reviewPackageId)
-                                this.selectExamineIds.push(item.reviewPackageId)
-                        })
-                    })
-                }
-
-                this.treeData = {
-                    id: 0,
-                    label: "考核对比",
-                    children: []
-                }
-                // this.selectExamineIds = [];
-            })
-        },
-        initTableData() {
-            let userList = [];
-            let selectExamineList = [];
-
-            this.examineList && this.examineList.forEach(item => {
-                this.selectExamineIds.forEach(selectExamineId => {
-                    if (item.reviewPackageId == selectExamineId) {
-                        selectExamineList.push(item)
-                    }
-                })
-
-            })
-
-            selectExamineList.forEach(item => {
-                let { reviewPackageId, title, users } = item;
-                if (users && users.length > 0) {
-                    users.forEach(user => {
-                        let { employeeName, employeeId } = user
-                        userList.push({ employeeName, employeeId })
-                    })
-                }
-            })
-            this.userList = userList.reduce((acc, obj) => {
-                // 检查当前对象是否已经存在于结果数组中
-                if (!acc.find(item => item.employeeId === obj.employeeId)) { // 假设我们通过id来判断唯一性
-                    acc.push(obj);
-                }
-                return acc;
-            }, []);
-
-        },
-        initTreeData() {
-            this.selectExamineList.forEach(item => {
-                item.id = Date.now() + Math.floor(Math.random() * 10000);
-                item.label = item.title;
-                item.children = item.users;
-                item.users.forEach(user => {
-                    user.id = Date.now() + Math.floor(Math.random() * 10000);
-                    user.label = user.employeeName + ", " + (user.score ? user.score : 0);
-                })
-            })
-            this.treeData = {
-                id: 0,
-                label: "考核对比",
-                children: this.selectExamineList
-            }
-        },
-        handleClick(tab, event) {
-            if (this.activeName == '0') this.initTableData()
-            if (this.activeName == '1') this.initTreeData()
-        },
-        // 日期选择时间
-        changeDate(v) {
-            if (v && v.length > 0) {
-                this.params.startDate = v[0] || ''
-                this.params.endDate = v[1] || ''
-                this.getRecords();
-            }
-
-        },
-        //选择周期
-        changeCircle(v) {
-            this.getRecords();
-        },
-        // 选择状态
-        changeStatus(v) {
-            this.getRecords();
-        },
-        // 重置搜索条件
-        reset() {
-            this.cycleType = '-1'
-            this.status = -1
-            this.date = []
-            this.params = {
-                startDate: '',
-                endDate: '',
-                status: -1, // 不传默认返回全部 0-未完成 1-已完成
-            }
-            this.getRecords();
-        },
-
-        // 清空选择的考核列表
-        clear() {
-            this.selectExamineIds = [];
-            this.chooseExamineList = [];
-        },
-        dialogBeforeClose() {
-            this.dialogVisible = false;
-        },
-        confirm() {
-            this.selectExamineList = this.chooseExamineList;
-            if (this.activeName == '0') this.initTableData()
-            if (this.activeName == '1') this.initTreeData()
-            this.dialogVisible = false;
-        }
-    },
-
-}
-
-</script>
-
-
-
-<style scoped="scoped" lang="scss">
-.contrast-container {
-    width: 100%;
-    height: 100%;
-    background-color: #fff;
-
-    .el-icon-close {
-        transition: all 0.2s;
-
-        &:hover {
-            font-size: 16px;
-        }
-    }
-
-    .search-box {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        box-sizing: border-box;
-    }
-
-    .title-box {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        margin-bottom: 10px;
-        padding: 0 20px;
-
-        .title {
-            color: #999;
-            font-size: 14px;
-            font-weight: bold;
-        }
-    }
-
-    .package-list {
-        width: 100%;
-        height: 400px;
-        display: flex;
-        margin-top: 10px;
-        border: 1px solid #f7f7f7;
-
-        .template-list {
-            width: 50%;
-            height: 400px;
-            overflow-y: auto;
-            display: flex;
-            flex-direction: column;
-            border-right: 1px solid #f7f7f7;
-            padding: 10px;
-            box-sizing: border-box;
-
-            .el-checkbox-group {
-                width: 100% !important;
-                height: 100% !important;
-
-                .el-checkbox {
-                    margin: 0;
-                    width: 200px;
-                    margin-bottom: 10px;
-                }
-
-            }
-        }
-
-        .choose-template {
-            width: 50%;
-            height: 400px;
-            overflow-y: auto;
-            padding: 10px;
-            box-sizing: border-box;
-
-            .line {
-                width: 90%;
-                height: 1px;
-                background-color: #f7f7f7;
-                margin: 10px auto;
-            }
-
-            &-item {
-                width: 90%;
-                height: 30px;
-                line-height: 30px;
-                padding-left: 10px;
-                border-bottom: 1px solid #f7f7f7;
-                margin: 0 auto 10px auto;
-                box-sizing: border-box;
-            }
-        }
-    }
-
-
-    .table-box {
-        width: 100%;
-        padding: 0 20px;
-        box-sizing: border-box;
-    }
-
-    /* 设置滚动条的宽度和背景色 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
-        width: 10px;
-        height: 10px;
-        background-color: #f9f9f9;
-    }
-
-    /* 设置滚动条滑块的样式 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb {
-        border-radius: 6px;
-        background-color: #c1c1c1;
-    }
-
-    /* 设置滚动条滑块hover样式 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
-        background-color: #a8a8a8;
-    }
-
-    /* 设置滚动条轨道的样式 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-track {
-        box-shadow: inset 0 0 5px rgba(87, 175, 187, 0.1);
-        border-radius: 6px;
-        background: #ededed;
-    }
-
-
-}
-</style>

+ 0 - 549
src/newPerformance/components/ExamineContrast copy 3.vue

@@ -1,549 +0,0 @@
-<template>
-    <div class="contrast-container scroll-bar" style="padding-top: 10px;">
-
-        <div class="flex-box-ce title-box" style="" v-if="selectExamineList && selectExamineList.length > 0">
-            <div class="title">已选择的考核列表:</div>
-            <el-button size="mini" @click="dialogVisible = true">查看更多</el-button>
-        </div>
-
-
-        <div v-if="selectExamineList && selectExamineList.length > 0" class="template-list"
-            style="background: #f7f7f7; padding: 10px 10px 0 0; margin: 0 20px; border-radius: 4px;">
-            <template size="small" v-for="(item, index) in selectExamineList">
-                <el-tag :key="item.reviewPackageId" style="margin: 0 0 10px 10px;" closable
-                    @close="handleTagDelete(index)">
-                    {{ item.title }}
-                </el-tag>
-            </template>
-        </div>
-
-        <div v-else class="flex-box-ce" style="padding: 0 20px;">
-            <el-button size="mini" @click="dialogVisible = true" style="margin-left: auto;">查看更多</el-button>
-        </div>
-
-        <el-tabs v-model="activeName" @tab-click="handleClick"
-            style="width: 100%; padding: 0 20px; box-sizing: border-box;">
-            <el-tab-pane label="表格" name="0">
-                <el-table v-if="userList && userList.length > 0" ref="tableRef" custom-class="openAnimAbcd" id="mytable"
-                    :data="userList" style="width: 100%; " border stripe :header-cell-style="{ background: '#f5f7fa' }"
-                    v-loading="loading">
-                    <el-table-column prop="employeeName" label="姓名" align="center">
-                    </el-table-column>
-                    <el-table-column :label="item.title" v-for="(item, index) in selectExamineList"
-                        :key="item.reviewPackageId" align="center">
-                        <template slot-scope="scope">
-                            <div v-for="user in item.users">
-                                <span v-if="user.employeeId == scope.row.employeeId">{{ user.score }}</span>
-                            </div>
-                        </template>
-                    </el-table-column>
-                </el-table>
-            </el-tab-pane>
-            <el-tab-pane label="地图" name="1" style="width: 100%;">
-                <div v-if="treeData && JSON.stringify(treeData) !== '{}'" class="flex-box-ce scroll-bar"
-                    style="width: 100%; justify-content: center; overflow-x: auto;">
-                    <vue2-org-tree :data="treeData" style="width: 100%;" />
-                </div>
-            </el-tab-pane>
-        </el-tabs>
-
-        <el-dialog title="请选择需要对比的考核列表" center :visible.sync="dialogVisible" width="700px"
-            :before-close="dialogBeforeClose">
-            <div>
-                <div class="search-box">
-                    <el-select v-model="cycleType" placeholder="请选择周期类型" @change="changeCircle" style="width: 100px;"
-                        size="mini">
-                        <el-option v-for="item in cycleOptions" :key="item.value" :label="item.label"
-                            :value="item.value">
-                        </el-option>
-                    </el-select>
-
-                    <el-date-picker v-model="date" type="daterange" align="right" unlink-panels range-separator="至"
-                        start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"
-                        :picker-options="pickerOptions" @change="changeDate" style="width: 300px; margin: 0 10px;"
-                        size="mini">
-                    </el-date-picker>
-
-                    <el-select v-model="status" placeholder="请选择" style="width: 100px;" @change="changeStatus"
-                        size="mini">
-                        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
-                        </el-option>
-                    </el-select>
-
-                    <el-button plain round size="mini" style="margin-left: 10px;" @click="reset">重 置</el-button>
-                </div>
-                <div class="package-list">
-                    <el-transfer v-model="transferValue" :data="transferData" style="margin: 20px auto;"></el-transfer>
-                    <!-- <div class="template-list scroll-bar">
-                        <template v-if="examineList && examineList.length > 0">
-                            <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll"
-                                @change="handleCheckAllChange" style="margin-bottom: 10px;">全选</el-checkbox>
-                            <el-checkbox-group v-model="selectExamineIds" size="small" @change="changeSelectExamineIds">
-                                <template v-for="item in examineList">
-                                    <el-checkbox :key="item.reviewPackageId" :label="item.reviewPackageId" border>
-                                        {{ item.title }}
-                                    </el-checkbox>
-                                </template>
-                            </el-checkbox-group>
-                        </template>
-                        <template v-else>
-                            <div class="flex-box-ce" style="justify-content: center;">
-                                <noData content="暂无数据" imgW="120px" imgH="80px"></noData>
-                            </div>
-                        </template>
-                    </div>
-                    <div class="choose-template scroll-bar">
-                        <el-button plain round size="mini" @click="clear">清 空</el-button>
-                        <div class="line"></div>
-                        <template v-for="(item, index) in chooseExamineList">
-                            <div class="flex-box-ce choose-template-item" style="justify-content: space-between;">
-                                <div>{{ item.title }}</div>
-                                <i class="el-icon-close" @click="deleteItem(index)"></i>
-                            </div>
-                        </template>
-                        <div ref="placeholder" style="height: 50px;"></div>
-                    </div> -->
-                </div>
-
-            </div>
-            <div slot="footer">
-                <el-button @click="dialogVisible = false">取 消</el-button>
-                <el-button type="primary" @click="confirm">确 定</el-button>
-            </div>
-        </el-dialog>
-
-        <div style="height: 50px;"></div>
-    </div>
-</template>
-
-<script>
-import { mapGetters } from 'vuex';
-import moment from 'moment';
-
-export default {
-    data() {
-        return {
-            checkAll: false,
-            isIndeterminate: true,
-            dialogVisible: false,
-            activeName: "0",
-            loading: false,
-            treeData: {},
-            // 周期类型 0-未定义 1-年度 2-半年度 3-季度 4-月度
-            cycleType: '-1',
-            cycleOptions: [
-                { label: "全部", value: '-1' },
-                { label: "未定义", value: '0' },
-                { label: "年度", value: '1' },
-                { label: "半年度", value: '2' },
-                { label: "季度", value: '3' },
-                { label: "月度", value: '4' },
-            ],
-            status: -1,
-            options: [{
-                value: -1,
-                label: '全部'
-            }, {
-                value: '0',
-                label: '未完成'
-            }, {
-                value: '1',
-                label: '已完成'
-            }],
-            params: {
-                startDate: '',
-                endDate: '',
-                status: -1, // 不传默认返回全部 0-未完成 1-已完成
-            },
-            transferData: [],
-            transferValue: [],
-            pickerOptions: {
-                shortcuts: [{
-                    text: '最近一周',
-                    onClick(picker) {
-                        const end = new Date();
-                        const start = new Date();
-                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-                        picker.$emit('pick', [start, end]);
-                    }
-                }, {
-                    text: '最近一个月',
-                    onClick(picker) {
-                        const end = new Date();
-                        const start = new Date();
-                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-                        picker.$emit('pick', [start, end]);
-                    }
-                }, {
-                    text: '最近三个月',
-                    onClick(picker) {
-                        const end = new Date();
-                        const start = new Date();
-                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-                        picker.$emit('pick', [start, end]);
-                    }
-                }]
-            },
-            date: [],
-            examineList: [], // 考核表列表
-            tableHeader: [],
-            tableData: [],
-            userList: [],
-            selectExamineIds: [],
-            selectExamineList: [],
-            chooseExamineList: []
-        }
-    },
-    // watch: {
-    //     chooseExamineList(v) {
-    //         this.selectExamineList = this.chooseExamineList
-    //     }
-    // },
-    filters: {
-        formatDate(val) {
-            if (val) return moment(val).format('YYYY-MM-DD')
-            else return "--"
-        }
-    },
-    computed: {
-        ...mapGetters(['user_info']),
-        // selectExamineList() {
-        //     return this.examineList.filter(item => this.selectExamineIds.includes(item.reviewPackageId))
-        // }
-    },
-    created() {
-        this.getRecords();
-        this.dialogVisible = true;
-    },
-    methods: {
-        deleteItem(index) {
-            let chooseIndex = this.selectExamineIds.findIndex(select => select == this.chooseExamineList[index].reviewPackageId)
-            this.selectExamineIds.splice(chooseIndex, 1)
-            this.chooseExamineList.splice(index, 1)
-        },
-
-        changeSelectExamineIds(v) {
-            console.log(this.selectExamineIds)
-            if (v && v.length > 0) {
-                this.examineList.forEach(examine => {
-                    this.selectExamineIds.forEach(val => {
-                        if (val == examine.reviewPackageId) this.chooseExamineList.push(examine)
-                    })
-                })
-                this.chooseExamineList = Array.from(new Set(this.chooseExamineList.map(JSON.stringify))).map(JSON.parse);
-            } else {
-                // this.selectExamineIds = []
-            }
-            
-        },
-        handleCheckAllChange(v) {
-
-            if (v) {
-                this.examineList.forEach(examine => {
-                    this.selectExamineIds.push(examine.reviewPackageId)
-                })
-                this.examineList.forEach(examine => {
-                    this.selectExamineIds.forEach(val => {
-                        if (val == examine.reviewPackageId) this.chooseExamineList.push(examine)
-                    })
-                })
-                this.isIndeterminate = true;
-                this.checkAll = true;
-                this.$nextTick(() => {
-                    if (this.$refs.placeholder) this.$refs.placeholder.scrollIntoView(false);
-                })
-            } else {
-                this.selectExamineIds = [];
-                this.isIndeterminate = false;
-                this.checkAll = false;
-                if (this.examineList && this.examineList.length > 0) {
-                    let examineIds = this.examineList.map(item => item.reviewPackageId)
-                    this.chooseExamineList = this.chooseExamineList.filter(choose => !examineIds.includes(choose.reviewPackageId))
-                }
-
-            }
-        },
-
-        chooseExamine(item) {
-            if (this.selectExamineIds.includes(item.reviewPackageId)) {
-                let index = this.selectExamineIds.findIndex(item => item.reviewPackageId);
-                this.selectExamineIds.splice(index, 1)
-            } else {
-                this.selectExamineIds.push(item.reviewPackageId);
-            }
-            if (this.selectExamineIds.length === this.examineList.length) {
-                this.isIndeterminate = true;
-                this.checkAll = true;
-            } else {
-                this.isIndeterminate = false;
-                this.checkAll = false;
-            }
-            if (this.activeName == '0') this.initTableData()
-            if (this.activeName == '1') this.initTreeData()
-        },
-
-        handleTagDelete(index) {
-            // 最后一个不能删除
-            if (this.selectExamineList && this.selectExamineList.length > 1)
-                this.selectExamineList.splice(index, 1)
-        },
-        getRecords() {
-            this.loading = true;
-            if (this.status === '-1') this.params.status = '' // 不传默认返回全部
-            else this.params.status = this.status
-            if (this.cycleType == '-1') this.params = { ...this.params }
-            else this.params = { ...this.params, cycleType: this.cycleType }
-            this.$axiosUser("get", `/performance/statistics/packages/${this.user_info.site_id}`, this.params).then(res => {
-                this.loading = false;
-                let { data: { data: { list, total }, code } } = res;
-                this.examineList = list;
-                this.transferData = this.examineList.map(item => ({
-                    key: item.reviewPackageId,
-                    label: item.title
-                }))
-                if (this.examineList && this.examineList.length > 0) {
-                    this.examineList.map(item => {
-                        this.chooseExamineList.forEach(choose => {
-                            if (item.reviewPackageId == choose.reviewPackageId)
-                                this.selectExamineIds.push(item.reviewPackageId)
-                        })
-                    })
-                }
-
-                this.treeData = {
-                    id: 0,
-                    label: "考核对比",
-                    children: []
-                }
-                // this.selectExamineIds = [];
-            })
-        },
-        initTableData() {
-            let userList = [];
-            let selectExamineList = [];
-
-            this.examineList && this.examineList.forEach(item => {
-                this.transferValue.forEach(selectExamineId => {
-                    if (item.reviewPackageId == selectExamineId) {
-                        selectExamineList.push(item)
-                    }
-                })
-
-            })
-
-            selectExamineList.forEach(item => {
-                let { reviewPackageId, title, users } = item;
-                if (users && users.length > 0) {
-                    users.forEach(user => {
-                        let { employeeName, employeeId } = user
-                        userList.push({ employeeName, employeeId })
-                    })
-                }
-            })
-            this.userList = userList.reduce((acc, obj) => {
-                // 检查当前对象是否已经存在于结果数组中
-                if (!acc.find(item => item.employeeId === obj.employeeId)) { // 假设我们通过id来判断唯一性
-                    acc.push(obj);
-                }
-                return acc;
-            }, []);
-
-        },
-        initTreeData() {
-            this.selectExamineList.forEach(item => {
-                item.id = Date.now() + Math.floor(Math.random() * 10000);
-                item.label = item.title;
-                item.children = item.users;
-                item.users.forEach(user => {
-                    user.id = Date.now() + Math.floor(Math.random() * 10000);
-                    user.label = user.employeeName + ", " + (user.score ? user.score : 0);
-                })
-            })
-            this.treeData = {
-                id: 0,
-                label: "考核对比",
-                children: this.selectExamineList
-            }
-        },
-        handleClick(tab, event) {
-            if (this.activeName == '0') this.initTableData()
-            if (this.activeName == '1') this.initTreeData()
-        },
-        // 日期选择时间
-        changeDate(v) {
-            if (v && v.length > 0) {
-                this.params.startDate = v[0] || ''
-                this.params.endDate = v[1] || ''
-                this.getRecords();
-            }
-
-        },
-        //选择周期
-        changeCircle(v) {
-            console.log(v);
-            this.getRecords();
-        },
-        // 选择状态
-        changeStatus(v) {
-            this.getRecords();
-        },
-        // 重置搜索条件
-        reset() {
-            this.cycleType = '-1'
-            this.status = -1
-            this.date = []
-            this.params = {
-                startDate: '',
-                endDate: '',
-                status: -1, // 不传默认返回全部 0-未完成 1-已完成
-            }
-            this.getRecords();
-        },
-
-        // 清空选择的考核列表
-        clear() {
-            this.selectExamineIds = [];
-            this.chooseExamineList = [];
-        },
-        dialogBeforeClose() {
-            this.dialogVisible = false;
-        },
-        confirm() {
-            this.selectExamineList = this.examineList.filter(item => this.transferValue.indexOf(item.reviewPackageId) >= 0);
-            if (this.activeName == '0') this.initTableData()
-            if (this.activeName == '1') this.initTreeData()
-            this.dialogVisible = false;
-        }
-    },
-
-}
-
-</script>
-
-
-
-<style scoped="scoped" lang="scss">
-.contrast-container {
-    width: 100%;
-    height: 100%;
-    background-color: #fff;
-
-    .el-icon-close {
-        transition: all 0.2s;
-
-        &:hover {
-            font-size: 16px;
-        }
-    }
-
-    .search-box {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        box-sizing: border-box;
-    }
-
-    .title-box {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        margin-bottom: 10px;
-        padding: 0 20px;
-
-        .title {
-            color: #999;
-            font-size: 14px;
-            font-weight: bold;
-        }
-    }
-
-    .package-list {
-        width: 100%;
-        height: 400px;
-        margin-top: 10px;
-        border: 1px solid #f7f7f7;
-
-        .template-list {
-            width: 50%;
-            height: 400px;
-            overflow-y: auto;
-            display: flex;
-            flex-direction: column;
-            border-right: 1px solid #f7f7f7;
-            padding: 10px;
-            box-sizing: border-box;
-
-            .el-checkbox-group {
-                width: 100% !important;
-                height: 100% !important;
-
-                .el-checkbox {
-                    margin: 0;
-                    width: 200px;
-                    margin-bottom: 10px;
-                }
-
-            }
-        }
-
-        .choose-template {
-            width: 50%;
-            height: 400px;
-            overflow-y: auto;
-            padding: 10px;
-            box-sizing: border-box;
-
-            .line {
-                width: 90%;
-                height: 1px;
-                background-color: #f7f7f7;
-                margin: 10px auto;
-            }
-
-            &-item {
-                width: 90%;
-                height: 30px;
-                line-height: 30px;
-                padding-left: 10px;
-                border-bottom: 1px solid #f7f7f7;
-                margin: 0 auto 10px auto;
-                box-sizing: border-box;
-            }
-        }
-    }
-
-
-    .table-box {
-        width: 100%;
-        padding: 0 20px;
-        box-sizing: border-box;
-    }
-
-    /* 设置滚动条的宽度和背景色 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
-        width: 10px;
-        height: 10px;
-        background-color: #f9f9f9;
-    }
-
-    /* 设置滚动条滑块的样式 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb {
-        border-radius: 6px;
-        background-color: #c1c1c1;
-    }
-
-    /* 设置滚动条滑块hover样式 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
-        background-color: #a8a8a8;
-    }
-
-    /* 设置滚动条轨道的样式 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-track {
-        box-shadow: inset 0 0 5px rgba(87, 175, 187, 0.1);
-        border-radius: 6px;
-        background: #ededed;
-    }
-
-
-}
-</style>

+ 0 - 537
src/newPerformance/components/ExamineContrast copy.vue

@@ -1,537 +0,0 @@
-<template>
-    <div class="contrast-container scroll-bar" style="padding-top: 10px;">
-
-        <div class="flex-box-ce title-box" style="" v-if="selectExamineList && selectExamineList.length > 0">
-            <div class="title">已选择的考核列表:</div>
-            <el-button size="mini" @click="dialogVisible = true">查看更多</el-button>
-        </div>
-
-
-        <div v-if="selectExamineList && selectExamineList.length > 0" class="template-list"
-            style="background: #f7f7f7; padding: 10px 10px 0 0; margin: 0 20px; border-radius: 4px;">
-            <template size="small" v-for="(item, index) in selectExamineList">
-                <el-tag :key="item.reviewPackageId" style="margin: 0 0 10px 10px;" closable
-                    @close="handleTagDelete(index)">
-                    {{ item.title }}
-                </el-tag>
-            </template>
-        </div>
-
-        <div v-else class="flex-box-ce" style="padding: 0 20px;">
-            <el-button size="mini" @click="dialogVisible = true" style="margin-left: auto;">查看更多</el-button>
-        </div>
-
-        <el-tabs v-model="activeName" @tab-click="handleClick"
-            style="width: 100%; padding: 0 20px; box-sizing: border-box;">
-            <el-tab-pane label="表格" name="0">
-                <el-table v-if="userList && userList.length > 0" ref="tableRef" custom-class="openAnimAbcd" id="mytable"
-                    :data="userList" style="width: 100%; " border stripe :header-cell-style="{ background: '#f5f7fa' }"
-                    v-loading="loading">
-                    <el-table-column prop="employeeName" label="姓名" align="center">
-                    </el-table-column>
-                    <el-table-column :label="item.title" v-for="(item, index) in selectExamineList"
-                        :key="item.reviewPackageId" align="center">
-                        <template slot-scope="scope">
-                            <div v-for="user in item.users">
-                                <span v-if="user.employeeId == scope.row.employeeId">{{ user.score }}</span>
-                            </div>
-                        </template>
-                    </el-table-column>
-                </el-table>
-            </el-tab-pane>
-            <el-tab-pane label="地图" name="1" style="width: 100%;">
-                <div v-if="treeData && JSON.stringify(treeData) !== '{}'" class="flex-box-ce scroll-bar"
-                    style="width: 100%; justify-content: center; overflow-x: auto;">
-                    <vue2-org-tree :data="treeData" style="width: 100%;" />
-                </div>
-            </el-tab-pane>
-        </el-tabs>
-
-        <el-dialog title="请选择需要对比的考核列表" center :visible.sync="dialogVisible" width="600px"
-            :before-close="dialogBeforeClose">
-            <div>
-                <div class="search-box">
-                    <el-select v-model="cycleType" placeholder="请选择周期类型" @change="changeCircle" style="width: 100px;"
-                        size="mini">
-                        <el-option v-for="item in cycleOptions" :key="item.value" :label="item.label"
-                            :value="item.value">
-                        </el-option>
-                    </el-select>
-
-                    <el-date-picker v-model="date" type="daterange" align="right" unlink-panels range-separator="至"
-                        start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"
-                        :picker-options="pickerOptions" @change="changeDate" style="width: 300px; margin: 0 10px;"
-                        size="mini">
-                    </el-date-picker>
-
-                    <el-select v-model="status" placeholder="请选择" style="width: 100px;" @change="changeStatus"
-                        size="mini">
-                        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
-                        </el-option>
-                    </el-select>
-
-                    <el-button plain round size="mini" style="margin-left: 10px;" @click="reset">重 置</el-button>
-                </div>
-                <div class="package-list">
-                    <div class="template-list scroll-bar">
-                        <template v-if="examineList && examineList.length > 0">
-                            <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll"
-                                @change="handleCheckAllChange" style="margin-bottom: 10px;">全选</el-checkbox>
-                            <el-checkbox-group v-model="selectExamineIds" size="small" @change="changeSelectExamineIds">
-                                <template v-for="item in examineList">
-                                    <el-checkbox :key="item.reviewPackageId" :label="item.reviewPackageId" border>
-                                        {{ item.title }}
-                                    </el-checkbox>
-                                </template>
-                            </el-checkbox-group>
-                        </template>
-                        <template v-else>
-                            <div class="flex-box-ce" style="justify-content: center;">
-                                <noData content="暂无数据" imgW="120px" imgH="80px"></noData>
-                            </div>
-                        </template>
-                    </div>
-                    <div class="choose-template scroll-bar">
-                        <el-button plain round size="mini" @click="clear">清 空</el-button>
-                        <div class="line"></div>
-                        <template v-for="(item, index) in chooseExamineList">
-                            <div class="flex-box-ce choose-template-item" style="justify-content: space-between;">
-                                <div>{{ item.title }}</div>
-                                <i class="el-icon-close" @click="deleteItem(index)"></i>
-                            </div>
-                        </template>
-                        <div ref="placeholder" style="height: 50px;"></div>
-                    </div>
-                </div>
-
-            </div>
-            <div slot="footer">
-                <el-button @click="dialogVisible = false">取 消</el-button>
-                <el-button type="primary" @click="confirm">确 定</el-button>
-            </div>
-        </el-dialog>
-
-        <div style="height: 50px;"></div>
-    </div>
-</template>
-
-<script>
-import { mapGetters } from 'vuex';
-import moment from 'moment';
-
-export default {
-    data() {
-        return {
-            checkAll: false,
-            isIndeterminate: true,
-            dialogVisible: false,
-            activeName: "0",
-            loading: false,
-            treeData: {},
-            // 周期类型 0-未定义 1-年度 2-半年度 3-季度 4-月度
-            cycleType: '-1',
-            cycleOptions: [
-                { label: "全部", value: '-1' },
-                { label: "未定义", value: '0' },
-                { label: "年度", value: '1' },
-                { label: "半年度", value: '2' },
-                { label: "季度", value: '3' },
-                { label: "月度", value: '4' },
-            ],
-            status: -1,
-            options: [{
-                value: -1,
-                label: '全部'
-            }, {
-                value: '0',
-                label: '未完成'
-            }, {
-                value: '1',
-                label: '已完成'
-            }],
-            params: {
-                startDate: '',
-                endDate: '',
-                status: -1, // 不传默认返回全部 0-未完成 1-已完成
-            },
-
-            pickerOptions: {
-                shortcuts: [{
-                    text: '最近一周',
-                    onClick(picker) {
-                        const end = new Date();
-                        const start = new Date();
-                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-                        picker.$emit('pick', [start, end]);
-                    }
-                }, {
-                    text: '最近一个月',
-                    onClick(picker) {
-                        const end = new Date();
-                        const start = new Date();
-                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-                        picker.$emit('pick', [start, end]);
-                    }
-                }, {
-                    text: '最近三个月',
-                    onClick(picker) {
-                        const end = new Date();
-                        const start = new Date();
-                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-                        picker.$emit('pick', [start, end]);
-                    }
-                }]
-            },
-            date: [],
-            examineList: [], // 考核表列表
-            tableHeader: [],
-            tableData: [],
-            userList: [],
-            selectExamineIds: [],
-            selectExamineList: [],
-            chooseExamineList: []
-        }
-    },
-    filters: {
-        formatDate(val) {
-            if (val) return moment(val).format('YYYY-MM-DD')
-            else return "--"
-        }
-    },
-    computed: {
-        ...mapGetters(['user_info']),
-        // selectExamineList() {
-        //     return this.examineList.filter(item => this.selectExamineIds.includes(item.reviewPackageId))
-        // }
-    },
-    created() {
-        this.getRecords();
-        this.dialogVisible = true;
-    },
-    methods: {
-        deleteItem(index) {
-            let chooseIndex = this.selectExamineIds.findIndex(select => select == this.chooseExamineList[index].reviewPackageId)
-            this.selectExamineIds.splice(chooseIndex, 1)
-            this.chooseExamineList.splice(index, 1)
-        },
-
-        changeSelectExamineIds(v) {
-            if (v && v.length > 0) {
-                this.examineList.forEach(examine => {
-                    this.selectExamineIds.forEach(val => {
-                        if (val == examine.reviewPackageId) this.chooseExamineList.push(examine)
-                    })
-                })
-            }
-
-        },
-        handleCheckAllChange(v) {
-
-            if (v) {
-                this.examineList.forEach(examine => {
-                    this.selectExamineIds.push(examine.reviewPackageId)
-                })
-                this.examineList.forEach(examine => {
-                    this.selectExamineIds.forEach(val => {
-                        if (val == examine.reviewPackageId) this.chooseExamineList.push(examine)
-                    })
-                })
-                this.isIndeterminate = true;
-                this.checkAll = true;
-                this.$nextTick(() => {
-                    if (this.$refs.placeholder) this.$refs.placeholder.scrollIntoView(false);
-                })
-            } else {
-                this.selectExamineIds = [];
-                this.isIndeterminate = false;
-                this.checkAll = false;
-                if (this.examineList && this.examineList.length > 0) {
-                    let examineIds = this.examineList.map(item => item.reviewPackageId)
-                    this.chooseExamineList = this.chooseExamineList.filter(choose => !examineIds.includes(choose.reviewPackageId))
-                }
-
-            }
-        },
-
-        chooseExamine(item) {
-            if (this.selectExamineIds.includes(item.reviewPackageId)) {
-                let index = this.selectExamineIds.findIndex(item => item.reviewPackageId);
-                this.selectExamineIds.splice(index, 1)
-            } else {
-                this.selectExamineIds.push(item.reviewPackageId);
-            }
-            if (this.selectExamineIds.length === this.examineList.length) {
-                this.isIndeterminate = true;
-                this.checkAll = true;
-            } else {
-                this.isIndeterminate = false;
-                this.checkAll = false;
-            }
-            if (this.activeName == '0') this.initTableData()
-            if (this.activeName == '1') this.initTreeData()
-        },
-
-        handleTagDelete(index) {
-            // 最后一个不能删除
-            if (this.selectExamineList && this.selectExamineList.length > 1)
-                this.selectExamineList.splice(index, 1)
-        },
-        getRecords() {
-            this.loading = true;
-
-            if (this.status === '-1') this.params.status = '' // 不传默认返回全部
-            else this.params.status = this.status
-            if (this.cycleType == '-1') this.params = { ...this.params }
-            else {
-                this.params = { ...this.params, cycleType: this.cycleType }
-            }
-            this.$axiosUser("get", `/performance/statistics/packages/${this.user_info.site_id}`, this.params).then(res => {
-                this.loading = false;
-                let { data: { data: { list, total }, code } } = res;
-                this.examineList = list;
-                if (this.examineList && this.examineList.length > 0) {
-                    this.examineList.map(item => {
-                        this.chooseExamineList.forEach(choose => {
-                            if (item.reviewPackageId == choose.reviewPackageId)
-                                this.selectExamineIds.push(item.reviewPackageId)
-                        })
-                    })
-                }
-
-                this.treeData = {
-                    id: 0,
-                    label: "考核对比",
-                    children: []
-                }
-                // this.selectExamineIds = [];
-            })
-        },
-        initTableData() {
-            let userList = [];
-            let selectExamineList = [];
-
-            this.examineList && this.examineList.forEach(item => {
-                this.selectExamineIds.forEach(selectExamineId => {
-                    if (item.reviewPackageId == selectExamineId) {
-                        selectExamineList.push(item)
-                    }
-                })
-
-            })
-
-            selectExamineList.forEach(item => {
-                let { reviewPackageId, title, users } = item;
-                if (users && users.length > 0) {
-                    users.forEach(user => {
-                        let { employeeName, employeeId } = user
-                        userList.push({ employeeName, employeeId })
-                    })
-                }
-            })
-            this.userList = userList.reduce((acc, obj) => {
-                // 检查当前对象是否已经存在于结果数组中
-                if (!acc.find(item => item.employeeId === obj.employeeId)) { // 假设我们通过id来判断唯一性
-                    acc.push(obj);
-                }
-                return acc;
-            }, []);
-
-        },
-        initTreeData() {
-            this.selectExamineList.forEach(item => {
-                item.id = Date.now() + Math.floor(Math.random() * 10000);
-                item.label = item.title;
-                item.children = item.users;
-                item.users.forEach(user => {
-                    user.id = Date.now() + Math.floor(Math.random() * 10000);
-                    user.label = user.employeeName + ", " + (user.score ? user.score : 0);
-                })
-            })
-            this.treeData = {
-                id: 0,
-                label: "考核对比",
-                children: this.selectExamineList
-            }
-        },
-        handleClick(tab, event) {
-            if (this.activeName == '0') this.initTableData()
-            if (this.activeName == '1') this.initTreeData()
-        },
-        // 日期选择时间
-        changeDate(v) {
-            if (v && v.length > 0) {
-                this.params.startDate = v[0] || ''
-                this.params.endDate = v[1] || ''
-                this.getRecords();
-            }
-
-        },
-        //选择周期
-        changeCircle(v) {
-            this.getRecords();
-        },
-        // 选择状态
-        changeStatus(v) {
-            this.getRecords();
-        },
-        // 重置搜索条件
-        reset() {
-            this.cycleType = '-1'
-            this.status = -1
-            this.date = []
-            this.params = {
-                startDate: '',
-                endDate: '',
-                status: -1, // 不传默认返回全部 0-未完成 1-已完成
-            }
-            this.getRecords();
-        },
-
-        // 清空选择的考核列表
-        clear() {
-            this.selectExamineIds = [];
-            this.chooseExamineList = [];
-        },
-        dialogBeforeClose() {
-            this.dialogVisible = false;
-        },
-        confirm() {
-            this.selectExamineList = this.examineList.filter(item => this.selectExamineIds.includes(item.reviewPackageId))
-            if (this.activeName == '0') this.initTableData()
-            if (this.activeName == '1') this.initTreeData()
-            this.dialogVisible = false;
-        }
-    },
-
-}
-
-</script>
-
-
-
-<style scoped="scoped" lang="scss">
-.contrast-container {
-    width: 100%;
-    height: 100%;
-    background-color: #fff;
-
-    .el-icon-close {
-        transition: all 0.2s;
-
-        &:hover {
-            font-size: 16px;
-        }
-    }
-
-    .search-box {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        box-sizing: border-box;
-    }
-
-    .title-box {
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        margin-bottom: 10px;
-        padding: 0 20px;
-
-        .title {
-            color: #999;
-            font-size: 14px;
-            font-weight: bold;
-        }
-    }
-
-    .package-list {
-        width: 100%;
-        height: 400px;
-        display: flex;
-        margin-top: 10px;
-        border: 1px solid #f7f7f7;
-
-        .template-list {
-            width: 50%;
-            height: 400px;
-            overflow-y: auto;
-            display: flex;
-            flex-direction: column;
-            border-right: 1px solid #f7f7f7;
-            padding: 10px;
-            box-sizing: border-box;
-
-            .el-checkbox-group {
-                width: 100% !important;
-                height: 100% !important;
-
-                .el-checkbox {
-                    margin: 0;
-                    width: 200px;
-                    margin-bottom: 10px;
-                }
-
-            }
-        }
-
-        .choose-template {
-            width: 50%;
-            height: 400px;
-            overflow-y: auto;
-            padding: 10px;
-            box-sizing: border-box;
-
-            .line {
-                width: 90%;
-                height: 1px;
-                background-color: #f7f7f7;
-                margin: 10px auto;
-            }
-
-            &-item {
-                width: 90%;
-                height: 30px;
-                line-height: 30px;
-                padding-left: 10px;
-                border-bottom: 1px solid #f7f7f7;
-                margin: 0 auto 10px auto;
-                box-sizing: border-box;
-            }
-        }
-    }
-
-
-    .table-box {
-        width: 100%;
-        padding: 0 20px;
-        box-sizing: border-box;
-    }
-
-    /* 设置滚动条的宽度和背景色 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
-        width: 10px;
-        height: 10px;
-        background-color: #f9f9f9;
-    }
-
-    /* 设置滚动条滑块的样式 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb {
-        border-radius: 6px;
-        background-color: #c1c1c1;
-    }
-
-    /* 设置滚动条滑块hover样式 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
-        background-color: #a8a8a8;
-    }
-
-    /* 设置滚动条轨道的样式 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-track {
-        box-shadow: inset 0 0 5px rgba(87, 175, 187, 0.1);
-        border-radius: 6px;
-        background: #ededed;
-    }
-
-
-}
-</style>

+ 2 - 2
src/newPerformance/components/IndicatorSetting/PerResultInputSelector.vue

@@ -72,14 +72,14 @@
         </div>
       </el-form-item>
 
-      <!-- <el-form-item label="允许">
+      <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-item>
     </el-form>
   </el-dialog>
 </template>

+ 2 - 2
src/newPerformance/components/IndicatorSetting/PerResultInputSelectorOnly.vue

@@ -71,14 +71,14 @@
           </div>
         </el-form-item>
 
-        <!-- <el-form-item label="允许">
+        <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-item>
     </el-form>
     <template #footer>
       <el-row type="flex" justify="end">

+ 2 - 2
src/newPerformance/components/IndicatorSetting/PerReviewsSelector.vue

@@ -81,14 +81,14 @@
           ( <span style="color: red;"> * </span><span>或签只需任一审批人同意即可</span> )
         </div>
       </el-form-item>
-      <!-- <el-form-item label="允许">
+      <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-item>
     </el-form>
   </el-dialog>
 </template>

+ 2 - 2
src/newPerformance/components/IndicatorSetting/PerReviewsSelectorOnly.vue

@@ -82,14 +82,14 @@
           ( <span style="color: red;"> * </span><span>或签只需任一审批人同意即可</span> )
         </div>
       </el-form-item>
-      <!-- <el-form-item label="允许">
+      <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-item>
     </el-form>
     <template #footer>
       <el-row type="flex" justify="end">

+ 9 - 18
src/newPerformance/components/IndicatorSetting/PerScoreEachOtherOnly.vue

@@ -1,29 +1,20 @@
 <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-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-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 type="primary" @click="onConfirm">
             确认
           </el-button>
         </el-col>

+ 9 - 18
src/newPerformance/components/IndicatorSetting/PerScoreSelfOnly.vue

@@ -1,29 +1,20 @@
 <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-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-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 type="primary" @click="onConfirm">
             确认
           </el-button>
         </el-col>

+ 2 - 2
src/newPerformance/components/IndicatorSetting/PerScoresSelector.vue

@@ -83,14 +83,14 @@
         </div>
       </el-form-item>
 
-      <!-- <el-form-item label="允许">
+      <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-item>
     </el-form>
   </el-dialog>
 </template>

+ 2 - 2
src/newPerformance/components/IndicatorSetting/PerScoresSelectorOnly.vue

@@ -84,14 +84,14 @@
           </div>
         </el-form-item>
 
-        <!-- <el-form-item label="允许">
+        <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-item>
     </el-form>
     <template #footer>
       <el-row type="flex" justify="end">

+ 1 - 1
src/newPerformance/components/IndicatorSetting/PerTargetConfirmSelector.vue

@@ -87,7 +87,7 @@
       <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-button label="transfer">转交</el-checkbox-button>
         </el-checkbox-group>
       </el-form-item>
     </el-form>

+ 1 - 1
src/newPerformance/components/IndicatorSetting/PerTargetConfirmSelectorOnly.vue

@@ -94,7 +94,7 @@
       <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-button label="transfer">转交</el-checkbox-button>
         </el-checkbox-group>
       </el-form-item>
     </el-form>

File diff suppressed because it is too large
+ 0 - 1015
src/newPerformance/components/IndicatorSetting/UploadPublish2 copy.vue


+ 13 - 39
src/newPerformance/components/IndicatorSetting/UploadPublish2.vue

@@ -30,35 +30,6 @@
 
           <el-card v-for="(employee, index) in reviewEmployees" :key="index" style="width: 100%; margin-bottom: 10px;"
             :class="disabledEmployeeIds.includes(employee.id) ? 'disabled' : ''">
-            <!-- <el-row style="margin-bottom: 5px" type="flex" justify="space-between">
-              <el-col :span="6" align="left" class="vertical-align">
-                <i class="el-icon-delete" style="margin-right: 10px;cursor: pointer;" @click="removeEmployee(index)" />
-                <el-link :type="employee.id && employee.id.toString().startsWith('none') ? 'danger' : 'primary'"
-                  @click.stop="openEmployeeSelector(index)">
-                  {{ employee.name }} {{`${employee.id && employee.id.toString().startsWith('none') ? '(未匹配到员工信息将跳过该指标)'
-                  : ''}`}}
-                </el-link>
-              </el-col>
-              <el-col :span="14" align="left">
-                <div class="vertical-align">
-                  <template v-if="employee.selectedOkrs && employee.selectedOkrs.length > 0">
-                    <span>考核表OKR目标:&nbsp;&nbsp;</span>
-                    <span v-for="okr in employee.selectedOkrs" :key="okr.id">
-                      <el-link type="primary" @click="openEmployeeOkrSelector(index)">
-                        {{ okr.name }}
-                      </el-link>
-                      &nbsp;&nbsp;
-                    </span>
-                  </template>
-<el-link v-else type="warning" @click="openEmployeeOkrSelector(index)">
-  关联考核表OKR目标
-</el-link>
-</div>
-</el-col>
-<el-col :span="4" align="right">
-  <el-switch v-model="employee.showNode" active-text="显示节点配置" inactive-text="隐藏节点配置" />
-</el-col>
-</el-row> -->
 
             <div class="template-info flex-box-ce" style="justify-content: space-between;">
               <div class="flex-box-ce">
@@ -116,7 +87,7 @@
                       style="margin-right: 10px;"></el-link>
                     <el-link :type="scope.row.title && scope.row.title !== '' ? 'primary' : 'danger'"
                       @click="getFocus(scope.row, 'title', employee.showNode)">
-                      {{ scope.row.title || '未定义' }} {{ scope.row.id }}
+                      {{ scope.row.title || '未定义' }}
                     </el-link>
                   </div>
                 </template>
@@ -435,7 +406,6 @@
       :showSelectedData="employeeSelectedOkrs" :key="`employeeTarget`" @confirm="onEmployeeOkrSelected" />
 
     <!--  指标okr选择  -->
-
     <TargetSearch :visible.sync="showIndicatorTargetSearch" :selectedCheckList="indicatorOkrs"
       :showSelectedData="indicatorSelectedOkrs" :key="`indicatorTarget`" @confirm="onIndicatorOkrSelected" />
 
@@ -709,7 +679,7 @@ export default {
       currentTemplate: null,
       reviewEmployees: [],
       showEmployeeSelector: false,
-      currentEmployeeIndex: null,
+      currentEmployeeIndex: 0,
       showContent: false,
       currentIndicatorIndex: null,
       postList: [],
@@ -1015,15 +985,20 @@ export default {
   },
   mounted() {
     this.initData();
-
+    this.$nextTick(() => {
+      this.initSortable()
+    })
   },
   methods: {
 
     initSortable() {
       const el = this.$el.querySelector('.el-table__body-wrapper tbody');
-      const sortable = Sortable.create(el, {
-        onEnd: this.onDragEnd
-      });
+      if (el) {
+        const sortable = Sortable.create(el, {
+          onEnd: this.onDragEnd
+        });
+      }
+      
     },
     // onDragEnd({ oldIndex, newIndex }) {
     //   const movedItem = this.items.splice(oldIndex, 1)[0];
@@ -1031,10 +1006,9 @@ export default {
     // },
 
     onDragEnd(event) {
-      console.log(event)
       const { oldIndex, newIndex } = event;
       console.log(oldIndex, newIndex);
-      // const movedItem = this.reviewEmployees[this.currentEmployeeIndex].indicators.splice(oldIndex, 1)[0];
+      // const movedItem = this.reviewEmployees[this.currentEmployeeIndex].indicators.splice(oldIndex, 1);
       // this.reviewEmployees[this.currentEmployeeIndex].indicators.splice(newIndex, 0, movedItem);
     },
 
@@ -1413,9 +1387,9 @@ export default {
       this.reviewEmployees[this.currentEmployeeIndex].id = data.employee[0].id;
       this.reviewEmployees[this.currentEmployeeIndex].name = data.employee[0].name;
       this.reviewEmployees[this.currentEmployeeIndex].imgUrl = data.employee[0].img_url;
-
       this.closeEmployeeSelector();
     },
+    
     lostFocus(row, column) {
       switch (column) {
         case 'title':

+ 5 - 1
src/newPerformance/components/IndicatorStore.vue

@@ -4,6 +4,7 @@
             指标库管理
             <el-button type="primary" size="small" @click="addTemplate()">添加模板</el-button>
         </div>
+
         <div style="height: 1px; background-color: #f1f1f1; margin: 10px 0;"></div>
         <el-alert class="bounce animated" type="warning" :title="alertTilte" :closable="false" show-icon
             style="width: 100%; margin-bottom: 10px;"></el-alert>
@@ -65,11 +66,13 @@ export default {
     created() {
         this.getTemplateList()
     },
+
     // mounted() {
     //     this.$nextTick(() => {
     //         this.startGuide()
     //     })
     // },
+
     methods: {
 
         startGuide() {
@@ -91,6 +94,7 @@ export default {
                     }
                 }
             ];
+
             this.driver = new Driver({
                 doneBtnText: '完成',
                 animate: true,
@@ -108,7 +112,7 @@ export default {
         },
         getTemplateList() {
             this.loading = true
-            this.$axiosUser("get", `/performance/template/list/self/${this.user_info.site_id}`).then(res => {
+            this.$axiosUser("get", `/performance/template/list/${this.user_info.site_id}`).then(res => {
                 this.templateList = res.data.data.list;
                 this.total = this.templateList.length
                 this.loading = false;

+ 0 - 263
src/newPerformance/components/LevelSetting copy.vue

@@ -1,263 +0,0 @@
-<template>
-    <div class="all">
-        <div class="flex-box main">
-
-            <div class="flex-5 right">
-                <div v-show="isActive == 1">
-                    <el-form ref="detailForm" :model="ruleForm" :rules="rules" @submit.native.prevent
-                        label-width="150px">
-                        <div class="title">
-                            总分规则
-                            <span class="fontColorB">(量化指标和非量化指标)</span>
-                        </div>
-                        <el-form-item label="自定义" prop="region">
-                            <el-select v-model="ruleForm.region" placeholder="请选择自定义" disabled style="width: 300px;">
-                                <el-option label="量化指标和非量化指标合并计算" value="shanghai"></el-option>
-                                <el-option label="量化指标和非量化指标分开计算" value="beijing"></el-option>
-                            </el-select>
-                        </el-form-item>
-                        <div class="title">量化指标</div>
-                        <el-form-item label="指标类型" prop="name">
-                            <el-select v-model="ruleForm.region" disabled style="width: 300px;">
-                                <el-option label="数字类型" value="shanghai"></el-option></el-select>
-                        </el-form-item>
-                        <el-form-item label="总分自动加和" prop="tel"><el-switch v-model="ruleForm.delivery"
-                                disabled></el-switch></el-form-item>
-                        <el-form-item label="录入方式" prop="company_id">
-                            <el-select v-model="ruleForm.region" disabled style="width: 300px;"><el-option label="文本框输入"
-                                    value="shanghai"></el-option></el-select>
-                        </el-form-item>
-                    </el-form>
-                </div>
-                <div v-show="isActive == 2">
-                    <el-form ref="detailForm" @submit.native.prevent label-width="150px">
-                        <div class="title">绩效等级配置</div>
-                        <!--            <el-form-item label="绩效等级" prop="tel">
-              <template slot="label">
-                <span>绩效等级</span>
-                <el-tooltip effect="dark" content="设置公司的等级名称及对应占比,考核结束后,将按照考核结果的排名,正态强制分布。如:排名前10%的员工绩效等级为3.75" placement="top">
-                  <i class="el-icon-warning"></i>
-                </el-tooltip>
-              </template>
-<el-switch v-model="level_enable" disabled :active-value="1" :inactive-value="0"></el-switch>
-</el-form-item>
-<el-form-item label="录入方式" prop="company_id">
-    <el-select v-model="ruleForm.region" disabled><el-option label="文本框输入" value="shanghai"></el-option></el-select>
-</el-form-item> -->
-                        <div style="height: 30px;"></div>
-                        <ClassSet ref="ClassSet" :inputs="inputs"
-                            :inputsStyle="{ paddingLeft: '150px', width: '700px' }">
-                        </ClassSet>
-                    </el-form>
-                </div>
-            </div>
-        </div>
-        <div class="footer"><el-button type="primary" :loading="loading" @click="save()">保存设置</el-button></div>
-    </div>
-</template>
-
-<script>
-import ClassSet from '@/performance/components/public/ClassSet';
-export default {
-    components: { ClassSet },
-    name: 'BasicsSet',
-    data() {
-        return {
-            loading: false,
-            isActive: 2,
-            ruleForm: {
-                region: 'shanghai',
-                delivery: true
-            },
-            rules: {},
-            inputs: [],//分值区间
-            level_enable: true,//是否开启绩效等级
-            isSave: true
-        };
-    },
-    watch: {},
-    created() {
-        this.getAllSet();
-    },
-    mounted() { },
-    methods: {
-        // 获取全局设置
-        getAllSet() {
-            this.$axiosUser('get', 'api/pro/per/user/base_config').then(res => {
-                let data = res.data.data;
-                let levels = data.level_scope.levels;
-                this.level_enable = data.level_enable;
-                var inputs = [];
-                var max = 0;//最大值
-                if (levels) {
-                    levels.forEach((item, index) => {
-                        var obj;
-                        if (index == 0) {
-                            obj = { name: item.name, max: Number(item.value), min: 0 };
-                        } else {
-                            obj = { name: item.name, max: Number(item.value), min: max };//当不是第一个等级时,最小值为上一个的最大值
-                        }
-                        max = item.value;
-                        inputs.push(obj);
-                    })
-                    this.inputs = inputs
-                }
-            })
-        },
-        //保存
-        save() {
-            let is = true, level_scope = [];
-            let isSave = this.$refs.ClassSet.isSave
-            let inputsList = this.$refs.ClassSet.inputsList
-            if (!isSave) {
-                return false
-            }
-            inputsList.some(item => {
-                if (!item.name) {
-                    this.$message.error('等级的名称不能为空');
-                    is = false;
-                    return true;
-                }
-                if (item.max == 0) {
-                    this.$message.error('最大值不能为空或者0');
-                    is = false;
-                    return true;
-                }
-                level_scope.push({ name: item.name, value: Number(item.max) });
-            })
-
-            var level_scopes = {//参数的数据结构
-                levels: level_scope
-            };
-            if (is) {
-                this.loading = true;
-                this.$axiosUser('post', 'api/pro/per/user/set_base_config', { level_scope: JSON.stringify(level_scopes) }).then(res => {
-                    this.$message.success('设置成功');
-                    this.getAllSet();
-                }).finally(() => {
-                    this.loading = false;
-                })
-            }
-        },
-        // 监听最大值输入
-        InputBiur(e, index) {
-            this.isSave = true
-            var max = this.inputsList[index].max;
-            var min = this.inputsList[index].min;
-            if (max == 0) {
-                return false;
-            }
-            if (min >= max) {
-                this.$message.error('不能小于或等于' + min);
-                this.$set(this.inputsList[index], 'max', 0);
-                this.isSave = false
-                return false;
-            }
-            if (this.inputsList[index + 1]) {
-                this.$set(this.inputsList[index + 1], 'min', max);
-            }
-        },
-        addInput() {
-            if (this.inputsList.length == 10) {
-                this.$message.error('最高10个级别');
-                return false;
-            }
-            var max = this.inputsList[this.inputsList.length - 1].max;
-            this.inputsList.push({ name: '', min: max, max: 0 });
-        },
-        deleteInput(index) {
-            if (index == 0) {
-                this.$message.error('至少保留一个等级');
-                return false;
-            }
-            var min = this.inputsList[index].min; //获取当前元素最小值
-            this.inputsList.splice(index, 1);
-            if (index != this.inputsList.length) {
-                //当删除不是最后一位时
-                this.$set(this.inputsList[index], 'min', min);
-            }
-            // // this.inputsList.some((item, i) => {
-            // //   if (i == index) {
-            //     this.inputsList.splice(i, 1); //在数组的some方法中,如果return true,就会立即终止这个数组的后续循环
-            // //     return true;
-            // //   }
-            // // });
-        },
-        active(index) {
-            this.isActive = index;
-        }
-    }
-};
-</script>
-<style scoped="scoped">
-.all {
-    min-height: calc(100vh - 210px);
-    position: relative;
-    padding: 20px;
-    background-color: #fff;
-}
-
-.title {
-    font-weight: 600;
-    margin-bottom: 10px;
-    background-color: #f5f7fa;
-    padding: 15px;
-}
-
-.main {
-    min-height: calc(100% - 40px);
-}
-
-.title-f {
-    margin-bottom: 20px;
-}
-
-.footer {
-    background-color: #fff;
-    border-top: 1px solid #ebebeb;
-    height: 40px;
-    text-align: center;
-    padding-top: 10px;
-}
-
-.checkChild {
-    background-color: #fbfdff;
-    margin-left: 20px;
-}
-
-.left,
-.right {
-    height: 100%;
-    overflow: auto;
-}
-
-.ul {
-    border: 1px solid #ebebeb;
-    height: 100%;
-    border-bottom: none;
-}
-
-.li {
-    padding: 15px;
-    position: relative;
-}
-
-.li:hover {
-    background-color: #f5f7fa;
-}
-
-.active-li {
-    color: #409EFF !important;
-    background-color: #f5f7fa;
-}
-
-.active-li::before {
-    content: '';
-    position: absolute;
-    width: 3px;
-    height: 100%;
-    background-color: #409EFF;
-    left: 0;
-    top: 0;
-}
-</style>

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

@@ -117,6 +117,7 @@ export default {
                 this.$set(this.inputsList[index + 1], 'min', max);
             }
         },
+
         addInput() {
             if (this.inputsList.length == 10) {
                 this.$message.error('最高10个级别');
@@ -125,6 +126,7 @@ export default {
             var max = this.inputsList[this.inputsList.length - 1].max;
             this.inputsList.push({ name: '', min: max, max: 0 });
         },
+
         deleteInput(index) {
             if (index == 0) {
                 this.$message.error('至少保留一个等级');

+ 177 - 26
src/newPerformance/components/MyPerformance.vue

@@ -6,6 +6,7 @@
                 <div class="line"></div>
                 基本信息
             </div>
+
             <div class="base-info">
                 <div class="base-info-item">
                     <div class="label">被考核人</div>
@@ -17,7 +18,7 @@
                         {{ detailInfo.department | formatDeptName }}</div>
                 </div>
 
-                
+
                 <div class="base-info-item">
                     <div class="label">考核状态</div>
                     <div class="value orange-color" v-if="detailInfo && status == 0">考核中</div>
@@ -42,11 +43,18 @@
 
         </div>
 
-        <div class="btn-box flex-box-ce" v-if="detailInfo && !reviewId">
+        <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>
             </div>
             <div class="flex-box-ce">
-                <div class="flex-box-ce more" @click="dialogVisible = true">
+                <div v-if="detailInfo && !reviewId" class="flex-box-ce more" @click="dialogVisible = true">
                     查看历史考核记录
                     <i class="el-icon-d-arrow-right"></i>
                 </div>
@@ -139,10 +147,43 @@
                     </template>
                 </el-table-column>
 
-                <el-table-column label="操作" align="center" min-width="120">
+
+                <el-table-column label="操作" align="center" min-width="160">
                     <template slot-scope="scope">
                         <el-link type="primary"
-                            @click="getProcessTracing({ businessStatus: scope.row.businessStatus, nodes: scope.row.flow.nodes })">指标审批过程</el-link>
+                            @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">
+                            <template #reference>
+                                <el-link
+                                    v-if="scope.row.businessStatus !== 'target_confirm'"
+                                    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>
+
+
+                            </div>
+                        </el-popover>
                     </template>
                 </el-table-column>
 
@@ -210,9 +251,26 @@
 
         <!-- 展示节点处理数据 -->
         <ShowHandlerComp v-if="showData" v-model="showHandlerDialogVisible" :show-data="showData" />
+
+        <!-- 考核操作日志 -->
+        <ExamineLogDialog v-if="examineLogDialogVisible" v-model="examineLogDialogVisible" :reviewId="logReviewId">
+        </ExamineLogDialog>
+
+        <!-- 重置指标流程节点 -->
+        <ResetNodeDialog v-if="resetNodeDialogVisible" v-model="resetNodeDialogVisible" :handle-row="initRow"
+            @finished="getDetails(logReviewId)">
+        </ResetNodeDialog>
+
+        <!-- 添加指标 -->
+        <AddIndicatorDialog v-model="addIndicatorDialogVisible" :reviewId="logReviewId"
+            @finished="getDetails(logReviewId)">
+        </AddIndicatorDialog>
+
+
     </div>
 </template>
 
+
 <script>
 
 import { mapGetters } from 'vuex';
@@ -220,8 +278,10 @@ import moment from 'moment';
 import ShowHandlerComp from '@/newPerformance/components/PublicComp/ShowHanderDialog2'; // 显示节点数据组件
 import FormulaComp from '@/newPerformance/components/TemplateDetails/FormulaComp'; // 计算公式弹框
 import SelectExamineComp from '@/newPerformance/components/MyPerformance/SelectExamine'; // 选择考核列表弹框
-import TargetListComp from "@/performance/views/assessManagement/TargetListComp.vue";
-
+import TargetListComp from "@/performance/views/assessManagement/TargetListComp.vue"; // okr列表
+import ExamineLogDialog from '@/newPerformance/components/MyPerformance/ExamineLog'; // 考核日志
+import ResetNodeDialog from '@/newPerformance/components/MyPerformance/ResetNode'; // 重置流程
+import AddIndicatorDialog from '@/newPerformance/components/MyPerformance/AddIndicator'; // 添加指标
 
 export default {
     name: "MyPerformance",
@@ -229,7 +289,10 @@ export default {
         ShowHandlerComp,
         FormulaComp,
         SelectExamineComp,
-        TargetListComp
+        TargetListComp,
+        AddIndicatorDialog,
+        ExamineLogDialog,
+        ResetNodeDialog
     },
     props: {
         reviewId: {
@@ -243,10 +306,15 @@ export default {
     },
     data() {
         return {
+            isCreator: this.$supremeAuthority('creator'), // 创始人,总经理
+            getRole1: this.$getRole(1), // 绩效主管理员,子管理员
+            getRole2: this.$getRole(2), // 部门管理员
+            getRole3: this.$getRole(3), // 员工
             fileUrl: "",
             isShow: false,
             dialogVisible: false,
             targetDialogVisible: false,
+            examineLogDialogVisible: false,
             loading: false,
             value: [],
             title: "",
@@ -314,7 +382,11 @@ export default {
             okrs: [],
             detailInfo: null,
             showData: null,
-            showHandlerDialogVisible: false
+            addIndicatorDialogVisible: false, // 添加指标弹框
+            showHandlerDialogVisible: false,// 查看指标节点操作详情
+            resetNodeDialogVisible: false,// 重置流程弹框
+            logReviewId: '',
+            initRow: null,
         };
     },
     filters: {
@@ -337,32 +409,45 @@ export default {
     },
     computed: {
         ...mapGetters(['user_info']),
-        create_status() {
-            if (this.tableData && this.tableData.length > 0) {
-                return this.tableData.filter(data => data.businessStatus !== 'end').length
-            }
-            return '--'
+
+        // 允许删除考核
+        allowDeleteExamine() {
+            if (this.isCreator && this.detailInfo && this.status == 1 || this.getRole1 && this.detailInfo && this.status == 1) return true
+            else return false
+        },
+
+        // 允许添加指标
+        allowAddIndicator() {
+            if (this.isCreator && this.detailInfo && this.status == 0 || this.getRole1 && this.detailInfo && this.status == 0) return true
+            else return false
+        },
+
+        // 允许删除指标,重新发起这个指标的考核
+        allowDeleteIndicator() {
+            if (this.isCreator || this.getRole1 ) return true
+            else return false
+        },
+
+        // 允许重置指标流程
+        allowResetIndicator() {
+            if (this.isCreator || this.getRole1) return true
+            else return false
         },
-        finish_status() {
-            if (this.tableData && this.tableData.length > 0) {
-                return this.tableData.filter(data => data.businessStatus === 'end').length
-            }
-            return '--'
-        }
-    },
 
-    created() {
-        
     },
 
+    created() {},
+
     mounted() {
         if (this.sendEmployeeId) {
             this.params.employeeId = this.sendEmployeeId
         } else {
             this.params.employeeId = this.user_info.id
         }
-        if (this.reviewId) this.getDetails(this.reviewId)
-        else this.getTemplateList();
+        if (this.reviewId) {
+            this.getDetails(this.reviewId)
+            this.logReviewId = this.reviewId
+        } else this.getTemplateList();
     },
 
     beforeDestroy() {
@@ -396,17 +481,77 @@ 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)
+                if (res.code == 1) {
+                    this.$message.success("操作成功")
+                } else {
+                    this.$message.error("操作失败")
+                }
+            })
+        },
+
 
         // 过程跟踪
         getProcessTracing(row) {
             this.showData = row;
             this.showHandlerDialogVisible = true
         },
+
+        // 流程重置
+        openResetNodeDialog(row) {
+            this.initRow = row
+            this.resetNodeDialogVisible = true;
+        },
+
+        // 添加指标
+        openAddIndicatorDialog(row) {
+            this.initRow = row
+            this.addIndicatorDialogVisible = true;
+        },
+
+        // 确认操作
+        handleConfirm(row, type) {
+            // 删除指标
+            if (type == 2) {
+                let url = `/performance/review/indicator/remove/${this.user_info.site_id}/${row.reviewId}/${row.reviewIndicatorId}`
+                this.$http.post(url).then(res => {
+                    if (res.code == 1) {
+                        this.$message.success("操作成功")
+                        this.getDetails(this.logReviewId)
+                    } else {
+                        this.$message.success("操作失败")
+                    }
+                })
+            // 重新发起
+            } else {
+                let url = `/performance/review/indicator/repost/${this.user_info.site_id}/${row.reviewId}/${row.reviewIndicatorId}`
+                this.$http.post(url).then(res => {
+                    if (res.code == 1) {
+                        this.$message.success("操作成功")
+                        this.getDetails(this.logReviewId)
+                    } else {
+                        this.$message.success("操作失败")
+                    }
+                })
+            }
+            this.$refs.popoverRef.doClose();
+        },
+
+        // 取消操作
+        handleCancel() {},
+
+        
         handleChange(value) {
             if (value[1]) this.getDetails(value[1]);
         },
 
         choosePerformItem(item) {
+            this.logReviewId = item.reviewId
             this.getDetails(item.reviewId)
         },
 
@@ -426,6 +571,7 @@ export default {
                         that.performList = list;
                         let { reviewId } = that.performList[0] || '';
                         if (reviewId) that.getDetails(reviewId);
+                        this.logReviewId = reviewId
                         that.total = total
                     }
                 } else {
@@ -644,7 +790,12 @@ export default {
     }
 }
 
-
+.dropdown-box {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+}
 
 
 .performance {

+ 824 - 0
src/newPerformance/components/MyPerformance/AddIndicator.vue

@@ -0,0 +1,824 @@
+<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>

+ 179 - 0
src/newPerformance/components/MyPerformance/ExamineLog.vue

@@ -0,0 +1,179 @@
+<template>
+    <el-dialog title="考核操作日志" :visible.sync="examineLogDialogVisible" width="800px" :before-close="dialogBeforeClose"
+        append-to-body>
+        <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 }}
+                            </div>
+                            <div class="flex-box-ce" v-else>
+                                系统操作
+                            </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="params.page"
+                    :page-size="params.pageSize" :page-sizes="[10, 20, 30, 40]" layout="total, prev, pager, next"
+                    :total="total">
+                </el-pagination>
+            </div>
+        </div>
+    </el-dialog>
+
+</template>
+
+<script>
+import { mapGetters } from 'vuex';
+export default {
+    model: {
+        prop: 'examineLogDialogVisible',
+        event: 'close-dialog'
+    },
+    props: {
+        examineLogDialogVisible: {
+            type: Boolean,
+            default: false
+        },
+        reviewId: {
+            type: String | Number,
+            default: ''
+        },
+        reviewIndicatorId: {
+            type: String | Number,
+            default: ''
+        }
+    },
+
+    watch: {
+        examineLogDialogVisible(v) {
+            if (v) {
+                this.params.reviewIndicatorId = this.reviewIndicatorId
+                this.getTableData()
+            }
+        }
+    },
+
+    data() {
+        return {
+            loading: false,
+            tableData: [],
+            total: 0,
+            params: {
+                reviewIndicatorId: '',
+                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}/${this.reviewId}`
+            if (!this.params.reviewIndicatorId) delete this.params.reviewIndicatorId
+            this.$axiosUser("get", url, this.params).then(res => {
+                this.tableData = res.data.data.list;
+                this.total = res.data.data.total
+                this.loading = false;
+            })
+        },
+
+        dialogBeforeClose() {
+            this.$emit('close-dialog', false)
+        },
+
+        handleSizeChange(val) {
+            this.params.pageSize = val
+            this.getTableData();
+        },
+
+        handleCurrentChange(val) {
+            this.params.page = val;
+            this.getTableData();
+
+        }
+    }
+}
+</script>
+
+<style scoped lang="scss">
+.all {
+    width: 100%;
+    min-height: 500px;
+    overflow-y: auto;
+    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>

+ 172 - 0
src/newPerformance/components/MyPerformance/ResetNode.vue

@@ -0,0 +1,172 @@
+<template>
+    <el-dialog title="请选择目标节点" :visible.sync="resetNodeDialogVisible" width="600px" :before-close="dialogBeforeClose"
+        append-to-body>
+        <div>
+            <div class="currentNode">
+                当前任务节点:
+                <span v-if="handleRow.businessStatus === 'target_confirm'">确认目标</span>
+                <span v-if="handleRow.businessStatus === 'result_input'">录入结果</span>
+                <span v-if="handleRow.businessStatus === 'score_self'">自评</span>
+                <span v-if="handleRow.businessStatus === 'score_each_other'">互评</span>
+                <span v-if="handleRow.businessStatus === 'score'">评分</span>
+                <span v-if="handleRow.businessStatus === 'review'">审批</span>
+            </div>
+
+            <div style="margin-bottom: 10px;">
+                请在下方选择需要重置的目标节点
+            </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>
+
+        </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>
+import { mapGetters } from 'vuex';
+export default {
+    model: {
+        prop: 'resetNodeDialogVisible',
+        event: 'close-dialog'
+    },
+    props: {
+        resetNodeDialogVisible: {
+            type: Boolean,
+            default: false
+        },
+
+        handleRow: {
+            type: Object,
+            default: () => {}
+        }
+    },
+
+
+    computed: {
+        ...mapGetters(['user_info']),
+        // 可选的节点
+        optionalNodes() {
+            let index = this.allStatus.findIndex(item => item === this.handleRow.businessStatus)
+            return this.selectNodes.splice(0, index)
+        }
+    },
+
+    data() {
+        return {
+            targetNodeId: "",
+            selectNodes: ['targetConfirms', 'resultInput', 'scoreSelf', 'scoreEachOther', 'scores', 'reviews'],
+            allStatus: ['target_confirm', 'result_input', 'score_self', 'score_each_other', 'score', 'review']
+         }
+    },
+
+    methods: {
+
+        chooseNode(item) {
+            if (!item.enable) {
+                this.targetNodeId = ''
+                return
+            }
+            this.targetNodeId = item.id
+        },
+
+
+
+        dialogBeforeClose() {
+            this.$emit('close-dialog', false)
+        },
+
+        confirm() {
+            if (!this.targetNodeId) return this.$message.error("请选择目标节点")
+            let url = `/performance/review/flow/reset/${this.user_info.site_id}`
+            let data = {
+                reviewIndicatorId: this.handleRow.reviewIndicatorId,
+                targetNodeId: this.targetNodeId
+            }
+            this.$http.post(url, data).then(res => {
+                if (res.code == 1) {
+                    this.dialogBeforeClose();
+                    this.$message.success("操作成功")
+                    this.$emit('finished');
+                } else {
+                    this.$message.success("操作失败")
+                }
+            })
+        },
+
+        cancel() {
+            this.$emit('close-dialog', false)
+        }
+    }
+}
+</script>
+
+
+<style scoped lang="scss">
+    .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;
+        }
+    }
+
+</style>

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

@@ -25,9 +25,9 @@
 
         </div>
 
-
         <el-alert class="bounce animated" type="warning" :title="alertTilte" :closable="false" show-icon
             style="width: 100%; margin-top: 10px;"></el-alert>
+            
         <div class="table-box">
             <el-table v-loading="loading" ref="multipleTable" id="myTable" :data="tableData" style="width: 100%; "
                 :header-cell-style="{ background: '#f5f7fa' }" border stripe @selection-change="handleSelectChange">

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

@@ -0,0 +1,139 @@
+<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>

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

@@ -0,0 +1,296 @@
+<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>

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

@@ -0,0 +1,84 @@
+<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>

+ 7 - 2
src/newPerformance/components/PerformSetting.vue

@@ -37,7 +37,7 @@ export default {
             this.currentIdnex = index
         }
     }
-        
+
 }
 
 </script>
@@ -53,10 +53,12 @@ export default {
     background-color: #fff;
     display: flex;
     flex-direction: column;
+
     .tabs {
         display: flex;
         align-items: center;
         justify-content: center;
+
         .tab-item {
             width: 120px;
             height: 40px;
@@ -66,15 +68,18 @@ export default {
             align-items: center;
             justify-content: center;
             color: #409EFF;
+
             &:hover {
                 cursor: pointer;
             }
+
             &:first-child {
                 margin-right: 10px;
             }
 
-            
+
         }
+
         .active {
             background-color: #409EFF;
             color: white;

+ 0 - 164
src/newPerformance/components/PerformanceInterview copy.vue

@@ -1,164 +0,0 @@
-<template>
-    <div class="all">
-        <el-card>
-            <el-descriptions :column="3" border style="margin-bottom: 10px;">
-                <el-descriptions-item>
-                    <template slot="label">
-                        用户名
-                    </template>
-                    kooriookami
-                </el-descriptions-item>
-                <el-descriptions-item>
-                    <template slot="label">
-                        用户名
-                    </template>
-                    kooriookami
-                </el-descriptions-item>
-                <el-descriptions-item>
-                    <template slot="label">
-                        用户名
-                    </template>
-                    kooriookami
-                </el-descriptions-item>
-
-                <el-descriptions-item>
-                    <template slot="label">
-                        用户名
-                    </template>
-                    kooriookami
-                </el-descriptions-item>
-                <el-descriptions-item>
-                    <template slot="label">
-                        用户名
-                    </template>
-                    kooriookami
-                </el-descriptions-item>
-                <el-descriptions-item>
-                    <template slot="label">
-                        用户名
-                    </template>
-                    kooriookami
-                </el-descriptions-item>
-
-                <el-descriptions-item>
-                    <template slot="label">
-                        用户名
-                    </template>
-                    kooriookami
-                </el-descriptions-item>
-                <el-descriptions-item>
-                    <template slot="label">
-                        用户名
-                    </template>
-                    kooriookami
-                </el-descriptions-item>
-                <el-descriptions-item>
-                    <template slot="label">
-                        用户名
-                    </template>
-                    kooriookami
-                </el-descriptions-item>
-            </el-descriptions>
-        </el-card>
-
-        <el-row :gutter="10" class="flex-1">
-            <el-col :span="20" style="height: 100%;">
-                <el-row :gutter="10" style="height: 70%; margin-bottom: 10px;">
-                    <el-col :span="12" style="height: 100%;">
-                        <el-card style="height: 100%;">
-                            <div slot="header">主持人记录</div>
-                            <div></div>
-                        </el-card>
-                    </el-col>
-                    <el-col :span="12" style="height: 100%;">
-                        <el-card style="height: 100%;">
-                            <div slot="header">考核人记录</div>
-                            <div></div>
-                        </el-card>
-                    </el-col>
-                </el-row>
-                <el-row :gutter="10" style="height: 30%;">
-                    <el-col :span="24" style="height: 100%;">
-                        <el-card style="height: 100%;">
-                            <div style="height: 80%;">
-                                <el-input type="textarea" v-model="value" placeholder="" style="height: 100%;" rows="5"
-                                    cols="4"></el-input>
-                            </div>
-                            <div style="height: 20%;"><el-button>发送</el-button></div>
-                        </el-card>
-                    </el-col>
-                </el-row>
-            </el-col>
-
-
-            <el-col :span="4" style="height: 100%;">
-                <el-card style="height: 100%;" >
-                    <div slot="header">聊天记录</div>
-                    <div>
-                        <div class="chat-item flex-box-ce" v-for="item in chatList" :key="item.logId">
-                            <userImage :id="item.employeeId" :img_url="item.imgUrl" :user_name="item.employeeName"
-                                width="30px" height="30px"></userImage>
-
-                            {{ item.employeeName }} {{ item.ct }}
-                        </div>
-                    </div>
-                </el-card>
-            </el-col>
-        </el-row>
-    </div>
-</template>
-
-<script>
-import { mapGetters } from 'vuex';
-
-export default {
-    data() {
-        return {
-            value: '',
-            chatList: []
-        }
-    },
-
-    created() {
-        this.getChatList()
-    },
-    computed: {
-        ...mapGetters(['user_info'])
-    },
-    methods: {
-        getChatList() {
-            let url = `/performance/interview/chat/logs/${this.user_info.site_id}/7`
-            this.$axiosUser('get', url).then(res => {
-                this.chatList = res.data.data.list
-                console.log(res.data.data.list)
-                // let { data: { title, levelName, indicators, startTime, endTime }, code } = res.data
-                // this.title = title || "默认标题";
-                // this.startTime = startTime || '';
-                // this.endTime = endTime || '';
-                // this.levelName = levelName || '';
-                // this.tableData = indicators || [];
-            });
-        }
-    }
-}
-</script>
-
-<style scoped lang="scss">
-.all {
-    width: 100%;
-    height: 100%;
-    position: relative;
-    box-sizing: border-box;
-    background: #f0f4fa;
-    display: flex;
-    flex-direction: column;
-
-    .chat-item {
-        margin-bottom: 10px;
-        background: #f7f7f7;
-        border-radius: 4px;
-        padding: 5px;
-        box-sizing: border-box;
-    }
-}
-</style>

+ 27 - 17
src/newPerformance/components/ProcessTracking.vue

@@ -17,7 +17,7 @@
                     <el-date-picker class="cursor" v-if="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"></el-date-picker>
+                        value-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">
@@ -108,7 +108,6 @@
                 </div>
             </div>
 
-
             <div class="table-box">
                 <el-table id="myTable" :data="filteredData" style="width: 100%; height: auto;"
                     :header-cell-style="{ background: '#f5f7fa' }" border stripe>
@@ -183,8 +182,6 @@
 
 </template>
 
-
-
 <script>
 let that;
 import { mapGetters } from 'vuex';
@@ -192,7 +189,6 @@ import moment from 'moment';
 import TargetListComp from "@/performance/views/assessManagement/TargetListComp.vue"; // 关联OKR弹框
 import EmployeeSelector from '@/components/EmployeeSelector'; // 部门选择
 import MyPerformance from './MyPerformance'; // 我的考核
-
 import XLSX from 'xlsx';
 import FileSaver from 'file-saver';
 
@@ -229,10 +225,12 @@ export default {
                 {
                     value: -1,
                     label: '全部'
-                }, {
+                },
+                {
                     value: '0',
                     label: '未完成'
-                }, {
+                },
+                {
                     value: '1',
                     label: '已完成'
                 }
@@ -402,39 +400,50 @@ export default {
 
         // 周期筛选
         changeCycleType(v) {
-            if (v !== '0') { 
+            // 未定义
+            if (v == '0') { 
+                console.log("未定义")
                 this.params.startDate = ''
                 this.params.endDate = ''
-            } else if (v == 1) {
-                // console.log("-----------", 'cycleValue' in this.params)
+            // 年度
+            } else if (v == '1') {
+                console.log("年度")
                 this.params.year = this.currentYear
                 this.cycleValue = ''
                 if ('cycleValue' in this.params) delete this.params.cycleValue
-            } else if (v == 2) {
+            // 半年度
+            } else if (v == '2') {
+                console.log("半年度")
                 this.params.year = this.currentYear
                 this.params = { ...this.params, cycleValue: this.cycleValue }
-            } else if (v == 3) {
+            // 季度
+            } else if (v == '3') {
+                console.log("季度")
                 this.params.year = this.currentYear
                 this.params = { ...this.params, cycleValue: this.cycleValue }
-            } else if (v == 4) {
+            // 月度
+            } else if (v == '4') {
+                console.log("月度")
                 this.params.year = this.currentYear
                 this.params = { ...this.params, cycleValue: this.cycleValue }
             }
             this.getRecords();
-
         },
 
-        // 周期筛选
+        // 日期控件筛选
         changeDate(v) {
             if (v && v.length > 0) {
                 this.dateRange[0] = v[0]
                 this.dateRange[1] = v[1]
                 this.params.startDate = v[0]
                 this.params.endDate = v[1]
+                this.cycleValue = ''
+                if ('cycleValue' in this.params) delete this.params.cycleValue
                 this.getRecords();
             }
         },
 
+        // 年份筛选
         changeYear(v) {
             this.params.year = v;
             this.params.startDate = ''
@@ -442,14 +451,14 @@ export default {
             this.getRecords();
         },
 
+        // 月份筛选
         changeCycleValue(v) {
             this.params = { ...this.params, cycleValue: this.cycleValue }
             this.getRecords();
-
         },
 
+        //部门选择
         dept_confirm(data) {
-            //部门选择
             this.dept_selected = { dept: [], employee: [] };
             this.deptVisibleName = '';
             let deptList_id = [];
@@ -752,6 +761,7 @@ export default {
     }
 }
 
+
 /* 默认鼠标样式为箭头指针 */
 .record-container {
     width: 100%;

+ 433 - 0
src/newPerformance/components/PublicComp/AIAssistant.vue

@@ -0,0 +1,433 @@
+<template>
+    <div>
+        <!-- 悬浮按钮 -->
+
+        <button @click="toggleChat" class="chat-button">
+            <img src="@/assets/robot.png" alt="AI助理">
+            <div>AI助理</div>
+        </button>
+
+        <!-- 聊天弹窗 -->
+        <transition name="fade">
+            <div v-if="isChatOpen" class="chat-popup">
+                <div class="chat-header">
+                    <h3 class="flex-box-ce">
+                        <img src="@/assets/robot.png" alt="AI助理" style="width: 36px; height: 36px; margin-right: 10px;">
+                        <div>AI助理</div>
+                    </h3>
+                    <button @click="toggleChat" class="close-button">关闭</button>
+                </div>
+                <div class="chat-body" ref="chatBody">
+                    <div v-for="(message, index) in messages" :key="index" class="message">
+                        <!-- 用户消息 -->
+                        <div v-if="message.question" class="message-item user-message">
+                            <div class="message-bubble" style="margin-left: auto;">
+                                <div class="triangle"></div>
+                                <p class="question">{{ message.question }}</p>
+                            </div>
+                            <img :src="userInfo.img_url" class="avatar user-avatar" alt="用户头像" />
+                        </div>
+
+
+                        <!-- 客服消息 -->
+                        <div v-if="message.content" class="message-item customer-message">
+                            <img src="@/assets/robot.png" class="avatar customer-avatar" alt="客服头像" />
+                            <div class="message-bubble" style="background-color: #007bff; color: white;">
+                                <div class="triangle"></div>
+                                <p v-html="message.content"></p>
+                            </div>
+                        </div>
+
+                    </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-button style="margin-top: 10px;" :loading="loading" type="primary" icon="el-icon-position" @click="send"
+                            size="mini">发送</el-button>
+                </div>
+            </div>
+        </transition>
+    </div>
+</template>
+
+<script>
+import marked from 'marked';
+import DOMPurify from 'dompurify';
+import hljs from 'highlight.js';
+import 'highlight.js/styles/default.css'; // 引入代码高亮样式
+
+
+// 配置 marked 以支持代码高亮
+marked.setOptions({
+    renderer: new marked.Renderer(),
+    highlight: function (code, lang) {
+        const language = hljs.getLanguage(lang) ? lang : 'plaintext';
+        return hljs.highlight(code, { language }).value;
+    },
+    langPrefix: 'hljs language-', // highlight.js 的样式前缀
+    pedantic: false,
+    gfm: true,
+    breaks: false,
+    sanitize: false,
+    smartLists: true,
+    smartypants: false,
+    xhtml: false
+});
+
+
+export default {
+    data() {
+        return {
+            userInfo: JSON.parse(localStorage.getItem("userInfo")) || {},
+            es: null,
+            loading: false,
+            text: "",
+            isChatOpen: false,
+            messages: [],
+            newMessage: ""
+        };
+    },
+
+    mounted() {
+        if (this.es) this.es.close();
+        this.es = null;
+    },
+
+    unmounted() {
+        if (this.es) this.es.close();
+    },
+
+    methods: {
+        send() {
+            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 = 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.text = ''
+                this.$nextTick(() => {
+                    this.scrollToBottom();
+                });
+            };
+
+
+            this.es.onerror = (event) => {
+                console.error(event)
+                this.messages.push({
+                    id: 'no_answer',
+                    sourceContent:  '',
+                    sourceReasoningContent:  '',
+                    content: '很抱歉,不能回答您这个问题,请稍后重试!',
+                    reasoningContent: '',
+                    question: this.text
+                })
+
+                this.es.close();
+            }
+        },
+
+        scrollToBottom() {
+            const chatBody = this.$refs.chatBody;
+            if (chatBody) {
+                chatBody.scrollTop = chatBody.scrollHeight;
+            }
+        },
+
+
+        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;
+    box-sizing: border-box;
+    z-index: 999;
+    img {
+        width: 50px;
+        height: 50px;
+    }
+}
+
+/* 聊天弹窗样式 */
+.chat-popup {
+    position: fixed;
+    bottom: 0;
+    right: 0;
+    width: 600px;
+    height: 700px;
+    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;
+    box-sizing: border-box;
+}
+
+.close-button {
+    background-color: #ff4d4f;
+    color: white;
+    border: none;
+    border-radius: 5px;
+    padding: 5px 10px;
+    cursor: pointer;
+    box-sizing: border-box;
+}
+
+.chat-body {
+    height: 480px;
+    overflow-y: auto;
+    padding: 10px;
+    border-bottom: 1px solid #eee;
+    box-sizing: border-box;
+    /* 设置滚动条的宽度和背景色 */
+    &::-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;
+    }
+}
+
+.chat-footer {
+    width: 100%;
+    height: 210px;
+    padding: 10px;
+    box-sizing: border-box;
+    display: flex;
+    flex-direction: column;
+    align-items: flex-start;
+    justify-content: flex-start;
+
+    input {
+        width: 100%;
+        height: 100px;
+        padding: 0 15px;
+        box-sizing: border-box;
+    }
+
+    // button {
+    //     width: 60px;
+    //     height: 30px;
+    //     text-align: center;
+    //     line-height: 30px;
+    //     margin: 10px 0;
+    //     border: none;
+    //     background-color: #007bff;
+    //     color: white;
+    //     border-radius: 6px;
+    // }
+}
+
+.message {
+    width: 100%;
+}
+
+.message-item {
+    width: 100%;
+    display: flex;
+    margin-bottom: 10px;
+}
+
+.avatar {
+    width: 40px;
+    height: 40px;
+    border-radius: 50%;
+    margin: 0 10px;
+}
+
+.customer-avatar {
+    align-self: flex-start;
+}
+
+.user-avatar {
+    align-self: flex-start;
+}
+
+
+.message-bubble {
+    position: relative;
+    padding: 10px 20px;
+    background-color: #f1f1f1;
+    border-radius: 5px;
+    max-width: 80%;
+    display: flex;
+    align-items: center;
+    white-space: wrap;
+    .question {
+        width: auto;
+        word-wrap: break-word;
+        /* 允许在单词内换行 */
+        word-break: break-all;
+        /* 强制在单词内换行 */
+    }
+}
+
+.triangle {
+    position: absolute;
+    width: 0;
+    height: 0;
+    border: 10px solid transparent;
+}
+
+.customer-message .triangle {
+    top: 10px;
+    left: -20px;
+    border-right-color: #007bff;
+
+}
+
+.user-message .triangle {
+    top: 10px;
+    right: -20px;
+    border-left-color: #f1f1f1;
+}
+
+
+/* 去除默认样式 */
+input {
+    border: none;
+    outline: none;
+    padding: 0;
+    margin: 0;
+    -webkit-appearance: none;
+    -moz-appearance: none;
+    appearance: none;
+    background-image: none;
+    background-color: transparent;
+    font-size: inherit;
+}
+
+input:focus {
+    outline: none;
+}
+
+/* 自定义样式 */
+.mo-input {
+    color: #606266;
+    background-color: #fff;
+    border-radius: 4px;
+    margin-bottom: 10px;
+    border: 1px solid #dcdfe6;
+    box-sizing: border-box;
+    display: inline-block;
+    transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
+}
+
+/* 提示文字 */
+.mo-input::placeholder {
+    color: #c0c4cc;
+}
+
+/* 鼠标hover */
+.mo-input:hover {
+    border-color: #c0c4cc;
+}
+
+/* 获得焦点 */
+.mo-input:focus {
+    border-color: #3677f0;
+}
+</style>

+ 10 - 9
src/newPerformance/components/PublicComp/ShowData.vue

@@ -2,8 +2,7 @@
     <div class="show-data-box" v-if="selectNodes">
         <div v-if="showData.enable">
             <template v-if="showData.children && showData.children.length > 0">
-
-                <div class="item" v-for="(item, index) in showData.children" :key="item.id">
+                <div class="item" :style="compStyle" v-for="(item, index) in showData.children" :key="item.id">
                     <!-- 指定人员 -->
                     <el-button v-if="item.assigneeType == 'user'" style="margin-bottom: 5px;" type="primary" plain round
                         size="mini" @click="btnClick(index)">
@@ -45,7 +44,7 @@
                 </div>
             </template>
             <template v-else>
-                <div class="item">
+                <div class="item" :style="compStyle">
                     <!-- 指定人员 -->
                     <el-button v-if="showData.assigneeType == 'user'" style="margin-bottom: 5px;" type="primary" plain
                         round size="mini" @click="btnClick('-1')">
@@ -86,7 +85,6 @@
                 </div>
             </template>
         </div>
-        <!-- <el-switch v-else></el-switch> -->
     </div>
 </template>
 
@@ -101,6 +99,14 @@ export default {
             type: Object,
             default: () => {}
         },
+        compStyle: {
+            type: Object,
+            default: () => ({
+                flexDirection: 'column',
+                alignItems: 'center',
+                justifyContent: 'center'
+            })
+        },
         readonly: {
             type: Boolean,
             default: false
@@ -191,13 +197,8 @@ export default {
 
 <style scoped lang="scss">
     .show-data-box {
-        // width: 100%;
-        // height: 100%;
         .item {
             display: flex;
-            flex-direction: column;
-            align-items: center;
-            justify-content: center;
         }
     }
 </style>

+ 0 - 623
src/newPerformance/components/PublicComp/ShowHanderDialog2 copy.vue

@@ -1,623 +0,0 @@
-<template>
-    <el-dialog :title="dialogTitle" center :visible.sync="showHandlerDialogVisible" width="600px"
-        :before-close="handleCloseDialog">
-        <div>
-            <ol class="steps scroll-bar" style="width: 100%; height: 500px; overflow-y: auto;">
-                <template v-for="node in showData.nodes">
-                    <template v-if="node.type === 'targetConfirms'">
-                        <template v-if="node.enable">
-                            <li class="title" :class="showData.businessStatus === 'target_confirm' ? 'active' : ''">
-                                1.确认目标{{ showData.businessStatus === 'target_confirm' ? '(进行中)' : '' }}
-                            </li>
-                            <li class="info-box">
-                                <div class="line"></div>
-                                <div class="content" v-if="node.children && node.children.length > 0">
-                                    <div class="content-info" v-for="child in node.children" :key="child.id">
-                                        <div class="user-type" v-if="child.tasks && child.tasks.length > 0">
-                                            {{ child.assigneeType | filterType }}
-                                        </div>
-                                        <div class="task-info" v-if="child.tasks && child.tasks.length > 0">
-                                            <div class="info" v-for="task in child.tasks" :key="task.taskId">
-                                                <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">1.确认目标</li>
-                            <li class="info-box">
-                                <div class="line"></div>
-                                <div class="content">
-                                    未启用
-                                </div>
-                            </li>
-                        </template>
-                    </template>
-
-                    <template v-if="node.type === 'resultInput'">
-                        <template v-if="node.enable">
-                            <li class="title" :class="showData.businessStatus === 'result_input' ? 'active' : ''">
-                                2.录入结果{{ showData.businessStatus === 'result_input' ? '(进行中)' : '' }}
-                            </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 }},结果值:{{ task.result || '--'}}
-                                                </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 class="files" v-if="task.files && task.files.length > 0">
-                                                <div class="file-title">附件列表</div>
-                                                <div class="file-list">
-                                                    <div class="file-item" v-for="file in task.files"
-                                                        @click="openFileReview2(file)">
-                                                        {{ file | filterFileName }}
-                                                    </div>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-
-
-                                </div>
-                                <div v-else class="content">
-                                    未开始
-                                </div>
-                            </li>
-                        </template>
-                        <template v-if="!node.enable">
-                            <li class="title">2.录入结果</li>
-                            <li class="info-box">
-                                <div class="line"></div>
-                                <div class="content">
-                                    未启用
-                                </div>
-                            </li>
-                        </template>
-
-                    </template>
-
-                    <template v-if="node.type === 'scoreSelf'">
-                        <template v-if="node.enable">
-                            <li class="title" :class="showData.businessStatus === 'score_self' ? 'active' : ''">
-                                3.自评{{ showData.businessStatus === 'score_self' ? '(进行中)' : '' }}
-                            </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 }},评分:{{ task.score || '--' }}
-                                                </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 class="files" v-if="task.files && task.files.length > 0">
-                                                <div class="file-title">附件列表</div>
-                                                <div class="file-list">
-                                                    <div class="file-item" v-for="file in task.files"
-                                                        @click="openFileReview2(file)">
-                                                        {{ file | filterFileName }}
-                                                    </div>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                                <div v-else class="content">
-                                    未开始
-                                </div>
-                            </li>
-                        </template>
-                        <template v-if="!node.enable">
-                            <li class="title">3.自评</li>
-                            <li class="info-box">
-                                <div class="line"></div>
-                                <div class="content">
-                                    未启用
-                                </div>
-                            </li>
-                        </template>
-
-                    </template>
-
-                    <template v-if="node.type === 'scoreEachOther'">
-                        <template v-if="node.enable">
-                            <li class="title" :class="showData.businessStatus === 'score_each_other' ? 'active' : ''">
-                                4.互评{{ showData.businessStatus === 'score_each_other' ? '(进行中)' : '' }}
-                            </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 }},评分:{{ task.score || '--' }}
-                                                </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 class="files" v-if="task.files && task.files.length > 0">
-                                                <div class="file-title">附件列表</div>
-                                                <div class="file-list">
-                                                    <div class="file-item" v-for="file in task.files"
-                                                        @click="openFileReview2(file)">
-                                                        {{ file | filterFileName }}
-                                                    </div>
-                                                </div>
-                                            </div>
-
-                                        </div>
-                                    </div>
-                                </div>
-                                <div v-else class="content">
-                                    未开始
-                                </div>
-                            </li>
-                        </template>
-                        <template v-if="!node.enable">
-                            <li class="title">4.互评</li>
-                            <li class="info-box">
-                                <div class="line"></div>
-                                <div class="content">
-                                    未启用
-                                </div>
-                            </li>
-                        </template>
-
-                    </template>
-
-                    <template v-if="node.type === 'scores'">
-                        <template v-if="node.enable">
-                            <li class="title" :class="showData.businessStatus === 'score' ? 'active' : ''">
-                                5.评分{{ showData.businessStatus === 'score' ? '(进行中)' : '' }}
-                            </li>
-                            <li class="info-box">
-                                <div class="line"></div>
-                                <div class="content" v-if="node.children && node.children.length > 0">
-                                    <div class="content-info" v-for="child in node.children" :key="child.id">
-                                        <div class="user-type" v-if="child.tasks && child.tasks.length > 0">
-                                            {{ child.assigneeType | filterType }}
-                                        </div>
-                                        <div class="task-info" v-if="child.tasks && child.tasks.length > 0">
-                                            <template v-for="task in child.tasks">
-                                                <div class="info" :key="task.taskId">
-                                                    <div class="info-left">
-                                                        <span
-                                                            :class="task.state === 'created' ? 'orange-color' : 'green-color'">
-                                                            {{ task.state === 'created' ? '进行中' : '已完成' }},
-                                                        </span>
-                                                        {{ task.assigneeName }},评分:{{ task.score }}
-                                                    </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 class="files" v-if="task.files && task.files.length > 0">
-                                                    <div class="file-title">附件列表</div>
-                                                    <div class="file-list">
-                                                        <div class="file-item" v-for="file in task.files"
-                                                            @click="openFileReview2(file)">
-                                                            {{ file | filterFileName }}
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                            </template>
-                                        </div>
-                                        <div v-else>
-                                            未开始
-                                        </div>
-                                    </div>
-
-                                </div>
-
-                            </li>
-                        </template>
-                        <template v-if="!node.enable">
-                            <li class="title">5.评分</li>
-                            <li class="info-box">
-                                <div class="line"></div>
-                                <div class="content">
-                                    未启用
-                                </div>
-                            </li>
-                        </template>
-
-                    </template>
-
-                    <template v-if="node.type === 'reviews'">
-                        <template v-if="node.enable">
-                            <li class="title" :class="showData.businessStatus === 'review' ? 'active' : ''">
-                                6.审批{{ showData.businessStatus === 'review' ? '(进行中)' : '' }}
-                            </li>
-                            <li class="info-box">
-                                <div class="line"></div>
-                                <div class="content" v-if="node.children && node.children.length > 0">
-
-                                    <div class="content-info" v-for="child in node.children" :key="child.id">
-                                        <div class="user-type" v-if="child.tasks && child.tasks.length > 0">
-                                            {{ child.assigneeType | filterType }}
-                                        </div>
-                                        <div class="task-info" v-if="child.tasks && child.tasks.length > 0">
-
-                                            <template v-for="task in child.tasks">
-                                                <div class="info" :key="task.taskId">
-                                                    <div class="info-left">
-                                                        <span
-                                                            :class="task.state === 'created' ? 'orange-color' : 'green-color'">
-                                                            {{ task.state === 'created' ? '进行中' : '已完成' }},
-                                                        </span>
-                                                        {{ task.assigneeName }},评分:{{ task.score }}
-                                                    </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 class="files" v-if="task.files && task.files.length > 0">
-                                                    <div class="file-title">附件列表</div>
-                                                    <div class="file-list">
-                                                        <div class="file-item" v-for="file in task.files"
-                                                            @click="openFileReview2(file)">
-                                                            {{ file | filterFileName }}
-                                                        </div>
-                                                    </div>
-                                                </div>
-                                            </template>
-
-
-                                        </div>
-                                        <div v-else>
-                                            未开始
-                                        </div>
-                                    </div>
-                                </div>
-                            </li>
-                        </template>
-                        <template v-if="!node.enable">
-                            <li class="title">6.审批</li>
-                            <li class="info-box">
-                                <div class="line"></div>
-                                <div class="content">
-                                    未启用
-                                </div>
-                            </li>
-                        </template>
-
-                    </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>
-
-
-            </ol>
-            <div style="height: 50px;"></div>
-        </div>
-    </el-dialog>
-</template>
-
-<script>
-
-export default {
-    model: {
-        prop: 'showHandlerDialogVisible',
-        event: 'close-dialog'
-    },
-    props: {
-        showHandlerDialogVisible: {
-            type: Boolean,
-            default: false
-        },
-        dialogTitle: {
-            type: String,
-            default: ''
-        },
-        status: {
-            type: String,
-            default: 'completed'
-        },
-        showData: {
-            type: [],
-            default: () => []
-        }
-    },
-    
-    filters: {
-        filterType(v) {
-            if (v == 'leader') return v = "管理员"
-            if (v == 'self') return v = "被考核人"
-            if (v == 'post') return v = "岗位"
-            if (v == 'user') return v = "指定人员"
-            if (v == 'deptLeader') return v = "部门"
-        },
-
-        filterFileName(str) {
-            if (str) {
-                let lastIndex = str.lastIndexOf("/")
-                return str.substr(lastIndex + 1, str.length - 1);
-            }
-        }
-    },
-
-    
-    methods: {
-        handleCloseDialog() {
-            this.$emit('close-dialog', false)
-        },
-        openFileReview2(file) {
-            window.open(file, '_blank');
-        },
-    }
-}
-
-</script>
-
-<style scoped lang="scss">
-.oneLine {
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-}
-.green-color {
-    color: #67c23a;
-}
-
-.orange-color {
-    color: #e6a23c;
-}
-
-.gray-color {
-    color: rgb(144, 147, 153);
-    background: rgb(244, 244, 245);
-    border-color: rgb(144, 147, 153);
-}
-
-
-
-.show-data-box {
-
-    .item-list {
-        .item {
-
-            .value-box {
-                margin-bottom: 5px;
-
-                .content {
-                    display: flex;
-                    align-items: center;
-                    justify-content: space-between;
-
-                    &-left {
-                        display: flex;
-                        align-items: center;
-
-                        &-status {}
-                    }
-                }
-            }
-        }
-    }
-}
-
-.steps {
-    display: flex;
-    flex-direction: column;
-    margin: 0;
-    padding: 0;
-    .title {
-        width: 100%;
-        height: 30px;
-        font-weight: 600;
-        color: #000;
-    }
-    .info-box {
-        display: flex;
-        margin: 10px 0;
-
-        .line {
-            margin: 0 20px;
-            width: 1px;
-            border: 1px dashed #ccc;
-        }
-
-        .content {
-            width: 90%;
-            background-color: #f7f7f7;
-            padding: 10px;
-            box-sizing: border-box;
-            color: #999;
-            &-info {
-                display: flex;
-                flex-direction: column;
-                .user-type {
-                    width: 100px;
-                    display: flex;
-                    align-items: center;
-                    justify-content: center;
-                    border-radius: 30px;
-                    border: 1px solid;
-                    height: 30px;
-                    color: #409eff;
-                    background: #ecf5ff;
-                    border-color: #b3d8ff;
-                }
-                .task-info {
-                    margin: 5px;
-                    color: #999;
-                    .info {
-                        width: 100%;
-                        height: 30px;
-                        display: flex;
-                        align-items: center;
-                        justify-content: space-between;
-                        .info-right {
-                            width: 120px;
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-}
-
-.active {
-    color: #409eff !important;
-}
-
-
-.files {
-    display: flex;
-    flex-direction: column;
-    border-radius: 6px;
-
-    .file-title {
-        color: #999;
-        font-weight: 600;
-    }
-
-    .file-item {
-        color: #999;
-        transition: 0.2s;
-        padding-left: 10px;
-        &:hover {
-            text-decoration: underline;
-            cursor: pointer;
-        }
-    }
-}
-
-</style>

+ 31 - 4
src/newPerformance/components/PublicComp/ShowHanderDialog2.vue

@@ -1,7 +1,8 @@
 <template>
     <el-dialog title="指标审批详情" center :visible.sync="showHandlerDialogVisible" width="600px"
-        :before-close="handleCloseDialog" append-to-body :close-on-press-escape="true" >
-        <div>
+        :before-close="handleCloseDialog" append-to-body :close-on-press-escape="true">
+        <div class="dialog-box">
+            <el-link type="primary" @click="getLogDetails()">操作日志</el-link>
             <ol class="steps scroll-bar" style="width: 100%; height: 500px; overflow-y: auto;">
                 <template v-for="node in showData.nodes">
                     <template v-if="node.type === 'targetConfirms'">
@@ -427,13 +428,19 @@
             <div style="height: 50px;"></div>
         </div>
 
-        
+        <ExamineLogDialog v-if="examineLogDialogVisible" v-model="examineLogDialogVisible" :reviewId="reviewId"
+            :reviewIndicatorId="reviewIndicatorId">
+        </ExamineLogDialog>
+
     </el-dialog>
 </template>
 
 <script>
-
+import ExamineLogDialog from '@/newPerformance/components/MyPerformance/ExamineLog'; // 考核日志
 export default {
+    components: {
+        ExamineLogDialog
+    },
     model: {
         prop: 'showHandlerDialogVisible',
         event: 'close-dialog'
@@ -460,6 +467,9 @@ export default {
     data() {
         return {
             imgUrl: "",
+            examineLogDialogVisible: false,
+            reviewIndicatorId: "",
+            reviewId: ""
         }
     },
     
@@ -485,6 +495,8 @@ export default {
         handleCloseDialog() {
             this.$emit('close-dialog', false)
         },
+
+        // 文件预览
         openFileReview2(url) {
             let file = {
                 url
@@ -506,6 +518,13 @@ export default {
                 }
             }
         },
+
+
+        getLogDetails() {
+            this.reviewIndicatorId = this.showData.reviewIndicatorId
+            this.reviewId = this.showData.reviewId
+            this.examineLogDialogVisible = true
+        },
     }
 }
 
@@ -531,7 +550,15 @@ export default {
     border-color: rgb(144, 147, 153);
 }
 
+.dialog-box {
+    position: relative;
+}
 
+.el-link {
+    position: absolute;
+    top: -60px;
+    left: 0px;
+}
 
 .show-data-box {
 

+ 6 - 6
src/newPerformance/components/TemplateDetails/BatchHandleNode.vue

@@ -177,20 +177,20 @@
                         </el-input>
                     </el-form-item>
 
-                    <el-form-item v-if="['确认目标'].includes(dialogTitle)" label="允许">
+                    <el-form-item v-if="['确认目标', '评分', '审批'].includes(dialogTitle)" 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"
-                                v-if="['确认目标', '评分', '审批'].includes(dialogTitle)">转交</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>
                     </el-form-item>
 
-                    <!-- <el-form-item v-if="['录入结果'].includes(dialogTitle)" label="允许">
+                    <el-form-item v-if="['录入结果', '自评', '互评'].includes(dialogTitle)" 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-item>
 
 
                 </el-form>

+ 23 - 12
src/newPerformance/components/TemplateDetails/EditContent.vue

@@ -1,6 +1,7 @@
 <template>
     <div>
-        <el-dialog title="编辑规则" center :visible.sync="showEditContent" width="600px" :before-close="handleCloseDialog">
+        <el-dialog title="编辑规则" center :visible.sync="showEditContent" width="600px" :before-close="handleCloseDialog"
+            append-to-body>
             <div class="flex-box-ce" style="justify-content: center;">
                 <el-input type="textarea" v-model="editContent" placeholder="编辑规则(按回车可以添加行号)" clearable :rows="10"
                     @keyup.enter.native="addLineNumber()"></el-input>
@@ -38,6 +39,10 @@ export default {
             type: String | Number,
             default: ''
         },
+        noRequest: {
+            type: Boolean,
+            default: false
+        }
     },
     data() {
         return {
@@ -68,17 +73,23 @@ export default {
         },
 
         handleEdit() {
-            let url = '', data = {};
-            url = `/performance/indicator/content/${this.user_info.site_id}/${this.templateId}`;
-            data['content'] = this.editContent;
-            data['indicatorId'] = this.indicatorId;
-            this.$http.post(url, data).then(res => {
-                if (res.code == 1) {
-                    this.$emit('close-dialog', false);
-                    this.$emit('finishEdit', res.data.content);
-                }
-                if (res.code == 0) return this.$message.error(res.msg || '操作失败')
-            })
+            if (this.noRequest) {
+                this.$emit('close-dialog', false);
+                this.$emit('finishEdit', this.editContent);
+            } else {
+                let url = '', data = {};
+                url = `/performance/indicator/content/${this.user_info.site_id}/${this.templateId}`;
+                data['content'] = this.editContent;
+                data['indicatorId'] = this.indicatorId;
+                this.$http.post(url, data).then(res => {
+                    if (res.code == 1) {
+                        this.$emit('close-dialog', false);
+                        this.$emit('finishEdit', res.data.content);
+                    }
+                    if (res.code == 0) return this.$message.error(res.msg || '操作失败')
+                })
+            }
+            
         },
         // 关闭弹窗
         handleCloseDialog() {

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

@@ -1,7 +1,7 @@
 <template>
     <div>
         <el-dialog :title="dialogTitle" center :visible.sync="resultInput" width="600px"
-            :before-close="handleCloseDialog">
+            :before-close="handleCloseDialog" append-to-body>
             <div v-if="currentNode">
                 <el-form ref="form" label-width="80px" size="small">
                     <el-form-item label="启用">
@@ -80,12 +80,11 @@
                         </div>
                     </div>
 
-
-                    <!-- <el-form-item label="允许">
+                    <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-item>
                 </el-form>
             </div>
             <div slot="footer">

+ 4 - 3
src/newPerformance/components/TemplateDetails/Reviews.vue

@@ -1,6 +1,7 @@
 <template>
     <div>
-        <el-dialog :title="dialogTitle" center :visible.sync="reviews" width="600px" :before-close="handleCloseDialog">
+        <el-dialog :title="dialogTitle" center :visible.sync="reviews" width="600px" :before-close="handleCloseDialog"
+            append-to-body>
             <div v-if="isShow">
                 <el-form ref="form" label-width="80px" size="small">
                     <el-form-item label="启用">
@@ -88,12 +89,12 @@
                         </div>
                     </div>
 
-                    <!-- <el-form-item label="允许">
+                    <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-item>
                 </el-form>
             </div>
             <div slot="footer">

+ 8 - 51
src/newPerformance/components/TemplateDetails/ScoreEachOther.vue

@@ -1,63 +1,20 @@
 <template>
     <div>
         <el-dialog :title="dialogTitle" center :visible.sync="scoreEachOther" width="600px"
-            :before-close="handleCloseDialog">
+            :before-close="handleCloseDialog" append-to-body>
             <div v-if="currentNode">
                 <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="formLabel">
-                        <el-radio-group v-model="currentNode.assigneeType" :disabled="!currentNode.enable">
-                            <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 v-if="currentNode.assigneeType === 'leader'">
-                        <el-select v-model="selected_manager_ids" placeholder="请选择管理员" :disabled="!currentNode.enable"
-                            filterable style="width: 300px;" @change="changeManagerIds">
-                            <el-option v-for="item in levelOptions" :key="item.value" :label="item.label"
-                                :value="item.value" style="width: 300px;"></el-option>
-                        </el-select>
-                    </el-form-item>
-
-                    <el-form-item v-if="currentNode.assigneeType === 'user'">
-                        <el-select v-model="selected_employee_ids" placeholder="请选择指定人员" multiple
-                            :disabled="!currentNode.enable" filterable style="width: 300px;"
-                            @change="changeEmployeeIds">
-                            <el-option v-for="item in employeeMap" :key="item.id" :label="item.name" :value="item.id"
-                                style="width: 300px;"></el-option>
-                        </el-select>
-                    </el-form-item>
-
-                    <el-form-item v-if="currentNode.assigneeType === 'post'">
-                        <el-select v-model="selected_post_ids" placeholder="请选择岗位" multiple
-                            :disabled="!currentNode.enable" filterable style="width: 300px;" @change="changePostIds">
-                            <el-option v-for="item in postList" :key="item.id" :label="item.name" :value="item.id"
-                                style="width: 300px;"></el-option>
-                        </el-select>
-                    </el-form-item>
-
-                    <el-form-item v-if="currentNode.assigneeType === 'deptLeader'">
-                        <el-cascader ref="deptSelectRef" v-model="selected_dept_ids" size="small" style="width: 300px;"
-                            :options="deptList" :props="cascaderProps" placeholder="请选择部门" filterable clearable
-                            @change="deptChange" :disabled="!currentNode.enable"></el-cascader>
-                    </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-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>
             </div>
             <div slot="footer">

+ 130 - 0
src/newPerformance/components/TemplateDetails/ScoreSelf.vue

@@ -0,0 +1,130 @@
+<template>
+    <div>
+        <el-dialog :title="dialogTitle" center :visible.sync="scoreEachOther" width="600px"
+            :before-close="handleCloseDialog" append-to-body>
+            <div v-if="currentNode">
+                <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-group>
+                    </el-form-item> 
+                   
+                </el-form>
+            </div>
+            <div slot="footer">
+                <el-button type="primary" @click="submitForm" size="small">确 定</el-button>
+                <el-button @click="handleCloseDialog" size="small">取 消</el-button>
+            </div>
+        </el-dialog>
+
+    </div>
+</template>
+
+<script>
+import { mapGetters } from 'vuex';
+// 引入lodash库
+import _ from 'lodash';
+export default {
+    model: {
+        prop: 'scoreEachOther',
+        event: 'close-dialog'
+    },
+    props: {
+        scoreEachOther: {
+            type: Boolean,
+            default: false
+        },
+        dialogTitle: {
+            type: String,
+            default: ''
+        },
+        nodeType: {
+            type: String,
+            default: ''
+        },
+        formLabel: {
+            type: String,
+            default: ''
+        },
+        templateId: {
+            type: String | Number,
+            default: ''
+        },
+        indicatorId: {
+            type: String | Number,
+            default: ''
+        },
+        tagIndex: {
+            type: String | Number,
+            default: 0
+        },
+        selectNodes: {
+            type: Array,
+            default: () => []
+        }
+    },
+    computed: {
+        ...mapGetters(['user_info'])
+    },
+    data() {
+        return {
+            currentNode: null
+        }
+    },
+    
+    watch: {
+        'scoreEachOther'(v) {
+            if (v) this.initData()
+        },
+
+    },
+    mounted() {
+        this.initData();
+    },
+    methods: {
+        
+
+        initData() {
+            this.selectNodes.forEach(select => {
+                // 正在操作的节点
+                if (select.type == this.nodeType) this.currentNode = _.cloneDeep(select)
+            })
+        },
+
+       
+        handleCloseDialog() {
+            this.currentNode = null;
+            this.$emit('close-dialog', false)
+        },
+        submitForm() {
+            
+            let nodes = []
+            this.selectNodes.forEach(select => {
+                // 正在操作的节点
+                if (select.type == this.nodeType) {
+                    select = this.currentNode
+                }
+                nodes.push(select)
+            })
+            let data = {
+                indicatorId: this.indicatorId, // 指标ID
+                nodes
+            }
+            this.$emit("onConfirm", data);
+            this.handleCloseDialog();
+        },
+        handleFormData() {
+
+        }
+    }
+}
+
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 3 - 3
src/newPerformance/components/TemplateDetails/Scores.vue

@@ -1,6 +1,6 @@
 <template>
     <div>
-        <el-dialog :title="dialogTitle" center :visible.sync="scores" width="600px" :before-close="handleCloseDialog">
+        <el-dialog :title="dialogTitle" center :visible.sync="scores" width="600px" :before-close="handleCloseDialog" append-to-body>
             <div v-if="currentNode">
                 <el-form ref="form" label-width="80px" size="small">
                     <el-form-item label="启用">
@@ -100,12 +100,12 @@
                         </el-input>
                     </el-form-item>
 
-                    <!-- <el-form-item label="允许">
+                    <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-item>
                 </el-form>
             </div>
             <div slot="footer">

+ 2 - 2
src/newPerformance/components/TemplateDetails/TargetConfirms.vue

@@ -1,7 +1,7 @@
 <template>
     <div>
         <el-dialog :title="dialogTitle" center :visible.sync="targetConfirms" width="600px"
-            :before-close="handleCloseDialog">
+            :before-close="handleCloseDialog" append-to-body>
             <div v-if="currentNode">
                 <el-form ref="form" label-width="80px" size="small">
                     <el-form-item label="启用">
@@ -93,7 +93,7 @@
                         <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-button label="transfer">转交</el-checkbox-button>
                         </el-checkbox-group>
                     </el-form-item>
                 </el-form>

+ 43 - 11
src/newPerformance/components/Workbench.vue

@@ -12,6 +12,7 @@
                                 <span>{{ tab.title }}</span>
                             </el-badge>
                         </span>
+
                         <span slot="label" v-else>
                             <div class="tab-title">
                                 <span>{{ tab.title }}</span>
@@ -163,6 +164,7 @@
                     </div>
 
                 </div>
+
                 <div style="max-height: 300px;">
                     <div class="user-info-box flex-box-ce" style="flex-direction: column;">
                         <userImage :id="user_info.id" :img_url="user_info.img_url" :user_name="user_info.name"
@@ -209,7 +211,8 @@
 
         <!-- 编辑流程节点 -->
         <EditNodeDialog v-if="dialogData" v-model="dialogVisible" :activeName="activeName" :dialogTitle="dialogTitle"
-            :dialogData="dialogData" @handleSuccess="getNewList" @handleEditSuccess="changeDialogData" />
+            :dialogData="dialogData" :node-type="nodeType" @handleSuccess="getNewList"
+            @handleEditSuccess="changeDialogData" />
 
         <!-- 面谈流程节点 -->
         <InterviewNodeDialog v-if="interviewNodeVisible" v-model="interviewNodeVisible" :activeName="activeName"
@@ -226,6 +229,7 @@
                 <MyPerformance v-if="detailDialogVisible" :reviewId="reviewId" :sendEmployeeId='sendEmployeeId' />
             </div>
         </el-dialog>
+
     </div>
 </template>
 
@@ -250,6 +254,7 @@ export default {
     },
     data() {
         return {
+            nodeType: '',
             isDetailBtnShow: false,
             day: moment().format('YYYY-MM-DD'),
             editableTabs: [
@@ -302,7 +307,8 @@ export default {
             currentReviewId: null,
             performInfo: null,
             userMain: [],
-            currentNotification: null
+            currentNotification: null,
+            
         };
     },
 
@@ -480,6 +486,7 @@ export default {
             if (val) return moment(val).format('YYYY-MM-DD')
             else return "--"
         },
+
         getMyTemplateList() {
             let that = this
             let url = `/performance/statistics/reviews/${that.user_info.site_id}`
@@ -508,6 +515,7 @@ export default {
                 }
             });
         },
+
         more() {
             if (this.activeName == 0 || this.activeName == 10) {
                 if (this.activeName == 0)
@@ -518,6 +526,8 @@ export default {
                 this.$router.push({ path: "/moreNode/" + this.activeName })
             }
         },
+
+
         handleCateDetailsClose() {
             this.cateDetailsDialog = false
         },
@@ -555,8 +565,7 @@ export default {
                 })
             })
         },
-        cancelDelete() {
-        },
+        cancelDelete() {},
 
         addTemplate() {
             this.$axiosUser('post', `/performance/template/create/${this.user_info.site_id}`).then(res => {
@@ -638,13 +647,36 @@ export default {
             } else {
                 // 新绩效系统数据 处理待办事项
                 if (item.type == 1) {
-                    if (this.activeName == 1) this.dialogTitle = "确认目标";
-                    if (this.activeName == 2) this.dialogTitle = "录入结果";
-                    if (this.activeName == 3) this.dialogTitle = "自评";
-                    if (this.activeName == 4) this.dialogTitle = "互评";
-                    if (this.activeName == 5) this.dialogTitle = "评分";
-                    if (this.activeName == 6) this.dialogTitle = "审批";
-                    if (this.activeName == 7) this.dialogTitle = "面谈";
+                    if (this.activeName == 1) {
+                        this.dialogTitle = "确认目标";
+                        this.nodeType = 'targetConfirms'
+                    }
+                    
+                    if (this.activeName == 2) {
+                        this.dialogTitle = "录入结果";
+                        this.nodeType = 'resultInput'
+                    }
+
+                    if (this.activeName == 3) {
+                        this.dialogTitle = "自评";
+                        this.nodeType = 'scoreSelf'
+                    }
+
+                    if (this.activeName == 4) {
+                        this.dialogTitle = "互评";
+                        this.nodeType = 'scoreEachOther'
+                    }
+
+                    if (this.activeName == 5) {
+                        this.dialogTitle = "评分";
+                        this.nodeType = 'scores'
+                    }
+
+                    if (this.activeName == 6) {
+                        this.dialogTitle = "审批";
+                        this.nodeType = 'reviews'
+                    }
+
                     if (['1', '2', '3', '4', '5', '6'].includes(this.activeName)) {
                         this.dialogVisible = true;
                         let url = `/performance/review/job/${this.user_info.site_id}/${item.jobNew.reviewIndicatorId}/${item.jobNew.taskId}`;

+ 0 - 1007
src/newPerformance/components/Workbench/EditNode copy.vue

@@ -1,1007 +0,0 @@
-<template>
-    <div>
-        <el-dialog :title="dialogTitle" center :visible.sync="dialogVisible" width="1000px"
-            :before-close="dialogBeforeClose">
-            <div class="status-btn-box fadeInDown animated">
-                <div class="status-btn" :class="reviewStatus == 0 ? 'green-color' : 'gray-color'">
-                    {{ reviewStatus == 0 ? '进行中' : '已结束' }}
-                </div>
-            </div>
-            <div class="dialog-content" v-loading="loading">
-                <div class="dialog-content-left scroll-bar" style="min-height: 500px; overflow-y: auto;">
-                    <!-- 附加属性 -->
-                    <div v-if="dialogData.expand && dialogData.expand.length > 0" class="tips">自定义属性(只有通过excel上传发布的指标才有)
-                    </div>
-                    <table v-if="dialogData.expand && dialogData.expand.length > 0">
-                        <tr>
-                            <td v-for="item in dialogData.expand" :key="item.p">{{ item.k }}</td>
-                        </tr>
-                        <tr>
-                            <td v-for="item in dialogData.expand" :key="item.p">{{ item.v }}</td>
-                        </tr>
-                    </table>
-                    <!-- 附加属性 -->
-
-                    <!-- 基本信息 -->
-                    <el-descriptions :column="2" size="large" :border="true" style="width: 100%; margin-bottom: 5px;">
-                        <el-descriptions-item>
-                            <template slot="label">
-                                <i class="el-icon-user"></i>
-                                考核人
-                            </template>
-                            {{ dialogData.task && dialogData.task.assigneeName || '--' }}
-                        </el-descriptions-item>
-                        <el-descriptions-item>
-                            <template slot="label">
-                                <i class="el-icon-eleme"></i>
-                                考核名称
-                            </template>
-                            {{ dialogData.reviewTitle }}
-                        </el-descriptions-item>
-                        <el-descriptions-item>
-                            <template slot="label">
-                                <i class="el-icon-date"></i>
-                                周期类型
-                            </template>
-                            <el-tag size="small">{{ dialogData.cycleType | formatCycleType }}</el-tag>
-
-                        </el-descriptions-item>
-
-                        <el-descriptions-item>
-                            <template slot="label">
-                                <i class="el-icon-date"></i>
-                                考核周期
-                            </template>
-                            {{ dialogData.startTime | formatDate }} 至 {{ dialogData.endTime | formatDate }}
-                        </el-descriptions-item>
-
-
-                        <el-descriptions-item>
-                            <template slot="label">
-                                <i class="el-icon-date"></i>
-                                指标
-                            </template>
-                            {{ dialogData.title }}
-                        </el-descriptions-item>
-
-                        <el-descriptions-item>
-                            <template slot="label">
-                                <i class="el-icon-date"></i>
-                                目标
-                            </template>
-                            {{ dialogData.target }}
-                        </el-descriptions-item>
-
-                        <el-descriptions-item>
-                            <template slot="label">
-                                <i class="el-icon-date"></i>
-                                单位
-                            </template>
-                            {{ dialogData.unit }}
-                        </el-descriptions-item>
-
-                        <el-descriptions-item>
-                            <template slot="label">
-                                <i class="el-icon-date"></i>
-                                权重(%)
-                            </template>
-                            {{ dialogData.weight }}
-                        </el-descriptions-item>
-
-                        <el-descriptions-item>
-                            <template slot="label">
-                                <i class="el-icon-date"></i>
-                                结果值
-                            </template>
-                            {{ dialogData.result }}
-                        </el-descriptions-item>
-
-                        <el-descriptions-item>
-                            <template slot="label">
-                                <i class="el-icon-date"></i>
-                                最终评分
-                            </template>
-                            {{ dialogData.score }}
-                        </el-descriptions-item>
-
-                        <el-descriptions-item :span="2">
-                            <template slot="label">
-                                <i class="el-icon-date"></i>
-                                规则
-                            </template>
-                            {{ dialogData.content }}
-                        </el-descriptions-item>
-
-                        <el-descriptions-item :span="2">
-                            <template slot="label">
-                                <i class="el-icon-s-flag"></i>
-                                确认目标
-                            </template>
-                            <div class="content">
-                                <template v-if="confirmTargetTasks && confirmTargetTasks.length > 0">
-                                    <template v-for="task in confirmTargetTasks">
-                                        <div class="item" :key="task.taskId" style="margin-bottom: 5px;">
-
-                                            <div v-if="task.state === 'created'" style="color: #e6a23c">
-
-                                                <el-tooltip effect="dark" placement="right">
-                                                    <div slot="content">
-                                                        进行中
-                                                    </div>
-                                                    <i class="el-icon-reading"></i>
-                                                </el-tooltip>
-                                                {{ task.assigneeName }}
-                                            </div>
-                                            <div v-if="task.state === 'completed'" style="color: #67C23A">
-                                                <el-tooltip effect="dark" placement="right">
-                                                    <div slot="content">
-                                                        已完成
-                                                    </div>
-                                                    <i class="el-icon-check"></i>
-                                                </el-tooltip>
-                                                {{ task.assigneeName }}
-                                            </div>
-                                            <div v-if="task.comment" style="width: 140px; color: #999;">
-                                                <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>
-
-                                    </template>
-
-                                </template>
-                            </div>
-                        </el-descriptions-item>
-
-                        <el-descriptions-item :span="2">
-                            <template slot="label">
-                                <i class="el-icon-s-flag"></i>
-                                录入结果
-                            </template>
-                            <div class="content">
-                                <template v-if="resultInputTasks && resultInputTasks.length > 0">
-                                    <template v-for="task in resultInputTasks">
-                                        <div class="item" :key="task.taskId" style="margin-bottom: 5px;">
-                                            <div v-if="task.state === 'created'" style="color: #e6a23c">
-                                                <el-tooltip effect="dark" placement="right">
-                                                    <div slot="content">
-                                                        进行中
-                                                    </div>
-                                                    <i class="el-icon-reading"></i>
-                                                </el-tooltip>
-                                                {{ task.assigneeName }}
-                                                录入结果: {{ task.result || '--' }}
-                                            </div>
-                                            <div v-if="task.state === 'completed'" style="color: #67C23A">
-                                                <el-tooltip effect="dark" placement="right">
-                                                    <div slot="content">
-                                                        已完成
-                                                    </div>
-                                                    <i class="el-icon-check"></i>
-                                                </el-tooltip>
-                                                {{ task.assigneeName }}
-                                                录入结果: {{ task.result || '--' }}{{ dialogData.unit }}
-                                            </div>
-                                            <div v-if="task.comment" style="width: 140px; color: #999;">
-                                                <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>
-
-                                    </template>
-                                </template>
-                            </div>
-                        </el-descriptions-item>
-
-
-                        <el-descriptions-item :span="2">
-                            <template slot="label">
-                                <i class="el-icon-s-flag"></i>
-                                自评
-                            </template>
-                            <div class="content">
-                                <template v-if="scoreSelfTasks && scoreSelfTasks.length > 0">
-                                    <template v-for="task in scoreSelfTasks">
-                                        <div class="item" :key="task.taskId" style="margin-bottom: 5px;">
-                                            <div v-if="task.state === 'created'" style="color: #e6a23c">
-                                                <el-tooltip effect="dark" placement="right">
-                                                    <div slot="content">
-                                                        进行中
-                                                    </div>
-                                                    <i class="el-icon-reading"></i>
-                                                </el-tooltip>
-                                                {{ task.assigneeName }}
-                                                {{ task.score || '--' }}
-                                            </div>
-                                            <div v-if="task.state === 'completed'" style="color: #67C23A">
-                                                <el-tooltip effect="dark" placement="right">
-                                                    <div slot="content">
-                                                        已完成
-                                                    </div>
-                                                    <i class="el-icon-check"></i>
-                                                </el-tooltip>
-                                                {{ task.assigneeName }}
-                                                评分:{{ task.score || '--' }}分
-                                            </div>
-                                            <div v-if="task.comment" style="width: 140px; color: #999;">
-                                                <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>
-                                    </template>
-                                </template>
-                            </div>
-                        </el-descriptions-item>
-
-                        <el-descriptions-item :span="2">
-                            <template slot="label">
-                                <i class="el-icon-s-flag"></i>
-                                互评
-                            </template>
-                            <div class="content">
-                                <template v-if="scoreEachOtherTasks && scoreEachOtherTasks.length > 0">
-                                    <template v-for="task in scoreEachOtherTasks">
-                                        <div class="item" :key="task.taskId" style="margin-bottom: 5px;">
-                                            <div v-if="task.state === 'created'" style="color: #e6a23c">
-                                                <el-tooltip effect="dark" placement="right">
-                                                    <div slot="content">
-                                                        进行中
-                                                    </div>
-                                                    <i class="el-icon-reading"></i>
-                                                </el-tooltip>
-                                                {{ task.assigneeName }}
-                                                {{ task.score || '--' }}
-                                            </div>
-                                            <div v-if="task.state === 'completed'" style="color: #67C23A">
-                                                <el-tooltip effect="dark" placement="right">
-                                                    <div slot="content">
-                                                        已完成
-                                                    </div>
-                                                    <i class="el-icon-check"></i>
-                                                </el-tooltip>
-                                                {{ task.assigneeName }}
-                                                评分:{{ task.score || '--' }}分
-                                            </div>
-                                            <div v-if="task.comment" style="width: 140px; color: #999;">
-                                                <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>
-                                    </template>
-                                </template>
-                            </div>
-
-                        </el-descriptions-item>
-
-                        <el-descriptions-item :span="2">
-                            <template slot="label">
-                                <i class="el-icon-s-flag"></i>
-                                评分
-                            </template>
-                            <div class="content">
-                                <template v-if="scoreTasks && scoreTasks.length > 0">
-                                    <template v-for="task in scoreTasks">
-                                        <div class="item" :key="task.taskId" style="margin-bottom: 5px;">
-                                            <div v-if="task.state === 'created'" style="color: #e6a23c">
-                                                <el-tooltip effect="dark" placement="right">
-                                                    <div slot="content">
-                                                        进行中
-                                                    </div>
-                                                    <i class="el-icon-reading"></i>
-                                                </el-tooltip>
-
-                                                {{ task.assigneeName }}
-                                                {{ task.score || '--' }}
-                                            </div>
-                                            <div v-if="task.state === 'completed'" style="color: #67C23A">
-                                                <el-tooltip effect="dark" placement="right">
-                                                    <div slot="content">
-                                                        已完成
-                                                    </div>
-                                                    <i class="el-icon-check"></i>
-                                                </el-tooltip>
-                                                {{ task.assigneeName }}
-                                                {{ task.score || '--' }}分
-                                            </div>
-                                            <div v-if="task.comment" style="width: 140px; color: #999;">
-                                                <el-tooltip effect="dark" placement="right">
-                                                    <div v-html="task.comment" slot="content" style="max-width:300px">
-                                                    </div>
-                                                    <div class="oneLine" slot="reference">意见:{{ task.comment || '暂无意见'
-                                                        }}</div>
-                                                </el-tooltip>
-                                            </div>
-                                        </div>
-                                    </template>
-                                </template>
-                            </div>
-                        </el-descriptions-item>
-
-                        <el-descriptions-item :span="2">
-                            <template slot="label">
-                                <i class="el-icon-s-flag"></i>
-                                审批
-                            </template>
-
-                            <div class="content">
-                                <template v-if="reviewTasks && reviewTasks.length > 0">
-                                    <template v-for="task in reviewTasks">
-                                        <div class="item" :key="task.taskId" style="margin-bottom: 5px;">
-                                            <div v-if="task.state === 'created'" style="color: #67C23A">
-                                                <el-tooltip effect="dark" placement="right">
-                                                    <div slot="content">
-                                                        进行中
-                                                    </div>
-                                                    <i class="el-icon-reading"></i>
-                                                </el-tooltip>
-                                                {{ task.assigneeName }}
-                                                {{ task.score || '--' }}
-                                            </div>
-                                            <div v-if="task.state === 'completed'" style="color: #e6a23c">
-                                                <el-tooltip effect="dark" placement="right">
-                                                    <div slot="content">
-                                                        已完成
-                                                    </div>
-                                                    <i class="el-icon-check"></i>
-                                                </el-tooltip>
-                                                {{ task.assigneeName }}
-                                                最终分:{{ task.score || '--' }}分
-                                            </div>
-                                            <div v-if="task.comment" style="width: 140px; color: #999;">
-                                                <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>
-                                    </template>
-                                </template>
-                            </div>
-
-                        </el-descriptions-item>
-                    </el-descriptions>
-                    <!-- 基本信息 -->
-                    <div style="height: 50px;"></div>
-
-                </div>
-                <!-- 录入信息 -->
-                <div class="dialog-content-right">
-
-                    <div class="data-box" v-if="activeName == 1">
-                        <el-input v-model="formData && formData.title" placeholder="指标标题" style="width: 280px;"
-                            clearable @blur="handleEdit('title')" :disabled="!isEdit">
-                            <template slot="prepend">指标</template>
-                        </el-input>
-                    </div>
-
-
-                    <div class="data-box" v-if="activeName == 1" style="height: 120px;">
-                        <el-input type="textarea" v-model="formData && formData.content" placeholder="规则说明"
-                            style="width: 280px;" rows="4" cols="4" clearable @blur="handleEdit('content')"
-                            :disabled="!isEdit">
-                            <template slot="prepend">规则</template>
-                        </el-input>
-                    </div>
-
-
-                    <div class="data-box" v-if="activeName == 1">
-                        <el-input placeholder="目标值(数字)" oninput="value=value.replace(/[^\d.]/g,'')"
-                            v-model="formData && formData.target" style="width: 280px;" :disabled="!isEdit" clearable
-                            @blur="handleEdit('target')">
-                            <template slot="prepend">目标值</template>
-                        </el-input>
-                    </div>
-
-
-                    <div class="data-box" v-if="activeName == 1">
-                        <el-input placeholder="单位" v-model="formData && formData.unit" style="width: 280px;" clearable
-                            @blur="handleEdit('unit')" :disabled="!isEdit">
-                            <template slot="prepend">单位</template>
-                        </el-input>
-                    </div>
-
-                    <!-- <div class="data-box" v-if="activeName == 1">
-                        <div class="label">
-                            <i class="el-icon-s-check"></i>
-                            权重
-                        </div>
-                        <div class="value">
-                            <el-input placeholder="权重" v-model="formData.weight" style="width: 300px;" clearable
-                                @blur="handleEdit('weight')"></el-input>
-                        </div>
-                    </div> -->
-
-                    <div class="data-box" v-if="activeName == 2">
-                        <el-input placeholder="结果值" v-model="formData && formData.result" style="width: 280px;"
-                            clearable @blur="handleEdit('result')">
-                            <template slot="prepend">结果值</template>
-                        </el-input>
-                    </div>
-
-
-                    <!-- 自评 -->
-                    <div class="data-box" v-if="activeName == 3">
-                        <el-input :controls="false" placeholder="评分(数字)" oninput="value=value.replace(/[^\d.]/g,'')"
-                            v-model="formData && formData.task && formData.task.score" style="width: 280px;" clearable
-                            @blur="handleEdit('scoreSelf')">
-                            <template slot="prepend">评分</template>
-                        </el-input>
-                    </div>
-
-                    <!-- 互评 -->
-
-                    <div class="data-box" v-if="activeName == 4">
-                        <el-input placeholder="评分(数字)" oninput="value=value.replace(/[^\d.]/g,'')"
-                            v-model="formData && formData.task && formData.task.score" style="width: 280px;" clearable
-                            @blur="handleEdit('scoreEachOther')">
-                            <template slot="prepend">评分</template>
-                        </el-input>
-                    </div>
-
-
-                    <!-- 评分 -->
-                    <div class="data-box" v-if="activeName == 5">
-
-                        <div v-if="dialogData && dialogData.scoreExpression" class="flex-box-ce"
-                            style="margin-bottom: 10px; ">
-                            <div class="flex-box-ce">系统评分: {{ dialogData.scoreExpression }} </div>
-                            <el-link type="primary" style="margin-left: 20px;" @click="handleScore()">立即评分</el-link>
-                        </div>
-                        <el-input placeholder="评分(数字)" oninput="value=value.replace(/[^\d.]/g,'')"
-                            v-model="formData && formData.task && formData.task.score" style="width: 280px;" clearable
-                            @blur="handleEdit('score')">
-                            <template slot="prepend">评分</template>
-                        </el-input>
-                    </div>
-
-                    <!-- 审批 -->
-                    <div class="data-box" v-if="activeName == 6">
-                        <el-input disabled placeholder="最终分(数字)" oninput="value=value.replace(/[^\d.]/g,'')"
-                            v-model="formData && formData.score" style="width: 280px;" clearable>
-                            <template slot="prepend">最终分</template>
-                        </el-input>
-                    </div>
-
-                    <div class="data-box">
-                        <el-input type="textarea" v-model="comment" placeholder="请输入意见" style="width: 280px;" clearable
-                            rows="5" cols="3" @blur="confirmCommentDialog(1)"></el-input>
-                    </div>
-
-
-                </div>
-                <!-- 录入信息 -->
-            </div>
-            <div slot="footer">
-                <el-button v-if="activeName == 6" type="danger" @click="reset">驳 回</el-button>
-                <el-button type="primary" @click="confirmCommentDialog(2)">结束任务</el-button>
-            </div>
-        </el-dialog>
-
-        <!-- 输入意见 -->
-        <el-dialog title="意见" :visible.sync="commentDialog" width="500px" :before-close="beforCommentDialogClose">
-            <div>
-                <el-input type="textarea" v-model="comment" placeholder="请输入意见" rows="5" cols="5"></el-input>
-            </div>
-            <div slot="footer">
-                <el-button @click="commentDialog = false">取 消</el-button>
-                <el-button type="primary" @click="confirmCommentDialog">确 定</el-button>
-            </div>
-        </el-dialog>
-    </div>
-
-</template>
-
-
-<script>
-import moment from 'moment';
-import { mapGetters } from 'vuex';
-import cloneDeep from 'lodash.clonedeep';
-export default {
-    model: {
-        prop: 'dialogVisible',
-        event: 'close-dialog'
-    },
-    props: {
-        activeName: {
-            type: String,
-            default: "1"
-        },
-        dialogTitle: {
-            type: String,
-            default: ""
-        },
-        dialogVisible: {
-            type: Boolean,
-            default: false
-        },
-        dialogData: {
-            type: Object,
-            default: () => {}
-        }
-    },
-
-    watch: {
-        dialogData(v) {
-            if (this.dialogData) this.formData = cloneDeep(this.dialogData)
-        }
-    },
-    filters: {
-        formatCycleType(val) {
-            if (val == 0) return '未定义'
-            if (val == 1) return '年度'
-            if (val == 2) return '半年'
-            if (val == 3) return '季度'
-            if (val == 4) return '月度' 
-            else return '--' 
-        },
-        formatDate(val) {
-            if (val) return moment(val).format('YYYY-MM-DD')
-            else return "--"
-        }
-    },
-    data() {
-        return {
-            loading: false,
-            commentDialog: false,
-            comment: "",
-            score: 0,
-            reject: false,
-            formData: null, // 用于提交的数据,指标,目标,规则,
-            baseInfo: null // 用于展示的数据,指标,目标,规则,权重,标题
-        }
-    },
-    computed: {
-        ...mapGetters(['user_info']),
-        // 是否可以编辑
-        isEdit() {
-            let children = [], selectChild = null;
-            const { nodes = [] } = this.dialogData && this.dialogData.flow || {};
-            if (nodes && nodes.length > 0) {
-                nodes.forEach(node => {
-                    if (node.type === 'targetConfirms') {
-                        children = node.children
-                    }
-                })
-            }
-            if (children && children.length > 0) {
-                children.forEach(child => {
-                    if (child.assigneeIds && child.assigneeIds.length > 0) {
-                        child.assigneeIds.forEach(assigneeId => {
-                            if (assigneeId == this.user_info.id) {
-                                selectChild = child
-                            }
-                        })
-                    }
-                })
-            }
-            return selectChild && selectChild.allows && selectChild.allows.length > 0 && selectChild.allows.includes('edit')
-        },
-        // 整个审批的状态 0,进行中 1,已完成
-        reviewStatus() {
-            return this.dialogData && this.dialogData.reviewStatus
-        },
-        // 自评节点
-        scoreSelf() {
-            // 通过解构赋予默认值
-            const { nodes = [] } = this.dialogData && this.dialogData.flow || {};
-            if (nodes.length > 0) {
-                return this.dialogData.flow.nodes.find(node => node.type == 'scoreSelf')
-            }
-        },
-        // 互评节点
-        scoreEachOther() {
-            // 通过解构赋予默认值
-            const { nodes = [] } = this.dialogData && this.dialogData.flow || {};
-            if (nodes.length > 0) {
-                return this.dialogData.flow.nodes.find(node => node.type == 'scoreEachOther')
-            }
-        },
-        // 评分节点
-        scoreNode() {
-            // 通过解构赋予默认值
-            const { nodes = [] } = this.dialogData && this.dialogData.flow || {};
-            if (nodes.length > 0) {
-                return this.dialogData.flow.nodes.find(node => node.type == 'score')
-            }
-        },
-        
-        // 确认目标节点,处理人
-        confirmTargetTasks() {
-            const { nodes = [] } = this.dialogData && this.dialogData.flow || {};
-            if (nodes.length > 0) {
-                let node = nodes.find(node => node.type === 'targetConfirms');
-                let tasks = []
-                if (node.children && node.children.length > 0) {
-                    node.children.forEach(child => {
-                        if (child.tasks && child.tasks.length > 0) {
-                            child.tasks.forEach(task => {
-                                tasks.push(task)
-                            })
-                        }
-                    })
-                }
-                return tasks
-            }
-            
-        },
-        // 录入结果节点,处理人
-        resultInputTasks() {
-            const { nodes = [] } = this.dialogData && this.dialogData.flow || {};
-            if (nodes.length > 0) { 
-                let node = nodes.find(node => node.type === 'resultInput');
-                let tasks = []
-                if (node.tasks && node.tasks.length > 0) {
-                    node.tasks.forEach(task => {
-                        tasks.push(task)
-                    })
-                }
-                return tasks
-            }
-            
-        },
-        // 自评节点,处理人
-        scoreSelfTasks() {
-            const { nodes = [] } = this.dialogData && this.dialogData.flow || {};
-            if (nodes.length > 0) {
-                let node = nodes.find(node => node.type === 'scoreSelf');
-                let tasks = []
-                if (node.tasks && node.tasks.length > 0) {
-                    node.tasks.forEach(task => {
-                        tasks.push(task)
-                    })
-                }
-                return tasks
-            }
-            
-        },
-        // 互评节点,处理人
-        scoreEachOtherTasks() {
-            const { nodes = [] } = this.dialogData && this.dialogData.flow || {};
-            if (nodes.length > 0) {
-                let node = nodes.find(node => node.type === 'scoreEachOther');
-                let tasks = []
-                if (node.tasks && node.tasks.length > 0) {
-                    node.tasks.forEach(task => {
-                        tasks.push(task)
-                    })
-                }
-                return tasks
-            }
-        },
-        // 评分节点,处理人
-        scoreTasks() {
-            const { nodes = [] } = this.dialogData && this.dialogData.flow || {};
-            if (nodes.length > 0) {
-                let node = nodes.find(node => node.type === 'scores');
-                let tasks = []
-                if (node.children && node.children.length > 0) {
-                    node.children.forEach(child => {
-                        if (child.tasks && child.tasks.length > 0) {
-                            child.tasks.forEach(task => {
-                                tasks.push(task)
-                            })
-                        }
-                    })
-                }
-                return tasks
-            }
-            
-        },
-        // 审批节点,处理人
-        reviewTasks() {
-            const { nodes = [] } = this.dialogData && this.dialogData.flow || {};
-            if (nodes.length > 0) {
-                let node = nodes.find(node => node.type === 'reviews');
-                let tasks = []
-                if (node.children && node.children.length > 0) {
-                    node.children.forEach(child => {
-                        if (child.tasks && child.tasks.length > 0) {
-                            child.tasks.forEach(task => {
-                                tasks.push(task)
-                            })
-                        }
-                    })
-                }
-                return tasks
-            }
-            
-        }
-    },
-    mounted() {
-        if (this.dialogData) this.formData = cloneDeep(this.dialogData);
-        // if (this.dialogData) this.baseInfo = cloneDeep(this.dialogData);
-    },
-    methods: {
-
-        handleScore() {
-            this.formData.task.score = this.dialogData.scoreExpression
-        },
-        dialogBeforeClose() {
-            this.$emit('close-dialog', false)
-        },
-
-        beforCommentDialogClose() {
-            this.commentDialog = false;
-        },
-
-        changeCommentShow(item) {
-            console.log(item)
-            item.isCommentShow = true
-            console.log(item)
-
-        },
-
-        // 编辑节点
-        handleEdit(type) { 
-            this.loading = true
-            let { reviewIndicatorId } = this.dialogData
-            let { taskId, nodeType } = this.dialogData.task
-            let data = { taskId }
-            if (type === 'scoreSelf' || type === 'scoreEachOther' || type === 'score') {
-                data['score'] = this.formData.task['score'];
-            }
-            else data[type] = this.formData[type];
-            let url;
-            switch (nodeType) {
-                // 确认目标
-                case 'targetConfirm':
-                    url = `/performance/review/target/confirm/${type}/${this.user_info.site_id}/${reviewIndicatorId}`
-                    break;
-                // 录入结果值
-                case 'resultInput':
-                    url = `/performance/review/result/Input/${type}/${this.user_info.site_id}/${reviewIndicatorId}`
-                    break;
-                // 自评
-                case 'scoreSelf':
-                    url = `/performance/review/score/self/score/${this.user_info.site_id}/${reviewIndicatorId}`
-                    break;
-                // 互评
-                case 'scoreEachOther':
-                    url = `/performance/review/score/each/other/score/${this.user_info.site_id}/${reviewIndicatorId}`
-                    break; 
-                // 评分
-                case 'score':
-                    url = `/performance/review/score/score/${this.user_info.site_id}/${reviewIndicatorId}`
-                    break;  
-                default:
-                    break;
-            }  
-            this.$http.post(url, data).then(res => {
-                // console.log(res)
-                // { code: 0, message: '非法操作', data: null }
-                if (res.code == 1) {
-                    let { data } = res
-                    this.$emit('handleEditSuccess', data)
-                }
-                else this.$message.error(res.message || '操作失败');
-                this.loading = false
-            })
-        },
-
-        confirmCommentDialog(type) {
-            if(this.loading) return
-            let { reviewIndicatorId } = this.dialogData;
-            let { taskId, nodeType } = this.dialogData.task
-            let url;
-            switch (nodeType) {
-                case 'targetConfirm':
-                    url = `/performance/review/target/confirm/complete/${this.user_info.site_id}/${reviewIndicatorId}`
-                    break;
-                case 'resultInput':
-                    url = `/performance/review/result/Input/${this.user_info.site_id}/${reviewIndicatorId}`
-                    break;
-                // 自评
-                case 'scoreSelf':
-                    url = `/performance/review/score/self/${this.user_info.site_id}/${reviewIndicatorId}`
-                    break; 
-                // 互评
-                case 'scoreEachOther':
-                    url = `/performance/review/score/each/other/${this.user_info.site_id}/${reviewIndicatorId}`
-                    break;
-                // 评分
-                case 'score':
-                    url = `/performance/review/score/${this.user_info.site_id}/${reviewIndicatorId}`
-                    break;
-                case 'review':
-                    if (this.reject) url = `/performance/review/review/refuse/${this.user_info.site_id}/${reviewIndicatorId}`
-                    else url = `/performance/review/review/pass/${this.user_info.site_id}/${reviewIndicatorId}`
-                    break; 
-                default:
-                    break;
-            }
-            let data = {
-                taskId,
-                comment: this.comment,
-                complete: type == 1 ? false : true // false 暂存,true 提交
-            }
-            this.$http.post(url, data).then(res => {
-                if (type == 1) {
-                    if (res.code == 1) { }
-                    else this.$message.error(res.message || '操作失败');
-                } else {
-                    if (res.code == 1) {
-                        this.$message.success("操作成功");
-                        this.$emit("handleSuccess")
-                        this.$emit('close-dialog', false);
-                        this.commentDialog = false;
-                        this.comment = "";
-                        this.reject = false; // 驳回标识
-                    } else {
-                        this.$message.error(res.message || '操作失败');
-                    }
-                }
-                
-            })
-        },
-        // 驳回
-        reset() {
-            this.reject = true;
-            this.commentDialog = true;
-        },
-        // 提交
-        confirm() {
-            this.commentDialog = true;
-        },
-    }
-}
-
-</script>
-
-<style lang="scss">
-
-    .dialog-content { 
-        .el-descriptions-item__label {
-            width: 120px;
-        }
-    }
-
-    .oneLine {
-        overflow: hidden;
-        white-space: nowrap;
-        text-overflow: ellipsis;
-    }
-</style>
-
-
-<style scoped="scoped" lang="scss">
-.status-box {
-    padding: 2px;
-    display: inline-block;
-    border: 1px solid;
-    box-sizing: border-box;
-    border-radius: 4px;
-}
-.green-color {
-    border-color: #67C23A;
-    color: #67C23A;
-}
-
-
-.gray-color {
-    border-color: #f56c6c;
-    color: #f56c6c;
-}
-.status-btn-box {
-    width: 120px;
-    height: 40px;
-    z-index: 10;
-    position: absolute;
-    top: 20px;
-    left: 20px;
-    .status-btn {
-        width: 100%;
-        height: 100%;
-        background: transparent;
-        border: 2px dashed;
-        text-align: center;
-        font-size: 20px;
-        line-height: 40px;
-    }
-}
-.dialog-content {
-    width: 100%;
-    height: 450px;
-    display: flex;
-    .tips {
-        height: 30px;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        color: #999;
-        margin: 0 auto 10px auto;
-    }
-    .dialog-content-left, .dialog-content-right {
-        width: 65%;
-        height: 100%;
-        padding: 0 10px;
-        box-sizing: border-box;
-    }
-    .dialog-content-left {
-        border-right: 1px solid #ccc;
-        .content {
-            width: 100%;
-            // padding: 10px;
-            // background-color: #f7f7f7;
-            // color: #999;
-            .item {
-                display: flex;
-                align-items: center;
-                justify-content: space-between;
-                // font-size: 12px;
-            }
-        }
-    }
-    
-    .dialog-content-right {
-        width: 35%;
-    }
-    
-}
-table {
-    width: 100%;
-    border-collapse: collapse;
-    /* 合并表格边框 */
-    border: 1px solid #ccc;
-    /* 设置表格边框样式和颜色 */
-    margin: 0 auto 10px auto;
-    /* 设置表格外边距 */
-    background-color: #f8f8f8;
-    /* 设置表格背景颜色 */
-    color: #000;
-    /* 设置表格文字颜色 */
-    text-align: center;
-    /* 设置表格文字居中 */
-    line-height: 40px;
-    border-radius: 6px;
-
-    /* 设置表格行高 */
-    tr:nth-child(1) {
-        background-color: #f2f2f2;
-        /* 偶数行背景色 */
-    }
-
-    tr:nth-child(even) {
-        background-color: #fff;
-        /* 偶数行背景色 */
-    }
-
-    tr:nth-child(odd) {
-        background-color: #f2f2f2;
-        /* 奇数行背景色 */
-    }
-}
-
-.data-box {
-    width: 500px;
-    height: 60px;
-    margin-bottom: 10px;
-
-    .label {
-        width: 160px;
-        i {
-            font-size: 16px;
-            font-weight: 500;
-            margin-right: 5px;
-            color: #409EFF;
-        }
-    }
-
-    .value {
-        display: flex;
-        align-items: center;
-    }
-}
-</style>

+ 115 - 5
src/newPerformance/components/Workbench/EditNode.vue

@@ -272,8 +272,8 @@
             </div>
 
             <div slot="footer">
-                <el-button v-if="activeName == 6" type="danger" @click="reset" :disabled="isInputFocused">驳
-                    回</el-button>
+                <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 type="primary" @click="confirmCommentDialog(2)" :disabled="isInputFocused">提 交</el-button>
             </div>
 
@@ -305,6 +305,10 @@
             </span>
         </el-dialog>
         <!-- 图片查看 -->
+
+        <!-- 员工选择组件 -->
+        <EmployeeSelector :multi="false" :is_filtration_creator="false" :selected="employeeSelectedObj"
+            :isChecKedAll="false" :visible.sync="showEmployeeSelector" @confirm="onEmployeeSelected" />
     </div>
 
 </template>
@@ -317,10 +321,13 @@ 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';
+
 export default {
     components: {
         DetailsDialog,
-        uploadOss
+        uploadOss,
+        EmployeeSelector
     },
     model: {
         prop: 'dialogVisible',
@@ -331,6 +338,10 @@ export default {
             type: String,
             default: "1"
         },
+        nodeType: {
+            type: String,
+            default: ""
+        },
         dialogTitle: {
             type: String,
             default: ""
@@ -371,6 +382,8 @@ export default {
     },
     data() {
         return {
+            isCreator: this.$supremeAuthority('creator'), // 创始人,总经理
+            getRole1: this.$getRole(1), // 绩效主管理员,子管理员
             loading: false,
             isInputFocused: false,
             commentDialog: false,
@@ -387,18 +400,25 @@ export default {
             isShowImg: false, // 图片预览弹框
             imgUrl: '', // 预览图片地址
             isUploadFile: true,
+            showEmployeeSelector: false,
+            employeeSelectedObj: {
+                employee: [],
+                dept: []
+            },
         }
     },
+
     computed: {
         ...mapGetters(['user_info']),
 
         // 确认目标是否可以编辑
         isEdit() {
             let children = [], employeeIds = [];
-            let user_id = this.user_info.id.toString()
+            let user_id = this.user_info.id.toString() // 当前用户ID
             const { nodes = [] } = this.dialogData && this.dialogData.flow || {};
             if (nodes && nodes.length > 0)
                 children = nodes.find(node => node.type === 'targetConfirms').children
+
             children.forEach(child => {
                 // 是否允许编辑
                 if (child.allows.includes('edit')) {
@@ -416,6 +436,56 @@ export default {
             })
             return employeeIds && employeeIds.length > 0 && employeeIds.includes(user_id) ? true : false
         },
+
+        // 判断当前任务是否可以转交
+        isTransfer() {
+            let children = [], employeeIds = [], currentNode = null;
+            let user_id = this.user_info.id.toString() // 当前用户ID
+            const { nodes = [] } = this.dialogData && this.dialogData.flow || {};
+            if (nodes && nodes.length > 0) {
+                currentNode = nodes.find(node => node.type === this.nodeType)
+                // 有子节点
+                if (currentNode && currentNode.children && currentNode.children.length > 0) {
+                    children = currentNode.children
+                    children.forEach(child => {
+                        // 是否允许转交
+                        if (child.allows.includes('transfer')) {
+                            if (['leader', 'deptLeader', 'post', 'user'].includes(child.assigneeType)) {
+                                if (child.tasks && child.tasks.length > 0) {
+                                    child.tasks.forEach(task => {
+                                        employeeIds.push(task.assignee)
+                                    })
+                                }
+                            }
+                            else {
+                                employeeIds = [user_id]
+                            }
+                        }
+                    })
+                // 无子节点
+                } else {
+                    if (currentNode.allows.includes('transfer')) {
+                        if (['leader', 'deptLeader', 'post', 'user'].includes(currentNode.assigneeType)) {
+                            if (currentNode.tasks && currentNode.tasks.length > 0) {
+                                currentNode.tasks.forEach(task => {
+                                    employeeIds.push(task.assignee)
+                                })
+                            }
+                        }
+                        else {
+                            employeeIds = [user_id]
+                        }
+                    }
+                    
+                }
+                
+            }
+                
+            
+            return employeeIds && employeeIds.length > 0 && employeeIds.includes(user_id) ? true : false
+        },
+
+
         // 整个审批的状态 0,进行中 1,已完成
         reviewStatus() {
             return this.dialogData && this.dialogData.reviewStatus
@@ -446,6 +516,7 @@ export default {
         },
         
     },
+
     mounted() {
         if (this.dialogData) {
             this.formData = cloneDeep(this.dialogData);
@@ -464,6 +535,45 @@ export default {
     
 
     methods: {
+
+        closeEmployeeSelector() {
+            this.showEmployeeSelector = false;
+        },
+
+        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(() => { });
+            
+        },
+
         handleInputTarget(value) {
             // 使用正则表达式限制输入
             const regex = /^([0-9])*$/; // 匹配非负整数
@@ -649,7 +759,7 @@ export default {
                         this.$message.error(res.message || '操作失败');
                     }
                 }
-                
+                this.handleBlur();
             })
         },
 

+ 0 - 486
src/newPerformance/components/Workbench/IndicatorList copy.vue

@@ -1,486 +0,0 @@
-<template>
-    <!-- 指标审批管理 -->
-    <div class="gl-all" v-loading="staffLoad">
-        <div class="search-box flex-box">
-            <div class="flex-box-ce">
-                <el-date-picker v-model="date" type="daterange" align="right" unlink-panels range-separator="至"
-                    start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"
-                    :picker-options="pickerOptions" @change="changeDate">
-                </el-date-picker>
-
-                <div v-if="glIndex == 2" style=" margin-left: 10px;">
-                    <el-select v-model="selected_employee_ids" placeholder="请选择指定人员" multiple filterable
-                        style="width: 300px;" @change="changeEmployeeIds" clearable>
-                        <el-option v-for="item in employeeMap" :key="item.id" :label="item.name" :value="item.id"
-                            style="width: 300px;"></el-option>
-                    </el-select>
-                </div>
-
-                <div v-if="glIndex == 3" class="w270" style="position: relative; margin-left: 10px;">
-                    <el-input auto-complete="off" v-model="deptVisibleName" placeholder="请选择部门"></el-input>
-                    <div @click="openDeptSelector"
-                        style=" position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: 9;"></div>
-                </div>
-
-                <div style="margin-left: 10px; width:300px;">
-                    <JxSearch :screen="2" title="请输入考核表标题或指标标题" @confirm="searchList"></JxSearch>
-                </div>
-            </div>
-            <div class="flex-box-ce" style="margin-right: 60px;">
-                <div class="status-box" style="margin-right: 5px;">
-                    <span class="green-color-box"></span>已完成
-                </div>
-                <div class="status-box" style="margin-right: 5px;">
-                    <span class="orange-color-box" ></span>
-                    进行中
-                </div>
-                <div class="status-box">
-                    <span class="gray-color-box"></span>
-                    未开始
-                </div>
-                <div class="flex-box-ce more">
-                    <span @click="$router.push({ name: 'moreIndicatorList' })">
-                        查看更多
-                        <i class="el-icon-d-arrow-right"></i>
-                    </span>
-                </div>
-            </div>
-
-        </div>
-
-        <el-tabs v-model="glIndex" style="margin: 10px 0;">
-            <el-tab-pane :label="item.title" :name="item.name" v-for="(item, index) in glIist" :key="index">
-                <el-table ref="fmeaTableRef" :data="glDataList" v-loading="glLoading"
-                    :header-cell-style="{ background: '#f5f7fa' }" size=" mini" :border="true" style="width: 100%;"
-                    v-table-move="['fmeaTableRef']">
-                    <el-table-column prop="employeeName" label="被考核人" align="center" min-width="100">
-                        <template slot-scope="scope">
-                            <div>{{ scope.row.employeeName || '--' }}</div>
-                        </template>
-                    </el-table-column>
-                    <el-table-column prop="title" label="指标" align="center" min-width="150">
-                        <template slot-scope="scope">
-                            <el-tooltip class="item" effect="dark" placement="top">
-                                <div v-html="scope.row.title" slot="content" style="max-width: 300px;"></div>
-                                <div class="oneLine">{{ scope.row.title }}</div>
-                            </el-tooltip>
-                        </template>
-                    </el-table-column>
-                    <el-table-column prop="reviewTitle" label="考核表" align="center" min-width="150">
-                        <template slot-scope="scope">
-                            <el-tooltip class="item" effect="dark" placement="top">
-                                <div v-html="scope.row.reviewTitle" slot="content" style="max-width:300px;"></div>
-                                <div class="oneLine">{{ scope.row.reviewTitle }}</div>
-                            </el-tooltip>
-                        </template>
-                    </el-table-column>
-
-                    <el-table-column label="周期" align="center" width="200">
-                        <template slot-scope="scope">
-                            <div>{{ scope.row.startTime | formatDate }} 至 {{ scope.row.endTime | formatDate }}</div>
-                        </template>
-                    </el-table-column>
-
-                    <el-table-column prop="target" label="目标" align="center" min-width="100">
-                        <template slot-scope="scope">
-                            <div>{{ scope.row.target || '--' }}</div>
-                        </template>
-                    </el-table-column>
-                    <el-table-column prop="result" label="结果" align="center" min-width="100">
-                        <template slot-scope="scope">
-                            <div>{{ scope.row.result || '--' }}</div>
-                        </template>
-                    </el-table-column>
-                    <el-table-column prop="score" label="最终评分" align="center" min-width="100">
-                        <template slot-scope="scope">
-                            <div>{{ scope.row.score || '--' }}</div>
-                        </template>
-                    </el-table-column>
-
-                    <el-table-column prop="confirm_target" label="确认目标" align="center" min-width="120">
-                        <template slot-scope="scope">
-                            <ShowHandlerComp :show-data="scope.row.flow.nodes[0]" />
-                        </template>
-                    </el-table-column>
-                    <el-table-column prop="input_result" label="录入结果" align="center" min-width="120">
-                        <template slot-scope="scope">
-                            <ShowHandlerComp :show-data="scope.row.flow.nodes[1]" />
-                        </template>
-                    </el-table-column>
-                    <el-table-column prop="self_assessment" label="自评" align="center" min-width="120">
-                        <template slot-scope="scope">
-                            <ShowHandlerComp :show-data="scope.row.flow.nodes[2]" />
-                        </template>
-                    </el-table-column>
-                    <el-table-column prop="peer_assessmen" label="互评" align="center" min-width="120">
-                        <template slot-scope="scope">
-                            <ShowHandlerComp :show-data="scope.row.flow.nodes[3]" />
-                        </template>
-                    </el-table-column>
-                    <el-table-column prop="grade" label="评分" align="center" min-width="120">
-                        <template slot-scope="scope">
-                            <ShowHandlerComp :show-data="scope.row.flow.nodes[4]" />
-                        </template>
-                    </el-table-column>
-                    <el-table-column prop="approval" label="审批" align="center" min-width="120">
-                        <template slot-scope="scope">
-                            <ShowHandlerComp :show-data="scope.row.flow.nodes[5]" />
-                        </template>
-                    </el-table-column>
-                    <el-table-column prop="carbon_copy" label="抄送" align="center" min-width="120">
-                        <template slot-scope="scope">
-                            <ShowHandlerComp :show-data="scope.row.flow.nodes[6]" />
-                        </template>
-                    </el-table-column>
-                </el-table>
-
-            </el-tab-pane>
-        </el-tabs>
-
-        <EmployeeSelector :isChecKedAll="false" :can_select_employee="false" :can_select_dept="true" :multi="true"
-            :selected="dept_selected" :visible.sync="show_dept_selector" @confirm="dept_confirm" />
-    </div>
-</template>
-<script>
-import JxSearch from '@/performance/components/public/JxSearch';
-import moment from 'moment';
-import { mapGetters } from 'vuex';
-import EmployeeSelector from '@/components/EmployeeSelector'; // 选择部门组件
-import ShowHandlerComp from '@/newPerformance/components/PublicComp/ShowHandler'; // 显示节点数据组件
-
-export default {
-    components: {
-        JxSearch,
-        EmployeeSelector,
-        ShowHandlerComp
-    },
-    data() {
-        return {
-            params: {
-                keyword: '',
-                page: 1,
-                pageSize: 6,
-                startDate: '',
-                endDate: '',
-            },
-
-            // 部门可见
-            deptVisibleName: '',
-            dept_selected: { dept: [], employee: [] },
-            show_dept_selector: false,
-            deptList: [], // 部门列表 - 树形结构
-            dept_list: [], // 部门列表
-            selected_dept_ids: [], // 选择的部门列表
-            selected_employee_ids: [], // 选择的员工列表
-            employeeMap: this.$getEmployeeMap(), // 员工列表
-            staffLoad: false,
-            name: "",
-            headValue: [],
-            glIndex: '1',
-            pickerOptions: {
-                shortcuts: [{
-                    text: '最近一周',
-                    onClick(picker) {
-                        const end = new Date();
-                        const start = new Date();
-                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-                        picker.$emit('pick', [start, end]);
-                    }
-                }, {
-                    text: '最近一个月',
-                    onClick(picker) {
-                        const end = new Date();
-                        const start = new Date();
-                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-                        picker.$emit('pick', [start, end]);
-                    }
-                }, {
-                    text: '最近三个月',
-                    onClick(picker) {
-                        const end = new Date();
-                        const start = new Date();
-                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-                        picker.$emit('pick', [start, end]);
-                    }
-                }]
-            },
-            date: [],
-            glDataList: [],
-            glLoading: false,
-            glIist: [{ name: '1', title: '我的' }, { name: '2', title: '管理员工' }, { name: '3', title: '部门管理' }],
-        }
-    },
-    watch: {
-        glIndex(val) {
-            this.getList();
-        },
-
-        headValue(val) {
-            this.package_id = val[val.length - 1];
-            this.glIndex == '1' ? this.getManagement() : this.getScorerRecord();
-        }
-    },
-    computed: {
-        ...mapGetters(['user_info'])
-    },
-    filters: {
-        formatDate(val) {
-            if (val) return moment(val).format('YYYY-MM-DD')
-            else return "--"
-        },
-    },
-    created() {
-        this.getList();
-    },
-    methods: {
-        // 指标审批列表
-        getList() {
-            this.glLoading = true;
-            let url, params = {};
-            // '/performance/statistics/review/indicators/self/{siteId}'
-            // 个人指标审批列表
-            if (this.glIndex == 1) {
-                url = `/performance/statistics/review/indicators/self/${this.user_info.site_id}`
-                params = { ...this.params }
-            // 我管理的审批列表
-            } else if (this.glIndex == 2) {
-                params = { ...this.params, employeeIds: this.selected_employee_ids.toString() }
-                url = `/performance/statistics/review/indicators/scope/${this.user_info.site_id}`
-            // 按部门管理的审批列表
-            } else if (this.glIndex == 3) {
-                params = { ...this.params, deptIds: this.selected_dept_ids.toString() }
-                url = `/performance/statistics/review/indicators/dept/manager/${this.user_info.site_id}`
-            }
-            this.$axiosUser('get', url, params).then(res => {
-                this.glLoading = false;
-                let { data: { data: { list }, code } } = res
-                this.glDataList = list
-            });
-        },
-        
-        // 选择部门
-        openDeptSelector() {
-            this.show_dept_selector = true
-        },
-        // 处理部门树状结构数据
-        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;
-        },
-
-        // 获取部门
-        get_dept_list() {
-            this.$axiosUser('get', '/api/pro/department/tree', '', 'v2').then(res => {
-                this.dept_list = res.data.data.list; // 用来回显选择的部门数据
-                this.deptList = this.getTreeData(this.dept_list); // 处理成树状结构
-            });
-        },
-
-        // 选择部门
-        dept_confirm(data) {
-            this.dept_selected = { dept: [], employee: [] };
-            let dept_ids = [];
-            this.deptVisibleName = ''
-            if (data.dept !== null && data.dept.length != 0) {
-                this.dept_selected = data
-                data.dept.forEach(element => {
-                    this.selected_dept_ids.push(element.dept_id)
-                    dept_ids.push(element.dept_id)
-                    this.deptVisibleName += (element.dept_name + ',')
-                });
-            }
-            this.selected_dept_ids = Array.from(new Set(this.selected_dept_ids)); // 去重
-            this.getList();
-        },
-
-        // 选择员工
-        changeEmployeeIds(v) {
-            if (v && v.length > 0) {
-                v.forEach(item => {
-                    this.selected_employee_ids.push(item)
-                })
-            }
-            this.selected_employee_ids = Array.from(new Set(this.selected_employee_ids)); // 去重
-            this.getList();
-        },
-
-        //搜索
-        searchList(data) {
-            this.params.keyword = data;
-            this.getList()
-        },
-        // 日期选择时间
-        changeDate(v) {
-            this.params.startDate = v[0] || ''
-            this.params.endDate = v[1] || ''
-            this.getList();
-        },
-        returnStr(time) {
-            let date = `${time}000`;
-            let res = moment(Number(date)).format('YYYY/MM/DD HH:mm');
-            return this.fnTime(res);
-        },
-
-
-        fnTime(time) {
-            let staer = time.slice(0, 11);
-            let ptime = new Date(time).getTime();
-            const twentyFourHours = 24 * 60 * 60 * 1000;
-            const fortyEightHours = 24 * 60 * 60 * 1000 * 2;
-            const today = moment().format('YYYY/MM/DD');
-            const todayTime = new Date(today).getTime();
-            const yesterdayTime = new Date(todayTime - twentyFourHours).getTime();
-            const lastYesterdayTime = new Date(todayTime - fortyEightHours).getTime();
-            if (ptime >= todayTime) {
-                return '今天 ' + time.split(' ')[1] + ' 更新了执行计划';
-            } else if (ptime < todayTime && yesterdayTime <= ptime) {
-                return '昨天 ' + time.split(' ')[1] + ' 更新了执行计划';
-            } else if (ptime < yesterdayTime && lastYesterdayTime <= ptime) {
-                return '前天 ' + time.split(' ')[1] + ' 更新了执行计划';
-            } else if (this.dateSum(this.day, staer) > 30) {
-                return '近30天无计划更新';
-            } else {
-                return time + ' 更新了执行计划';
-            }
-        },
-        dateSum(sDate1, sDate2) {
-            //sDate1和sDate2是2008-12-13格式
-            var aDate, oDate1, oDate2, iDays;
-            aDate = sDate1.split('-');
-            oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]); //转换为12-13-2008格式
-            aDate = sDate2.split('-');
-            oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]);
-            iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24); //把相差的毫秒数转换为天数
-            return iDays;
-        },
-    },
-
-    }
-</script>
-
-<style lang="scss">
-.gl-all {
-    .el-switch__core {
-        width: 30px !important;
-        height: 16px;
-    }
-
-    .el-switch__core::after {
-        width: 14px;
-        height: 14px;
-        margin-top: -1px;
-    }
-
-    .el-switch.is-checked .el-switch__core::after {
-        margin-left: -15px;
-    }
-}
-
-.oneLine {
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-}
-</style>
-
-
-<style scoped lang="scss">
-
-
-.green-color-box {
-    display: inline-block;
-    border: 1px solid #67C23A;
-    color: #67c23a;
-    background: #f0f9eb;
-    padding: 5px;
-    margin-right: 5px;
-}
-
-.orange-color-box {
-    display: inline-block;
-    color: #e6a23c;
-    background: #fdf6ec;
-    border: 1px solid #f5dab1;
-    padding: 5px;
-    margin-right: 5px;
-}
-
-.gray-color-box {
-    display: inline-block;
-    color: #E9E9EB;
-    background: #F4F4F5;
-    border: 1px solid #E9E9EB;
-    padding: 5px;
-    margin-right: 5px;
-}
-
-.w270 {
-    width: 270px;
-}
-.gl-all {
-    width: 100%;
-    height: 100%;
-    position: relative;
-    background-color: #fff;
-    padding: 10px 20px;
-    border-radius: 5px;
-    min-height: 400px;
-    box-sizing: border-box;
-    .search-box {
-        width: 100%;
-        height: 40px;
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-        .more {
-            color: #909399;
-            font-size: 14px;
-            height: 40px;
-            margin-left: 5px;
-            span {
-                cursor: pointer;
-    
-                &:hover {
-                    color: #409EFF;
-                }
-            }
-        }
-    }
-    
-
-    /* 设置滚动条的宽度和背景色 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
-        width: 10px;
-        height: 10px;
-        background-color: #f9f9f9;
-    }
-
-    /* 设置滚动条滑块的样式 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb {
-        border-radius: 6px;
-        background-color: #c1c1c1;
-    }
-
-    /* 设置滚动条滑块hover样式 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
-        background-color: #a8a8a8;
-    }
-
-    /* 设置滚动条轨道的样式 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-track {
-        box-shadow: inset 0 0 5px rgba(87, 175, 187, 0.1);
-        border-radius: 6px;
-        background: #ededed;
-    }
-}
-
-</style>

+ 4 - 4
src/newPerformance/components/Workbench/IndicatorList.vue

@@ -89,9 +89,9 @@
                                     <el-tooltip class="item" effect="dark" placement="top">
                                         <div v-html="scope.row[item.prop]" slot="content" style="max-width: 300px;">
                                         </div>
-                                        <div v-if="!flowColumn.includes(item.label)" class="oneLine">{{
-                                            scope.row[item.prop]
-                                            || '--' }}</div>
+                                        <div v-if="!flowColumn.includes(item.label)" class="oneLine">
+                                            {{ scope.row[item.prop] || '--' }}
+                                        </div>
 
                                     </el-tooltip>
                                 </template>
@@ -114,7 +114,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, nodes: scope.row.flow.nodes })">指标审批过程</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>

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

@@ -105,7 +105,7 @@
                     <el-table-column label="操作" align="center" min-width="120">
                         <template slot-scope="scope">
                             <el-link type="primary"
-                                @click="getDetails({ businessStatus: scope.row.businessStatus, nodes: scope.row.flow.nodes })">指标审批过程</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>

+ 0 - 259
src/newPerformance/views/Index copy.vue

@@ -1,259 +0,0 @@
-<template>
-    <div class="all">
-        <el-container>
-            <el-aside :style="{ width: isFlod ? '180px' : '60px'}">
-                <div class="fold-box">
-                    <i class="el-icon-s-fold" @click="isFlod = !isFlod"></i>
-                </div>
-                <div class="title">
-                    <span v-show="isFlod">新绩效系统</span>
-                    <el-popover placement="right" trigger="hover" effect="dark" content="切换旧绩效系统">
-                        <i class="el-icon-sort" slot="reference" @click="backJob()" />
-                    </el-popover>
-                </div>
-                <el-menu class="el-menu-vertical-demo" ref="elMenu" :unique-opened="true" :default-active="currentId"
-                    @select="changeEntrance">
-                    <template v-for="item in entranceList">
-
-                        <template v-if="item.children && item.children.length > 0">
-                            <el-submenu :index="item.id" :key="item.id">
-                                <template slot="title">
-                                    <div class="flex-box-ce" style="height: 100%;">
-                                        <i :class="item.icon" :style="{ color: item.color }"></i>
-                                        <span v-show="isFlod">{{ item.name }}</span>
-                                    </div>
-                                </template>
-                                <el-menu-item :index="child.id" v-for="child in item.children" :key="child.id">
-                                    <div class="flex-box-ce" style="height: 100%;">
-                                        <i :class="child.icon" :style="{ color: child.color }"></i>
-                                        <span v-show="isFlod">{{ child.name }}</span>
-                                    </div>
-                                </el-menu-item>
-                            </el-submenu>
-
-                        </template>
-                        <el-menu-item v-else :key="item.id" :index="item.id">
-                            <div class="flex-box-ce" style="height: 100%;">
-                                <i :class="item.icon" :style="{ color: item.color }"></i>
-                                <span v-show="isFlod">{{ item.name }}</span>
-                            </div>
-                        </el-menu-item>
-                    </template>
-
-                </el-menu>
-            </el-aside>
-            <el-main>
-                <!-- 工作台 -->
-                <Workbench v-if="currentId == '1'" @changeCurrentId="changeCurrentId" />
-                <!-- 考核设计 -->
-                <IndicatorSetting v-if="currentId == '10-1'" @changeCurrentId="changeCurrentId" />
-
-                <IndicatorStore v-if="currentId == '10-2'" @changeCurrentId="changeCurrentId" />
-
-                <!-- 我的考核 -->
-                <MyPerformance v-if="currentId == '2'" :reviewId="reviewId" @changeCurrentId="changeCurrentId"
-                    @clearReviewId="clearReviewId" />
-
-                <!-- 结果分析 -->
-                <ExamineRecord v-if="currentId == '3-1'" @changeCurrentId="changeCurrentId" />
-                <!-- 年度报表 -->
-                <AnnualStatement v-if="currentId == '3-2'" @changeCurrentId="changeCurrentId" />
-                <!-- 过程跟踪 -->
-                <ProcessTracking v-if="currentId == '7-1'" @changeCurrentId="changeCurrentId" />
-                <!-- 绩效辅导 -->
-                <PerformanceCoaching v-if="currentId == '7-2'" @changeCurrentId="changeCurrentId" />
-                <!-- 考核对比 -->
-                <ExamineContrast v-if="currentId == '4'" @changeCurrentId="changeCurrentId" />
-                <!-- 角色设置 -->
-                <RoleSetting v-if="currentId == '5'" @changeCurrentId="changeCurrentId" />
-                <!-- 绩效对比 -->
-                <OrganizationExamine v-if="currentId == '3-3'" @changeCurrentId="changeCurrentId" />
-                <!-- 个人考核 -->
-                <PersonalExamine v-if="currentId == '7'" @changeCurrentId="changeCurrentId" />
-
-                <!-- 正态分布设置 -->
-                <NormalDistribution v-if="currentId == '11'" @changeCurrentId="changeCurrentId" />
-
-                <!-- 绩效等级设置 -->
-                <LevelSetting v-if="currentId == '12'" @changeCurrentId="changeCurrentId" />
-
-
-            </el-main>
-        </el-container>
-
-    </div>
-</template>
-
-<script>
-
-import Workbench from '../components/Workbench'; // 工作台
-import IndicatorSetting from '../components/IndicatorSetting'; // 指标设计
-import MyPerformance from '../components/MyPerformance'; // 我的考核
-import ExamineRecord from '../components/ExamineRecord'; // 考核记录
-import ExamineContrast from '../components/ExamineContrast'; // 考核对比
-import RoleSetting from '../components/RoleSetting'; // 角色设置
-import OrganizationExamine from '../components/OrganizationExamine'; // 组织考核
-import PersonalExamine from '../components/PersonalExamine'; // 个人考核
-import PerformanceInterview from '../components/PerformanceInterview'; // 绩效面谈
-import AnnualStatement from '../components/AnnualStatement'; // 年度对比
-import ProcessTracking from '../components/ProcessTracking'; // 过程查看
-import PerformanceCoaching from '../components/PerformanceCoaching'; // 绩效辅导
-import IndicatorStore from '../components/IndicatorStore'; // 指标库
-import NormalDistribution from '../components/NormalDistribution.vue'; // 指标库
-import LevelSetting from "../components/LevelSetting.vue"
-
-export default {
-    name: 'job',
-    components: {
-        Workbench,
-        IndicatorSetting,
-        MyPerformance,
-        ExamineRecord,
-        ExamineContrast,
-        RoleSetting,
-        OrganizationExamine,
-        PersonalExamine,
-        PerformanceInterview,
-        AnnualStatement,
-        ProcessTracking,
-        PerformanceCoaching,
-        IndicatorStore,
-        NormalDistribution,
-        LevelSetting
-    },
-    data() {
-        return {
-            isFlod: true,
-            entranceList: [
-                { id: '1', name: '工作台', icon: 'el-icon-menu', color: "#1BAEED" },
-                {
-                    id: '7', name: '过程跟踪', icon: 'el-icon-user', color: "#4C78E6", children: [
-                        { id: '7-1', name: "过程管控" },
-                        { id: '7-2', name: "绩效面谈" }
-                    ]
-                },
-                {
-                    id: '10', name: '指标设置', icon: 'el-icon-thumb', color: "#FF6347", children: [
-                        { id: '10-1', name: "发布考核" },
-                        { id: '10-2', name: "指标库管理" }
-                    ]
-                },
-                { id: '2', name: '我的绩效', icon: 'el-icon-data-analysis', color: "#EEA016" },
-                {
-                    id: '3', name: '绩效数据', icon: 'el-icon-s-data', color: "#67c23a",
-                    children: [
-                        { id: '3-1', name: "结果分析" },
-                        { id: '3-2', name: "绩效报表" },
-                        { id: '3-3', name: "绩效对比" }, 
-                    ]
-                },
-                // { id: '4', name: '考核对比', icon: 'el-icon-c-scale-to-original', color: "#C38FE9" },
-                // { id: '8', name: '绩效面谈', icon: 'el-icon-office-building', color: "#FF6347" },
-                // { id: '6', name: '绩效对比', icon: 'el-icon-office-building', color: "#FF6347" },
-                { id: '5', name: '权限设置', icon: 'el-icon-user-solid', color: "#4C78E6" },
-                { id: '11', name: '全局正态设置', icon: 'el-icon-finished', color: "#66FF40" },
-                { id: '12', name: '绩效等级设置', icon: 'el-icon-setting', color: "#A040FF" }
-            ],
-            currentId: '1',
-            reviewId: ''
-        };
-    },
-
-
-    methods: {
-        changeEntrance(index) {
-            this.currentId = index;
-        },
-        backJob() {
-            this.$router.push("/performanceIndex")
-        },
-        changeCurrentId(payload) {
-            let { currentId, reviewId } = payload
-            this.currentId = currentId
-            this.reviewId = reviewId
-        },
-        clearReviewId() {
-            this.reviewId = ''
-        }
-    }
-
-}
-</script>
-
-<style scoped="scoped" lang="scss">
-.all {
-    width: 100%;
-    font-size: 14px;
-    border-radius: 4px;
-    display: flex;
-    flex-direction: column;
-    position: relative;
-
-    .el-container {
-        width: 100%;
-        height: 100%;
-        .fold-box {
-            width: 100%;
-            height: 30px;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            font-size: 18px;
-            color: #999;
-            &:hover {
-                background-color: #f7f7f7;
-                cursor: pointer;
-            }
-        }
-        .title {
-            padding: 10px 20px;
-            font-weight: 600;
-            border-bottom: 1px solid #f1f1f1;
-            font-size: 16px;
-            box-sizing: border-box;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-
-            i {
-                transform: rotate(90deg);
-                color: #99a9bf;
-                font-size: 18px;
-                transition: all 0.3s;
-
-                &:hover {
-                    color: rgb(64, 158, 255);
-                    cursor: pointer;
-                }
-            }
-        }
-
-        .el-menu-vertical-demo:not(.el-menu--collapse) {
-            width: 180px;
-        }
-
-        .el-menu {
-            overflow: hidden;
-            border: none;
-        }
-
-        .el-aside {
-            transition: width 0.28s;
-            background-color: #fff;
-            height: calc(100vh - 80px);
-            border-radius: 5px;
-            overflow: hidden;
-        }
-
-        .el-main {
-            width: 100%;
-            height: calc(100vh - 80px);
-            display: flex;
-            flex-direction: column;
-            padding: 0 10px;
-            min-width: 1100px;
-        }
-    }
-
-}
-</style>

+ 9 - 3
src/newPerformance/views/Index.vue

@@ -71,6 +71,7 @@
                 <RoleSetting v-if="currentId == '5-1'" @changeCurrentId="changeCurrentId" />
                 <!-- 绩效等级设置 -->
                 <PerformSetting v-if="currentId == '5'" @changeCurrentId="changeCurrentId" />
+
                 <!-- 正态分布设置 -->
                 <!-- <NormalDistribution v-if="currentId == '5-3'" @changeCurrentId="changeCurrentId" /> -->
                 <!-- 个人考核 -->
@@ -90,6 +91,8 @@
                 <el-button type="primary" @click="confirm">去发起考核</el-button>
             </div>
         </el-dialog>
+
+        <AIAssistant></AIAssistant>
     </div>
 </template>
 
@@ -110,8 +113,11 @@ import PerformanceCoaching from '../components/PerformanceCoaching'; // 绩效
 import IndicatorStore from '../components/IndicatorStore'; // 指标库
 import NormalDistribution from '../components/NormalDistribution.vue'; // 指标库
 import PerformSetting from "../components/PerformSetting.vue" // 绩效设置
+import AIAssistant from '../components/PublicComp/AIAssistant.vue';
 import introJs from 'intro.js'
 import 'intro.js/introjs.css'
+
+
 export default {
     name: 'job',
     components: {
@@ -129,7 +135,8 @@ export default {
         PerformanceCoaching,
         IndicatorStore,
         NormalDistribution,
-        PerformSetting
+        PerformSetting,
+        AIAssistant
     },
     data() {
         return {
@@ -140,8 +147,7 @@ export default {
             getRole3: this.$getRole(3), // 员工
             isCreator: this.$supremeAuthority('creator'), // 创始人,总经理
             // 菜单项
-            entranceList: [
-            ],
+            entranceList: [],
             currentId: '1',
             reviewId: '',
             sendEmployeeId: ''

+ 0 - 1170
src/newPerformance/views/TemplateDetails copy.vue

@@ -1,1170 +0,0 @@
-<template>
-    <div class="box boxMinHeight">
-        <header class="header">
-            <div class="header-content flex-box-ce">
-                <!-- 返回按钮 -->
-                <div class="flex-box-ce header-left">
-                    <i class="el-icon-arrow-left fontColorC" @click="back()"></i>
-                    <div class="text fontColorB font-flex-word">{{ templateTitle }}</div>
-                    <i class="el-icon-edit" style="margin-left: 10px; color: #999;" @click="openEditDialog()"></i>
-                </div>
-
-                <!-- 发布按钮 -->
-                <div class="header-right">
-                </div>
-            </div>
-        </header>
-
-        <div style="height: 1px; background-color: #DCDFE6; margin-top: 5px;"></div>
-
-
-        <el-alert class="bounce animated" type="warning" :title="alertTilte" :closable="false" show-icon
-            style="width: 100%; margin-top: 10px;"></el-alert>
-
-        <div class="flex-box-ce" style="justify-content: space-between; margin-top: 10px;">
-            <div class="flex-box-ce">
-                <el-button class="add-indicator-btn" type="primary" size="small" @click="addData()">添加指标</el-button>
-
-                <el-button type="danger" :disabled="!(multipleSelection && multipleSelection.length > 0)"
-                    @click="confirmDelete()" size="small">批量删除</el-button>
-            </div>
-
-
-            <div class="flex-box-ce" style="padding: 0 20px; color: #999;">
-                <el-popover placement="right" trigger="hover" class="popover" @show="showPopover">
-                    <div class="flex-box-ce" style="width: 200px; justify-content: space-between;">
-                        <el-checkbox v-model="checkAll" @change="checkAllChangeFn">全选</el-checkbox>
-                        <el-button type="text" @click="reset(true)">重置</el-button>
-                    </div>
-                    <div style="height: 1px; background-color: #DCDFE6; margin: 5px 0;"></div>
-                    <el-checkbox-group v-model="checkColumns" @change="changeColumns"
-                        style="width: 200px; display: flex; flex-direction: column;">
-                        <el-checkbox v-for="(item, key) in this.tableColumn" :label="item.label"
-                            :key="item.label"></el-checkbox>
-                    </el-checkbox-group>
-                    <div class="flex-box-ce" slot="reference">
-                        <el-button class="primaryBtn" icon="el-icon-s-tools" type="primary"
-                            size="mini">设置考核流程</el-button>
-                    </div>
-                </el-popover>
-            </div>
-        </div>
-
-        
-
-        <div class="table-box">
-
-            <el-table :data="tableData" v-loading="loading" stripe style="width: 100%; margin-top: 10px;  height: auto;"
-                border :header-cell-style="{ background: '#f5f7fa' }" @selection-change="handleSelectChange">
-                <el-table-column type="selection"></el-table-column>
-                <template v-for="item in tableColumn">
-
-                    <el-table-column v-if="item.isShow && item.label === '规则'" :key="item.prop" :prop="item.prop"
-                        :label="item.label" align="center" :min-width="item.width">
-                        <template slot-scope="scope">
-                            <el-tooltip v-if="scope.row.content" class="item" effect="dark" placement="top">
-                                <div v-html="scope.row.content" slot="content"
-                                    style="max-width: 300px; white-space: pre-line;">
-                                </div>
-                                <div class="oneLine"
-                                    @click="editContent(scope.$index, scope.row.content, scope.row.indicatorId)">
-                                    {{ scope.row.content }}
-                                </div>
-                            </el-tooltip>
-                            <el-button v-else
-                                @click="editContent(scope.$index, scope.row.content, scope.row.indicatorId)">编辑规则</el-button>
-                        </template>
-                    </el-table-column>
-
-                    <el-table-column v-else-if="item.isShow && ['目标', '权重(%)'].includes(item.label)" :key="item.prop"
-                        :prop="item.prop" :label="item.label" align="center" :min-width="item.width">
-                        <template slot-scope="scope">
-                            <el-input v-model="scope.row[item.prop]" :placeholder="item.label" clearable
-                                @blur="handleEdit(item.prop, scope.row[item.prop], scope.row.indicatorId)"
-                                oninput="value=value.replace(/[^\d.]/g,'')"></el-input>
-                        </template>
-                    </el-table-column>
-
-                    <el-table-column v-else-if="item.isShow && item.label === '计算公式'" prop="formulae" label="计算公式"
-                        align="center" min-width="130">
-                        <template slot-scope="scope">
-                            <div class="formulas-setting">
-                                <el-button @click="openFormula(scope.row, scope.$index)">
-                                    {{ scope.row.expression && scope.row.expression.formulas.length > 0 ? `公式
-                                    ${scope.row.expression.formulas.length} 条` : '公式' }}
-                                </el-button>
-                            </div>
-                        </template>
-                    </el-table-column>
-
-                    <el-table-column v-else-if="item.isShow && ['指标', '单位'].includes(item.label)" :key="item.prop"
-                        :prop="item.prop" :label="item.label" align="center" :min-width="item.width">
-                        <template slot-scope="scope">
-                            <el-input v-model="scope.row[item.prop]" :placeholder="item.label" clearable
-                                @blur="handleEdit(item.prop, scope.row[item.prop], scope.row.indicatorId)"></el-input>
-                        </template>
-                    </el-table-column>
-
-                    <el-table-column v-if="item.isShow && flowColumn.includes(item.label)" :key="item.prop"
-                        :prop="item.prop" :label="item.label"
-                        :render-header="(h, obj) => renderHeader(h, item, item.prop)" align="center"
-                        :min-width="item.width" fixed="right">
-                        <template slot-scope="scope">
-                            <template v-if="item.label === '确认目标'">
-                                <el-switch v-if="!scope.row.flow.nodes[0].enable"
-                                    :value="scope.row.flow.nodes[0].enable"
-                                    @input="handleStatusChange(-1, scope.row, 'targetConfirms')"></el-switch>
-                                <ShowDataComp v-else-if="scope.row.flow.nodes[0].enable && isDataShow"
-                                    :show-data="scope.row.flow.nodes[0]" :select-nodes="scope.row"
-                                    @btnClick="handleBtnClick" />
-                            </template>
-
-                            <template v-if="item.label === '录入结果'">
-                                <el-switch v-if="!scope.row.flow.nodes[1].enable"
-                                    :value="scope.row.flow.nodes[1].enable"
-                                    @input="handleStatusChange(-1, scope.row, 'resultInput')"></el-switch>
-                                <ShowDataComp v-else-if="scope.row.flow.nodes[1].enable && isDataShow"
-                                    :show-data="scope.row.flow.nodes[1]" :select-nodes="scope.row"
-                                    @btnClick="handleBtnClick" />
-                            </template>
-
-                            <template v-if="item.label === '自评'">
-                                <el-switch v-model="scope.row.flow.nodes[2].enable"
-                                    @change="handleScoreSelf(scope.row, scope.$index)"></el-switch>
-                            </template>
-
-                            <template v-if="item.label === '互评'">
-                                <el-switch v-model="scope.row.flow.nodes[3].enable"
-                                    @change="handleScoreSelf(scope.row, scope.$index)"></el-switch>
-                            </template>
-
-                            <template v-if="item.label === '评分'">
-                                <el-switch v-if="!scope.row.flow.nodes[4].enable"
-                                    :value="scope.row.flow.nodes[4].enable"
-                                    @input="handleStatusChange(-1, scope.row, 'scores')"></el-switch>
-                                <ShowDataComp v-else-if="scope.row.flow.nodes[4].enable && isDataShow"
-                                    :show-data="scope.row.flow.nodes[4]" :select-nodes="scope.row"
-                                    @btnClick="handleBtnClick" />
-                            </template>
-
-                            <template v-if="item.label === '审批'">
-                                <el-switch v-if="!scope.row.flow.nodes[5].enable"
-                                    :value="scope.row.flow.nodes[5].enable"
-                                    @input="handleStatusChange(-1, scope.row, 'reviews')"></el-switch>
-                                <ShowDataComp v-else-if="scope.row.flow.nodes[5].enable && isDataShow"
-                                    :show-data="scope.row.flow.nodes[5]" :select-nodes="scope.row"
-                                    @btnClick="handleBtnClick" />
-                            </template>
-
-                            <template v-if="item.label === '抄送'">
-                                <el-switch v-if="!scope.row.flow.nodes[6].enable"
-                                    :value="scope.row.flow.nodes[6].enable"
-                                    @input="handleStatusChange(-1, scope.row, 'cc')"></el-switch>
-                                <ShowDataComp v-else-if="scope.row.flow.nodes[6].enable && isDataShow"
-                                    :show-data="scope.row.flow.nodes[6]" :select-nodes="scope.row"
-                                    @btnClick="handleBtnClick" />
-                            </template>
-
-                        </template>
-                    </el-table-column>
-                </template>
-
-            </el-table>
-
-            <div style="height: 50px;"></div>
-
-        </div>
-
-
-
-        <!-- <TiptapComp /> -->
-        <!-- 编辑流程节点 -->
-        <!-- <HandleNode v-if="currentIndicator" v-model="dialogVisible" :form-label="formLabel" :dialog-title="dialogTitle"
-            :node-type="nodeType" :template-id="templateId" :select-nodes="selectNodes"
-            :indicator-id="selectIndicatorId" @closeDialog="closeDialog" :tag-index="tagIndex"
-            @onConfirm="finishHandle" /> -->
-
-        <!-- 编辑计算公式 -->
-        <FormulaComp v-if="showFormula" v-model="showFormula"
-            :fixed-props="[{ key: 'target', name: '目标' }, { key: 'weight', name: '权重' }, { key: 'result', name: '结果值' }]"
-            :expressions-props="currentIndicator.expression.formulas || []" @onConfirm="onFormulaConfirm" />
-
-        <!-- 发布考核弹框 -->
-        <PublishComp v-if="showPublish" v-model="showPublish" :template-ids="[templateId]"
-            @onConfirm="onPubishConfirm" />
-
-        <!-- 编辑规则 -->
-        <EditContentComp v-if="showEditContent" v-model="showEditContent" :content="content"
-            :indicator-id="selectIndicatorId" :template-id="templateId" @finishEdit="finishEditContent" />
-
-        <!-- 批量修改流程节点 -->
-        <BatchHandleNode v-if="batchHandleDialog" v-model="batchHandleDialog" :template-id="templateId"
-            :form-label="formLabel" :dialog-title="dialogTitle" :node-type="nodeType" :handle-node="handleNode"
-            @onConfirm="finishBatchHandle" />
-
-        <!-- 编辑确认目标节点 -->
-        <TargetConfirms v-if="targetConfirms" v-model="targetConfirms" :form-label="formLabel"
-            :dialog-title="dialogTitle" :node-type="nodeType" :template-id="templateId" :select-nodes="selectNodes"
-            :indicator-id="selectIndicatorId" @closeDialog="closeNodeDialog" :tag-index="tagIndex"
-            @onConfirm="finishHandle" />
-
-        <!-- 编辑录入结果节点 -->
-        <ResultInput v-if="resultInput" v-model="resultInput" :form-label="formLabel" :dialog-title="dialogTitle"
-            :node-type="nodeType" :template-id="templateId" :select-nodes="selectNodes"
-            :indicator-id="selectIndicatorId" @closeDialog="closeNodeDialog" :tag-index="tagIndex"
-            @onConfirm="finishHandle" />
-
-        <!-- 编辑互评节点 -->
-        <ScoreEachOther v-if="scoreEachOther" v-model="scoreEachOther" :form-label="formLabel"
-            :dialog-title="dialogTitle" :node-type="nodeType" :template-id="templateId" :select-nodes="selectNodes"
-            :indicator-id="selectIndicatorId" @closeDialog="closeNodeDialog" :tag-index="tagIndex"
-            @onConfirm="finishHandle" />
-
-        <!-- 编辑评分节点 -->
-        <Scores v-if="scores" v-model="scores" :form-label="formLabel" :dialog-title="dialogTitle" :node-type="nodeType"
-            :template-id="templateId" :select-nodes="selectNodes" :indicator-id="selectIndicatorId"
-            @closeDialog="closeNodeDialog" :tag-index="tagIndex" @onConfirm="finishHandle" />
-
-        <Reviews v-if="reviews" v-model="reviews" :form-label="formLabel" :dialog-title="dialogTitle"
-            :node-type="nodeType" :template-id="templateId" :select-nodes="selectNodes"
-            :indicator-id="selectIndicatorId" @closeDialog="closeNodeDialog" :tag-index="tagIndex"
-            @onConfirm="finishHandle" />
-
-        <!-- 编辑审批节点 -->
-        <CC v-if="cc" v-model="cc" :form-label="formLabel" :dialog-title="dialogTitle" :node-type="nodeType"
-            :template-id="templateId" :select-nodes="selectNodes" :indicator-id="selectIndicatorId"
-            @closeDialog="closeNodeDialog" :tag-index="tagIndex" @onConfirm="finishHandle" />
-
-        <el-dialog title="编辑标题" center :visible.sync="editTitleDialogVisible" width="30%">
-            <el-input v-model="title" placeholder="请输入模板名称" size="small"></el-input>
-            <span slot="footer" class="dialog-footer">
-                <el-button @click="editTitleDialogVisible = false">取 消</el-button>
-                <el-button type="primary" @click="editTitle()">确 定</el-button>
-            </span>
-        </el-dialog>
-    </div>
-</template>
-
-<script>
-import { mapGetters } from 'vuex';
-import FormulaComp from '@/newPerformance/components/TemplateDetails/FormulaComp'; // 计算公式弹框
-import HandleNode from '@/newPerformance/components/TemplateDetails/HandleNode'; //单独设置流程节点弹框
-import PublishComp from '@/newPerformance/components/TemplateDetails/PublishComp'; // 发布考核弹框
-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 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'; // 审批流程节点
-import introJs from 'intro.js'
-import 'intro.js/introjs.css'
-import templateDetailsStep from "@/newPerformance/utils/templateDetailsStep"
-
-export default {
-    components: {
-        HandleNode,
-        FormulaComp,
-        PublishComp,
-        ShowDataComp,
-        EditContentComp,
-        BatchHandleNode,
-        TargetConfirms,
-        ResultInput,
-        ScoreEachOther,
-        Scores,
-        Reviews,
-        CC
-    },
-    data() {
-        return {
-            isDataShow: false,
-            isShow: false,
-            templateTitle: "模板名称",
-            loading: false,
-            title: "模板名称",
-            alertTilte: "可在表格中直接编辑指标,规则 (规则支持富文本) ,目标,单位,权重,计算公式以及流程节点, 注意: 每个指标的标题不能为空!每个指标的评分节点一定要开启!",
-            templateId: "", // 模板ID
-            tableData: [], // 表格数据
-            showFormula: false, // 编辑计算公式弹框显示
-            showPublish: false, // 发布考核弹框显示
-            dialogVisible: false, // 编辑流程节点弹框显示
-            editTitleDialogVisible: false,
-            dialogTitle: "", // 编辑流程节点弹框标题
-            isDisable: false, // 是否禁用
-            nodeType: "", // 节点类型
-            currentIndicator: null, // 操作的指标
-            selectIndicatorId: "", // 选择的指标ID
-            selectNodes: [], // 选中指标所有的节点
-            selectIndex: 0, // 表格行索引
-            formLabel: "",
-            tagIndex: 0,
-            multipleSelection: [],
-            content: "", // 指标规则
-            showEditContent: false, // 编辑指标内容弹框
-            deptList: [], // 部门列表 - 树形结构
-            dept_list: [], // 部门列表
-            postList: [], // 岗位列表
-            flowColumn: ["确认目标", "录入结果", "自评", "互评", "评分", "审批", "抄送"],
-            tableColumn: [
-                { label: "指标", prop: "title", isShow: true, width: 150 },
-                { label: "规则", prop: "content", isShow: true, width: 150 },
-                { label: "目标", prop: "target", isShow: true, width: 80 },
-                { label: "单位", prop: "unit", isShow: true, width: 100 },
-                { label: "权重(%)", prop: "weight", isShow: true, width: 100 },
-                { label: "计算公式", prop: "formulae", isShow: true, width: 120 },
-                { label: "指标OKR", prop: "formulae", isShow: true, width: 120 },
-                { label: "确认目标", prop: "targetConfirms", isShow: false, width: 100 },
-                { label: "录入结果", prop: "resultInput", isShow: false, width: 100 },
-                { label: "自评", prop: "scoreSelf", isShow: false, width: 100 },
-                { label: "互评", prop: "scoreEachOther", isShow: false, width: 100 },
-                { label: "评分", prop: "scores", isShow: false, width: 100 },
-                { label: "审批", prop: "reviews", isShow: false, width: 100 },
-                { label: "抄送", prop: "cc", isShow: false, width: 100 }
-            ],
-            checkColumns: [],
-            checkAll: false,
-            flowInfo: {},
-            handleNode: {},
-            batchHandleDialog: false,
-            targetConfirms: false,
-            resultInput: false,
-            scoreEachOther: false,
-            scores: false,
-            reviews: false,
-            cc: false
-        }
-    },
-    computed: {
-        ...mapGetters(['user_info']),
-        // 指标标题为空不能发起考核
-        isTitleNull() {
-            return this.tableData.find(item => item.title == '' || item.title == null) ? true : false
-        },
-        // 指标评分为禁用不能发起考核
-        isScoreNull() {
-            return this.tableData.find(item => !item.flow.nodes[4].enable) ? true : false
-        }
-    },
-
-    mounted() {
-        this.$nextTick(() => {
-            this.startGuide()
-        })
-    },
-
-    created() {
-        this.templateId = this.$route.params.templateDetailId;
-        this.get_template_detail();
-        this.get_table_data();
-        this.isDataShow = false
-        // 请求岗位列表,部门列表
-        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
-        })
-    },
-    methods: {
-        back() {
-            // if (this.isTitleNull) return this.$message.error("确保每个指标名称不能为空")
-            this.$router.go(-1)
-        },
-        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,        // 是否显示面板指示点
-                // 配置内容 steps数组,内部一个对象代表一个步骤
-                steps: templateDetailsStep
-            }).onbeforechange((e) => {
-                console.log(e)
-                if (e.className.includes("primaryBtn")) {
-                    // this.$refs.UploadPublish2.openTemplate()
-                    this.showPopover()
-                    this.checkAllChangeFn(true)
-                }
-            }).start()
-        },
-
-        openEditDialog() {
-            this.editTitleDialogVisible = true
-        },
-
-        // 处理部门树状结构数据
-        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;
-        },
-
-        // 获取部门
-        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)
-        },
-
-        // 自定义表头
-        renderHeader(h, item, type) {
-            let label = ""
-            const labels = {
-                'targetConfirms': '确认目标',
-                'resultInput': '录入结果',
-                'scoreSelf': '自评',
-                'scoreEachOther': '互评',
-                'scores': '评分',
-                'reviews': '审批',
-                'cc': '抄送'
-            }
-            label = labels[type];
-            let that = this;
-
-            return h('div', {
-                id: type + '-class',
-                style: { display: "flex", alignItems: "center", justifyContent: "center" }
-            }, [
-
-                h('el-button', {
-                    props: {
-                        size: 'small'
-                    },
-                    on: {
-                        click: function () {
-                            that.clickButton(type);
-                        }
-                    }
-                }, label),
-            ])
-        },
-
-        clickButton(nodeType) {
-            this.handleNode = this.flowInfo.nodes.find(node => node.type === nodeType)
-            let options = {
-                'targetConfirms': ['确认目标', '确认人'],
-                'resultInput': ['录入结果', '录入人'],
-                'scoreSelf': ['自评', ''],
-                'scoreEachOther': ['互评', '互评人'],
-                'scores': ['评分', '评分人'],
-                'reviews': ['审批', '审批人'],
-                'cc': ['抄送', '抄送人']
-            }
-            this.dialogTitle = options[nodeType][0]
-            this.formLabel = options[nodeType][1]
-            this.nodeType = nodeType; // 节点类型
-            this.batchHandleDialog = true;
-        },
-
-        // 打开编辑规则内容弹框
-        editContent(index, content, indicatorId) {
-            this.selectIndex = index;
-            this.content = content;
-            this.selectIndicatorId = indicatorId;
-            this.showEditContent = true
-        },
-
-        finishEditContent(content) {
-            this.tableData[this.selectIndex].content = content
-        },
-        // 获取模板详情
-        get_template_detail() {
-            this.$axiosUser("get", `/performance/template/info/${this.user_info.site_id}/` + this.templateId).then(res => {
-                let { data: { data: { title, flow } } } = res
-                this.templateTitle = title || '模板名称'
-                this.title = title || '模板名称'
-                this.flowInfo = flow || {}
-            })
-        },
-
-        // 获取表格数据
-        get_table_data() {
-            this.loading = true
-            this.$axiosUser("get", `/performance/indicator/list/${this.user_info.site_id}/` + this.templateId).then(res => {
-                this.loading = false
-                this.tableData = res.data.data.list
-            })
-        },
-
-
-        editTableData() {
-        },
-        // 编辑模板标题
-        editTitle() {
-            let title = this.title
-            if (title !== null && title !== '') {
-                let url = `/performance/template/title/${this.user_info.site_id}`
-                this.$http.post(url, { templateId: this.templateId, title }).then(res => {
-                    if (res.code == 1) {
-                        this.$message.success("修改成功")
-                        this.editTitleDialogVisible = false
-                        this.get_template_detail();
-                    }
-
-                })
-            }
-        },
-
-        // 编辑指标名称,规则,权重,目标,单位
-        handleEdit(props, value, id) {
-            let url = '', data = {};
-            url = `/performance/indicator/${props}/${this.user_info.site_id}/${this.templateId}`;
-            data[props] = value;
-            data['indicatorId'] = id;
-            this.$http.post(url, data).then(res => {
-                if (res.code == 0) return this.$message.error(res.msg || '操作失败')
-            })
-        },
-
-        handleBtnClick(index, node, row) {
-            this.handleStatusChange(index, row, node.type)
-        },
-
-        // 自评节点单独操作
-        handleScoreSelf(row, index) {
-            let { indicatorId, flow: { nodes } } = row
-            let data = {
-                indicatorId, // 指标ID
-                nodes
-            }
-            let url = `/performance/indicator/flow/${this.user_info.site_id}/${this.templateId}`
-            this.$http.post(url, data).then(res => {
-                let { code, data } = res
-                if (code == 1) {
-                    this.tableData.splice(index, 1, data); //替换元素
-                    this.$message.success("操作成功");
-                } else {
-                    this.$message.error(res.message || '操作失败');
-                }
-            })
-        },
-
-        // 操作节点
-        handleStatusChange(index, row, nodeType) {
-            if (index !== -1) this.tagIndex = index // 子节点索引
-            this.currentIndicator = row;
-            let { indicatorId } = row;
-            this.selectIndicatorId = indicatorId; // 指标ID
-            this.selectNodes = row.flow.nodes; // 所有节点
-            this.nodeType = nodeType; // 节点类型
-            if (nodeType == 'targetConfirms') {
-                this.dialogTitle = "确认目标"
-                this.formLabel = "确认人"
-                this.targetConfirms = true;
-            }
-            if (nodeType == 'resultInput') {
-                this.dialogTitle = "录入结果11"
-                this.formLabel = "录入人"
-                this.resultInput = true;
-            }
-            if (nodeType == 'scoreSelf') {
-                this.dialogTitle = "自评"
-            }
-            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
-            }
-            // this.dialogVisible = true;
-        },
-
-
-        // 添加指标
-        addData() {
-            let url = `/performance/indicator/create/${this.user_info.site_id}/${this.templateId}`
-            this.$http.post(url, {}).then(res => {
-                let { data, code } = res
-                if (code) this.tableData.push(data)
-            })
-        },
-
-        handleSelectChange(val) {
-            this.multipleSelection = val;
-        },
-        // 取消删除
-        cancelDelete() {
-            console.log("取消删除");
-        },
-        // 确认删除
-        confirmDelete() {
-            if (this.multipleSelection && this.multipleSelection.length > 0) {
-                this.$confirm('确定删除选中的指标吗?', '提示', {
-                    type: 'warning'
-                }).then(() => {
-                    // 创建一个包含异步任务的数组,每个任务都是一个 axios 请求
-                    const arrays = []
-                    this.multipleSelection.forEach(item => {
-                        arrays.push(this.deleteIndicator(item))
-                    })
-
-                    // 当所有请求都成功完成时,responses 是一个包含所有响应的数组
-                    Promise.all(arrays).then(responses => {
-                        // console.log(responses)
-                        this.get_table_data();
-                    }).catch(error => {
-                        // 如果任何一个请求失败,将会进入这个 catch 块
-                        console.log(error)
-                    })
-                }).catch(() => { });
-            }
-        },
-        // 删除指标
-        deleteIndicator(item) {
-            let url = `/performance/indicator/remove/${this.user_info.site_id}/${this.templateId}/${item.indicatorId}`
-            return this.$axiosUser('post', url).then(res => {
-                return res.data
-            })
-        },
-        // 打开计算公式弹框
-        openFormula(row, index) {
-            this.currentIndicator = null;
-            this.selectIndex = -1;
-            this.currentIndicator = row;
-            this.selectIndex = index;
-            this.showFormula = true;
-        },
-        // 关闭编辑计算公式弹框
-        closeDialog() {
-        },
-
-        // 全选复选框事件监听
-        checkAllChangeFn(val) {
-            console.log(val)
-            this.loading = true
-            if (val) {
-                // 全选
-                this.tableColumn.forEach(item => {
-                    item.isShow = true
-                })
-            } else {
-                // 反全选
-                this.tableColumn.forEach(item => {
-                    if (this.flowColumn.includes(item.label)) {
-                        item.isShow = false;
-                    } else {
-                        item.isShow = true
-                    }
-                })
-            }
-            this.loading = false
-            this.showPopover();
-        },
-        // 重置,flag: Boolean,全部重置为flag
-        reset(flag) {
-            this.tableColumn.forEach(item => {
-                if (this.flowColumn.includes(item.label)) {
-                    item.isShow = false;
-                } else {
-                    item.isShow = true
-                }
-            })
-            this.showPopover();
-            this.refreshTable();
-        },
-        // 表格列是否显示的方法
-        showColumn(currentColumn) {
-            return this.tableColumn.find(item => item.prop == currentColumn).isShow;
-        },
-        /* 选择列 */
-        changeColumns(val) {
-            this.tableColumn.forEach(item => {
-                item.isShow = false;
-            })
-            // columns将val数组存在的值设为true,不存在的设为false
-            val && val.forEach(item => {
-                let current = this.tableColumn.find(i => i.label == item)
-                current.isShow = true;
-            })
-            // 判断是否全选
-            this.judgeIsCheckAll();
-            // this.refreshTable();
-        },
-        // 重新渲染表格
-        refreshTable() {
-            this.$nextTick(() => {
-                if (this.$refs.fmeaTableRef) this.$refs.fmeaTableRef.doLayout();
-            })
-        },
-        // 气泡框出现
-        showPopover() {
-            this.checkColumns = []
-            this.tableColumn.forEach(item => {
-                if (item.isShow) {
-                    this.checkColumns.push(item.label)
-                }
-            })
-            // 判断是否全选
-            this.judgeIsCheckAll();
-        },
-        // 判断是否全选
-        judgeIsCheckAll() {
-            // 选中的长度 = 表格列的长度  全选按钮就选中
-            if (this.checkColumns.length == this.tableColumn.length)
-                this.checkAll = true
-            else
-                this.checkAll = false
-        },
-        finishHandle(nodes) {
-            let data = nodes
-            let url = `/performance/indicator/flow/${this.user_info.site_id}/${this.templateId}`
-            this.$http.post(url, data).then(res => {
-                let { code, data } = res
-                if (code == 1) {
-                    let { indicatorId } = this.currentIndicator;
-                    let index = this.tableData.findIndex(table => table.indicatorId === indicatorId)
-                    this.tableData.splice(index, 1, data); //替换元素
-                    this.$message.success("操作成功");
-                    this.nodeType = ''
-                    this.dialogTitle = ''
-                    this.selectNodes = []
-                    this.currentIndicator = []
-                    this.selectIndicatorId = ''
-                    this.tagIndex = -1
-                } else {
-                    this.$message.error(res.message || '操作失败');
-                }
-            })
-        },
-
-
-        closeNodeDialog() {
-            console.log("关闭弹窗")
-            this.tagIndex = -1 // 子节点索引
-            this.currentIndicator = null;
-            this.selectIndicatorId = null; // 指标ID
-            this.selectNodes = []; // 所有节点
-            this.nodeType = ''; // 节点类型
-        },
-
-        // 批量操作成功
-        finishBatchHandle(data) {
-            this.flowInfo = data;
-            this.get_table_data();
-        },
-
-        // 编辑计算公式确定的回调
-        onFormulaConfirm(formulas) {
-            let url = `/performance/indicator/expression/${this.user_info.site_id}/${this.templateId}`;
-            let { indicatorId } = this.currentIndicator;
-            let params = {
-                indicatorId,
-                expression: {
-                    formulas: formulas.map(item => {
-                        return {
-                            condition: item.condition,
-                            expression: item.expression
-                        }
-                    })
-                }
-            }
-            this.$http.post(url, params).then(res => {
-                let { data, code } = res
-                if (code) {
-                    this.tableData.splice(this.selectIndex, 1, data); //替换元素
-                }
-            })
-        },
-        // 发布考核
-        publish() {
-            this.showPublish = true;
-        },
-        // 发布考核弹框的回调
-        onPubishConfirm(params, selectOkrs) {
-            let templateId = this.templateId;
-            let { title, startDate, endDate, cycleType, employeeIds, okrs, cateId } = params
-            let employees = employeeIds.map(employee => ({
-                employeeId: employee,
-                ids: [],
-                interviewFlow: {
-                    nodes: [
-                        {
-                            id: "IT_1894283564934688769",
-                            type: "interview",
-                            allows: [],
-                            enable: false,
-                            weight: 0,
-                            children: [],
-                            assigneeIds: [],
-                            leaderLevel: 1,
-                            assigneeType: "self",
-                            multipleType: "or"
-                        }
-                    ]
-                }
-            }))
-
-            let requireParams = {
-                title,
-                cycleType,
-                startDate,
-                endDate,
-                okrs,
-                templates: [
-                    {
-                        templateId,
-                        employees
-                    }
-                ],
-                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 => {
-                console.log(res)
-                let { data, code } = res
-                this.loading = false
-                if (code == 1) {
-                    this.$message.success("发布成功");
-                    setTimeout(() => {
-                        this.$router.go(-1)
-                    }, 1000);
-                }
-            })
-        }
-    }
-};
-</script>
-
-<style lang="scss">
-.box {
-    .el-switch__core {
-        width: 30px !important;
-        height: 16px;
-    }
-
-    .el-switch__core::after {
-        width: 14px;
-        height: 14px;
-        margin-top: -1px;
-    }
-
-    .el-switch.is-checked .el-switch__core::after {
-        margin-left: -15px;
-    }
-}
-
-.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="scoped" lang="scss">
-.oneLine {
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-}
-
-.box {
-    width: 100%;
-    height: 100%;
-    display: flex;
-    flex-direction: column;
-    padding: 0 20px;
-    font-size: 14px;
-    background-color: #fff;
-    box-sizing: border-box;
-    border-radius: 4px;
-
-    /* 设置滚动条的宽度和背景色 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
-        width: 10px;
-        height: 10px;
-        background-color: #f9f9f9;
-    }
-
-    /* 设置滚动条滑块的样式 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb {
-        border-radius: 6px;
-        background-color: #c1c1c1;
-    }
-
-    /* 设置滚动条滑块hover样式 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
-        background-color: #a8a8a8;
-    }
-
-    /* 设置滚动条轨道的样式 */
-    ::v-deep .el-table__body-wrapper::-webkit-scrollbar-track {
-        box-shadow: inset 0 0 5px rgba(87, 175, 187, 0.1);
-        border-radius: 6px;
-        background: #ededed;
-    }
-
-    /*头部样式*/
-    .header-content {
-        position: relative;
-        box-sizing: border-box;
-        height: 60px;
-        justify-content: space-between;
-
-        .header-left {
-            width: 230px;
-            box-sizing: border-box;
-            height: 60px;
-            cursor: pointer;
-
-            .el-icon-arrow-left {
-                font-size: 22px;
-            }
-
-            &:hover {
-                .el-icon-arrow-left {
-                    background-color: #f5f7fa;
-                    color: #222;
-                }
-            }
-
-            .text {
-                font-size: 16px;
-                font-weight: 600;
-                padding-left: 50px;
-
-                &::before {
-                    position: absolute;
-                    content: '';
-                    width: 1px;
-                    height: 36px;
-                    background-color: #ebebeb;
-                    left: 44px;
-                    top: 50%;
-                    margin-top: -18px;
-                }
-            }
-
-        }
-
-        .header-right {
-            width: 230px;
-            text-align: right;
-        }
-    }
-
-    .plus-button {
-        display: block;
-        margin: 10px auto;
-    }
-
-    .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>

+ 55 - 41
src/newPerformance/views/TemplateDetails.vue

@@ -145,13 +145,11 @@
                             </template>
 
                             <template v-if="item.label === '自评'">
-                                <el-switch v-model="scope.row.flow.nodes[2].enable"
-                                    @change="handleScoreSelf(scope.row, scope.$index)"></el-switch>
+                                <el-switch :value="scope.row.flow.nodes[2].enable" @input="handleStatusChange(-1, scope.row, 'scoreSelf')"></el-switch>
                             </template>
 
                             <template v-if="item.label === '互评'">
-                                <el-switch v-model="scope.row.flow.nodes[3].enable"
-                                    @change="handleScoreSelf(scope.row, scope.$index)"></el-switch>
+                                <el-switch :value="scope.row.flow.nodes[3].enable"  @input="handleStatusChange(-1, scope.row, 'scoreEachOther')"></el-switch>
                             </template>
 
                             <template v-if="item.label === '评分'">
@@ -200,14 +198,15 @@
             :indicator-id="selectIndicatorId" @closeDialog="closeDialog" :tag-index="tagIndex"
             @onConfirm="finishHandle" /> -->
 
+        <!-- 发布考核弹框 -->
+        <PublishComp v-if="showPublish" v-model="showPublish" :template-ids="[templateId]"
+            @onConfirm="onPubishConfirm" />
+
         <!-- 编辑计算公式 -->
         <FormulaComp v-if="showFormula" v-model="showFormula"
             :fixed-props="[{ key: 'target', name: '目标' }, { key: 'weight', name: '权重' }, { key: 'result', name: '结果值' }]"
             :expressions-props="currentIndicator.expression.formulas || []" @onConfirm="onFormulaConfirm" />
 
-        <!-- 发布考核弹框 -->
-        <PublishComp v-if="showPublish" v-model="showPublish" :template-ids="[templateId]"
-            @onConfirm="onPubishConfirm" />
 
         <!-- 编辑规则 -->
         <EditContentComp v-if="showEditContent" v-model="showEditContent" :content="content"
@@ -230,6 +229,13 @@
             :indicator-id="selectIndicatorId" @closeDialog="closeNodeDialog" :tag-index="tagIndex"
             @onConfirm="finishHandle" />
 
+        <!-- 编辑自评节点 -->
+        <ScoreSelf v-if="scoreSelf" v-model="scoreSelf" :form-label="formLabel" :dialog-title="dialogTitle"
+            :node-type="nodeType" :template-id="templateId" :select-nodes="selectNodes"
+            :indicator-id="selectIndicatorId" @closeDialog="closeNodeDialog" :tag-index="tagIndex"
+            @onConfirm="finishHandle" />
+
+
         <!-- 编辑互评节点 -->
         <ScoreEachOther v-if="scoreEachOther" v-model="scoreEachOther" :form-label="formLabel"
             :dialog-title="dialogTitle" :node-type="nodeType" :template-id="templateId" :select-nodes="selectNodes"
@@ -241,6 +247,7 @@
             :template-id="templateId" :select-nodes="selectNodes" :indicator-id="selectIndicatorId"
             @closeDialog="closeNodeDialog" :tag-index="tagIndex" @onConfirm="finishHandle" />
 
+        <!-- 编辑审批节点 -->
         <Reviews v-if="reviews" v-model="reviews" :form-label="formLabel" :dialog-title="dialogTitle"
             :node-type="nodeType" :template-id="templateId" :select-nodes="selectNodes"
             :indicator-id="selectIndicatorId" @closeDialog="closeNodeDialog" :tag-index="tagIndex"
@@ -271,6 +278,7 @@ import EditContentComp from '@/newPerformance/components/TemplateDetails/EditCon
 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'; // 审批流程节点
@@ -290,6 +298,7 @@ export default {
         BatchHandleNode,
         TargetConfirms,
         ResultInput,
+        ScoreSelf,
         ScoreEachOther,
         Scores,
         Reviews,
@@ -304,9 +313,7 @@ export default {
             title: "模板名称",
             alertTilte: "可在表格中直接编辑指标,规则 (规则支持富文本) ,目标,单位,权重,计算公式以及流程节点, 注意: 每个指标的标题不能为空!每个指标的评分节点一定要开启!",
             templateId: "", // 模板ID
-            tableData: [
-                
-            ], // 表格数据
+            tableData: [], // 表格数据
             showFormula: false, // 编辑计算公式弹框显示
             showPublish: false, // 发布考核弹框显示
             dialogVisible: false, // 编辑流程节点弹框显示
@@ -349,6 +356,7 @@ export default {
             batchHandleDialog: false,
             targetConfirms: false,
             resultInput: false,
+            scoreSelf: false,
             scoreEachOther: false,
             scores: false,
             reviews: false,
@@ -373,6 +381,11 @@ export default {
 
     created() {
         this.initData();
+        
+        this.$nextTick(() => {
+            this.rowDrop(); // 行拖拽
+            this.columnDrop(); // 列拖拽
+        })
     },
     methods: {
 
@@ -617,31 +630,37 @@ export default {
             // 要侦听拖拽响应的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;
-            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表示上面的被删除数据)
-                }
-            })
+            if (tbody) { 
+                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表示上面的被删除数据)
+                    }
+                })
+            }
+            
         },
         // 列拖拽
         columnDrop() {
             // 要侦听拖拽响应的DOM对象
             const wrapperTr = document.querySelector('.el-table__body-wrapper tr');
             const that = this;
-            Sortable.create(wrapperTr, {
-                animation: 180,
-                delay: 0,
-                // 结束拖拽后的回调函数
-                onEnd: evt => {
-                    console.log('拖动了列(index):');
-                    const oldItem = that.dropCol[evt.oldIndex];
-                    that.dropCol.splice(evt.oldIndex, 1);
-                    that.dropCol.splice(evt.newIndex, 0, oldItem);
-                }
-            })
+            if (wrapperTr) {
+                Sortable.create(wrapperTr, {
+                    animation: 180,
+                    delay: 0,
+                    // 结束拖拽后的回调函数
+                    onEnd: evt => {
+                        console.log('拖动了列(index):');
+                        const oldItem = that.dropCol[evt.oldIndex];
+                        that.dropCol.splice(evt.oldIndex, 1);
+                        that.dropCol.splice(evt.newIndex, 0, oldItem);
+                    }
+                })
+            }
+            
         },
 
         openEditDialog() {
@@ -756,13 +775,7 @@ export default {
             this.$axiosUser("get", `/performance/indicator/list/${this.user_info.site_id}/` + this.templateId).then(res => {
                 this.tableData = res.data.data.list
                 this.loading = false
-                this.$nextTick(() => {
-                    // setTimeout(() => {
-
-                    // }, 20)
-                    this.rowDrop(); // 行拖拽
-                    this.columnDrop(); // 列拖拽
-                })
+                
             })
         },
 
@@ -840,6 +853,7 @@ export default {
             }
             if (nodeType == 'scoreSelf') {
                 this.dialogTitle = "自评"
+                this.scoreSelf = true
             }
             if (nodeType == 'scoreEachOther') {
                 this.dialogTitle = "互评"
@@ -862,7 +876,6 @@ export default {
                 this.formLabel = "抄送人"
                 this.cc = true
             }
-            // this.dialogVisible = true;
         },
 
 
@@ -911,6 +924,7 @@ export default {
                 }).catch(() => { });
             }
         },
+
         // 删除指标
         deleteIndicator(item) {
             let url = `/performance/indicator/remove/${this.user_info.site_id}/${this.templateId}/${item.indicatorId}`
@@ -918,6 +932,7 @@ export default {
                 return res.data
             })
         },
+
         // 打开计算公式弹框
         openFormula(row, index) {
             this.currentIndicator = null;
@@ -932,7 +947,6 @@ export default {
 
         // 全选复选框事件监听
         checkAllChangeFn(val) {
-            console.log(val)
             this.loading = true
             if (val) {
                 // 全选
@@ -982,12 +996,14 @@ export default {
             this.judgeIsCheckAll();
             // this.refreshTable();
         },
+
         // 重新渲染表格
         refreshTable() {
             this.$nextTick(() => {
                 if (this.$refs.fmeaTableRef) this.$refs.fmeaTableRef.doLayout();
             })
         },
+
         // 气泡框出现
         showPopover() {
             this.checkColumns = []
@@ -1007,15 +1023,13 @@ export default {
             else
                 this.checkAll = false
         },
+
         finishHandle(nodes) {
             let data = nodes
             let url = `/performance/indicator/flow/${this.user_info.site_id}/${this.templateId}`
             this.$http.post(url, data).then(res => {
                 let { code, data } = res
-                console.log(data)
                 if (code == 1) {
-                    console.log("当前指标");
-                    console.log(data.indicatorId);
                     let index = this.tableData.findIndex(table => table.indicatorId === data.indicatorId)
                     this.tableData.splice(index, 1, data); //替换元素
                     this.$message.success("操作成功");

+ 4 - 2
src/okr/views/okrIndex.vue

@@ -35,7 +35,7 @@
                   <template v-for="(item2, index2) in item.children" v-if="!item2.meta.isHide">
                     <el-menu-item :index="returnIndex(index, index2)" :ref="item2.path" :route="item2.path"
                       :key="index2" class="font-flex-word">
-                      <span slot="title" style="margin-left: 10px;width:120px">{{ item2.label }}</span>
+                      <span slot="title" style="margin-left: 10px; width:120px">{{ item2.label }}</span>
                     </el-menu-item>
                   </template>
                 </el-submenu>
@@ -44,7 +44,9 @@
           </el-menu>
         </el-aside>
         <el-main>
-          <keep-alive :include="keepAliveView"><router-view /></keep-alive>
+          <keep-alive :include="keepAliveView">
+            <router-view />
+          </keep-alive>
         </el-main>
       </el-container>
     </LoadingAll>

+ 8 - 1
src/performance/views/performanceIndex.vue

@@ -57,11 +57,14 @@
             <el-button v-if="navNew == 3" type="primary" @click="usingTheStrategy = false">开始使用</el-button>
           </div>
         </div>
+
       </div>
     </el-dialog>
   </el-container>
 </template>
 
+
+
 <script>
 import { mapGetters } from 'vuex';
 import LoadingAll from '@/components/LoadingAll';
@@ -137,11 +140,11 @@ export default {
       });
     }
   },
-
   
   computed: {
     ...mapGetters(['site_info'])
   },
+
   created() {
     this.$bus.$on('hideAside', (flag, routerName) => {
       if (flag) {
@@ -203,6 +206,8 @@ export default {
       this.usingTheStrategy = false;
       this.$router.push({ name: paths });
     },
+
+
     strategys() {
       this.usingTheStrategy = true;
       this.tutorialsvisible = false;
@@ -404,6 +409,8 @@ export default {
   height: calc(100vh - 80px);
   border-radius: 5px;
 }
+
+
 .el-aside::-webkit-scrollbar {
   width: 0px;
   background-color: #fff;

+ 472 - 0
src/performance/views/performanceIndex11.vue

@@ -0,0 +1,472 @@
+<template>
+  <el-container>
+    <LoadingAll :isType="3">
+      <el-container>
+        <el-aside v-if="!newSystemMoudle.includes($route.name)">
+          <div class="title" style="">
+            <span>绩效系统</span>
+            <el-popover placement="right" trigger="hover" effect="dark" content="切换新绩效系统">
+              <i class="el-icon-sort" slot="reference" @click="goNewPerformance()" />
+            </el-popover>
+          </div>
+          <el-menu :default-active="activeIndex" class="el-menu-vertical-demo" ref="elMenu" :router="true"
+            @select="activeRouter" :unique-opened="true">
+            <template v-for="(item, index) in routers">
+              <div v-if="item.children.length != 0" :key="index">
+                <el-menu-item :index="returnIndex(index, 0)" :route="item.children[0].path" :ref="item.children[0].path"
+                  v-if="item.label=='工作台' || item.label=='我的绩效'">
+                  <div class="flex-box-ce">
+                    <svg-icon :icon-class="item.icon" class="svgIcon"></svg-icon>
+                    <span slot="title" style="margin-left: 5px;">{{ item.children[0].label }}</span>
+                  </div>
+                </el-menu-item>
+                <el-submenu :index="index.toString()" :key="index" v-else>
+                  <template slot="title">
+                    <div class="flex-box-ce">
+                      <svg-icon :icon-class="item.icon" class="svgIcon"></svg-icon>
+                      <span style="margin-left: 5px;">{{ item.label }}</span>
+                    </div>
+                  </template>
+                  <template v-for="(item2, index2) in item.children">
+                    <el-menu-item :index="returnIndex(index, index2)" :ref="item2.path" :route="item2.path"
+                      :key="index2" class="font-flex-word">
+                      <span slot="title" style="margin-left: 10px; width:120px">
+                        <span :class="item2.label=='考核明细'? 'tio2':'tio'"
+                      </span>
+                    </el-menu-item>
+                  </template>
+                </el-submenu>
+              </div>
+            </template>
+          </el-menu>
+        </el-aside>
+        <el-main>
+          <keep-alive :include="keepAliveView"><router-view /></keep-alive>
+        </el-main>
+      </el-container>
+    </LoadingAll>
+
+    <el-dialog :visible.sync="usingTheStrategy" width="680px" :before-close="navDialog" :close-on-click-modal="false">
+      <div>
+        <img style="width: 100%;" :src="'static/images/' + navList[navNew].image + '.png'" alt="" />
+        <div class="flex-box flex-d-center">
+          <el-button @click="navPath(navList[navNew].paths)" type="primary" plain>{{ navList[navNew].name }}</el-button>
+          <div>
+            <el-button v-if="navNew > 0" @click="navNew--">上一页</el-button>
+            <el-button v-if="navNew < 3" @click="navNew++" type="primary">下一页</el-button>
+            <el-button v-if="navNew == 3" type="primary" @click="usingTheStrategy = false">开始使用</el-button>
+          </div>
+        </div>
+      </div>
+    </el-dialog>
+  </el-container>
+</template>
+
+<script>
+import { mapGetters } from 'vuex';
+import LoadingAll from '@/components/LoadingAll';
+export default {
+  components:{ LoadingAll },
+  data() {
+    return {
+      usingTheStrategy: false,
+      tutorialsvisible: false,
+      hideAside: false,
+      navList: [
+        { name: '去"新建考核模板"', image: 'nav_jx_1', paths: 'evaluate' },
+        { name: '去"发起考核"', image: 'nav_jx_2', paths: 'sponsorAssess' },
+        { name: '看"考核管理"', image: 'nav_jx_3', paths: 'assessManagement' },
+        { name: '看"绩效报表"', image: 'nav_jx_4', paths: 'statement' }
+      ],
+      navNew: 0,
+      newSystemMoudle: ['newPerformance', 'examineDetails', 'moreIndicatorList', 'templateDetails', 'interviewDetails', 'combinationTemplates', 'moreNode'],
+      activeIndex: '0-0',
+      routers: [],
+      url: '',
+      profile: this.$store.getters.user_info,
+      getRole: this.$getRole(1),
+      keepAliveView:['job','management','score','assessManagement','assessDetails','statement','set'],  //需要缓存的组件名称列表,用逗号分隔
+      keepAliveView2:['job','management','score','assessManagement','assessDetails','statement','set'],  //需要缓存的组件名称列表,用逗号分隔
+
+      userInfo: this.$userInfo(), //绩效接口人员信息
+    };
+  },
+  watch: {
+    $route(to,form) {
+      // console.log(to.name,form.name)
+      // 缓存页面,达到缓存页面条件的效果
+      if (to.name === 'performanceIndex') {
+        // console.log("从新系统跳转过来的")
+        this.setRouters();
+      }else if(to.name=='job' && form.name=='assessManagement'){//首页
+        this.returnArr('job')
+      }else if(to.name=='management' && form.name=='job'){//我管理的-更多
+        this.returnArr('management')
+      }else if(to.name=='score' && form.name=='job'){//我评分的-更多
+        this.returnArr('score')
+      }else if(to.name=='assessManagement'&&form.name=='myPerformance'){//考核管理
+        this.returnArr('assessManagement')
+      }else if(to.name=='assessDetails'&&form.name=='assessManagement'){//考核管理2
+        this.returnArr('assessDetails')
+      }else if(to.name=='assessDetails'&&form.name=='sponsorAssess'){//发起考核进入-考核管理
+        this.returnArr('assessDetails')
+      }else if(to.name=='assessDetails'&&form.name=='analyse'){//结果分析-考核管理
+         this.returnArr('assessDetails')
+      }else if(to.name=='statement'&&form.name=='myPerformance'){//绩效报表
+        this.returnArr('statement')
+      }else if(to.name=='set'&&form.name=='statement'){//设置
+        this.returnArr('set')
+      }else if(to.name=='set'&&form.name=='job'){//设置
+        this.returnArr('set')
+      }else{
+        this.keepAliveView = JSON.parse(JSON.stringify(this.keepAliveView2));
+      }
+      var str = to.path;
+      this.routers.map((item, index) => {
+        if (item.path == str) {
+          this.activeIndex = index + '-' + index;
+          this.$setCache('performance_path', index + '-' + index);
+        }
+        item.children.map((item2, index2) => {
+          if (item2.path == str) {
+            this.activeIndex = index + '-' + index2;
+            this.$setCache('performance_path', index + '-' + index2);
+          }
+        });
+
+      });
+    }
+  },
+
+  
+  computed: {
+    ...mapGetters(['site_info'])
+  },
+  created() {
+    this.setRouters();
+    this.$bus.$on('hideAside', (flag, routerName) => {
+      if (flag) {
+        this.newSystemMoudle.push(routerName)
+      } else {
+        let index = this.newSystemMoudle.findIndex(item => item === routerName)
+        if (index !== '-1') this.newSystemMoudle.splice(index, 1)
+      }
+    })
+
+    let site_info = JSON.parse(localStorage.getItem("site_info"));
+    let { performance: { enable } } = site_info
+    let isChooseNewSystem = localStorage.getItem("isChooseNewSystem")
+    if (!enable) return
+    if (isChooseNewSystem) {
+      if (this.$route.name == "newPerformance") {
+        this.$router.push("/newPerformance")
+      } else {
+        this.setRouters();
+      }
+      return
+    }
+    this.$confirm('绩效系统已经升级, 是否切换新绩效系统?', '提示', {
+      confirmButtonText: '确定',
+      cancelButtonText: '取消',
+      type: 'warning'
+    }).then(() => {
+      localStorage.setItem("isChooseNewSystem", true)
+      this.$router.push("/newPerformance")
+    }).catch(() => {
+      this.setRouters();
+    });
+      
+  },
+  mounted() {
+    this.getRole = this.$getRole(1);
+  },
+  methods: {
+    goNewPerformance() {
+      this.$router.push("/newPerformance")
+    },
+    returnArr(str){
+      this.keepAliveView=this.keepAliveView.filter(item=>{
+        return item!=str;
+      })
+      setTimeout(()=>{
+        this.keepAliveView=JSON.parse(JSON.stringify(this.keepAliveView2));
+      },1000)
+    },
+    returnIndex(str, str2) {
+      return str + '-' + str2;
+    },
+    //当刷新页面是控制左边导航栏的选中
+    activeRouter(index, indexPath) {
+      this.$setCache('setUrlName', null); //清空set页面的保存展示页面
+      this.$setCache('performance_path', indexPath[1] ? indexPath[1] : indexPath[0]);
+    },
+    navPath(paths) {
+      this.usingTheStrategy = false;
+      this.$router.push({ name: paths });
+    },
+    strategys() {
+      this.usingTheStrategy = true;
+      this.tutorialsvisible = false;
+    },
+    navDialog(done) {
+      done();
+      this.tutorialsvisible = true;
+    },
+    openHome() {
+      this.$router.push({ path: '/job' });
+    },
+    returnRoutersArr(str,routers) {
+      var routersArr = [];
+      routers.forEach(item => {
+        if (item.meta.groupCode == str) {
+          //获取对应模块的路由
+          routersArr.push(item);
+        }
+      });
+      return routersArr;
+    },
+    setRouters() {
+      // 刚进入来清除一些缓存
+      this.$removeCache(['isVariationJx', 'assessDetails', 'cache_s_m', 'indexSet', 'staffAssDet']);
+
+      let main = this.userInfo.per_permission.main;
+      let per_role = this.userInfo.per_permission.per_role; //用户的身份
+
+      let childrenRouter = [];
+      let routers=[];
+      this.$router.options.routes[0].children.some((item, i) => {
+        if (item.name == 'performanceIndex') {
+          childrenRouter = item.children.filter(e => {
+            if (e.meta) {
+              return e;
+            }
+          });
+          return true;
+        }
+      });
+
+      if (per_role == 'manager') {
+        if (main == 1) {//主管理员
+          this.setRole('masterAdministrator');
+          routers=childrenRouter
+        } else {//子管理员
+          this.setRole('childAdministrator');
+          routers = this.getChildRouter(childrenRouter, 'childAdministrator');
+        }
+      } else {
+        //员工||部门管理员
+        if (this.userInfo.employee_detail.manage_dept_ids.length > 0) {
+          this.setRole('deptManager');
+          routers = this.getChildRouter(childrenRouter, 'deptManager');
+        } else {
+          this.setRole('employee');
+          routers = this.getChildRouter(childrenRouter, 'employee');
+        }
+      }
+      let routersArr = [
+         { label: '工作台', children: this.returnRoutersArr('job',routers), icon: '#icon-gongzuotai1'},
+         { label: '绩效管理', children: this.returnRoutersArr('assessManagement',routers), icon: '#icon-tongxunlu_tianjiabumen'},
+         { label: '绩效报表', children: this.returnRoutersArr('statement',routers), icon: '#icon-shezhi_jiaose'},
+         { label: '我的绩效', children: this.returnRoutersArr('myPerformance',routers), icon: '#icon-yonghu'},
+         { label: '设置', children: this.returnRoutersArr('set',routers), icon: '#icon-shezhi_jichushezhi'},
+      ];
+      this.$setCache('performance_routers',routersArr);
+      this.routers = routersArr
+      let performance_path=this.$getCache('performance_path');
+      if (performance_path) {
+        this.activeIndex =performance_path;
+        if(performance_path=='0-0'){
+          this.$router.push({ path:'/job'});
+        }
+      }
+      let performanceIndex=this.$getCache('performanceIndex');
+      if (performanceIndex) {
+        this.$router.push({ path:performanceIndex});
+        this.$removeCache('performanceIndex')
+      }
+    },
+    setRole(str) {
+      this.$setCache('role', str);
+    },
+    //获取路由
+    getChildRouter(routerChildren, str) {
+      let permission = this.userInfo.per_permission.permission; //用户的权限
+      let routers = {}; //过滤后的路由,顺便去重
+      routerChildren.forEach(item => {
+        let role = item.meta.role;
+        let jurisdiction = item.meta.jurisdiction;
+        if (item.meta) {
+          //当没设置meta时不显示在导航栏上
+          if (role.indexOf(str) >= 0) {
+            if (str == 'employee' || str == 'deptManager') {
+              //当是员工||创始人||部门主管时,不需要验证权限
+              routers[item.name] = item;
+              return;
+            }
+            //当登录人是7.0部门管理者时写死显示绩效报表
+            if (item.name == 'statement' && this.$userInfo().employee_detail.manage_dept_ids.length > 0) {
+              routers[item.name] = item;
+              return;
+            }
+            permission.forEach(roleItem => {
+              if (jurisdiction) {
+                if (jurisdiction.indexOf(roleItem.id) >= 0) {
+                  routers[item.name] = item;
+                }
+              }
+            });
+          }
+        }
+      });
+      let routersArr = [];
+      for (let s in routers) {
+        routersArr.push(routers[s]);
+      }
+      return routersArr;
+    },
+
+
+  }
+};
+</script>
+<style scoped="scoped" lang="scss">
+.title {
+  padding: 20px;
+  font-weight: 600;
+  border-bottom: 1px solid #f1f1f1;
+  font-size: 16px;
+  box-sizing: border-box;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  i {
+    transform: rotate(90deg);
+    color: #99a9bf;
+    font-size: 20px;
+    transition: all 0.3s;
+    &:hover {
+      color: rgb(64, 158, 255);
+      cursor: pointer;
+    }
+  }
+}
+.tio{
+  font-size: 12px;
+  background-color: #FFF2CC;
+  border-radius: 5px;
+  color: #98683C;
+  padding: 0 2px;
+}
+.tio2{
+  font-size: 12px;
+  background-color: #D4E4FF;
+  border-radius: 5px;
+  color: #409EFF;
+  padding: 0 2px;
+}
+.appImg {
+  width: 200px;
+  height: 200px;
+}
+.data-all {
+  margin-bottom: 10%;
+  color: #595959;
+  text-align: center;
+}
+ ::v-deep .el-dialog__header {
+  border-bottom: none;
+}
+.svgIcon {
+  font-size: 20px;
+  color: #99a9bf;
+}
+.el-menu-vertical-demo:not(.el-menu--collapse) {
+  width: 180px;
+}
+.el-header {
+  background-color: #fff;
+  padding: 0 !important;
+  border-bottom: 1px solid #f1f1f1;
+  position: relative;
+  box-sizing: border-box;
+  height: 60px;
+}
+.el-menu-vertical-demo:not(.el-menu--collapse) {
+  width: 180px;
+}
+.el-menu {
+  overflow: hidden;
+  border: none;
+}
+.el-aside {
+  transition: width 0.28s;
+  width: 180px !important;
+  background-color: #fff;
+  height: calc(100vh - 80px);
+  border-radius: 5px;
+}
+.el-aside::-webkit-scrollbar {
+  width: 0px;
+  background-color: #fff;
+}
+
+.el-aside::-webkit-scrollbar-thumb {
+  background-color: #ccc;
+}
+.container-all {
+  background-color: #f4f6f9;
+  height: 100%;
+  overflow: hidden;
+}
+.el-main {
+  height: calc(100vh - 80px);
+  overflow-y: scroll;
+  padding: 0 10px;
+  min-width: 1100px;
+}
+.logo-box {
+  max-width: 400px;
+  min-width: 180px;
+}
+.logo-box .logo {
+  width: 30px;
+  height: 30px;
+  margin-right: 5px;
+  border-radius: 6px;
+}
+.logo-box div {
+  font-size: 16px;
+  font-weight: 600;
+}
+.wn {
+  height: 26px;
+  width: 26px;
+  margin-right: 12px;
+  cursor: pointer;
+}
+.hea-right {
+  padding: 0 20px;
+}
+.upgrade {
+  margin-left: 10px;
+  margin-right: 10px;
+}
+
+.PCtutorials {
+  width: 100px;
+  color: #409EFF;
+  cursor: pointer;
+  border-radius: 3px;
+  text-align: center;
+  box-shadow: 1px 1px 0px 0px #ccc;
+  height: 35px;
+  line-height: 35px;
+  font-weight: 500;
+  text-align: center;
+  border: 2px solid #409EFF;
+  // background-image: linear-gradient(117deg, #00c6fb 0%, #005bea 100%);
+}
+// .PCtutorials:hover {
+//   background-color: #0055ff;
+// }
+</style>

Some files were not shown because too many files changed in this diff