Przeglądaj źródła

新增考评指标管理列表,新增页面;新增考评规则配置列表,新增页面;新增考评启动列表页面

SunZehao 2 lat temu
rodzic
commit
75d29d0e86

+ 2 - 1
src/App.vue

@@ -45,6 +45,7 @@ export default {
 @import "./assets/css/main.css";
 /* @import "./assets/css/color-dark.css"; */
 #app{
-    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#005777), to(#005777), color-stop(0.2, #007aab),color-stop(0.8, #007aab));
+    background: #273856;
+    /* background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#005777), to(#005777), color-stop(0.2, #007aab),color-stop(0.8, #007aab)); */
 }
 </style>

+ 302 - 0
src/components/assessment/evaluationStartPage.vue

@@ -0,0 +1,302 @@
+<template>
+    <div class="evaluationStart" v-loading="loadingImport">
+        <div class="evaluationStartBtn">
+            <p class="titleSty">考评启动</p>
+            <div class="collectSeach">
+                <div class="exceed">
+                    <span class="exceedSpan">编号:</span>
+                    <el-input v-model="usernames" placeholder="请输入业务编号"></el-input>
+                </div>
+                <div class="exceed">
+                    <span class="exceedSpan">单位:</span>
+                    <el-input v-model="usernames" placeholder="请输入单位"></el-input>
+                </div>
+                <div class="exceed">
+                    <span class="exceedSpan">类别:</span>
+                    <el-input v-model="usernames" placeholder="请输入业务类别"></el-input>
+                </div>
+                <div class="exceed">
+                    <span class="exceedSpan">年度:</span>
+                    <el-input v-model="usernames" placeholder="请输入年度"></el-input>
+                </div>
+                <div class="exceed">
+                    <span class="exceedSpan">简述:</span>
+                    <el-input v-model="usernames" placeholder="请输入业务简述"></el-input>
+                </div>
+                <el-button type="primary" style="margin-left: 10px;" @click="getSeachData">搜索</el-button>
+                <el-button style="margin-left: 10px;" @click="reset">重置</el-button>
+            </div>
+            <div style="display:flex;justify-content: space-between;padding: 10px;">
+                <el-row :gutter="10" class="PeriodBtn">
+                    <el-col :span="1.5">
+                        <el-button
+                        type="danger"
+                        plain
+                        icon="Delete"
+                        size="mini"
+                        :disabled="deleteSelect.length === 0"
+                        @click="handleDelete"
+                        >批量删除</el-button>
+                    </el-col>
+                    <el-col :span="1.5">
+                        <el-button
+                            type="warning"
+                            plain
+                            icon="Download"
+                            size="mini"
+                            @click="handleExport"
+                        >导出</el-button>
+                    </el-col>
+                </el-row>
+            </div>
+            <div class="evaluationStartTableData">
+                <el-table :data="evaluationStartData" border style="width: 100%" @select="rowClick" @select-all="allSelect">
+                    <el-table-column type="selection" label="操作" align="center"></el-table-column>
+                    <el-table-column label="业务编号">
+                        <template #default="scope">
+                            <span>{{scope.row.create_time}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="考评单位">
+                        <template #default="scope">
+                            <span>{{scope.row.create_by}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="业务类别">
+                        <template #default="scope">
+                            <span>{{scope.row.indicator_id}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="年度">
+                        <template #default="scope">
+                            <span>{{scope.row.total_score}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="流程状态">
+                        <template #default="scope">
+                            <span>{{scope.row.desc}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="业务简述">
+                        <template #default="scope">
+                            <span>{{scope.row.update_time}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="任务进度">
+                        <template #default="scope">
+                            <span>{{scope.row.update_by}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="综合得分">
+                        <template #default="scope">
+                            <span>{{scope.row.evaluate_formula}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="考评排名">
+                        <template #default="scope">
+                            <span>{{scope.row.evaluate_method}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="考评评级">
+                        <template #default="scope">
+                            <span>{{scope.row.mapping_function}}</span>
+                        </template>
+                    </el-table-column>
+                </el-table>
+                <el-pagination
+                    @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange"
+                    :current-page="page.currentPage"
+                    :page-size="page.pagesize"
+                    layout="total, prev, pager, next, jumper"
+                    :total="page.total">
+                </el-pagination>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import {apiGetgetStandardPointManagementList, apiGetdeleteStandardPointManagement} from '../../api/api'
+export default {
+    data() {
+        return {
+            dialogVisible: false,
+            title: '',
+            indicatoroptions: [],
+            optionNameoptions:[],
+            indicatorIdS: '',
+
+            windframradio: {},
+            deleteSelect: [],
+            changeDateSelect: [],
+            loadingImport: false,
+            evaluationStartData:[],
+            single: false,
+            regionaloptions:[],
+            page:{
+                pagesize: 12,
+                currentPage: 1,
+                total: 0
+            }
+        }
+    },
+    mounted() {
+        // this.getCollectorwireprojectList()
+    },
+    methods:{
+        getSeachData() {
+            this.page.currentPage = 1
+            this.getCollectorwireprojectList('seach')
+        },
+        successImport(val) {
+            this.loadingImport = false
+            this.getCollectorwireprojectList()
+        },
+        importLoading(val) {
+            this.loadingImport = true
+        },
+        handleSizeChange(val){
+            this.page.pagesize = val
+        },
+        handleCurrentChange(val){
+            this.page.currentPage =val
+        },
+        rowClick(selection, row) {
+            this.windframradio = {}
+            this.deleteSelect = []
+            this.changeDateSelect = []
+            if (selection.length === 1) { 
+                this.windframradio = selection[0]
+            }
+            if (selection.length > 0) {
+                selection.forEach(item =>{
+                    this.deleteSelect.push(item.itemNo)
+                    this.changeDateSelect.push(item.itemNo)
+                })
+            }
+        },
+        allSelect(selection) {
+            this.deleteSelect = []
+            this.changeDateSelect = []
+            if (selection.length > 0) {
+                selection.forEach(item =>{
+                    this.deleteSelect.push(item.itemNo)
+                    this.changeDateSelect.push(item.itemNo)
+                })
+            }
+        },
+        // 新增区域信息
+        handleAdd() {
+            this.dialogVisible = true
+            // this.single = false
+            this.title = '新增考评指标'
+            this.$nextTick(() =>{
+                // this.resetForm()
+                // this.$refs['ruleForm'].clearValidate()
+            })
+        },
+    }
+}
+</script>
+
+<style lang="less">
+.evaluationStart{
+  .evaluationStartBtn{
+      background: #fff;
+      padding: 10px 20px 0 20px;
+      .collectSeach{
+          display: flex;
+          margin: 20px 20px 10px;
+            .exceed{
+                display: flex;
+                margin-right: 10px;
+                .exceedSpan{
+                    margin-top: 3px;
+                    display: inline-block;
+                    width: 55px;
+                }
+                .el-input{
+                    margin-right:10px;
+                    height: 30px;
+                    .el-input__inner{
+                        height:30px;
+                    }
+                    .el-input__suffix{
+                        .el-select__caret{
+                            line-height:30px;
+                        }
+                    }
+                }
+            }
+            .el-select{
+                margin-right:10px;
+                .el-input__inner{
+                    height:30px;
+                }
+                .el-input__suffix{
+                    .el-select__caret{
+                        line-height:30px;
+                    }
+                }
+            }
+      }
+      .titleSty{
+          border-left: 4px solid #007aab;
+          padding-left: 5px;
+          font-size: 16px;
+          font-weight: bold;
+          font-family: '微软雅黑';
+          margin-left:20px;
+      }
+      span{
+          font-size:14px;
+      }
+      .PeriodBtn{
+          padding-left: 10px;
+      }
+      .el-button{
+          height: 30px;
+          // width:100px;
+          padding: 0 30px ;
+          // padding-top: 8px;
+          span{
+              margin:0;
+          }
+      }
+  }
+  .evaluationStartTableData{
+    padding: 10px 20px;
+    .el-table{
+        .el-table__body-wrapper{
+            .el-table__empty-block{
+            height: 65vh !important;
+            }
+        }
+        .el-input__inner{
+            height: 30px !important;
+        }
+        .el-radio__label{
+            display: none;
+        }
+    }
+    .el-pagination{
+        margin-top: 20px;
+        text-align: end;
+        position: relative;
+    }
+    }
+    .el-overlay{
+        .el-dialog{
+            .el-dialog__body{
+                padding: 30px 60px 30px 20px !important;
+                .periodFrom{
+                    .el-select, .el-input{
+                        width: 100%;
+                    }
+                }
+            }
+        }
+    }
+}
+</style>

+ 23 - 6
src/components/assessmentPage.vue

@@ -1,20 +1,20 @@
 <template>
     <div class="assessmentPage">
-        <div class="treeList" :style="allHeight">
+        <!-- <div class="treeList" :style="allHeight">
             <p>全业务域对标考评系统</p>
             <el-tree ref="tree" :data="forecastDatas" :props="defaultProps" highlight-current node-key="id"
              :default-expanded-keys="['5']" @node-click="handleNodeClick">
                 <template #default="{ node, data }">
                     <span class="custom-tree-node">
                         <el-icon size="small" v-if="node.level === 1"><FolderOpened /></el-icon>
-                        <span style="margin-left:5px;font-size:14px">{{node.label}}</span>
+                        <span style="margin-left:5px;font-size:14px;line-height:35px;display:inline-block">{{node.label}}</span>
                     </span>
                 </template>
             </el-tree>
         </div>
         <div class="mainMessage" :style="mainHeight">
             <router-view/>
-        </div>
+        </div> -->
     </div>
 </template>
 
@@ -288,9 +288,9 @@ export default {
         // ]
     },
     mounted() {
-        this.$nextTick(() => {
-            this.$refs.tree.setCurrentKey('5-1')
-        })
+        // this.$nextTick(() => {
+        //     this.$refs.tree.setCurrentKey('5-1')
+        // })
     },
     methods: {
         handleNodeClick(val) {
@@ -325,6 +325,22 @@ export default {
             top: 15px;
             padding: 0 0 0 20px;
             background: transparent;
+            .el-tree-node{
+                .el-tree-node__content{
+                    height: 35px;
+                    .custom-tree-node{
+                        height: 35px;
+                    }
+                }
+                .el-tree-node__children{
+                    .el-tree-node__content{
+                        height: 35px;
+                        .custom-tree-node{
+                            height: 35px;
+                        }
+                    }
+                }
+            }
         }
         .el-tree--highlight-current
         .el-tree-node.is-current
@@ -332,6 +348,7 @@ export default {
             background-color: rgba(135, 206, 235, 0.2);
             color: #007aab;
             font-weight: bold;
+            border-radius: 5px;
         }
     }
     .mainMessage{

+ 252 - 331
src/components/evaluationSystem/evaluationIndexPage.vue

@@ -1,9 +1,27 @@
 <template>
-    <div class="evaluationIndex">
-        <div class="menuBtn">
+    <div class="evaluationIndex" v-loading="loadingImport">
+        <div class="evaluationIndexBtn">
             <p class="titleSty">考评指标管理</p>
+            <div class="collectSeach">
+                <div class="exceed">
+                    <span style="margin-top: 3px;">选项名称:</span>
+                    <el-select v-model="indicatorIdS" placeholder="请选择指标名称">
+                        <el-option
+                        v-for="item in indicatoroptions"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value">
+                        </el-option>
+                    </el-select>
+                </div>
+                <el-button type="primary" style="margin-left: 10px;" @click="getSeachData">搜索</el-button>
+                <el-button style="margin-left: 10px;" @click="reset">重置</el-button>
+            </div>
             <div style="display:flex;justify-content: space-between;padding: 10px;">
-                <el-row :gutter="10" class="regionalBtn">
+                <el-row :gutter="10" class="PeriodBtn">
+                    
+                        <!-- @click="handleAdd"
+                        @click="handleUpdate" -->
                     <el-col :span="1.5">
                         <el-button
                         type="primary"
@@ -19,7 +37,6 @@
                         plain
                         icon="Edit"
                         size="mini"
-                        @click="handleUpdate"
                         >修改</el-button>
                     </el-col>
                     <el-col :span="1.5">
@@ -28,26 +45,77 @@
                         plain
                         icon="Delete"
                         size="mini"
+                        :disabled="deleteSelect.length === 0"
                         @click="handleDelete"
-                        >删除</el-button>
+                        >批量删除</el-button>
+                    </el-col>
+                    <el-col :span="1.5">
+                        <el-button
+                        type="info"
+                        plain
+                        icon="Upload"
+                        size="mini"
+                        @click="handleImport"
+                        >导入</el-button>
+                    </el-col>
+                    <el-col :span="1.5">
+                        <el-button
+                            type="warning"
+                            plain
+                            icon="Download"
+                            size="mini"
+                            @click="handleExport"
+                        >导出</el-button>
                     </el-col>
                 </el-row>
             </div>
-            <div class="menuTableData">
-                <el-table :data="menuTableData" border style="width: 100%" @row-click="rowClick">
-                    <el-table-column label="操作" width="60" align="center">
+            <div class="evaluationIndexTableData">
+                <el-table :data="evaluationIndexData" border style="width: 100%" @select="rowClick" @select-all="allSelect">
+                    <el-table-column type="selection" label="操作" align="center"></el-table-column>
+                    <el-table-column label="创建时间">
+                        <template #default="scope">
+                            <span>{{scope.row.create_time}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="创建者">
+                        <template #default="scope">
+                            <span>{{scope.row.create_by}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="指标ID">
+                        <template #default="scope">
+                            <span>{{scope.row.indicator_id}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="描述">
+                        <template #default="scope">
+                            <span>{{scope.row.desc}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="更新时间">
+                        <template #default="scope">
+                            <span>{{scope.row.update_time}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="更新者">
+                        <template #default="scope">
+                            <span>{{scope.row.update_by}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="选项名称">
                         <template #default="scope">
-                            <el-radio v-model="menuradio" :label="scope.row"></el-radio>
+                            <span>{{scope.row.option_name}}</span>
                         </template>
                     </el-table-column>
-                    <el-table-column label="菜单名称" prop="menuName">
+                    <el-table-column label="选项编码">
+                        <template #default="scope">
+                            <span>{{scope.row.option_code}}</span>
+                        </template>
                     </el-table-column>
-                    <!-- <el-table-column label="菜单层级">
+                    <el-table-column label="选项顺序">
                         <template #default="scope">
-                            <span>{{showMenuLeavel(scope.row.parentId)}}</span>
+                            <span>{{scope.row.option_order}}</span>
                         </template>
-                    </el-table-column> -->
-                    <el-table-column label="创建时间" prop="createTime">
                     </el-table-column>
                 </el-table>
                 <el-pagination
@@ -59,368 +127,223 @@
                     :total="page.total">
                 </el-pagination>
             </div>
+            <el-dialog :title="title" v-model="dialogVisible" width="600px" :close-on-click-modal="false">
+                <div class="periodFrom">
+                    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" :validate-on-rule-change="false">
+                        <el-form-item label="指标名称" prop="indicatorId">
+                            <el-select v-model="ruleForm.indicatorId" placeholder="请选择指标名称">
+                                <el-option
+                                v-for="item in indicatoroptions"
+                                :key="item.value"
+                                :label="item.label"
+                                :value="item.value">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="选项名称" prop="optionName">
+                            <el-select v-model="ruleForm.optionName" placeholder="请选择选项名称">
+                                <el-option
+                                v-for="item in optionNameoptions"
+                                :key="item.value"
+                                :label="item.label"
+                                :value="item.value">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="选项顺序" prop="optionOrder">
+                            <el-input v-model="ruleForm.optionOrder" placeholder="请输入选项顺序"></el-input>
+                        </el-form-item>
+                        <el-form-item label="描述" prop="desc">
+                            <el-input v-model="ruleForm.desc" :rows="5" type="textarea" placeholder="请输入描述"></el-input>
+                        </el-form-item>
+                    </el-form>
+                </div>
+                <template #footer>
+                    <span class="dialog-footer">
+                        <el-button @click="dialogVisible = false">取 消</el-button>
+                        <el-button type="primary">确 定</el-button>
+                    </span>
+                </template>
+            </el-dialog>
         </div>
-        <el-dialog :title="title" v-model="dialogVisible" width="600px" :close-on-click-modal="false" @close="closeDialog">
-            <div class="windframFromsxx">
-                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
-                    <el-form-item label="菜单名称" prop="menus">
-                        <el-select v-model="ruleForm.menus" placeholder="请选择菜单名称">
-                            <el-option
-                            v-for="item in menuNameOptions"
-                            :key="item.label"
-                            :label="item.label"
-                            :value="item.label">
-                            </el-option>
-                        </el-select>
-                    </el-form-item>
-                    <!-- <el-form-item label="菜单编号" prop="menuNum">
-                        <el-select v-model="ruleForm.menuNum" placeholder="请选择菜单编号">
-                            <el-option
-                            v-for="item in menuOptions"
-                            :key="item.value"
-                            :label="item.label"
-                            :value="item.value">
-                            </el-option>
-                        </el-select>
-                    </el-form-item> -->
-                </el-form>
-            </div>
-            <template #footer>
-                <span class="dialog-footer">
-                    <el-button @click="resetForm" v-if="!single">重 置</el-button>
-                    <el-button @click="dialogVisible = false" v-else>取 消</el-button>
-                    <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button>
-                </span>
-            </template>
-        </el-dialog>
+        <import-dailog ref="importPage" @successImport="successImport" @importLoading="importLoading"></import-dailog>
     </div>
 </template>
 
 <script>
-import {apiGetgetMenuList, apiGetStation, apiGetgetaddmenuMsg, apiGetgetuploadmenuMsg, apiGetgetdeletemenuMsg} from '../../api/api'
+import importDailog from '../importPage/importDailog.vue'
+import {apiGetgetStandardPointManagementList, apiGetdeleteStandardPointManagement} from '../../api/api'
 export default {
+  components: { importDailog },
     data() {
         return {
-            title:'',
-            menuTableData:[],
-            menuradio: {},
-            single: false,
-            dialogVisible:false,
-            roleName: '',
-            typeWh: '',
-            menuOptions: [],
-            menuNameOptions: [],
-            page:{
-                pagesize: 10,
-                currentPage: 1,
-                total: 0
-            },
+            dialogVisible: false,
+            title: '',
             ruleForm: {
-                menus: '',
-                // menuNum: null
+                indicatorId: '',
+                optionName: '',
+                optionOrder: '',
+                desc: ''
             },
             rules: {
-                menus: [
-                    { required: true, message: '请选择菜单名称', trigger: 'change' }
+                indicatorId: [
+                    { required: true, message: '请选择指标名称', trigger: 'blur' }
                 ],
-                // menuNum: [
-                //     { required: true, message: '请选择菜单编号', trigger: 'change' }
-                // ]
-            }
-        }
-    },
-    created() {
-        this.menuOptions = [
-            {
-                label: '一级菜单',
-                value: 0
-            },
-            // {
-            //     label: '二级菜单',
-            //     value: 1
-            // },
-            // {
-            //     label: '三级菜单',
-            //     value: 2
-            // }
-        ]
-        this.menuNameOptions = [
-            {
-                label: '概要'
-            },
-            {
-                label: '全景功率'
-            },
-            {
-                label: '功率预测'
-            },
-            {
-                label: '电量预测'
-            },
-            {
-                label: '功率管控'
-            },
-            {
-                label: '天气预报'
-            },
-            {
-                label: '统计汇总'
+                optionName: [
+                    { required: true, message: '请选择选项名称', trigger: 'change' }
+                ],
+                optionOrder: [
+                    { required: true, message: '请输入选项顺序', trigger: 'blur' }
+                ],
+                desc: [
+                    { required: true, message: '请输入描述', trigger: 'change' }
+                ]
             },
-            {
-                label: '智能营销'
+            indicatoroptions: [],
+            optionNameoptions:[],
+            indicatorIdS: '',
+
+            windframradio: {},
+            deleteSelect: [],
+            changeDateSelect: [],
+            loadingImport: false,
+            evaluationIndexData:[],
+            single: false,
+            regionaloptions:[],
+            page:{
+                pagesize: 12,
+                currentPage: 1,
+                total: 0
             }
-        ]
-        // this.getAllStations()
+        }
     },
     mounted() {
-        // this.getPersonListFn()
+        // this.getCollectorwireprojectList()
     },
     methods:{
-        // 获取所有场站
-        getAllStations() {
-            apiGetStation().then(datas =>{
-                if (datas && datas.data && datas.data.list) {
-                    datas.data.list.forEach(item =>{
-                        let obj = {
-                            label: item.stationName
-                        }
-                        this.menuNameOptions.push(obj)
-                    })
-                }
-            })
-        },
         getSeachData() {
-            this.getPersonListFn('seach')
+            this.page.currentPage = 1
+            this.getCollectorwireprojectList('seach')
         },
-        reset() {
-            this.roleName = ''
-            this.page = {
-                pagesize: 10,
-                currentPage: 1,
-                total: 0
-            }
-            this.getPersonListFn()
+        successImport(val) {
+            this.loadingImport = false
+            this.getCollectorwireprojectList()
         },
-        showMenuLeavel(id) {
-            let str = ''
-            this.menuOptions.forEach(item =>{
-                if (item.value === id) {
-                    str = item.label
-                }
-            })
-            return str
+        importLoading(val) {
+            this.loadingImport = true
         },
         handleSizeChange(val){
             this.page.pagesize = val
-            this.getPersonListFn('seach')
         },
         handleCurrentChange(val){
             this.page.currentPage =val
-            this.getPersonListFn('seach')
-        },
-        handleChange(file, fileList) {
-            this.ruleForm.fileList = fileList.slice(-3);
-        },
-        closeDialog() {
-            this.$refs['ruleForm'].clearValidate()
-        },
-        submitForm(formName) {
-            this.$refs[formName].validate((valid) => {
-                if (valid) {
-                    let that = this
-                    that.addOrUpdatemenuDate()
-                }
-            });
         },
-        // 新增/修改风电场配置
-        addOrUpdatemenuDate() {
-            let that = this
-            let params = {
-                menuName: that.ruleForm.menus,
-                // parentId: that.ruleForm.menuNum
-                parentId: 0
+        rowClick(selection, row) {
+            this.windframradio = {}
+            this.deleteSelect = []
+            this.changeDateSelect = []
+            if (selection.length === 1) { 
+                this.windframradio = selection[0]
             }
-            if (!that.single) {
-                apiGetgetaddmenuMsg(params).then(datas =>{
-                    that.changeshowData(datas)
-                })
-            } else {
-                params.menuId = this.menuradio.menuId
-                apiGetgetuploadmenuMsg(params).then(datas =>{
-                    that.changeshowData(datas)
+            if (selection.length > 0) {
+                selection.forEach(item =>{
+                    this.deleteSelect.push(item.itemNo)
+                    this.changeDateSelect.push(item.itemNo)
                 })
             }
         },
-        changeshowData(datas) {
-            if (datas.msg === '操作成功') {
-                this.dialogVisible = false
-                if (!this.single) {
-                    this.$message({
-                        message: '菜单新增成功',
-                        type: 'success'
-                    });
-                } else {
-                    this.$message({
-                        message: '菜单修改成功',
-                        type: 'success'
-                    });
-                }
-                this.single = false
-                this.reset()
-            }
-        },
-        resetForm() {
-            this.ruleForm = {
-                menus: '',
-                // menuNum: null
+        allSelect(selection) {
+            this.deleteSelect = []
+            this.changeDateSelect = []
+            if (selection.length > 0) {
+                selection.forEach(item =>{
+                    this.deleteSelect.push(item.itemNo)
+                    this.changeDateSelect.push(item.itemNo)
+                })
             }
         },
         // 新增区域信息
         handleAdd() {
             this.dialogVisible = true
-            this.single = false
-            this.title = '新增菜单'
+            // this.single = false
+            this.title = '新增考评管理'
             this.$nextTick(() =>{
-                this.resetForm()
-                this.$refs['ruleForm'].clearValidate()
+                // this.resetForm()
+                // this.$refs['ruleForm'].clearValidate()
             })
         },
-        // 修改区域信息
-        handleUpdate() {
-            this.dialogVisible = true
-            this.single = true
-            this.title = '修改菜单'
-            this.ruleForm = {
-                menus: this.menuradio.menuName,
-                // menuNum: this.menuradio.parentId
-            }
-        },
-        rowClick(row, column, event) {
-            this.menuradio = row
-        },
-        // 删除区域信息
-        handleDelete() {
-            this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
-                confirmButtonText: '确定',
-                cancelButtonText: '取消',
-                type: 'warning'
-            }).then(() => {
-                let that = this
-                let params = {
-                    menuId: that.menuradio.menuId
-                }
-                apiGetgetdeletemenuMsg(params).then(datas =>{
-                    if (datas.msg === '操作成功') {
-                        that.getPersonListFn()
-                    }
-                })
-                if (that.menuTableData.length>0) {
-                    that.menuradio = that.menuTableData[0]
-                }
-                that.$message({
-                    type: 'success',
-                    message: '删除成功!'
-                });
-            })
+        handleImport() {
+            this.$refs.importPage.upload.title = "考评指标管理信息导入"
+            this.$refs.importPage.upload.open = true
         },
-        //获取风电场列表数据
-        getPersonListFn(type) {
-            let that = this
-            let params = {
-                pageNum: that.page.currentPage,
-                pageSize: that.page.pagesize
-            }
-            apiGetgetMenuList(params).then(datas =>{
-                if (datas && datas.rows) {
-                    that.menuTableData = datas.rows
-                    that.menuradio = datas.rows[0]
-                    that.page.total = datas.total
-                }
-            })
-        }
     }
 }
 </script>
 
 <style lang="less">
 .evaluationIndex{
-    .menuBtn{
-        padding: 10px 20px 0 20px;
-        .titleSty{
-            border-left: 4px solid #007aab;
-            padding-left: 5px;
-            font-size: 16px;
-            font-weight: bold;
-            font-family: '微软雅黑';
-            margin-left:20px;
-            margin-bottom: 15px;
-        }
-        .periodSeach{
-            display: flex;
-            margin:20px;
-                .exceed{
-                    display: flex;
-                    margin-right:20px;
-                    .el-input{
-                        width: 200px;
-                        margin-right:10px;
-                        .el-input__inner{
-                            height:30px;
-                        }
-                        .el-input__suffix{
-                            .el-select__caret{
-                                line-height:30px;
-                            }
+  .evaluationIndexBtn{
+      background: #fff;
+      padding: 10px 20px 0 20px;
+      .collectSeach{
+          display: flex;
+          margin: 20px 20px 10px;
+            .exceed{
+                display: flex;
+                .el-input{
+                    margin-right:10px;
+                    .el-input__inner{
+                        height:30px;
+                    }
+                    .el-input__suffix{
+                        .el-select__caret{
+                            line-height:30px;
                         }
                     }
                 }
-        }
-        span{
-            font-size:14px;
-        }
-        .regionalBtn{
-            padding-left: 10px;
-        }
-
-        .exceed{
-            display: flex;
-            margin-right:20px;
-            .exTime{
-                width: 240px;
-                .el-select__tags{
-                    left: 1px;
-                    background:#fff;
-                }
-            }
-        }
-        .el-select{
-            // width: 160px;
-            margin-right:10px;
-            .el-input__inner{
-                height:30px;
             }
-            .el-input__suffix{
-                .el-select__caret{
-                    line-height:30px;
+            .el-select{
+                margin-right:10px;
+                .el-input__inner{
+                    height:30px;
+                }
+                .el-input__suffix{
+                    .el-select__caret{
+                        line-height:30px;
+                    }
                 }
             }
-        }
-        .el-button{
-            height: 30px;
-            // width:100px;
-            padding: 0 30px ;
-            // padding-top: 8px;
-            span{
-                margin:0;
-            }
-        }
-    }
-    .menuTableData{
-        padding: 10px 20px;
-        .el-table{
+      }
+      .titleSty{
+          border-left: 4px solid #007aab;
+          padding-left: 5px;
+          font-size: 16px;
+          font-weight: bold;
+          font-family: '微软雅黑';
+          margin-left:20px;
+      }
+      span{
+          font-size:14px;
+      }
+      .PeriodBtn{
+          padding-left: 10px;
+      }
+      .el-button{
+          height: 30px;
+          // width:100px;
+          padding: 0 30px ;
+          // padding-top: 8px;
+          span{
+              margin:0;
+          }
+      }
+  }
+  .evaluationIndexTableData{
+    padding: 10px 20px;
+    .el-table{
         .el-table__body-wrapper{
             .el-table__empty-block{
-                height: 70vh !important;
+            height: 65vh !important;
             }
         }
         .el-input__inner{
@@ -429,26 +352,24 @@ export default {
         .el-radio__label{
             display: none;
         }
-        }
-        .el-pagination{
-            margin-top: 20px;
-            text-align: end;
-            position: relative;
-        }
+    }
+    .el-pagination{
+        margin-top: 20px;
+        text-align: end;
+        position: relative;
+    }
     }
     .el-overlay{
         .el-dialog{
             .el-dialog__body{
                 padding: 30px 60px 30px 20px !important;
-                .windframFromsxx{
-                    padding-right: 20px !important;
-                    .el-select{
+                .periodFrom{
+                    .el-select, .el-input{
                         width: 100%;
                     }
                 }
             }
         }
     }
-    
 }
 </style>

+ 401 - 0
src/components/evaluationSystem/evaluationRulesPage.vue

@@ -0,0 +1,401 @@
+<template>
+    <div class="evaluationRules" v-loading="loadingImport">
+        <div class="evaluationRulesBtn">
+            <p class="titleSty">考评规则配置</p>
+            <div class="collectSeach">
+                <div class="exceed">
+                    <span style="margin-top: 3px;">选项名称:</span>
+                    <el-select v-model="indicatorIdS" placeholder="请选择指标名称">
+                        <el-option
+                        v-for="item in indicatoroptions"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value">
+                        </el-option>
+                    </el-select>
+                </div>
+                <el-button type="primary" style="margin-left: 10px;" @click="getSeachData">搜索</el-button>
+                <el-button style="margin-left: 10px;" @click="reset">重置</el-button>
+            </div>
+            <div style="display:flex;justify-content: space-between;padding: 10px;">
+                <el-row :gutter="10" class="PeriodBtn">
+                    
+                        <!-- @click="handleAdd"
+                        @click="handleUpdate" -->
+                    <el-col :span="1.5">
+                        <el-button
+                        type="primary"
+                        plain
+                        icon="Plus"
+                        size="mini"
+                        @click="handleAdd"
+                        >新增</el-button>
+                    </el-col>
+                    <el-col :span="1.5">
+                        <el-button
+                        type="success"
+                        plain
+                        icon="Edit"
+                        size="mini"
+                        >修改</el-button>
+                    </el-col>
+                    <el-col :span="1.5">
+                        <el-button
+                        type="danger"
+                        plain
+                        icon="Delete"
+                        size="mini"
+                        :disabled="deleteSelect.length === 0"
+                        @click="handleDelete"
+                        >批量删除</el-button>
+                    </el-col>
+                    <el-col :span="1.5">
+                        <el-button
+                        type="info"
+                        plain
+                        icon="Upload"
+                        size="mini"
+                        @click="handleImport"
+                        >导入</el-button>
+                    </el-col>
+                    <el-col :span="1.5">
+                        <el-button
+                            type="warning"
+                            plain
+                            icon="Download"
+                            size="mini"
+                            @click="handleExport"
+                        >导出</el-button>
+                    </el-col>
+                </el-row>
+            </div>
+            <div class="evaluationRulesTableData">
+                <el-table :data="evaluationRulesData" border style="width: 100%" @select="rowClick" @select-all="allSelect">
+                    <el-table-column type="selection" label="操作" align="center"></el-table-column>
+                    <el-table-column label="创建时间">
+                        <template #default="scope">
+                            <span>{{scope.row.create_time}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="创建者">
+                        <template #default="scope">
+                            <span>{{scope.row.create_by}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="指标ID">
+                        <template #default="scope">
+                            <span>{{scope.row.indicator_id}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="指标总分">
+                        <template #default="scope">
+                            <span>{{scope.row.total_score}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="描述">
+                        <template #default="scope">
+                            <span>{{scope.row.desc}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="更新时间">
+                        <template #default="scope">
+                            <span>{{scope.row.update_time}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="更新者">
+                        <template #default="scope">
+                            <span>{{scope.row.update_by}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="评分公式">
+                        <template #default="scope">
+                            <span>{{scope.row.evaluate_formula}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="评分方式">
+                        <template #default="scope">
+                            <span>{{scope.row.evaluate_method}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="隐射函数">
+                        <template #default="scope">
+                            <span>{{scope.row.mapping_function}}</span>
+                        </template>
+                    </el-table-column>
+                </el-table>
+                <el-pagination
+                    @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange"
+                    :current-page="page.currentPage"
+                    :page-size="page.pagesize"
+                    layout="total, prev, pager, next, jumper"
+                    :total="page.total">
+                </el-pagination>
+            </div>
+            <el-dialog :title="title" v-model="dialogVisible" width="600px" :close-on-click-modal="false">
+                <div class="periodFrom">
+                    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" :validate-on-rule-change="false">
+                        <el-form-item label="指标名称" prop="indicatorId">
+                            <el-select v-model="ruleForm.indicatorId" placeholder="请选择指标名称">
+                                <el-option
+                                v-for="item in indicatoroptions"
+                                :key="item.value"
+                                :label="item.label"
+                                :value="item.value">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="指标总分" prop="totalScore">
+                            <el-input v-model="ruleForm.totalScore" placeholder="请输入指标总分"></el-input>
+                        </el-form-item>
+                        <el-form-item label="评分方式" prop="evaluateMethod">
+                            <el-select v-model="ruleForm.evaluateMethod" placeholder="请选择评分方式">
+                                <el-option
+                                v-for="item in optionNameoptions"
+                                :key="item.value"
+                                :label="item.label"
+                                :value="item.value">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="评分公式" prop="evaluateFormula">
+                            <el-input v-model="ruleForm.evaluateFormula" placeholder="请输入评分公式"></el-input>
+                        </el-form-item>
+                        <el-form-item label="隐射函数" prop="mappingFun">
+                            <el-select v-model="ruleForm.mappingFun" placeholder="请选择隐射函数">
+                                <el-option
+                                v-for="item in optionNameoptions"
+                                :key="item.value"
+                                :label="item.label"
+                                :value="item.value">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="描述" prop="desc">
+                            <el-input v-model="ruleForm.desc" :rows="5" type="textarea" placeholder="请输入描述"></el-input>
+                        </el-form-item>
+                    </el-form>
+                </div>
+                <template #footer>
+                    <span class="dialog-footer">
+                        <el-button @click="dialogVisible = false">取 消</el-button>
+                        <el-button type="primary">确 定</el-button>
+                    </span>
+                </template>
+            </el-dialog>
+        </div>
+        <import-dailog ref="importPage" @successImport="successImport" @importLoading="importLoading"></import-dailog>
+    </div>
+</template>
+
+<script>
+import importDailog from '../importPage/importDailog.vue'
+import {apiGetgetStandardPointManagementList, apiGetdeleteStandardPointManagement} from '../../api/api'
+export default {
+  components: { importDailog },
+    data() {
+        return {
+            dialogVisible: false,
+            title: '',
+            ruleForm: {
+                indicatorId: '',
+                totalScore: '',
+                evaluateMethod: '',
+                evaluateFormula: '',
+                mappingFun: '',
+                desc: ''
+            },
+            rules: {
+                indicatorId: [
+                    { required: true, message: '请选择指标名称', trigger: 'blur' }
+                ],
+                totalScore: [
+                    { required: true, message: '请输入指标总分', trigger: 'blur' }
+                ],
+                evaluateMethod: [
+                    { required: true, message: '请选择评分方式', trigger: 'change' }
+                ],
+                evaluateFormula: [
+                    { required: true, message: '请输入评分公式', trigger: 'blur' }
+                ],
+                mappingFun: [
+                    { required: true, message: '请选择隐射函数', trigger: 'change' }
+                ],
+                desc: [
+                    { required: true, message: '请输入描述', trigger: 'change' }
+                ]
+            },
+            indicatoroptions: [],
+            optionNameoptions:[],
+            indicatorIdS: '',
+
+            windframradio: {},
+            deleteSelect: [],
+            changeDateSelect: [],
+            loadingImport: false,
+            evaluationRulesData:[],
+            single: false,
+            regionaloptions:[],
+            page:{
+                pagesize: 12,
+                currentPage: 1,
+                total: 0
+            }
+        }
+    },
+    mounted() {
+        // this.getCollectorwireprojectList()
+    },
+    methods:{
+        getSeachData() {
+            this.page.currentPage = 1
+            this.getCollectorwireprojectList('seach')
+        },
+        successImport(val) {
+            this.loadingImport = false
+            this.getCollectorwireprojectList()
+        },
+        importLoading(val) {
+            this.loadingImport = true
+        },
+        handleSizeChange(val){
+            this.page.pagesize = val
+        },
+        handleCurrentChange(val){
+            this.page.currentPage =val
+        },
+        rowClick(selection, row) {
+            this.windframradio = {}
+            this.deleteSelect = []
+            this.changeDateSelect = []
+            if (selection.length === 1) { 
+                this.windframradio = selection[0]
+            }
+            if (selection.length > 0) {
+                selection.forEach(item =>{
+                    this.deleteSelect.push(item.itemNo)
+                    this.changeDateSelect.push(item.itemNo)
+                })
+            }
+        },
+        allSelect(selection) {
+            this.deleteSelect = []
+            this.changeDateSelect = []
+            if (selection.length > 0) {
+                selection.forEach(item =>{
+                    this.deleteSelect.push(item.itemNo)
+                    this.changeDateSelect.push(item.itemNo)
+                })
+            }
+        },
+        // 新增区域信息
+        handleAdd() {
+            this.dialogVisible = true
+            // this.single = false
+            this.title = '新增考评规则配置'
+            this.$nextTick(() =>{
+                // this.resetForm()
+                // this.$refs['ruleForm'].clearValidate()
+            })
+        },
+        handleImport() {
+            this.$refs.importPage.upload.title = "考评规则配置信息导入"
+            this.$refs.importPage.upload.open = true
+        },
+    }
+}
+</script>
+
+<style lang="less">
+.evaluationRules{
+  .evaluationRulesBtn{
+      background: #fff;
+      padding: 10px 20px 0 20px;
+      .collectSeach{
+          display: flex;
+          margin: 20px 20px 10px;
+            .exceed{
+                display: flex;
+                .el-input{
+                    margin-right:10px;
+                    .el-input__inner{
+                        height:30px;
+                    }
+                    .el-input__suffix{
+                        .el-select__caret{
+                            line-height:30px;
+                        }
+                    }
+                }
+            }
+            .el-select{
+                margin-right:10px;
+                .el-input__inner{
+                    height:30px;
+                }
+                .el-input__suffix{
+                    .el-select__caret{
+                        line-height:30px;
+                    }
+                }
+            }
+      }
+      .titleSty{
+          border-left: 4px solid #007aab;
+          padding-left: 5px;
+          font-size: 16px;
+          font-weight: bold;
+          font-family: '微软雅黑';
+          margin-left:20px;
+      }
+      span{
+          font-size:14px;
+      }
+      .PeriodBtn{
+          padding-left: 10px;
+      }
+      .el-button{
+          height: 30px;
+          // width:100px;
+          padding: 0 30px ;
+          // padding-top: 8px;
+          span{
+              margin:0;
+          }
+      }
+  }
+  .evaluationRulesTableData{
+    padding: 10px 20px;
+    .el-table{
+        .el-table__body-wrapper{
+            .el-table__empty-block{
+            height: 65vh !important;
+            }
+        }
+        .el-input__inner{
+            height: 30px !important;
+        }
+        .el-radio__label{
+            display: none;
+        }
+    }
+    .el-pagination{
+        margin-top: 20px;
+        text-align: end;
+        position: relative;
+    }
+    }
+    .el-overlay{
+        .el-dialog{
+            .el-dialog__body{
+                padding: 30px 60px 30px 20px !important;
+                .periodFrom{
+                    .el-select, .el-input{
+                        width: 100%;
+                    }
+                }
+            }
+        }
+    }
+}
+</style>

+ 130 - 0
src/components/importPage/importDailog.vue

@@ -0,0 +1,130 @@
+<template>
+  <!-- 用户导入对话框 -->
+    <el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
+        <el-upload
+            ref="upload"
+            :limit="1"
+            accept=".xlsx, .xls"
+            :headers="upload.headers"
+            :action="upload.processurl + upload.url"
+            :disabled="upload.isUploading"
+            :on-progress="handleFileUploadProgress"
+            :on-success="handleFileSuccess"
+            :on-error="handleFileError"
+            :auto-upload="false"
+            drag
+        >
+            <i class="el-icon-upload"></i>
+            <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+            <template #tip>
+                <div class="el-upload__tip text-center">
+                    <span style="display:inline-block;margin-top:10px">仅允许导入xls、xlsx格式文件。</span>
+                    <el-link type="primary" v-if="upload.showModel" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
+                </div>
+            </template>
+        </el-upload>
+        <template #footer>
+            <div class="dialog-footer">
+                <el-button type="primary" @click="submitFileForm">确 定</el-button>
+                <el-button @click="upload.open = false">取 消</el-button>
+            </div>
+        </template>
+    </el-dialog>
+</template>
+
+<script>
+import { getToken } from '@/api/auth'
+export default {
+    data() {
+        return {
+            // 用户导入参数
+            upload: {
+                // 展示下载模板
+                showModel: true,
+                // 是否显示弹出层(用户导入)
+                open: false,
+                // 弹出层标题(用户导入)
+                title: "",
+                // 是否禁用上传
+                isUploading: false,
+                // 是否更新已经存在的用户数据
+                updateSupport: 0,
+                // 设置上传的请求头部
+                headers: { 
+                    // Authorization: "Bearer ",
+                    token: getToken() 
+                },
+                // 上传的地址
+                processurl: (process.env.NODE_ENV === 'production') ? process.env.PRO_BASE_API : process.env.BASE_API,
+                url: '',
+                // 上传模板名称
+                urlName: '',
+                // 上传文件名称
+                proName: ''
+            },
+        }
+    },
+    methods:{
+        /** 下载模板操作 */
+        importTemplate() {
+            // this.download('system/user/importTemplate', {
+            //     ...this.queryParams
+            // }, `user_template_${new Date().getTime()}.xlsx`)
+            let url = '/predict/api/configureShare/dexcel'
+            let parasm = {
+                templateName: this.upload.urlName
+            }
+            this.$utils.downloadTemplate(url, parasm, this.upload.proName)
+        },
+        // 文件上传中处理
+        handleFileUploadProgress(event, file, fileList) {
+            this.upload.isUploading = true;
+            this.$emit('importLoading', true)
+        },
+        // 文件上传成功处理
+        handleFileSuccess(response, file, fileList) {
+            this.upload.open = false;
+            this.upload.isUploading = false;
+            this.$refs.upload.clearFiles();
+            // this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
+            if (response.code === 500) {
+                if (response.msg.indexOf('运行时异常') !== -1) {
+                    this.$message.error('模板数据不匹配,请使用模板导入');
+                    this.importTemplate()
+                } else {
+                    this.$message.error(response.msg);
+                }
+            } else {
+                this.$message({
+                    message: response.msg,
+                    type: 'success'
+                });
+            }
+            this.$emit('successImport', response)
+            // this.getList();
+        },
+        handleFileError(response, file, fileList) {
+            this.$message.error(response.msg);
+        },
+        // 提交上传文件
+        submitFileForm() {
+            this.$refs.upload.submit();
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.el-overlay{
+    .el-dialog{
+        .el-dialog__header{
+            .el-dialog__title{
+                font-size: 14px;
+            }
+        }
+        .el-dialog__body{
+            padding: 20px;
+        }
+    }
+}
+</style>

+ 56 - 29
src/router/index.js

@@ -10,64 +10,91 @@ const routes = [
             import(
                 '../views/homePage.vue'
             ),
-        children:[
+        children: [
             {
-                path: '/',
-                name: 'assessment',
+                path: '/home',
+                name: 'homePage',
                 meta: {
-                    title: '考评业务',
+                    title: '首页',
                 },
                 component: () =>
                     import(
-                        '../components/assessmentPage.vue'
+                        '../components/gatewayPage.vue'
                     ),
+            },
+            {
+                path: '/benchmark',
+                name: 'benchmark',
+                meta: {
+                    title: '对标业务',
+                },
+                component: () =>
+                    import(
+                        '../components/benchmarkingPage.vue'
+                    ),
+            },
+            {
+                path: '/assessment',
+                name: 'assessment',
+                meta: {
+                    title: '考评业务',
+                },
                 children: [
                     {
-                        path: '/assessment/home',
-                        name: 'homePage',
+                        path: '/assessment/evaluationStart',
+                        name: 'evaluationStart',
                         meta: {
-                            title: '首页',
+                            title: '考评启动',
                         },
                         component: () =>
                             import(
-                                '../components/gatewayPage.vue'
-                            ),
-                    },
-                    {
-                        path: '/assessment/benchmark',
-                        name: 'benchmark',
-                        meta: {
-                            title: '对标业务',
-                        },
-                        component: () =>
-                            import(
-                                '../components/benchmarkingPage.vue'
+                                '../components/assessment/evaluationStartPage.vue'
                             ),
                     },
+                ]
+            },
+            {
+                path: '/knowledge',
+                name: 'knowledge',
+                meta: {
+                    title: '知识库',
+                },
+                component: () =>
+                    import(
+                        '../components/knowledgePage.vue'
+                    ),
+            },
+            {
+                path: '/evaluationSystem',
+                name: 'benchmark',
+                meta: {
+                    title: '考评体系配置',
+                },
+                children: [
                     {
-                        path: '/assessment/knowledge',
-                        name: 'knowledge',
+                        path: '/evaluationSystem/evaluationIndex',
+                        name: 'evaluationIndex',
                         meta: {
-                            title: '知识库',
+                            title: '考评指标管理',
                         },
                         component: () =>
                             import(
-                                '../components/knowledgePage.vue'
+                                '../components/evaluationSystem/evaluationIndexPage.vue'
                             ),
                     },
                     {
-                        path: '/assessment/evaluationSystem/evaluationIndexPage',
-                        name: 'evaluationSystem',
+                        path: '/evaluationSystem/evaluationRules',
+                        name: 'evaluationRules',
                         meta: {
-                            title: '考评指标管理',
+                            title: '考评规则配置',
                         },
                         component: () =>
                             import(
-                                '../components/evaluationSystem/evaluationIndexPage.vue'
+                                '../components/evaluationSystem/evaluationRulesPage.vue'
                             ),
                     },
                 ]
-            }
+            },
         ]
     },
 ]

+ 301 - 64
src/views/homePage.vue

@@ -15,21 +15,20 @@
                 </div>
             </div>
         </div> -->
-        <div class="frameMain" :style="mainHeight">
-            <!-- <div class="topMain">
+        <div class="frameMain" :style="allHeight">
+            <div class="treeList">
                 <p>全业务域对标考评系统</p>
-                <div class="messageTit">
-                    <el-badge is-dot>
-                        <el-icon size="large"><Message /></el-icon>
-                    </el-badge>
-                    <div class="avatar">
-                        <el-avatar size="small">
-                            <el-icon size="large"><UserFilled /></el-icon>
-                        </el-avatar>
-                    </div>
-                </div>
-            </div> -->
-            <div class="bottomMain">
+                <el-tree ref="tree" :data="forecastDatas" :props="defaultProps" highlight-current node-key="id"
+                :default-expanded-keys="expendData" @node-click="handleNodeClick" @node-expand="handleNodeExpand">
+                    <template #default="{ node }">
+                        <span class="custom-tree-node">
+                            <el-icon size="small" v-if="node.level === 1"><FolderOpened /></el-icon>
+                            <span style="margin-left:5px;font-size:14px;line-height:35px;display:inline-block">{{node.label}}</span>
+                        </span>
+                    </template>
+                </el-tree>
+            </div>
+            <div class="mainMessage" :style="mainHeight">
                 <router-view></router-view>
             </div>
         </div>
@@ -37,30 +36,17 @@
 </template>
 
 <script>
-
-import gateway from "../assets/indexIcon/gateway.png"
-import benchmarking from "../assets/indexIcon/benchmarking.png"
 import Assessment from "../assets/indexIcon/Assessment.png"
-import configure from "../assets/indexIcon/configure.png"
 export default {
     data() {
         return {
             leftLevelData: [],
-        }
-    },
-    watch:{
-        $route: {
-            handler: function(route) {
-                console.log(route)
-                this.leftLevelData.forEach(it =>{
-                    if (it.index === route.path) {
-                        it.showBac = true
-                    } else {
-                        it.showBac = false
-                    }
-                })
-            },
-            immediate: true
+            forecastDatas: [],
+            expendData: [],
+            defaultProps: {
+                children: 'children',
+                label: 'label',
+            }
         }
     },
     created(){
@@ -87,23 +73,238 @@ export default {
             //     image: configure
             // }
         ]
-        // if (this.$route?.path) {
-        //     let path = this.$route?.path
-        //     this.leftLevelData.forEach(it =>{
-        //         debugger
-        //         if (it.index === path) {
-        //             it.showBac = true
-        //         } else {
-        //             it.showBac = false
-        //         }
-        //     })
-        // }
+        this.forecastDatas = [
+            {
+                id: '1',
+                label: '对标业务',
+                icon: 'FolderOpened',
+                children: [
+                    {
+                        id: '1-1',
+                        label: '排行榜',
+                    },
+                    {
+                        id: '1-2',
+                        label: '分类对标',
+                    },
+                    {
+                        id: '1-3',
+                        label: '综合对标',
+                    },
+                    {
+                        id: '1-4',
+                        label: '立标管理',
+                    },
+                    {
+                        id: '1-5',
+                        label: '寻标管理',
+                    },
+                    {
+                        id: '1-6',
+                        label: '达标管理',
+                    },
+                    {
+                        id: '1-7',
+                        label: '超标管理',
+                    },
+                    {
+                        id: '1-8',
+                        label: '对标报告'
+                    }
+                ]
+            },
+            {
+                id: '2',
+                label: '考评业务',
+                children: [
+                    {
+                        id: '2-1',
+                        label: '考评总览'
+                    },
+                    {
+                        id: '2-2',
+                        label: '考评启动',
+                        path: '/assessment/evaluationStart'
+                    },
+                    {
+                        id: '2-3',
+                        label: '考评修订'
+                    },
+                    {
+                        id: '2-4',
+                        label: '考评目标分解'
+                    },
+                    {
+                        id: '2-5',
+                        label: '月/季度考评'
+                    },
+                    {
+                        id: '2-6',
+                        label: '考评项对标'
+                    },
+                    {
+                        id: '2-7',
+                        label: '考评项预警'
+                    },
+                    {
+                        id: '2-8',
+                        label: '年度考评'
+                    },
+                    {
+                        id: '2-9',
+                        label: '人员考评'
+                    },
+                    {
+                        id: '2-10',
+                        label: '任期考评'
+                    },
+                    {
+                        id: '2-11',
+                        label: '考评监督'
+                    },
+                    {
+                        id: '2-12',
+                        label: '考评评级'
+                    },
+                    {
+                        id: '2-13',
+                        label: '考评报告'
+                    },
+                    {
+                        id: '2-14',
+                        label: '考评公告'
+                    },
+                    {
+                        id: '2-15',
+                        label: '奖金及薪资总额调整'
+                    },
+                ]
+            },
+            {
+                id: '3',
+                label: '对标考评知识',
+                children: [
+                    {
+                        id: '3-1',
+                        label: '对标指标标准',
+                    },
+                    {
+                        id: '3-2',
+                        label: '对标算法规则',
+                    },
+                    {
+                        id: '3-3',
+                        label: '对标预警规则',
+                    },
+                    {
+                        id: '3-4',
+                        label: '考评得分规则',
+                    },
+                    {
+                        id: '3-5',
+                        label: '考评评级规则',
+                    },
+                    {
+                        id: '3-6',
+                        label: '考评预警规则',
+                    },
+                ]
+            },
+            {
+                id: '4',
+                label: '对标体系配置',
+                children: [
+                    {
+                        id: '4-1',
+                        label: '对标指标管理',
+                    },
+                    {
+                        id: '4-2',
+                        label: '指标规则配置',
+                    },
+                    {
+                        id: '4-3',
+                        label: '对标结构配置',
+                    },
+                ]
+            },
+            {
+                id: '5',
+                label: '考评体系配置',
+                children: [
+                    {
+                        id: '5-1',
+                        label: '考评指标管理',
+                        path: '/evaluationSystem/evaluationIndex'
+                    },
+                    {
+                        id: '5-2',
+                        label: '考评规则配置',
+                        path: '/evaluationSystem/evaluationRules'
+                    },
+                    {
+                        id: '5-3',
+                        label: '考评单位配置',
+                    },
+                    {
+                        id: '5-4',
+                        label: '考评部门配置',
+                    },
+                    {
+                        id: '5-5',
+                        label: '考评人员配置',
+                    },
+                ]
+            },
+            {
+                id: '6',
+                label: '基础信息配置',
+                children: [
+                    {
+                        id: '6-1',
+                        label: '人员权限配置',
+                    },
+                    {
+                        id: '6-2',
+                        label: '工作流程配置',
+                    }
+                ]
+            }
+        ]
+        this.$nextTick(() => {
+            if (this.$route?.path) {
+                let path = this.$route.path
+                this.expendData = []
+                for(let i =0; i<this.forecastDatas.length; i++) {
+                    let item = this.forecastDatas[i]
+                    for(let j =0; j<item.children.length; j++) {
+                        let it = item.children[j]
+                        if (it.path === path) {
+                            if (this.$refs.tree) {
+                                this.$refs.tree.setCurrentKey(it.id)
+                                this.expendData = [item.id]
+                            }
+                        }
+                    }
+                }
+            }
+        })
+    },
+    mounted() {
+         
     },
     computed:{
         mainHeight() {
             return {
+                // 'height': document.documentElement.clientHeight-50 + 'px'
+                'height': '95vh'
+            }
+        },
+        allHeight() {
+            return {
                 'width': '100%',
-                'height': document.documentElement.clientHeight-40 + 'px'
+                // 'height': document.documentElement.clientHeight-40 + 'px'
+                'height': '96vh'
             }
         },
     },
@@ -122,7 +323,21 @@ export default {
             return strWea
         },
         changeRoute(item) {
-            this.$router.push({ path: item.index})
+            if (item.index) {
+                this.$router.push({ path: item.index})
+            }
+        },
+        handleNodeClick(val) {
+            if (val.path) {
+                this.$router.push({ path: val.path})
+            }
+        },
+        handleNodeExpand(data, node) {
+            node.parent.childNodes.forEach(item =>{
+                if (data.id !== item.data.id) {
+                    item.expanded = false
+                }
+            })
         }
     }
 }
@@ -183,10 +398,12 @@ export default {
         background: #f3f7f8;
         border-radius: 30px;
         padding: 10px 0;
-        .topMain{
-            display: flex;
-            justify-content: space-between;
-            height: 60px;
+        display: flex;
+        .treeList{
+            margin-left: 5px;
+            width: 15%;
+            // background: #fff;
+            border-radius: 20px;
             p{
                 font-size: 18px;
                 font-family: '微软雅黑';
@@ -194,25 +411,45 @@ export default {
                 color: #171e28;
                 position: relative;
                 left: 30px;
-                top: 15px;
+                top: 5px;
                 letter-spacing: 1px;
             }
-            .messageTit{
-                margin-right: 50px;
-                display: flex;
-                .el-badge{
-                    margin: 15px 25px 0 0;
-                    cursor: pointer;
-                }
-                .avatar{
-                    margin-top: 10px;
-                    cursor: pointer;
+            .el-tree{
+                position: relative;
+                top: 15px;
+                padding: 0 0 0 20px;
+                background: transparent;
+                .el-tree-node{
+                    .el-tree-node__content{
+                        height: 35px;
+                        .custom-tree-node{
+                            height: 35px;
+                        }
+                    }
+                    .el-tree-node__children{
+                        .el-tree-node__content{
+                            height: 35px;
+                            .custom-tree-node{
+                                height: 35px;
+                            }
+                        }
+                    }
                 }
             }
+            .el-tree--highlight-current
+            .el-tree-node.is-current
+            > .el-tree-node__content {
+                background-color: rgba(135, 206, 235, 0.2);
+                color: #007aab;
+                font-weight: bold;
+                border-radius: 5px;
+            }
         }
-        .bottomMain{
-            display: flex;
-            
+        .mainMessage{
+            width: 84%;
+            padding-top: 10px;
+            background: #fff;
+            border-radius: 20px;
         }
     }
 }